/* FZClip — Raycast-inspired dark design system, bento layout.
   Inter, layered blue gradient atmosphere, floating pill nav, rounded tiles;
   tile tints borrow the app's own semantic colors (match-highlight blue,
   OCR green, favorite-star yellow). Motion: one hero load-in, slow aurora
   drift, tile hover lifts — all behind prefers-reduced-motion. */

:root {
  color-scheme: dark;
  --bg: #07080a;
  --panel: rgba(18, 20, 24, 0.6);
  --panel-solid: #101114;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --ink: #f2f3f5;
  --muted: #9ba1ab;
  --accent: #5b9bf0;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* the 100vw aurora measures viewport-incl-scrollbar; clip the excess so the
   page never scrolls sideways with classic (non-overlay) scrollbars */
html { overflow-x: hidden; overflow-x: clip; }

body {
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background: var(--bg);
}
/* viewport-fixed atmosphere: ambient light and grain travel with the scroll,
   so no section ever sits on flat black */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(90% 60% at 50% -8%, rgba(66, 112, 182, 0.26), transparent 68%),
    radial-gradient(50% 56% at -8% 60%, rgba(52, 118, 150, 0.16), transparent 70%),
    radial-gradient(52% 58% at 108% 76%, rgba(72, 96, 180, 0.16), transparent 70%),
    linear-gradient(180deg, #0b0e14 0%, #090b0f 45%, #08090c 100%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--noise); background-size: 160px;
  opacity: 0.05;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 32px; }

kbd {
  display: inline-block; font-family: var(--font); font-size: 0.8em; font-weight: 500;
  background: #16181c; border: 1px solid var(--border-strong);
  border-bottom-width: 2px; border-radius: 6px; padding: 2px 8px;
  color: var(--ink); white-space: nowrap;
}
code { font-family: var(--mono); font-size: 0.85em; color: var(--ink); }

/* fine grain kills flat-gradient banding on atmospheric surfaces */
:root {
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ---------- floating pill nav ---------- */
.masthead {
  position: sticky; top: 0; z-index: 50; padding: 14px 16px 10px;
  /* scrim: solid enough that scrolling content never pokes through the gap
     above the pill, fading fast so it doesn't read as a band */
  background: linear-gradient(to bottom, rgba(7, 8, 10, 0.92) 0%, rgba(7, 8, 10, 0.55) 55%, transparent 100%);
}
.masthead-inner {
  max-width: 1040px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 10px 20px;
  background: rgba(13, 14, 17, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.wordmark { font-weight: 700; font-size: 16.5px; letter-spacing: -0.02em; text-decoration: none; }
.mast-links { display: flex; gap: 6px; align-items: center; }
.mast-links a {
  font-size: 14px; color: var(--muted); text-decoration: none; font-weight: 500;
  padding: 7px 12px; border-radius: 9px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.mast-links a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.mast-links a[aria-current="page"] { color: var(--ink); }
.mast-links a.nav-cta { background: var(--ink); color: #0b0c0e; font-weight: 600; padding: 8px 16px; }
.mast-links a.nav-cta:hover { background: #ffffff; color: #0b0c0e; }

/* ---------- hero with drifting aurora ---------- */
.hero { position: relative; text-align: center; padding-top: 100px; padding-bottom: 64px; }
.aurora {
  /* full viewport bleed with a radial soft edge — no rectangular boundary
     on wide screens */
  position: absolute; top: -160px; left: 50%; width: 100vw; height: 620px;
  transform: translateX(-50%);
  pointer-events: none; overflow: hidden; z-index: -1;
  -webkit-mask-image: radial-gradient(72% 100% at 50% 0%, black 35%, transparent 76%);
  mask-image: radial-gradient(72% 100% at 50% 0%, black 35%, transparent 76%);
}
.aurora i {
  position: absolute; display: block; border-radius: 999px;
  filter: blur(42px); transform: rotate(-32deg);
}
.aurora i:nth-child(1) { width: 640px; height: 110px; top: 140px; left: 4%;
  background: linear-gradient(120deg, rgba(91, 155, 240, 0.52), rgba(64, 201, 198, 0.14)); }
.aurora i:nth-child(2) { width: 820px; height: 130px; top: 280px; left: 34%;
  background: linear-gradient(120deg, rgba(64, 140, 255, 0.46), rgba(125, 208, 255, 0.12)); }
.aurora i:nth-child(3) { width: 500px; height: 90px; top: 70px; left: 58%; opacity: 0.85;
  background: linear-gradient(120deg, rgba(125, 208, 255, 0.42), rgba(91, 155, 240, 0.10)); }
.aurora i:nth-child(4) { width: 420px; height: 80px; top: 380px; left: 12%; opacity: 0.7;
  background: linear-gradient(120deg, rgba(64, 201, 198, 0.34), rgba(91, 155, 240, 0.08)); }
/* grain over the beams so the atmosphere reads as texture, not banding */
.aurora::after {
  content: ""; position: absolute; inset: 0;
  background-image: var(--noise); background-size: 160px;
  mix-blend-mode: overlay; opacity: 0.5; pointer-events: none;
}

.hero h1 {
  font-size: clamp(40px, 5vw, 62px); font-weight: 650; letter-spacing: -0.025em;
  line-height: 1.08; text-wrap: balance; max-width: 17ch; margin: 0 auto;
}
.hero .sub {
  margin: 20px auto 0; max-width: 50ch; font-size: 17.5px; color: var(--muted); text-wrap: pretty;
}
.hero .sub strong { color: var(--ink); font-weight: 600; }
.cta-row { margin-top: 32px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-size: 15px; font-weight: 600; border-radius: 10px; padding: 12px 22px;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #0b0c0e; }
.btn-primary:hover { background: #ffffff; }
.btn-ghost { border: 1px solid var(--border-strong); color: var(--ink); background: rgba(10, 11, 14, 0.4); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.3); }
.cta-note { margin-top: 16px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* ---------- showcase: the window sits directly on the page atmosphere ---------- */
.showcase { position: relative; padding-top: 44px; padding-bottom: 8px; }
.showcase::before {
  /* faint light behind the window so it lifts off the dark page */
  content: ""; position: absolute; inset: -8% 4% 10% 4%; z-index: -1;
  background: radial-gradient(60% 55% at 50% 38%, rgba(84, 140, 216, 0.16), transparent 70%);
}
.showcase { perspective: 1400px; }
.showcase-float {
  width: min(100%, 720px); margin: 0 auto;
  transform-style: preserve-3d;
}
.showcase-window {
  /* 720 CSS px = the app's real window size, and exactly 1:2 against the
     1440px capture — pixel-perfect on retina, honest about the product */
  position: relative; width: 100%;
  /* translucency lets the page atmosphere glow through the glass */
  opacity: 0.8;
  filter: drop-shadow(0 30px 70px rgba(0, 0, 0, 0.6)) drop-shadow(0 4px 18px rgba(0, 0, 0, 0.45));
  /* presented at an angle, easing flat when inspected */
  transform: rotateX(11deg) rotateY(-8deg) rotateZ(1deg);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.showcase:hover .showcase-window { transform: rotateX(2deg) rotateY(-1.5deg) rotateZ(0deg); }

/* film frames: real captures; only one visible at a time (the window glass
   is semi-transparent, stacking would ghost). Backing catches cut instants. */
.showcase-window::before {
  content: ""; position: absolute; inset: 1px; border-radius: 18px;
  background: #0c0e12;
}
.showcase-window .frame { width: 100%; height: auto; display: block; position: relative; }
.showcase-window .frame:not(.f0) { position: absolute; inset: 0; opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .showcase-float { animation: hover-bob 7s ease-in-out infinite alternate; }
  @keyframes hover-bob {
    from { transform: translateY(-5px); }
    to   { transform: translateY(6px); }
  }
  /* one 4.2s cycle: browse (1.2s) → type r,e,b,a at ~180ms per keystroke →
     hold the result (2.2s) → soft reset */
  /* Exact-cut frames over a window-shaped dark backing: the app's glass is
     semi-transparent in the captures, so frames must never stack visibly
     (ghost rows) — only one frame shows at a time, and the backing catches
     any instant of overlap. Seven acts over 15s: browse → type "reba" →
     clear → type "suc…ceeded" (OCR finds a screenshot) → Shell → Favorites
     → Images → Notes. Keyframes generated by Scripts/demo-assets/gen_timeline.py
     — edit the segment list there and regenerate, don't hand-tune percentages. */
  .showcase-window .frame { animation: 15s linear infinite; }
  .showcase-window .frame.f0 { animation-name: seq-f0; }
  .showcase-window .frame.f1 { animation-name: seq-f1; }
  .showcase-window .frame.f2 { animation-name: seq-f2; }
  .showcase-window .frame.f3 { animation-name: seq-f3; }
  .showcase-window .frame.f4 { animation-name: seq-f4; }
  .showcase-window .frame.f5 { animation-name: seq-f5; }
  .showcase-window .frame.f6 { animation-name: seq-f6; }
  .showcase-window .frame.f7 { animation-name: seq-f7; }
  .showcase-window .frame.f8 { animation-name: seq-f8; }
  .showcase-window .frame.f9 { animation-name: seq-f9; }
  .showcase-window .frame.f10 { animation-name: seq-f10; }
  .showcase-window .frame.f11 { animation-name: seq-f11; }
  .showcase-window .frame.f12 { animation-name: seq-f12; }
  @keyframes seq-f0 { 0% { opacity: 1; } 9.33% { opacity: 1; } 9.48% { opacity: 0; } 28.85% { opacity: 0; } 29% { opacity: 1; } 34.33% { opacity: 1; } 34.48% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes seq-f1 { 0% { opacity: 0; } 9.18% { opacity: 0; } 9.33% { opacity: 1; } 10.8% { opacity: 1; } 10.95% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes seq-f2 { 0% { opacity: 0; } 10.65% { opacity: 0; } 10.8% { opacity: 1; } 12.27% { opacity: 1; } 12.42% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes seq-f3 { 0% { opacity: 0; } 12.12% { opacity: 0; } 12.27% { opacity: 1; } 13.73% { opacity: 1; } 13.88% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes seq-f4 { 0% { opacity: 0; } 13.58% { opacity: 0; } 13.73% { opacity: 1; } 29% { opacity: 1; } 29.15% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes seq-f5 { 0% { opacity: 0; } 34.18% { opacity: 0; } 34.33% { opacity: 1; } 35.8% { opacity: 1; } 35.95% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes seq-f6 { 0% { opacity: 0; } 35.65% { opacity: 0; } 35.8% { opacity: 1; } 37.27% { opacity: 1; } 37.42% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes seq-f7 { 0% { opacity: 0; } 37.12% { opacity: 0; } 37.27% { opacity: 1; } 38.73% { opacity: 1; } 38.88% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes seq-f8 { 0% { opacity: 0; } 38.58% { opacity: 0; } 38.73% { opacity: 1; } 53.67% { opacity: 1; } 53.82% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes seq-f9 { 0% { opacity: 0; } 53.52% { opacity: 0; } 53.67% { opacity: 1; } 66% { opacity: 1; } 66.15% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes seq-f10 { 0% { opacity: 0; } 65.85% { opacity: 0; } 66% { opacity: 1; } 78.33% { opacity: 1; } 78.48% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes seq-f11 { 0% { opacity: 0; } 78.18% { opacity: 0; } 78.33% { opacity: 1; } 90.67% { opacity: 1; } 90.82% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes seq-f12 { 0% { opacity: 0; } 90.52% { opacity: 0; } 90.67% { opacity: 1; } 100% { opacity: 1; } }
}
@media (max-width: 820px) {
  .showcase-window, .showcase:hover .showcase-window { transform: rotateX(6deg) rotateY(-4deg); }
}
.caption {
  margin: 24px auto 0; max-width: 64ch; text-align: center;
  font-size: 16.5px; color: var(--muted); text-wrap: pretty;
}
.caption b { color: var(--ink); font-weight: 600; }

/* ---------- uniform tile grid ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 60px 0 0; }
.tile {
  border: 1px solid var(--border); border-radius: 18px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: 26px; overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.tile:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.tile h3 { font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; }
.tile > p { margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.tile > p code { color: var(--ink); }
.tile .big { font-size: 40px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--ink); }
.tile .big small { font-size: 17px; color: var(--muted); font-weight: 500; }

/* ---------- tile artifacts: the product, drawn small ---------- */
.art {
  height: 92px; margin-bottom: 18px;
  display: flex; align-items: center;
  border-bottom: 1px solid var(--border);
}

/* frame-budget bar (16 ms claim) */
.art-frame { width: 100%; padding-right: 8px; }
.art-frame-track {
  height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.art-frame-track i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, rgba(91, 155, 240, 0.35), var(--accent)); }
.art-frame-labels { display: flex; justify-content: space-between; margin-top: 8px;
  font-family: var(--mono); font-size: 10.5px; color: var(--muted); }

/* stacked history rows (50k claim) */
.art-rows { width: 100%; display: flex; flex-direction: column; gap: 7px; }
.art-rows i { display: block; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.09); }
.art-rows i:nth-child(1) { opacity: 1; }
.art-rows i:nth-child(2) { opacity: 0.8; }
.art-rows i:nth-child(3) { opacity: 0.6; }
.art-rows i:nth-child(4) { opacity: 0.4; }
.art-rows i:nth-child(5) { opacity: 0.22; }

/* silent network check (0 bytes claim) */
.art-term { font-family: var(--mono); font-size: 12px; line-height: 2; display: flex; flex-direction: column; }
.art-term .t-cmd { color: var(--ink); }
.art-term .t-out { color: var(--muted); }

/* mini search (fuzzy) */
.art-search { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.a-field {
  display: flex; align-items: center; font-family: var(--mono); font-size: 12.5px; color: var(--ink);
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 6px 10px;
  background: rgba(7, 8, 10, 0.5);
}
.a-caret { display: inline-block; width: 1.5px; height: 13px; background: var(--accent); margin-left: 2px; }
.a-row {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.04);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.a-row mark { background: rgba(91, 155, 240, 0.4); color: var(--ink); border-radius: 3px; padding: 0 1px; }

/* OCR extraction */
.art-ocr { width: 100%; display: flex; align-items: center; gap: 10px; }
.a-thumb {
  flex-shrink: 0; width: 44px; height: 34px; border-radius: 7px;
  border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.05);
  padding: 7px 8px; display: flex; flex-direction: column; gap: 4px;
}
.a-thumb i { display: block; height: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.25); }
.a-thumb i:nth-child(2) { width: 70%; }
.a-thumb i:nth-child(3) { width: 45%; }
.a-arrow { color: var(--muted); font-size: 14px; flex-shrink: 0; }
.art-ocr .a-row { flex: 1; display: flex; align-items: center; gap: 8px; }
.a-badge {
  font-family: var(--font); font-size: 9.5px; font-weight: 600; letter-spacing: 0.06em;
  color: #4ac88a; border: 1px solid rgba(74, 200, 138, 0.4); border-radius: 999px; padding: 1px 7px;
}

/* starred favorites */
.art-fav { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.a-star { color: #e8b949; margin-right: 4px; display: inline-block; }
.a-star.a-off { color: rgba(255, 255, 255, 0.25); }
.a-dim { opacity: 0.55; }

/* animatable artifact pieces — static end-states by default */
.a-typed, .a-reveal { display: inline-block; white-space: nowrap; overflow: hidden; vertical-align: bottom; }
.art-rows { overflow: hidden; height: 63px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 12%, black 82%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 82%, transparent); }
.rows-track { display: flex; flex-direction: column; gap: 7px; }
.a-thumb { position: relative; }

/* ---------- artifact loops: every tile plays its feature ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* speed: the bar fills in a blink, then rests */
  .t-speed .art-frame-track i { animation: bar-snap 4.5s cubic-bezier(0.2, 0.8, 0.3, 1) infinite; }
  @keyframes bar-snap {
    0%, 28% { width: 0; }
    34%, 88% { width: 94%; }
    94%, 100% { width: 0; }
  }

  /* history: an endless scroll of clips */
  .t-hist .rows-track { animation: rows-scroll 7s linear infinite; }
  @keyframes rows-scroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }

  /* network check: the command types out, silence answers */
  .t-net .a-typed { animation: type-cmd 6.5s infinite; }
  @keyframes type-cmd {
    0%, 6% { width: 0ch; animation-timing-function: steps(23, jump-none); }
    36%, 88% { width: 23ch; }
    94%, 100% { width: 0ch; }
  }
  .t-net .t-out { animation: fade-hold 6.5s infinite; }
  @keyframes fade-hold {
    0%, 42% { opacity: 0; }
    48%, 88% { opacity: 1; }
    94%, 100% { opacity: 0; }
  }

  /* fuzzy: type reba, the match lands */
  .t-fuzzy .a-typed { animation: type-q 5.5s infinite; }
  @keyframes type-q {
    0%, 18% { width: 0ch; animation-timing-function: steps(4, jump-none); }
    34%, 86% { width: 4ch; }
    92%, 100% { width: 0ch; }
  }
  .t-fuzzy .a-caret { animation: caret-blink 1.1s step-end infinite; }
  @keyframes caret-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
  .t-fuzzy .a-row { animation: row-land 5.5s infinite; }
  @keyframes row-land {
    0%, 36% { opacity: 0; transform: translateY(4px); }
    42%, 86% { opacity: 1; transform: none; }
    92%, 100% { opacity: 0; transform: translateY(4px); }
  }

  /* ocr: scanline sweeps the image, text extracts */
  .t-ocr .a-thumb::after {
    content: ""; position: absolute; left: 8%; right: 8%; top: 15%; height: 2px;
    border-radius: 999px; background: rgba(91, 155, 240, 0.85); opacity: 0;
    animation: scanline 6s infinite;
  }
  @keyframes scanline {
    0%, 8% { top: 15%; opacity: 0; }
    10% { opacity: 1; }
    26% { top: 80%; opacity: 1; }
    30%, 100% { top: 80%; opacity: 0; }
  }
  .t-ocr .a-reveal { animation: extract 6s infinite; }
  @keyframes extract {
    0%, 28% { width: 0ch; animation-timing-function: steps(22, jump-none); }
    56%, 88% { width: 22ch; }
    94%, 100% { width: 0ch; }
  }
  .t-ocr .a-badge { animation: badge-pop 6s infinite; }
  @keyframes badge-pop {
    0%, 56% { opacity: 0; transform: scale(0.8); }
    62%, 88% { opacity: 1; transform: scale(1); }
    94%, 100% { opacity: 0; }
  }

  /* favorites: the star lands */
  .t-fav .a-row:first-child .a-star { animation: star-pop 5s infinite; }
  @keyframes star-pop {
    0%, 26% { color: rgba(255, 255, 255, 0.25); transform: scale(1); }
    32% { color: #e8b949; transform: scale(1.4); }
    38%, 100% { color: #e8b949; transform: scale(1); }
  }

  /* stagger the loops so the grid never pulses in sync */
  .t-net .a-typed, .t-net .t-out { animation-delay: 0.9s; }
  .t-ocr .a-thumb::after, .t-ocr .a-reveal, .t-ocr .a-badge { animation-delay: 1.6s; }
  .t-fav .a-row:first-child .a-star { animation-delay: 0.5s; }
}

/* ---------- narrow sections (faq) ---------- */
.narrow { max-width: none; }
.narrow-section { padding-top: 90px; }
.narrow h2 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 650; letter-spacing: -0.02em; margin-bottom: 20px; }

/* ---------- faq (uses .narrow + panel look) ---------- */
.faq-list { border: 1px solid var(--border); border-radius: 16px; background: var(--panel-solid); overflow: hidden; }
details + details { border-top: 1px solid var(--border); }
summary {
  cursor: pointer; padding: 16px 22px; font-size: 15px; font-weight: 600;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-size: 18px; font-weight: 400; }
details[open] summary::after { content: "–"; }
details > p { padding: 0 22px 18px; color: var(--muted); font-size: 14.5px; max-width: 64ch; }

/* ---------- closing: end the page in light, not void ---------- */
.closing { position: relative; text-align: center; padding-top: 120px; padding-bottom: 100px; overflow: hidden; }
.closing::before {
  content: ""; position: absolute; inset: auto 0 -40% 0; height: 120%; z-index: -1;
  background: radial-gradient(60% 70% at 50% 100%, rgba(66, 112, 182, 0.20), transparent 70%);
  pointer-events: none;
}
.closing h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 650; letter-spacing: -0.025em; text-wrap: balance; }
.closing .cta-row { margin-top: 28px; }

/* ---------- footer ---------- */
footer.site-foot { border-top: 1px solid var(--border); padding: 28px 0; }
.foot-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13.5px; color: var(--muted); }
.foot-inner a { color: var(--muted); text-decoration: none; }
.foot-inner a:hover { color: var(--ink); }

/* ---------- motion (subtle, opt-out respected) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .sub, .hero .cta-row, .hero .cta-note {
    animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }
  .hero .sub { animation-delay: 0.07s; }
  .hero .cta-row { animation-delay: 0.14s; }
  .hero .cta-note { animation-delay: 0.2s; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

  .aurora i { animation: drift 16s ease-in-out infinite alternate; }
  .aurora i:nth-child(2) { animation-duration: 20s; animation-delay: -6s; }
  .aurora i:nth-child(3) { animation-duration: 24s; animation-delay: -12s; }
  @keyframes drift {
    from { transform: rotate(-32deg) translateX(-28px); opacity: 0.85; }
    to   { transform: rotate(-32deg) translateX(36px);  opacity: 1; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .tile, .btn { transition: none; }
  .tile:hover, .btn:hover { transform: none; }
}

/* ---------- interior pages (docs, releases) ---------- */
.page-head { padding-top: 80px; padding-bottom: 40px; }
.page-head h1 { font-size: clamp(36px, 4.4vw, 56px); font-weight: 650; letter-spacing: -0.025em; }
.page-head .label { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.page-head .intro { margin-top: 14px; color: var(--muted); max-width: 56ch; font-size: 16.5px; }

.docs-content { display: grid; grid-template-columns: 220px 1fr; gap: 56px; padding-top: 24px; padding-bottom: 100px; align-items: start; }
.docs-toc { position: sticky; top: 92px; }
.docs-toc h2 { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.docs-toc ul { list-style: none; margin-top: 10px; }
.docs-toc a {
  display: block; padding: 8px 12px; font-size: 14px; color: var(--muted);
  text-decoration: none; border-radius: 8px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.docs-toc a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }

.docs-section { padding: 0 0 56px; scroll-margin-top: 92px; }
.docs-section + .docs-section { border-top: 1px solid var(--border); padding-top: 48px; }
.docs-section h2 { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; }
.docs-section h3 { margin-top: 30px; font-size: 16px; font-weight: 600; }
.docs-section p { margin-top: 12px; color: var(--muted); max-width: 66ch; }
.docs-section p strong, .docs-section li strong { color: var(--ink); font-weight: 600; }
.docs-section ul, .docs-section ol { margin: 12px 0 0 20px; color: var(--muted); max-width: 64ch; }
.docs-section li { margin-top: 8px; }
.docs-section a { color: var(--accent); }

.shortcuts-table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 14.5px; }
.shortcuts-table th {
  text-align: left; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--border-strong);
}
.shortcuts-table td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--border); color: var(--muted); vertical-align: top; }
.shortcuts-table td:first-child { color: var(--ink); white-space: nowrap; font-weight: 500; }
.table-scroll { overflow-x: auto; }

/* releases list (markup emitted by js/releases.js) */
.releases-main { padding-top: 8px; padding-bottom: 100px; }
.release-card {
  border: 1px solid var(--border); border-radius: 16px; background: var(--panel-solid);
  padding: 32px 36px; margin-top: 20px;
}
.release-card.latest { border-color: rgba(91, 155, 240, 0.35); }
.release-header { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.release-version-container { display: flex; align-items: baseline; gap: 12px; }
.release-version { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }
.latest-badge {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600;
  color: var(--accent); border: 1px solid rgba(91, 155, 240, 0.4); border-radius: 999px; padding: 3px 10px;
}
.release-date { font-size: 13px; color: var(--muted); }
.release-notes { margin-top: 16px; max-width: 68ch; }
.release-notes h3, .release-notes h4 { margin-top: 20px; font-size: 15px; font-weight: 600; color: var(--ink); }
.release-notes p { margin-top: 10px; color: var(--muted); font-size: 15px; }
.release-notes ul { margin: 10px 0 0 20px; color: var(--muted); font-size: 15px; }
.release-notes li { margin-top: 7px; }
.release-notes strong { color: var(--ink); font-weight: 600; }
.release-download { margin-top: 22px; }
.release-download a {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 9px 18px; font-size: 14px; font-weight: 500; color: var(--ink);
  transition: border-color 0.15s ease;
}
.release-download a:hover { border-color: rgba(255, 255, 255, 0.3); }
.empty-state, .error-state { padding: 72px 0; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .bento { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .hero { padding-top: 80px; padding-bottom: 48px; }
  .docs-content { grid-template-columns: 1fr; gap: 32px; }
  .docs-toc { position: static; }
  .shortcuts-table td:first-child { white-space: normal; }
  .mast-links a:not(.nav-cta) { padding: 7px 8px; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .cta-note { font-size: 11px; line-height: 1.9; padding: 0 8px; }
}
