/* sections.css: per-section layout */

/* hero */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0,0.88fr) minmax(440px,1.12fr);
  align-items: center;
  align-content: center; /* keep copy + cards + marquee as one centered block, no stretched mid-gap */
  column-gap: clamp(1.6rem,4.4vw,3rem);
  row-gap: clamp(0.4rem,1.2vw,0.7rem);
  min-height: 100svh;
  margin-top: 0;
  /* asymmetric padding biases the centered block downward (more top, less bottom) */
  padding-top: clamp(6.25rem,9vw,8rem);
  padding-bottom: clamp(0.75rem,2vw,1.5rem);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--hero-text);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 75% 12%, var(--stage-blue), transparent 28%),
    radial-gradient(circle at 24% 20%, var(--stage-red), transparent 22%),
    linear-gradient(140deg, var(--stage-bg) 0%, var(--stage-mid) 56%, var(--stage-bg) 100%);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: 0;
  width: 100vw;
  height: 8rem;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--hero-fade-from), var(--bg));
  pointer-events: none;
}
.hero-copy { max-width: 560px; }
.hero-copy h1 {
  max-width: 11ch;
  color: var(--hero-text);
  font-size: 4.7rem;
  overflow-wrap: normal;
  word-break: keep-all;
}
.hero-copy .lede {
  max-width: 42ch;
  color: var(--hero-muted);
}
.hero .eyebrow { color: var(--hero-eyebrow); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1.45rem 0 0; }
.hero-platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 1.4rem; margin: 1.15rem 0 0; color: var(--muted); }
.hero-os { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; font-weight: 600; }
.hero-os img { width: 16px; height: 16px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.72; }
:root[data-theme="light"] .hero-os img { filter: brightness(0); opacity: 0.6; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .hero-os img { filter: brightness(0); opacity: 0.6; } }
.hero .btn-primary { background: var(--hero-primary-bg); color: var(--hero-primary-fg); box-shadow: none; }
.hero .btn-secondary { background: var(--hero-secondary-bg); border-color: var(--hero-secondary-border); color: var(--hero-secondary-fg); }
@media (max-width: 1120px) {
  .hero {
    grid-template-columns: minmax(0,0.86fr) minmax(0,1.14fr);
    column-gap: 2rem;
  }
  .hero-copy h1 { font-size: 4rem; }
  .hero-copy .lede { max-width: 38ch; }
  .product-stack { min-height: 560px; }
  .app-widget-main { inset: 58px 0 26px 18px; }
  .app-widget-back { inset: 30px 70px 190px 0; }
  .app-widget-front { width: 52%; bottom: 34px; }
  .product-stack .tm-inner { padding: 18px; }
  .product-stack .tm-title { font-size: 20px; }
  .product-stack .tm-tabs span { padding: 8px 11px; font-size: 11px; }
  .product-stack .tm-titlebar { margin-bottom: 25px; }
  .product-stack .tm-label { font-size: 13px; }
  .product-stack .tm-total { font-size: 46px; }
  .product-stack .tm-row-name, .product-stack .tm-row-value { font-size: 15px; }
  .product-stack .tm-row-value span { font-size: 12px; }
}

@media (min-width: 861px) and (max-height: 820px) {
  .hero {
    column-gap: clamp(1.4rem, 3.5vw, 2.4rem);
    padding-top: clamp(5rem, 7vw, 5.8rem);
    padding-bottom: 1.45rem;
  }
  .hero-copy h1 {
    max-width: 10.6ch;
    font-size: clamp(3.75rem, 5.2vw, 4.25rem);
  }
  .hero-copy .lede {
    max-width: 38ch;
    font-size: 1rem;
  }
  .hero .eyebrow { margin-bottom: 0.65rem; }
  .hero-actions { margin-top: 1.15rem; }
  .product-stack { min-height: 510px; }
  .app-widget-main { inset: 34px 8px 14px 38px; }
  .app-widget-back { inset: 16px 72px 158px 0; }
  .app-widget-front { width: 51%; min-height: 160px; bottom: 14px; }
  .product-stack .tm-inner { padding: 17px 19px 18px; }
  .product-stack .tm-titlebar { margin-bottom: 24px; }
  .product-stack .tm-title { font-size: 19px; }
  .product-stack .tm-tabs span { padding: 8px 11px; font-size: 11px; }
  .product-stack .tm-label { font-size: 13px; }
  .product-stack .tm-total { margin-top: 10px; font-size: 47px; }
  .product-stack .tm-cost { font-size: 13px; }
  .product-stack .tm-breakdown { margin-top: 24px; }
  .product-stack .tm-row { margin-top: 13px; padding-bottom: 12px; }
  .product-stack .tm-row-name, .product-stack .tm-row-value { font-size: 15px; }
  .product-stack .tm-row-value span { font-size: 11px; }
  .product-stack .tm-footer { display: none; }
  .hero-tools {
    margin-top: 0;
    padding-top: 0.5rem;
  }
  .hero-tools .eyebrow { margin-bottom: 0.42rem; }
  .tool-chip {
    min-height: 34px;
    padding: 0.25rem 0.58rem 0.25rem 0.34rem;
    font-size: 0.82rem;
  }
  .tool-mark {
    width: 24px;
    height: 24px;
  }
  .tool-mark img {
    width: 15px;
    height: 15px;
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0,0.82fr) minmax(250px,0.9fr);
    column-gap: 1.25rem;
    padding-top: clamp(5.4rem, 9vw, 6.8rem);
    padding-bottom: clamp(2.4rem, 6vw, 4.5rem);
  }
  .hero-copy h1 {
    max-width: 8.6ch;
    font-size: 3.15rem;
  }
  .hero-copy .lede {
    max-width: 31ch;
    font-size: 0.96rem;
  }
  .hero-actions {
    gap: 0.65rem;
    margin-top: 1.2rem;
  }
  .hero .btn {
    min-height: 42px;
    padding: 0 0.95rem;
    font-size: 0.9rem;
  }
  .product-stack { min-height: 460px; }
  .app-widget-main {
    inset: 40px 0 18px 0;
    transform: rotateY(calc(-4deg + var(--ry, 0deg))) rotateX(calc(2deg + var(--rx, 0deg)));
  }
  .app-widget-back,
  .app-widget-front { display: none; }
  .product-stack .tm-inner { padding: 14px; }
  .product-stack .tm-titlebar { align-items: center; gap: 8px; margin-bottom: 20px; }
  .product-stack .tm-title { font-size: 17px; }
  .product-stack .tm-tabs { padding: 3px; }
  .product-stack .tm-tabs span { padding: 7px 8px; font-size: 10px; }
  .product-stack .tm-label { font-size: 11px; }
  .product-stack .tm-total { margin-top: 9px; font-size: 34px; }
  .product-stack .tm-cost { margin-top: 6px; font-size: 12px; }
  .product-stack .tm-breakdown { margin-top: 20px; }
  .product-stack .tm-row { margin-top: 12px; padding-bottom: 11px; }
  .product-stack .tm-row-head { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; }
  .product-stack .tm-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .product-stack .tm-row-name, .product-stack .tm-row-value { font-size: 13px; }
  .product-stack .tm-row-value { text-align: right; white-space: nowrap; }
  .product-stack .tm-row-value span { font-size: 10px; }
  .product-stack .tm-icon { width: 16px; height: 16px; }
  .product-stack .tm-icon img { width: 15px; height: 15px; }
  .product-stack .tm-bar { height: 5px; margin-top: 9px; }
  .product-stack .tm-row:nth-child(4),
  .product-stack .tm-footer { display: none; }
}

@media (max-width: 680px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    row-gap: 1.8rem;
    overflow: visible;
  }
  .hero-copy,
  .hero-visual {
    min-width: 0;
  }
  .hero-copy {
    width: 100%;
    max-width: none;
  }
  .hero-visual {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    overflow: hidden;
    justify-self: start;
  }
  .hero-copy h1 {
    max-width: 11ch;
    font-size: clamp(2.85rem, 9.4vw, 3.45rem);
    line-height: 1;
  }
  .product-stack {
    min-width: 0;
    min-height: clamp(405px, 78vw, 455px);
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
  }
  .app-widget-main {
    inset: 18px 0 0 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    transform: none;
  }
  .app-widget-back,
  .app-widget-front { display: none; }
}
@media (max-width: 560px) {
  .hero {
    padding-top: clamp(7.6rem, 26vw, 8.1rem);
    padding-bottom: 2.8rem;
  }
  .hero .eyebrow {
    display: block;
    margin-bottom: 0.58rem;
    font-size: 0.68rem;
    line-height: 1.25;
  }
  .hero-copy h1 {
    max-width: 11.2ch;
    font-size: clamp(2.45rem, 8vw, 2.7rem);
    line-height: 1.04;
  }
  .product-stack { min-height: 410px; }
  .product-stack .tm-inner { padding: 17px; }
  .product-stack .tm-titlebar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
  }
  .product-stack .tm-total { font-size: 36px; }
  .product-stack .tm-row-name, .product-stack .tm-row-value { font-size: 15px; }
  .product-stack .tm-row:nth-child(4) { display: none; }
}

/* supported tools marquee */
.hero-tools {
  grid-column: 1 / -1;
  min-width: 0;
  margin-top: 0; /* spacing to content handled by the hero row-gap */
  padding-top: 0.65rem;
  overflow: hidden;
  border-top: 1px solid color-mix(in srgb, var(--hero-text) 10%, transparent);
}
.hero-tools .eyebrow {
  margin-bottom: 0.6rem;
  color: var(--hero-soft);
}
.tool-marquee {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 0.18rem 0;
  mask-image: linear-gradient(to right, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
}
.tool-track {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: max-content;
  will-change: transform;
  animation: tool-marquee 30s linear infinite;
}
.tool-marquee:hover .tool-track { animation-play-state: paused; }
.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  min-height: 40px;
  padding: 0.34rem 0.68rem 0.34rem 0.42rem;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--hero-text) 10%, transparent);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--hero-text) 7%, transparent);
  color: var(--hero-muted);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0;
  backdrop-filter: blur(10px);
}
.tool-chip:hover {
  border-color: color-mix(in srgb, var(--hero-text) 18%, transparent);
  color: var(--hero-text);
  background: color-mix(in srgb, var(--hero-text) 11%, transparent);
}
@keyframes tool-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 0.275rem)); }
}
@media (prefers-reduced-motion: reduce) {
  .tool-marquee {
    mask-image: none;
    -webkit-mask-image: none;
  }
  .tool-track {
    flex-wrap: wrap;
    width: auto;
    animation: none;
  }
}

@media (max-width: 560px) {
  .tool-marquee {
    mask-image: linear-gradient(to right, transparent 0, #000 38px, #000 calc(100% - 38px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 38px, #000 calc(100% - 38px), transparent 100%);
  }
}

/* features — product tour: the feature rail on the left drives one glass widget
   stage on the right. setupTour in main.js moves .is-active; the active item's
   progress-bar animation paces the auto-advance (animationend → next screen). */
.features {
  padding-top: clamp(3rem, 6vw, 5rem);
}
.tour {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(1.6rem, 4.5vw, 3.6rem);
  align-items: center;
}
.tour-nav {
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}
.tour-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 1.05rem 0.2rem 1.1rem;
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--surface-border) 82%, transparent);
  border-radius: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.tour-item:last-child { border-bottom: 1px solid color-mix(in srgb, var(--surface-border) 82%, transparent); }
.tour-item:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: -3px;
  border-radius: 10px;
}
.tour-item strong {
  display: block;
  color: var(--text);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: 0;
  transition: color .3s ease;
}
.tour-item:hover strong,
.tour-item.is-active strong { color: var(--text-strong); }
/* only the active item unfolds its description */
.tour-item-body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .5s cubic-bezier(.2,.8,.2,1), opacity .4s ease;
}
.tour-item.is-active .tour-item-body { grid-template-rows: 1fr; opacity: 1; }
.tour-item-text {
  display: block;
  overflow: hidden;
  min-height: 0;
  padding-top: 0.42rem;
  max-width: 46ch;
  font-size: 0.93rem;
  line-height: 1.55;
}
/* the accent line doubles as active marker and auto-advance progress */
.tour-progress {
  display: block;
  height: 2px;
  margin-top: 0.9rem;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-border) 85%, transparent);
  opacity: 0;
  transition: opacity .3s ease;
}
.tour-item.is-active .tour-progress { opacity: 1; }
.tour-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.tour:not(.is-auto) .tour-item.is-active .tour-progress i { width: 100%; }
.tour.is-auto .tour-item.is-active .tour-progress i { animation: tour-progress 7s linear forwards; }
.tour.is-auto:hover .tour-item.is-active .tour-progress i,
.tour.is-auto:focus-within .tour-item.is-active .tour-progress i { animation-play-state: paused; }
@keyframes tour-progress {
  from { width: 0; }
  to { width: 100%; }
}

/* the stage: all screens share one grid cell and crossfade */
.tour-stage {
  position: relative;
  display: grid;
  align-items: center;
}
.tour-stage::before { /* soft accent glow behind the active screen */
  content: "";
  position: absolute;
  inset: 6% 4%;
  z-index: 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent-from) 14%, transparent), transparent 72%);
  filter: blur(12px);
  pointer-events: none;
}
.tour-screen {
  grid-area: 1 / 1;
  z-index: 1;
  align-self: center;
  opacity: 0;
  transform: translateY(22px) scale(0.975);
  filter: blur(7px);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity .55s cubic-bezier(.16,1,.3,1),
    transform .55s cubic-bezier(.16,1,.3,1),
    filter .55s cubic-bezier(.16,1,.3,1),
    visibility 0s linear .55s;
}
.tour-screen.is-active {
  z-index: 2;
  opacity: 1;
  transform: none;
  filter: none;
  visibility: visible;
  pointer-events: auto;
  transition-delay: .08s, .08s, .08s, 0s;
}
/* bars and the trends sparkline re-run their entrance every time a screen
   activates: while inactive they're pinned to zero, so flipping .is-active
   replays them */
.js .tour .tour-screen:not(.is-active) .tm-bar span { width: 0; transition: none; }
.js .tour .tour-screen .tm-spark svg { transition: clip-path 0.9s cubic-bezier(.2,.8,.2,1) 0.3s; }
.js .tour .tour-screen:not(.is-active) .tm-spark svg { clip-path: inset(0 100% 0 0); transition: none; }
.js .tour .tour-screen.is-active .tm-spark svg { clip-path: inset(0 0 0 0); }
/* the cache accordion springs open a beat after its screen lands, same
   pin-while-inactive trick (the app animates grid-template-rows 0fr→1fr too) */
.js .tour .tour-screen .tm-acc { transition: grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.9s; }
.js .tour .tour-screen .tm-acc-inner { transition: opacity 0.5s ease 0.9s; }
.js .tour .tour-screen:not(.is-active) .tm-acc { grid-template-rows: 0fr; transition: none; }
.js .tour .tour-screen:not(.is-active) .tm-acc-inner { opacity: 0; transition: none; }

@media (max-width: 920px) {
  .tour { grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
  .tour-nav {
    flex-direction: row;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .tour-nav::-webkit-scrollbar { display: none; }
  .tour-item {
    flex: none;
    width: auto;
    padding: 0.5rem 0.95rem;
    border: 1px solid var(--surface-border);
    border-radius: 999px;
    scroll-snap-align: start;
  }
  .tour-item:last-child { border-bottom: 1px solid var(--surface-border); }
  .tour-item.is-active {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--surface-border));
    background: color-mix(in srgb, var(--accent) 10%, transparent);
  }
  .tour-item strong { font-size: 0.92rem; white-space: nowrap; }
  .tour-item-body, .tour-progress { display: none; }
}

/* Service Status mock — provider cards inside the narrow .app-frame widget.
   Sits directly under the title bar like the AI Tool Limits view. */
.tm-status { margin-top: 13px; padding-bottom: 12px; border-bottom: 1px solid rgba(232,238,244,0.12); }
.tm-status:first-child { margin-top: 0; }
.tm-status:last-child { padding-bottom: 0; border-bottom: 0; }
.tm-status-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tm-status-name { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 800; }
.tm-badge {
  flex: none;
  font-size: 10px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
}
.tm-badge.is-ok { color: var(--success); background: color-mix(in srgb, var(--success) 18%, transparent); }
.tm-badge.is-degraded { color: var(--warn-text); background: color-mix(in srgb, var(--warn) 22%, transparent); }
.tm-status-title { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--widget-text); }
.tm-status-meta { margin-top: 4px; color: #8b94a1; font-size: 11px; }

/* dashboard — replica of the app's dedicated dashboard window. The two panes
   share one grid cell and crossfade like the tour screens; heatmap cells, bars,
   and candles are pinned while their pane is inactive so the entrances replay
   on every visit. setupDashboard() in main.js draws the SVGs. */
.dashboard {
  border-top: 1px solid color-mix(in srgb, var(--surface-border) 72%, transparent);
}
.dash-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 1060px;
  margin-inline: auto;
  border: 1px solid var(--widget-border);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)),
    linear-gradient(135deg, rgba(255,255,255,0.03), rgba(0,0,0,0.09)),
    var(--widget-bg);
  box-shadow: var(--widget-shadow);
  backdrop-filter: blur(42px) saturate(132%);
  -webkit-backdrop-filter: blur(42px) saturate(132%);
  color: var(--widget-text);
}
.dash-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(232,238,244,0.12);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.dash-win { display: flex; gap: 6px; color: #b8c0ce; }
.dash-win i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(255,255,255,0.05);
  font-style: normal;
  font-size: 13px;
  line-height: 1;
}
.dash-tabs { display: flex; gap: 4px; padding: 10px 16px 0; }
.dash-tab {
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.55;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: 9px 9px 0 0;
  transition: opacity .18s ease, background .18s ease;
}
.dash-tab:hover { opacity: 0.85; }
.dash-tab.is-active { opacity: 1; background: rgba(255,255,255,0.06); }
.dash-tab:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: -3px; }
.dash-stage { display: grid; }
.dash-pane {
  grid-area: 1 / 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 16px 18px;
  opacity: 0;
  transform: translateY(10px);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity .45s cubic-bezier(.16,1,.3,1),
    transform .45s cubic-bezier(.16,1,.3,1),
    visibility 0s linear .45s;
}
.dash-pane.is-active {
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
  transition-delay: .06s, .06s, 0s;
}

.dash-cards {
  display: grid;
  grid-template-columns: repeat(8, minmax(0,1fr));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  overflow: hidden;
}
.dash-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 13px 15px;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.dash-card:last-child { border-right: 0; }
.dash-card-v { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-card-k { font-size: 10px; opacity: 0.55; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dash-cap { font-size: 13px; font-weight: 600; opacity: 0.9; margin-bottom: 10px; }
.dash-heat { overflow-x: auto; scrollbar-width: none; }
.dash-heat::-webkit-scrollbar { display: none; }
.dash-heat svg { display: block; width: 100%; min-width: 660px; height: auto; }
.dash-heat .heat-month { fill: rgba(232,238,244,0.5); font-size: 10px; font-family: var(--sans); }
.dash-heat .heat.lvl-0 { fill: rgba(255,255,255,0.04); }
.dash-heat .heat.lvl-1 { fill: rgba(90,170,255,0.18); }
.dash-heat .heat.lvl-2 { fill: rgba(120,190,255,0.45); }
.dash-heat .heat.lvl-3 { fill: rgba(150,210,255,0.8); }
.dash-heat .heat.lvl-4 { fill: rgba(180,230,255,1); }

.dash-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 32px; }
.dash-bd-title { font-size: 12px; font-weight: 600; opacity: 0.6; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.dash-bd-row {
  display: grid;
  grid-template-columns: 128px 1fr auto 46px;
  align-items: center;
  gap: 12px;
  padding: 3px 0;
  font-size: 12px;
}
.dash-bd-name { min-width: 0; opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-bd-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.06); overflow: hidden; }
.dash-bd-track i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: var(--bar, #58bfca); }
.dash-bd-val { font-variant-numeric: tabular-nums; opacity: 0.8; text-align: right; }
.dash-bd-pct { font-variant-numeric: tabular-nums; opacity: 0.55; text-align: right; }

.dash-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash-seg { display: inline-flex; background: rgba(255,255,255,0.05); border-radius: 8px; padding: 2px; }
.dash-seg button {
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 6px;
  transition: opacity .15s ease, background .15s ease;
}
.dash-seg button:hover { opacity: 0.9; }
.dash-seg button.is-active { opacity: 1; background: rgba(255,255,255,0.12); }
.dash-seg button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: -3px; }
/* the real dashboard hides the stack toggle in K-line mode */
.dash-seg.is-hidden { display: none; }
.dash-ranges { display: flex; align-items: center; gap: 4px; margin-left: auto; font-size: 11.5px; font-weight: 600; }
.dash-ranges span { opacity: 0.5; padding: 4px 10px; border-radius: 7px; }
.dash-ranges .is-active { opacity: 1; background: rgba(255,255,255,0.12); }

.dash-chart svg { display: block; width: 100%; height: auto; }
.dash-chart .axis-base { stroke: rgba(232,238,244,0.18); stroke-width: 1; }
.dash-chart .grid-line { stroke: rgba(232,238,244,0.07); stroke-width: 1; }
.dash-chart .axis-label { fill: rgba(232,238,244,0.5); font-size: 10px; font-family: var(--sans); }
.dash-chart .candle-up { stroke: #4ec77f; fill: #4ec77f; }
.dash-chart .candle-down { stroke: #f06a7b; fill: #f06a7b; }
.dash-chart .candle-wick { stroke-width: 1.5; }
.dash-chart .candle-body { stroke: none; }

.dash-legend { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 2px 24px; }
.dash-legend.is-hidden { display: none; }
.dash-legend-row {
  display: grid;
  grid-template-columns: 1fr auto 50px;
  gap: 12px;
  align-items: center;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 12px;
}
.dash-legend-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; opacity: 0.9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-legend-swatch { width: 11px; height: 11px; border-radius: 3px; flex: none; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }
.dash-legend-val { font-variant-numeric: tabular-nums; opacity: 0.8; text-align: right; }
.dash-legend-pct { font-variant-numeric: tabular-nums; opacity: 0.55; text-align: right; }

/* cursor tooltip + column highlight, same anatomy as the app's dashboard */
.dash-chart .bar-hover { fill: transparent; pointer-events: all; }
.dash-chart .bar-hover:hover { fill: rgba(255,255,255,0.07); }
.dash-tooltip {
  position: fixed;
  z-index: 120; /* above the z-100 nav: tooltips top the stack */
  pointer-events: none;
  min-width: 130px;
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9px;
  background: rgba(21,26,34,0.96);
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
  color: var(--widget-text);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.45;
}
.dash-tooltip.hidden { display: none; }
.tt-head { margin-bottom: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tt-row { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.tt-dot { flex: none; width: 9px; height: 9px; border-radius: 2px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }
.tt-name { flex: 1; opacity: 0.85; white-space: nowrap; }
.tt-val { padding-left: 12px; font-variant-numeric: tabular-nums; opacity: 0.95; }

@media (prefers-reduced-motion: no-preference) {
  .js .dash-frame.is-visible .dash-pane.is-active .dash-heat .heat {
    animation: heat-in 0.5s ease both;
    animation-delay: var(--d, 0s);
  }
  .js .dash-pane.is-active .dash-chart .bar-day {
    transform-box: fill-box;
    transform-origin: bottom;
    animation: bar-in 0.55s cubic-bezier(.2,.8,.2,1) both;
    animation-delay: var(--d, 0s);
  }
  .js .dash-pane.is-active .dash-chart .candle {
    animation: candle-in 0.4s ease both;
    animation-delay: var(--d, 0s);
  }
}
@keyframes heat-in { from { opacity: 0; } }
@keyframes bar-in { from { transform: scaleY(0); } }
@keyframes candle-in { from { opacity: 0; transform: translateY(7px); } }

@media (max-width: 900px) {
  .dash-cards { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .dash-card:nth-child(4n) { border-right: 0; }
  .dash-card:nth-child(-n+4) { border-bottom: 1px solid rgba(255,255,255,0.06); }
  .dash-breakdown { grid-template-columns: 1fr; }
  .dash-legend { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .dash-cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dash-card { padding: 11px 13px; }
  .dash-card:nth-child(4n) { border-right: 1px solid rgba(255,255,255,0.06); }
  .dash-card:nth-child(2n) { border-right: 0; }
  .dash-card:nth-child(-n+6) { border-bottom: 1px solid rgba(255,255,255,0.06); }
  .dash-bd-row { grid-template-columns: 96px 1fr auto 40px; gap: 8px; }
  .dash-ranges { display: none; }
  .dash-pane { padding: 13px 12px 15px; }
}

/* surfaces */
.surfaces {
  border-top: 1px solid color-mix(in srgb, var(--surface-border) 72%, transparent);
}
.surface-grid { display: grid; grid-template-columns: repeat(24, minmax(0,1fr)); gap: 1rem; }
.surface-card {
  padding: 1rem 0 0;
  border: 0;
  border-top: 1px solid var(--surface-border);
  border-radius: 0;
  background: transparent;
}
.surface-card:nth-child(1) { grid-column: span 6; }
.surface-card:nth-child(2) { grid-column: span 6; }
.surface-card:nth-child(3) { grid-column: span 7; }
.surface-card:nth-child(4) { grid-column: span 5; }
.surface-card h3 { margin-top: 0.9rem; font-size: 1rem; }
.surface-card p { color: var(--muted); font-size: 0.86rem; margin: 0; }
.surface-mock {
  border-radius: var(--r-sm);
  border: 1px solid var(--surface-border);
  background: var(--surface-2);
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  padding: 0.8rem;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
}
.surface-mock .num { font-size: 1.1rem; color: var(--text-strong); }

/* Tray glyphs (tray-codex / tray-claude) are macOS template images: monochrome, system-tinted.
   Mask them so they render as a single light ink on the dark surfaces, like the real tray. */
.surface-mock .tray-mark {
  display: block; flex: none;
  -webkit-mask: var(--m) center / contain no-repeat;
  mask: var(--m) center / contain no-repeat;
  background-color: #f4f8ff;
}

/* Menu bar: the real tray shows the top tool's icon + the value on a dark macOS menu-bar pill. */
.surface-mock.mb { align-items: center; }
.surface-mock.mb .mb-pill {
  display: inline-flex; align-items: center; gap: 0.28rem;
  padding: 0.32rem 0.62rem 0.32rem 0.5rem;
  border-radius: 9px;
  background: rgba(18,22,31,0.92);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}
.surface-mock.mb .mb-mark { width: 20px; height: 20px; }
.surface-mock.mb .num { color: #f3f7ff; font-size: 0.95rem; font-weight: 600; }

/* Floating Bubble: a dark glass capsule, the top tool's icon beside two limit bars
   (track .22 / fill .92, matching BUBBLE_BARS_COLORS in the app). */
.surface-mock.bubble { align-items: center; }
.surface-mock.bubble .bub-glass {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 11px 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(62,68,84,0.92), rgba(34,38,52,0.94));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16), 0 12px 26px rgba(0,0,0,0.38);
}
/* the Claude Code glyph only fills ~62% of its box height, so the box is oversized to land the
   visible mark at the same height as the two-bar stack (≈25px) */
.surface-mock.bubble .bub-mark { display: block; flex: none; width: 40px; height: 40px; }
.surface-mock.bubble .bub-bars { display: inline-flex; flex-direction: column; gap: 7px; }
.surface-mock.bubble .bub-bar {
  width: 38px; height: 9px; border-radius: 999px;
  background: rgba(255,255,255,0.22);
  overflow: hidden;
}
.surface-mock.bubble .bub-bar i {
  display: block; height: 100%; width: var(--w);
  border-radius: 999px; background: rgba(255,255,255,0.92);
}

/* Discord: a 1:1 of the real presence card — status line on top, then a large app logo (with the
   top tool's icon badged in the corner) beside a text column: app name / details / state / timer. */
.surface-mock.discord { align-items: stretch; gap: 0.16rem; padding: 0.54rem 0.72rem 0.62rem; }
.surface-mock.discord .d-status { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 0.67rem; line-height: 1.25; transform: translateY(-2px); }
.surface-mock.discord .d-status .d-dots { letter-spacing: 1px; line-height: 1.25; opacity: 0.6; }
/* icon is top-aligned and tall enough that its bottom reaches into the timer line below */
.surface-mock.discord .d-body { display: flex; align-items: flex-start; gap: 0.88rem; }
.surface-mock.discord .d-icon { position: relative; flex: none; width: 55px; height: 55px; margin-top: 1px; }
.surface-mock.discord .d-logo {
  width: 55px; height: 55px;
  border-radius: 14px;
  object-fit: contain;
}
.surface-mock.discord .d-badge {
  position: absolute; right: -8px; bottom: -8px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
}
.surface-mock.discord .d-badge img { display: block; width: 24px; height: 24px; }
.surface-mock.discord .d-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.18; padding-top: 0.08rem; }
.surface-mock.discord .d-app { color: var(--text-strong); font-weight: 700; font-size: 0.9rem; }
.surface-mock.discord .d-detail { color: var(--text); font-size: 0.73rem; white-space: nowrap; }
.surface-mock.discord small { color: var(--text); font-size: 0.73rem; white-space: nowrap; }
/* timer is the 4th line of the text column; the icon above spans down into it */
.surface-mock.discord .d-time { display: flex; align-items: center; gap: 0.28rem; margin-top: 3px; color: #3ba55c; font-size: 0.7rem; font-family: var(--mono); }
.surface-mock.discord .d-time .d-pad { flex: none; width: 12px; height: 12px; }

.surface-mock.ios { align-items: flex-start; }
.surface-mock.ios .ios-sub { color: var(--muted); font-size: 0.78rem; }
@media (max-width: 980px) {
  .surface-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .surface-card:nth-child(n) { grid-column: auto; }
}
@media (max-width: 520px) { .surface-grid { grid-template-columns: 1fr; } }

/* how it works */
.how {
  position: relative;
  border-top: 1px solid color-mix(in srgb, var(--surface-border) 72%, transparent);
}
.how .section-head {
  max-width: 820px;
  margin-bottom: clamp(1.55rem, 3.6vw, 2.45rem);
}
.how-lede {
  max-width: 690px;
  margin: 0;
}
/* one continuous mode story on the left (Local → the Hub URL field → Sync),
   the widget's real Devices view on the right (the payoff of syncing: every
   machine's share of one merged total). No cards: the app has no mode toggle,
   the Hub URL setting is the actual switch, so the field is the pivot. */
.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
}
.how-widget { min-width: 0; }
.mode-flow {
  position: relative;
  display: grid;
  gap: clamp(1.55rem, 3.2vw, 2.2rem);
  padding-left: clamp(1.5rem, 2.8vw, 2rem);
  align-content: center;
}
.mode-flow::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.7rem;
  bottom: 0.7rem;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    color-mix(in srgb, var(--accent) 45%, var(--surface-border)) 16%,
    color-mix(in srgb, var(--accent) 45%, var(--surface-border)) 84%,
    transparent
  );
}
.mode-step,
.mode-pivot {
  position: relative;
}
.mode-step::before,
.mode-pivot::before {
  content: "";
  position: absolute;
  left: calc(0.5px - clamp(1.5rem, 2.8vw, 2rem));
  top: 0.42rem;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-solid);
  border: 1px solid color-mix(in srgb, var(--accent) 62%, var(--surface-border));
}
.mode-pivot::before {
  top: 0.55rem;
  background: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}
.mode-step h3 {
  font-size: clamp(1.18rem, 2.1vw, 1.4rem);
}
.mode-step p {
  max-width: 34rem;
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.mode-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.95rem;
}
.pipe-arrow {
  color: color-mix(in srgb, var(--accent) 70%, var(--muted));
  font-size: 0.92rem;
}
.mode-step .sync-lane { margin-top: 0.95rem; }
/* the pivot: a live settings field, mid-paste */
.mode-field {
  display: grid;
  gap: 0.4rem;
  max-width: 27rem;
}
.mode-field-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}
.mode-field-input {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--surface-border));
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.86rem;
}
.mode-field-text {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
}
.mode-caret {
  flex: none;
  width: 1.5px;
  height: 1.05rem;
  margin-left: 2px;
  background: var(--accent);
}
.mode-pivot-note {
  max-width: 30rem;
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
/* the URL types itself in once the section scrolls into view; default
   (no JS / reduced motion) is the fully typed field */
@media (prefers-reduced-motion: no-preference) {
  .js .mode-flow .mode-field-text { width: 0; }
  .js .mode-flow.is-visible .mode-field-text { animation: type-url 1.5s steps(26, end) 0.55s forwards; }
  .mode-caret { animation: caret-blink 1.1s steps(1) infinite; }
}
@keyframes type-url { from { width: 0; } to { width: 26ch; } }
@keyframes caret-blink { 50% { opacity: 0; } }
.flow-node {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.92rem;
  border: 1px solid color-mix(in srgb, var(--surface-border) 84%, transparent);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--bg-solid) 52%, var(--surface) 48%);
}
.flow-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}
.flow-copy strong,
.source-pill,
.device-pill,
.backend-options span {
  overflow-wrap: anywhere;
}
.flow-copy strong {
  color: var(--text-strong);
  font-size: 0.98rem;
}
.flow-copy small {
  color: var(--muted);
  font-size: 0.78rem;
}
.source-pill,
.device-pill {
  display: flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid color-mix(in srgb, var(--surface-border) 76%, transparent);
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.25;
}
.source-pill {
  gap: 0.48rem;
  padding: 0.58rem 0.7rem;
  border-radius: 11px;
}
.source-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 15%, transparent);
  flex: none;
}
.sync-lane {
  display: grid;
  grid-template-columns: minmax(118px, 0.92fr) minmax(30px, 0.22fr) minmax(142px, 1fr);
  align-items: center;
  gap: 0.8rem;
}
.device-stack {
  display: grid;
  gap: 0.48rem;
}
.device-pill {
  justify-content: space-between;
  padding: 0.55rem 0.68rem;
  border-radius: 10px;
}
.device-pill::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 78%, #fff 10%);
  flex: none;
}
.flow-arrow {
  position: relative;
  display: block;
  height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 20%, transparent), color-mix(in srgb, var(--accent) 68%, transparent));
}
/* a summary-update pulse travelling the lane; the dot is 5px, absolutely
   positioned inside a 1px strip, so animating `left` reflows nothing */
@media (prefers-reduced-motion: no-preference) {
  .flow-arrow::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 80%, transparent);
    transform: translateY(-50%);
    animation: flow-pulse 2.4s ease-in-out infinite;
  }
}
@keyframes flow-pulse {
  0% { left: 0; opacity: 0; }
  18% { opacity: 1; }
  82% { opacity: 1; }
  100% { left: calc(100% - 5px); opacity: 0; }
}
.flow-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 75%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--accent) 75%, transparent);
  transform: translateY(-50%) rotate(45deg);
}
.hub-node {
  min-height: 108px;
  align-items: center;
  background:
    radial-gradient(circle at 24px 24px, color-mix(in srgb, var(--accent-from) 18%, transparent), transparent 48px),
    color-mix(in srgb, var(--surface-2) 82%, transparent);
}
.hub-ring {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 64%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.hub-ring::before,
.hub-ring::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 46%, transparent);
  border-radius: inherit;
}
.hub-ring::after {
  inset: 17px;
  background: var(--accent);
  border: 0;
}
.backend-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  margin-top: clamp(1rem, 2.6vw, 1.45rem);
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--surface-border) 70%, transparent);
}
.backend-rail .lede {
  max-width: 680px;
  margin: 0;
  font-size: 0.98rem;
}
.backend-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}
.backend-options span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 0.58rem;
  border: 1px solid color-mix(in srgb, var(--surface-border) 76%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 66%, transparent);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}
@media (max-width: 920px) {
  .how-grid {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }
}
@media (max-width: 820px) {
  .backend-rail {
    grid-template-columns: 1fr;
  }
  .backend-options {
    justify-content: flex-start;
  }
}
@media (max-width: 620px) {
  .sync-lane {
    grid-template-columns: 1fr;
  }
  .flow-arrow::before { display: none; }
  .flow-arrow {
    width: 1px;
    height: 24px;
    justify-self: center;
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 20%, transparent), color-mix(in srgb, var(--accent) 68%, transparent));
  }
  .flow-arrow::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -1px;
    transform: translateX(-50%) rotate(135deg);
  }
  .source-pill,
  .device-pill {
    min-height: 38px;
  }
  .flow-node {
    padding: 0.82rem;
  }
}

/* privacy — copy on the left, the actual wire payload on the right */
.privacy {
  border-top: 1px solid color-mix(in srgb, var(--surface-border) 72%, transparent);
}
.privacy-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(1.6rem, 4.5vw, 3.4rem);
  align-items: center;
}
.privacy-intro p { max-width: 46ch; color: var(--muted); }
.privacy-intro h3 { margin: 1.7rem 0 0.4rem; font-size: 0.95rem; }
.privacy-intro .never {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}
.privacy-intro .never li { position: relative; padding-left: 1.5rem; }
.privacy-intro .never li + li { margin-top: 0.5rem; }
.privacy-intro .never li::before {
  content: "\00d7";
  position: absolute;
  left: 0;
  top: -1px;
  color: var(--danger);
  font-weight: 800;
}
.privacy-payload { min-width: 0; }
.payload-window { box-shadow: var(--shadow); }
.payload-body { font-size: 0.78rem; line-height: 1.7; }
.payload-body .pk { color: #9ecbff; }
.payload-body .ps { color: #a5d6a7; }
.payload-body .pn { color: #f2cc60; }
.payload-body .pc { color: #8b949e; font-style: italic; }
.payload-cap { margin: 0.8rem 0 0; color: var(--muted); font-size: 0.88rem; }
@media (max-width: 900px) { .privacy-grid { grid-template-columns: 1fr; } }

/* final cta */
.final-cta {
  position: relative;
  isolation: isolate;
  text-align: center;
}
.final-cta::before { /* ambient glow bookending the hero stage */
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 12%;
  bottom: 0;
  width: 100vw;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 56% 72% at 50% 100%, color-mix(in srgb, var(--accent-from) 13%, transparent), transparent 72%);
  pointer-events: none;
}
.final-mark {
  width: 86px;
  height: 86px;
  margin: 0 auto 1rem;
  object-fit: contain;
  filter: drop-shadow(0 10px 26px color-mix(in srgb, var(--accent-from) 35%, transparent));
}
.final-cta h2 { max-width: 24ch; margin-inline: auto; }
.final-cta .hero-actions { justify-content: center; }
.download-grid {
  width: min(720px, 100%);
  margin: 1.6rem auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  text-align: left;
}
.download-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 88px;
  padding: 1rem;
  border: 1px solid var(--surface-border);
  border-radius: var(--r-md);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  color: var(--text);
  text-decoration: none;
  box-shadow: none;
  transition: border-color .18s ease, color .18s ease, transform .18s ease, background .18s ease;
}
.download-card:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text-strong);
  transform: translateY(-2px);
}
.download-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 3px;
}
.download-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--surface-border) 72%, #000 10%);
  flex: none;
}
.download-icon img { display: block; width: 22px; height: 22px; object-fit: contain; }
.download-card strong { display: block; color: var(--text-strong); font-size: 1rem; }
.download-card small { display: block; margin-top: 0.25rem; color: var(--muted); font-size: 0.82rem; line-height: 1.4; }
.download-arrow {
  margin-left: auto;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 800;
  transition: transform .18s ease, color .18s ease;
}
.download-card:hover .download-arrow { color: var(--text-strong); transform: translateY(2px); }
.source-note { margin: 1rem auto 0; color: var(--muted); font-size: 0.9rem; }
@media (max-width: 640px) { .download-grid { grid-template-columns: 1fr; } }

/* footer */
.footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 2rem 0 3rem; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer a { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--muted); font-weight: 700; text-decoration: none; }
.footer a:hover { color: var(--text); }
@media (max-width: 680px) { .footer { flex-direction: column; align-items: flex-start; } }
