/* FullyDefined docs site: one neutral, one accent; light and dark; no framework, no web fonts. */
:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #15181d;
  --muted: #5b6270;
  --line: #e2e3e0;
  --accent: #0f766e;
  --accent-text: #ffffff;
  --accent-soft: #e6f2f0;
  --code-bg: #f0f1ee;
  --shadow: 0 1px 2px rgba(16, 20, 26, 0.04), 0 8px 24px rgba(16, 20, 26, 0.06);
  --radius: 10px;
  --max: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f12;
    --surface: #14171c;
    --text: #e8eaed;
    --muted: #9aa1ad;
    --line: #333943;
    --accent: #2dd4bf;
    --accent-text: #06201d;
    --accent-soft: #10302c;
    --code-bg: #1b1f25;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f12;
  --surface: #14171c;
  --text: #e8eaed;
  --muted: #9aa1ad;
  --line: #333943;
  --accent: #2dd4bf;
  --accent-text: #06201d;
  --accent-soft: #10302c;
  --code-bg: #1b1f25;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 2px; }
img { max-width: 100%; height: auto; }
code, pre { font-family: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace; font-size: 0.9em; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--code-bg); padding: 14px 16px; border-radius: var(--radius); overflow-x: auto; border: 1px solid var(--line); }
pre code { background: none; padding: 0; overflow-wrap: normal; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand span { color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 0.93rem; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--code-bg); }
.nav a[aria-current="page"] { color: var(--text); background: var(--code-bg); font-weight: 600; }
.nav a.nav-download { color: var(--accent-text); background: var(--accent); font-weight: 600; }
@media (max-width: 760px) {
  .topbar { position: static; }
  .topbar .wrap { height: auto; flex-wrap: wrap; gap: 6px; padding-top: 10px; padding-bottom: 8px; }
  .nav { margin-left: 0; width: 100%; flex-wrap: wrap; overflow: visible; gap: 2px 4px; }
  .nav a { padding: 5px 8px; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 9px; font-weight: 600;
  text-decoration: none; border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }

/* hero */
.hero { position: relative; padding: 64px 0 40px; border-bottom: 1px solid var(--line); isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.55;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 70%); mask-image: linear-gradient(to bottom, #000 0%, transparent 70%); }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 16px; max-width: 24ch; }
.hero .sub { font-size: 1.15rem; color: var(--muted); max-width: 56ch; margin: 0 0 28px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.proof { color: var(--muted); font-size: 0.92rem; margin: 0; }
.proof strong { color: var(--text); font-weight: 600; }

/* the real build: chat next to the model */
.build { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0; margin-top: 40px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.chat { padding: 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; font-size: 0.92rem; }
.bubble { padding: 10px 13px; border-radius: 12px; max-width: 100%; }
.bubble.you { background: var(--accent-soft); align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble.ai { background: var(--code-bg); border-bottom-left-radius: 4px; }
.bubble .who { display: block; font-size: 0.75rem; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.bubble ul { margin: 6px 0 0; padding-left: 18px; }
.model { margin: 0; display: flex; flex-direction: column; justify-content: center; background: var(--surface); padding: 12px; gap: 0; }
.model img { display: block; width: 100%; border-radius: 8px; background: #ffffff; border: 1px solid var(--line); }
.model figcaption { font-size: 0.78rem; color: var(--muted); padding: 8px 2px 0; }
.real-label { font-size: 0.8rem; color: var(--muted); margin-top: 10px; }
@media (max-width: 760px) {
  .build { grid-template-columns: 1fr; }
  .chat { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* sections */
section.block { padding: 64px 0; border-bottom: 1px solid var(--line); }
.eyebrow { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); font-weight: 700; margin: 0 0 10px; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 14px; }
h3 { font-size: 1.1rem; margin: 0 0 8px; letter-spacing: -0.01em; }
.lead { color: var(--muted); max-width: 62ch; margin: 0 0 32px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .grid3, .grid2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card p { margin: 0; color: var(--muted); }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 0.85rem;
  font-weight: 700; background: var(--accent-soft); color: var(--accent); margin-bottom: 12px; }

/* the report panel */
.report { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.report-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px;
  border-bottom: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.report-head .ok { color: var(--accent); font-weight: 600; }
.report table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.report th, .report td { text-align: left; padding: 11px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.report th { color: var(--muted); font-weight: 500; width: 30%; }
.report td { font-variant-numeric: tabular-nums; }
.report tr:last-child th, .report tr:last-child td { border-bottom: 0; }
.tick { color: var(--accent); font-weight: 700; }

/* works with */
.apps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.apps li { display: grid; grid-template-columns: 12em 1fr; gap: 14px; align-items: baseline; padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); }
.apps .tag { flex: none; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 6px; background: var(--code-bg); color: var(--muted); text-align: center; justify-self: start; }
.apps .tag.tested { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 560px) { .apps li { grid-template-columns: 1fr; gap: 6px; } }

/* video slot */
.video-slot { aspect-ratio: 16 / 9; border: 1px dashed var(--line); border-radius: 14px; display: grid; place-items: center;
  color: var(--muted); background: var(--surface); text-align: center; padding: 20px; }

/* faq */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details summary { cursor: pointer; font-weight: 600; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; float: right; color: var(--muted); }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin: 10px 0 0; }

/* text pages (Install, Examples, What it can do, Help) */
.page { padding: 40px 0 64px; }
.page .prose { max-width: 760px; }
.page .prose.wide { max-width: none; }
.page .prose.wide > p, .page .prose.wide > ul { max-width: 760px; }
.page h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -0.02em; margin: 0 0 18px; }
.prose h2 { margin-top: 40px; font-size: 1.45rem; }
.prose h3 { margin-top: 28px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.92rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; }
.prose img { border: 1px solid var(--line); border-radius: var(--radius); }
.prose blockquote { margin: 16px 0; padding: 4px 16px; border-left: 3px solid var(--accent); color: var(--muted); }

/* footer */
.footer { padding: 36px 0 48px; color: var(--muted); font-size: 0.88rem; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer a { color: var(--muted); }
.footer p { margin: 0; max-width: 60ch; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 20; }

/* focus, phone buttons, screen-reader text, tables of tool names */
a:focus-visible, summary:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 480px) { .hero .actions .btn { width: 100%; justify-content: center; } }
.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; }
.prose td code { overflow-wrap: normal; white-space: nowrap; }

/* What it can do: the tool areas */
.areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 8px 0 40px; }
@media (max-width: 640px) { .areas { grid-template-columns: 1fr; } }
.area { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.area .icon { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.prose .area h2 { margin: 10px 0 6px; font-size: 1.1rem; display: flex; align-items: baseline; gap: 8px; }
.area .count { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.area p { margin: 0 0 10px; color: var(--muted); font-size: 0.95rem; }
.area details { border: 0; padding: 0; }
.area summary { font-size: 0.88rem; color: var(--accent); font-weight: 600; }
.toollist { list-style: none; padding: 0; margin: 10px 0 0; font-size: 0.86rem; color: var(--muted); }
.toollist li { padding: 6px 0; border-top: 1px solid var(--line); }
.toollist code { color: var(--text); margin-right: 4px; }
.cannot { color: var(--muted); padding-left: 18px; }
.cannot li { margin: 4px 0; }

/* Two ways in, and the Examples cards */
.ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .ways { grid-template-columns: 1fr; } }
.way { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.way p { margin: 0; color: var(--muted); }
.way .visual { margin-top: auto; display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.way .visual img { width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.way .visual .arrow { color: var(--muted); font-size: 1.3rem; }
.way .visual .bubble { font-size: 0.85rem; }
.examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 8px; }
@media (max-width: 760px) { .examples { grid-template-columns: 1fr; } }
.example { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.example .bubble { margin: 16px 16px 0; font-size: 0.9rem; }
.example .pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; padding: 16px 16px 0; }
.example .pair .arrow { color: var(--muted); }
.example img { display: block; width: 100%; background: #fff; border-radius: 8px; border: 1px solid var(--line); }
.example .shot { padding: 16px 16px 0; }
.example .result { margin: auto 0 0; padding: 14px 16px; font-size: 0.9rem; color: var(--text); border-top: 1px solid var(--line); margin-top: 16px; }
.example .result .tick { margin-right: 6px; }
.example .kind { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-weight: 700; padding: 16px 16px 0; margin: 0; }
.prose .examples h3, .prose .example h3 { margin: 4px 16px 0; font-size: 1rem; }
@media (min-width: 1000px) { .prose.wide .areas, .prose.wide .examples { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* the light / dark switch */
.theme-toggle { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; padding: 0; }
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
@media (max-width: 760px) { .theme-toggle { position: absolute; right: 20px; top: 10px; } .topbar .wrap { position: relative; } }
.examples { align-items: start; }
.example .pair { grid-template-columns: 1fr; justify-items: stretch; }
.example .pair .arrow { justify-self: center; transform: rotate(90deg); line-height: 1; }

/* Home: parts built from official practice problems */
.showcase { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
@media (max-width: 1000px) { .showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .showcase { grid-template-columns: 1fr; } }
.show { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.show img { display: block; width: 100%; height: auto; background: #fff; border-bottom: 1px solid var(--line); }
.show figcaption { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 0.92rem; }
.show figcaption span { color: var(--muted); font-variant-numeric: tabular-nums; }
.show-more { margin: 12px 0 0; font-weight: 600; }
.show-credit { color: var(--muted); font-size: 0.9rem; margin: 16px 0 0; max-width: 80ch; }
