/* Shared look for the decidekit pages: shadcn-style zinc tokens, Geist, one lime accent. */
:root {
  --bg: #ffffff; --fg: #09090b; --card: #ffffff; --muted: #71717a; --line: #e4e4e7; --soft: #f4f4f5;
  --accent: #cffb2d; --accent-fg: #09090b; --pink: #e0457b; --ring: #a1a1aa; --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not(.light) { --bg: #09090b; --fg: #fafafa; --card: #0f0f12; --muted: #a1a1aa; --line: #27272a; --soft: #18181b; --pink: #ff7ab6; --ring: #52525b; color-scheme: dark; }
}
body.dark { --bg: #09090b; --fg: #fafafa; --card: #0f0f12; --muted: #a1a1aa; --line: #27272a; --soft: #18181b; --pink: #ff7ab6; --ring: #52525b; color-scheme: dark; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.55 Geist, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
main { max-width: 1040px; margin: 0 auto; padding: 20px 16px 48px; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--ring); }
code, .mono { font-family: "Geist Mono", ui-monospace, monospace; font-size: .92em; }
h1 { font-size: 1.75rem; line-height: 1.2; letter-spacing: -.02em; margin: 18px 0 6px; font-weight: 600; }
h2 { font-size: .95rem; margin: 0 0 2px; font-weight: 600; }
.lead { color: var(--muted); margin: 0 0 20px; max-width: 68ch; font-size: 15px; }
.fine { color: var(--muted); font-size: 12.5px; margin-top: 14px; max-width: 90ch; }
[hidden] { display: none !important; }

nav.top { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
nav.top a { text-decoration: none; } nav.top a:hover { color: var(--fg); } nav.top b { color: var(--fg); font-weight: 500; }
nav.top .end { margin-left: auto; }
nav.top .end + .end { margin-left: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card .desc { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 820px) { .grid { grid-template-columns: minmax(0, 1fr); } }

label.field { display: block; font-weight: 500; font-size: 13px; margin: 14px 0 6px; }
input, textarea, button { font: inherit; color: inherit; }
input[type=text], input:not([type]), textarea {
  width: 100%; background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; font-family: "Geist Mono", ui-monospace, monospace; font-size: 12.5px; line-height: 1.6; }
input:focus, textarea:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 25%, transparent); }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; }

button { cursor: pointer; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 7px 14px; font-weight: 500; transition: background .15s, opacity .15s; }
button:hover { background: color-mix(in srgb, var(--soft) 70%, var(--line)); }
button.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
button.primary:hover { opacity: .9; }
button:disabled { opacity: .45; cursor: default; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.row input { flex: 1; min-width: 220px; }

.tabs { display: flex; gap: 2px; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; padding: 3px; flex-wrap: wrap; }
.tabs button { flex: 1; background: transparent; border: 0; border-radius: 6px; padding: 6px 10px; color: var(--muted); white-space: nowrap; }
.tabs button[aria-selected=true] { background: var(--card); color: var(--fg); box-shadow: 0 1px 2px rgb(0 0 0 / .15); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips button { background: transparent; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.chips button:hover { color: var(--fg); border-color: var(--ring); }

.badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; font-size: 12px; color: var(--muted); }
.badge.on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; user-select: none; }
.switch input { appearance: none; width: 32px; height: 18px; border-radius: 999px; background: var(--line); position: relative; margin: 0; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); transition: transform .15s; }
.switch input:checked { background: var(--fg); } .switch input:checked::after { transform: translateX(14px); }
input[type=range] { accent-color: var(--fg); width: 120px; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-top: 12px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

main.wide { max-width: 1040px; }
canvas { display: block; width: 100%; }

/* lanes/?embed: just the demo, for the front page */
.embed nav.top, .embed h1, .embed .lead, .embed .fine { display: none; }
.embed main { padding: 0 0 16px; max-width: none; }
/* The front page draws the frame, so the card's own border would double it. */
.embed .card { border: 0; border-radius: 0; }
.embed .row, .embed .legend { padding: 0 16px; }
html.embed { overflow: hidden; }
.embed body { background: transparent; }

/* First-visit model download, shown where the result will appear. */
.loading { padding: 8px 0; }
.loading p { margin: 0 0 10px; }
.loading .hint { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
.loading .bar { height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.loading .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
