/* ineffable.nl. Same tokens as the dashboard: teal acts, amber escalates. */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 600; font-display: swap; src: url(/fonts/bricolage-grotesque-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  --ink: #1b1f2a; --ink-2: #3a4152; --muted: #5c6577; --paper: #f4f6f9; --surface: #fff; --sunken: #eceff4;
  --rule: #dce1e8; --act: #0e6e6e; --act-soft: #d7ecea; --escalate: #b8740f; --escalate-bar: #d98e1f;
  --bar-rest: #c9d0da; --focus: #2f6fb0; --escalate-text: #94590a;
  --display: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e6eaf0; --ink-2: #c3cad6; --muted: #8d97a9; --paper: #11151d; --surface: #171c26; --sunken: #1d2330;
    --rule: #2a3140; --act: #3fb8af; --act-soft: #173a3a; --escalate: #f0b45a; --escalate-bar: #e6a342;
    --bar-rest: #394254; --focus: #6aa6e6; --escalate-text: #f0b45a; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--act); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0; }
code, pre { font-family: var(--mono); font-size: 0.88em; }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }
.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; }

header.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.logo { display: flex; align-items: center; gap: 10px; font: 600 20px var(--display); color: var(--ink); text-decoration: none; }
.logo i { display: block; height: 14px; border-radius: 3px; }
.top nav { display: flex; gap: 22px; align-items: center; font-size: 15px; }
.top nav a { color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.top nav a.button { color: #fff; }
.button { display: inline-block; background: var(--act); color: #fff; padding: 10px 18px; border-radius: 7px; text-decoration: none; font-weight: 500; border: 0; font: 500 16px var(--body); cursor: pointer; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .button, :root:not([data-theme="light"]) .top nav a.button { color: #0b1515; } :root:not([data-theme="light"]) .button.quiet { color: var(--ink); } }
.button.quiet { background: transparent; color: var(--ink); border: 1px solid var(--rule); }

/* ---------------------------------------------------------------- hero: a decision, live */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding: 56px 0 88px; }
.hero h1 { font: 600 clamp(44px, 6.4vw, 78px)/0.98 var(--display); letter-spacing: -0.025em; }
.hero h1 span { color: var(--act); }
.hero .lede { margin-top: 22px; font-size: 20px; color: var(--ink-2); max-width: 30em; }
.hero .cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

.decision { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 22px; box-shadow: 0 1px 2px rgba(27,31,42,.05), 0 18px 40px rgba(27,31,42,.07); }
.decision .msg { font-size: 16px; min-height: 3.4em; color: var(--ink); }
.decision .msg::before { content: "state"; display: block; font: 12px var(--mono); color: var(--muted); margin-bottom: 4px; }
.decision .caret { display: inline-block; width: 2px; height: 1.05em; background: var(--act); vertical-align: -2px; margin-left: 1px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.q { border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 14px; }
.q-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 14px; }
.q-head b { font: 500 13px var(--mono); }
.q-head .tag { font: 12px var(--mono); padding: 1px 8px; border-radius: 99px; background: var(--act-soft); color: var(--act); transition: background .3s, color .3s; }
.q.escalate .q-head .tag { background: color-mix(in srgb, var(--escalate-bar) 20%, transparent); color: var(--escalate); }
.bar { display: grid; grid-template-columns: 110px 1fr 46px; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.bar .t { height: 9px; background: var(--sunken); border-radius: 3px; overflow: hidden; }
.bar .f { height: 100%; width: 0; background: var(--bar-rest); border-radius: 3px; transition: width .7s cubic-bezier(.2,.8,.2,1); }
.bar.on { color: var(--ink); font-weight: 600; }
.bar.on .f { background: var(--act); }
.q.escalate .bar.on .f { background: var(--escalate-bar); }
.bar .p { font: 12px var(--mono); text-align: right; color: var(--muted); }
.decision .foot { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 12px var(--mono); color: var(--muted); }
.decision .foot-r { display: flex; align-items: center; gap: 12px; }
.demo-toggle { font: 12px var(--mono); color: var(--ink-2); background: transparent; border: 1px solid var(--rule); border-radius: 99px; padding: 3px 10px; cursor: pointer; }
.demo-toggle:hover { color: var(--act); border-color: var(--act); }
.decision.paused .caret { animation: none; opacity: 0; }

/* ---------------------------------------------------------------- sections */
section { padding: 72px 0; border-top: 1px solid var(--rule); }
section h2 { font: 600 clamp(30px, 3.6vw, 44px)/1.05 var(--display); letter-spacing: -0.015em; max-width: 18em; }
section .intro { margin-top: 14px; color: var(--ink-2); max-width: 40em; font-size: 18px; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 40px; }
.cols > div { min-width: 0; }
.cols h3 { font-size: 18px; margin-bottom: 8px; }
.cols p { color: var(--ink-2); font-size: 16px; }
.cols pre { margin-top: 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 12px; font-size: 12.5px; overflow-x: auto; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; margin-top: 40px; }
.fact { background: var(--surface); padding: 22px; }
.fact .v { font: 500 34px/1.1 var(--mono); letter-spacing: -0.02em; }
.fact .l { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.fact .s { margin-top: 6px; font-size: 13px; color: var(--muted); }
.note { margin-top: 14px; font-size: 14px; color: var(--muted); max-width: 60em; }

.loop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; counter-reset: step; }
.loop li { list-style: none; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 20px; position: relative; }
.loop li::before { counter-increment: step; content: counter(step); font: 500 13px var(--mono); color: var(--act); display: block; margin-bottom: 10px; }
.loop h3 { font-size: 17px; margin-bottom: 6px; }
.loop p { font-size: 15px; color: var(--ink-2); }
.loop-note { margin-top: 14px; color: var(--muted); font-size: 15px; }

.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 40px; }
.fit ul { margin: 10px 0 0; padding-left: 20px; color: var(--ink-2); }
.fit li { margin: 6px 0; }

form.join { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; max-width: 760px; }
form.join label { display: block; font-size: 14px; color: var(--ink-2); }
form.join .full { grid-column: 1 / -1; }
form.join input, form.join textarea { width: 100%; margin-top: 6px; font: 16px var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 7px; padding: 10px 12px; }
form.join textarea { min-height: 90px; resize: vertical; }
form.join .status { align-self: center; font-size: 15px; }
form.join .status.ok { color: var(--act); }
form.join .status.err { color: var(--escalate-text); }
.joined { display: none; margin-top: 24px; font-size: 17px; color: var(--act); }
.joined.err { color: var(--escalate-text); }
.joined:target { display: block; }

footer { border-top: 1px solid var(--rule); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* ---------------------------------------------------------------- docs */
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 48px; padding: 24px 0 80px; }
.docs aside { position: sticky; top: 24px; align-self: start; font-size: 15px; }
.docs aside a { display: block; color: var(--ink-2); text-decoration: none; padding: 4px 0; }
.docs aside a:hover { color: var(--act); }
.docs article { min-width: 0; max-width: 760px; }
.docs h1 { font: 600 44px/1.05 var(--display); letter-spacing: -0.02em; margin-bottom: 14px; }
.docs h2 { font: 600 26px var(--display); margin: 48px 0 12px; padding-top: 8px; }
.docs h3 { font-size: 17px; margin: 24px 0 8px; }
.docs p, .docs li { color: var(--ink-2); }
.docs p + p { margin-top: 12px; }
.docs pre { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 14px; overflow-x: auto; margin: 12px 0; font-size: 13px; line-height: 1.55; }
.docs code { background: var(--sunken); padding: 1px 5px; border-radius: 4px; }
.docs pre code { background: none; padding: 0; }
.docs table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.docs th, .docs td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.docs th { font-size: 13px; color: var(--muted); font-weight: 500; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 24px; }
  .cols, .loop { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fit { grid-template-columns: 1fr; }
  .docs { grid-template-columns: 1fr; }
  .docs aside { position: static; display: flex; flex-wrap: wrap; gap: 4px 16px; }
}
@media (max-width: 600px) {
  .cols, .loop, .facts { grid-template-columns: 1fr; }
  form.join { grid-template-columns: 1fr; }
  .top nav { gap: 14px; }
  .top nav a:not(.button):not(.signin) { display: none; }
  .top nav a.button { padding: 8px 12px; font-size: 15px; }
  .bar { grid-template-columns: 90px 1fr 40px; }
}
@media (max-width: 380px) {
  header.top { flex-wrap: wrap; gap: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------- 404 */
.notfound { padding: 72px 0 120px; max-width: 40em; }
.notfound .code { font: 13px var(--mono); color: var(--escalate-text); margin-bottom: 18px; }
.notfound h1 { font: 600 clamp(44px, 6.4vw, 78px)/0.98 var(--display); letter-spacing: -0.025em; }
.notfound h1 span { color: var(--act); }
.notfound .lede { margin-top: 22px; font-size: 20px; color: var(--ink-2); }
.notfound .cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
