/* OpenStudy site. Same look as the app: graph paper, navy ink, coral and teal pens. */
:root {
  --paper: #f6f7f4;
  --paper-2: #eef0ea;
  --paper-line: rgba(31, 42, 55, 0.07);
  --panel: #ffffff;
  --ink: #1f2a37;
  --ink-soft: #4b5563;
  --ink-faint: #8a94a3;
  --line: rgba(31, 42, 55, 0.12);
  --coral: #e4572e;
  --coral-ink: #c8431d;
  --teal: #0f9d8a;
  --violet: #6d5dfc;
  --gold: #e3a313;
  --marker: rgba(234, 245, 60, 0.75);
  --shadow: 0 1px 2px rgba(31, 42, 55, 0.06), 0 8px 28px rgba(31, 42, 55, 0.08);
  --shadow-lg: 0 2px 6px rgba(31, 42, 55, 0.06), 0 30px 70px -20px rgba(31, 42, 55, 0.3);
  --code-bg: #1b2430;
  --code-ink: #e6edf3;
  --hand: "Patrick Hand", "Segoe Print", "Comic Sans MS", cursive;
  --head: "Architects Daughter", "Patrick Hand", cursive;
  --ui: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 16px;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121920;
    --paper-2: #18212a;
    --paper-line: rgba(220, 235, 245, 0.05);
    --panel: #1c2630;
    --ink: #e8edf2;
    --ink-soft: #b3bdc8;
    --ink-faint: #7d8a98;
    --line: rgba(220, 235, 245, 0.12);
    --coral: #ff7a52;
    --coral-ink: #ff8f6b;
    --teal: #3cc7b2;
    --violet: #9b8fff;
    --gold: #f2c14e;
    --marker: rgba(234, 245, 60, 0.32);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 30px 70px -20px rgba(0, 0, 0, 0.7);
    --code-bg: #0c1218;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121920;
  --paper-2: #18212a;
  --paper-line: rgba(220, 235, 245, 0.05);
  --panel: #1c2630;
  --ink: #e8edf2;
  --ink-soft: #b3bdc8;
  --ink-faint: #7d8a98;
  --line: rgba(220, 235, 245, 0.12);
  --coral: #ff7a52;
  --coral-ink: #ff8f6b;
  --teal: #3cc7b2;
  --violet: #9b8fff;
  --gold: #f2c14e;
  --marker: rgba(234, 245, 60, 0.32);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 30px 70px -20px rgba(0, 0, 0, 0.7);
  --code-bg: #0c1218;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--paper); }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--paper-2); border: 1px solid var(--line); padding: 0.08em 0.38em; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
.muted { color: var(--ink-faint); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.wrap--narrow { max-width: 820px; }
@media (min-width: 720px) { :root { --gutter: 28px; } }

.paper {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--paper-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-line) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn--coral { background: var(--coral); color: #fff; box-shadow: 0 6px 20px -6px color-mix(in srgb, var(--coral) 70%, transparent); }
.btn--coral:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--coral) 80%, transparent); }
.btn--coral span { transition: transform 0.2s ease; }
.btn--coral:hover span { transform: translateX(3px); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { transform: translateY(-1px); }
.btn--ghost { background: var(--panel); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--coral); color: var(--coral-ink); }
.btn .gh { width: 16px; height: 16px; }
.play-ico { font-size: 11px; }

.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; flex: none;
  border-radius: 10px; background: transparent; border: 1px solid var(--line); cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.icon-btn:hover { background: var(--paper-2); border-color: var(--ink-faint); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.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; }
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 16px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 400 26px/1 var(--head); letter-spacing: -0.01em; }
.logo__mark { width: 32px; height: 32px; }
.logo--sm { font-size: 20px; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a { text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--ink-soft); padding: 8px 12px; border-radius: 9px; transition: color 0.2s, background 0.2s; }
.nav__links a:hover { color: var(--ink); background: var(--paper-2); }
.nav__links a.is-active { color: var(--coral-ink); }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; flex-direction: column; gap: 4px; }
.menu-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.25s, opacity 0.2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 920px) {
  .menu-btn { display: inline-flex; }
  .nav__actions { margin-left: auto; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 2px; padding: 10px var(--gutter) 18px;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform-origin: top; transform: scaleY(0.96); opacity: 0; visibility: hidden;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .nav__links.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav__links a { padding: 12px; font-size: 16px; }
}
@media (max-width: 520px) { .hide-sm { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; padding: 56px 0 80px; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 120px; background: linear-gradient(transparent, var(--paper)); pointer-events: none; }
.hero__grid { display: grid; gap: 48px; align-items: center; position: relative; z-index: 1; }
@media (min-width: 1000px) { .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 56px; } .hero__title { font-size: clamp(44px, 4.3vw, 60px); } .hero { padding: 84px 0 110px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--teal); background: color-mix(in srgb, var(--teal) 12%, transparent); padding: 6px 12px; border-radius: 99px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 var(--teal); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 60%, transparent); } 80%, 100% { box-shadow: 0 0 0 8px transparent; } }
.hero__title { margin-top: 20px; font: 400 clamp(36px, 6.4vw, 58px)/1.1 var(--head); letter-spacing: -0.015em; text-wrap: balance; }
.scribble { position: relative; display: inline-block; color: var(--coral); white-space: nowrap; }
.scribble svg { position: absolute; left: -2%; width: 104%; bottom: -0.16em; height: 0.36em; overflow: visible; }
.scribble path { fill: none; stroke: var(--coral); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.scribble path:nth-child(2) { stroke-width: 3; }
.is-in .scribble path:nth-child(1) { animation: draw-in 0.9s 0.5s cubic-bezier(0.6, 0, 0.2, 1) both; }
.is-in .scribble path:nth-child(2) { animation: draw-in 0.7s 1.25s cubic-bezier(0.6, 0, 0.2, 1) both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes draw-in { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.hero__lede { margin-top: 22px; font-size: clamp(16px, 1.9vw, 18.5px); color: var(--ink-soft); max-width: 36em; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__facts { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 14px; color: var(--ink-soft); }
.hero__facts li { display: flex; align-items: baseline; gap: 6px; }
.hero__facts b { font: 700 22px/1 var(--ui); letter-spacing: -0.02em; color: var(--ink); }
.hero__facts code { font-size: 12.5px; }

.hero__shot { position: relative; }
.frame { background: var(--panel); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.frame__bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.frame__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.frame__bar i:nth-child(1) { background: #ff6058; } .frame__bar i:nth-child(2) { background: #ffbd2e; } .frame__bar i:nth-child(3) { background: #28c940; }
.frame__bar span { margin: 0 auto; font: 12px var(--mono); color: var(--ink-faint); background: var(--panel); padding: 2px 14px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
@media (min-width: 1000px) {
  .frame--tilt { transform: perspective(1600px) rotateY(-7deg) rotateX(2deg); transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .hero__shot:hover .frame--tilt { transform: perspective(1600px) rotateY(-2deg) rotateX(0deg); }
}
.sticky {
  position: absolute; z-index: 2; max-width: 170px; padding: 12px 14px 14px;
  font: 400 19px/1.15 var(--hand); color: #1f2a37;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.35); transition: transform 0.3s ease;
}
.sticky::before { content: ""; position: absolute; top: -9px; left: 50%; width: 46px; height: 16px; transform: translateX(-50%) rotate(-2deg); background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(0, 0, 0, 0.05); }
.sticky--a { background: #fff27a; top: 34%; left: -18px; transform: rotate(-5deg); }
.sticky--b { background: #9fe3c3; bottom: -26px; right: 14px; transform: rotate(4deg); }
.sticky:hover { transform: rotate(0) scale(1.04); }
.hero__arrow { position: absolute; width: 90px; left: 120px; top: calc(34% + 64px); fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; z-index: 2; }
.hero__arrow path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.is-in .hero__arrow path { animation: draw-in 0.8s 1.4s ease both; }
@media (max-width: 640px) {
  .sticky { font-size: 16px; max-width: 130px; padding: 8px 10px 10px; }
  .sticky--a { top: auto; bottom: -30px; left: 6px; }
  .sticky--b { bottom: -22px; right: 6px; }
  .hero__arrow { display: none; }
}

/* ---------- strip ---------- */
.strip { border-block: 1px solid var(--line); background: var(--panel); overflow: hidden; padding: 14px 0; }
.strip__track { display: flex; gap: 22px; width: max-content; align-items: center; animation: marquee 38s linear infinite; font: 400 22px/1 var(--hand); color: var(--ink-soft); }
.strip__track i { font-style: normal; color: var(--coral); font-size: 14px; }
.strip:hover .strip__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: 84px 0; }
@media (min-width: 900px) { .section { padding: 112px 0; } }
.section--tint { background: var(--paper-2); }
.section__head { max-width: 700px; margin: 0 auto 44px; text-align: center; }
.section__head h2 { font: 400 clamp(30px, 5vw, 46px)/1.12 var(--head); }
.section__head p:not(.kicker) { margin-top: 14px; color: var(--ink-soft); font-size: 17px; }
.kicker { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral-ink); margin-bottom: 12px; }

/* ---------- live demo ---------- */
.demo { display: grid; gap: 20px; }
@media (min-width: 1000px) { .demo { grid-template-columns: 0.85fr 1.15fr; align-items: stretch; } }
.demo__code { background: var(--code-bg); color: var(--code-ink); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; min-width: 0; box-shadow: var(--shadow); }
.demo__codebar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.demo__codebar .muted { color: #7d8a98; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; background: rgba(255, 255, 255, 0.07); padding: 4px 10px; border-radius: 99px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #7d8a98; flex: none; }
.is-playing .live-dot { background: #3cc7b2; animation: ping 1.6s infinite; }
.proto { list-style: none; margin: 0; padding: 10px 0; overflow: auto; max-height: 520px; font: 12.5px/1.65 var(--mono); flex: 1; }
@media (max-width: 999px) { .proto { max-height: 260px; } }
.proto li { position: relative; }
.proto button {
  display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 4px 16px 4px 34px; color: #8b98a6; white-space: pre-wrap; word-break: break-word; font: inherit;
  border-left: 3px solid transparent; transition: background 0.15s, color 0.2s;
}
.proto button:hover { background: rgba(255, 255, 255, 0.04); color: #c9d4de; }
.proto li::before { content: attr(data-n); position: absolute; left: 10px; top: 4px; color: #4a5866; font-size: 11px; }
.proto li.done button { color: #c9d4de; }
.proto li.now button { background: rgba(60, 199, 178, 0.1); border-left-color: #3cc7b2; color: #fff; }
.proto .k { color: #ff8f6b; }
.proto .a { color: #9fd8ff; }
.proto .s { color: #b5e48c; }
.proto .t { color: #e6edf3; }

.demo__board { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mini {
  position: relative; border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow);
  min-height: 460px; flex: 1; display: flex; flex-direction: column; overflow: hidden;
  font-family: var(--hand); color: var(--ink);
}
.mini__toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; }
.mini__title, .mini__status { font: 500 13px var(--ui); background: var(--panel); border: 1px solid var(--line); padding: 6px 12px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); display: inline-flex; align-items: center; gap: 8px; }
.mini__status { color: var(--ink-faint); }
.mini.is-playing .mini__status .live-dot { background: var(--teal); animation: ping 1.6s infinite; }
.mini__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 6px 24px 120px; flex: 1; }
@media (max-width: 640px) { .mini__cols { grid-template-columns: 1fr; padding: 4px 16px 130px; gap: 6px; } }
.mini__col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.blk { font-size: 22px; line-height: 1.3; animation: pop 0.3s ease; }
@media (max-width: 640px) { .blk { font-size: 20px; } }
@keyframes pop { from { opacity: 0; transform: translateY(4px); } }
.blk h4 { margin: 0; font: 400 1.35em/1.15 var(--head); display: inline; text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.blk b { font-weight: 400; color: var(--coral-ink); }
.blk .eq { font-size: 1.15em; }
.blk .caret::after { content: ""; display: inline-block; width: 2px; height: 0.95em; background: var(--coral); margin-left: 2px; vertical-align: -0.1em; animation: blink 0.8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.blk svg { width: 100%; height: auto; overflow: visible; }
.blk figcaption { font-size: 15px; color: var(--ink-faint); margin-top: 2px; }
.sk path, .sk circle, .sk line, .sk polyline { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sk .ball { fill: var(--coral); stroke: var(--coral); }
.sk .trail { stroke: var(--teal); stroke-dasharray: 2 6; }
.sk text { font: 15px var(--hand); fill: var(--ink-soft); stroke: none; }
.sk.drawing [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s ease forwards; }
.sk.drawing [pathLength]:nth-of-type(2) { animation-delay: 0.5s; }
.sk.drawing [pathLength]:nth-of-type(3) { animation-delay: 0.9s; }
.sk.drawing .ball { animation: roll 1.8s 1s cubic-bezier(0.5, 0, 0.3, 1) both; }
@keyframes roll { from { transform: translate(-150px, -95px); opacity: 0; } 15% { opacity: 1; } }
.sk .trail.drawing-trail { animation: fadein 0.6s 2.2s both; }
@keyframes fadein { from { opacity: 0; } }

.ann { position: relative; white-space: nowrap; }
.ann svg { position: absolute; pointer-events: none; overflow: visible; }
.ann path { fill: none; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.7s ease forwards; }
.ann--circle path { stroke: var(--coral); stroke-width: 2.4; }
.ann--underline svg { left: 0; right: 0; bottom: -0.25em; width: 100%; height: 0.4em; }
.ann--underline path { stroke: var(--teal); stroke-width: 2.6; }
.ann--highlight { background: linear-gradient(var(--marker), var(--marker)) no-repeat 0 60% / 0% 78%; animation: marker 0.6s ease forwards; border-radius: 3px; }
@keyframes marker { to { background-size: 100% 78%; } }
.instant .ann path, .instant.ann path { animation-duration: 0s; }
.instant .ann--highlight, .ann--highlight.instant { animation-duration: 0s; }

.mini__caption {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(92%, 560px);
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(6px);
  border-radius: 12px; padding: 10px 16px; text-align: center; font: 500 15.5px/1.45 var(--ui); color: var(--ink);
  border: 1px solid var(--line);
}
.mini__caption span { display: inline; }
.mini__ask { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: min(94%, 560px); }
.mini__ask button { font: 500 14px var(--ui); background: var(--panel); border: 1.5px solid var(--line); padding: 8px 14px; border-radius: 99px; cursor: pointer; box-shadow: var(--shadow); transition: border-color 0.2s, transform 0.15s; animation: pop 0.3s ease both; }
.mini__ask button:nth-child(2) { animation-delay: 0.08s; } .mini__ask button:nth-child(3) { animation-delay: 0.16s; }
.mini__ask button:hover { border-color: var(--coral); transform: translateY(-1px); }
.mini__ask button.right { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 14%, var(--panel)); }
.mini__ask button.wrong { border-color: var(--coral); opacity: 0.6; }
.demo__controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.demo__controls .ico-pause, .demo__controls.is-playing .ico-play { display: none; }
.demo__controls.is-playing .ico-pause { display: inline; }
.speed select { height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 0 8px; font: 500 14px var(--ui); }
.progress { flex: 1; min-width: 80px; height: 6px; background: var(--paper-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--coral)); transition: width 0.3s ease; }

/* ---------- stepper ---------- */
.stepper { background: var(--panel); border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 10px; }
.stepper__tabs { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: var(--paper-2); border-radius: 14px; padding: 4px; }
.stepper__tabs button { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: none; padding: 12px 6px; border-radius: 11px; cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--ink-soft); transition: color 0.25s; }
.stepper__tabs button b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 12px; transition: background 0.25s, color 0.25s, border-color 0.25s; }
.stepper__tabs button[aria-selected="true"] { color: var(--ink); }
.stepper__tabs button[aria-selected="true"] b { background: var(--coral); border-color: var(--coral); color: #fff; }
.stepper__ink { position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 11px; background: var(--panel); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); transition: transform 0.35s cubic-bezier(0.3, 0.9, 0.3, 1), width 0.35s; }
@media (max-width: 640px) {
  .stepper__tabs button { flex-direction: column; gap: 4px; padding: 10px 2px; font-size: 12px; }
}
.panel { display: grid; gap: 28px; padding: 28px 18px 18px; align-items: center; animation: pop 0.35s ease; }
@media (min-width: 900px) { .panel { grid-template-columns: 0.9fr 1.1fr; padding: 40px 32px 30px; gap: 44px; } }
.panel h3 { font: 400 clamp(26px, 3.6vw, 34px)/1.15 var(--head); }
.panel p { margin-top: 14px; color: var(--ink-soft); }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; font-size: 15px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; color: var(--teal); background: color-mix(in srgb, var(--teal) 14%, transparent); }
.panel__img { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--paper); }
.panel__img--plan, .panel__img--quiz { padding: 28px; min-height: 280px; display: grid; place-items: center; background-color: var(--paper); background-image: linear-gradient(var(--paper-line) 1px, transparent 1px), linear-gradient(90deg, var(--paper-line) 1px, transparent 1px); background-size: 32px 32px; }
.keypoints { width: min(100%, 360px); }
.keypoints__h { font-size: 12px !important; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint) !important; text-align: right; margin: 0 0 10px !important; }
.keypoints ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.keypoints li { display: flex; justify-content: flex-end; align-items: center; gap: 12px; font-size: 16px; color: var(--ink-faint); }
.keypoints li::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.keypoints li.done { color: var(--ink-soft); }
.keypoints li.done::after { background: var(--teal); border-color: var(--teal); }
.keypoints li.now { color: var(--ink); font-weight: 600; }
.keypoints li.now::after { background: var(--coral); border-color: var(--coral); animation: ping 1.8s infinite; }
.quiz { width: min(100%, 460px); font-family: var(--hand); }
.quiz__q { font-size: 23px !important; line-height: 1.3; color: var(--ink) !important; margin: 0 !important; }
.quiz__opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.quiz__opts button { font: 500 14px var(--ui); background: var(--panel); border: 1.5px solid var(--line); padding: 9px 16px; border-radius: 99px; cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.15s; }
.quiz__opts button:hover { border-color: var(--ink-faint); transform: translateY(-1px); }
.quiz__opts button.right { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 14%, var(--panel)); }
.quiz__opts button.wrong { border-color: var(--coral); animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.quiz__fb { font: 400 19px/1.3 var(--hand) !important; color: var(--ink-faint) !important; margin-top: 16px !important; min-height: 2.6em; }

/* ---------- feature cards ---------- */
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 680px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--c); transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card:hover::before, .card.is-open::before { transform: scaleX(1); }
.card.is-open { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); box-shadow: var(--shadow); }
.card__head { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "icon title plus" "sum sum sum"; gap: 6px 12px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 20px; cursor: pointer; }
.card__icon { grid-area: icon; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; font-size: 19px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.card__title { grid-area: title; font-weight: 650; font-size: 16.5px; }
.card__sum { grid-area: sum; color: var(--ink-soft); font-size: 14.5px; margin-top: 6px; }
.card__plus { grid-area: plus; position: relative; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); transition: transform 0.3s, background 0.3s; }
.card__plus::before, .card__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.8px; background: currentColor; transform: translate(-50%, -50%); }
.card__plus::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform 0.3s; }
.card.is-open .card__plus { transform: rotate(180deg); background: var(--c); color: #fff; border-color: var(--c); }
.card.is-open .card__plus::after { transform: translate(-50%, -50%) rotate(0); }
.card__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s cubic-bezier(0.3, 0.9, 0.3, 1); }
.card.is-open .card__body { grid-template-rows: 1fr; }
.card__body > div { overflow: hidden; padding: 0 20px; }
.card.is-open .card__body > div { padding-bottom: 20px; }
.card__body img { border-radius: 10px; border: 1px solid var(--line); background: var(--paper); }
.card__body p { margin-top: 14px; font-size: 14.5px; color: var(--ink-soft); }
.wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 88px; border-radius: 10px; background: var(--paper-2); border: 1px solid var(--line); }
.wave i { width: 4px; border-radius: 4px; background: var(--teal); height: 20%; animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(3n) { animation-delay: -0.3s; } .wave i:nth-child(3n+1) { animation-delay: -0.6s; } .wave i:nth-child(4n) { animation-delay: -0.85s; background: var(--coral); }
@keyframes wave { 50% { height: 72%; } }
.folder { display: grid; gap: 6px; }
.folder__row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; background: var(--paper-2); }
.folder__row em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--ink-faint); }

/* ---------- tour ---------- */
.tour { max-width: 1040px; margin: 0 auto; }
.tour__tabs { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.tour__tabs button { border: 1px solid var(--line); background: var(--panel); padding: 8px 16px; border-radius: 99px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.tour__tabs button:hover { border-color: var(--ink-faint); }
.tour__tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tour__stage { position: relative; display: flex; align-items: center; gap: 12px; }
.tour__fig { margin: 0; flex: 1; min-width: 0; }
.tour__open { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; cursor: zoom-in; background: var(--paper); box-shadow: var(--shadow-lg); aspect-ratio: 16 / 10; }
.tour__open img { width: 100%; height: 100%; object-fit: contain; transition: opacity 0.25s ease, transform 0.4s ease; }
.tour__open:hover img { transform: scale(1.012); }
.tour__open img.is-fading { opacity: 0; }
.tour__open.is-phone img { object-fit: contain; padding: 14px 0; background: var(--paper-2); }
.tour__fig figcaption { text-align: center; color: var(--ink-soft); font-size: 15px; margin-top: 16px; min-height: 3em; }
.tour__nav { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); transition: transform 0.2s; display: grid; place-items: center; padding-bottom: 3px; }
.tour__nav:hover { transform: scale(1.08); }
@media (max-width: 720px) {
  .tour__nav { position: absolute; top: calc(50% - 40px); z-index: 2; width: 38px; height: 38px; font-size: 22px; }
  .tour__nav--prev { left: -6px; } .tour__nav--next { right: -6px; }
}
.tour__dots { display: flex; justify-content: center; gap: 6px; }
.tour__dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--line); transition: width 0.3s, background 0.3s; }
.tour__dots i.on { width: 22px; background: var(--coral); }

.pan { margin-top: 64px; }
.pan__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.pan__head h3 { font: 400 28px/1.2 var(--head); }
.pan__ctrl { display: flex; align-items: center; gap: 6px; background: var(--panel); padding: 5px; border-radius: 12px; border: 1px solid var(--line); }
.pan__ctrl .icon-btn { width: 34px; height: 34px; border: 0; font-size: 18px; }
.pan__ctrl span { min-width: 48px; text-align: center; }
.pan__view { position: relative; height: clamp(280px, 48vw, 460px); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #f6f7f4; cursor: grab; touch-action: none; box-shadow: var(--shadow); }
.pan__view.is-drag { cursor: grabbing; }
.pan__view img { position: absolute; top: 0; left: 0; max-width: none; width: auto; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; }
.pan__hint { position: absolute; right: 14px; bottom: 14px; font: 500 13px var(--ui); background: #1f2a37; color: #fff; padding: 6px 12px; border-radius: 99px; pointer-events: none; transition: opacity 0.4s; }
.pan__hint.gone { opacity: 0; }

/* ---------- builder ---------- */
.builder { display: grid; gap: 22px; }
@media (min-width: 960px) { .builder { grid-template-columns: 1.05fr 0.95fr; align-items: start; } }
.builder__opts { display: grid; gap: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 650; font-size: 14px; margin-bottom: 10px; padding: 0; }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 600; font-size: 15px; transition: border-color 0.2s, background 0.2s, box-shadow 0.2s; }
.seg small { font-weight: 400; font-size: 12.5px; color: var(--ink-faint); }
.seg label:hover span { border-color: var(--ink-faint); }
.seg input:checked + span { border-color: var(--coral); background: color-mix(in srgb, var(--coral) 8%, var(--panel)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--coral) 14%, transparent); }
.seg input:focus-visible + span { outline: 2.5px solid var(--teal); outline-offset: 2px; }
.builder__out { display: grid; gap: 14px; min-width: 0; }
@media (min-width: 960px) { .builder__out { position: sticky; top: 88px; } }
.envcard { background: var(--code-bg); color: var(--code-ink); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.envcard__bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); color: #8b98a6; }
.envcard pre { margin: 0; padding: 16px 18px; overflow-x: auto; font: 13px/1.75 var(--mono); }
.envcard code { background: none; border: 0; padding: 0; font-size: inherit; }
.envcard .c { color: #6c7a89; }
.envcard .k { color: #9fd8ff; }
.envcard .v { color: #b5e48c; }
.envcard .flash { animation: flash 0.8s ease; border-radius: 4px; }
@keyframes flash { from { background: rgba(255, 143, 107, 0.3); } }
.copy { font: 600 12.5px var(--ui); background: rgba(255, 255, 255, 0.08); color: inherit; border: 1px solid rgba(255, 255, 255, 0.14); padding: 5px 12px; border-radius: 8px; cursor: pointer; transition: background 0.2s; flex: none; }
.copy:hover { background: rgba(255, 255, 255, 0.16); }
.copy.ok { background: #0f9d8a; border-color: #0f9d8a; color: #fff; }
.outcome { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 14px; }
.outcome__cost { display: grid; gap: 2px; }
.outcome__cost strong { font: 700 38px/1.15 var(--ui); letter-spacing: -0.03em; color: var(--coral-ink); }
.outcome__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; }
.outcome__list li { display: flex; gap: 10px; align-items: baseline; }
.outcome__list li::before { content: "✓"; color: var(--teal); font-weight: 700; flex: none; }
.outcome__list li.off { color: var(--ink-faint); }
.outcome__list li.off::before { content: "–"; color: var(--ink-faint); }

.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; gap: 14px; }
@media (min-width: 960px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { display: flex; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; min-width: 0; }
.steps li > div { min-width: 0; flex: 1; }
.steps__n { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--ui); background: var(--ink); color: var(--paper); }
.steps h3 { font-size: 16.5px; font-weight: 650; margin-bottom: 8px; }
.steps p { font-size: 14.5px; color: var(--ink-soft); }
.steps p.small { margin-top: 8px; font-size: 13px; }
.cmd { display: flex; align-items: center; gap: 8px; background: var(--code-bg); color: var(--code-ink); border-radius: 10px; padding: 8px 8px 8px 12px; }
.cmd { align-items: flex-start; }
.cmd code { flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-word; background: none; border: 0; padding: 4px 0; font-size: 12.5px; line-height: 1.6; }

/* ---------- architecture ---------- */
.section--ink { background: #1b2430; color: #e8edf2; --line: rgba(220, 235, 245, 0.14); }
.section--ink .kicker { color: #ff8f6b; }
.section--ink code { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); }
.arch { display: grid; gap: 10px; align-items: stretch; }
@media (min-width: 960px) { .arch { grid-template-columns: 1fr 64px 1fr 64px 1fr; align-items: center; } }
.arch__box { border: 1.5px dashed rgba(220, 235, 245, 0.25); border-radius: 18px; padding: 24px; background: rgba(255, 255, 255, 0.03); transition: border-color 0.25s, transform 0.25s, background 0.25s; height: 100%; }
.arch__box:hover { border-color: #3cc7b2; border-style: solid; transform: translateY(-3px); background: rgba(60, 199, 178, 0.06); }
.arch__box h3 { font: 400 26px/1.2 var(--head); margin: 12px 0 8px; }
.arch__box p { color: #b3bdc8; font-size: 15px; }
.tag { display: inline-block; background: rgba(255, 143, 107, 0.15); color: #ff8f6b; padding: 3px 10px; border-radius: 6px; font-size: 12.5px; }
.arch__link { width: 64px; height: 40px; fill: none; stroke: #7d8a98; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; justify-self: center; }
@media (max-width: 959px) { .arch__link { transform: rotate(90deg); width: 48px; } }

/* ---------- faq ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; transition: border-color 0.2s, box-shadow 0.2s; }
.faq details[open] { border-color: color-mix(in srgb, var(--coral) 40%, var(--line)); box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 56px 18px 20px; font-weight: 600; font-size: 16px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; width: 28px; height: 28px; margin-top: -14px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-2); font-size: 18px; font-weight: 400; transition: transform 0.3s, background 0.3s, color 0.3s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--coral); color: #fff; }
.faq details > div { padding: 0 20px 20px; color: var(--ink-soft); overflow: hidden; }

/* ---------- cta + footer ---------- */
.cta { padding: 100px 0; border-top: 1px solid var(--line); }
.cta__inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta h2 { font: 400 clamp(32px, 6vw, 56px)/1.12 var(--head); }
.cta p { margin-top: 14px; font-size: 18px; color: var(--ink-soft); }
.cta .hero__ctas { justify-content: center; }
.hl { background: linear-gradient(var(--marker), var(--marker)) no-repeat 0 65% / 100% 70%; padding: 0 4px; }
.is-in .hl { animation: marker-in 0.8s 0.4s ease both; }
@keyframes marker-in { from { background-size: 0% 70%; } }
.foot { border-top: 1px solid var(--line); padding: 28px 0; }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.foot a { color: var(--ink-soft); text-decoration: none; }
.foot a:hover { color: var(--coral-ink); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 14, 18, 0.88); backdrop-filter: blur(6px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 16px 24px; gap: 14px; animation: fadein 0.2s ease; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100% - 50px); width: auto; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); animation: pop 0.25s ease; }
.lightbox p { color: #d0d8e0; font-size: 14.5px; text-align: center; max-width: 720px; }
.lightbox__close { position: absolute; top: 14px; right: 14px; color: #fff; border-color: rgba(255, 255, 255, 0.25); }

/* ---------- reveal ---------- */
.reveal.is-in { animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: var(--d, 0ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
  .strip__track { animation: none; }
}
@media (max-width: 999px) { .demo__board { order: -1; } }
@media (max-width: 640px) {
  .mini { padding-bottom: 104px; }
  .mini__cols { padding-bottom: 8px; }
  .mini__ask { position: static; transform: none; width: auto; margin: 4px 16px 0; }
}
