/*
  classmcp landing page. No build step; fonts are self-hosted (SIL OFL).

  Identity: paper and chalkboard. Light mode is a sheet of paper; every dark
  surface (demo, code, prompt) is a slate-green chalkboard written on in chalk
  colours. Dark mode turns the whole page into the board. The session replay
  is the one loud element; everything else stays quiet.
*/

@font-face {
  font-family: "Geist";
  src: url("./assets/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("./assets/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---- Tokens ------------------------------------------------------------ */

:root {
  /* paper */
  --bg: #f6f5f1;
  --bg-alt: #efede6;
  --surface: #fffefb;
  --surface-2: #f0eee7;
  --line: #e1ded4;
  --line-strong: #cdc9bd;
  --ink: #161917;
  --ink-2: #464c48;
  --ink-3: #6b716c;
  --accent: #127a47;
  --accent-hover: #0d6439;
  --accent-ink: #ffffff;
  --accent-soft: #dcefe3;
  --amber: #9a5d08;
  --brand-ink: var(--accent-ink);

  /* chalkboard */
  --board: #1f2b24;
  --board-2: #26342c;
  --board-line: #34463b;
  --chalk: #eef0e8;
  --chalk-2: #a9b5ac;
  --chalk-3: #7d8a81;
  --chalk-green: #9bd3ae;
  --chalk-yellow: #ecd27e;
  --chalk-blue: #a9c8e6;
  --chalk-red: #f0a08a;

  --claude: #d97757;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* type scale */
  --t-sm: 14px;
  --t-base: 16px;
  --t-md: 19px;
  --t-lg: 28px;
  --t-xl: clamp(28px, 3.4vw, 36px);
  --t-2xl: clamp(40px, 5.6vw, 64px);

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --wrap: 1140px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(72px, 9vw, 112px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17201b;
    --bg-alt: #1a241e;
    --surface: #1f2a24;
    --surface-2: #25312a;
    --line: #2e3b33;
    --line-strong: #3c4b42;
    --ink: #eceee6;
    --ink-2: #b7c0b7;
    --ink-3: #8e988f;
    --accent: #9bd3ae;
    --accent-hover: #b8e3c7;
    --accent-ink: #12201a;
    --accent-soft: #243a2d;
    --amber: #e6c76e;
    --board: #111915;
    --board-2: #18221c;
    --board-line: #2a3830;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17201b;
  --bg-alt: #1a241e;
  --surface: #1f2a24;
  --surface-2: #25312a;
  --line: #2e3b33;
  --line-strong: #3c4b42;
  --ink: #eceee6;
  --ink-2: #b7c0b7;
  --ink-3: #8e988f;
  --accent: #9bd3ae;
  --accent-hover: #b8e3c7;
  --accent-ink: #12201a;
  --accent-soft: #243a2d;
  --amber: #e6c76e;
  --board: #111915;
  --board-2: #18221c;
  --board-line: #2a3830;
  color-scheme: dark;
}

/* ---- Base -------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--t-base) / 1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
}
a {
  color: inherit;
}
p a,
li a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
p a:hover,
li a:hover {
  text-decoration-thickness: 2px;
}
code,
pre {
  font-family: var(--mono);
  font-size: 0.875em;
}
:not(pre) > code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--surface-2);
  overflow-wrap: anywhere;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection {
  background: var(--accent);
  color: var(--accent-ink);
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.logo {
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}
.logo-claude {
  color: var(--claude);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-sm);
}
.skip:focus {
  top: 12px;
}
.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- Buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--ink-3);
}
.btn-sm {
  min-height: 32px;
  padding: 0 12px;
  font-size: var(--t-sm);
}
.btn-sm .icon {
  width: 15px;
  height: 15px;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--ink-2);
}
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.copy {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--chalk-2);
}
.copy:hover {
  background: var(--board-2);
  color: var(--chalk);
}
.copy .icon {
  width: 16px;
  height: 16px;
}
.copy .i-done,
.is-copied .i-copy {
  display: none;
}
.is-copied .i-done {
  display: block;
  color: var(--chalk-green);
}

/* ---- Header ------------------------------------------------------------ */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  border-bottom-color: var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 17px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand-mark {
  width: 26px;
  height: 26px;
  color: var(--accent);
}
.nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.nav a {
  padding: 6px 10px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: var(--t-sm);
  text-decoration: none;
}
.nav a:hover,
.nav a.is-active {
  color: var(--ink);
  background: var(--surface-2);
}
.header-actions {
  display: flex;
  gap: 2px;
}
.theme-moon {
  display: none;
}
:root[data-theme="dark"] .theme-sun {
  display: none;
}
:root[data-theme="dark"] .theme-moon {
  display: block;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-sun {
    display: none;
  }
  :root:not([data-theme="light"]) .theme-moon {
    display: block;
  }
}
.menu-btn {
  display: none;
}
.menu-btn span {
  display: grid;
  gap: 5px;
  width: 18px;
}
.menu-btn i {
  display: block;
  height: 1.8px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s;
}
.menu-btn[aria-expanded="true"] i:first-child {
  transform: translateY(3.4px) rotate(45deg);
}
.menu-btn[aria-expanded="true"] i:last-child {
  transform: translateY(-3.4px) rotate(-45deg);
}

/* ---- Hero -------------------------------------------------------------- */

.hero {
  padding: clamp(40px, 7vw, 96px) 0 var(--section);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 {
  font-size: var(--t-2xl);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 11ch;
}
.lede {
  margin-top: 20px;
  max-width: 36ch;
  font-size: var(--t-md);
  line-height: 1.5;
  color: var(--ink-2);
}
.install {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  max-width: 420px;
  padding: 6px 6px 6px 16px;
  border-radius: var(--r);
  background: var(--board);
  color: var(--chalk);
}
.install-prompt {
  color: var(--chalk-3);
  font-family: var(--mono);
}
.install code {
  flex: 1;
  min-width: 0;
  padding: 0;
  background: none;
  overflow-x: auto;
  white-space: nowrap;
  font-size: var(--t-sm);
  scrollbar-width: none;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.hosts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-2);
}
.hosts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hosts .logo {
  color: var(--ink);
}
.hosts .logo-claude {
  color: var(--claude);
}

/* ---- Demo (the board) ---------------------------------------------------- */

.demo {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--r-lg);
  background: var(--board);
  color: var(--chalk);
  box-shadow: 0 30px 60px -30px rgb(20 40 30 / 0.45);
  overflow: hidden;
  scroll-margin-top: 80px;
}
.demo-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--board-line);
  font-size: 13px;
  color: var(--chalk-2);
}
.dots {
  display: flex;
  gap: 6px;
}
.dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--board-line);
}
.demo-title {
  flex: 1;
}
.demo-replay {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--chalk-2);
}
.demo-replay:hover {
  background: var(--board-2);
  color: var(--chalk);
}
.demo-replay .icon {
  width: 16px;
  height: 16px;
}
.demo-body {
  height: 440px;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 15px;
  line-height: 1.55;
  scrollbar-width: thin;
  scrollbar-color: var(--board-line) transparent;
}
.demo-noscript {
  color: var(--chalk-2);
}
.msg-user {
  align-self: flex-end;
  max-width: 85%;
  padding: 9px 14px;
  border-radius: 14px 14px 4px 14px;
  background: var(--board-2);
}
.trace {
  display: grid;
  gap: 3px;
  padding: 10px 0 10px 14px;
  border-left: 2px solid var(--board-line);
  font: 13px/1.5 var(--mono);
}
.trace-line {
  display: flex;
  gap: 8px;
  min-width: 0;
  animation: appear 0.2s ease-out both;
}
.trace-line .arrow {
  color: var(--chalk-3);
  flex: none;
}
.trace-line .name {
  color: var(--chalk-green);
  flex: none;
}
.trace-line .name.local {
  color: var(--chalk-blue);
}
.trace-line .args {
  color: var(--chalk-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trace-line .res {
  color: var(--chalk-yellow);
}
.answer {
  display: grid;
  gap: 10px;
  animation: appear 0.25s ease-out both;
}
.answer strong {
  font-weight: 600;
}
.answer ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
}
.answer a {
  color: var(--chalk-green);
}
.answer :not(pre) > code {
  background: var(--board-2);
  color: var(--chalk);
}
.answer h4 {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 600;
}
.due-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 14px;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1px solid var(--board-line);
}
.due-card .when {
  grid-row: span 2;
  align-self: center;
  padding-right: 14px;
  border-right: 1px solid var(--board-line);
  color: var(--chalk-yellow);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}
.due-card span {
  color: var(--chalk-2);
  font-size: 13.5px;
}
.late {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.late th {
  text-align: left;
  font-weight: 500;
  color: var(--chalk-3);
  padding: 0 10px 6px 0;
}
.late td {
  padding: 6px 10px 6px 0;
  border-top: 1px solid var(--board-line);
  vertical-align: top;
}
.late td:first-child {
  color: var(--chalk-red);
  white-space: nowrap;
}
.late td:last-child,
.late th:last-child {
  text-align: right;
  padding-right: 0;
  font-variant-numeric: tabular-nums;
}
.files {
  list-style: none;
  padding: 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px 16px !important;
}
.files li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid var(--board-line);
  font-size: 13.5px;
  min-width: 0;
  animation: appear 0.2s ease-out both;
}
.files li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.files .ext {
  flex: none;
  width: 34px;
  font: 600 11px var(--mono);
  color: var(--chalk-yellow);
}
.files .ext.pdf {
  color: var(--chalk-red);
}
.typing {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}
.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chalk-3);
  animation: blink 1s infinite;
}
.typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.typing i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}
.demo-input {
  display: flex;
  gap: 8px;
  margin: 0 12px;
  padding: 5px 5px 5px 14px;
  border: 1px solid var(--board-line);
  border-radius: var(--r);
  background: var(--board-2);
}
.demo-input:focus-within {
  border-color: var(--chalk-3);
}
.demo-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--chalk);
  font: inherit;
  font-size: 15px;
  outline: none;
}
.demo-input input::placeholder {
  color: var(--chalk-3);
}
.demo-input button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--chalk-green);
  color: #12201a;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 12px 14px;
}
.chip {
  padding: 5px 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--chalk-2);
  font-size: 13.5px;
}
.chip:hover {
  color: var(--chalk);
  background: var(--board-2);
}
.chip[aria-pressed="true"] {
  color: var(--chalk);
  background: var(--board-2);
  box-shadow: inset 0 -2px 0 var(--chalk-green);
}

/* ---- Sections ---------------------------------------------------------- */

.section {
  padding: var(--section) 0;
  border-top: 1px solid var(--line);
}
.section-alt {
  background: var(--bg-alt);
}
.section-title {
  margin-bottom: clamp(28px, 4vw, 48px);
  font-size: var(--t-xl);
  letter-spacing: -0.03em;
}

/* Board-style code ------------------------------------------------------------ */

.code {
  margin-top: 14px;
  border-radius: var(--r);
  background: var(--board);
  color: var(--chalk);
  overflow: hidden;
}
.code[hidden] {
  display: none;
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 4px 0 14px;
  border-bottom: 1px solid var(--board-line);
  font: 12.5px var(--mono);
  color: var(--chalk-2);
}
.code-bar .label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.code-bar:has(.label:empty) {
  min-height: 0;
  border-bottom: 0;
  position: absolute;
  right: 4px;
  top: 4px;
  padding: 0;
}
.code:has(.label:empty) {
  position: relative;
}
.code:has(.label:empty) pre {
  padding-right: 48px;
}
.code-tabs {
  display: flex;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.code-tabs button {
  flex: none;
  padding: 10px 10px 8px;
  border: 0;
  background: none;
  color: var(--chalk-3);
  font: 12.5px var(--mono);
  box-shadow: inset 0 -2px 0 transparent;
}
.code-tabs button:hover {
  color: var(--chalk);
}
.code-tabs button[aria-selected="true"] {
  color: var(--chalk);
  box-shadow: inset 0 -2px 0 var(--chalk-green);
}
.code pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
  tab-size: 2;
}
.code .c {
  color: var(--chalk-3);
}
.code .s {
  color: var(--chalk-green);
}

/* Tools ------------------------------------------------------------------------ */

.tools {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
}
.tool-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-left: 1px solid var(--line-strong);
}
.tool-list button {
  margin-left: -1px;
  padding: 10px 16px;
  text-align: left;
  border: 0;
  border-left: 2px solid transparent;
  background: none;
  color: var(--ink-2);
}
.tool-list button:hover {
  color: var(--ink);
}
.tool-list button[aria-selected="true"] {
  border-left-color: var(--accent);
  color: var(--ink);
}
.tool-list code {
  padding: 0;
  background: none;
  font-size: 15px;
  font-weight: 500;
}
.tool-panel {
  min-width: 0;
  max-width: 720px;
}
.tool-panel h3 {
  font-size: var(--t-lg);
  letter-spacing: -0.02em;
}
.tool-panel h3 code {
  padding: 0;
  background: none;
  font-size: 0.9em;
  font-weight: 600;
}
.tool-panel > p {
  margin-top: 10px;
  max-width: 62ch;
  color: var(--ink-2);
}
.params {
  margin-top: 24px;
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.params th {
  text-align: left;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-3);
  padding: 0 16px 8px 0;
}
.params td {
  padding: 10px 16px 10px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-2);
}
.params td:first-child {
  width: 36%;
}
.params td:first-child code {
  color: var(--ink);
}
.tool-panel .note {
  margin-top: 18px;
  padding-left: 14px;
  border-left: 2px solid var(--amber);
  color: var(--ink-2);
  font-size: 15px;
}

/* Setup ----------------------------------------------------------------------- */

.builder {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.controls {
  position: sticky;
  top: 80px;
  display: grid;
  gap: 14px;
}
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r);
  background: var(--surface-2);
}
.seg-grid {
  grid-auto-flow: row;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.seg-wide {
  grid-column: span 2;
}
.seg label {
  position: relative;
}
.seg input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}
.seg .logo {
  width: 15px;
  height: 15px;
}
.seg input:checked + span {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
}
.seg input:focus-visible + span {
  outline: 2px solid var(--accent);
}
.controls input[type="text"] {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: 13px var(--mono);
}
.controls input[type="text"]::placeholder {
  color: var(--ink-3);
}
.controls input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}
.abs-fields {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.abs-fields[hidden] {
  display: none;
}
.env {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font: 13px var(--mono);
}
.env:focus-within {
  border-color: var(--accent);
}
.env span {
  padding-left: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}
.controls .env input[type="text"] {
  border: 0;
  background: none;
  padding-left: 2px;
}
.progress-bar {
  height: 4px;
  margin-top: 6px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.3s ease;
}

/* steps: a numbered rail, because this really is a sequence */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  counter-reset: step;
}
.step {
  counter-increment: step;
  position: relative;
  min-width: 0;
  padding: 0 0 40px 52px;
}
.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg-alt);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink-2);
}
.step::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 40px;
  bottom: 8px;
  width: 1px;
  background: var(--line-strong);
}
.step:last-child {
  padding-bottom: 0;
}
.step:last-child::after {
  display: none;
}
.step.is-done::before {
  content: "✓";
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 32px;
}
.step-head h3 {
  font-size: var(--t-md);
  letter-spacing: -0.015em;
}
.tick {
  order: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--t-sm);
  color: var(--ink-3);
  cursor: pointer;
}
.tick input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.tick .sr-only {
  position: static;
  width: auto;
  height: auto;
  clip-path: none;
}
.step > p {
  margin-top: 10px;
  color: var(--ink-2);
}
.checklist {
  margin: 10px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  max-width: 64ch;
  color: var(--ink-2);
}
.checklist li::marker {
  color: var(--ink-3);
}
.ask {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 6px 6px 6px 16px;
  border-radius: var(--r);
  border: 1px dashed var(--line-strong);
  font-size: 15px;
}
.ask span {
  flex: 1;
}
.ask .copy {
  color: var(--ink-3);
}
.ask .copy:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.ask .is-copied .i-done {
  color: var(--accent);
}

/* Agents ------------------------------------------------------------------------ */

.agents {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.doc-links {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.doc-links li {
  border-bottom: 1px solid var(--line);
}
.doc-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  text-decoration: none;
}
.doc-links a:hover code {
  color: var(--accent);
}
.doc-links code {
  padding: 0;
  background: none;
  font-size: 15px;
  font-weight: 500;
}
.doc-links .logo {
  width: 16px;
  height: 16px;
}
.prompt-card {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--board);
  color: var(--chalk);
}
.prompt-copy {
  position: absolute;
  top: 12px;
  right: 12px;
}
.prompt-card .btn-primary {
  background: var(--chalk-green);
  color: #12201a;
}
.prompt-card .btn-primary:hover {
  background: #b8e3c7;
}
.prompt-card pre {
  margin: 0;
  padding: 22px 24px;
  padding-top: 56px;
  max-height: 540px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 13.5px;
  line-height: 1.7;
}

/* Troubleshooting --------------------------------------------------------------- */

.trouble {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
}
.symptoms {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--line-strong);
}
.symptoms button {
  padding: 13px 4px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: none;
  font-size: 15px;
  color: var(--ink-2);
}
.symptoms button:hover {
  color: var(--ink);
}
.symptoms button[aria-selected="true"] {
  color: var(--ink);
  font-weight: 550;
  box-shadow: inset 3px 0 0 var(--accent);
  padding-left: 14px;
}
.fix {
  position: sticky;
  top: 80px;
  min-width: 0;
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.fix h3 {
  font-size: var(--t-md);
}
.fix .cause {
  margin-top: 8px;
  color: var(--ink-2);
}
.fix ol {
  margin: 16px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

/* Privacy ------------------------------------------------------------------------ */

.trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.trust article {
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}
.trust .icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}
.trust h3 {
  margin-top: 14px;
  font-size: 17px;
}
.trust p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-2);
}
.trust .limit {
  border-top-color: var(--amber);
}
.trust .limit .icon {
  color: var(--amber);
}

/* FAQ ----------------------------------------------------------------------------- */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(20px, 5vw, 64px);
  align-items: start;
}
.faq-list {
  border-top: 1px solid var(--line-strong);
}
.faq-list details {
  border-bottom: 1px solid var(--line-strong);
}
.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  font-size: 17px;
  font-weight: 550;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary .icon {
  color: var(--ink-3);
  transition: transform 0.2s;
}
.faq-list details[open] summary .icon {
  transform: rotate(180deg);
}
.faq-list details p {
  padding: 0 0 20px;
  max-width: 64ch;
  color: var(--ink-2);
}

/* Footer ------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: var(--t-sm);
  color: var(--ink-3);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}
.footer .brand {
  color: var(--ink);
  font-size: 15px;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.footer nav a {
  text-decoration: none;
}
.footer nav a:hover {
  color: var(--ink);
}
.footer p {
  margin-left: auto;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--bg);
  font-size: var(--t-sm);
  font-weight: 500;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---- Responsive -------------------------------------------------------- */

@media (max-width: 1040px) {
  .trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 920px) {
  .nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open {
    display: flex;
  }
  .nav a {
    padding: 12px 8px;
    font-size: var(--t-base);
  }
  .header-actions {
    margin-left: auto;
  }
  .menu-btn {
    display: inline-grid;
  }
  .hero-grid,
  .tools,
  .builder,
  .agents,
  .trouble,
  .faq {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero h1 {
    max-width: 14ch;
  }
  .controls,
  .fix {
    position: static;
  }
  .tool-list {
    display: flex;
    overflow-x: auto;
    border-left: 0;
    border-bottom: 1px solid var(--line-strong);
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .tool-list button {
    flex: none;
    margin: 0 0 -1px;
    padding: 10px 12px;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }
  .tool-list button[aria-selected="true"] {
    border-bottom-color: var(--accent);
  }
}
@media (max-width: 560px) {
  .demo-body {
    height: 400px;
    padding: 16px;
  }
  .trust {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-actions .btn {
    flex: 1 1 100%;
  }
  .params thead {
    display: none;
  }
  .params tr {
    display: grid;
    padding: 10px 0;
    border-top: 1px solid var(--line);
  }
  .params td {
    border: 0;
    padding: 2px 0;
  }
  .params td:first-child {
    width: auto;
  }
  .late td:nth-child(2),
  .late th:nth-child(2) {
    display: none;
  }
  .step {
    padding-left: 44px;
  }
  .step-head {
    flex-wrap: wrap;
  }
  .footer p {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
