/* ============================================================================
   THE FRONT DOOR — an operational atlas
   Warm editorial atlas aesthetic. Fraunces / Hanken Grotesk / Spline Sans Mono.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300..900&family=Hanken+Grotesk:wght@300..800&family=Spline+Sans+Mono:wght@400..600&display=swap');

/* --- tokens --------------------------------------------------------------- */
:root {
  --paper:      #F1EADC;
  --paper-2:    #E9E0CF;
  --paper-deep: #E2D8C3;
  --card:       #FBF8F0;
  --card-2:     #F6F0E3;

  --ink:        #2A2620;
  --ink-soft:   #635B4C;
  --ink-faint:  #9A9079;
  --line:       #D9CFBB;
  --line-soft:  #E5DCC9;

  --cortexa:    #B05A33;   /* clay / terracotta */
  --cortexa-2:  #F0DCCB;
  --agp:        #687A52;   /* sage */
  --agp-2:      #DEE3CE;
  --matics:     #3F6175;   /* slate blue */
  --matics-2:   #D4DEE2;
  --client:     #97607A;   /* dusty plum */
  --client-2:   #EAD8E0;
  --gold:       #BC8E3A;

  --ok:         #5E7A52;
  --warn:       #B98A2E;
  --stop:       #AA4F3C;

  --shadow-sm:  0 1px 2px rgba(58,46,28,.06), 0 2px 6px rgba(58,46,28,.05);
  --shadow-md:  0 2px 6px rgba(58,46,28,.07), 0 10px 26px rgba(58,46,28,.09);
  --shadow-lg:  0 6px 16px rgba(58,46,28,.10), 0 26px 60px rgba(58,46,28,.14);

  --sans: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --mono: 'Spline Sans Mono', ui-monospace, 'SFMono-Regular', monospace;

  --rail: 296px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* paper grain overlay */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  opacity: .32; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

::selection { background: var(--cortexa); color: #fff; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border: 3px solid var(--paper); border-radius: 9px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

/* === APP SHELL ============================================================ */
.app { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }

/* --- sidebar -------------------------------------------------------------- */
.rail {
  position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, var(--paper-2), var(--paper-deep));
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  z-index: 50;
}
.rail::-webkit-scrollbar-thumb { border-color: var(--paper-2); }

.brand {
  padding: 26px 24px 20px;
  border-bottom: 1px solid var(--line);
}
.brand .mark {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--cortexa); font-weight: 600;
  display: flex; align-items: center; gap: 7px;
}
.brand .mark::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d98a5e, var(--cortexa));
  box-shadow: 0 0 0 3px var(--cortexa-2);
}
.brand h1 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 540;
  font-size: 30px; line-height: 1.02;
  margin: 14px 0 6px; letter-spacing: -.01em;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
}
.brand p { margin: 0; font-size: 12px; color: var(--ink-soft); line-height: 1.45; }

.nav { padding: 16px 14px 8px; flex: 1; }
.nav-group { margin-bottom: 18px; }
.nav-group > .label {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-faint);
  padding: 0 10px 8px; display: block;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; color: var(--ink-soft); font-weight: 500;
  border: 1px solid transparent;
  transition: all .18s var(--ease);
  position: relative; user-select: none;
}
.nav-item .ix {
  font-family: var(--mono); font-size: 10px; color: var(--ink-faint);
  width: 16px; text-align: center; flex-shrink: 0;
  transition: color .18s var(--ease);
}
.nav-item:hover { background: rgba(255,255,255,.5); color: var(--ink); }
.nav-item.active {
  background: var(--card); color: var(--ink); font-weight: 600;
  border-color: var(--line); box-shadow: var(--shadow-sm);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -1px; top: 22%; bottom: 22%;
  width: 3px; border-radius: 3px; background: var(--accent, var(--cortexa));
}
.nav-item.active .ix { color: var(--accent, var(--cortexa)); }
.nav-item .dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); margin-left: auto; opacity: .7;
}

.legend {
  border-top: 1px solid var(--line);
  padding: 16px 24px 22px;
  font-size: 11px; color: var(--ink-soft);
}
.legend .label {
  font-family: var(--mono); font-size: 9px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 9px;
}
.legend .row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.legend .sw { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }

.rail-logout { border-top: 1px solid var(--line); padding: 14px 24px 20px; }
.text-button {
  appearance: none; background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint); transition: color .18s var(--ease);
}
.text-button:hover { color: var(--cortexa); }

/* === MAIN ================================================================= */
.main { min-width: 0; position: relative; }
.view {
  max-width: 1080px; margin: 0 auto;
  padding: 60px 64px 120px;
  animation: viewIn .5s var(--ease) both;
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* atmospheric hero backdrop (atlas contour rings) */
.hero-bg {
  position: absolute; top: -120px; right: -160px; width: 720px; height: 720px;
  pointer-events: none; z-index: 0; opacity: .5;
  background:
    radial-gradient(circle at center,
      transparent 0 38%, rgba(176,90,51,.05) 38% 39%, transparent 39% 46%,
      rgba(176,90,51,.045) 46% 47%, transparent 47% 55%,
      rgba(63,97,117,.04) 55% 56%, transparent 56% 65%,
      rgba(104,122,82,.04) 65% 66%, transparent 66%);
  mask-image: radial-gradient(circle at center, #000 30%, transparent 72%);
}

/* --- type scale ----------------------------------------------------------- */
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--cortexa); font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::after { content: ""; height: 1px; flex: 1; background: var(--line); max-width: 80px; }

h2.title {
  font-family: var(--serif); font-optical-sizing: auto;
  font-weight: 520; font-size: clamp(34px, 5vw, 56px);
  line-height: 1.0; letter-spacing: -.02em; margin: 18px 0 0;
  font-variation-settings: 'SOFT' 30, 'WONK' 0;
}
h3.sect {
  font-family: var(--serif); font-weight: 540; font-size: 25px;
  letter-spacing: -.01em; margin: 0 0 4px;
  font-variation-settings: 'SOFT' 20;
}
.lede { font-size: 18px; line-height: 1.55; color: var(--ink-soft); max-width: 60ch; margin: 18px 0 0; }

.section { margin-top: 56px; position: relative; z-index: 1; }
.section > .head { margin-bottom: 22px; }
.section > .head .k {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px;
}

/* === reusable bits ======================================================== */
.tag {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  padding: 2px 7px; border-radius: 5px; letter-spacing: .02em;
  background: var(--card-2); border: 1px solid var(--line); color: var(--ink-soft);
  white-space: nowrap;
}
.tag.clickable { cursor: pointer; transition: all .15s var(--ease); }
.tag.clickable:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.owner-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 20px;
}
.owner-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.o-cortexa { color: var(--cortexa); background: var(--cortexa-2); }
.o-agp     { color: var(--agp);     background: var(--agp-2); }
.o-matics  { color: var(--matics);  background: var(--matics-2); }
.o-client  { color: var(--client);  background: var(--client-2); }
.o-system  { color: var(--ink-soft); background: var(--card-2); }

.pill {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  padding: 3px 9px; border-radius: 20px; letter-spacing: .04em;
  border: 1px solid var(--line); color: var(--ink-soft); background: var(--card);
  white-space: nowrap; text-transform: lowercase;
}
.pill.s-done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: color-mix(in srgb, var(--ok) 9%, var(--card)); }
.pill.s-progress { color: var(--matics); border-color: color-mix(in srgb, var(--matics) 40%, var(--line)); background: color-mix(in srgb, var(--matics) 9%, var(--card)); }
.pill.s-blocked, .pill.s-open { color: var(--stop); border-color: color-mix(in srgb, var(--stop) 40%, var(--line)); background: color-mix(in srgb, var(--stop) 8%, var(--card)); }
.pill.s-not { color: var(--ink-faint); }
.pill.s-resolved, .pill.s-narrowed { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-sm);
}

/* === HERO / OVERVIEW ====================================================== */
.hero { position: relative; z-index: 1; }
.principle {
  margin: 36px 0 0; padding: 26px 30px;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line); border-left: 4px solid var(--cortexa);
  border-radius: 4px 14px 14px 4px; box-shadow: var(--shadow-md);
  position: relative;
}
.principle .q {
  font-family: var(--serif); font-weight: 480; font-size: 25px; line-height: 1.28;
  letter-spacing: -.01em; font-variation-settings: 'SOFT' 40, 'WONK' 1;
}
.principle .q b { font-weight: 640; font-style: italic; color: var(--cortexa); }
.principle .why { margin: 14px 0 0; font-size: 14px; color: var(--ink-soft); max-width: 64ch; }

/* stage rail */
.rail-stages {
  margin: 50px 0 0; position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
}
.rail-stages .connector {
  position: absolute; top: 27px; left: 8%; right: 8%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 11px);
  z-index: 0;
}
.stage-node {
  position: relative; z-index: 1; text-align: center; cursor: pointer;
  padding: 0 6px;
  animation: nodeIn .55s var(--ease) both;
}
.stage-node .bub {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--card); border: 1.5px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 23px; font-weight: 560; color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: all .22s var(--ease);
  font-variation-settings: 'SOFT' 40;
}
.stage-node .nm { font-family: var(--serif); font-size: 15px; font-weight: 560; line-height: 1.1; letter-spacing: -.01em; }
.stage-node .tl { font-size: 11px; color: var(--ink-faint); margin-top: 4px; line-height: 1.3; }
.stage-node:hover .bub, .stage-node.active .bub {
  background: var(--cortexa); color: #fff; border-color: var(--cortexa);
  transform: translateY(-3px) scale(1.04); box-shadow: var(--shadow-md);
}
@keyframes nodeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* two-ways-in CTA */
.ways { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.way {
  padding: 24px; cursor: pointer; transition: all .2s var(--ease);
  position: relative; overflow: hidden;
}
.way:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--ink-faint); }
.way .ic { font-family: var(--serif); font-size: 30px; color: var(--cortexa); line-height: 1; }
.way h4 { font-family: var(--serif); font-weight: 560; font-size: 20px; margin: 12px 0 6px; }
.way p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.way .go { margin-top: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--cortexa); }

/* owner cards */
.owners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.owner-card { padding: 22px; position: relative; overflow: hidden; }
.owner-card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--c);
}
.owner-card .nm { font-family: var(--serif); font-size: 22px; font-weight: 580; color: var(--c); margin-top: 6px; }
.owner-card .rl { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.owner-card p { font-size: 13px; color: var(--ink-soft); margin: 12px 0 0; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stat { background: var(--card); padding: 20px 22px; }
.stat .n { font-family: var(--serif); font-size: 34px; font-weight: 580; line-height: 1; letter-spacing: -.02em; }
.stat .n.alt { color: var(--cortexa); }
.stat .l { font-size: 12px; color: var(--ink-soft); margin-top: 7px; }

/* === JOURNEY DETAIL ======================================================= */
.stage-head { display: flex; align-items: flex-start; gap: 24px; }
.stage-head .big {
  font-family: var(--serif); font-size: 88px; font-weight: 300; line-height: .8;
  color: var(--cortexa); letter-spacing: -.04em; flex-shrink: 0;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.stage-head .tl { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.stage-head h2 { font-family: var(--serif); font-weight: 540; font-size: 42px; line-height: 1; letter-spacing: -.02em; margin: 6px 0 0; font-variation-settings: 'SOFT' 30; }
.stage-head .sub { font-size: 16px; color: var(--ink-soft); font-style: italic; font-family: var(--serif); margin-top: 8px; }

.io-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.io {
  display: flex; align-items: center; gap: 9px; padding: 9px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; font-size: 13px;
}
.io .k { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.io .arrow { color: var(--cortexa); }

.callout {
  margin-top: 26px; padding: 18px 22px;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 12px;
  border-left: 3px solid var(--gold);
}
.callout .k { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 7px; }
.callout p { margin: 0; font-size: 15px; line-height: 1.5; }

/* fires timeline */
.fires { margin-top: 14px; position: relative; padding-left: 4px; }
.fire {
  display: grid; grid-template-columns: 92px 1fr; gap: 16px;
  padding: 13px 0; border-bottom: 1px dashed var(--line-soft); align-items: start;
}
.fire:last-child { border-bottom: none; }
.fire .who { display: flex; justify-content: flex-end; }
.fire .t { font-size: 14px; line-height: 1.45; padding-top: 1px; }

/* actor grid */
.actor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.actor-cell { padding: 16px 18px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--ac, var(--line)); }
.actor-cell .who { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin-bottom: 8px; color: var(--ac); }
.actor-cell p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.actor-cell.muted { opacity: .58; }

.chips { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; }

.bullets { margin: 14px 0 0; padding: 0; list-style: none; }
.bullets li { position: relative; padding-left: 22px; margin-bottom: 9px; font-size: 14px; line-height: 1.5; }
.bullets li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--cortexa); }

/* stage prev/next nav */
.stage-foot { display: flex; justify-content: space-between; margin-top: 56px; gap: 14px; }
.stage-foot .nb { flex: 1; padding: 16px 20px; cursor: pointer; transition: all .2s var(--ease); }
.stage-foot .nb:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--ink-faint); }
.stage-foot .nb .k { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.stage-foot .nb .nm { font-family: var(--serif); font-size: 19px; font-weight: 540; margin-top: 4px; }
.stage-foot .nb.next { text-align: right; }
.stage-foot .nb.disabled { opacity: .35; pointer-events: none; }

/* === PERSPECTIVE / ROLE =================================================== */
.role-hero { position: relative; z-index: 1; padding: 34px 36px; overflow: hidden; }
.role-hero::after { content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 5px; background: var(--rc); }
.role-hero .who-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--rc); font-weight: 600; }
.role-hero h2 { font-family: var(--serif); font-weight: 540; font-size: 46px; margin: 8px 0 0; letter-spacing: -.02em; font-variation-settings: 'SOFT' 30; }
.role-hero .one { font-size: 18px; color: var(--ink-soft); margin: 12px 0 0; max-width: 62ch; line-height: 1.5; }

.golden {
  margin-top: 22px; padding: 18px 22px; border-radius: 12px;
  background: color-mix(in srgb, var(--rc) 7%, var(--card));
  border: 1px solid color-mix(in srgb, var(--rc) 28%, var(--line));
}
.golden .k { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--rc); margin-bottom: 7px; font-weight: 600; }
.golden p { margin: 0; font-size: 14.5px; line-height: 1.55; }

/* actor-role playbook: slim hero, governing rule line, and per-flow furniture */
.role-hero.slim { padding-bottom: 28px; }
.govrule { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 14.5px; line-height: 1.55; color: var(--ink); }
.govrule .k { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--rc); margin-right: 9px; font-weight: 600; }
.role-flow .flow-intro { font-size: 14px; line-height: 1.6; color: var(--ink-soft); max-width: 72ch; margin: 0 0 22px; }
.flow-foot { margin-top: 20px; display: flex; flex-direction: column; gap: 13px; }
.flow-dont { font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); border-left: 3px solid color-mix(in srgb, var(--stop) 55%, var(--line)); padding: 2px 0 2px 13px; }
.flow-dont .k { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--stop); margin-right: 9px; font-weight: 600; }

/* active-stage strip */
.active-strip { display: flex; gap: 7px; margin-top: 22px; flex-wrap: wrap; }
.as-node {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px;
  border-radius: 22px; border: 1px solid var(--line); background: var(--card);
  font-size: 12.5px; color: var(--ink-faint); cursor: pointer; transition: all .18s var(--ease);
}
.as-node .n { font-family: var(--serif); font-size: 13px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--line); }
.as-node.on { color: var(--ink); border-color: color-mix(in srgb, var(--rc) 40%, var(--line)); background: color-mix(in srgb, var(--rc) 8%, var(--card)); font-weight: 600; }
.as-node.on .n { background: var(--rc); color: #fff; border-color: var(--rc); }
.as-node:hover { transform: translateY(-2px); }

.jobs { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: j; }
.jobs li { position: relative; padding: 12px 0 12px 44px; border-bottom: 1px solid var(--line-soft); font-size: 15px; counter-increment: j; }
.jobs li:last-child { border-bottom: none; }
.jobs li::before {
  content: counter(j); position: absolute; left: 0; top: 11px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--rc); color: #fff;
  font-family: var(--serif); font-size: 14px; display: grid; place-items: center; font-weight: 500;
}

/* play cards (accordion) */
.plays { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.play { overflow: hidden; transition: box-shadow .2s var(--ease); }
.play.open { box-shadow: var(--shadow-md); }
.play .ph { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; user-select: none; }
.play .ph:hover { background: var(--card-2); }
.play .ph .stg { font-family: var(--mono); font-size: 10px; color: var(--rc); border: 1px solid color-mix(in srgb, var(--rc) 30%, var(--line)); padding: 2px 7px; border-radius: 5px; flex-shrink: 0; }
.play .ph h4 { font-family: var(--serif); font-weight: 540; font-size: 19px; margin: 0; flex: 1; letter-spacing: -.01em; }
.play .ph .tw { font-family: var(--mono); font-size: 18px; color: var(--ink-faint); transition: transform .25s var(--ease); }
.play.open .ph .tw { transform: rotate(45deg); color: var(--rc); }
.play .body { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height .35s var(--ease), padding .35s var(--ease); }
.play.open .body { max-height: 1400px; padding: 4px 20px 22px; }
.play .trig { font-size: 14px; color: var(--ink-soft); font-style: italic; font-family: var(--serif); padding: 10px 0 6px; border-top: 1px solid var(--line-soft); }
.play .why { font-size: 13.5px; color: var(--ink-soft); margin: 4px 0 12px; padding: 10px 14px; background: var(--card-2); border-radius: 9px; }
.play .why .k, .play .never .k { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-right: 8px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { position: relative; padding: 8px 0 8px 36px; font-size: 14px; line-height: 1.5; counter-increment: s; border-bottom: 1px dashed var(--line-soft); }
.steps li:last-child { border-bottom: none; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 8px;
  width: 23px; height: 23px; border-radius: 7px; background: var(--card-2); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; display: grid; place-items: center; color: var(--rc); font-weight: 600;
}
.play .never { margin-top: 14px; padding: 11px 16px; border-radius: 9px; background: color-mix(in srgb, var(--stop) 7%, var(--card)); border: 1px solid color-mix(in srgb, var(--stop) 22%, var(--line)); font-size: 13.5px; }
.play .never .k { color: var(--stop); }

/* === GENERIC SECTION CARDS / GRIDS ======================================== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.mod-card { padding: 20px 22px; cursor: pointer; transition: all .2s var(--ease); position: relative; overflow: hidden; }
.mod-card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); transform: scaleY(0); transform-origin: top; transition: transform .25s var(--ease); }
.mod-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.mod-card:hover::after, .mod-card.open::after { transform: scaleY(1); }
.mod-card .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mod-card h4 { font-family: var(--serif); font-weight: 560; font-size: 19px; margin: 10px 0 0; letter-spacing: -.01em; }
.mod-card .one { font-size: 13px; color: var(--ink-soft); margin: 7px 0 0; line-height: 1.45; }
.mod-card .detail { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease), margin .3s; }
.mod-card.open .detail { max-height: 800px; margin-top: 16px; }
.mod-card .detail .blk { padding-top: 14px; border-top: 1px solid var(--line-soft); margin-top: 14px; }
.mod-card .detail .blk:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.mod-card .detail .lbl { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.mod-card .detail p { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tbl thead th { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); text-align: left; padding: 12px 16px; background: var(--card-2); border-bottom: 1px solid var(--line); font-weight: 600; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; line-height: 1.45; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--card-2); }
.tbl .mono { font-family: var(--mono); font-size: 12px; }
.tbl-wrap { overflow-x: auto; border-radius: 12px; }

/* flow diagram */
.flow-map { position: relative; z-index: 1; }
.entry-paths { display: flex; flex-direction: column; gap: 8px; }
.epath { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px 18px; transition: all .18s var(--ease); }
.epath:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
.epath .nm { font-weight: 600; font-size: 14px; }
.epath .tch { font-size: 12.5px; color: var(--ink-soft); }
.epath .fl { font-family: var(--serif); font-weight: 640; font-size: 20px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.epath .fl.A { color: var(--cortexa); background: var(--cortexa-2); }
.epath .fl.B { color: var(--matics); background: var(--matics-2); }

.flow-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.flow-col { padding: 22px; }
.flow-col h4 { font-family: var(--serif); font-weight: 560; font-size: 21px; margin: 0; }
.flow-col.A { border-top: 4px solid var(--cortexa); }
.flow-col.B { border-top: 4px solid var(--matics); }
.flow-col .bl { font-size: 13.5px; color: var(--ink-soft); margin: 8px 0 16px; line-height: 1.5; }

.qstep { display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line-soft); }
.qstep:last-child { border-bottom: none; }
.qstep .n { font-family: var(--serif); font-size: 17px; font-weight: 560; color: var(--cortexa); }
.qstep .c { font-weight: 600; font-size: 14px; }
.qstep .w { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; line-height: 1.45; }

.box {
  padding: 20px 22px; border-radius: 13px; border: 1px solid var(--line); background: var(--card);
}
.box.crisis { border-color: color-mix(in srgb, var(--stop) 30%, var(--line)); background: color-mix(in srgb, var(--stop) 6%, var(--card)); }
.box .bh { font-family: var(--serif); font-weight: 560; font-size: 19px; margin: 0 0 4px; }
.box.crisis .bh { color: var(--stop); }

/* swimlanes */
.lanes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lane { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.lane .lh { padding: 16px 20px; color: #fff; }
.lane.l-cortexa .lh { background: var(--cortexa); }
.lane.l-agp .lh { background: var(--agp); }
.lane.l-matics .lh { background: var(--matics); }
.lane .lh .nm { font-family: var(--serif); font-size: 22px; font-weight: 580; line-height: 1; }
.lane .lh .rl { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; margin-top: 4px; }
.lane .lb { padding: 18px 20px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }

/* relationship split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 4px; }
.split .half { padding: 22px; border-radius: 13px; border: 1px solid var(--line); background: var(--card); }
.split .half.before { border-top: 4px solid var(--ink-faint); }
.split .half.after { border-top: 4px solid var(--cortexa); }
.split .half h4 { font-family: var(--serif); font-weight: 560; font-size: 18px; margin: 0 0 8px; }
.split .half p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }

/* handoff moments */
.moments { display: flex; flex-direction: column; gap: 12px; }
.moment { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 16px 20px; align-items: start; }
.moment .ho { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; }
.moment .ho .ar { color: var(--cortexa); }
.moment .when { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.moment .what { font-size: 14px; margin-top: 4px; line-height: 1.45; }

/* directory */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.filters .fl-label { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-right: 4px; }
.fbtn { font-family: var(--mono); font-size: 11px; padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); cursor: pointer; transition: all .15s var(--ease); }
.fbtn:hover { border-color: var(--ink-faint); }
.fbtn.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.clin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.clin { padding: 16px 18px; transition: all .18s var(--ease); }
.clin:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.clin .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.clin .nm { font-family: var(--serif); font-size: 18px; font-weight: 560; letter-spacing: -.01em; }
.clin .cr { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }
.clin .meta { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.clin .nt { font-size: 12px; color: var(--ink-soft); margin-top: 10px; font-style: italic; font-family: var(--serif); }
.clin .flags { display: flex; gap: 6px; margin-top: 10px; }
.fchip { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--line); color: var(--ink-faint); }
.fchip.on-d { color: var(--cortexa); border-color: color-mix(in srgb, var(--cortexa) 35%, var(--line)); background: var(--cortexa-2); }
.fchip.on-m { color: var(--matics); border-color: color-mix(in srgb, var(--matics) 35%, var(--line)); background: var(--matics-2); }

/* open questions */
.oq-group { margin-top: 30px; }
.oq-group > .gh { font-family: var(--serif); font-weight: 560; font-size: 22px; margin: 0 0 3px; }
.oq-group > .gn { font-size: 13px; color: var(--ink-soft); margin: 0 0 14px; }
.oq { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; padding: 14px 18px; align-items: start; }
.oq .qtag { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--cortexa); }
.oq .q { font-size: 14px; line-height: 1.5; }
.oq .meta { font-size: 11px; color: var(--ink-faint); font-family: var(--mono); margin-top: 5px; }

.foot-note { margin-top: 60px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-faint); font-family: var(--mono); line-height: 1.6; }

/* === JOURNEY (visual branching flow) ===================================== */
.jprinciple {
  font-family: var(--serif); font-style: italic; font-weight: 420;
  font-size: 20px; line-height: 1.45; color: var(--ink-soft);
  margin: 24px 0 0; max-width: 58ch;
  font-variation-settings: 'SOFT' 50, 'WONK' 1;
  padding-left: 18px; border-left: 3px solid var(--cortexa);
}
.who-strip { display: flex; gap: 10px; flex-wrap: wrap; }

.flowmap { display: flex; flex-direction: column; align-items: center; margin: 26px 0 0; }

/* vertical connector between bands */
.fconn { width: 2px; height: 26px; background: var(--line); position: relative; flex: none; }
.fconn::after {
  content: ""; position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid var(--ink-faint);
}

/* endpoint pills */
.fend {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px;
  border-radius: 24px; background: var(--card); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-sm);
  animation: jnodeIn .4s var(--ease) both;
}
.fend .fk { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.fend .fdot { width: 9px; height: 9px; border-radius: 50%; }
.fend.in .fdot { background: var(--paper); border: 2px solid var(--ink-faint); }
.fend.out { border-color: color-mix(in srgb, var(--cortexa) 35%, var(--line)); }
.fend.out .fdot { background: var(--cortexa); }

@keyframes jnodeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* node card */
.fnode {
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--ac, var(--ink-faint));
  border-radius: 11px; padding: 11px 15px; box-shadow: var(--shadow-sm);
  width: 280px; max-width: 100%; text-align: left;
  animation: jnodeIn .4s var(--ease) both;
}
.fnode .fn-who { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--ac, var(--ink-faint)); font-weight: 600; margin-bottom: 3px; }
.fnode .fn-ti { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.fnode .fn-su { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; line-height: 1.4; }

/* small vertical connector within a branch/lane */
.vconn { width: 2px; height: 14px; background: var(--line); margin: 0 auto; flex: none; }

/* split / parallel shared frame */
.fsplit, .fpar { display: flex; flex-direction: column; align-items: center; width: 100%; }
.fprompt {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); background: var(--card-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 14px; font-weight: 600; text-align: center;
}
.fstem { width: 2px; height: 22px; background: var(--line); flex: none; }

.fbranches, .flanes { display: flex; align-items: flex-start; justify-content: center; gap: 16px; width: 100%; }
.fbranch, .flane {
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding-top: 24px; flex: 1 1 0; min-width: 0; max-width: 260px;
}
/* horizontal bar across the top */
.fbranch::after, .flane::after { content: ""; position: absolute; top: 0; height: 2px; background: var(--line); left: 0; right: 0; }
.fbranch:first-child::after, .flane:first-child::after { left: 50%; }
.fbranch:last-child::after, .flane:last-child::after { right: 50%; }
.fbranch:only-child::after, .flane:only-child::after { display: none; }
/* vertical drop into the branch */
.fbranch::before, .flane::before { content: ""; position: absolute; top: 0; left: calc(50% - 1px); width: 2px; height: 24px; background: var(--line); }
.fbranch .fnode, .flane .fnode { width: 100%; }

.flabel {
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .02em;
  color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: 4px 11px; margin-bottom: 12px; text-align: center;
}
.foutcome {
  margin-top: 12px; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .02em;
  padding: 6px 13px; border-radius: 8px; color: #fff; background: var(--oc, var(--ink-soft)); box-shadow: var(--shadow-sm);
  text-align: center;
}
.fcontinue { margin-top: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }

/* parallel lanes */
.lane-head {
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ac); background: color-mix(in srgb, var(--ac) 12%, var(--card));
  border: 1px solid color-mix(in srgb, var(--ac) 32%, var(--line)); border-radius: 8px;
  padding: 6px 12px; margin-bottom: 12px; text-align: center;
}
.fmerge { display: flex; flex-direction: column; align-items: center; width: 100%; margin-top: 18px; }
.fmerge-bar { width: 66%; height: 2px; background: var(--line); }

/* collapsible full-detail disclosure */
.disc { width: 100%; border: 1px solid var(--line); border-radius: 13px; background: var(--card); overflow: hidden; box-shadow: var(--shadow-sm); }
.disc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; cursor: pointer; user-select: none; font-weight: 600; font-size: 14.5px; }
.disc-head:hover { background: var(--card-2); }
.disc-head .tw { font-family: var(--mono); font-size: 18px; color: var(--ink-faint); transition: transform .25s var(--ease); }
.disc.open .disc-head .tw { transform: rotate(45deg); color: var(--cortexa); }
.disc-body { max-height: 0; overflow: hidden; transition: max-height .45s var(--ease); }
.disc.open .disc-body { max-height: 2200px; }
.disc-inner { padding: 4px 22px 24px; }

/* mobile */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; }
  .view { padding: 36px 24px 80px; }
  .rail-stages, .owners, .grid-3, .lanes, .ways, .flow-two, .clin-grid, .split, .actor-grid, .grid-2, .stat-row { grid-template-columns: 1fr; }
  .stage-head .big { font-size: 60px; }
}

/* === MODULE PAGE + GENERIC CONTENT BLOCKS ================================= */
.mod-card.linkcard { cursor: pointer; }
.mod-card .go { margin-top: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--c, var(--cortexa)); }

.mod-page-head { position: relative; z-index: 1; }
.mod-page-head .back { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--ink-faint); cursor: pointer; display: inline-block; transition: color .15s var(--ease); }
.mod-page-head .back:hover { color: var(--cortexa); }

.mod-abstract { padding: 22px 26px; margin-top: 26px; position: relative; z-index: 1; border-left: 4px solid var(--c, var(--ink-faint)); }
.mod-abstract .blk { padding-top: 14px; border-top: 1px solid var(--line-soft); margin-top: 14px; }
.mod-abstract .blk:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.mod-abstract .lbl { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.mod-abstract > .blk > p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }

.mod-toc { margin-top: 28px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); position: relative; z-index: 1; }
.mod-toc .k { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 10px; }
.mod-toc .toc-links { display: flex; flex-wrap: wrap; gap: 8px; }
.toc-link { font-size: 12.5px; padding: 5px 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); cursor: pointer; transition: all .15s var(--ease); }
.toc-link:hover { border-color: var(--cortexa); color: var(--cortexa); transform: translateY(-1px); }

.mod-section { margin-top: 44px; scroll-margin-top: 24px; position: relative; z-index: 1; }
.mod-section .ms-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.mod-section .ms-head .sect { margin: 0; }

.mb-prose { font-size: 14.5px; line-height: 1.62; margin: 0 0 14px; }
.mb-prose:last-child { margin-bottom: 0; }
.mb-subhead { font-family: var(--serif); font-weight: 560; font-size: 17px; margin: 24px 0 8px; letter-spacing: -.01em; }
.mb-ol { margin: 12px 0; padding-left: 22px; }
.mb-ol li { font-size: 14px; line-height: 1.55; margin-bottom: 7px; }
.mb-steps { margin: 14px 0; }
.mb-cap { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin: 20px 0 8px; }
.mb-diagram { font-family: var(--mono); font-size: 12px; line-height: 1.5; background: var(--card-2); border: 1px solid var(--line); border-radius: 11px; padding: 16px 18px; overflow-x: auto; color: var(--ink); margin: 8px 0 16px; white-space: pre; }
.mb-callout { margin: 16px 0; }
.callout.t-warn { border-left-color: var(--stop); background: color-mix(in srgb, var(--stop) 6%, var(--card-2)); }
.callout.t-warn .k { color: var(--stop); }
.callout.t-open { border-left-color: var(--matics); background: color-mix(in srgb, var(--matics) 6%, var(--card-2)); }
.callout.t-open .k { color: var(--matics); }
code.ic { font-family: var(--mono); font-size: .9em; background: var(--card-2); border: 1px solid var(--line-soft); border-radius: 4px; padding: 1px 5px; }

/* key-value rows (rates, definitions, glossary) */
.kv { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); margin: 8px 0 16px; }
.kv-row { display: grid; grid-template-columns: 230px 1fr; border-bottom: 1px solid var(--line-soft); }
.kv-row:last-child { border-bottom: none; }
.kv-row:hover { background: var(--card-2); }
.kv-k { padding: 12px 16px; font-weight: 600; font-size: 13.5px; border-right: 1px solid var(--line-soft); background: var(--card-2); }
.kv-v { padding: 12px 16px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.kv-glossary .kv-k { font-family: var(--serif); font-size: 15.5px; font-weight: 560; color: var(--ink); }

/* readiness notes */
.rd-item { font-size: 13.5px; line-height: 1.45; }
.rd-note { font-size: 12px; color: var(--ink-faint); margin-top: 5px; line-height: 1.45; }

@media (max-width: 900px) {
  .kv-row { grid-template-columns: 1fr; }
  .kv-k { border-right: none; border-bottom: 1px solid var(--line-soft); }
}

/* portal login, before the authenticated explorer shell renders */
.login-only,
.loading-only {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel,
.loading-panel {
  width: min(100%, 460px);
}

.login-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px;
  background: var(--card);
  box-shadow: var(--shadow-md);
}

.brand-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cortexa);
}

.login-card h1,
.loading-panel h1 {
  margin: 6px 0 24px;
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1;
  letter-spacing: -.02em;
}

.login-card form {
  display: grid;
  gap: 14px;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-weight: 700;
}

.login-card input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 12px;
  background: var(--paper);
  color: var(--ink);
}

.login-card button[type="submit"] {
  height: 44px;
  border: 0;
  border-radius: 9px;
  background: var(--cortexa);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.form-error,
.setup-copy {
  min-height: 20px;
  margin: 0;
  color: var(--stop);
  line-height: 1.45;
}
.login-card input:focus {
  outline: none; border-color: var(--cortexa);
  box-shadow: 0 0 0 3px var(--cortexa-2);
}
.login-card button[type="submit"] { transition: background .18s var(--ease); }
.login-card button[type="submit"]:hover { background: color-mix(in srgb, var(--cortexa) 88%, #000); }
.login-card button[type="submit"]:disabled { opacity: .6; cursor: default; }

/* ============================================================================
   OVERVIEW — the simple, high-level "what is Cortexa" landing. ov-* namespace
   so it never collides with the journey/role/module renderers. Refined
   minimalism over the warm atlas palette: one definition, then six moves.
   ============================================================================ */
.ov-hero { position: relative; z-index: 1; }
.ov-title {
  font-family: var(--serif); font-optical-sizing: auto; font-weight: 500;
  font-size: clamp(42px, 6.5vw, 78px); line-height: .97; letter-spacing: -.025em;
  margin: 22px 0 0; font-variation-settings: 'SOFT' 30, 'WONK' 1;
}
.ov-title .em { font-style: italic; color: var(--cortexa); font-weight: 560; }
.ov-lede { font-size: 19px; line-height: 1.5; color: var(--ink-soft); max-width: 62ch; margin: 24px 0 0; }
.ov-lede b { color: var(--ink); font-weight: 640; }
.ov-chips { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.ov-chip {
  font-family: var(--mono); font-size: 11px; letter-spacing: .03em; font-weight: 500;
  padding: 7px 13px; border-radius: 22px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink-soft); display: inline-flex; align-items: center; gap: 8px;
}
.ov-chip .d { width: 7px; height: 7px; border-radius: 50%; }

.ov-spine { position: relative; z-index: 1; }
.ov-spine::before {
  content: ""; position: absolute; left: 27px; top: 18px; bottom: 34px; width: 2px;
  background: linear-gradient(180deg, var(--cortexa), color-mix(in srgb, var(--cortexa) 50%, var(--agp)) 60%, var(--agp));
  transform-origin: top; animation: ovDraw 1s var(--ease) .25s both; border-radius: 2px;
}
.ov-step {
  position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 24px;
  padding: 0 0 26px; animation: nodeIn .55s var(--ease) both;
}
.ov-step:last-child { padding-bottom: 0; }
.ov-node {
  width: 56px; height: 56px; border-radius: 50%; z-index: 2; background: var(--card);
  border: 1.5px solid var(--line); display: grid; place-items: center; box-shadow: var(--shadow-sm);
  font-family: var(--serif); font-size: 24px; font-weight: 560; color: var(--cortexa);
  font-variation-settings: 'SOFT' 40; transition: all .25s var(--ease);
}
.ov-step:hover .ov-node { background: var(--cortexa); color: #fff; border-color: var(--cortexa); transform: scale(1.06); box-shadow: var(--shadow-md); }
.ov-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px;
  box-shadow: var(--shadow-sm); transition: all .22s var(--ease); border-left: 3px solid var(--accent, var(--line));
}
.ov-step:hover .ov-card { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ov-card h3 { font-family: var(--serif); font-weight: 560; font-size: 21px; letter-spacing: -.01em; margin: 0; }
.ov-card p { margin: 7px 0 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; max-width: 64ch; }
.ov-card p b { color: var(--ink); font-weight: 640; }

.ov-tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.ov-track { border: 1px solid var(--line); border-radius: 11px; padding: 13px 15px; background: var(--card-2); border-top: 3px solid var(--tc, var(--matics)); }
.ov-track .tk { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--tc, var(--matics)); font-weight: 600; }
.ov-track .tt { font-size: 13.5px; font-weight: 600; margin-top: 5px; }
.ov-track .ts { font-size: 12px; color: var(--ink-soft); margin-top: 3px; line-height: 1.4; }
.ov-parallel { margin-top: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); display: flex; align-items: center; gap: 8px; }
.ov-parallel::before { content: ""; width: 18px; height: 1px; background: var(--line); }

.ov-pair { display: flex; gap: 8px; margin-top: 14px; }
.ov-owner { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 4px 11px; border-radius: 20px; display: inline-flex; align-items: center; gap: 7px; }
.ov-owner::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.ov-deeper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; position: relative; z-index: 1; }
.ov-link { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 18px 18px 16px; cursor: pointer; transition: all .2s var(--ease); position: relative; overflow: hidden; }
.ov-link::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--cortexa); transform: scaleY(0); transform-origin: top; transition: transform .25s var(--ease); }
.ov-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ov-link:hover::after { transform: scaleY(1); }
.ov-link .ix { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.ov-link h4 { font-family: var(--serif); font-weight: 560; font-size: 18px; margin: 8px 0 0; letter-spacing: -.01em; }
.ov-link p { margin: 5px 0 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }
.ov-link .go { margin-top: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--cortexa); }

@keyframes ovDraw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.ov-step:nth-child(1) { animation-delay: .30s; }
.ov-step:nth-child(2) { animation-delay: .40s; }
.ov-step:nth-child(3) { animation-delay: .50s; }
.ov-step:nth-child(4) { animation-delay: .60s; }
.ov-step:nth-child(5) { animation-delay: .70s; }
.ov-step:nth-child(6) { animation-delay: .80s; }

@media (max-width: 900px) {
  .ov-tracks, .ov-deeper { grid-template-columns: 1fr; }
  .ov-step { grid-template-columns: 46px 1fr; gap: 16px; }
  .ov-node { width: 46px; height: 46px; font-size: 20px; }
  .ov-spine::before { left: 22px; }
}

/* ============================================================================
   GENERIC PORTAL RENDERER — scoped account pages for tiers that do NOT receive
   the legacy explorer bundle. Mirrors the Front Door editorial system so limited
   scopes get the same polish as the full atlas.
   ============================================================================ */

/* --- sidebar: search ------------------------------------------------------ */
.search { padding: 4px 14px 14px; }
.search input {
  width: 100%; height: 38px; padding: 0 12px;
  font-family: var(--sans); font-size: 13px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 9px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.search input::placeholder { color: var(--ink-faint); }
.search input:focus { outline: none; border-color: var(--cortexa); box-shadow: 0 0 0 3px var(--cortexa-2); }

/* --- sidebar: account switcher (multi-account scopes) --------------------- */
.account-switcher { display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 2px; }
.account-switcher button {
  text-align: left; padding: 8px 12px; border-radius: 9px; cursor: pointer;
  font-family: var(--serif); font-size: 15px; font-weight: 560; letter-spacing: -.01em;
  color: var(--ink-soft); background: none; border: 1px solid transparent;
  transition: all .18s var(--ease);
}
.account-switcher button:hover { background: rgba(255,255,255,.5); color: var(--ink); }
.account-switcher button.active { background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }

/* --- sidebar: nav group labels + per-item coverage ------------------------ */
.nav-label {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-faint);
  padding: 0 10px 8px; display: block;
}
.nav-item .ni-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scope-dot {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-faint); background: var(--card-2); border: 1px solid var(--line-soft);
  border-radius: 5px; padding: 2px 6px; flex-shrink: 0; max-width: 46%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-item.active .scope-dot {
  color: var(--cortexa); background: var(--cortexa-2);
  border-color: color-mix(in srgb, var(--cortexa) 30%, var(--line));
}
.nav-empty { padding: 8px 12px; font-size: 14px; color: var(--ink-faint); font-style: italic; font-family: var(--serif); }

/* --- sidebar: footer (generated stamp + logout) --------------------------- */
.rail-foot {
  margin-top: auto; border-top: 1px solid var(--line);
  padding: 16px 24px 22px; display: flex; flex-direction: column; gap: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .04em; color: var(--ink-faint);
}

/* --- document page -------------------------------------------------------- */
.main { overflow-x: clip; }
.doc {
  position: relative; z-index: 1;
  max-width: 880px; margin: 0 auto; padding: 60px 64px 120px;
  animation: viewIn .5s var(--ease) both;
}
.doc-head, .doc-body { position: relative; z-index: 1; }
.doc-head { margin-bottom: 38px; }
.doc-head .crumb {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cortexa); font-weight: 600; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.doc-head .crumb::after { content: ""; height: 1px; flex: 1; background: var(--line); max-width: 90px; }
.doc-head h2 {
  font-family: var(--serif); font-optical-sizing: auto; font-weight: 520;
  font-size: clamp(32px, 4.5vw, 50px); line-height: 1.02; letter-spacing: -.02em; margin: 0;
  font-variation-settings: 'SOFT' 30, 'WONK' 0;
}
.coverage-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 18px; }
.coverage-row span {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft); background: var(--card-2); border: 1px solid var(--line);
  border-radius: 20px; padding: 3px 11px;
}
.doc-body { font-size: 15px; }
.doc-body > :first-child { margin-top: 0; }

/* --- block: unordered list ------------------------------------------------ */
.mb-list { margin: 12px 0; padding: 0; list-style: none; }
.mb-list li { position: relative; padding-left: 22px; margin-bottom: 9px; font-size: 14.5px; line-height: 1.55; }
.mb-list li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--cortexa); }

/* --- block: steps (override default ol markers with numbered chips) ------- */
.mb-steps { margin: 16px 0; padding: 0; list-style: none; counter-reset: step; }
.mb-steps li {
  position: relative; padding-left: 42px; margin-bottom: 13px;
  font-size: 14.5px; line-height: 1.55; counter-increment: step; min-height: 26px;
}
.mb-steps li::before {
  content: counter(step); position: absolute; left: 0; top: -1px;
  width: 27px; height: 27px; border-radius: 50%;
  background: var(--card); border: 1.5px solid var(--line);
  font-family: var(--serif); font-weight: 600; font-size: 13px; color: var(--cortexa);
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}

/* --- block: tables -------------------------------------------------------- */
.table-wrap { margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.table-wrap table { width: 100%; border-collapse: collapse; background: var(--card); font-size: 13.5px; }
.table-wrap th {
  text-align: left; font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600; padding: 11px 16px; background: var(--card-2);
  border-bottom: 1px solid var(--line);
}
.table-wrap td { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); line-height: 1.5; vertical-align: top; }
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tbody tr { transition: background .15s var(--ease); }
.table-wrap tbody tr:hover { background: var(--card-2); }

/* --- block: key-value (generic renderer class names) ---------------------- */
.kv-key { padding: 12px 16px; font-weight: 600; font-size: 13.5px; border-right: 1px solid var(--line-soft); background: var(--card-2); }
.kv-value { padding: 12px 16px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 900px) { .kv-key { border-right: none; border-bottom: 1px solid var(--line-soft); } }

/* --- block: callouts (generic renderer class names) ----------------------- */
.callout-label { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 7px; }
.callout.tone-warn { border-left-color: var(--stop); background: color-mix(in srgb, var(--stop) 6%, var(--card-2)); }
.callout.tone-warn .callout-label { color: var(--stop); }
.callout.tone-open { border-left-color: var(--matics); background: color-mix(in srgb, var(--matics) 6%, var(--card-2)); }
.callout.tone-open .callout-label { color: var(--matics); }

/* --- inline: code, bold, cross-links -------------------------------------- */
.doc-body code, .callout code, .kv code, .table-wrap code {
  font-family: var(--mono); font-size: .88em; background: var(--card-2);
  border: 1px solid var(--line-soft); border-radius: 4px; padding: 1px 5px; color: var(--ink);
}
.doc-body strong, .callout strong { font-weight: 680; color: var(--ink); }
.inline-link {
  appearance: none; background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  color: var(--cortexa); font-weight: 600;
  border-bottom: 1px solid color-mix(in srgb, var(--cortexa) 35%, transparent);
  transition: border-color .15s var(--ease);
}
.inline-link:hover { border-bottom-color: var(--cortexa); }
.inline-disabled { color: var(--ink-soft); }

@media (max-width: 900px) { .doc { padding: 36px 24px 80px; } }
