/* ==========================================================================
   InteFlow — project website
   A static, dependency-free landing page. No build step, no external fonts.
   Sections: tokens · base · header · hero · rules · workflow · features ·
             numbers · themes · architecture · faq · cta · footer
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */

:root {
  --paper: #f4f1e8;
  --paper-2: #ece8dc;
  --paper-3: #e4dfd1;
  --surface: #fbf9f2;
  --ink: #14150f;
  --ink-2: #3c3d33;
  --muted: #6d6e60;
  --faint: #747667;
  --line: #d7d2c3;
  --line-strong: #b9b3a2;

  --accent: #e8431f;
  --accent-dark: #c93514;
  --accent-soft: #f6d8cd;
  --blue: #2446c8;

  --dark: #121410;
  --dark-2: #1a1c16;
  --dark-line: #32352a;
  --dark-text: #ecebdf;
  --dark-muted: #a6a998;
  --ok: #9ad46b;

  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
    "Songti SC", "Noto Serif CJK SC", "Times New Roman", serif;
  --font-mono: "SFMono-Regular", ui-monospace, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --wrap: 1240px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* -------------------------------------------------------------------- base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #fff8f1;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
p,
ul,
ol,
blockquote {
  margin: 0;
}

code {
  padding: 0.12em 0.34em;
  border-radius: 2px;
  background: rgba(20, 21, 15, 0.06);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

.mono {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms var(--ease);
}

.skip-link:focus {
  transform: none;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  height: 2px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 80ms linear;
}

/* Progressive-enhancement reveal: no JS = everything visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(244, 241, 232, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line-strong);
  background: rgba(244, 241, 232, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-text small {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  color: var(--ink-2);
  font-size: 12.5px;
  text-decoration: none;
  transition: color 160ms var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 180ms var(--ease);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--ink);
}

.site-nav .nav-github {
  display: none;
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.ghost-link {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 160ms var(--ease);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 160ms var(--ease), border-color 160ms var(--ease),
    background-color 160ms var(--ease);
}

.lang-switch:hover {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--surface);
}

.ghost-link:hover {
  color: var(--accent);
}

.menu-btn {
  display: none;
  place-items: center;
  width: 38px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 15px;
  height: 1px;
  margin: 2.5px auto;
  background: var(--ink);
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}

.site-header.is-open .menu-btn span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.site-header.is-open .menu-btn span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 20px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms var(--ease), color 160ms var(--ease),
    border-color 160ms var(--ease), transform 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.btn-ink {
  background: var(--ink);
  color: var(--paper);
}

.btn-ink:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff8f1;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--accent);
}

/* Primary desktop-download action: deliberately louder than every other CTA. */
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff8f1;
}

.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff8f1;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.download-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.download-note a {
  color: var(--accent-dark);
  text-underline-offset: 3px;
}

/* Compact platform shortcut row in the hero. Falls back to the platform
   section, then upgrades to a direct release asset when downloads.js runs. */
.hero-platforms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.hero-platforms-label {
  margin-right: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: rgba(251, 249, 242, 0.55);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}

.platform-pill:hover {
  border-color: var(--ink);
  background: var(--surface);
}

.platform-pill[data-download-ready="true"] {
  border-color: var(--accent);
}

.platform-pill[data-size]::after {
  content: " · " attr(data-size);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.platform-pill-os {
  font-weight: 600;
}

.btn-small {
  padding: 9px 14px;
  font-size: 11.5px;
}

.copy-btn {
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 160ms var(--ease), border-color 160ms var(--ease),
    background 160ms var(--ease);
}

.copy-btn:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.copy-btn.is-copied {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: 66px 0 82px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 0 50%;
  pointer-events: none;
  background-image: linear-gradient(
    to right,
    rgba(20, 21, 15, 0.055) 1px,
    transparent 1px
  );
  background-size: calc(100% / 9) 100%;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 78%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 78%, transparent);
}

.hero::after {
  content: "";
  position: absolute;
  top: 40px;
  left: -90px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(232, 67, 31, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: 62px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.live-dot {
  position: relative;
  display: inline-block;
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: ping 2.8s var(--ease) infinite;
}

@keyframes ping {
  0%,
  35% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    opacity: 0.55;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.hero h1 {
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: clamp(52px, 7.1vw, 100px);
  font-weight: 500;
  line-height: 0.99;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
  box-shadow: inset 0 -0.08em 0 rgba(232, 67, 31, 0.2);
}

.hero-lede {
  max-width: 33em;
  margin-top: 24px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-command {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  margin-top: 26px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  background: rgba(251, 249, 242, 0.6);
}

.hero-command code {
  background: none;
  padding: 0;
  font-size: 11px;
  color: var(--ink);
}

.prompt {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  user-select: none;
}

.command-note {
  padding-left: 9px;
  border-left: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
  padding: 18px 0 0;
  border-top: 1px solid var(--ink);
  list-style: none;
}

.hero-facts strong {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero-facts span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------- flowboard */

.hero-visual {
  position: relative;
}

.flowboard {
  position: relative;
  border: 1px solid var(--dark);
  background: var(--dark);
  color: var(--dark-text);
  box-shadow: 16px 16px 0 var(--paper-3);
}

.flowboard-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--dark-line);
  background: #171913;
}

.traffic {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.traffic i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b3f32;
}

.traffic-light i:nth-child(1) {
  background: #ff5f57;
}

.traffic-light i:nth-child(2) {
  background: #febc2e;
}

.traffic-light i:nth-child(3) {
  background: #28c840;
}

.flowboard-path {
  color: #8e927e;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
}

.flowboard-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--ok);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.flowboard-live .live-dot {
  width: 5px;
  height: 5px;
  background: var(--ok);
}

.flowboard-live .live-dot::after {
  border-color: var(--ok);
}

.flowboard-body {
  padding: 20px;
}

.flowboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #8e927e;
}

.micro-badge {
  display: inline-block;
  padding: 4px 7px;
  border: 1px solid currentColor;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.micro-badge-light {
  color: var(--dark-muted);
}

.flow-steps {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.flow-steps li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 0;
  border-top: 1px solid var(--dark-line);
}

.flow-steps li:last-child {
  border-bottom: 1px solid var(--dark-line);
}

.flow-steps .is-focus {
  margin: 0 -10px;
  padding-inline: 10px;
  background: linear-gradient(90deg, rgba(232, 67, 31, 0.14), transparent 72%);
  box-shadow: inset 2px 0 0 var(--accent);
}

.flow-no {
  color: #6f7460;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.flow-text strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.flow-text span {
  display: block;
  margin-top: 3px;
  color: #969a87;
  font-size: 10.5px;
  line-height: 1.45;
}

.flow-chip {
  padding: 3px 6px;
  border: 1px solid #35392c;
  color: #8b8f7c;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.flow-steps .is-focus .flow-chip {
  border-color: rgba(232, 67, 31, 0.55);
  color: #ff9a7f;
}

.flowboard-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 14px;
  color: #7d816f;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.04em;
}

.flowboard-foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tiny-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-stamp {
  position: absolute;
  right: -26px;
  bottom: -30px;
  display: flex;
  width: 88px;
  height: 88px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--paper);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  line-height: 1.15;
  transform: rotate(-9deg);
  box-shadow: 0 0 0 4px var(--paper);
}

.hero-stamp small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 6.5px;
  letter-spacing: 0.08em;
}

/* ----------------------------------------------------------------- sections */

.section {
  position: relative;
  padding: 96px 0;
}

.section-alt {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 780px;
  margin-bottom: 44px;
}

.section-index {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.section-head h2,
.faq-intro h2 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-lede {
  max-width: 62ch;
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.8;
}

/* ------------------------------------------------------------------- rules */

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.rule-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px;
  border: 1px solid var(--ink);
}

.rule-dark {
  background: var(--dark);
  color: var(--dark-text);
  box-shadow: 9px 9px 0 var(--accent);
}

.rule-paper {
  background: var(--surface);
  box-shadow: 9px 9px 0 var(--ink);
}

.rule-dark code {
  background: #262a1f;
  color: #dfe2d1;
}

.rule-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
}

.rule-dark .mono {
  color: var(--dark-muted);
}

.rule-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(27px, 2.8vw, 36px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.rule-card > p {
  max-width: 48ch;
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.8;
}

.rule-dark > p {
  color: #b7baa9;
}

.stamp {
  padding: 4px 8px;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  transform: rotate(-2deg);
}

.check-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 10px 0 10px 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.55;
}

.rule-dark .check-list li {
  border-top-color: #2f3227;
  color: #c9ccbb;
}

.check-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
}

.rule-foot {
  margin-top: auto !important;
  padding-top: 20px;
  color: var(--muted) !important;
  font-family: var(--font-mono);
  font-size: 8.5px !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rule-dark .rule-foot {
  color: #888c79 !important;
}

.pull-quote {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px 32px;
  margin-top: 58px;
  padding-top: 26px;
  border-top: 1px solid var(--ink);
}

.pull-quote p {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.8vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.pull-quote cite {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-style: normal;
  letter-spacing: 0.06em;
}

/* ---------------------------------------------------------------- workflow */

.steps {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 220px;
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line-strong);
  transition: background 180ms var(--ease);
}

.step:hover {
  background: rgba(251, 249, 242, 0.5);
}

.step-marker {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
}

.step-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.step-title h3 {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.chip {
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chip-accent {
  border-color: var(--accent);
  color: var(--accent);
}

.step-body p {
  max-width: 68ch;
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.85;
}

.step-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.step-tags li {
  padding: 4px 7px;
  border: 1px solid var(--line-strong);
  background: rgba(251, 249, 242, 0.6);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.step-side {
  padding-left: 20px;
  border-left: 1px solid var(--line-strong);
}

.step-side .mono {
  color: var(--accent);
  font-size: 8px;
}

.step-side p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

/* ---------------------------------------------------------------- features */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ink);
}

.filter {
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 150ms var(--ease), color 150ms var(--ease),
    border-color 150ms var(--ease);
}

.filter span {
  margin-left: 4px;
  color: var(--faint);
}

.filter:hover {
  border-color: var(--ink);
}

.filter.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.filter.is-active span {
  color: #a8ab9a;
}

.filter-count {
  margin-left: auto;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  transition: border-color 170ms var(--ease), transform 170ms var(--ease),
    box-shadow 170ms var(--ease);
}

.feature-card:hover {
  border-color: var(--ink);
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--ink);
}

.feature-card.is-hidden {
  display: none;
}

.feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.feature-no {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.feature-cat {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.13em;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.feature-card p {
  margin-top: 9px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.75;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: auto 0 0;
  padding: 18px 0 0;
  list-style: none;
}

.feature-tags li {
  padding: 3px 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.03em;
}

/* ----------------------------------------------------------------- numbers */

.numbers {
  background: var(--ink);
  color: var(--paper);
  padding: 42px 0;
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.number-item {
  padding: 2px 22px;
  border-left: 1px solid #34362c;
}

.number-item:first-child {
  padding-left: 0;
  border-left: 0;
}

.number-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(25px, 2.6vw, 34px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

.number-item span {
  display: block;
  margin-top: 8px;
  color: #969a87;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ themes */

.themes-section {
  background: var(--dark);
  color: var(--dark-text);
  padding: 96px 0;
  background-image: radial-gradient(
    760px 420px at 88% -4%,
    rgba(232, 67, 31, 0.14),
    transparent 70%
  );
}

.section-head-dark h2 {
  color: var(--dark-text);
}

.section-head-dark .section-lede {
  color: var(--dark-muted);
}

.themes-section code,
.cta-panel code,
.code-panel code,
.site-footer code {
  background: #262a1f;
  color: #dfe2d1;
}

.theme-lab {
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  margin-top: 38px;
}

.theme-side {
  min-width: 0;
}

.theme-picker {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.theme-aside {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--dark-line);
}

.theme-aside .mono {
  color: #7f8470;
  font-size: 8px;
}

.theme-aside > p:nth-child(2) {
  margin-top: 8px;
  color: #a9ad9c;
  font-size: 10.5px;
  line-height: 1.7;
}

.theme-aside dl {
  margin: 14px 0 0;
}

.theme-aside dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid #2b2e23;
}

.theme-aside dt {
  color: #7f8470;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
}

.theme-aside dd {
  margin: 0;
  color: #cfd3bf;
  font-family: var(--font-mono);
  font-size: 8px;
}

.theme-choice {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 13px;
  border: 1px solid var(--dark-line);
  background: transparent;
  color: var(--dark-text);
  text-align: left;
  cursor: pointer;
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}

.theme-choice:hover {
  border-color: #5a5e4b;
  background: rgba(255, 255, 255, 0.03);
}

.theme-choice.is-active {
  border-color: var(--accent);
  background: rgba(232, 67, 31, 0.09);
}

.theme-dots {
  display: grid;
  grid-template-columns: repeat(2, 10px);
  gap: 3px;
}

.theme-dots i {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--c);
}

.theme-choice-text strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.theme-choice-text small {
  display: block;
  margin-top: 3px;
  color: #929684;
  font-size: 9.5px;
  line-height: 1.5;
}

.theme-choice-arrow {
  color: #6d7161;
  font-size: 12px;
  opacity: 0.5;
  transition: opacity 160ms var(--ease), color 160ms var(--ease);
}

.theme-choice.is-active .theme-choice-arrow {
  color: var(--accent);
  opacity: 1;
}

.theme-stage {
  min-width: 0;
}

.browser {
  border: 1px solid #3a3d30;
  background: #0d0f0b;
  box-shadow: 0 32px 70px -36px #000;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid #2c2f23;
  background: #171912;
}

.browser-address {
  color: #8b907c;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-address span {
  color: #5f6452;
}

.browser-open {
  margin-left: auto;
  padding-bottom: 1px;
  border-bottom: 1px solid #474b3a;
  color: #cfd3bf;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}

.browser-open:hover {
  border-color: var(--accent);
  color: #ff9a7f;
}

.browser-screen {
  position: relative;
  aspect-ratio: 1320 / 860;
  overflow: hidden;
  background: #f2f5f9;
}

.browser-screen iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1320px;
  height: 860px;
  border: 0;
  background: #fff;
  transform-origin: top left;
  pointer-events: none;
}

.browser-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #0f1110;
  color: #858a75;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  transition: opacity 240ms var(--ease);
}

.browser-loading.is-ready {
  opacity: 0;
  pointer-events: none;
}

.theme-caption {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--dark-line);
}

.theme-caption .mono {
  color: #7f8470;
  font-size: 8px;
}

.theme-caption h3 {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.theme-caption-text > p:last-child {
  max-width: 58ch;
  margin-top: 6px;
  color: #a9ad9c;
  font-size: 11.5px;
  line-height: 1.7;
}

.theme-palette {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.swatch i {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.swatch span {
  color: #7f8470;
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.02em;
}

.theme-footnote {
  max-width: 74ch;
  margin-top: 28px;
  color: #8f9382;
  font-size: 10.5px;
  line-height: 1.8;
}

.theme-footnote a {
  color: #cfd3bf;
  text-decoration: underline;
  text-decoration-color: #5a5e4b;
  text-underline-offset: 3px;
}

.theme-footnote a:hover {
  color: #ff9a7f;
  text-decoration-color: var(--accent);
}

/* ------------------------------------------------------------ architecture */

.arch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 32px;
  align-items: start;
}

.code-panel {
  border: 1px solid #2c2f24;
  background: #141610;
  color: #d8dbca;
  box-shadow: 10px 10px 0 var(--paper-3);
  overflow: hidden;
}

.code-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid #2c2f24;
  background: #171913;
  overflow-x: auto;
  scrollbar-width: none;
}

.code-tabs::-webkit-scrollbar {
  display: none;
}

.code-tab {
  padding: 12px 11px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #8c917c;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}

.code-tab:hover {
  color: #d3d6c4;
}

.code-tab.is-active {
  border-bottom-color: var(--accent);
  color: #f1f3e7;
}

.code-copy {
  margin: 0 10px 0 auto;
  border-color: #3b3f2e;
  color: #a8ad98;
}

.code-copy:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff8f1;
}

.code-body {
  min-height: 356px;
}

.code-pane {
  display: none;
  margin: 0;
  padding: 22px 20px;
  overflow-x: auto;
  color: #cfd3c2;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.8;
  tab-size: 2;
}

.code-pane.is-active {
  display: block;
}

.code-pane code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.code-pane .c {
  color: #6e7360;
}

.code-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 15px;
  border-top: 1px solid #2c2f24;
  color: #6f7460;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
}

.arch-side {
  min-width: 0;
}

.arch-diagram {
  padding: 20px;
  border: 1px solid var(--ink);
  background: var(--surface);
}

.arch-node {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
}

.arch-kicker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.14em;
}

.arch-node strong {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.arch-node small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.02em;
}

.arch-node-strong {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.arch-node-strong small {
  color: #a8ab9a;
}

.arch-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 0;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
}

.arch-link i {
  font-style: normal;
  font-size: 15px;
  line-height: 1;
}

.arch-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.arch-node-small {
  padding: 10px;
  gap: 2px;
}

.arch-node-small strong {
  font-size: 11px;
}

.arch-node-small small {
  font-size: 7.5px;
}

.arch-node-dashed {
  border-style: dashed;
  background: transparent;
}

.arch-node-dashed small {
  color: var(--accent);
}

.stack-list {
  margin: 24px 0 0;
  padding: 0;
  border-top: 1px solid var(--ink);
  list-style: none;
}

.stack-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.stack-list span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stack-list strong {
  font-size: 10.5px;
  font-weight: 500;
  text-align: right;
}

/* --------------------------------------------------------------------- faq */

.faq-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.faq-intro {
  position: sticky;
  top: 112px;
}

.faq-intro h2 {
  margin-top: 14px;
  font-size: clamp(34px, 4vw, 50px);
}

.faq-intro > p {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.8;
}

.faq-intro .btn {
  margin-top: 24px;
}

.faq-list {
  border-top: 1px solid var(--ink);
}

.faq-item {
  border-bottom: 1px solid var(--line-strong);
}

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 19px 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--accent);
}

.faq-no {
  width: 22px;
  flex-shrink: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.faq-item summary i {
  position: relative;
  width: 14px;
  height: 14px;
  margin-left: auto;
  flex-shrink: 0;
}

.faq-item summary i::before,
.faq-item summary i::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--ink);
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}

.faq-item summary i::before {
  width: 14px;
  height: 1px;
  transform: translate(-50%, -50%);
}

.faq-item summary i::after {
  width: 1px;
  height: 14px;
  transform: translate(-50%, -50%);
}

.faq-item[open] summary i::after {
  transform: translate(-50%, -50%) scaleY(0);
  opacity: 0;
}

.faq-answer {
  padding: 0 0 22px 36px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.85;
}

.faq-answer p {
  margin: 0;
  max-width: 66ch;
}

.faq-item[open] .faq-answer {
  animation: fade-in 220ms var(--ease);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------- cta */

.cta-section {
  position: relative;
  padding: 88px 0;
  background: #d23b19;
  color: #fff8ef;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
      to right,
      rgba(255, 248, 239, 0.09) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(255, 248, 239, 0.09) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(70% 90% at 20% 20%, #000, transparent);
  -webkit-mask-image: radial-gradient(70% 90% at 20% 20%, #000, transparent);
}

.cta-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}

.cta-copy .eyebrow {
  color: rgba(255, 248, 239, 0.9);
}

.cta-copy .live-dot {
  background: #1c0e08;
}

.cta-copy .live-dot::after {
  border-color: #1c0e08;
}

.cta-copy h2 {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: clamp(40px, 5.3vw, 68px);
  font-weight: 500;
  line-height: 1.01;
  letter-spacing: -0.045em;
}

.cta-copy > p {
  max-width: 38em;
  margin-top: 18px;
  color: rgba(255, 248, 239, 0.84);
  font-size: 13.5px;
  line-height: 1.8;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.cta-section .btn-ink {
  border-color: #1c0e08;
  background: #1c0e08;
  color: #fff8ef;
}

.cta-section .btn-ink:hover {
  border-color: #fff8ef;
  background: #fff8ef;
  color: var(--accent-dark);
  box-shadow: 4px 4px 0 #1c0e08;
}

.cta-section .btn-outline {
  border-color: rgba(255, 248, 239, 0.55);
  color: #fff8ef;
}

.cta-section .btn-outline:hover {
  border-color: #fff8ef;
  background: #fff8ef;
  color: var(--accent-dark);
  box-shadow: 4px 4px 0 #1c0e08;
}

.cta-panel {
  padding: 24px;
  border: 1px solid #1c120c;
  background: #17130f;
  color: var(--paper);
  box-shadow: 11px 11px 0 rgba(28, 14, 8, 0.24);
}

.cta-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #8f9382;
}

.command-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #34362b;
  background: #1d2018;
}

.command-row code {
  flex: 1;
  min-width: 0;
  padding: 0;
  background: none;
  color: #d9dccb;
  font-size: 9.5px;
  line-height: 1.6;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.command-row .copy-btn {
  border-color: #3d4033;
  color: #b6b9a8;
}

.command-row .copy-btn:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff8f1;
}

.cta-note {
  margin-top: 14px;
  color: #999d8c;
  font-size: 10px;
  line-height: 1.75;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  padding: 58px 0 26px;
  background: #10120d;
  color: #cfd2c2;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.footer-brand .brand-text strong {
  color: var(--dark-text);
}

.footer-brand .brand-text small {
  color: #8d9180;
}

.footer-brand > p {
  max-width: 34ch;
  margin-top: 14px;
  color: #9fa392;
  font-size: 12px;
  line-height: 1.75;
}

.footer-brand .mono {
  margin-top: 16px;
  color: #747965;
  font-size: 8px;
}

.footer-col h3 {
  margin: 0 0 12px;
  color: #7f8470;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  color: #c9ccbb;
  font-size: 11.5px;
  text-decoration: none;
  transition: color 150ms var(--ease);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid #2b2e22;
}

.footer-bottom p {
  color: #747965;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  line-height: 1.7;
}

/* -------------------------------------------------------------------- demo */

.demo-section {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.demo-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.demo-copy {
  position: sticky;
  top: 104px;
}

.demo-copy h2 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(32px, 3vw, 44px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.demo-copy .section-lede {
  margin-top: 16px;
  font-size: 13.5px;
}

.demo-try-label {
  margin-top: 24px;
  color: var(--muted);
}

.demo-try {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.demo-try li {
  padding: 4px 7px;
  border: 1px solid var(--line-strong);
  background: rgba(251, 249, 242, 0.6);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.demo-disclaimer {
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
}

.demo-disclaimer > .mono {
  color: var(--accent);
  font-size: 8px;
}

.demo-disclaimer h3 {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.demo-disclaimer ul {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.demo-disclaimer li {
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.demo-disclaimer strong {
  display: block;
  font-size: 11.5px;
  line-height: 1.4;
}

.demo-disclaimer span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.demo-copy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* ---- app window ---------------------------------------------------------- */

.demo-shell {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #fff;
  box-shadow: 10px 10px 0 var(--paper-3);
}

.demo-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid #0f172a;
  background: #1e293b;
  color: #e2e8f0;
}

.demo-chrome-path {
  min-width: 0;
  overflow: hidden;
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-chrome-path span {
  color: #64748b;
}

.demo-chrome-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: #6ee7b7;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.demo-chrome-badge .live-dot {
  width: 5px;
  height: 5px;
  background: #6ee7b7;
}

.demo-chrome-badge .live-dot::after {
  border-color: #6ee7b7;
}

.demo-body {
  min-height: 540px;
  background: #f1f5f9;
  color: #0f172a;
}

.demo-noscript {
  padding: 20px;
  color: #64748b;
  font-size: 12px;
}

.demo-toast {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 6;
  max-width: min(90%, 470px);
  padding: 7px 11px;
  border-radius: 7px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 10.5px;
  line-height: 1.5;
  text-align: center;
  transform: translateX(-50%);
  box-shadow: 0 10px 24px -12px rgba(15, 23, 42, 0.6);
}

.demo-toast[hidden] {
  display: none;
}

/* ---- app shell ----------------------------------------------------------- */

.demo-app {
  display: flex;
  flex-direction: column;
  min-height: 540px;
  background: #f1f5f9;
}

.demo-appbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 9px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.demo-title {
  min-width: 0;
}

.demo-title strong {
  display: block;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-title small {
  display: block;
  color: #64748b;
  font-size: 10.5px;
  line-height: 1.4;
}

.demo-pos {
  color: #475569;
  font-size: 11.5px;
  white-space: nowrap;
}

.demo-appbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.demo-clock {
  padding: 4px 9px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.demo-btn {
  padding: 5px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms var(--ease), border-color 150ms var(--ease),
    color 150ms var(--ease);
}

.demo-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

.demo-btn-primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.demo-btn-primary:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #fff;
}

.demo-main {
  flex: 1;
  padding: 16px;
}

.demo-main--center {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* ---- practice ------------------------------------------------------------ */

.demo-practice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: 12px;
  max-width: 1040px;
  margin: 0 auto;
  align-items: start;
}

.demo-practice-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 680px;
}

.demo-passage,
.demo-qcard {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.demo-kicker {
  color: #64748b;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.demo-passage p {
  margin-top: 7px;
  font-size: 13.5px;
  line-height: 1.75;
}

.demo-qhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.demo-qhead > span {
  color: #64748b;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.demo-star {
  padding: 3px 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #64748b;
  font-size: 10px;
  white-space: nowrap;
  cursor: pointer;
}

.demo-star:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.demo-star[aria-pressed="true"] {
  background: #fef3c7;
  color: #92400e;
}

.demo-stem {
  margin-top: 9px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.6;
}

.demo-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.demo-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms var(--ease), background 150ms var(--ease),
    box-shadow 150ms var(--ease);
}

.demo-option:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.demo-option.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #2563eb;
}

.demo-key {
  display: inline-flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #94a3b8;
  border-radius: 50%;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
}

.demo-option.is-selected .demo-key {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.demo-option-text {
  padding-top: 4px;
}

.demo-blank-wrap {
  display: block;
  margin-top: 14px;
}

.demo-blank {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #0f172a;
  font-size: 13.5px;
}

.demo-blank:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.demo-blank-hint {
  margin-top: 5px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.5;
}

.demo-practice-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.demo-palette {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.demo-goto {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 150ms var(--ease), background 150ms var(--ease);
}

.demo-goto:hover {
  border-color: #94a3b8;
}

.demo-goto.is-answered {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.demo-goto.is-marked {
  border-color: #f59e0b;
  background: #fbbf24;
  color: #0f172a;
}

.demo-goto.is-correct {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
}

.demo-goto.is-wrong {
  border-color: #ef4444;
  background: #fef2f2;
  color: #b91c1c;
}

.demo-goto.is-current {
  box-shadow: 0 0 0 2px #0f172a;
}

/* ---- result -------------------------------------------------------------- */

.demo-summary {
  width: 100%;
  max-width: 650px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.demo-summary-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px;
}

.demo-big-score {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.demo-big-score strong {
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.demo-big-score span {
  color: #94a3b8;
  font-size: 18px;
}

.demo-summary-note {
  color: #475569;
  font-size: 11.5px;
  line-height: 1.5;
}

.demo-summary-note small {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 9px;
}

.demo-score-bar {
  height: 5px;
  margin-top: 14px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.demo-score-bar i {
  display: block;
  height: 100%;
  background: #2563eb;
}

.demo-summary-list {
  margin: 14px 0 0;
  padding: 0;
  border-top: 1px solid #e2e8f0;
  list-style: none;
}

.demo-summary-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
}

.demo-summary-row > span:first-child {
  width: 18px;
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 10px;
}

.demo-row-main {
  flex: 1;
  min-width: 0;
}

.demo-row-main strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
}

.demo-row-main small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #64748b;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-row-status {
  font-size: 12px;
  font-weight: 600;
}

.demo-row-status.is-correct {
  color: #059669;
}

.demo-row-status.is-wrong {
  color: #dc2626;
}

.demo-row-btn {
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-size: 10px;
  white-space: nowrap;
  cursor: pointer;
}

.demo-row-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

/* ---- review workspace ---------------------------------------------------- */

.demo-qnav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.demo-qnav .demo-goto {
  width: 26px;
  height: 26px;
  font-size: 10px;
}

.demo-score-inline {
  margin-left: auto;
  text-align: right;
}

.demo-score-inline strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.demo-score-inline span {
  color: #94a3b8;
  font-size: 11px;
}

.demo-score-inline small {
  display: block;
  color: #64748b;
  font-size: 9.5px;
}

.demo-appbar--review .demo-appbar-actions {
  margin-left: 0;
}

.demo-workspace {
  display: flex;
  flex: 1;
  min-height: 520px;
}

.demo-pane {
  display: flex;
  flex: 1 1 50%;
  flex-direction: column;
  min-width: 0;
  background: #fff;
}

.demo-pane + .demo-pane {
  border-left: 1px solid #cbd5e1;
}

.demo-pane-tools {
  display: flex;
  flex: none;
  gap: 2px;
  padding: 3px 5px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.demo-tool {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
}

.demo-tool:hover {
  background: #fff;
  color: #475569;
}

.demo-tool.is-active {
  background: #fff;
  color: #0f172a;
  outline: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.demo-tool svg {
  flex: none;
  width: 13px;
  height: 13px;
}

.demo-pane-body {
  flex: 1;
  overflow: auto;
  padding: 14px;
}

.demo-pane-passage {
  margin-top: 10px;
  padding: 9px 10px;
  border-left: 2px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  line-height: 1.7;
}

.demo-pane-question .demo-stem {
  font-size: 13.5px;
}

.demo-pane-question .demo-option {
  padding: 8px 10px;
  font-size: 12px;
}

.demo-pane-question .demo-key {
  flex-basis: 24px;
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.demo-option.is-static {
  cursor: default;
}

.demo-option.is-static:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.demo-option.is-correct {
  border-color: #10b981;
  background: #ecfdf5;
}

.demo-option.is-wrong {
  border-color: #ef4444;
  background: #fef2f2;
}

.demo-option.is-static.is-correct:hover {
  border-color: #10b981;
  background: #ecfdf5;
}

.demo-option.is-static.is-wrong:hover {
  border-color: #ef4444;
  background: #fef2f2;
}

.demo-option.is-correct .demo-key {
  border-color: #059669;
  background: #059669;
  color: #fff;
}

.demo-option.is-wrong .demo-key {
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
}

.demo-option-flag {
  margin-left: auto;
  padding-left: 6px;
  color: #64748b;
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.demo-option.is-correct .demo-option-flag {
  color: #047857;
}

.demo-option.is-wrong .demo-option-flag {
  color: #b91c1c;
}

.demo-verdict {
  display: inline-flex;
  margin-top: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
}

.demo-verdict.is-correct {
  background: #ecfdf5;
  color: #047857;
}

.demo-verdict.is-wrong {
  background: #fef2f2;
  color: #b91c1c;
}

.demo-compare {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.demo-compare > div + div {
  margin-top: 7px;
}

.demo-compare span {
  display: block;
  color: #64748b;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.demo-compare strong {
  display: block;
  margin-top: 2px;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
}

.demo-analysis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.demo-analysis-title {
  color: #64748b;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.demo-tabs {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 5px;
  background: #f1f5f9;
}

.demo-tab {
  padding: 2px 7px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #64748b;
  font-size: 9px;
  cursor: pointer;
}

.demo-tab.is-active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.demo-editor {
  display: block;
  width: 100%;
  min-height: 300px;
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.75;
  resize: vertical;
}

.demo-editor:focus {
  border-color: #2563eb;
  outline: 2px solid #bfdbfe;
  outline-offset: 1px;
}

.demo-editor-preview {
  margin-top: 8px;
  padding: 2px;
}

.demo-editor-preview p {
  margin-top: 8px;
  color: #334155;
  font-size: 12px;
  line-height: 1.75;
}

.demo-demo-note {
  margin-top: 10px;
  padding: 6px 9px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 9.5px;
  line-height: 1.55;
}

.demo-vocab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.demo-vocab-head .mono {
  color: #64748b;
  font-size: 8.5px;
}

.demo-vocab-head > span:last-child {
  color: #94a3b8;
  font-size: 8.5px;
}

.demo-vocab-note {
  margin-top: 7px;
  color: #64748b;
  font-size: 9.5px;
  line-height: 1.6;
}

.demo-vocab ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.demo-vocab li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.demo-vocab-word {
  flex: 1;
  min-width: 0;
}

.demo-vocab-word strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
}

.demo-vocab-word small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 9.5px;
  line-height: 1.5;
}

.demo-vocab-word em {
  margin-right: 3px;
  color: #2563eb;
  font-style: italic;
}

.demo-word-add {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.demo-word-add:hover {
  border-color: #94a3b8;
  color: #0f172a;
}

.demo-word-add.is-added {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
}

.demo-ai-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #eff6ff;
  color: #2563eb;
}

.demo-ai h4 {
  margin-top: 9px;
  font-size: 13px;
  font-weight: 600;
}

.demo-ai > p {
  margin-top: 5px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.6;
}

.demo-ai-btn {
  margin-top: 10px;
}

.demo-ai-response {
  margin-top: 10px;
  padding: 10px;
  border-left: 2px solid #2563eb;
  background: #f8fafc;
  color: #334155;
  font-size: 11.5px;
  line-height: 1.7;
}

.demo-ai-note {
  margin-top: 8px;
  color: #94a3b8;
  font-size: 9px;
  line-height: 1.5;
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  .hero-grid {
    gap: 42px;
  }

  .theme-lab {
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 22px;
  }

  .step {
    grid-template-columns: 56px minmax(0, 1fr) 190px;
    gap: 24px;
  }
}

@media (max-width: 1040px) {
  .site-nav {
    display: none;
  }

  .menu-btn {
    display: block;
  }

  .site-header.is-open .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 24px 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
    box-shadow: 0 22px 34px -26px rgba(20, 21, 15, 0.5);
  }

  .site-header.is-open .site-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
  }

  .site-header.is-open .site-nav a::after {
    display: none;
  }

  .site-header.is-open .site-nav .nav-github {
    display: block;
    color: var(--accent);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-visual {
    max-width: 720px;
  }

  .hero-stamp {
    right: 10px;
  }

  .hero::before {
    inset: 0;
  }

  .theme-lab {
    grid-template-columns: minmax(0, 1fr);
  }

  .theme-picker {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .theme-aside {
    display: none;
  }

  .theme-choice {
    min-width: 250px;
    flex-shrink: 0;
  }

  .theme-stage {
    margin-top: 8px;
  }
}

@media (max-width: 900px) {
  .section,
  .themes-section {
    padding: 76px 0;
  }

  .rules-grid,
  .arch-grid,
  .cta-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .rule-dark,
  .rule-paper {
    box-shadow: 7px 7px 0 var(--ink);
  }

  .rule-dark {
    box-shadow: 7px 7px 0 var(--accent);
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .numbers-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 0;
  }

  .number-item:nth-child(4) {
    padding-left: 0;
    border-left: 0;
  }

  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  .faq-intro {
    position: static;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .code-panel {
    box-shadow: 7px 7px 0 var(--paper-3);
  }
}

@media (max-width: 720px) {
  .wrap {
    width: calc(100% - 40px);
  }

  .header-inner {
    min-height: 66px;
    gap: 12px;
  }

  .ghost-link {
    display: none;
  }

  .hero {
    padding: 46px 0 66px;
  }

  .hero h1 {
    font-size: clamp(46px, 13vw, 74px);
  }

  .hero-lede {
    font-size: 13.5px;
  }

  .hero-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }

  .hero-facts strong {
    font-size: 24px;
  }

  .command-note {
    display: none;
  }

  .flowboard-body {
    padding: 15px;
  }

  .flow-steps li {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 8px 10px;
  }

  .flow-chip {
    grid-column: 2;
    justify-self: start;
  }

  .hero-stamp {
    right: 12px;
    bottom: -24px;
    width: 74px;
    height: 74px;
    font-size: 8px;
  }

  .flowboard {
    box-shadow: 9px 9px 0 var(--paper-3);
  }

  .section-head {
    margin-bottom: 32px;
  }

  .section-head h2,
  .faq-intro h2 {
    font-size: clamp(32px, 9vw, 44px);
  }

  .rule-card {
    padding: 24px;
  }

  .step {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px 14px;
    padding: 24px 0;
  }

  .step-marker {
    font-size: 23px;
  }

  .step-side {
    grid-column: 2;
    margin-top: 4px;
    padding: 10px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .filter-count {
    width: 100%;
    margin-left: 0;
    margin-top: 4px;
  }

  .numbers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 0;
  }

  .number-item:nth-child(3),
  .number-item:nth-child(5) {
    padding-left: 0;
    border-left: 0;
  }

  .theme-choice {
    min-width: 228px;
  }

  .browser-address {
    display: none;
  }

  .theme-caption {
    flex-direction: column;
    gap: 14px;
  }

  .theme-palette {
    flex-wrap: wrap;
  }

  .arch-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .code-body {
    min-height: 320px;
  }

  .code-pane {
    padding: 18px 14px;
    font-size: 9.5px;
  }

  .faq-item summary {
    font-size: 17px;
    gap: 10px;
  }

  .faq-answer {
    padding-left: 32px;
  }

  .cta-section {
    padding: 66px 0;
  }

  .cta-panel {
    padding: 18px;
    box-shadow: 7px 7px 0 rgba(28, 14, 8, 0.24);
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 430px) {
  .brand-text small {
    display: none;
  }

  .brand-text strong {
    font-size: 16px;
  }

  .hero-actions .btn {
    flex: 1;
    padding-inline: 12px;
  }

  .hero-command {
    width: 100%;
  }

  .hero-command code {
    flex: 1;
    overflow-x: auto;
    white-space: nowrap;
  }

  .filter {
    font-size: 8px;
    padding: 7px 8px;
  }

  .theme-dots {
    display: none;
  }

  .theme-choice {
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 206px;
  }

  .number-item {
    padding-inline: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* -------------------------------------------------------------------- print */

@media print {
  .site-header,
  .scroll-progress,
  .theme-lab,
  .hero-visual,
  .cta-panel,
  .menu-btn {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .section,
  .themes-section,
  .cta-section {
    padding: 24px 0;
    background: #fff;
    color: #000;
  }
}


/* ------------------------------------------------------- demo responsive */

@media (max-width: 1180px) {
  .demo-grid {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 30px;
  }
}

@media (max-width: 1040px) {
  .demo-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .demo-copy {
    position: static;
    max-width: 760px;
  }

  .demo-shell {
    max-width: 900px;
  }
}

@media (max-width: 900px) {
  .demo-workspace {
    flex-direction: column;
  }

  .demo-pane + .demo-pane {
    border-top: 1px solid #cbd5e1;
    border-left: 0;
  }

  .demo-appbar {
    gap: 8px 10px;
  }

  .demo-appbar-actions {
    margin-left: 0;
  }

  .demo-appbar--review .demo-qnav {
    width: 100%;
    order: 4;
  }

  .demo-score-inline {
    margin-left: auto;
  }
}

@media (max-width: 720px) {
  .demo-shell {
    box-shadow: 7px 7px 0 var(--paper-3);
  }

  .demo-chrome {
    gap: 8px;
    padding: 8px 10px;
  }

  .demo-chrome-badge {
    display: none;
  }

  .demo-app {
    min-height: 0;
  }

  .demo-appbar {
    padding: 8px 10px;
  }

  .demo-title strong {
    font-size: 12.5px;
  }

  .demo-btn {
    padding: 4px 8px;
    font-size: 10px;
  }

  .demo-clock {
    padding: 3px 7px;
    font-size: 10.5px;
  }

  .demo-main {
    padding: 10px;
  }

  .demo-practice-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .demo-summary {
    padding: 14px;
  }

  .demo-big-score strong {
    font-size: 38px;
  }

  .demo-practice-foot {
    padding: 8px 10px;
  }

  .demo-goto {
    width: 28px;
    height: 28px;
  }

  .demo-pane-body {
    padding: 12px;
  }
}

@media print {
  .demo-shell {
    display: none !important;
  }
}

/* ------------------------------------------------------------ multi-page UI */

.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.page-hero {
  position: relative;
  padding: 84px 0 54px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
      to right,
      rgba(20, 21, 15, 0.055) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(20, 21, 15, 0.045) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(80% 90% at 82% 10%, #000, transparent 82%);
  -webkit-mask-image: radial-gradient(80% 90% at 82% 10%, #000, transparent 82%);
}

.page-hero .wrap {
  position: relative;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(270px, 0.85fr);
  gap: 52px;
  align-items: end;
}

.page-hero h1 {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: clamp(44px, 6.2vw, 78px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.page-hero h1 em {
  color: var(--accent);
  font-style: normal;
}

.page-hero .section-lede {
  max-width: 58ch;
  margin-top: 18px;
  font-size: 14.5px;
}

.page-hero-aside {
  padding: 4px 0 4px 24px;
  border-left: 1px solid var(--line-strong);
}

.page-hero-aside > .mono {
  color: var(--accent);
}

.page-hero-aside dl {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.page-hero-aside dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.page-hero-aside dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page-hero-aside dd {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}

/* ---- home download strip ------------------------------------------------- */

.download-strip {
  padding: 66px 0 74px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

.download-strip-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.download-strip-head h2 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.download-strip-head h2 em {
  color: var(--accent);
  font-style: normal;
}

.download-strip-head .section-lede {
  margin-top: 12px;
}

.download-strip-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.75;
}

.download-strip-note a {
  color: var(--accent-dark);
  text-underline-offset: 3px;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.platform-grid.is-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.platform-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 186px;
  padding: 20px;
  border: 1px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 5px 5px 0 var(--paper-3);
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease),
    border-color 160ms var(--ease);
}

.platform-card:hover {
  border-color: var(--accent);
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--accent);
}

.platform-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.platform-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
}

.platform-icon svg {
  width: 18px;
  height: 18px;
}

.platform-tag {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.platform-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.platform-copy strong {
  font-size: 15px;
  line-height: 1.35;
}

.platform-copy p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.platform-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.platform-action em {
  color: var(--accent-dark);
  font-size: 13px;
  font-style: normal;
}

.platform-card[data-download-ready="true"] .platform-action {
  color: var(--accent-dark);
}

.platform-card--source {
  border-style: dashed;
  background: transparent;
  box-shadow: none;
}

.platform-card--source:hover {
  background: var(--surface);
  box-shadow: 5px 5px 0 var(--paper-3);
}

/* ---- home highlights / explore ------------------------------------------ */

.home-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.home-highlight {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--ink);
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--paper-3);
}

.home-highlight .mono {
  color: var(--accent);
}

.home-highlight h3 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.home-highlight p {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.8;
}

.home-highlight a {
  margin-top: 18px;
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  text-underline-offset: 3px;
}

.home-highlight a:hover {
  text-decoration: underline;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.explore-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 176px;
  padding: 20px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease),
    border-color 160ms var(--ease), background 160ms var(--ease);
}

.explore-card:hover {
  border-color: var(--ink);
  background: var(--surface);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--accent);
}

.explore-card .mono {
  color: var(--muted);
}

.explore-card strong {
  font-size: 16px;
  line-height: 1.35;
}

.explore-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.explore-card em {
  margin-top: auto;
  padding-top: 10px;
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---- download page ------------------------------------------------------- */

.download-status {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 30px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
}

.download-status .live-dot {
  margin-top: 6px;
}

.download-status p {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.download-status strong {
  font-size: 12px;
}

.download-status span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.download-status[data-state="ready"] {
  border-color: #8bb397;
  background: #eef6ef;
}

.download-status[data-state="ready"] .live-dot {
  background: #2d6a4f;
}

.download-status[data-state="error"] {
  border-color: #d2a18f;
  background: #fbefea;
}

.install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.install-card {
  padding: 26px;
  border: 1px solid var(--ink);
  background: var(--surface);
}

.install-card .mono {
  color: var(--accent);
}

.install-card h3 {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.install-card p,
.install-card li {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.8;
}

.install-card p {
  margin-top: 10px;
}

.install-card ol {
  margin: 12px 0 0;
  padding-left: 18px;
}

.install-card li + li {
  margin-top: 6px;
}

.install-card code {
  overflow-wrap: anywhere;
}

.install-card--note {
  grid-column: 1 / -1;
  background: var(--paper-2);
}

.source-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

.source-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 46px;
  align-items: center;
}

.source-copy h2 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.source-copy p {
  max-width: 58ch;
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.8;
}

.source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* ---- standalone demo / themes ------------------------------------------- */

.demo-page .demo-section,
.themes-page .themes-section {
  padding-top: 82px;
}

.themes-page .themes-section {
  min-height: calc(100vh - 74px);
}

@media (max-width: 1180px) {
  .platform-grid.is-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .explore-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .page-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .page-hero-aside {
    padding: 18px 0 0;
    border-top: 1px solid var(--line-strong);
    border-left: 0;
  }

  .page-hero-aside dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .page-hero-aside dl > div {
    display: block;
  }

  .page-hero-aside dd {
    margin-top: 3px;
    text-align: left;
  }

  .download-strip-head {
    display: block;
  }

  .download-strip-head .btn {
    margin-top: 18px;
  }

  .home-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .platform-grid,
  .platform-grid.is-four,
  .install-grid,
  .source-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .install-card--note {
    grid-column: auto;
  }

  .source-grid {
    gap: 28px;
  }
}

@media (max-width: 720px) {
  .page-hero {
    padding: 56px 0 38px;
  }

  .page-hero h1 {
    font-size: clamp(38px, 11vw, 54px);
  }

  .download-strip {
    padding: 52px 0 58px;
  }

  .home-highlights,
  .explore-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-highlight,
  .explore-card {
    min-height: 0;
  }

  .page-hero-aside dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .platform-card {
    min-height: 0;
  }

  .demo-page .demo-section,
  .themes-page .themes-section {
    padding-top: 58px;
  }
}

.download-status-link {
  margin-left: auto;
  align-self: center;
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.download-status-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.install-command {
  display: block;
  margin-top: 6px;
  padding: 8px 10px;
  background: rgba(20, 21, 15, 0.06);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (max-width: 720px) {
  .download-status {
    flex-wrap: wrap;
  }

  .download-status-link {
    width: 100%;
    margin-left: 0;
    padding-left: 18px;
  }
}

@media (max-width: 430px) {
  .header-actions .btn-small {
    display: none;
  }

  .header-inner {
    gap: 12px;
  }
}

/* ---------------------------------------------------------- demo hub pages */

.demo-hub {
  padding: 58px 0 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.demo-hub h1 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(40px, 5.4vw, 68px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.demo-hub .section-lede {
  max-width: 66ch;
  margin-top: 14px;
}

.demo-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
}

.demo-hub-meta {
  display: flex;
  gap: 18px;
  padding-bottom: 6px;
}

.demo-hub-meta > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.demo-hub-meta strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.demo-hub-meta span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.demo-tabs {
  display: flex;
  margin-top: 28px;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  background: var(--paper-2);
  scrollbar-width: thin;
}

.demo-tabs a {
  flex: 1 0 auto;
  padding: 12px 16px;
  border-right: 1px solid var(--line);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}

.demo-tabs a:last-child {
  border-right: 0;
}

.demo-tabs a span {
  margin-right: 7px;
  color: var(--muted);
}

.demo-tabs a:hover {
  background: var(--paper);
  color: var(--ink);
}

.demo-tabs a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

.demo-tabs a[aria-current="page"] span {
  color: var(--accent);
}

.demo-stage {
  padding: 34px 0 76px;
  background: var(--paper);
}

.demo-stage .demo-shell {
  max-width: 1080px;
  margin: 0 auto;
}

.demo-stage-note {
  max-width: 1080px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.demo-stage-note a {
  color: var(--accent-dark);
  text-underline-offset: 3px;
}

.demo-fineprint {
  max-width: 1080px;
  margin: 16px auto 0;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
}

.demo-fineprint summary {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.demo-fineprint ul {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.demo-fineprint li {
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.6;
}

.demo-fineprint li strong {
  color: var(--ink);
}

/* ---- in-shell library pages (mistakes / vocabulary) ---------------------- */

.demo-app--library {
  min-height: 620px;
}

.demo-library {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  min-height: 0;
  max-height: 640px;
  background: #fff;
}

.demo-library-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid #e2e8f0;
}

.demo-library-toolbar {
  flex: none;
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.demo-search {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 11px;
  line-height: 1.4;
}

.demo-search:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.demo-chip {
  padding: 3px 7px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 9px;
  line-height: 1.4;
  cursor: pointer;
}

.demo-chip:hover {
  border-color: #94a3b8;
  color: #0f172a;
}

.demo-chip.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.demo-library-note {
  margin-top: 9px;
  color: #64748b;
  font-size: 9.5px;
  line-height: 1.55;
}

.demo-library-items {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.demo-library-item {
  display: block;
  width: 100%;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.demo-library-item:hover {
  background: #f8fafc;
}

.demo-library-item.is-active {
  background: #eff6ff;
  box-shadow: inset 3px 0 0 #2563eb;
}

.demo-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.demo-item-meta {
  color: #64748b;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.demo-item-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.demo-badge {
  padding: 2px 5px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.demo-badge.is-pending {
  background: #fef3c7;
  color: #92400e;
}

.demo-badge.is-mastered {
  background: #ecfdf5;
  color: #047857;
}

.demo-badge.is-saved {
  background: #eff6ff;
  color: #1d4ed8;
}

.demo-item-title {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.demo-item-sub {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #64748b;
  font-size: 9.5px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-word-term {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.demo-library-detail {
  min-width: 0;
  overflow: auto;
  padding: 18px;
  background: #fff;
}

.demo-detail-kicker {
  color: #64748b;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.demo-detail-title {
  margin-top: 7px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.demo-detail-material {
  margin-top: 9px;
  padding: 9px 10px;
  border-left: 2px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  line-height: 1.7;
}

.demo-library-detail .demo-compare {
  margin-top: 12px;
}

.demo-detail-analysis {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.demo-detail-analysis > .mono {
  color: #2563eb;
  font-size: 8px;
}

.demo-detail-analysis p {
  margin-top: 7px;
  color: #334155;
  font-size: 11.5px;
  line-height: 1.75;
}

.demo-detail-source {
  margin-top: 10px;
  color: #94a3b8;
  font-size: 9px;
  line-height: 1.5;
}

.demo-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.demo-empty {
  padding: 18px;
  color: #64748b;
  font-size: 11px;
}

.demo-word-title {
  margin-top: 7px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.demo-word-def {
  margin-top: 6px;
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
}

.demo-word-example {
  margin-top: 10px;
  padding: 9px 10px;
  border-left: 2px solid #2563eb;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  line-height: 1.65;
}

.demo-word-example .mono {
  display: block;
  margin-bottom: 2px;
  color: #2563eb;
  font-size: 7.5px;
}

@media (max-width: 1040px) {
  .demo-hub-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .demo-hub-meta {
    padding-bottom: 0;
  }
}

@media (max-width: 900px) {
  .demo-library {
    grid-template-columns: minmax(0, 1fr);
    max-height: none;
  }

  .demo-library-side {
    max-height: 320px;
    border-right: 0;
    border-bottom: 1px solid #cbd5e1;
  }

  .demo-library-detail {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .demo-hub {
    padding-top: 40px;
  }

  .demo-hub h1 {
    font-size: clamp(34px, 9vw, 48px);
  }

  .demo-tabs a {
    padding: 10px 12px;
    font-size: 8.5px;
  }

  .demo-stage {
    padding: 20px 0 54px;
  }

  .demo-app--library {
    min-height: 0;
  }

  .demo-library-side {
    max-height: 280px;
  }

  .demo-library-detail {
    padding: 14px;
  }

  .demo-word-title {
    font-size: 26px;
  }
}

/* ==========================================================================
   2026 layout refresh
   A quieter pass over the shared shell and the two most content-heavy pages
   (home + features). Keeps the paper palette; removes decorative noise,
   tightens the type scale and gives every section the same rhythm.
   ========================================================================== */

/* ---- shared shell ------------------------------------------------------- */

body {
  line-height: 1.65;
}

.wrap {
  width: min(var(--wrap), calc(100% - 56px));
}

.header-inner {
  min-height: 64px;
  gap: 24px;
}

.brand-text strong {
  font-size: 17px;
}

.site-nav {
  gap: 22px;
}

.site-nav a {
  font-size: 13px;
}

.btn {
  padding: 12px 18px;
  font-size: 12.5px;
}

.btn-small {
  padding: 8px 13px;
  font-size: 11.5px;
}

.section {
  padding: 76px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-index {
  font-size: 9.5px;
  letter-spacing: 0.14em;
}

.section-head h2,
.faq-intro h2 {
  margin-top: 10px;
  font-size: clamp(30px, 3.5vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.028em;
}

.section-lede {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.75;
}

.page-hero {
  padding: 64px 0 46px;
}

.page-hero::before {
  display: none;
}

.page-hero h1 {
  margin-top: 14px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.page-hero .section-lede {
  margin-top: 14px;
  font-size: 14px;
}

.page-hero--slim {
  padding: 58px 0 42px;
}

.page-hero--slim h1 {
  font-size: clamp(36px, 4.6vw, 54px);
}

.page-hero--slim .section-lede {
  max-width: 62ch;
}

.text-link {
  display: inline-block;
  color: var(--accent-dark);
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- home hero ---------------------------------------------------------- */

.hero {
  padding: 48px 0 60px;
}

.hero::before,
.hero::after {
  display: none;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
}

.hero h1 {
  margin-top: 16px;
  font-size: clamp(42px, 5.2vw, 68px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.hero-lede {
  max-width: 34em;
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.8;
}

.hero-actions {
  margin-top: 24px;
}

.hero-meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.hero-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
  padding-top: 16px;
}

.hero-facts strong {
  font-size: 23px;
}

.hero-facts span {
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.flowboard {
  box-shadow: 12px 12px 0 var(--paper-3);
}

.flowboard-body {
  padding: 18px;
}

.flow-steps li {
  padding: 12px 0;
}

/* ---- home download band ------------------------------------------------- */

.download-band {
  padding: 52px 0 56px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

.download-band-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.download-band-head h2 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.download-band-head .section-lede {
  max-width: 56ch;
  margin-top: 8px;
  font-size: 13px;
}

.platform-grid {
  gap: 12px;
}

.platform-card--compact {
  min-height: 0;
  gap: 10px;
  padding: 16px;
  box-shadow: none;
}

.platform-card--compact:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--accent);
}

.platform-card--compact .platform-icon {
  width: 28px;
  height: 28px;
}

.platform-card--compact .platform-icon svg {
  width: 15px;
  height: 15px;
}

.platform-card--compact .platform-copy strong {
  font-size: 14px;
}

.platform-card--compact .platform-copy p {
  font-size: 10.5px;
}

.platform-card--compact .platform-action {
  padding-top: 9px;
  font-size: 8px;
}

.download-band .download-strip-note {
  margin-top: 14px;
}

/* ---- home highlights ---------------------------------------------------- */

.home-highlights--plain {
  gap: 0;
  border-top: 1px solid var(--ink);
}

.home-highlights--plain .home-highlight {
  padding: 22px 26px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.home-highlights--plain .home-highlight + .home-highlight {
  padding-left: 26px;
  border-left: 1px solid var(--line);
}

.home-highlights--plain .home-highlight .mono {
  font-size: 9px;
  letter-spacing: 0.1em;
}

.home-highlights--plain .home-highlight h3 {
  margin-top: 10px;
  font-size: 25px;
}

.home-highlights--plain .home-highlight p {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.75;
}

.home-highlights--plain .home-highlight a {
  margin-top: 14px;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

/* ---- closing band ------------------------------------------------------- */

.closing {
  padding: 52px 0 60px;
  border-top: 1px solid var(--ink);
  background: var(--surface);
}

.closing-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: end;
}

.closing-copy h2 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.closing-copy p {
  max-width: 48ch;
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.75;
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  max-width: 360px;
}

.closing-actions .text-link {
  flex-basis: 100%;
  margin-top: 2px;
}

/* ---- features: principles ---------------------------------------------- */

.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}

.principle {
  padding: 26px 34px 8px 0;
}

.principle + .principle {
  padding-right: 0;
  padding-left: 34px;
  border-left: 1px solid var(--line);
}

.principle-no {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.principle h3 {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.principle p {
  max-width: 48ch;
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.8;
}

.plain-list {
  display: grid;
  gap: 7px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  position: relative;
  padding-left: 16px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.6;
}

.plain-list li::before {
  content: "·";
  position: absolute;
  left: 2px;
  color: var(--accent);
  font-weight: 700;
}

/* ---- features: workflow ------------------------------------------------ */

.flow-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  transition: border-color 160ms var(--ease);
}

.flow-card:hover {
  border-color: var(--ink);
}

.flow-card-no {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.flow-card h3 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.flow-card p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.7;
}

.flow-card-meta {
  margin-top: auto;
  padding-top: 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- features: core + full index --------------------------------------- */

.core-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.core-card {
  padding: 22px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.core-kicker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.core-card h3 {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.core-card p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.75;
}

.feature-details {
  margin-top: 26px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.feature-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.feature-details summary::-webkit-details-marker {
  display: none;
}

.feature-details summary:hover {
  color: var(--accent-dark);
}

.feature-details summary em {
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-details summary em span {
  display: inline-block;
  transition: transform 180ms var(--ease);
}

.feature-details[open] summary em span {
  transform: rotate(45deg);
}

.feature-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 44px;
  padding: 6px 0 30px;
}

.feature-group h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.feature-group h3 span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
}

.feature-group dl {
  margin: 0;
}

.feature-group dl > div {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.feature-group dt {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}

.feature-group dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.6;
}

/* ---- shared data + FAQ ------------------------------------------------- */

.numbers {
  padding: 34px 0;
}

.number-item strong {
  font-size: clamp(23px, 2.3vw, 30px);
}

.number-item span {
  margin-top: 6px;
  font-size: 8.5px;
}

.faq-intro h2 {
  font-size: clamp(28px, 3vw, 36px);
}

.faq-item summary {
  padding: 16px 0;
  font-size: 17px;
}

.faq-answer {
  padding-bottom: 18px;
  font-size: 12.5px;
}

.site-footer {
  padding: 48px 0 22px;
}

/* ---- responsive --------------------------------------------------------- */

@media (max-width: 1180px) {
  .flow-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .flow-card:nth-child(4),
  .flow-card:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 1040px) {
  .hero-grid {
    gap: 44px;
  }

  .hero-visual {
    max-width: 680px;
  }

  .core-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-groups {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .section {
    padding: 64px 0;
  }

  .principles {
    grid-template-columns: minmax(0, 1fr);
  }

  .principle {
    padding: 24px 0 8px;
  }

  .principle + .principle {
    padding: 26px 0 8px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .closing-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    align-items: start;
  }

  .closing-actions {
    max-width: none;
  }

  .home-highlights--plain {
    border-top: 0;
  }

  .home-highlights--plain .home-highlight {
    padding: 20px 0 0;
  }

  .home-highlights--plain .home-highlight + .home-highlight {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .wrap {
    width: calc(100% - 40px);
  }

  .hero {
    padding: 38px 0 52px;
  }

  .hero h1 {
    font-size: clamp(36px, 10.5vw, 52px);
    line-height: 1.14;
  }

  .hero-lede {
    font-size: 13.5px;
  }

  .hero-meta {
    font-size: 10.5px;
  }

  .hero-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .hero-facts strong {
    font-size: 20px;
  }

  .hero-facts span {
    font-size: 8px;
  }

  .download-band {
    padding: 42px 0 46px;
  }

  .download-band-head {
    display: block;
  }

  .download-band-head .text-link {
    margin-top: 12px;
  }

  .platform-card--compact {
    padding: 14px;
  }

  .closing {
    padding: 42px 0 48px;
  }

  .flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .core-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-group dl > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .feature-group dt {
    font-size: 12.5px;
  }

  .page-hero--slim {
    padding: 44px 0 34px;
  }

  .page-hero--slim h1 {
    font-size: clamp(32px, 9vw, 42px);
  }

  .numbers {
    padding: 28px 0;
  }

  .site-footer {
    padding: 40px 0 20px;
  }
}

@media (max-width: 430px) {
  .hero-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-facts strong {
    font-size: 18px;
  }

  .flow-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .closing-actions .btn {
    width: 100%;
  }
}

/* Keep the refreshed hero from re-introducing the old two-column grid on
   narrow screens (the base rule above sits after the legacy media queries). */
@media (max-width: 1040px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-visual {
    width: 100%;
    max-width: 720px;
  }
}

@media (max-width: 720px) {
  .header-inner {
    gap: 12px;
  }

  .header-actions {
    gap: 10px;
  }

  .header-actions .btn-small {
    display: none;
  }

  .hero-grid {
    gap: 34px;
  }

  .hero-visual {
    max-width: 100%;
  }

  .flowboard {
    min-width: 0;
  }
}

/* Chinese headings break naturally at any character, so `balance` can split a
   short line into three ragged lines (e.g. "理解留下 / 来。"). Let CJK headings
   fill the line instead; Latin headings keep `balance`. */
html[lang="zh-CN"] .hero h1,
html[lang="zh-CN"] .page-hero h1,
html[lang="zh-CN"] .section-head h2,
html[lang="zh-CN"] .closing-copy h2,
html[lang="zh-CN"] .faq-intro h2 {
  text-wrap: wrap;
}
