/* ============================================================
   Conduit — "Calm Current" design system (SPEC §11)
   Dark-first instrument panel: ink/graphite surfaces, hairlines,
   one electric-teal accent, mono for data + humanist sans for chrome.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --bg: #0e0f12;
  --panel: #16181d;
  --panel-2: #1b1e24;
  --panel-3: #21252d;
  --hairline: #262a32;
  --hairline-2: #303542;
  --text: #e8eaed;
  --text-dim: #b6bcc6;
  --muted: #8b93a0;
  --faint: #5c6470;

  --current: #2dd4e8;
  --current-bright: #67e8f9;
  --current-dim: rgba(45, 212, 232, 0.38);
  --current-faint: rgba(45, 212, 232, 0.12);
  --current-glow: rgba(45, 212, 232, 0.45);

  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --idle: #6b7280;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r: 10px;
  --r-sm: 6px;
  --shadow-glow: 0 0 12px var(--current-glow);
}

@media (prefers-color-scheme: light) {
  :root.allow-light {
    --bg: #f4f5f7;
    --panel: #ffffff;
    --panel-2: #f0f1f4;
    --panel-3: #e8eaee;
    --hairline: #dcdfe5;
    --hairline-2: #c9cdd6;
    --text: #171a20;
    --text-dim: #3c424d;
    --muted: #6b7280;
    --faint: #9aa1ab;
    --current: #0891b2;
    --current-bright: #0e7490;
    --current-dim: rgba(8, 145, 178, 0.4);
    --current-faint: rgba(8, 145, 178, 0.09);
    --current-glow: rgba(8, 145, 178, 0.25);
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--current-dim); color: var(--text); }

a { color: var(--current); text-decoration: none; }
a:hover { color: var(--current-bright); }

.mono, code, kbd {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.92em;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.015em; margin: 0 0 8px; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 15px; }

/* ---- panels & hairlines ---- */

.panel {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
}

.hairline-t { border-top: 1px solid var(--hairline); }

/* ---- buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--hairline-2);
  background: var(--panel-2);
  color: var(--text);
  font: 500 14px var(--sans);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: var(--current-dim); color: var(--text); }

.btn-primary {
  background: var(--current);
  border-color: var(--current);
  color: #06272c;
  font-weight: 600;
}
.btn-primary:hover { background: var(--current-bright); border-color: var(--current-bright); color: #06272c; }

.btn-secondary { background: transparent; }

.btn-danger { border-color: rgba(248, 113, 113, 0.35); color: var(--err); background: transparent; }
.btn-danger:hover { border-color: var(--err); }

.btn-block { width: 100%; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-row { display: flex; gap: 10px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---- forms ---- */

.stack { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 5px; }

.field-label {
  font: 500 11px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
  background: var(--bg);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-sm);
  color: var(--text);
  font: 400 14px var(--sans);
  padding: 9px 12px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  width: 100%;
}
input[type="search"]::-webkit-search-cancel-button { filter: invert(0.6); }
input:focus, select:focus, textarea:focus {
  border-color: var(--current-dim);
  box-shadow: 0 0 0 3px var(--current-faint);
}
input::placeholder { color: var(--faint); }

.form-error {
  color: var(--err);
  font-size: 13.5px;
  margin: 0;
  padding: 9px 12px;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: var(--r-sm);
}

.fineprint { color: var(--muted); font-size: 12.5px; margin: 0; }

/* ---- status semantics: never color alone (icon + label) ---- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 500 12.5px var(--mono);
  color: var(--text-dim);
}
.status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.status-ok .dot { background: var(--ok); }
.status-warn .dot { background: var(--warn); }
.status-err .dot { background: var(--err); }
.status-idle .dot { background: var(--idle); }
.status-live .dot {
  background: var(--current);
  box-shadow: var(--shadow-glow);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .status-live .dot { animation: none; }
  * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

/* ============================================================
   Auth pages (worker-rendered: login / consent)
   ============================================================ */

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1000px 460px at 70% -10%, var(--current-faint), transparent 60%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 36px 34px 30px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}

.wordmark {
  font: 600 17px var(--mono);
  letter-spacing: 0.02em;
  color: var(--text);
}

.auth-card h1 { font-size: 21px; margin-bottom: 6px; }

.auth-subtitle { color: var(--muted); font-size: 14px; margin: 0 0 22px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font: 500 11px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 18px 0;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--hairline);
}

.consent-list {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.consent-list li {
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.consent-list li + li { border-top: 1px solid var(--hairline); }
.consent-list li::before { content: "· "; color: var(--current); font-weight: 700; }

/* ============================================================
   Public landing page
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--hairline);
}

.site-header .inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-header nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.site-header nav a { color: var(--text-dim); font-size: 13.5px; font-weight: 500; }
.site-header nav a:hover { color: var(--text); }
/* Buttons in the nav keep their own colours (the nav <a> rule must not wash out btn text). */
.site-header nav a.btn-primary, .site-header nav a.btn-primary:hover { color: #06272c; }
.site-header nav a.btn { font-size: 13px; }

.hero {
  max-width: 1060px;
  margin: 0 auto;
  padding: 84px 24px 40px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 18px auto 14px;
  max-width: 720px;
}

.hero h1 em {
  font-style: normal;
  color: var(--current);
}

.hero .lede {
  color: var(--muted);
  font-size: 16.5px;
  max-width: 620px;
  margin: 0 auto 30px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--hairline-2);
  border-radius: 999px;
  padding: 5px 14px;
  font: 500 12px var(--mono);
  color: var(--muted);
  letter-spacing: 0.04em;
}

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* flow diagram: phone → worker → claude */

.flow {
  max-width: 860px;
  margin: 46px auto 0;
  padding: 0 24px;
}

.flow svg { width: 100%; height: auto; display: block; }

.flow-dot {
  animation: flow-travel 5s linear infinite;
}
@keyframes flow-travel {
  from { offset-distance: 0%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  to { offset-distance: 100%; opacity: 0; }
}

.section {
  max-width: 1060px;
  margin: 0 auto;
  padding: 56px 24px;
}

.section > h2 {
  font-size: 13px;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--current);
  margin-bottom: 26px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 22px 22px 20px;
}

.card .tier {
  font: 500 11px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  display: block;
}

.card h3 { font-size: 15.5px; margin-bottom: 7px; }
.card p { color: var(--muted); font-size: 13.5px; margin: 0; }

.readout {
  font: 500 12.5px var(--mono);
  color: var(--text-dim);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin-top: 14px;
  overflow-x: auto;
  white-space: nowrap;
}
.readout .dim { color: var(--faint); }
.readout .accent { color: var(--current); }

.security-note {
  border-left: 2px solid var(--current);
  background: var(--panel);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 18px 22px;
  color: var(--text-dim);
  font-size: 14px;
}

.site-footer {
  border-top: 1px solid var(--hairline);
  color: var(--faint);
  font: 400 12.5px var(--mono);
  padding: 26px 24px 40px;
  text-align: center;
}

/* ============================================================
   Console SPA
   ============================================================ */

.console-body { display: flex; min-height: 100vh; }

.rail {
  width: 216px;
  flex: none;
  border-right: 1px solid var(--hairline);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.rail .auth-brand { padding: 4px 10px 14px; margin: 0; border-bottom: 1px solid var(--hairline); }

.rail nav { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }

.rail nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
}
.rail nav a:hover { background: var(--panel); color: var(--text); }
.rail nav a.active {
  background: var(--current-faint);
  color: var(--current);
  border-color: transparent;
}
.rail nav a svg { flex: none; opacity: 0.85; }

.rail .rail-foot {
  margin-top: auto;
  padding: 12px 10px 4px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rail .rail-foot .who { font: 500 12px var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

.main {
  flex: 1;
  min-width: 0;
  padding: 26px 32px 60px;
  max-width: 1160px;
}

.page-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-head h1 { font-size: 21px; margin: 0; }
.page-head .sub { color: var(--muted); font-size: 13.5px; }
.page-head .spacer { flex: 1; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.stat {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 16px 18px 14px;
}
.stat .k {
  font: 500 11px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}
.stat .v {
  font: 600 24px var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.1;
}
.stat .v small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 5px; }
.stat .sub { display: block; margin-top: 6px; font: 400 12px var(--mono); color: var(--faint); }

.tablewrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.data th {
  text-align: left;
  font: 500 11px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
table.data td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
table.data tr:last-child td { border-bottom: none; }
table.data td.mono { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; }

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.toolbar input, .toolbar select { width: auto; }
.toolbar input[type="search"] { flex: 1; min-width: 220px; }

.event {
  display: flex;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}
.event:last-child { border-bottom: none; }
.event .when { font: 500 11.5px var(--mono); color: var(--faint); flex: none; width: 118px; }
.event .src {
  font: 500 10.5px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex: none;
  width: 84px;
  color: var(--current);
}
.event .body { min-width: 0; flex: 1; }
.event .body .who { font-weight: 600; font-size: 13px; margin-right: 8px; }
.event .body .txt { color: var(--text-dim); font-size: 13.5px; overflow-wrap: anywhere; }
.event .body .conv { font: 400 11.5px var(--mono); color: var(--faint); display: block; margin-top: 2px; }
.event .thumbs { display: flex; gap: 6px; margin-top: 8px; }
.event .thumbs img {
  width: 76px; height: 76px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--hairline-2);
}

.empty {
  padding: 46px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.empty svg { display: block; margin: 0 auto 14px; opacity: 0.9; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 13.5px; }
.kv dt { font: 500 12px var(--mono); color: var(--muted); }
.kv dd { margin: 0; color: var(--text-dim); overflow-wrap: anywhere; }

.switchrow {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--hairline);
}
.switchrow:last-child { border-bottom: none; }
.switchrow .lbl { flex: 1; }
.switchrow .lbl b { display: block; font-size: 14px; font-weight: 600; }
.switchrow .lbl span { color: var(--muted); font-size: 12.5px; }

.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch .track {
  position: absolute; inset: 0;
  background: var(--panel-3);
  border: 1px solid var(--hairline-2);
  border-radius: 999px;
  transition: background 140ms ease, border-color 140ms ease;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 140ms ease, background 140ms ease;
}
.switch input:checked + .track { background: var(--current-faint); border-color: var(--current-dim); }
.switch input:checked + .track::after { transform: translateX(18px); background: var(--current); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--current-faint); }

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(6, 7, 9, 0.72);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  z-index: 50;
}
.modal { width: 100%; max-width: 460px; padding: 26px 26px 22px; }
.modal h2 { margin-bottom: 14px; }

.secret-box {
  font: 500 13px var(--mono);
  background: var(--bg);
  border: 1px solid var(--current-dim);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  overflow-wrap: anywhere;
  user-select: all;
}

.qr-holder { display: flex; justify-content: center; padding: 14px 0 6px; }
.qr-holder img, .qr-holder canvas { border-radius: var(--r-sm); background: #fff; padding: 10px; }

.pill {
  font: 500 11px var(--mono);
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--hairline-2);
  color: var(--muted);
}
.pill-ok { color: var(--ok); border-color: rgba(52, 211, 153, 0.35); }
.pill-warn { color: var(--warn); border-color: rgba(251, 191, 36, 0.35); }
.pill-err { color: var(--err); border-color: rgba(248, 113, 113, 0.35); }

.toast {
  position: fixed;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  background: var(--panel-2);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 13.5px;
  padding: 10px 18px;
  z-index: 60;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

@media (max-width: 760px) {
  .console-body { flex-direction: column; }
  .rail {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--hairline);
    padding: 10px 12px;
  }
  .rail .auth-brand { border: none; padding: 0 10px 0 0; }
  .rail nav { flex-direction: row; margin: 0; }
  .rail nav a { padding: 7px 10px; white-space: nowrap; }
  .rail .rail-foot { display: none; }
  .main { padding: 18px 16px 48px; }
  .event .when { width: auto; }
}

/* ============================================================
   Landing extras (setup-first, lean) + guided setup wizard
   ============================================================ */

.hero { padding-top: 64px; }
.hero .btn-lg { min-width: 190px; }
.hero-note { color: var(--faint); font-size: 13px; margin: 18px auto 0; max-width: 520px; }

.section.tight { padding-top: 8px; padding-bottom: 8px; }

.cap-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.cap {
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--r); padding: 16px 18px;
}
.cap-k {
  display: block; font: 500 11px var(--mono); letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--current); margin-bottom: 6px;
}
.cap-v { color: var(--text-dim); font-size: 13.5px; }

.assure { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.assure-item {
  border-left: 2px solid var(--current); background: var(--panel);
  border-radius: 0 var(--r) var(--r) 0; padding: 12px 16px;
  color: var(--text-dim); font-size: 13.5px;
}

/* wizard */
.setup-wrap { display: flex; flex-direction: column; gap: 12px; }
.step-card {
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--r); padding: 16px 18px;
}
.step-card.active { border-color: var(--current-dim); box-shadow: 0 0 0 1px var(--current-faint); }
.step-card.todo { opacity: 0.72; }
.step-head { display: flex; align-items: center; gap: 12px; }
.step-num {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 13px var(--mono); border: 1px solid var(--hairline-2); color: var(--muted);
}
.step-card.active .step-num { border-color: var(--current); color: var(--current); }
.step-card.done .step-num { border-color: var(--ok); color: var(--ok); }
.step-title { font-size: 15.5px; font-weight: 600; flex: 1; }
.step-state { flex: none; }
.step-body { margin-top: 14px; padding-left: 38px; }
.step-lede { color: var(--text-dim); font-size: 14px; margin: 0 0 12px; }
.step-list { margin: 0 0 12px; padding-left: 18px; color: var(--text-dim); font-size: 14px; }
.step-list li { margin-bottom: 10px; }
.step-list b { color: var(--text); }
.step-verify { margin-top: 12px; }
.copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.copy-row code { background: var(--bg); border: 1px solid var(--hairline-2); border-radius: var(--r-sm); padding: 7px 10px; overflow-wrap: anywhere; }
.pair-box { margin-top: 12px; }
.pair-link { display: inline-block; }
.step-body .qr-holder { justify-content: flex-start; }

@media (max-width: 640px) {
  .step-body { padding-left: 0; }
  .copy-row code { width: 100%; }
}

/* ============================================================
   Mobile: landing header + hero + section padding
   ============================================================ */

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .site-header .inner { padding: 12px 16px; }
  .hero { padding: 40px 18px 24px; }
  .hero h1 { font-size: 30px; }
  .hero .lede { font-size: 15px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .section { padding: 28px 18px; }
  .auth-card { padding: 28px 22px 24px; }
  .btn-lg { padding: 13px 20px; }
}

/* ============================================================
   Logo badge usage + legal page + footer links
   ============================================================ */

.brand-mark { border-radius: 50%; display: block; flex: none; }
.hero-logo { display: block; margin: 0 auto 20px; border-radius: 50%; }

.site-footer { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: center; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--current); }

.auth-legal { margin-top: 22px; text-align: center; font: 500 12px var(--mono); }
.auth-legal a { color: var(--faint); }
.auth-legal a:hover { color: var(--current); }

/* Legal (privacy / terms) reading pages */
.legal-wrap { max-width: 760px; margin: 0 auto; padding: 40px 24px 64px; }
.legal-wrap .legal-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; }
.legal-wrap h1 { font-size: 28px; margin-bottom: 6px; }
.legal-updated { color: var(--faint); font: 500 12px var(--mono); margin: 0 0 28px; }
.legal-wrap h2 {
  font-size: 13px; font-family: var(--mono); font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--current); margin: 34px 0 12px;
}
.legal-wrap p, .legal-wrap li { color: var(--text-dim); font-size: 15px; line-height: 1.65; }
.legal-wrap p { margin: 0 0 14px; }
.legal-wrap ul { margin: 0 0 14px; padding-left: 20px; }
.legal-wrap li { margin-bottom: 8px; }
.legal-wrap strong { color: var(--text); }
.legal-wrap a { color: var(--current); }
.legal-lede {
  border-left: 2px solid var(--current); background: var(--panel);
  border-radius: 0 var(--r) var(--r) 0; padding: 14px 18px; margin: 0 0 22px;
  color: var(--text-dim); font-size: 14.5px;
}
.legal-foot { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--hairline); font: 500 12.5px var(--mono); }
.legal-foot a { color: var(--muted); }

@media (max-width: 640px) {
  .legal-wrap { padding: 28px 18px 48px; }
  .legal-wrap h1 { font-size: 24px; }
}

/* ============================================================
   Animated "conduit" stepper (landing) — a spark travels the
   rail, lighting each step. Honors prefers-reduced-motion.
   ============================================================ */

.stepper {
  max-width: 600px;
  margin: 28px auto 0;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 20px 24px 22px;
  overflow: hidden;
}
.stepper-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline);
}
.stepper-head > span:first-child { font-weight: 600; font-size: 15px; color: var(--text); }
.stepper-meta { font: 500 11.5px var(--mono); letter-spacing: 0.04em; color: var(--faint); }

.stepper-body { position: relative; }
.stepper-steps { list-style: none; list-style-type: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.stepper-steps > li::marker { content: ""; }

/* the rail + moving parts */
.stepper-rail { position: absolute; top: 0; bottom: 0; left: 18px; width: 2px; background: var(--hairline-2); border-radius: 2px; }
.stepper-fill {
  position: absolute; top: 0; left: 0; width: 100%; height: 0;
  background: linear-gradient(var(--current-dim), var(--current));
  border-radius: 2px; transition: height 520ms cubic-bezier(.4,.7,.3,1);
}
.stepper-spark {
  position: absolute; left: 50%; top: 0; width: 12px; height: 12px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--current-bright);
  box-shadow: 0 0 10px 3px var(--current-glow), 0 0 22px 6px var(--current-glow);
  transition: top 520ms cubic-bezier(.4,.7,.3,1);
  animation: spark-pulse 1.6s ease-in-out infinite;
}
@keyframes spark-pulse {
  0%, 100% { box-shadow: 0 0 10px 3px var(--current-glow), 0 0 22px 6px var(--current-glow); }
  50% { box-shadow: 0 0 14px 5px var(--current-glow), 0 0 34px 10px var(--current-glow); }
}

/* each step (flow- namespace to avoid the older .step component) */
.flow-step {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 10px 10px 12px 0; border-radius: var(--r-sm);
  transition: background 300ms ease;
}
.flow-node {
  position: relative; z-index: 1; flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel); border: 2px solid var(--hairline-2); color: var(--muted);
  transition: border-color 300ms ease, color 300ms ease, background 300ms ease, transform 300ms ease, box-shadow 300ms ease;
}
.flow-node svg { width: 18px; height: 18px; transition: opacity 200ms ease; }

.flow-content { flex: 1; min-width: 0; padding-top: 3px; }
.flow-title { font-size: 14.5px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flow-when { font: 500 10.5px var(--mono); color: var(--faint); font-weight: 500; }
.flow-tag {
  font: 500 10px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--current);
  border: 1px solid var(--current-dim); border-radius: 999px; padding: 1px 8px;
}
.flow-desc { margin: 5px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); transition: color 300ms ease; }
.flow-desc em { color: var(--text-dim); font-style: normal; }

/* states driven by JS */
.flow-step.todo { opacity: 0.82; }
.flow-step.todo .flow-desc { color: var(--faint); }

.flow-step.active { background: var(--current-faint); }
.flow-step.active .flow-node {
  border-color: var(--current); color: var(--current); transform: scale(1.06);
  box-shadow: 0 0 0 4px var(--current-faint);
}
.flow-step.active .flow-title { color: var(--text); }
.flow-step.active .flow-desc { color: var(--text-dim); }
.flow-step.active .flow-desc em { color: var(--current-bright); }

.flow-step.done .flow-node { border-color: var(--current); background: var(--current); color: #06272c; }
.flow-step.done .flow-node svg { opacity: 0; }
.flow-step.done .flow-node::after {
  content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 700 17px var(--sans); color: #06272c;
}

/* reduced motion / no-JS: calm static list, no spark or auto-advance */
.stepper.no-anim .stepper-spark { display: none; }
.stepper.no-anim .stepper-fill { height: 100% !important; opacity: 0.5; transition: none; }
.stepper.no-anim .flow-step { opacity: 1; }
.stepper.no-anim .flow-node { border-color: var(--current-dim); color: var(--current); }
.stepper.no-anim .flow-desc { color: var(--text-dim); }
@media (prefers-reduced-motion: reduce) {
  .stepper-spark { animation: none; }
  .stepper-fill, .stepper-spark, .flow-step, .flow-node { transition: none; }
}

@media (max-width: 640px) {
  .stepper { padding: 16px 16px 18px; }
  .stepper-rail { left: 16px; }
  .flow-step { gap: 13px; }
  .flow-node { width: 34px; height: 34px; }
}

/* ============================================================
   Auth pages framed as setup steps: eyebrow, path readout, "why"
   ============================================================ */

.auth-eyebrow {
  font: 500 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--current); margin-bottom: 12px;
}

.auth-path {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  margin: 0 0 22px; padding-bottom: 18px; border-bottom: 1px solid var(--hairline);
}
.auth-path .seg { display: inline-flex; align-items: center; gap: 7px; font: 500 11px var(--mono); letter-spacing: 0.02em; color: var(--faint); }
.auth-path .seg-mark {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  border: 1px solid var(--hairline-2); font-size: 10px; color: var(--muted);
  transition: all 200ms ease;
}
.auth-path .seg.done { color: var(--text-dim); }
.auth-path .seg.done .seg-mark { background: var(--current); border-color: var(--current); color: #06272c; }
.auth-path .seg.active { color: var(--current); }
.auth-path .seg.active .seg-mark { border-color: var(--current); color: var(--current); box-shadow: 0 0 0 3px var(--current-faint); }
.auth-path .seg-sep { display: none; }

.auth-why {
  margin: 0 0 22px; padding: 13px 16px;
  background: var(--bg); border: 1px solid var(--hairline); border-left: 2px solid var(--current);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--text-dim); font-size: 13.5px; line-height: 1.6;
}
.auth-why em { color: var(--current-bright); font-style: normal; }

/* the setup framing wants a touch more room for the path readout */
.auth-card { max-width: 440px; }
.auth-card h1 { font-size: 20px; line-height: 1.25; }
