/* QoLab — design system. Navy obsidian + molten gold, PoE loot-rarity spectrum.
   Dark by the scene: this runs beside a dark game, at night.
   The refraction spectrum is triple-locked to the wordmark, the light motif and
   the mod-color legend — and never touches body text. */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,300..800&family=Spectral:ital,wght@0,500;0,600;1,400;1,500;1,600&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --bg:        oklch(0.170 0.030 262);
  --bg-2:      oklch(0.212 0.032 262);
  --bg-3:      oklch(0.258 0.034 262);
  --ink:       oklch(0.960 0.008 90);
  --muted:     oklch(0.800 0.022 262);   /* ≥4.5:1 on --bg at body sizes */
  --line:      oklch(1 0 0 / 0.10);
  --line-2:    oklch(1 0 0 / 0.17);

  /* Prism — spectral identity, locked to the PoE rarity stops (red→gold→green→cyan→violet),
     the same colors the mod legend and tooltip use. Gold weighted at the centre. */
  --prism: linear-gradient(100deg, #d8503e 0%, #e8b04b 30%, #6fcf97 56%, #57c4ff 79%, #b98bff 100%);

  --gold:      oklch(0.830 0.140 84);
  --gold-2:    oklch(0.720 0.150 68);
  --gold-ink:  oklch(0.210 0.060 70);
  --gold-grad: linear-gradient(135deg, oklch(0.90 0.13 92), oklch(0.80 0.155 72) 55%, oklch(0.70 0.150 60));

  /* PoE rarity spectrum — used meaningfully in Mod Colors */
  --r-normal:  oklch(0.880 0.005 250);
  --r-magic:   oklch(0.760 0.150 256);
  --r-rare:    oklch(0.890 0.150 102);
  --r-top:     oklch(0.860 0.150 92);
  --r-unique:  oklch(0.720 0.140 58);
  --r-danger:  oklch(0.680 0.200 25);
  --r-good:    oklch(0.800 0.155 152);

  --maxw: 1180px;
  --radius: 12px;
  --radius-lg: 16px;

  --z-sticky: 100;
  --z-dialog: 400;
  --z-toast: 600;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility; overflow-x: hidden;
}
a { color: inherit; }
img, video { max-width: 100%; display: block; }

h1, h2, h3 { font-weight: 700; line-height: 1.04; letter-spacing: -0.025em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.6rem, 1.6rem + 4.4vw, 5rem); }
h2 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.1rem); letter-spacing: -0.028em; }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.55rem); }
p  { text-wrap: pretty; }
p.lead { font-size: clamp(1.1rem, 1rem + 0.6vw, 1.35rem); color: var(--muted); max-width: 60ch; }

.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.gold { color: var(--gold); }
.muted { color: var(--muted); }
section { padding-block: clamp(4rem, 2.5rem + 6vw, 7.5rem); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--gold); color: var(--gold-ink); padding: 0.6rem 1rem; border-radius: 0 0 var(--radius) 0; z-index: 999; font-weight: 700; }
.skip:focus { left: 0; }

/* focus rings — gold, on every interactive element */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible,
.btn:focus-visible, .lang button:focus-visible, .demo-toggle button:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px;
}

/* ---- header ---- */
.hdr { position: sticky; top: 0; z-index: var(--z-sticky); backdrop-filter: blur(10px);
  background: color-mix(in oklch, var(--bg) 84%, transparent); border-bottom: 1px solid var(--line); }
.hdr .wrap { display: flex; align-items: center; gap: 1.25rem; height: 66px; }
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 800; letter-spacing: -0.03em; font-size: 1.3rem; text-decoration: none; }
.brand-mark img { width: 32px; height: 32px; flex: 0 0 auto; }
.brand .qo { color: var(--ink); }
.hdr nav { display: flex; gap: 1.4rem; margin-left: auto; align-items: center; }
.hdr nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color 0.2s var(--ease); }
.hdr nav a:hover { color: var(--ink); }
.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; flex: 0 0 auto; margin-left: 1rem; }
.lang button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.82rem; min-width: 44px; min-height: 36px; padding: 0.28rem 0.7rem; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); font-weight: 700; }
.burger { display: none; margin-left: 0.6rem; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.burger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.2s; }

@media (max-width: 760px) {
  .burger { display: flex; }
  .lang { margin-left: auto; }
  .hdr nav {
    position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: flex-start;
    gap: 0.4rem; padding: 1rem 1.25rem 1.4rem; background: var(--bg); border-bottom: 1px solid var(--line);
    transform: translateY(-140%); transition: transform 0.3s var(--ease); box-shadow: 0 20px 40px -20px #000; margin-left: 0;
  }
  body.nav-open .hdr nav { transform: translateY(0); }
  .hdr nav a { font-size: 1.1rem; padding: 0.6rem 0; width: 100%; }
  body.nav-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .burger span:nth-child(2) { opacity: 0; }
  body.nav-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 44px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  padding: 0.85rem 1.6rem; border-radius: var(--radius); border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.btn-gold { background: var(--gold-grad); color: var(--gold-ink); box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.4), 0 10px 26px -12px oklch(0.80 0.155 72 / 0.7); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.5), 0 16px 34px -12px oklch(0.80 0.155 72 / 0.8); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn:disabled, .btn.soon { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---- stage sections ---- */
.stage { position: relative; overflow: clip; background:
  radial-gradient(120% 90% at 70% 0%, oklch(0.21 0.032 262) 0%, var(--bg) 55%, oklch(0.13 0.026 262) 100%); }
.stage-soft { background: linear-gradient(180deg, var(--bg), oklch(0.185 0.031 262)); }
/* spectral seam — the refracted-light divider that replaces grey band backgrounds */
.proof, .editor, .cleaner, .pricing, .faqsec { position: relative; }
.proof::before, .editor::before, .cleaner::before, .pricing::before, .faqsec::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--prism); opacity: 0.3;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }

/* ---- HERO ---- */
.hero { padding-top: clamp(2.5rem, 1.5rem + 5vw, 4rem); min-height: min(92vh, 900px); display: flex; align-items: center; position: relative; }
/* scrim: keeps every text zone on clean navy over the guardian/refraction */
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 18%, color-mix(in oklch, var(--bg) 50%, transparent) 44%, transparent 66%),
              linear-gradient(0deg, var(--bg) 3%, transparent 26%); }
.stage-fx { position: absolute; inset: 0; pointer-events: none; overflow: clip; z-index: 0; }
.refraction { position: absolute; top: -4%; left: -3%; width: min(66%, 980px); opacity: 0.55;
  mix-blend-mode: screen; -webkit-mask-image: radial-gradient(85% 85% at 28% 42%, #000 42%, transparent 82%); mask-image: radial-gradient(85% 85% at 28% 42%, #000 42%, transparent 82%); }
.guardian { position: absolute; right: -8%; bottom: -6%; height: min(118%, 940px); width: auto; opacity: 0.82;
  -webkit-mask-image: linear-gradient(100deg, transparent 4%, #000 48%); mask-image: linear-gradient(100deg, transparent 4%, #000 48%); }
.demo-cap { text-shadow: 0 1px 4px oklch(0.13 0.02 262 / 0.9); }
@media (max-width: 760px) { .guardian { opacity: 0.5; } .hero::before { background: linear-gradient(0deg, var(--bg) 6%, color-mix(in oklch, var(--bg) 55%, transparent) 40%, transparent 72%); } }
.hero-grid { position: relative; z-index: 2; display: grid; gap: clamp(2.5rem, 1rem + 6vw, 5rem);
  grid-template-columns: 1fr; align-items: center; padding-block: clamp(2rem, 1rem + 3vw, 3.5rem); }
.hero-grid > * { min-width: 0; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1.02fr 0.98fr; } }
.eyebrow { color: var(--muted); font-weight: 500; letter-spacing: 0.02em; font-size: 0.86rem; margin: 0 0 1.1rem; }
.eyebrow::before { content: "▹ "; color: var(--gold); }
.hero .prism { font-size: clamp(4rem, 2.2rem + 9vw, 8.5rem); line-height: 0.9; display: inline-block; }
.hero-tag { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; letter-spacing: -0.025em;
  line-height: 1.08; font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.7rem); text-wrap: balance; margin: 0.4rem 0 0; max-width: 20ch; }
.hero .lead { margin: 1.4rem 0 2rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.cta-note { color: var(--muted); font-size: 0.82rem; margin: 1.1rem 0 0; letter-spacing: 0.01em; }

/* hero object: the live tooltip, grounded */
.hero-object { display: grid; justify-items: center; gap: 0.9rem; position: relative; }
.hero-object::after { content: ""; position: absolute; left: 50%; bottom: -3%; width: 74%; height: 34px; transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, oklch(0 0 0 / 0.55), transparent 72%); filter: blur(6px); z-index: -1; }

/* ---- loot tooltip (the actual product output) ---- */
.tooltip { width: 100%; max-width: 430px;
  background: linear-gradient(180deg, oklch(0.115 0.012 265), oklch(0.14 0.014 265));
  border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: 0 30px 70px -24px oklch(0 0 0 / 0.8), inset 0 1px 0 oklch(1 0 0 / 0.05);
  font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; line-height: 1.5; overflow: hidden; }
.tooltip.big { max-width: 480px; font-size: 0.94rem; }
.tt-head { text-align: center; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); background: oklch(1 0 0 / 0.02); }
.tt-head .name { display: block; color: var(--r-rare); font-weight: 700; letter-spacing: 0.02em; font-size: 1.02em; }
.tt-head .type { display: block; color: var(--r-rare); opacity: 0.78; font-size: 0.8em; margin-top: 0.1rem; }
.tt-body { padding: 1rem 1.15rem 1.2rem; display: grid; gap: 0.34rem; }
.tt-body .sep { height: 1px; background: var(--line); margin: 0.45rem 0; }
.proof-grid > *, .split > *, .tweak > *, .lic > * { min-width: 0; }
.mod { margin: 0; transition: color 0.6s var(--ease); overflow-wrap: break-word; }
/* default (Prism off) = monochrome parchment; .lit (Prism on) = colored by importance */
.tooltip .mod { color: oklch(0.72 0.012 262); }
.tooltip.lit .m-t1     { color: var(--r-top); font-weight: 700; }
.tooltip.lit .m-good   { color: var(--r-good); }
.tooltip.lit .m-magic  { color: var(--r-magic); }
.tooltip.lit .m-danger { color: var(--r-danger); }

.demo-toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.demo-toggle button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.85rem; min-height: 40px; padding: 0.4rem 1.1rem; cursor: pointer; }
.demo-toggle button[aria-pressed="true"] { background: var(--bg-3); color: var(--ink); font-weight: 600; }
.demo-cap { text-align: center; color: var(--muted); font-size: 0.8rem; margin: 0; letter-spacing: 0.01em; }

/* ---- MOD COLORS proof ---- */
.thesis { font-family: 'Spectral', Georgia, serif; font-style: italic; font-weight: 500;
  font-size: clamp(1.35rem, 1.05rem + 1.6vw, 2.15rem); line-height: 1.25; letter-spacing: -0.01em;
  max-width: 30ch; margin: 0 0 clamp(2rem, 1rem + 3vw, 3.5rem); color: var(--ink); }
.proof-grid { display: grid; gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: start; grid-template-columns: 1fr; }
@media (min-width: 900px) { .proof-grid { grid-template-columns: 1fr 1fr; } .proof-shot { position: sticky; top: 90px; } }
.proof-copy h2 { margin-bottom: 1.2rem; }
.proof-copy .lead { margin: 0 0 1.8rem; }
.legend { list-style: none; padding: 0; margin: 0 0 0.6rem; display: grid; grid-template-columns: repeat(2, auto); gap: 0.6rem 1.4rem; justify-content: start; }
.legend li { display: flex; align-items: center; gap: 0.55rem; font-size: 0.96rem; }
.legend b { font-weight: 600; }
.gem { width: 20px; height: 20px; flex: 0 0 auto; filter: drop-shadow(0 2px 4px oklch(0 0 0 / 0.4)); }
.gem.r-danger { color: var(--r-danger); }
.gem.r-top    { color: var(--r-top); }
.gem.r-good   { color: var(--r-good); }
.gem.r-magic  { color: var(--r-magic); }
.legend-hint { color: var(--muted); font-size: 0.82rem; margin: 0 0 1.8rem; }
.fineprint { color: var(--muted); font-size: 0.94rem; max-width: 54ch; margin: 0 0 1rem; padding-left: 0.9rem; border-left: 2px solid var(--line-2); }
.proof-shot { display: grid; justify-items: center; gap: 0.9rem; }
.proof-cap { color: var(--muted); font-size: 0.86rem; text-align: center; max-width: 42ch; margin: 0; }

/* ---- editor ---- */
.split { display: grid; gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split.rev > :first-child { order: 2; } }
.editor h3 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); margin-bottom: 1rem; }
.ed-body { max-width: 52ch; margin: 0 0 1.6rem; }
.ed-list { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; gap: 0.85rem; }
.ed-list li { padding-left: 1.15rem; position: relative; color: var(--muted); }
.ed-list li::before { content: "◆"; position: absolute; left: 0; top: 0.15rem; color: var(--gold); font-size: 0.62rem; }
.ed-list b { color: var(--ink); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip { font-size: 0.82rem; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 0.3rem 0.75rem; }
.pack::before { content: "+ "; color: var(--gold); }
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-top: 1.3rem; }
.preset-label { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); margin-right: 0.3rem; }
.chip.preset { color: var(--ink); }
.preset-note { font-size: 0.86rem; margin: 0.8rem 0 0; }

/* ---- framed media (grounded, not floating) ---- */
.framed { position: relative; margin: 0; border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--bg-2); box-shadow: 0 34px 80px -34px oklch(0 0 0 / 0.85); }
.framed img, .framed video { width: 100%; height: auto; display: block; }
.framed .tag { position: absolute; top: 0.7rem; left: 0.7rem; z-index: 2; font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--gold); background: color-mix(in oklch, var(--bg) 80%, transparent); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 0.2rem 0.66rem; backdrop-filter: blur(4px); }

/* ---- runs cleaner ---- */
.cleaner .lead { margin: 1.2rem 0 clamp(2rem, 1rem + 3vw, 3.4rem); }
.tweak { display: grid; gap: clamp(1.6rem, 1rem + 3vw, 3.4rem); align-items: center; grid-template-columns: 1fr;
  padding-block: clamp(2rem, 1.2rem + 2.5vw, 3.4rem); border-top: 1px solid var(--line); }
.tweak:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 880px) { .tweak { grid-template-columns: 1.1fr 0.9fr; } .tweak.rev .tweak-media { order: 2; } }
.tweak-copy h3 { margin-bottom: 0.7rem; }
.tweak-copy p { color: var(--muted); margin: 0; max-width: 46ch; }
.drag-hint { color: var(--gold); font-size: 0.78rem; letter-spacing: 0.1em; margin: 1rem 0 0; }

/* wipe slider */
.wipe { position: relative; border: 1px solid var(--line-2); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 34px 80px -34px oklch(0 0 0 / 0.85); line-height: 0; }
.wipe img { width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; }
.wipe-b { position: absolute; inset: 0; width: 50%; overflow: hidden; border-right: 2px solid var(--gold); }
.wipe-b img { width: 100vw; max-width: none; height: 100%; }
@media (min-width: 880px) { .wipe-b img { width: calc(min(100vw, var(--maxw)) * 0.9); } }
.wipe-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.wipe-lab { position: absolute; bottom: 0.7rem; z-index: 2; font-size: 0.72rem; color: var(--ink);
  background: color-mix(in oklch, var(--bg) 78%, transparent); border: 1px solid var(--line-2); border-radius: 999px; padding: 0.18rem 0.6rem; pointer-events: none; }
.wipe-lab-a { left: 0.7rem; } .wipe-lab-b { right: 0.7rem; }

/* rest chips + games tag */
.rest { border-top: 1px solid var(--line); padding-top: clamp(2rem, 1.2rem + 2.5vw, 3rem); }
.rest h3 { margin-bottom: 1.4rem; }
.chip-groups { display: flex; flex-wrap: wrap; gap: 2rem 3rem; }
.chip-group { display: grid; gap: 0.7rem; }
.group-label { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.games-tag { margin: 2.2rem 0 0; font-size: 0.92rem; color: var(--ink); }
.games-tag [data-i18n="games.tag"] { color: var(--gold); letter-spacing: 0.04em; }

/* ---- pricing ---- */
.pricing .lead { margin: 1.2rem 0 clamp(2rem, 1rem + 3vw, 3rem); }
.tiers { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .tiers { grid-template-columns: 1fr 1fr; } }
.tier { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem; background: var(--bg-2); }
.tier.pro { border-color: var(--gold); background: linear-gradient(180deg, color-mix(in oklch, var(--gold) 9%, var(--bg-2)), var(--bg-2)); }
.tier h3 { font-size: 1.4rem; display: flex; align-items: center; gap: 0.6rem; }
.tier .price { font-size: 2.7rem; font-weight: 800; letter-spacing: -0.03em; margin: 0.6rem 0 0; }
.tier .price small { font-size: 0.9rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.tier .price-alt { font-size: 0.82rem; color: var(--muted); margin: 0.15rem 0 0; }
.tier ul { list-style: none; padding: 0; margin: 1.4rem 0; display: grid; gap: 0.7rem; }
.tier li { display: flex; gap: 0.6rem; color: var(--muted); align-items: flex-start; }
.tier li::before { content: "◆"; color: var(--gold); font-size: 0.7rem; margin-top: 0.42rem; flex: 0 0 auto; }
.tier li.no { opacity: 0.6; }
.tier li.no::before { content: "·"; color: var(--muted); }
.price-soon { font-size: 0.86rem; text-align: center; margin: 0.8rem 0 0; scroll-margin-top: 80px; }

.lic { display: grid; gap: clamp(1.5rem, 1rem + 3vw, 3rem); align-items: center; grid-template-columns: 1fr; margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
@media (min-width: 820px) { .lic { grid-template-columns: 0.85fr 1.15fr; } }
.lic-h { margin-bottom: 0.7rem; }
.lic p { max-width: 48ch; }
.lic-shot { max-width: 620px; width: 100%; }

/* ---- FAQ ---- */
.faq { display: grid; gap: 0; max-width: 780px; margin-top: 2rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 0.4rem 0; }
.faq summary { cursor: pointer; padding: 1rem 0; font-weight: 600; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-weight: 400; font-size: 1.4rem; line-height: 1; transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); margin: 0 0 1rem; max-width: 70ch; }
.faq .warn { color: var(--r-unique); }

/* ---- footer ---- */
.ftr { border-top: 1px solid var(--line); padding-block: 3rem; color: var(--muted); font-size: 0.9rem; }
.ftr .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; }
.ftr-brand { display: flex; align-items: center; gap: 0.9rem; }
.ftr img { width: 46px; height: 46px; }
.ftr-tag { margin: 0; max-width: 30ch; }
.ftr-links { display: flex; gap: 2rem; flex-wrap: wrap; }
.ftr a { color: var(--muted); text-decoration: none; }
.ftr a:hover { color: var(--gold); }

/* ---- Prism / Qolab wordmark ---- */
.prism { background: var(--prism); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-family: 'Spectral', Georgia, serif; font-style: italic; font-weight: 500; letter-spacing: -0.01em; }

/* ---- entrance motion ---- */
.reveal { opacity: 0; transform: translateY(16px); animation: rise 0.7s var(--ease) forwards; }
.reveal.d1 { animation-delay: 0.06s; } .reveal.d2 { animation-delay: 0.14s; } .reveal.d3 { animation-delay: 0.22s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .btn:hover, .btn-gold:hover { transform: none; }
  .mod { transition: none; }
  .refraction { opacity: 0.4; }
}

/* ---- nav download button ---- */
/* higher specificity than `.hdr nav a` so the gold button keeps dark ink, not muted grey */
.hdr nav a.nav-dl, .hdr nav a.nav-dl:hover { color: var(--gold-ink); font-weight: 700; }
.nav-dl { min-height: 38px; padding: 0.46rem 1.05rem; font-size: 0.92rem; margin-left: 0.5rem; }
@media (max-width: 760px) { .nav-dl { width: 100%; margin: 0.5rem 0 0; } }

/* ---- framed captions (used by the map duo) ---- */
.framed figcaption { padding: 0.55rem 0.85rem; font-size: 0.8rem; color: var(--muted); border-top: 1px solid var(--line); background: var(--bg-2); }
.framed figcaption b { color: var(--ink); font-weight: 600; }

/* ---- full-layout: two states, side by side (not a comparison) ---- */
.duo { display: grid; gap: 0.9rem; grid-template-columns: 1fr 1fr; }
.duo .framed img { aspect-ratio: 16/10; object-fit: cover; }
@media (max-width: 540px) { .duo { grid-template-columns: 1fr; } }

/* ---- function catalog — the variety is the selling point ---- */
.functions .fn-head { max-width: 60ch; margin-bottom: clamp(2rem, 1rem + 3vw, 3rem); }
.functions .fn-head h2 { margin-bottom: 1.1rem; }
.fn-catalog { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); align-items: start; }
.fn-cat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; }
.fn-cat-h { font-size: 0.74rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin: 0 0 1.2rem; }
.fn-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.fn-item { display: grid; gap: 0.2rem; }
.fn-item.flag { padding: 0.75rem 0.85rem; border-radius: 10px; background: linear-gradient(180deg, color-mix(in oklch, var(--gold) 11%, var(--bg-2)), var(--bg-2)); border: 1px solid color-mix(in oklch, var(--gold) 26%, transparent); }
.fn-top { display: flex; align-items: center; gap: 0.55rem; }
.fn-name { font-weight: 600; color: var(--ink); }
.fn-desc { color: var(--muted); font-size: 0.9rem; }
.fn-tag { font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.04em; padding: 0.11rem 0.42rem; border-radius: 999px; text-transform: uppercase; flex: 0 0 auto; }
.fn-tag.pro { background: var(--gold); color: var(--gold-ink); font-weight: 700; }
.fn-tag.free { border: 1px solid var(--line-2); color: var(--muted); }
.fn-note { margin-top: clamp(1.6rem, 1rem + 2vw, 2.4rem); max-width: 74ch; font-size: 0.9rem; }
.ink { color: var(--ink); font-weight: 700; }

/* ---- tier CTA alignment: buttons sit on the same bottom line ---- */
.tier { display: flex; flex-direction: column; }
.tier-cta { width: 100%; margin-top: auto; }
.tier .price-soon { margin-top: auto; }
.tier .price-soon + .tier-cta { margin-top: 0.8rem; }

/* ---- "soon" badge (jewels coming to Mod Colors) ---- */
.soon-badge { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); border: 1px solid color-mix(in oklch, var(--gold) 45%, transparent); border-radius: 999px; padding: 0.1rem 0.44rem; vertical-align: middle; margin-left: 0.35rem; }
.ed-list li.soon b { color: var(--gold); }
.fn-tag.soon { border: 1px solid color-mix(in oklch, var(--gold) 45%, transparent); color: var(--gold); }

/* ---- zoomable screenshots + lightbox ---- */
.framed.zoom { cursor: zoom-in; }
.framed.zoom::after { content: "⤢"; position: absolute; top: 0.6rem; right: 0.6rem; z-index: 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: color-mix(in oklch, var(--bg) 76%, transparent); border: 1px solid var(--line-2); color: var(--gold); font-size: 1.05rem; backdrop-filter: blur(4px); transition: background 0.2s var(--ease); pointer-events: none; }
.framed.zoom:hover::after { background: var(--gold); color: var(--gold-ink); }
.lightbox { position: fixed; inset: 0; z-index: var(--z-dialog); display: none; place-items: center; padding: clamp(1rem, 3vw, 3rem); background: oklch(0 0 0 / 0.86); backdrop-filter: blur(6px); }
.lightbox.open { display: grid; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 12px; border: 1px solid var(--line-2); box-shadow: 0 40px 110px -30px #000; }
.lb-close { position: fixed; top: 1rem; right: 1.2rem; width: 46px; height: 46px; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 10px; color: var(--ink); font-size: 1.2rem; cursor: pointer; z-index: 1; }
.lb-close:hover { border-color: var(--gold); color: var(--gold); }

/* ============ cabinet (account/admin) — unchanged, depended on by those pages ============ */
.panel { max-width: 720px; margin: 5rem auto; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.4rem, 1rem + 2vw, 2.4rem); }
.field { display: grid; gap: 0.5rem; margin-bottom: 1.1rem; }
.field label { font-size: 0.88rem; color: var(--muted); }
input, select, textarea { font: inherit; background: var(--bg); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0.75rem 0.9rem; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
input::placeholder { color: oklch(0.62 0.01 265); }
.row { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.row > * { flex: 1 1 auto; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1.2rem 0; }
.stat { background: var(--bg); padding: 1.1rem 1.2rem; }
.stat .k { font-size: 0.78rem; color: var(--muted); }
.stat .v { font-size: 1.4rem; font-weight: 700; margin-top: 0.2rem; }
.badge { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; }
.badge.pro { background: var(--gold); color: var(--gold-ink); }
.badge.free { background: var(--bg-3); color: var(--muted); }
.badge.ok { background: color-mix(in oklch, var(--r-good) 25%, var(--bg)); color: var(--r-good); }
.badge.bad { background: color-mix(in oklch, var(--r-danger) 25%, var(--bg)); color: var(--r-danger); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
td.mono { font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; }
.toast { position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%); z-index: var(--z-toast); background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0.8rem 1.2rem; box-shadow: 0 12px 40px -12px oklch(0 0 0 / 0.7); opacity: 0; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast.err { border-color: var(--r-danger); }
.hide { display: none !important; }
.tablewrap { overflow-x: auto; }
