/* Take Interest · Crestline Aerosystems design-partner demo · "Datum" design system
   =================================================================
   Engineering-drawing restraint for a defense-adjacent aerospace exec.
   Heritage-grade: the calm structure itself signals AS9100 rigor.
   One accent (instrument blue), amber reserved for "now/attention" only.

   Token NAMES mirror the erin product.css contract on purpose, so the
   REUSED chassis (shell.css rail, svg-charts, gate.js role chip, theme.js
   toggle) repaints into this skin with zero edits. The VALUES are Datum.

   No external fonts, no CDNs: system + mono stacks only. The tight CSP is
   part of the pitch to a security-conscious buyer, so we don't widen it for
   webfonts — the "engineered" identity comes from mono labels, hairline
   datum rules, a measured grid, and restraint. Works from disk. */

:root {
  /* --- cool engineering-paper base (light = primary identity) --- */
  --bg: #ECEDE8;                 /* paper */
  --surface: #FBFBF9;            /* panel */
  --surface-2: #E4E6E0;          /* panel-2 · light steel */
  --surface-3: #E7ECF2;          /* faint instrument-blue tint surface */
  --paper: #FFFFFF;
  --bg-warm: #E2E4DE;            /* band background (steel, despite the legacy name) */
  --text: #15171C;              /* ink */
  --text-dim: #474C54;
  --text-dimmer: #686E77;        /* AA small-text on paper */

  /* --- instrument blue: the single hero accent (blueprint / datum line) --- */
  --accent: #1B53C6;             /* text-safe on paper (~AA) */
  --accent-deep: #123A92;
  --accent-soft: rgba(27, 83, 198, 0.14);
  --accent-pale: rgba(27, 83, 198, 0.065);
  --accent-bright: #2E6CF0;      /* solid fills · white text rides on top */

  /* --- safety amber: secondary, RESERVED for "now / attention" only --- */
  --gold: #9A6212;               /* amber-brown, AA on paper for small text */
  --gold-deep: #7A4D0E;
  --gold-soft: rgba(154, 98, 18, 0.14);
  --gold-pale: rgba(154, 98, 18, 0.07);

  --subtle: #B6BBC1;             /* mid hairline / drawing line */
  --border: #D6D9D3;             /* hairline rule */
  --border-soft: #E5E7E1;
  --border-teal: rgba(27, 83, 198, 0.20);  /* legacy name = accent border */
  --border-accent: rgba(27, 83, 198, 0.20);

  --ok: #2F7D5B;
  --warn: #B23A30;
  --info: #2D63C2;
  --ok-wash: #EAF3EE;

  /* crisp, tight shadows — engineering precision, not soft residential blur */
  --shadow-sm: 0 1px 2px rgba(18, 22, 30, 0.05);
  --shadow: 0 4px 16px rgba(18, 22, 30, 0.08);
  --shadow-lg: 0 14px 42px rgba(18, 22, 30, 0.12);
  --shadow-teal: 0 8px 24px rgba(27, 83, 198, 0.16);  /* legacy name = accent shadow */

  --radius: 10px;                /* tighter than erin's 14 — precise */
  --radius-lg: 16px;
  --radius-sm: 7px;

  /* engineered identity from system + mono; --serif aliases the sans so any
     reused component that asks for --serif renders in the engineered face,
     never an editorial serif. */
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --serif: var(--sans);
  --display: var(--sans);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, "Courier New", monospace;

  --space: 24px;
  --rule: 1px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: var(--bg); color: var(--text); }

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* ===== Engineered type scale — sans headlines, tight tracking ===== */

h1, h2, h3, h4, .serif {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
h1 { font-size: 42px; line-height: 1.1; }
h2 { font-size: 27px; line-height: 1.2; }
h3 { font-size: 19px; line-height: 1.32; }
h4 { font-size: 16px; }
.display { font-size: 54px; line-height: 1.04; letter-spacing: -0.03em; }

/* the eyebrow + every micro-label is a mono "dimension callout" */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent);
}
.muted { color: var(--text-dim); }
.dim { color: var(--text-dimmer); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: -0.01em; }

/* a mono uppercase source/metadata tag — CAL · OUTLOOK · TEAMS · AIP */
.src-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dimmer);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}
.src-tag.accent { color: var(--accent-deep); border-color: var(--border-accent); background: var(--accent-pale); }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 1px;
  transition: border-color 0.15s, color 0.15s;
}
a:hover { border-bottom-color: var(--accent); }

button { font-family: var(--sans); cursor: pointer; border: none; background: none; color: var(--text); }

/* ===== Datum motifs ===== */

/* hairline rule, like a drawing datum line */
.datum-rule { height: var(--rule); background: var(--border); border: 0; margin: var(--space) 0; }
.datum-rule.accent { background: var(--border-accent); }

/* a very subtle blueprint grid — hero / walk-through only, never behind body text */
.blueprint-grid {
  background-image:
    linear-gradient(var(--accent-pale) var(--rule), transparent var(--rule)),
    linear-gradient(90deg, var(--accent-pale) var(--rule), transparent var(--rule));
  background-size: 28px 28px;
}

/* leader-line callout note (engineering annotation) */
.callout {
  position: relative;
  padding-left: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}
.callout::before {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px;
  width: 2px; background: var(--accent);
}

/* the ITAR/EAR scope line — appears on every page; the bright line made visible */
.scope-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-dim);
  letter-spacing: 0.2px;
}
.scope-banner strong {
  color: var(--accent-deep);
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-size: 10px;
}

/* "photo" placeholder, re-skinned to a steel/blueprint plate (no real photos) */
.photo-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 16% 12%, rgba(46,108,240,0.28), transparent 60%),
    linear-gradient(135deg, #1b2430 0%, #233244 52%, #2c405a 100%);
  border: 1px solid var(--border-accent);
  min-height: 180px;
  display: flex; align-items: flex-end;
  box-shadow: var(--shadow-sm);
}
.photo-frame::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) var(--rule), transparent var(--rule)),
    linear-gradient(90deg, rgba(255,255,255,0.05) var(--rule), transparent var(--rule));
  background-size: 22px 22px;
  opacity: 0.7;
}
.photo-frame .photo-label {
  position: relative; margin: 14px; padding: 6px 11px;
  background: rgba(10,14,20,0.62);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.6px;
  color: #eaf0fb;
  display: inline-flex; align-items: center; gap: 6px;
}
.photo-frame .photo-label::before { content: "⌖"; font-size: 11px; }
.photo-frame.tall { min-height: 280px; }
.photo-frame.short { min-height: 130px; }

/* ===== App shell (grid contract shared with shell.css: 248px + 1fr) ===== */

.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.app-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.app-noshell { display: block; min-height: 100vh; }

/* legacy hand-rolled rail (kept styled in case any page ships one before
   shell.js mounts; shell.js replaces aside.nav / aside.sidebar at load) */
aside.nav, aside.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 22px 16px 28px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}

main.content, main.workspace {
  padding: 40px 52px;
  max-width: 1120px;
  width: 100%;
  min-width: 0; /* let the 1fr grid column shrink to its track; a wide inner scroller (datalayer tab row) must scroll, not push the page */
}
.workspace-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.ws-title { font-size: 30px; }
.ws-sub { color: var(--text-dim); font-size: 14px; margin-top: 2px; }
.ws-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ws-chip {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--accent-deep); background: var(--accent-pale);
  border: 1px solid var(--border-accent); border-radius: 999px; padding: 4px 10px;
}

/* ===== Hero ===== */

.hero {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px;
  align-items: stretch; margin-bottom: 34px;
}
.hero .hero-copy { display: flex; flex-direction: column; justify-content: center; }
.hero .hero-copy h1 { font-size: 44px; margin: 8px 0 12px; }
.hero .hero-copy .sub { font-size: 16px; color: var(--text-dim); max-width: 46ch; }
.hero .hero-photo, .hero .hero-plate { min-height: 240px; }

/* a structured "instrument plate" hero panel (no photos) */
.hero-plate {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border-accent);
  background:
    radial-gradient(130% 100% at 12% 8%, rgba(46,108,240,0.16), transparent 62%),
    linear-gradient(150deg, var(--surface-3), var(--surface));
  box-shadow: var(--shadow-sm);
  display: flex; align-items: flex-end; padding: 18px;
}
.hero-plate.blueprint-grid { background-blend-mode: normal; }

/* ===== Page header ===== */
.page-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 30px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-size: 34px; margin-top: 4px; }
.page-header .date { color: var(--text-dim); font-size: 13px; font-family: var(--mono); }

/* ===== Cards ===== */

.card, .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-title { font-size: 18px; }
.panel-hint, .admin-hint { font-family: var(--mono); font-size: 11px; color: var(--text-dimmer); letter-spacing: 0.4px; }
.card-tight { padding: 15px; }
.card h2, .card h3, .panel h2, .panel h3 { margin-bottom: 14px; }
.card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 18px; }

/* thread / program card */
.thread-card, .program-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  cursor: pointer; border-bottom: none; display: block; color: var(--text);
}
.thread-card:hover, .program-card:hover { border-color: var(--border-accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.thread-card .family, .program-card .program { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }
.thread-card .stage, .program-card .phase {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 12px; font-weight: 600;
}
.thread-card .next-action, .program-card .next-action {
  font-size: 13px; color: var(--text-dim);
  border-top: 1px solid var(--border-soft); padding-top: 10px;
}
.thread-card .next-action strong, .program-card .next-action strong { color: var(--text); font-weight: 600; }

/* ===== Inbox / source rows ===== */
.inbox-item { display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border-soft); }
.inbox-item:last-child { border-bottom: none; }
.inbox-item .source { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dimmer); font-weight: 600; }
.inbox-item .body { color: var(--text); font-size: 14px; }
.inbox-item .action { font-size: 12px; color: var(--accent); white-space: nowrap; font-weight: 600; }

/* ===== Calendar / schedule rows ===== */
.calendar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.cal-row { display: flex; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border-soft); gap: 16px; }
.cal-row:last-child { border-bottom: none; }
.cal-time { font-family: var(--mono); font-size: 12px; color: var(--text-dim); width: 92px; flex-shrink: 0; }
.cal-body { flex: 1; font-size: 14px; }
.cal-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-deep); background: var(--accent-pale); border: 1px solid var(--border-accent); padding: 2px 7px; border-radius: 4px; font-weight: 600; }
.cal-tag.personal { color: var(--text-dim); background: var(--surface-2); border-color: var(--border); }

/* ===== Phase / step track (program phases A–H or journey) ===== */
.steps, .phase-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 16px 0 26px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 14px; position: relative; }
.step.done { border-color: var(--ok); background: var(--ok-wash); }
.step.current { border-color: var(--accent); background: var(--accent-pale); }
.step.next { background: var(--surface-2); border-style: dashed; }
.step .num { font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-dimmer); margin-bottom: 4px; font-weight: 600; }
.step.done .num { color: var(--ok); }
.step.current .num { color: var(--accent); }
.step .label { font-size: 13px; color: var(--text); }
.step .check { position: absolute; top: 10px; right: 12px; color: var(--ok); font-size: 14px; }

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: var(--rule); background: var(--subtle); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.tl-item .when { font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-bottom: 4px; display: block; }
.tl-item .what { font-size: 14px; color: var(--text); }
.tl-item .src { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dimmer); margin-left: 6px; }

/* ===== Two-column ===== */
.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.aside-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.aside-card h3 { font-size: 12px; margin-bottom: 13px; font-family: var(--mono); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); }
.aside-card .row { font-size: 13px; color: var(--text-dim); padding: 7px 0; border-bottom: 1px solid var(--border-soft); }
.aside-card .row:last-child { border-bottom: none; }
.aside-card .row strong { color: var(--text); font-weight: 600; }

/* ===== Next action ===== */
.next-action-card { background: linear-gradient(135deg, var(--surface-3), var(--accent-pale)); border: 1px solid var(--border-accent); border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.next-action-card .label { font-family: var(--mono); font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; font-weight: 600; }
.next-action-card .body { font-size: 15px; color: var(--text); }
.next-action-card .meta { font-size: 12px; color: var(--text-dim); margin-top: 8px; }

/* ===== CTAs ===== */
.primary-cta, .btn-primary {
  display: inline-block; background: var(--accent-bright); color: #fff;
  padding: 12px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; box-shadow: var(--shadow-teal);
  transition: background 0.15s, transform 0.15s;
}
.primary-cta:hover, .btn-primary:hover { background: var(--accent); transform: translateY(-1px); }
.secondary-cta, .btn-ghost { display: inline-block; background: var(--surface); color: var(--text); padding: 12px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; border: 1px solid var(--border); cursor: pointer; }
.secondary-cta:hover, .btn-ghost:hover { border-color: var(--border-accent); }

/* ===== Onboarding ===== */
.onboard-wrap { max-width: 660px; margin: 0 auto; padding: 64px 32px; min-height: 100vh; }
.onboard-wrap .brand { font-family: var(--display); font-weight: 600; font-size: 22px; margin-bottom: 48px; text-align: center; display: block; letter-spacing: -0.01em; }
.onboard-wrap h1 { text-align: center; margin-bottom: 10px; font-size: 40px; }
.onboard-wrap .lede { text-align: center; color: var(--text-dim); margin-bottom: 44px; font-size: 16px; }
.onboard-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.onboard-step .num { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.onboard-step h2 { font-size: 22px; margin-bottom: 6px; }
.onboard-step .help { color: var(--text-dim); font-size: 14px; margin-bottom: 16px; }
.tool-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--border-soft); }
.tool-row:last-child { border-bottom: none; }
.tool-row .name { font-size: 14px; }
.tool-row .status { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.4px; }
.tool-row .status.connected { color: var(--ok); }
.tool-row .status.pending { color: var(--accent); }
.tool-row .status.later { color: var(--text-dimmer); }

.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius-sm); padding: 11px 13px; font-size: 14px; font-family: var(--sans); color: var(--text); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-pale); }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 6px 13px; font-size: 12px; color: var(--text-dim); cursor: pointer; transition: all 0.14s; }
.chip.on { background: var(--accent-pale); border-color: var(--border-accent); color: var(--accent-deep); font-weight: 600; }

/* ===== Patterns / insights ===== */
.pattern { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 11px; }
.pattern .label { font-family: var(--mono); font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; font-weight: 600; }
.pattern .body { font-size: 14px; color: var(--text); }

/* ===== Week / program grid ===== */
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 18px; }
.day-col h4 { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dimmer); text-align: center; margin-bottom: 6px; font-weight: 600; }
.day-col .date { font-size: 17px; font-weight: 600; text-align: center; margin-bottom: 12px; color: var(--text); }
.day-col .event { background: var(--accent-pale); border-left: 2px solid var(--accent); padding: 7px 8px; font-size: 11px; border-radius: 5px; margin-bottom: 4px; color: var(--text); }
.day-col .event.personal { border-left-color: var(--gold); background: var(--gold-pale); color: var(--text-dim); }
.day-col .event .family-tag { display: block; font-family: var(--mono); font-size: 9px; color: var(--text-dimmer); letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }

/* ===== Shared coordination view (shared.html) ===== */
/* the consent header — a calm, on-brand "this is shared, with consent" strip */
.consent-head {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  background: linear-gradient(135deg, var(--surface-3), var(--accent-pale));
  border: 1px solid var(--border-accent); border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 18px;
}
.consent-head .ch-label { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.consent-head .ch-program { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.consent-head .ch-meta { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.consent-head .ch-meta strong { color: var(--text); font-weight: 600; }
.consent-head .ch-seal { text-align: right; }
.consent-head .ch-seal .ch-phase { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent-deep); background: var(--paper); border: 1px solid var(--border-accent); border-radius: 999px; padding: 4px 11px; white-space: nowrap; }
.consent-head .ch-seal .ch-consent { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--ok); margin-top: 8px; letter-spacing: 0.3px; }
.consent-head .ch-seal .ch-consent::before { content: "✓ "; }

/* a "both sides chose this" pattern card carries an owner line + warn variant */
.pattern .owner-line { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.3px; color: var(--text-dimmer); margin-top: 7px; }
.pattern.warn { border-left-color: var(--gold); }
.pattern.warn .label { color: var(--gold); }

/* points of contact — role rows, a side dot, never a real name */
.poc-row { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); }
.poc-row:last-child { border-bottom: none; }
.poc-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.poc-dot.is-crestline { background: var(--accent); }
.poc-dot.is-customer { background: var(--gold); }
.poc-who { font-size: 14px; font-weight: 600; color: var(--text); }
.poc-role { font-size: 12px; color: var(--text-dim); }

/* the "what is not shared" reassurance list (the bright line, made visible) */
.not-shared { list-style: none; margin: 4px 0 0; padding: 0; }
.not-shared li { position: relative; padding-left: 20px; font-size: 13px; color: var(--text-dim); padding-top: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border-soft); }
.not-shared li:last-child { border-bottom: none; }
.not-shared li::before { content: "✕"; position: absolute; left: 0; top: 6px; color: var(--warn); font-size: 12px; font-weight: 700; }

@media (max-width: 720px) {
  .consent-head { grid-template-columns: 1fr; }
  .consent-head .ch-seal { text-align: left; }
}

/* ===== Footer + promise row ===== */
.page-footer { margin-top: 42px; padding: 20px 0; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 11px; color: var(--text-dimmer); letter-spacing: 0.3px; text-align: center; }
.page-footer .promise { display: inline-flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.page-footer .promise span::before { content: "✓ "; color: var(--ok); }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .app, .app-shell { grid-template-columns: 1fr; }
  aside.nav, aside.sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 22px; }
  .hero { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .steps, .phase-track { grid-template-columns: repeat(2, 1fr); }
  .week-grid { grid-template-columns: 1fr; }
  main.content, main.workspace { padding: 24px; }
}

/* ============================================================
   DARK THEME — "hangar night". Deep cool ink, never pure black.
   Same three control paths as the chassis:
     1. :root[data-theme="dark"]   manual force-dark
     2. :root[data-theme="light"]  manual force-light (re-asserts paper)
     3. @media prefers-color-scheme: dark  (unless forced light)
   ============================================================ */
:root[data-theme="dark"] {
  --bg: #0E1014;
  --surface: #15181E;
  --surface-2: #1C2027;
  --surface-3: #161C25;
  --paper: #15181E;
  --bg-warm: #12151A;
  --text: #E7EAEE;
  --text-dim: #9AA2AD;
  --text-dimmer: #757D88;

  --accent: #5C8FF5;
  --accent-deep: #87AEF8;
  --accent-soft: rgba(92, 143, 245, 0.18);
  --accent-pale: rgba(92, 143, 245, 0.12);
  --accent-bright: #4F86F2;

  --gold: #E0A24A;
  --gold-deep: #EEBB72;
  --gold-soft: rgba(224, 162, 74, 0.18);
  --gold-pale: rgba(224, 162, 74, 0.10);

  --subtle: #3A424D;
  --border: #2A2F38;
  --border-soft: #21262E;
  --border-teal: rgba(92, 143, 245, 0.30);
  --border-accent: rgba(92, 143, 245, 0.30);

  --ok: #4BBF86;
  --warn: #E5786C;
  --info: #6FA7CC;
  --ok-wash: rgba(75, 191, 134, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.32);
  --shadow: 0 6px 22px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.52);
  --shadow-teal: 0 10px 30px rgba(0, 0, 0, 0.46);
}
:root[data-theme="light"] {
  --bg: #ECEDE8; --surface: #FBFBF9; --surface-2: #E4E6E0; --surface-3: #E7ECF2;
  --paper: #FFFFFF; --bg-warm: #E2E4DE; --text: #15171C; --text-dim: #474C54; --text-dimmer: #686E77;
  --accent: #1B53C6; --accent-deep: #123A92; --accent-soft: rgba(27,83,198,0.14); --accent-pale: rgba(27,83,198,0.065); --accent-bright: #2E6CF0;
  --gold: #9A6212; --gold-deep: #7A4D0E; --gold-soft: rgba(154,98,18,0.14); --gold-pale: rgba(154,98,18,0.07);
  --subtle: #B6BBC1; --border: #D6D9D3; --border-soft: #E5E7E1; --border-teal: rgba(27,83,198,0.20); --border-accent: rgba(27,83,198,0.20);
  --ok: #2F7D5B; --warn: #B23A30; --info: #2D63C2; --ok-wash: #EAF3EE;
  --shadow-sm: 0 1px 2px rgba(18,22,30,0.05); --shadow: 0 4px 16px rgba(18,22,30,0.08); --shadow-lg: 0 14px 42px rgba(18,22,30,0.12); --shadow-teal: 0 8px 24px rgba(27,83,198,0.16);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1014; --surface: #15181E; --surface-2: #1C2027; --surface-3: #161C25;
    --paper: #15181E; --bg-warm: #12151A; --text: #E7EAEE; --text-dim: #9AA2AD; --text-dimmer: #757D88;
    --accent: #5C8FF5; --accent-deep: #87AEF8; --accent-soft: rgba(92,143,245,0.18); --accent-pale: rgba(92,143,245,0.12); --accent-bright: #4F86F2;
    --gold: #E0A24A; --gold-deep: #EEBB72; --gold-soft: rgba(224,162,74,0.18); --gold-pale: rgba(224,162,74,0.10);
    --subtle: #3A424D; --border: #2A2F38; --border-soft: #21262E; --border-teal: rgba(92,143,245,0.30); --border-accent: rgba(92,143,245,0.30);
    --ok: #4BBF86; --warn: #E5786C; --info: #6FA7CC; --ok-wash: rgba(75,191,134,0.12);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.32); --shadow: 0 6px 22px rgba(0,0,0,0.40); --shadow-lg: 0 16px 48px rgba(0,0,0,0.52); --shadow-teal: 0 10px 30px rgba(0,0,0,0.46);
  }
}

/* dark touch-ups: solid accent fills keep ink-dark text legible */
:root[data-theme="dark"] .primary-cta,
:root[data-theme="dark"] .btn-primary {
  background: var(--accent-bright); color: #06101f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .primary-cta,
  :root:not([data-theme="light"]) .btn-primary { background: var(--accent-bright); color: #06101f; }
}

/* ============================================================
   THEME TOGGLE BUTTON (injected by theme.js, bottom-LEFT) — token-styled.
   ============================================================ */
.ti-theme-toggle {
  position: fixed; left: 18px; bottom: 18px; z-index: 2147483000;
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--surface); color: var(--accent);
  border: 1px solid var(--border-accent); box-shadow: var(--shadow);
  font-size: 18px; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.ti-theme-toggle:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-teal); }
.ti-theme-toggle:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-pale), var(--shadow); }
.ti-theme-toggle .ti-theme-glyph { display: block; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .ti-theme-toggle { transition: none; }
  .ti-theme-toggle:hover { transform: none; }
  * { scroll-behavior: auto !important; }
}
@media (max-width: 560px) {
  .ti-theme-toggle { left: 14px; bottom: 14px; width: 42px; height: 42px; }
}
