/* Agent Request Desk design system. Reference: /design */

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

/* 1. Palette: cool neutrals, one signal colour, one routed colour. No warm greys. */
:root {
  --ink: #0a0b0d;
  --white: #ffffff;
  --mist: #f4f5f7;
  --line: #e4e7eb;
  --slate: #5c636e;
  --slate-light: #8a919c;
  --signal: #ff5a1f;
  --routed: #0e9f6e;

  /* 2. Roles (light) */
  --bg: var(--white);
  --surface: var(--mist);
  --text: var(--ink);
  --text-2: var(--slate);
  --text-3: var(--slate-light);
  --border: var(--line);
  --code-bg: var(--ink);
  --code-text: #edeff2;
  --code-muted: #9aa1ab;
  --accent: var(--signal);
  --accent-soft: #ffe3d8;
  --accent-text: #c2410c;
  --ok: var(--routed);
  --ok-soft: #d9f3ea;
  --ok-text: #047857;
  --focus: #2f6bff;

  /* 3. Type */
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --fs-xs: 0.8125rem;   /* 13 */
  --fs-sm: 0.875rem;    /* 14 */
  --fs-md: 1rem;        /* 16 */
  --fs-lg: 1.1875rem;   /* 19 */
  --fs-xl: 1.5rem;      /* 24 */
  --fs-2xl: clamp(2rem, 1.4rem + 2.6vw, 2.875rem); /* 32 to 46 */

  /* 4. Space and shape */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --radius: 8px;
  --radius-lg: 12px;
  --hair: 1px solid var(--border);
  --measure: 760px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0b0d;
    --surface: #15181d;
    --text: #edeff2;
    --text-2: #9aa1ab;
    --text-3: #6b727d;
    --border: #262a31;
    --code-bg: #15181d;
    --accent: #ff6b33;
    --accent-soft: #3a1a0e;
    --accent-text: #ff8a5c;
    --ok: #2bc48a;
    --ok-soft: #0c2e22;
    --ok-text: #34d399;
    --focus: #6f97ff;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0b0d; --surface: #15181d; --text: #edeff2; --text-2: #9aa1ab; --text-3: #6b727d; --border: #262a31;
  --code-bg: #15181d; --accent: #ff6b33; --accent-soft: #3a1a0e; --accent-text: #ff8a5c;
  --ok: #2bc48a; --ok-soft: #0c2e22; --ok-text: #34d399; --focus: #6f97ff;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-md)/1.6 var(--font);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--text-3); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
code, pre, kbd, .mono { font-family: var(--mono); font-size: 0.9em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 20px; }
.section { padding: var(--s8) 0 0; }
.section > * + * { margin-top: var(--s4); }
.lead { font-size: var(--fs-lg); color: var(--text-2); line-height: 1.5; max-width: 34em; }
.muted { color: var(--text-2); }
.small { font-size: var(--fs-sm); }
.eyebrow { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-2); letter-spacing: 0; }
.stack > * + * { margin-top: var(--s3); }
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); margin-top: var(--s5); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--s4); }

/* Header and footer */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s5) 0; }
.brand { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 500; text-decoration: none; }
.nav { display: flex; gap: var(--s5); font-size: var(--fs-sm); }
.nav a { text-decoration: none; color: var(--text-2); }
.nav a:hover { color: var(--text); }
.site-footer { margin-top: var(--s9); padding: var(--s6) 0 var(--s7); border-top: var(--hair); font-size: var(--fs-sm); color: var(--text-2); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s3); }
@media (max-width: 560px) { .nav .hide-sm { display: none; } }

/* The beacon mark */
.beacon { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.beacon::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: var(--accent-soft); z-index: -1; }
@media (prefers-reduced-motion: no-preference) {
  .beacon.live::after { animation: pulse 2.4s ease-out infinite; }
  @keyframes pulse { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }
}

/* Hero */
.hero { padding: var(--s8) 0 0; }
.hero h1 { max-width: 15em; }
.hero .lead { margin-top: var(--s4); }
.facts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s4); font-size: var(--fs-sm); color: var(--text-2); }
.facts span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: var(--s2); vertical-align: 2px; }

/* Copy line: the install URL or a command */
.copyline {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  background: var(--code-bg); color: var(--code-text); border: 1px solid var(--code-bg);
  border-radius: var(--radius); padding: var(--s3) var(--s3) var(--s3) var(--s4);
  font-family: var(--mono); font-size: var(--fs-sm); margin-top: var(--s5);
}
:root[data-theme="dark"] .copyline { border-color: var(--border); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .copyline { border-color: var(--border); } }
.copyline code { min-width: 0; font-size: inherit; overflow-x: auto; white-space: nowrap; scrollbar-width: none; background: none; border: 0; padding: 0; color: inherit; }
.copy {
  flex: none; font: 500 var(--fs-xs) var(--font); color: var(--code-muted); background: transparent;
  border: 1px solid #2d3239; border-radius: 6px; padding: 4px 10px; cursor: pointer;
}
.copy:hover { color: var(--code-text); border-color: var(--code-muted); }
.copy[data-done] { color: #34d399; border-color: #1f5f48; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s4);
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font: 500 var(--fs-sm) var(--font); text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--text-3); }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { opacity: 0.88; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* Code blocks */
pre {
  margin: 0; background: var(--code-bg); color: var(--code-text); border-radius: var(--radius);
  padding: var(--s4); overflow-x: auto; font-size: var(--fs-xs); line-height: 1.65;
}
:root[data-theme="dark"] pre { border: var(--hair); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) pre { border: var(--hair); } }
pre .c { color: var(--code-muted); }
pre .k { color: #ff8a5c; }
pre .s { color: #7ee2b8; }
:not(pre) > code { background: var(--surface); border: var(--hair); border-radius: 5px; padding: 1px 5px; font-size: 0.86em; }

/* Tabs: radio inputs, so they work without JavaScript */
.tabs { margin-top: var(--s5); }
.tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.tablist { display: flex; flex-wrap: wrap; gap: var(--s1); border-bottom: var(--hair); }
.tablist label {
  font-size: var(--fs-sm); color: var(--text-2); padding: var(--s2) var(--s3); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tablist label:hover { color: var(--text); }
.panel { display: none; padding-top: var(--s4); }
.panel > * + * { margin-top: var(--s3); }
.tabs > input:focus-visible + .tablist { outline: none; }
#t1:checked ~ .tablist [for="t1"], #t2:checked ~ .tablist [for="t2"], #t3:checked ~ .tablist [for="t3"],
#t4:checked ~ .tablist [for="t4"], #t5:checked ~ .tablist [for="t5"], #t6:checked ~ .tablist [for="t6"],
#t7:checked ~ .tablist [for="t7"] { color: var(--text); border-bottom-color: var(--text); }
#t1:focus-visible ~ .tablist [for="t1"], #t2:focus-visible ~ .tablist [for="t2"], #t3:focus-visible ~ .tablist [for="t3"],
#t4:focus-visible ~ .tablist [for="t4"], #t5:focus-visible ~ .tablist [for="t5"], #t6:focus-visible ~ .tablist [for="t6"],
#t7:focus-visible ~ .tablist [for="t7"] { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 4px; }
#t1:checked ~ #p1, #t2:checked ~ #p2, #t3:checked ~ #p3, #t4:checked ~ #p4,
#t5:checked ~ #p5, #t6:checked ~ #p6, #t7:checked ~ #p7 { display: block; }
.steps { margin: 0; padding-left: 1.25em; color: var(--text-2); }
.steps li + li { margin-top: var(--s1); }
.steps strong { color: var(--text); font-weight: 500; }

/* Flow: three numbered steps */
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--s4); margin-top: var(--s5); }
.flow > div { border-top: var(--hair); padding-top: var(--s3); }
.flow .n { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-3); }
.flow h3 { font-size: var(--fs-md); margin-top: var(--s2); }
.flow p { font-size: var(--fs-sm); color: var(--text-2); margin-top: var(--s1); }

/* Example exchange: request above reply */
.exchange { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); margin-top: var(--s6); }

/* Log: the demand list and report previews */
.log { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: var(--fs-xs); margin-top: var(--s3); }
.log caption { text-align: left; font-family: var(--font); font-size: var(--fs-sm); color: var(--text-2); padding-bottom: var(--s2); }
.log th { text-align: left; font-weight: 500; color: var(--text-3); padding: var(--s2) var(--s3) var(--s2) 0; border-bottom: var(--hair); }
.log td { padding: 10px var(--s3) 10px 0; border-bottom: var(--hair); vertical-align: top; }
.log td.num, .log th.num { text-align: right; padding-right: 0; white-space: nowrap; }
.log a { text-decoration-color: var(--border); }
.log tr:last-child td { border-bottom: 0; }
.log-wrap { overflow-x: auto; }

/* Status dots and badges */
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--text-3); }
.dot.blocked { background: var(--accent); }
.dot.routed { background: var(--ok); }
.badge {
  display: inline-flex; align-items: center; gap: 6px; font: 500 var(--fs-xs) var(--font);
  padding: 2px 8px; border-radius: 999px; border: var(--hair); color: var(--text-2);
}
.badge.soon { color: var(--accent-text); border-color: var(--accent-soft); background: var(--accent-soft); }
.badge.ok { color: var(--ok-text); border-color: var(--ok-soft); background: var(--ok-soft); }
.t-blocked { color: var(--accent-text); }
.t-routed { color: var(--ok-text); }

/* Cards and panels */
.card { border: var(--hair); border-radius: var(--radius-lg); padding: var(--s5); background: var(--bg); }
.card > * + * { margin-top: var(--s3); }
.card-quiet { background: var(--surface); border-color: transparent; }
.example { position: relative; border: 1px dashed var(--border); border-radius: var(--radius); padding: var(--s3) var(--s4); }
.example-label { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.stats { display: flex; flex-wrap: wrap; gap: var(--s5) var(--s7); margin-top: var(--s4); }
.stat b { display: block; font-size: var(--fs-xl); font-weight: 500; letter-spacing: -0.02em; }
.stat span { font-size: var(--fs-xs); color: var(--text-2); }
.bars { display: grid; gap: 6px; margin-top: var(--s3); font-size: var(--fs-xs); }
.bar { display: grid; grid-template-columns: 9.5em 1fr 3em; align-items: center; gap: var(--s3); }
.bar i { display: block; height: 6px; border-radius: 3px; background: var(--accent); min-width: 2px; }
.bar span:last-child { text-align: right; font-family: var(--mono); color: var(--text-2); }
.never { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s2); }
.never li { padding-left: 1.5em; position: relative; color: var(--text-2); }
.never li::before { content: "×"; position: absolute; left: 0; color: var(--accent-text); font-family: var(--mono); }

/* Forms */
.field { display: grid; gap: 6px; }
.field label, .legend { font-size: var(--fs-sm); font-weight: 500; }
.field .hint { font-size: var(--fs-xs); color: var(--text-2); }
input[type="email"], input[type="text"] {
  width: 100%; min-height: 42px; padding: 0 var(--s3); font: inherit; font-size: var(--fs-sm); color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
}
input[type="email"]:hover, input[type="text"]:hover { border-color: var(--text-3); }
.choice { display: flex; flex-wrap: wrap; gap: var(--s2); }
.choice label {
  display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); padding: var(--s2) var(--s3);
  border: var(--hair); border-radius: var(--radius); cursor: pointer;
}
.choice input { accent-color: var(--text); margin: 0; }
.form { display: grid; gap: var(--s4); margin-top: var(--s5); max-width: 520px; }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { font-size: var(--fs-sm); min-height: 1.5em; }
.msg.ok { color: var(--ok-text); }
.msg.err { color: var(--accent-text); }

/* Prose pages (privacy) */
.prose { max-width: 40em; }
.prose h2 { margin-top: var(--s7); }
.prose h2 + * { margin-top: var(--s3); }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: var(--s3); }
.prose ul { padding-left: 1.25em; margin: var(--s3) 0 0; }
.prose li + li { margin-top: var(--s1); }
.prose li { color: var(--text-2); }
.prose li strong { color: var(--text); font-weight: 500; }

/* Design reference page */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--s3); margin-top: var(--s4); }
.swatch { font-size: var(--fs-xs); color: var(--text-2); }
.swatch div { height: 56px; border-radius: var(--radius); border: var(--hair); margin-bottom: var(--s2); }
.sw-ink { background: #0a0b0d; } .sw-white { background: #ffffff; } .sw-mist { background: #f4f5f7; }
.sw-line { background: #e4e7eb; } .sw-slate { background: #5c636e; } .sw-slate-light { background: #8a919c; }
.sw-signal { background: #ff5a1f; } .sw-routed { background: #0e9f6e; } .sw-dark-surface { background: #15181d; }
.type-row { display: grid; grid-template-columns: 7em 1fr; gap: var(--s4); align-items: baseline; padding: var(--s3) 0; border-bottom: var(--hair); }
.type-row .eyebrow { margin: 0; }
.fs-2xl { font-size: var(--fs-2xl); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.fs-xl { font-size: var(--fs-xl); font-weight: 500; letter-spacing: -0.02em; }
.fs-lg { font-size: var(--fs-lg); }
.fs-sm { font-size: var(--fs-sm); }
.fs-xs { font-size: var(--fs-xs); }

/* Report page */
.hero-actions { margin-top: var(--s5); }
.flow-list { list-style: none; counter-reset: step; padding: 0; margin: var(--s5) 0 0; display: grid; gap: var(--s6); }
.flow-list > li { counter-increment: step; border-top: var(--hair); padding-top: var(--s4); }
.flow-list > li > * + * { margin-top: var(--s3); }
.flow-list h3::before { content: "0" counter(step); font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-3); display: block; margin-bottom: var(--s1); font-weight: 400; }
.form-inline { margin-top: var(--s3); }
.report-block { margin-top: var(--s6); }
.log td.desc { font-family: var(--font); font-size: var(--fs-sm); color: var(--text-2); min-width: 14em; }
.log td.nowrap { white-space: nowrap; }
.log .sub { display: block; color: var(--text-3); }
[hidden] { display: none !important; }
