/* Croutons design system — shared by croutons.ai and agentc.croutons.ai.
   One monochrome scale: ink on white, quiet greys, hairline borders.
   The only hue is a muted red, reserved for errors. Older token names
   (action, brand, crust) are kept so components need no changes. */

:root {
    --paper: #fafafa; --surface: #ffffff; --surface-2: #f3f3f3; --line: #e8e8e8; --line-strong: #d6d6d6;
    --ink: #111111; --ink-2: #4d4d4d; --ink-3: #8c8c8c;
    --action: #111111; --action-hover: #2e2e2e; --action-soft: #f1f1f1; --action-ink: #111111; --on-action: #ffffff;
    --brand: #111111; --brand-soft: #f1f1f1; --crust: #8c8c8c; --crust-soft: #f1f1f1;
    --alert: #8f2d2d; --alert-soft: #f8eded; --ok: #111111;
    --shadow: 0 1px 2px rgb(0 0 0 / .04);
  --radius: 10px;
  --radius-sm: 6px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 1080px;
  --read: 680px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b0b0b; --surface: #121212; --surface-2: #1a1a1a; --line: #242424; --line-strong: #333333;
    --ink: #ededed; --ink-2: #a6a6a6; --ink-3: #717171;
    --action: #ededed; --action-hover: #ffffff; --action-soft: #1c1c1c; --action-ink: #ededed; --on-action: #0b0b0b;
    --brand: #ededed; --brand-soft: #1c1c1c; --crust: #717171; --crust-soft: #1c1c1c;
    --alert: #e08a8a; --alert-soft: #2a1717; --ok: #ededed;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --paper: #0b0b0b; --surface: #121212; --surface-2: #1a1a1a; --line: #242424; --line-strong: #333333;
    --ink: #ededed; --ink-2: #a6a6a6; --ink-3: #717171;
    --action: #ededed; --action-hover: #ffffff; --action-soft: #1c1c1c; --action-ink: #ededed; --on-action: #0b0b0b;
    --brand: #ededed; --brand-soft: #1c1c1c; --crust: #717171; --crust-soft: #1c1c1c;
    --alert: #e08a8a; --alert-soft: #2a1717; --ok: #ededed;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration-thickness: 1px; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { color: var(--ink); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.15; letter-spacing: -.02em; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
li { margin: .25em 0; }
small, .meta { color: var(--ink-3); font-size: .875rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.read { max-width: var(--read); }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.section { padding-block: 64px; }
@media (min-width: 720px) { .section { padding-block: 96px; } }
.eyebrow { display: inline-block; font-size: .74rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.lead { font-size: clamp(1.08rem, 2.4vw, 1.25rem); color: var(--ink-2); line-height: 1.5; }
.plain { font-size: 1.08rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--ink); padding: 14px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.plain b { display: block; font-size: .72rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }

/* Header */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.05rem; letter-spacing: -.02em; }
.logo svg { width: auto; height: 13px; overflow: visible; }
.nav { display: none; margin-left: auto; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .95rem; padding: 8px 12px; border-radius: 10px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.top .btn { margin-left: auto; }
@media (min-width: 960px) { .nav { display: flex; } .top .btn { margin-left: 8px; } .menu-btn { display: none; } }
.menu-btn { background: none; border: 0; padding: 10px; margin-right: -10px; color: var(--ink); cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }
.drawer { display: none; border-top: 1px solid var(--line); background: var(--paper); }
.drawer.open { display: block; }
.drawer a { display: block; padding: 14px 16px; color: var(--ink); text-decoration: none; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
@media (min-width: 960px) { .drawer { display: none !important; } }

/* Buttons + chips (match app: "Start again", "Add this section") */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid transparent; font: 500 .95rem/1 var(--font); letter-spacing: -.005em; text-decoration: none; cursor: pointer; transition: background .15s, transform .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { background: var(--action-hover); color: var(--on-action); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-quiet:hover { background: var(--surface); border-color: var(--ink-3); color: var(--ink); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: .88rem; }
.btn-lg { min-height: 46px; padding: 0 22px; font-size: .98rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--ink-2); font-size: .76rem; font-weight: 500; letter-spacing: .02em; text-decoration: none; }
.chip.green, .chip.gold, .chip.gray { background: transparent; color: var(--ink-2); }
.textlink { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.textlink::after { content: " \203A"; }
.textlink:hover { color: var(--ink); }

/* Cards & lists (match app panels) */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
@media (min-width: 720px) { .card { padding: 24px; } }
a.card { display: block; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.row:first-child { border-top: 0; }
a.row:hover { background: var(--surface-2); }
.row .bar { width: 3px; align-self: stretch; border-radius: 2px; background: var(--line-strong); flex: none; }
.row .bar.blue { background: var(--action); }
.row .grow { flex: 1; min-width: 0; }
.row h3 { font-size: 1.02rem; margin: 0 0 4px; }
.row p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.row .chev { color: var(--ink-3); flex: none; margin-top: 2px; }
.kv { display: grid; grid-template-columns: 1fr; gap: 6px 20px; margin: 0; }
.kv dt { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-top: 10px; }
.kv dd { margin: 0; }
.ticks { list-style: none; padding: 0; }
.ticks li { padding-left: 28px; position: relative; margin: 8px 0; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 12px; border-radius: 3px; background: var(--brand); transform: rotate(45deg) scale(.75); }
.ticks.gold li::before { background: var(--crust); }
.ticks.gray li::before { background: var(--line-strong); }

/* Breadcrumbs */
.crumbs { font-size: .88rem; color: var(--ink-3); padding-top: 20px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--ink-2); text-decoration: none; }

/* Page hero */
.page-hero { padding-top: 28px; padding-bottom: 40px; }
@media (min-width: 720px) { .page-hero { padding-top: 48px; padding-bottom: 56px; } }
.page-hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); max-width: 18ch; }
.page-hero .lead { max-width: 60ch; }

/* Team progress (app's SEO → Measure dots) */
.steps { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); position: relative; margin: 24px 0; }
.steps::before { content: ""; position: absolute; top: 6px; left: calc(50% / var(--n, 5)); right: calc(50% / var(--n, 5)); height: 1px; background: var(--action); opacity: .5; }
.steps li { list-style: none; text-align: center; position: relative; font-size: .88rem; color: var(--ink); margin: 0; }
.steps li::before { content: ""; display: block; width: 9px; height: 9px; margin: 2px auto 10px; border-radius: 50%; background: var(--action); position: relative; }
.steps li.open::before { width: 13px; height: 13px; margin-top: 0; margin-bottom: 8px; background: var(--paper); border: 1.5px solid var(--action); }
.steps small { display: block; color: var(--ink-3); font-size: .78rem; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative; font-weight: 600; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 26px; width: 9px; height: 9px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 30px; }
.faq .a { padding: 0 0 20px; color: var(--ink-2); max-width: 65ch; }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .92rem; }
.field .hint { font-size: .82rem; color: var(--ink-3); }
input[type=text], input[type=email], input[type=tel], input[type=url], select, textarea { width: 100%; font: 400 16px/1.4 var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px; min-height: 48px; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px var(--action-soft); }
.notice { padding: 12px 14px; border-radius: 10px; font-size: .95rem; }
.notice.ok { background: var(--brand-soft); color: var(--brand); }
.notice.err { background: var(--alert-soft); color: var(--alert); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 48px 32px; margin-top: 32px; font-size: .92rem; }
.foot-grid { display: grid; gap: 28px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 1.4fr repeat(4, 1fr); } }
.foot h2 { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; font-weight: 600; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 7px 0; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot .brandcol { grid-column: 1 / -1; }
@media (min-width: 860px) { .foot .brandcol { grid-column: auto; } }
.foot .legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--ink-3); font-size: .85rem; }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
