/* Cloud Architect Copilot — technical/precise aesthetic */
:root {
  /* Surfaces — light default */
  --bg-0: #F6F5F1;      /* warm parchment */
  --bg-1: #FBFAF6;
  --bg-2: #FFFFFF;
  --bg-3: #FFFFFF;      /* elevated floating surface */
  --bg-sunken: #EEEBE3;
  --ink-0: #0A0B0D;     /* near-black */
  --ink-1: #1F2125;
  --ink-2: #52555C;
  --ink-3: #8A8D94;
  --ink-4: #B9BBC0;
  --line: #E2DFD6;
  --line-strong: #C9C5B8;
  --grid: rgba(10,11,13,0.018);

  /* Accent — default electric cyan (oklch) */
  --accent-h: 215;
  --accent: oklch(0.62 0.18 var(--accent-h));
  --accent-ink: oklch(0.35 0.15 var(--accent-h));
  --accent-soft: oklch(0.94 0.04 var(--accent-h));
  --accent-fg: #FFFFFF;

  /* Status */
  --ok: oklch(0.62 0.14 150);
  --ok-soft: oklch(0.94 0.04 150);
  --warn: oklch(0.72 0.14 75);
  --warn-soft: oklch(0.95 0.05 75);
  --err: oklch(0.58 0.20 25);
  --err-soft: oklch(0.94 0.05 25);
  --info: oklch(0.62 0.14 240);

  /* Type scale + density */
  --density: 1;                          /* 1 = comfortable, 0.85 = compact */
  --sp-1: calc(4px * var(--density));
  --sp-2: calc(8px * var(--density));
  --sp-3: calc(12px * var(--density));
  --sp-4: calc(16px * var(--density));
  --sp-5: calc(24px * var(--density));
  --sp-6: calc(32px * var(--density));
  --sp-8: calc(48px * var(--density));

  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-display: "Inter", ui-sans-serif, system-ui, sans-serif;
  --radius-0: 2px;
  --radius-1: 4px;
  --radius-2: 6px;
  --radius-3: 10px;

  --shadow-0: 0 1px 0 rgba(10,11,13,0.04);
  --shadow-1: 0 1px 2px rgba(10,11,13,0.06), 0 0 0 1px rgba(10,11,13,0.04);
  --shadow-2: 0 8px 24px -12px rgba(10,11,13,0.22), 0 0 0 1px rgba(10,11,13,0.06);
}

[data-theme="dark"] {
  --bg-0: #0B0C0E;
  --bg-1: #121316;
  --bg-2: #17191D;
  --bg-3: #1F2228;      /* elevated surface — tooltips, menus, rail header */
  --bg-sunken: #07080A;
  --ink-0: #F2F1EC;
  --ink-1: #D6D5CF;
  --ink-2: #8F9198;
  --ink-3: #61646B;
  --ink-4: #3A3D44;
  --line: #25282E;
  --line-strong: #353941;
  --grid: rgba(255,255,255,0.022);

  --accent: oklch(0.72 0.16 var(--accent-h));
  --accent-ink: oklch(0.85 0.10 var(--accent-h));
  --accent-soft: oklch(0.28 0.06 var(--accent-h));
  --accent-fg: #0A0B0D;

  --ok: oklch(0.72 0.14 150);
  --ok-soft: oklch(0.28 0.05 150);
  --warn: oklch(0.78 0.14 75);
  --warn-soft: oklch(0.30 0.05 75);
  --err: oklch(0.70 0.18 25);
  --err-soft: oklch(0.28 0.07 25);
}

[data-density="compact"] { --density: 0.82; }

/* Two-font system: Inter (sans/display) + JetBrains Mono (mono). */

/* Marketing display — same sans, tightened for big H1s */
.marketing-display { font-family: var(--font-sans); letter-spacing: -0.03em; font-weight: 500; font-style: normal; }

/* AI-generated semantic — apply to surfaces/text produced by Copilot */
.ai-tint { color: var(--accent-ink); }
.ai-mark { display: none; }
.ai-border { border-color: color-mix(in srgb, var(--accent) 25%, transparent) !important; }

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--ink-0);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  background-attachment: fixed;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }

/* ==== Primitives ==== */
.mono { font-family: var(--font-mono); font-feature-settings: "ss01","cv11"; }
.display { font-family: var(--font-display); letter-spacing: -0.02em; }
.label   { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.hairline { border-top: 1px solid var(--line); }
.dot { width: 6px; height: 6px; border-radius: 999px; display: inline-block; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  height: calc(32px * var(--density) + 4px);
  padding: 0 var(--sp-3);
  border-radius: var(--radius-1);
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--ink-0);
  font-size: 12.5px;
  font-weight: 500;
  transition: transform .06s ease, background .12s ease, border-color .12s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-1); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink-0); color: var(--bg-2); border-color: var(--ink-0); }
.btn.primary:hover { background: var(--ink-1); border-color: var(--ink-1); }
.btn.accent { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn.accent:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--bg-sunken); }
.btn.sm { height: calc(24px * var(--density) + 4px); padding: 0 var(--sp-2); font-size: 11.5px; }
.btn.lg { height: calc(40px * var(--density) + 6px); padding: 0 var(--sp-4); font-size: 13.5px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Fields */
.field {
  width: 100%;
  height: calc(34px * var(--density) + 4px);
  padding: 0 var(--sp-3);
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  border-radius: var(--radius-1);
  font-size: 13px;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.error { border-color: var(--err); }
textarea.field { height: auto; padding: var(--sp-3); line-height: 1.5; resize: vertical; }

/* Chat composer — single-line textarea that auto-grows, button alongside */
.composer {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-2);
}
.composer-input {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 var(--sp-3);
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  border-radius: var(--radius-2);
  transition: border-color .12s, box-shadow .12s;
}
.composer-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.composer-input textarea {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  resize: none;
  padding: 7px 0;
  font-size: 13px;
  line-height: 1.5;
  color: inherit;
  font-family: inherit;
  overflow-y: auto;
}
.composer-input textarea::placeholder { color: var(--ink-3); }
.composer-send {
  flex: 0 0 auto;
  align-self: stretch;
  height: auto;
  min-height: 36px;
  padding: 0 var(--sp-3);
  border-radius: var(--radius-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  background: var(--accent);
  color: var(--accent-fg);
  border: 1px solid var(--accent);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: filter .12s, opacity .12s, transform .06s;
}
.composer-send:hover:not(:disabled) { filter: brightness(1.05); }
.composer-send:active:not(:disabled) { transform: translateY(1px); }
.composer-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-sunken);
  color: var(--ink-3);
  border-color: var(--line-strong);
}
.composer-send svg { display: block; }

/* Cards */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
}
.card.sunken { background: var(--bg-1); }
.card-header { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.card-body { padding: var(--sp-4); }

/* Badges / pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 20px; padding: 0 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-sunken);
  color: var(--ink-1);
  border: 1px solid var(--line);
}
.pill.ok     { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.pill.warn   { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.pill.err    { background: var(--err-soft); color: var(--err); border-color: color-mix(in srgb, var(--err) 30%, transparent); }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.pill.ghost  { background: transparent; }

/* App chrome */
.app { display: grid; grid-template-rows: auto 1fr; height: 100%; }
.topnav {
  height: 52px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-1) 85%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  display: flex; align-items: stretch;
  position: sticky; top: 0; z-index: 20;
}
.topnav-inner { width: 100%; display: flex; align-items: center; gap: var(--sp-5); padding: 0 var(--sp-5); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-weight: 600; letter-spacing: -0.01em; font-size: 13px; }
.brand-mark {
  width: 22px; height: 22px; border: 1px solid var(--ink-0);
  display: grid; place-items: center;
  background: var(--ink-0); color: var(--bg-2); font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  border-radius: 3px;
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent;
}
.nav-link:hover { color: var(--ink-0); background: var(--bg-sunken); }
.nav-link.active { color: var(--ink-0); background: var(--bg-2); border-color: var(--line); }
.nav-link .kbd { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); }
.nav-spacer { flex: 1; }

.tier-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-1);
  background: var(--bg-2);
}
.tier-pill .dot { background: var(--accent); }
.tier-pill.pro .dot, .tier-pill.team .dot, .tier-pill.enterprise .dot { background: var(--accent); }
.tier-pill.free .dot { background: var(--ink-3); }

.avatar {
  width: 28px; height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--bg-sunken);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-1);
}

/* Main surface */
.page { padding: var(--sp-6) var(--sp-6); max-width: 1440px; margin: 0 auto; }
.page.full { max-width: none; padding: 0; height: 100%; }

/* Page header pattern */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-5); margin-bottom: var(--sp-6); }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.page-head .eyebrow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.page-head .meta { color: var(--ink-2); font-size: 13px; }

/* Bento grid */
.bento { display: grid; gap: var(--sp-4); }
.bento.cols-3 { grid-template-columns: repeat(3, 1fr); }
.bento.cols-4 { grid-template-columns: repeat(4, 1fr); }
.bento.cols-2 { grid-template-columns: repeat(2, 1fr); }

/* Stat card */
.stat {
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--bg-2);
  position: relative;
}
.stat .label { margin-bottom: var(--sp-2); }
.stat .val { font-size: 28px; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.stat .val .unit { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); margin-left: 6px; }
.stat .val .unit .infinity { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.stat .sub { margin-top: var(--sp-3); color: var(--ink-2); font-size: 12px; display: flex; align-items: center; gap: var(--sp-2); }
.stat .bar { margin-top: var(--sp-3); height: 4px; background: var(--bg-sunken); border-radius: 2px; overflow: hidden; position: relative; }
.stat .bar > span { display: block; height: 100%; background: var(--accent); }

/* Table */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: var(--sp-3) var(--sp-4); text-align: left; border-bottom: 1px solid var(--line); }
.tbl th { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); font-weight: 500; background: var(--bg-1); }
.tbl tr:hover td { background: var(--bg-1); }
.tbl td.mono { font-family: var(--font-mono); font-size: 12px; }

/* Auth */
.auth-shell {
  min-height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-0);
}
.auth-art {
  background: var(--bg-sunken);
  border-right: 1px solid var(--line);
  padding: var(--sp-8);
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 640px;
}
.auth-art pre {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-2);
  white-space: pre;
  margin: 0;
}
.auth-form-wrap { padding: var(--sp-8); display: grid; place-items: center; }
.auth-form { width: 100%; max-width: 380px; }
.auth-form h2 { margin: 0 0 6px; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.auth-form .sub { color: var(--ink-2); margin-bottom: var(--sp-5); font-size: 13.5px; }

/* Pipeline */
.timeline { display: flex; flex-direction: column; gap: 0; }
.step-row { display: grid; grid-template-columns: 28px 1fr; gap: var(--sp-3); padding: var(--sp-3) 0; position: relative; }
.step-row + .step-row { border-top: 1px dashed var(--line); }
.step-icon {
  width: 22px; height: 22px; border-radius: 4px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px;
  background: var(--bg-1);
  color: var(--ink-2);
  margin-top: 2px;
}
.step-icon.inprogress { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.step-icon.complete   { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.step-icon.failed     { border-color: var(--err); color: var(--err); background: var(--err-soft); }
.step-head { display: flex; align-items: center; gap: var(--sp-3); }
.step-head .title { font-weight: 500; font-size: 13.5px; }
.step-head .dur { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.step-logs {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-2);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-1);
  padding: 8px 10px;
  margin-top: 6px;
  max-height: 160px;
  overflow: auto;
}
.step-logs .line { white-space: pre; }
.step-logs .line .t { color: var(--ink-3); margin-right: 8px; }
.step-logs .line.err .t { color: var(--err); }
.step-logs .line.ok { color: var(--ok); }

/* Spinner / progress */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 12px; height: 12px; border: 1.5px solid var(--ink-4); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.pulse { animation: pulse 1.2s ease-in-out infinite; }

@keyframes caret { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }
.caret::after { content: "▍"; color: var(--accent); animation: caret 0.9s steps(1) infinite; margin-left: 2px; }

/* Diagram canvas (ASCII) */
.diagram {
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, var(--line) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, var(--line) 23px 24px),
    var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  padding: var(--sp-5);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.25;
  color: var(--ink-0);
  white-space: pre;
  overflow: auto;
  position: relative;
}
/* Inline-SVG host: let the generated SVG scale to fit the viewport so
   transform-zoom stays vector-crisp. */
.diagram-svg-host > svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
}

/* When diagram IS the canvas (bare background, no card) */
.diagram.bare {
  border: 0;
  border-radius: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, var(--grid) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, var(--grid) 39px 40px),
    var(--bg-0);
  padding: var(--sp-6) var(--sp-6);
  height: 100%;
}

/* Collapsible right rail on New Conversation */
.rail {
  border-left: 1px solid var(--line);
  background: var(--bg-1);
  display: flex;
  flex-direction: column;
  transition: width .22s cubic-bezier(.4,0,.2,1);
  min-height: 0;
  overflow: hidden;
}
.rail.collapsed { width: 44px !important; }
.rail-collapsed-strip {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 14px 0;
}
.rail-collapsed-strip button {
  width: 30px; height: 30px; border-radius: 4px;
  display: grid; place-items: center;
  color: var(--ink-2); border: 1px solid transparent;
}
.rail-collapsed-strip button:hover { background: var(--bg-2); border-color: var(--line); color: var(--ink-0); }
.rail-collapsed-strip button.active { background: var(--bg-2); border-color: var(--line-strong); color: var(--ink-0); }
.rail-collapsed-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 12px;
}
.rail-section {
  border-bottom: 1px solid var(--line);
}
.rail-section-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.rail-section-head:hover { background: var(--bg-2); }
.rail-section-head .title { font-weight: 500; font-size: 12.5px; flex: 1; display: flex; align-items: center; gap: 8px; }
.rail-section-body { padding: 0 14px 14px; }
.diagram-toolbar {
  position: absolute; top: 10px; right: 10px;
  display: flex; gap: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-1);
  padding: 3px;
  z-index: 2;
}
.diagram-toolbar .btn { height: 24px; padding: 0 8px; font-size: 11px; border: 0; background: transparent; }
.diagram-toolbar .btn.active { background: var(--bg-sunken); }

.diag-node { color: var(--ink-0); }
.diag-edge { color: var(--ink-3); }
.diag-label { color: var(--accent-ink); }
.diag-warn { color: var(--warn); }
.diag-err { color: var(--err); }
.diag-accent { color: var(--accent); }

/* Locked overlay */
.locked-wrap { position: relative; overflow: hidden; border-radius: var(--radius-2); }
.locked-wrap .locked-content { filter: blur(5px) saturate(0.6); pointer-events: none; user-select: none; }
.locked-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
  backdrop-filter: blur(1px);
  z-index: 3;
}
.locked-card {
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: var(--shadow-2);
  text-align: center;
  max-width: 340px;
}
.locked-card .lock-icon {
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--ink-0); color: var(--bg-2);
  display: grid; place-items: center; margin: 0 auto var(--sp-3);
  font-family: var(--font-mono); font-size: 13px;
}
.locked-card .title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.locked-card .sub { color: var(--ink-2); font-size: 12.5px; margin-bottom: var(--sp-3); }

/* Conversation detail tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); }
.tab {
  padding: var(--sp-3) var(--sp-4);
  font-size: 13px;
  color: var(--ink-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: var(--sp-2);
}
.tab:hover { color: var(--ink-0); }
.tab.active { color: var(--ink-0); border-bottom-color: var(--ink-0); }
.tab .count { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); padding: 1px 5px; background: var(--bg-sunken); border-radius: 3px; }

/* Pricing */
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-2); overflow: hidden; background: var(--bg-2); }
.price-col { padding: var(--sp-5); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--sp-3); }
.price-col:last-child { border-right: 0; }
.price-col.current { background: var(--bg-1); position: relative; }
.price-col.current::before { content: "CURRENT"; position: absolute; top: 10px; right: 10px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; color: var(--accent-ink); background: var(--accent-soft); padding: 3px 6px; border-radius: 3px; border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.price-col .name { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.price-col .price { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 6px; }
.price-col .price .unit { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); font-weight: 400; }
.price-col .desc { color: var(--ink-2); font-size: 13px; min-height: 36px; }
.price-col ul { list-style: none; padding: 0; margin: var(--sp-3) 0 0; display: flex; flex-direction: column; gap: 8px; }
.price-col li { font-size: 12.5px; display: flex; gap: 8px; align-items: flex-start; color: var(--ink-1); }
.price-col li .chk { color: var(--accent); font-family: var(--font-mono); margin-top: 2px; }
.price-col li.off { color: var(--ink-3); }
.price-col li.off .chk { color: var(--ink-4); }

/* Suggestion chips (conversation follow-ups) — NOT buttons */
.suggest-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px 3px 6px;
  font-size: 12px;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1.3;
  transition: color .12s, background .12s;
}
.suggest-chip:hover { color: var(--ink-0); background: var(--bg-sunken); }
.suggest-chip .arr { color: var(--ink-3); font-family: var(--font-mono); font-size: 11px; }

/* Persistent architecture card */
.arch-card {
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.arch-card .ver-dot { width: 7px; height: 7px; border-radius: 999px; display: inline-block; background: var(--ink-3); }
.arch-card .ver-dot.current { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }

/* Collapsed pipeline summary row */
.pipe-summary {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px;
  padding: 6px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--bg-1);
  cursor: pointer;
  font-family: var(--font-mono);
}
.pipe-summary:hover { border-color: var(--ink-3); color: var(--ink-0); }

/* Chat */
.chat-msg { display: flex; gap: var(--sp-3); padding: var(--sp-3) 0; }
.chat-msg.user { }
.chat-msg .who { width: 28px; height: 28px; border-radius: 4px; border: 1px solid var(--line-strong); display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); flex: none; background: var(--bg-1); }
.chat-msg.user .who { background: var(--ink-0); color: var(--bg-2); border-color: var(--ink-0); }
.chat-msg .content { flex: 1; min-width: 0; padding-top: 4px; font-size: 13.5px; line-height: 1.55; }
.chat-msg .content .meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); margin-bottom: 2px; letter-spacing: 0.06em; text-transform: uppercase; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* Scorecard */
.score-ring { position: relative; width: 120px; height: 120px; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.pillar-row { display: grid; grid-template-columns: 1fr auto auto; gap: var(--sp-3); align-items: center; padding: var(--sp-3) 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.pillar-row:last-child { border-bottom: 0; }
.pillar-row:hover { background: var(--bg-1); }
.pillar-row .name { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.pillar-row .bar { width: 200px; height: 4px; background: var(--bg-sunken); border-radius: 2px; overflow: hidden; }
.pillar-row .bar > span { display: block; height: 100%; }
.pillar-row .pct { font-family: var(--font-mono); font-size: 12px; min-width: 44px; text-align: right; }

/* Empty state */
.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-2);
  padding: var(--sp-8) var(--sp-5);
  text-align: center;
  color: var(--ink-2);
  background: linear-gradient(var(--bg-1), var(--bg-2));
}
.empty .glyph {
  font-family: var(--font-mono);
  white-space: pre;
  color: var(--ink-3);
  margin: 0 auto var(--sp-4);
  font-size: 11px;
  line-height: 1.3;
  width: fit-content;
}

/* Responsive */
@media (max-width: 1100px) {
  .bento.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
  .price-col:nth-child(2) { border-right: 0; }
  .price-col:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .bento.cols-3 { grid-template-columns: 1fr; }
  .page { padding: var(--sp-4); }
  .topnav-inner { gap: var(--sp-3); padding: 0 var(--sp-3); overflow-x: auto; }
  .nav-links .nav-link .kbd { display: none; }
}
@media (max-width: 600px) {
  .bento.cols-4, .bento.cols-2 { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .price-col { border-right: 0; border-bottom: 1px solid var(--line); }
  .price-col:last-child { border-bottom: 0; }
  .page-head { flex-direction: column; align-items: flex-start; }
}
