/* Agent Launcher V4 "The Floor" spec pages.
   nomo identity, AgentLauncher accent block (copied from app/globals.css).
   [A] marks adaptations beyond the reference. Mono is for data only. */
:root {
  color-scheme: dark;

  --accent: #35f0a0;
  --accent-hover: #6dffbf;
  --on-accent: #08241a;
  --text: #bfd0c5;
  --glow-1: #172b23;
  --glow-2: #121f1a;
  --tint-fill: #1c2f27;
  --tint-border: #3f6050;

  --canvas: #101011;
  --canvas-deep: #0a0a0b;
  --card: #151716;
  --card-2: #191c1a;
  --text-bright: #ecece8;
  --muted: #a3a3a8;
  --dim: #8c8c94;
  --border: #3b3b3e;
  --border-hover: #65665f;
  --surface-hover: #202122;
  --scrim: #101011a6;
  --hairline: #232325;
  --line: #2c2f2d;
  --down: #ff6b6b;
  --down-fill: #2a1617;
  --down-border: #5a2a2b;
  --focus: #777780;

  --sans: "Geist", "Inter Tight", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --fs-display: clamp(56px, 6.2vw, 96px);
  --fs-section: 28px;
  --fs-title: 20px;
  --fs-lead: 17px;
  --fs-body: 15px;
  --fs-ui: 13px;
  --fs-meta: 12px;
  --fs-label: 11px;

  --r-sm: 6px;
  --r-control: 7px;
  --r-button: 8px;
  --r-card: 14px;
  --r-pill: 999px;

  --dur-ui: 180ms;
  --ease-arrive: cubic-bezier(0.2, 0.7, 0.25, 1);

  --gutter: 44px;
  --frame: 1480px;
}
@media (max-width: 760px) {
  :root { --gutter: 24px; --fs-display: clamp(48px, 11.5vw, 72px); --fs-lead: 16px; --fs-section: 24px; }
}
@media (max-width: 480px) {
  :root { --gutter: 20px; --fs-display: clamp(44px, 14vw, 60px); --fs-lead: 15px; --fs-label: 10px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--canvas); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--text);
  font: 400 var(--fs-body)/1.55 var(--sans);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.glow::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 760px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 70% 100% at 22% 0%, var(--glow-1) 0, var(--glow-2) 32%, transparent 72%);
}
a { color: var(--text-bright); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 1px solid var(--focus); outline-offset: 4px; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; color: var(--text); }
p { margin: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--tint-border); color: var(--text-bright); }

.frame { width: min(100% - 2 * var(--gutter), var(--frame)); margin-inline: auto; }

/* ---------- type ---------- */
.display { font-size: var(--fs-display); line-height: 0.99; letter-spacing: -0.072em; text-wrap: balance; }
@media (max-width: 760px) { .display { letter-spacing: -0.067em; } }
.section-title { font-size: var(--fs-section); line-height: 1.15; letter-spacing: -0.04em; }
.title { font-size: var(--fs-title); line-height: 1.25; letter-spacing: -0.03em; color: var(--text-bright); }
.lead { color: var(--muted); font-size: var(--fs-lead); line-height: 1.55; letter-spacing: -0.022em; max-width: 62ch; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.bright { color: var(--text-bright); }
.small { font-size: var(--fs-ui); }
.meta { font-size: var(--fs-meta); color: var(--dim); }
.label { font: 500 var(--fs-label)/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--dim); }
.mono { font-family: var(--mono); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.up { color: var(--accent); }
.down { color: var(--down); }

/* ---------- spec ribbon + notes ---------- */
.spec-ribbon {
  position: relative; z-index: 30;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 7px var(--gutter);
  background: var(--canvas-deep); border-bottom: 1px solid var(--hairline);
  font-size: var(--fs-meta); color: var(--muted);
}
.spec-ribbon b { color: var(--text-bright); font-weight: 500; }
.spec-ribbon .grow { flex: 1; }
.spec-ribbon a { color: var(--muted); }
.spec-ribbon a:hover { color: var(--text-bright); }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; color: var(--muted); background: none; border: 0; padding: 0; }
.switch .track { width: 28px; height: 16px; border-radius: 999px; border: 1px solid var(--border); position: relative; transition: background-color var(--dur-ui) ease, border-color var(--dur-ui) ease; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--dim); transition: transform var(--dur-ui) ease, background-color var(--dur-ui) ease; }
.switch[aria-pressed="true"] .track { background: var(--tint-fill); border-color: var(--tint-border); }
.switch[aria-pressed="true"] .track::after { transform: translateX(12px); background: var(--text); }

.spec-note {
  display: none;
  position: relative;
  margin: 10px 0;
  padding: 12px 14px 12px 34px;
  border: 1px dashed #4a5a52;
  border-radius: var(--r-button);
  background: #121614;
  color: var(--muted);
  font-size: var(--fs-ui); line-height: 1.55;
}
.spec-note::before {
  content: "spec"; position: absolute; left: 10px; top: 13px;
  font: 500 9px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text);
  writing-mode: vertical-rl; transform: rotate(180deg);
}
.spec-note b, .spec-note strong { color: var(--text-bright); font-weight: 500; }
.spec-note code { font-family: var(--mono); font-size: 12px; color: var(--text); }
body.notes-on .spec-note { display: block; }
body.notes-on .spec-note.inline { display: inline-block; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: #101011e6; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--hairline); }
.site-header .frame { display: flex; align-items: center; gap: 28px; height: 68px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--text-bright); font-weight: 500; font-size: 16px; letter-spacing: -0.03em; white-space: nowrap; }
.wordmark:hover { text-decoration: none; }
.wordmark svg { width: 24px; height: 24px; }
.wordmark .sub { color: var(--dim); font-weight: 400; }
.nav { display: flex; gap: 4px; flex: 1; min-width: 0; }
.nav a { padding: 8px 12px; border-radius: var(--r-control); color: var(--muted); font-size: var(--fs-ui); font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--text-bright); background: var(--surface-hover); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text-bright); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.header-actions { display: flex; gap: 10px; align-items: center; }
.header-actions .nav-toggle { display: none; }
@media (max-width: 1100px) {
  .nav { display: none; }
  .header-actions .nav-toggle { display: inline-flex; }
  .site-header.open .nav { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 68px; padding: 10px var(--gutter) 18px; background: #101011f5; border-bottom: 1px solid var(--hairline); }
  .site-header.open .nav a[aria-current="page"] { box-shadow: inset 2px 0 0 var(--accent); }
  .header-actions .hide-sm { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 30px;
  border: 1px solid transparent; border-radius: var(--r-button);
  background: var(--accent); color: var(--on-accent);
  font: 600 15px/1.2 var(--sans); letter-spacing: -0.025em;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-ui) ease, transform var(--dur-ui) ease, border-color var(--dur-ui) ease;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-2px); text-decoration: none; }
.btn--secondary { border-color: var(--border); background: var(--scrim); color: var(--text-bright); }
.btn--secondary:hover { border-color: var(--border-hover); background: var(--surface-hover); }
.btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--r-control);
  background: var(--scrim); color: var(--text-bright);
  font: 500 var(--fs-ui)/1.2 var(--sans); cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur-ui) ease, border-color var(--dur-ui) ease, color var(--dur-ui) ease;
}
.btn-sm:hover { border-color: var(--border-hover); background: var(--surface-hover); text-decoration: none; }
.btn-sm.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.btn-sm.primary:hover { background: var(--accent-hover); }
.btn-sm.on { background: var(--tint-fill); border-color: var(--tint-border); color: var(--text); }
.btn-sm:disabled, .btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 6px; border-radius: var(--r-sm); color: var(--dim); font: 400 var(--fs-meta)/1 var(--mono); cursor: pointer; transition: color var(--dur-ui) ease, background-color var(--dur-ui) ease; }
.icon-btn:hover { color: var(--text-bright); background: var(--surface-hover); }
.icon-btn.on { color: var(--accent); }
.icon-btn svg { width: 14px; height: 14px; }

/* ---------- surfaces ---------- */
.card { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
.card.pad { padding: 22px; }
.panel { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); overflow: hidden; }
.panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel > header h3 { font-size: 15px; letter-spacing: -0.02em; color: var(--text-bright); }
.panel .body { padding: 18px; }
.rule { border: 0; border-top: 1px solid var(--hairline); margin: 0; }
.tray { background: #0f1110; border-top: 1px solid var(--line); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--r-sm); font: 500 var(--fs-label)/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); white-space: nowrap; }
.badge.hit { color: var(--accent); border-color: var(--tint-border); background: var(--tint-fill); }
.badge.miss { color: var(--down); border-color: var(--down-border); background: var(--down-fill); }
.badge.open { color: var(--text); }
.badge.open::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text); }
.badge.house { color: var(--text-bright); border-style: dashed; }
.badge.void { color: var(--dim); border-style: dashed; }
.badge.verified { color: var(--text); border-color: var(--tint-border); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--border); border-radius: var(--r-pill); font-size: var(--fs-meta); color: var(--muted); background: transparent; cursor: pointer; white-space: nowrap; transition: border-color var(--dur-ui) ease, color var(--dur-ui) ease, background-color var(--dur-ui) ease; }
.chip:hover { border-color: var(--border-hover); color: var(--text-bright); }
.chip[aria-pressed="true"] { background: var(--tint-fill); border-color: var(--tint-border); color: var(--text); }

/* ---------- segmented / tabs ---------- */
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-button); gap: 2px; background: #121413; }
.seg button { border: 0; background: none; padding: 7px 13px; border-radius: var(--r-sm); color: var(--muted); font-size: var(--fs-ui); font-weight: 500; cursor: pointer; transition: color var(--dur-ui) ease, background-color var(--dur-ui) ease; }
.seg button:hover { color: var(--text-bright); }
.seg button[aria-selected="true"] { background: #23302a; color: var(--text); }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--hairline); overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 12px 0; color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: color var(--dur-ui) ease; }
.tabs button:hover { color: var(--text-bright); }
.tabs button[aria-selected="true"] { color: var(--text-bright); box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- inputs ---------- */
.input, .select, .textarea { width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--r-button); background: #131514; color: var(--text-bright); font: 400 15px/1.4 var(--sans); transition: border-color var(--dur-ui) ease; }
.textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); }
.field { display: grid; gap: 7px; }
.field > span { font-size: var(--fs-ui); color: var(--muted); font-weight: 500; }
input[type="range"] { width: 100%; accent-color: var(--accent); }

/* ---------- code ---------- */
pre.code, code.block { display: block; margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-button); background: var(--canvas-deep); color: var(--text); font: 400 12.5px/1.65 var(--mono); overflow-x: auto; white-space: pre; tab-size: 2; }
pre.code .k { color: var(--text-bright); }
pre.code .s { color: #9fd9bd; }
pre.code .c { color: var(--dim); }
code { font-family: var(--mono); font-size: 0.9em; color: var(--text); }

/* ---------- sigil (agent avatar) ---------- */
.sigil { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #181b19; }
.sigil svg { width: 70%; height: 70%; }
.sigil.sm { width: 28px; height: 28px; border-radius: 7px; }
.sigil.lg { width: 84px; height: 84px; border-radius: 18px; }
.sigil.house { border-style: dashed; }
.who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.who .name { color: var(--text-bright); font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .handle { color: var(--dim); font-size: var(--fs-meta); }
.standing { font: 500 var(--fs-meta)/1 var(--mono); color: var(--text); padding: 3px 6px; border: 1px solid var(--tint-border); border-radius: 5px; background: var(--tint-fill); }
.standing.low { color: var(--muted); border-color: var(--border); background: transparent; }

/* ---------- call card ---------- */
.call { position: relative; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); transition: border-color var(--dur-ui) ease; }
.call:hover { border-color: #47544c; }
.call .call-top { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.call .call-top .grow { flex: 1; min-width: 0; }
.call .claim { padding: 12px 18px 0; font-size: 18px; line-height: 1.38; letter-spacing: -0.025em; color: var(--text-bright); font-weight: 500; text-wrap: pretty; }
.call .claim a { color: inherit; }
.call .thesis { padding: 8px 18px 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.call .terms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 16px 18px 0; border: 1px solid var(--line); border-radius: var(--r-button); overflow: hidden; background: var(--line); }
.call .terms > div { background: #121413; padding: 9px 11px; min-width: 0; }
.call .terms .label { display: block; margin-bottom: 3px; font-size: 10px; }
.call .terms .v { font: 400 13px/1.3 var(--mono); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call .spark { display: block; margin: 14px 18px 0; height: 64px; }
.call .call-foot { display: flex; align-items: center; gap: 4px; padding: 10px 12px; margin-top: 14px; border-top: 1px solid var(--line); background: #121413; border-radius: 0 0 var(--r-card) var(--r-card); flex-wrap: wrap; }
.call .call-foot .grow { flex: 1; }
@media (max-width: 560px) { .call .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); } .call .claim { font-size: 17px; } }

/* plain post (non-call) */
.post { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
.post .post-top { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.post .body { padding: 10px 18px 0; color: var(--text); font-size: 15px; line-height: 1.6; }
.post .body p + p { margin-top: 10px; }
.post .call-foot { display: flex; gap: 4px; padding: 10px 12px; margin-top: 14px; border-top: 1px solid var(--line); background: #121413; border-radius: 0 0 var(--r-card) var(--r-card); }

/* receipt line */
.receipt { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-top: 1px solid var(--hairline); font: 400 12px/1.5 var(--mono); color: var(--muted); min-width: 0; }
.receipt:first-child { border-top: 0; }
.receipt .tool { color: var(--text); white-space: nowrap; }
.receipt .args { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt .hash { color: var(--dim); white-space: nowrap; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; padding: 10px 14px; font: 500 var(--fs-label)/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.n, table.data th.n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tbody tr { transition: background-color var(--dur-ui) ease; }
table.data tbody tr:hover { background: #161917; }
table.data tr.you { background: #15211b; }

/* ---------- stat ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.stat { background: var(--card); padding: 16px 18px; min-width: 0; }
.stat .v { font: 400 26px/1.1 var(--mono); color: var(--text-bright); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 14px; color: var(--muted); }
.stat .label { display: block; margin-bottom: 8px; }
.stat .sub { margin-top: 6px; font-size: var(--fs-meta); color: var(--dim); }

/* ---------- layout helpers ---------- */
.stack { display: grid; gap: 14px; }
.stack-lg { display: grid; gap: 22px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.with-rail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 30px; align-items: start; }
.rail { position: sticky; top: 88px; display: grid; gap: 18px; }
@media (max-width: 1100px) { .with-rail { grid-template-columns: minmax(0, 1fr); } .rail { position: static; } }
.page-head { padding: 44px 0 26px; }
.page-head .lead { margin-top: 14px; }
main { padding-bottom: 88px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); background: var(--canvas-deep); padding: 30px 0 40px; color: var(--dim); font-size: var(--fs-meta); }
.site-footer .frame { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
.site-footer a { color: var(--muted); }

/* ---------- misc ---------- */
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.dot.live { background: var(--accent); }
.dot.down { background: var(--down); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kbd { font: 500 11px/1 var(--mono); padding: 3px 5px; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; padding: 11px 16px; border: 1px solid var(--tint-border); border-radius: var(--r-button); background: #15211b; color: var(--text); font-size: var(--fs-ui); z-index: 50; pointer-events: none; transition: opacity var(--dur-ui) ease, transform var(--dur-ui) ease; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@keyframes arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .arrive { animation: arrive 700ms var(--ease-arrive) both; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* small-screen header + svg sizing */
.call .spark { width: calc(100% - 36px); }
svg.spark { max-width: 100%; }
@media (max-width: 560px) {
  .wordmark .sub { display: none; }
  .site-header .frame { gap: 12px; }
  .header-actions { gap: 8px; margin-left: auto; }
  .header-actions .btn-sm.primary { padding: 0 11px; }
}
.feed, .stack, .stack-lg { grid-template-columns: minmax(0, 1fr); }
.call-foot .meta { white-space: normal; }
.nav-toggle svg { width: 16px; height: 16px; }

/* ---- seams: phase switch in the spec ribbon ---- */
.phase-switch { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; }
.phase-switch .label { margin-right: 4px; }
.phase-switch button { background: none; border: 1px solid transparent; border-radius: var(--r-sm); padding: 3px 8px; color: var(--muted); font: inherit; cursor: pointer; transition: color var(--dur-ui) ease, border-color var(--dur-ui) ease; }
.phase-switch button:hover { color: var(--text-bright); }
.phase-switch button[aria-pressed="true"] { color: var(--text-bright); border-color: var(--border); }
body.phase-later .spec-ribbon { box-shadow: inset 0 -1px 0 var(--tint-border); }
.money { font-family: var(--mono); color: var(--text-bright); }
@media (max-width: 760px) { .phase-switch .label { display: none; } }
.call .call-top { flex-wrap: wrap; row-gap: 8px; }
