/* =========================================================
   TAZ — modern web lab
   No framework. Progressive enhancement everywhere.
   ========================================================= */

@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

@view-transition { navigation: auto; types: page; }

:root {
  interpolate-size: allow-keywords;
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef0f7;
  --text: #12131a;
  --muted: #5a5f73;
  --border: #dfe2ec;
  --accent: oklch(0.56 0.22 280);
  --accent-2: oklch(0.66 0.15 200);
  --accent-3: oklch(0.62 0.22 345);
  --on-accent: #ffffff;
  --good: oklch(0.58 0.15 150);
  --warn: oklch(0.7 0.15 75);
  --bad: oklch(0.58 0.2 25);
  --shadow: 0 1px 2px rgb(16 18 40 / .06), 0 8px 24px rgb(16 18 40 / .08);
  --radius: 18px;
  --radius-sm: 10px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0b12;
    --surface: #12141f;
    --surface-2: #191c2a;
    --text: #eceef6;
    --muted: #9aa0b8;
    --border: #272b3d;
    --accent: oklch(0.7 0.18 280);
    --accent-2: oklch(0.78 0.13 200);
    --accent-3: oklch(0.72 0.19 345);
    --on-accent: #0a0b12;
    --good: oklch(0.75 0.15 150);
    --warn: oklch(0.8 0.14 80);
    --bad: oklch(0.7 0.18 25);
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px rgb(0 0 0 / .35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0b12;
  --surface: #12141f;
  --surface-2: #191c2a;
  --text: #eceef6;
  --muted: #9aa0b8;
  --border: #272b3d;
  --accent: oklch(0.7 0.18 280);
  --accent-2: oklch(0.78 0.13 200);
  --accent-3: oklch(0.72 0.19 345);
  --on-accent: #0a0b12;
  --good: oklch(0.75 0.15 150);
  --warn: oklch(0.8 0.14 80);
  --bad: oklch(0.7 0.18 25);
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px rgb(0 0 0 / .35);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; margin: 0 0 .5em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.15rem; }
p { text-wrap: pretty; margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 3px; }
code, kbd { font-family: var(--mono); font-size: .88em; }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 6px; border: 1px solid var(--border); }
kbd { display: inline-block; padding: .05em .45em; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); }
img, svg, canvas { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in oklch, var(--accent), transparent 65%); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.center { text-align: center; }
.skip { position: fixed; left: 16px; top: -100px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  --b: var(--accent);
  display: inline-flex; align-items: center; gap: .5em;
  padding: .7em 1.2em; border-radius: 999px; border: 1px solid transparent;
  background: var(--b); color: var(--on-accent); font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px color-mix(in oklch, var(--b), transparent 60%); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn-glow {
  position: relative; isolation: isolate;
  background: var(--text); color: var(--bg);
}
.btn-glow::before {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; z-index: -1;
  background: conic-gradient(from var(--angle), var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  animation: spin 4s linear infinite;
}
.btn-glow::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; background: var(--text); }
@keyframes spin { to { --angle: 360deg; } }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.icon-btn {
  display: inline-grid; place-items: center; grid-auto-flow: column; gap: 6px;
  min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  transition: background .2s;
}
.icon-btn:hover { background: var(--surface-2); }
.kbd-hint { font-size: .72rem; color: var(--muted); border: 0; background: none; padding: 0; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

/* ---------- header ---------- */
.progress {
  position: fixed; inset: 0 0 auto; height: 3px; z-index: 60;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  transform-origin: 0 50%; transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { transform: scaleX(1); } }
}
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 12px var(--gutter);
  background: color-mix(in oklch, var(--bg), transparent 25%);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in oklch, var(--border), transparent 40%);
}
html:active-view-transition-type(page) .site-header { view-transition-name: site-header; }
html:active-view-transition-type(page) .page-title { view-transition-name: page-title; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: -0.02em; font-size: 1.1rem; }
.nav { display: flex; gap: 4px; margin-inline: auto; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.header-actions { display: flex; gap: 8px; margin-left: auto; }
.nav + .header-actions { margin-left: 0; }
.menu-btn { display: none; }
.mobile-nav {
  inset: 64px 16px auto auto; margin: 0; padding: 8px; min-width: 200px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow);
  opacity: 0; translate: 0 -8px;
  transition: opacity .2s, translate .2s var(--ease), overlay .2s allow-discrete, display .2s allow-discrete;
}
.mobile-nav:popover-open { display: grid; opacity: 1; translate: 0; }
@starting-style { .mobile-nav:popover-open { opacity: 0; translate: 0 -8px; } }
.mobile-nav a { color: var(--text); text-decoration: none; padding: 10px 12px; border-radius: 8px; }
.mobile-nav a:hover { background: var(--surface-2); }
@media (max-width: 760px) {
  .nav, .kbd-hint { display: none; }
  .menu-btn { display: inline-grid; }
  .nav + .header-actions { margin-left: auto; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: calc(100svh - 65px);
  display: grid; place-items: center; padding: 64px var(--gutter) 96px;
  overflow: hidden; isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: -20%; z-index: -2;
  background:
    radial-gradient(40% 35% at 20% 25%, color-mix(in oklch, var(--accent), transparent 70%), transparent 70%),
    radial-gradient(35% 30% at 80% 30%, color-mix(in oklch, var(--accent-2), transparent 72%), transparent 70%),
    radial-gradient(40% 35% at 60% 85%, color-mix(in oklch, var(--accent-3), transparent 75%), transparent 70%);
  filter: blur(20px);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(3%, -4%, 0) rotate(6deg) scale(1.05); } }
.hero-field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-inner { max-width: 920px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: color-mix(in oklch, var(--surface), transparent 30%); border: 1px solid var(--border);
  font-size: .85rem; color: var(--muted); backdrop-filter: blur(8px);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 var(--good); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(2.6rem, 8vw, 5.6rem); margin: 22px 0 18px; letter-spacing: -0.04em; }
.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2) 50%, var(--accent-3));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 8s ease-in-out infinite alternate;
}
@keyframes shimmer { to { background-position: 100% 0; } }
.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 680px; margin-inline: auto; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 28px 0 40px; }
.stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stats li {
  padding: 14px 10px; border-radius: 14px; border: 1px solid var(--border);
  background: color-mix(in oklch, var(--surface), transparent 30%); backdrop-filter: blur(8px);
}
.stats strong { display: block; font-size: 1.7rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stats li > span { font-size: .85rem; color: var(--muted); }
@media (max-width: 600px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.scroll-cue { position: absolute; bottom: 24px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border: 2px solid var(--muted); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--muted); animation: cue 1.8s infinite; }
@keyframes cue { 60% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 10vw, 120px) var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; }
.section.alt { max-width: none; background: var(--surface-2); border-block: 1px solid var(--border); }
.section.alt > * { max-width: var(--max); margin-inline: auto; }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head p { color: var(--muted); }
.kicker { font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent) !important; margin-bottom: 10px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.split .section-head { margin-bottom: 0; }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .split, .two-up { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); }
.panel h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.panel p { color: var(--muted); }

/* reveal on scroll */
@supports (animation-timeline: view()) {
  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
  @keyframes reveal { from { opacity: 0; transform: translateY(40px); filter: blur(6px); } }
}
@supports not (animation-timeline: view()) {
  .js .reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* ---------- POI hub ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 500; transition: background .2s, color .2s; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.poi-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.poi[hidden] { display: none; }
.poi a {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; display: block; height: 100%; padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none;
  transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
  overflow: hidden; isolation: isolate;
}
.poi a::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(300px circle at var(--mx) var(--my), color-mix(in oklch, var(--accent), transparent 82%), transparent 60%);
}
.poi a:hover { border-color: color-mix(in oklch, var(--accent), var(--border) 50%); box-shadow: var(--shadow); }
.poi a:hover::before { opacity: 1; }
.poi .num { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.poi .tag { float: right; font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: color-mix(in oklch, var(--accent), transparent 85%); color: var(--accent); }
.poi h3 { margin: 18px 0 6px; }
.poi p { color: var(--muted); font-size: .93rem; margin: 0; }
::view-transition-group(*) { animation-duration: .45s; animation-timing-function: var(--ease); }

/* ---------- 01 scroll-driven stage ---------- */
.scrolly { height: 260vh; position: relative; view-timeline: --stage block; }
.scrolly-sticky {
  position: sticky; top: 64px; height: calc(100svh - 64px);
  display: grid; grid-template-rows: auto 1fr auto; padding: 32px var(--gutter);
  max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; overflow: hidden;
}
.stage { position: relative; display: grid; place-items: center; }
.orb { position: absolute; width: clamp(140px, 24vw, 260px); aspect-ratio: 1; border-radius: 50%; filter: blur(2px); mix-blend-mode: plus-lighter; opacity: .85; }
:root[data-theme="light"] .orb { mix-blend-mode: multiply; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .orb { mix-blend-mode: multiply; } }
.orb-a { background: radial-gradient(circle at 30% 30%, var(--accent), transparent 70%); translate: -40% 0; }
.orb-b { background: radial-gradient(circle at 30% 30%, var(--accent-2), transparent 70%); translate: 40% 0; }
.orb-c { background: radial-gradient(circle at 30% 30%, var(--accent-3), transparent 70%); translate: 0 30%; }
.ring { position: absolute; width: clamp(220px, 40vw, 420px); aspect-ratio: 1; border-radius: 50%; border: 2px dashed color-mix(in oklch, var(--text), transparent 70%); }
.stage-word { position: absolute; margin: 0; font-size: clamp(2.4rem, 9vw, 6rem); font-weight: 800; letter-spacing: -0.05em; opacity: 0; }
.w1 { opacity: 1; }
.stage-caption { text-align: center; color: var(--muted); }
.support-note { display: none; font-size: .9rem; border-left: 3px solid var(--warn); padding-left: 10px; }
@supports not (animation-timeline: view()) { .support-note[data-needs="scroll-timeline"] { display: block; } }
@supports (animation-timeline: view()) {
  .orb, .ring, .stage-word { animation-timeline: --stage; animation-fill-mode: both; animation-timing-function: linear; animation-range: contain 0% contain 100%; }
  .orb-a { animation-name: orbA; }
  .orb-b { animation-name: orbB; }
  .orb-c { animation-name: orbC; }
  .ring { animation-name: ringSpin; }
  .w1 { animation-name: word1; }
  .w2 { animation-name: word2; }
  .w3 { animation-name: word3; }
  @keyframes orbA { 0% { translate: -140% -40%; scale: .6; } 50% { translate: -30% 0; scale: 1.2; } 100% { translate: 0 0; scale: .9; } }
  @keyframes orbB { 0% { translate: 140% 40%; scale: .6; } 50% { translate: 30% 0; scale: 1.1; } 100% { translate: 0 0; scale: .9; } }
  @keyframes orbC { 0% { translate: 0 160%; scale: .5; } 50% { translate: 0 25%; scale: 1; } 100% { translate: 0 0; scale: .9; } }
  @keyframes ringSpin { from { rotate: 0deg; scale: .4; opacity: 0; } 30% { opacity: 1; } to { rotate: 540deg; scale: 1.2; } }
  @keyframes word1 { 0%, 25% { opacity: 1; transform: none; } 33%, 100% { opacity: 0; transform: translateY(-40px); filter: blur(8px); } }
  @keyframes word2 { 0%, 30% { opacity: 0; transform: translateY(40px); } 40%, 58% { opacity: 1; transform: none; } 66%, 100% { opacity: 0; transform: translateY(-40px); } }
  @keyframes word3 { 0%, 64% { opacity: 0; transform: scale(.7); } 76%, 100% { opacity: 1; transform: none; } }
}

/* ---------- 02 tiles ---------- */
.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tiles li {
  --h: 280;
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 16px;
  font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 800; color: #fff;
  background: linear-gradient(135deg, oklch(0.65 0.2 var(--h)), oklch(0.5 0.22 calc(var(--h) + 40)));
  box-shadow: var(--shadow);
}
.tiles li:nth-child(even) { border-radius: 50%; }

/* ---------- 03 anchor popover ---------- */
.anchor-demo { display: grid; place-items: center; padding: 48px 0 24px; }
.anchor-btn { anchor-name: --demo-anchor; }
[popover].anchored {
  max-width: 300px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
  opacity: 0; scale: .9;
  transition: opacity .2s, scale .2s var(--ease), overlay .2s allow-discrete, display .2s allow-discrete;
}
[popover].anchored:popover-open { opacity: 1; scale: 1; }
@starting-style { [popover].anchored:popover-open { opacity: 0; scale: .9; } }
[popover].anchored p { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }
@supports (anchor-name: --a) {
  [popover].anchored {
    position-anchor: --demo-anchor; inset: auto; margin: 0 0 12px;
    position-area: top; position-try-fallbacks: flip-block;
  }
}

/* ---------- 04 dialog ---------- */
dialog { color: var(--text); }
.dialog, .palette {
  border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: 0 30px 80px rgb(0 0 0 / .35);
  opacity: 0; translate: 0 24px; scale: .96;
  transition: opacity .3s var(--ease), translate .3s var(--ease), scale .3s var(--ease), overlay .3s allow-discrete, display .3s allow-discrete;
}
.dialog { width: min(440px, calc(100vw - 32px)); padding: 28px; }
.dialog[open], .palette[open] { opacity: 1; translate: 0; scale: 1; }
@starting-style { .dialog[open], .palette[open] { opacity: 0; translate: 0 24px; scale: .96; } }
.dialog::backdrop, .palette::backdrop {
  background: rgb(5 6 15 / 0); backdrop-filter: blur(0);
  transition: background .3s, backdrop-filter .3s, overlay .3s allow-discrete, display .3s allow-discrete;
}
.dialog[open]::backdrop, .palette[open]::backdrop { background: rgb(5 6 15 / .45); backdrop-filter: blur(6px); }
@starting-style { .dialog[open]::backdrop, .palette[open]::backdrop { background: rgb(5 6 15 / 0); backdrop-filter: blur(0); } }
.dialog p { color: var(--muted); }

/* ---------- 05 container queries ---------- */
.range-row { display: grid; gap: 6px; margin-bottom: 16px; max-width: 420px; }
input[type="range"] { accent-color: var(--accent); width: 100%; }
.cq-box {
  container: card / inline-size;
  --w: 900px; width: min(100%, var(--w));
  resize: horizontal; overflow: hidden; min-width: 220px; max-width: 100%;
  padding: 12px; border: 2px dashed var(--border); border-radius: calc(var(--radius) + 8px);
}
.cq-card { display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.cq-media { aspect-ratio: 16 / 9; border-radius: 12px; background: linear-gradient(160deg, oklch(0.35 0.1 260), oklch(0.55 0.18 160) 60%, oklch(0.8 0.15 130)); }
.cq-body h3 { font-size: clamp(1.1rem, 5cqi, 2rem); }
.cq-body p { color: var(--muted); margin: 0; }
.cq-extra { display: none; }
.price-tag { display: block; font-size: 1.6rem; font-weight: 800; }
@container card (width > 420px) {
  .cq-card { grid-template-columns: 160px 1fr; align-items: center; }
  .cq-media { aspect-ratio: 1; }
}
@container card (width > 620px) {
  .cq-card { grid-template-columns: 200px 1fr auto; }
  .cq-extra { display: block; text-align: right; padding-inline: 12px; }
}

/* ---------- 06 :has() ---------- */
.plan-form { display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); }
.plans { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 480px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; display: grid; gap: 2px; padding: 14px; border-radius: 14px; border: 2px solid var(--border); cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan-name { font-weight: 700; }
.plan-desc { font-size: .82rem; color: var(--muted); }
.plan:has(:checked) { border-color: var(--accent); background: color-mix(in oklch, var(--accent), transparent 90%); transform: translateY(-2px); }
.plan:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.track { width: 44px; height: 26px; border-radius: 99px; background: var(--border); position: relative; transition: background .2s; }
.track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: translate .25s var(--ease); box-shadow: 0 1px 3px rgb(0 0 0 / .3); }
.switch:has(:checked) .track { background: var(--accent); }
.switch:has(:checked) .track::after { translate: 18px 0; }
.switch:has(:focus-visible) .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.save { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: color-mix(in oklch, var(--good), transparent 80%); color: var(--good); }
.summary { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; }
.summary small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.price { display: none; }
.plan-form:has([value="hobby"]:checked) .p-hobby,
.plan-form:has([value="pro"]:checked):not(:has(#yearly:checked)) .p-pro.m,
.plan-form:has([value="pro"]:checked):has(#yearly:checked) .p-pro.y,
.plan-form:has([value="scale"]:checked):not(:has(#yearly:checked)) .p-scale.m,
.plan-form:has([value="scale"]:checked):has(#yearly:checked) .p-scale.y { display: inline; }
.field { display: grid; gap: 6px; }
.field input { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); transition: border-color .2s; }
.field .hint { display: none; color: var(--bad); }
.field:has(input:user-invalid) input { border-color: var(--bad); }
.field:has(input:user-invalid) .hint { display: block; }
.field:has(input:valid) input { border-color: var(--good); }
.submit { justify-self: start; opacity: .45; pointer-events: none; }
.plan-form:has(input[type="email"]:valid) .submit { opacity: 1; pointer-events: auto; }

/* ---------- 07 color lab ---------- */
.palette-lab { --h: 275; --c: 0.2; display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .palette-lab { grid-template-columns: 1fr; } }
.palette-controls { display: grid; gap: 16px; background: var(--surface); padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); }
.palette-controls label { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.palette-controls input { grid-column: 1 / -1; }
.swatches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sw { width: 100%; aspect-ratio: 1.3; border: 0; border-radius: 14px; cursor: pointer; display: flex; align-items: flex-end; padding: 10px; font-family: var(--mono); font-size: .8rem; transition: transform .2s var(--ease); }
.sw:hover { transform: scale(1.04); }
.sw-1 { background: oklch(0.97 calc(var(--c) * .15) var(--h)); color: #111; }
.sw-2 { background: oklch(0.88 calc(var(--c) * .45) var(--h)); color: #111; }
.sw-3 { background: oklch(0.74 calc(var(--c) * .85) var(--h)); color: #111; }
.sw-4 { background: oklch(0.62 var(--c) var(--h)); color: #fff; }
.sw-5 { background: oklch(0.46 calc(var(--c) * .85) var(--h)); color: #fff; }
.sw-6 { background: oklch(0.28 calc(var(--c) * .5) var(--h)); color: #fff; }
.sw-mix { background: color-mix(in oklch, oklch(0.62 var(--c) var(--h)) 60%, oklch(0.7 0.15 calc(var(--h) + 60))); color: #fff; }
.sw-comp { background: oklch(0.62 var(--c) calc(var(--h) + 180)); color: #fff; }
.palette-preview {
  grid-column: 2; padding: 24px; border-radius: var(--radius);
  background: oklch(0.97 calc(var(--c) * .15) var(--h)); color: oklch(0.28 calc(var(--c) * .5) var(--h));
  border: 1px solid oklch(0.88 calc(var(--c) * .45) var(--h));
}
@media (max-width: 860px) { .palette-preview { grid-column: 1; } }
.palette-preview p { opacity: .8; }
.pp-badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: oklch(0.88 calc(var(--c) * .45) var(--h)); margin-bottom: 10px; }
.pp-btn { display: inline-block; padding: 10px 18px; border-radius: 99px; font-weight: 600; background: oklch(0.62 var(--c) var(--h)); color: #fff; }

/* ---------- 08 carousel ---------- */
.carousel-wrap { position: relative; }
.carousel {
  list-style: none; margin: 0; padding: 8px 4px 16px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 340px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-marker-group: after;
}
.carousel::-webkit-scrollbar { display: none; }
.slide {
  scroll-snap-align: center; aspect-ratio: 4 / 5; max-height: 360px; width: 100%; border-radius: 22px; padding: 22px; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end; box-shadow: var(--shadow);
}
.slide h3 { font-size: 1.8rem; margin: 0; }
.slide p { margin: 0; opacity: .85; }
.s1 { background: linear-gradient(170deg, oklch(0.7 0.15 20), oklch(0.35 0.12 340)); }
.s2 { background: linear-gradient(170deg, oklch(0.8 0.1 210), oklch(0.35 0.1 250)); }
.s3 { background: linear-gradient(170deg, oklch(0.82 0.14 85), oklch(0.45 0.15 40)); }
.s4 { background: linear-gradient(170deg, oklch(0.75 0.08 230), oklch(0.3 0.05 260)); }
.s5 { background: linear-gradient(170deg, oklch(0.72 0.17 50), oklch(0.4 0.16 15)); }
.s6 { background: linear-gradient(170deg, oklch(0.85 0.1 190), oklch(0.45 0.15 255)); }
.carousel::scroll-marker-group { display: flex; justify-content: center; gap: 10px; padding-top: 8px; }
.slide::scroll-marker { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--border); transition: background .2s, width .2s; }
.slide::scroll-marker:target-current { background: var(--accent); width: 26px; border-radius: 99px; }
.car-btn {
  position: absolute; top: 45%; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.car-btn.prev { left: -8px; }
.car-btn.next { right: -8px; }
.car-btn:disabled { opacity: .35; cursor: default; }

/* ---------- 09 FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; transition: rotate .3s var(--ease); color: var(--accent); }
.faq details[open] summary::after { rotate: 45deg; }
.faq-body { padding: 0 18px 4px; color: var(--muted); }
.faq details::details-content { block-size: 0; overflow: hidden; transition: block-size .35s var(--ease), content-visibility .35s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }

/* ---------- 10 crypto ---------- */
.crypto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.crypto-grid .panel { display: grid; gap: 12px; align-content: start; }
textarea { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); resize: vertical; }
.mono-out { display: block; padding: 12px; border-radius: 12px; word-break: break-all; font-size: .82rem; min-height: 3em; background: var(--bg); }
.meter { height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--bad), var(--warn), var(--good)); background-size: 300px 100%; transition: width .3s var(--ease); }

/* ---------- 11 edge ---------- */
.edge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; margin-bottom: 16px; }
.edge-card { padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.edge-card span { display: block; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.edge-card strong { display: block; font-size: 1.4rem; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; word-break: break-word; }

/* ---------- 12 security ---------- */
.grade { display: inline-grid; place-items: center; width: 140px; aspect-ratio: 1; border-radius: 50%; margin-top: 16px;
  background: conic-gradient(var(--good) calc(var(--pct, 0) * 1%), var(--border) 0); position: relative; transition: --pct 1s; }
.grade::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface-2); }
.grade span, .grade small { position: relative; }
.grade span { font-size: 2.8rem; font-weight: 800; line-height: 1; align-self: end; }
.grade small { align-self: start; color: var(--muted); font-size: .8rem; }
#security .split { align-items: start; }
@media (min-width: 861px) { #security .section-head { position: sticky; top: 100px; } }
.sec-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.sec-list li { display: grid; grid-template-columns: 28px 1fr; gap: 4px 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.sec-list .ok, .sec-list .no { grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: #fff; }
.sec-list .ok { background: var(--good); }
.sec-list .no { background: var(--bad); }
.sec-list b { font-size: .92rem; }
.sec-list small { color: var(--muted); font-family: var(--mono); font-size: .75rem; word-break: break-all; }

/* ---------- 13 support ---------- */
.support-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.support-grid li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: .92rem; }
.support-grid .yes::before, .support-grid .nope::before { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 800; color: #fff; }
.support-grid .yes::before { content: "✓"; background: var(--good); }
.support-grid .nope::before { content: "–"; background: var(--muted); }
.support-grid .nope { color: var(--muted); }

/* ---------- 14 palette ---------- */
.palette { width: min(560px, calc(100vw - 32px)); padding: 0; margin-top: 12vh; overflow: hidden; }
.palette input { width: 100%; padding: 18px 20px; border: 0; border-bottom: 1px solid var(--border); background: transparent; font-size: 1.05rem; outline: none; }
.palette ul { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.palette li { display: flex; gap: 12px; align-items: baseline; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.palette li .pn { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.palette li small { margin-left: auto; color: var(--muted); font-size: .8rem; }
.palette li[aria-selected="true"] { background: color-mix(in oklch, var(--accent), transparent 85%); }
.palette-foot { margin: 0; padding: 10px 16px; border-top: 1px solid var(--border); font-size: .78rem; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ---------- toast ---------- */
.toast {
  inset: auto auto 24px 50%; translate: -50% 0; margin: 0; padding: 12px 18px; border: 0; border-radius: 12px;
  background: var(--text); color: var(--bg); font-weight: 600; box-shadow: var(--shadow);
  opacity: 0; translate: -50% 12px;
  transition: opacity .25s, translate .25s var(--ease), overlay .25s allow-discrete, display .25s allow-discrete;
}
.toast:popover-open { opacity: 1; translate: -50% 0; }
@starting-style { .toast:popover-open { opacity: 0; translate: -50% 12px; } }

/* ---------- theme circular reveal ---------- */
:root.theme-vt::view-transition-old(root),
:root.theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- footer ---------- */
.site-footer { padding: 40px var(--gutter); text-align: center; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--border); }
.site-footer p { margin: 4px 0; }

/* ---------- about page ---------- */
.doc { max-width: 760px; margin-inline: auto; padding: clamp(48px, 8vw, 96px) var(--gutter); }
.doc h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.04em; }
.doc h2 { font-size: 1.5rem; margin-top: 2.2em; }
.doc li { margin-bottom: .5em; }
.doc .lede { margin-inline: 0; }
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 30px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--good); color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .scrolly { height: auto; }
  .scrolly-sticky { position: static; height: auto; min-height: 70svh; }
  .stage-word { opacity: 0 !important; }
  .w3 { opacity: 1 !important; }
  .reveal { animation: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
