/* ===========================================================================
   TaskBridge public site — design system.
   Authoritative source: references/bart-brandbook/taskbridge-brandbook-1.pdf
   (Edition 1.0 · 2026) and the supplied logo package. Ink carries the site,
   Fog carries the content, the crossing gradient marks the sync, and the
   water lines are the one repeatable motif. Three voices: Quicksand 700
   speaks, Instrument Sans works, IBM Plex Mono states the facts.
   =========================================================================== */

@font-face {
  font-family: "Quicksand";
  src: url("fonts/Quicksand-Variable.ttf") format("truetype-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/InstrumentSans-Variable.ttf") format("truetype-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Surfaces */
  --ink: #090a0e;
  --deck: #10151f;
  --line: #222836; /* hairlines on ink/deck */

  /* Text */
  --fog: #ebebe9;
  --mist: #8a90a0;

  /* The crossing — six stops, teal to blue, never reversed */
  --shore-teal: #34c8b1;
  --stop-2: #27c3c0;
  --channel-cyan: #1ebbce; /* the only stop that may stand alone */
  --stop-4: #1bafd6;
  --stop-5: #1aa0dd;
  --span-blue: #1e8fe2;
  --crossing: linear-gradient(
    90deg,
    #34c8b1 0%,
    #27c3c0 20%,
    #1ebbce 40%,
    #1bafd6 60%,
    #1aa0dd 80%,
    #1e8fe2 100%
  );
  --crossing-tilt: linear-gradient(
    to top right,
    #34c8b1 0%,
    #27c3c0 20%,
    #1ebbce 40%,
    #1bafd6 60%,
    #1aa0dd 80%,
    #1e8fe2 100%
  );

  /* Partner accents — only where the partner products appear */
  --linear: #5e6ad2;
  --todoist: #e44332;

  /* Voices */
  --display: "Quicksand", "Trebuchet MS", "Segoe UI", sans-serif;
  --sans: "Instrument Sans", "Segoe UI", system-ui, Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, "Cascadia Mono", monospace;

  --content: 1120px;
  --measure: 720px;
  --r-card: 14px;
  --r-sm: 8px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* --- Base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--fog);
  background: var(--ink);
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }

img, svg { display: block; max-width: 100%; }

a { color: var(--channel-cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }

:focus-visible { outline: 2px solid var(--channel-cyan); outline-offset: 3px; }

::selection { background: #17414b; color: var(--fog); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 24px; top: -52px; z-index: 50;
  padding: 10px 16px; background: var(--deck);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--channel-cyan); font-size: 13.5px; font-weight: 500;
  transition: top 140ms var(--ease);
}
.skip-link:focus { top: 16px; }

.wrap { max-width: var(--content); margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.num { font-variant-numeric: tabular-nums; }

/* --- Voice utilities ------------------------------------------------------- */

.kicker {
  font-family: var(--mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--channel-cyan);
}
.kicker .sep { color: var(--mist); }

.mono-label {
  font-family: var(--mono);
  font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--mist);
}

.mono-data { font-family: var(--mono); font-size: 13px; line-height: 1.6; }

/* --- The gradient bar: small, level, rounded ------------------------------- */

.gbar {
  display: block; width: 56px; height: 8px; border-radius: 999px;
  background: var(--crossing);
}
.gbar.wide { width: 160px; height: 10px; }

/* --- Buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 22px; gap: 8px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  border-radius: 999px; border: 1px solid var(--channel-cyan);
  background: var(--channel-cyan); color: var(--ink); cursor: pointer;
  transition: filter 140ms var(--ease);
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }

.btn-quiet {
  display: inline-flex; align-items: center; height: 44px; padding: 0 18px;
  gap: 8px; font-size: 15px; font-weight: 500;
  border-radius: 999px; border: 1px solid var(--line);
  color: var(--fog); background: transparent;
  transition: border-color 140ms var(--ease);
}
.btn-quiet:hover { border-color: var(--mist); text-decoration: none; }

/* --- Chips: the cover language — outlined pills, mono caps, cyan lead ------ */

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--mist);
  white-space: nowrap;
}
.chip b { font-weight: 500; color: var(--channel-cyan); }

/* --- Water lines: the sole repeatable motif -------------------------------- */

.water-lines svg, .sync-strip svg { width: 100%; height: auto; display: block; }

/* --- Header ---------------------------------------------------------------- */

.site-header { background: var(--ink); border-bottom: 1px solid var(--line); }

.header-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 76px;
}
.header-crumb {
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--fog);
}
.header-crumb:hover { text-decoration: none; color: var(--fog); }
.header-crumb .sep { color: var(--channel-cyan); }
.header-crumb .crumb-section { color: var(--mist); }

.header-nav { display: flex; align-items: center; gap: 28px; }
.header-nav a { font-size: 14.5px; font-weight: 500; color: var(--mist); }
.header-nav a:hover { color: var(--fog); text-decoration: none; }
.header-nav a[aria-current="true"] { color: var(--fog); }
.header-nav a.btn { height: 38px; padding: 0 18px; font-size: 14px; color: var(--ink); }
.header-nav a.btn:hover { color: var(--ink); }

.nav-toggle { display: none; position: relative; }
.nav-toggle > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center;
  gap: 8px; height: 40px; padding: 0 14px;
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--line); border-radius: 999px; color: var(--fog);
}
.nav-toggle > summary::-webkit-details-marker { display: none; }
.nav-toggle[open] > .nav-sheet {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 40;
  min-width: 240px; padding: 8px 0;
  background: var(--deck); border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.nav-sheet a {
  display: block; padding: 12px 18px;
  font-size: 15px; font-weight: 500; color: var(--fog);
}
.nav-sheet a:hover { background: var(--ink); text-decoration: none; }

@media (max-width: 780px) {
  .header-nav { display: none; }
  .nav-toggle { display: block; }
  .header-bar { height: 68px; }
  .header-crumb { font-size: 11.5px; letter-spacing: 0.18em; }
}

/* --- Hero ------------------------------------------------------------------- */

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px; align-items: center;
  padding-top: 84px; padding-bottom: 72px;
}
.hero-copy .kicker { margin-bottom: 22px; }
.hero-copy h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 5vw, 58px); line-height: 1.08;
  letter-spacing: -0.01em; color: var(--fog);
}
.hero-sub {
  margin-top: 24px; max-width: 34em;
  font-size: 17px; line-height: 1.7; color: var(--mist);
}
.hero-cta { margin-top: 32px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-sync {
  margin-top: 30px; font-family: var(--mono); font-size: 12.5px;
  letter-spacing: 0.04em; color: var(--mist);
}
.hero-sync b { font-weight: 500; color: var(--shore-teal); }
.hero-chips { margin-top: 40px; }

.hero-visual { display: grid; justify-items: center; gap: 0; min-width: 0; }
.hero-visual img { width: min(300px, 60vw); height: auto; }
.hero-visual .water-lines { width: min(360px, 72vw); margin-top: 8px; }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 56px; padding-bottom: 56px; }
  .hero-visual { order: -1; justify-items: start; }
  .hero-visual img { width: 180px; }
  .hero-visual .water-lines { width: 240px; margin-left: 4px; }
}

/* --- Sync strip: content-width single-row divider --------------------------- */

.sync-strip {
  max-width: var(--content); margin: 0 auto;
  padding: 6px 24px 34px;
}

/* --- Sections --------------------------------------------------------------- */

.section { padding-top: 92px; padding-bottom: 92px; }
.section.hairline-top { border-top: 1px solid var(--line); }
.section-head { max-width: 640px; }
.section-head h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(30px, 3.6vw, 42px); line-height: 1.12;
  letter-spacing: -0.008em; margin-top: 18px; color: var(--fog);
}
.section-head .section-sub {
  margin-top: 18px; font-size: 16px; line-height: 1.7; color: var(--mist); max-width: 38em;
}

@media (max-width: 880px) {
  .section { padding-top: 64px; padding-bottom: 64px; }
}

/* --- Principles: four commitments, gradient-bar topped ----------------------- */

.principles {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 32px;
}
.principle .gbar { margin-bottom: 18px; }
.principle .idx {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.18em; color: var(--channel-cyan);
}
.principle h3 {
  font-family: var(--sans); font-size: 16.5px; font-weight: 600;
  margin-top: 8px; color: var(--fog); line-height: 1.4;
}
.principle p { margin-top: 8px; font-size: 13.5px; line-height: 1.65; color: var(--mist); }

@media (max-width: 980px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .principles { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* --- Deck cards -------------------------------------------------------------- */

.card {
  background: var(--deck); border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.card-pad { padding: 24px 26px; }

/* --- The crossing: steps + preview ------------------------------------------- */

.crossing {
  margin-top: 56px;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 56px; align-items: start;
}
.steps { border-top: 1px solid var(--line); }
.step {
  display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.step .idx {
  font-family: var(--mono); font-size: 12.5px; color: var(--channel-cyan);
  padding-top: 3px; letter-spacing: 0.08em;
}
.step h3 { font-size: 15.5px; font-weight: 600; color: var(--fog); line-height: 1.4; }
.step p { margin-top: 4px; font-size: 13.5px; line-height: 1.6; color: var(--mist); }

@media (max-width: 880px) {
  .crossing { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}

/* --- Product-truth fragments (recreated app screens) -------------------------- */

figure.framed { margin: 0; }
figure.framed > figcaption {
  margin-top: 14px; font-family: var(--mono); font-size: 12px;
  line-height: 1.6; color: var(--mist); max-width: 58em;
}

.fragment-head h4 { font-family: var(--sans); font-size: 17px; font-weight: 600; color: var(--fog); }
.fragment-head .sub { margin-top: 2px; font-size: 13.5px; color: var(--channel-cyan); }

.issue-table { width: 100%; border-collapse: collapse; margin-top: 18px; }
.issue-table caption {
  text-align: left; padding-bottom: 10px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--mist);
}
.issue-table th {
  text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--mist);
  padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line);
}
.issue-table td {
  font-size: 13.5px; padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--line); vertical-align: top; color: var(--fog);
}
.issue-table td.id { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.issue-table td.state { white-space: nowrap; color: var(--mist); }
.issue-table tr:last-child td { border-bottom: 0; }

/* Activity ledger restack below 560px: two-line entries, nothing clipped. */
@media (max-width: 560px) {
  .issue-table.activity { display: block; }
  .issue-table.activity thead {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .issue-table.activity tbody { display: block; }
  .issue-table.activity tr {
    display: block; padding: 12px 0; border-bottom: 1px solid var(--line);
  }
  .issue-table.activity tr:last-child { border-bottom: 0; }
  .issue-table.activity td { display: inline; border: 0; padding: 0; }
  .issue-table.activity td.t-trigger { font-weight: 600; color: var(--fog); }
  .issue-table.activity td.t-trigger::before { content: " — "; font-weight: 400; color: var(--mist); }
  .issue-table.activity td.t-mode::before,
  .issue-table.activity td.t-status::before { content: " · "; color: var(--mist); }
  .issue-table.activity td.t-result { display: block; margin-top: 2px; }
}

/* Sync-state line: the brand's in-context motif row. */
.sync-line {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; border-radius: var(--r-sm);
  background: var(--ink); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 13px; color: var(--fog);
}
.sync-line .state-ok { color: var(--shore-teal); }
.sync-line .state-info { color: var(--span-blue); }
.sync-line .water-lines { width: 64px; flex: none; }

/* --- Ownership ledger: two shores ------------------------------------------- */

.ledger { margin-top: 56px; border-top: 1px solid var(--line); }
.ledger-cols { display: grid; grid-template-columns: 1fr 1fr; }
.ledger-col { padding: 28px 0 32px; min-width: 0; }
.ledger-col + .ledger-col { border-left: 1px solid var(--line); padding-left: 44px; }
.ledger-col:first-child { padding-right: 44px; }

.shore-tag { display: inline-flex; align-items: center; gap: 8px; }
.shore-tag .dot { width: 9px; height: 9px; border-radius: 999px; flex: none; }
.shore-tag.linear .dot { background: var(--linear); }
.shore-tag.todoist .dot { background: var(--todoist); }

.ledger-col .col-title {
  font-family: var(--display); font-size: 21px; font-weight: 700;
  margin-top: 12px; color: var(--fog);
}
.ledger-col .col-note { margin-top: 6px; font-size: 13.5px; line-height: 1.6; color: var(--mist); max-width: 30em; }

.ledger-fields { margin-top: 22px; }
.ledger-fields li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px;
  align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line);
  font-size: 14px; list-style: none; color: var(--fog);
}
.ledger-fields li:last-child { border-bottom: 0; }
.ledger-fields .field { font-weight: 500; }
.ledger-fields .note {
  font-family: var(--mono); font-size: 11.5px; color: var(--mist);
  text-align: right; white-space: nowrap;
}

.ledger-bridge {
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px;
  align-items: start; padding: 26px 0;
}
.ledger-bridge .gbar { margin-top: 7px; }
.ledger-bridge p { font-size: 15px; line-height: 1.65; max-width: 56em; color: var(--mist); }
.ledger-bridge strong { font-weight: 600; color: var(--fog); }

@media (max-width: 760px) {
  .ledger-cols { grid-template-columns: minmax(0, 1fr); }
  .ledger-col + .ledger-col { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .ledger-col:first-child { padding-right: 0; }
  .ledger-fields .note { white-space: normal; }
  .ledger-bridge { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* --- Contract: policy cards + guarantees ------------------------------------- */

.contract {
  margin-top: 56px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px; align-items: start;
}
.contract-col > h3 { font-size: 16.5px; font-weight: 600; color: var(--fog); }
.contract-col > p { margin-top: 12px; font-size: 14.5px; line-height: 1.7; color: var(--mist); max-width: 36em; }

.behavior { margin-top: 20px; }
.behavior + .behavior { margin-top: 14px; }
.behavior .behavior-team {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
}
.behavior .behavior-team .team { font-family: var(--mono); font-size: 13px; color: var(--fog); }
.behavior ul { padding: 12px 18px; }
.behavior li { list-style: none; font-size: 14px; line-height: 1.65; padding: 3px 0; color: var(--mist); }
.behavior li strong { font-weight: 600; color: var(--fog); }

@media (max-width: 880px) { .contract { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

/* --- Mechanisms --------------------------------------------------------------- */

.mechanisms { margin-top: 56px; border-top: 1px solid var(--line); }
.mechanism {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) minmax(0, 330px);
  gap: 40px; padding: 30px 0; border-bottom: 1px solid var(--line);
}
.mechanism .idx {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--channel-cyan);
}
.mechanism .mech-name {
  font-family: var(--display); font-size: 21px; font-weight: 700;
  margin-top: 6px; color: var(--fog);
}
.mechanism .mech-body p { font-size: 14.5px; line-height: 1.7; color: var(--mist); max-width: 40em; }
.mech-fact {
  font-family: var(--mono); font-size: 12px; line-height: 1.9; color: var(--mist);
  border-left: 1px solid var(--line); padding-left: 24px;
}
.mech-fact b { color: var(--fog); font-weight: 400; }

@media (max-width: 880px) {
  .mechanism { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .mech-fact { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
}

/* --- DO / DON'T panels (brandbook p.11 pattern) -------------------------------- */

.do-dont {
  margin-top: 56px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px;
}
.do-dont .panel-label {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
}
.do-dont .do .panel-label { color: var(--channel-cyan); }
/* Partner red on Deck measures 4.48:1 — below AA for small text — so the red
   lives in a decorative mark and the label text stays Fog. */
.do-dont .dont .panel-label { color: var(--fog); }
.do-dont .dont .panel-label::before { content: "✗ "; color: var(--todoist); }
.do-dont ul { margin-top: 14px; }
.do-dont li { list-style: none; padding: 7px 0; font-size: 14px; line-height: 1.65; color: var(--mist); }
.do-dont li strong { color: var(--fog); font-weight: 600; }

@media (max-width: 760px) { .do-dont { grid-template-columns: minmax(0, 1fr); } }

/* --- Close ---------------------------------------------------------------------- */

.close-inner {
  padding-top: 92px; padding-bottom: 92px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px;
  align-items: center;
}
.close-inner h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(30px, 3.6vw, 42px); line-height: 1.12; color: var(--fog);
  letter-spacing: -0.008em; max-width: 16em;
}
.close-inner .quiet { margin-top: 14px; font-size: 15px; color: var(--mist); max-width: 38em; }
.close-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

@media (max-width: 760px) { .close-inner { grid-template-columns: minmax(0, 1fr); } }

/* --- Footer ----------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); }
.footer-nav-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 40px; flex-wrap: wrap;
  padding-top: 48px; padding-bottom: 40px;
}
.footer-brand img { height: 98px; width: auto; }
.footer-brand p { margin-top: 18px; font-size: 13.5px; color: var(--mist); max-width: 24em; }
.footer-nav { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-nav .mono-label { display: block; margin-bottom: 10px; }
.footer-nav a { display: block; padding: 4px 0; font-size: 14px; color: var(--mist); }
.footer-nav a:hover { color: var(--fog); }

.footer-strip {
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 20px; padding-bottom: 28px; flex-wrap: wrap;
}
.footer-strip span {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--mist);
}

/* --- Docs ---------------------------------------------------------------------------- */

.docs-subnav { border-bottom: 1px solid var(--line); }
.docs-subnav .wrap { display: flex; gap: 28px; overflow-x: auto; }
.docs-subnav a {
  flex: none; display: inline-flex; align-items: center; height: 52px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--mist);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.docs-subnav a:hover { color: var(--fog); text-decoration: none; }
.docs-subnav a[aria-current="true"] { color: var(--fog); border-bottom-color: var(--channel-cyan); }

.doc-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 72px;
  padding-top: 56px; padding-bottom: 96px;
}
.doc-main { min-width: 0; max-width: var(--measure); }

.doc-main .doc-kicker { margin-bottom: 18px; }
.doc-main h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(32px, 3.8vw, 44px); line-height: 1.1; letter-spacing: -0.008em;
  color: var(--fog);
}
.doc-main .gbar { margin-top: 22px; }
.doc-main .doc-lede { margin-top: 22px; font-size: 16px; color: var(--mist); line-height: 1.7; }

.doc-main h2 {
  font-family: var(--display); font-size: 24px; font-weight: 700; line-height: 1.25;
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line);
  scroll-margin-top: 24px; color: var(--fog);
}
.doc-main h3 { font-size: 16.5px; font-weight: 600; margin-top: 28px; color: var(--fog); }
.doc-main p { margin-top: 14px; font-size: 15px; line-height: 1.75; color: var(--fog); }
.doc-main ul, .doc-main ol { margin-top: 14px; padding-left: 22px; }
.doc-main li { font-size: 15px; line-height: 1.75; padding: 3px 0; color: var(--fog); }
.doc-main li::marker { color: var(--mist); }
.doc-main figure.framed { margin-top: 22px; }

.doc-main code {
  font-family: var(--mono); font-size: 0.85em;
  background: var(--deck); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 6px; white-space: nowrap; color: var(--fog);
}
.doc-main pre {
  margin-top: 18px; padding: 18px 22px;
  background: var(--deck); border: 1px solid var(--line);
  border-radius: var(--r-sm); overflow-x: auto;
}
.doc-main pre code {
  background: none; border: 0; padding: 0; white-space: pre;
  font-size: 13px; line-height: 1.8;
}

.fact-table { width: 100%; border-collapse: collapse; margin-top: 18px; }
.fact-table th {
  text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--mist);
  padding: 8px 16px 8px 0; border-bottom: 1px solid var(--mist);
}
.fact-table td {
  font-size: 14px; line-height: 1.65; vertical-align: top; color: var(--fog);
  padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line);
}
.fact-table td:first-child { white-space: nowrap; }
.fact-table td strong { font-weight: 600; }
.fact-table td code { background: none; border: 0; padding: 0; white-space: nowrap; }

@media (max-width: 760px) {
  .fact-table td:first-child { white-space: normal; }
  .fact-table td code { white-space: normal; overflow-wrap: anywhere; }
}

/* Notices: deck card with a mono state label. */
.notice {
  margin-top: 22px; padding: 16px 20px;
  background: var(--deck); border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 14px; line-height: 1.7; color: var(--mist);
}
.notice strong { color: var(--fog); font-weight: 600; }
.notice .notice-label {
  display: block; margin-bottom: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
}
.notice.hold .notice-label { color: var(--span-blue); }
.notice.approval .notice-label { color: var(--fog); }
.notice.approval .notice-label::before { content: "● "; color: var(--todoist); }
.notice.ok .notice-label { color: var(--shore-teal); }

.doc-rail { position: sticky; top: 24px; align-self: start; }
.doc-rail ol { margin-top: 14px; border-left: 1px solid var(--line); }
.doc-rail li { list-style: none; }
.doc-rail a {
  display: block; padding: 6px 0 6px 16px; font-size: 13.5px; color: var(--mist);
  border-left: 2px solid transparent; margin-left: -1px;
}
.doc-rail a:hover { color: var(--fog); text-decoration: none; border-left-color: var(--mist); }

.doc-toc-mobile { display: none; }

@media (max-width: 1100px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .doc-rail { display: none; }
  .doc-toc-mobile {
    display: block; margin-top: 28px;
    background: var(--deck); border: 1px solid var(--line); border-radius: var(--r-sm);
  }
  .doc-toc-mobile summary {
    list-style: none; cursor: pointer; padding: 12px 18px;
    font-family: var(--mono); font-size: 11.5px; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--fog);
  }
  .doc-toc-mobile summary::-webkit-details-marker { display: none; }
  .doc-toc-mobile[open] summary { border-bottom: 1px solid var(--line); }
  .doc-toc-mobile a { display: block; padding: 9px 18px; font-size: 14px; color: var(--mist); }
}

/* Docs index map */
.doc-map { margin-top: 40px; border-top: 1px solid var(--line); }
.doc-map a.doc-map-row {
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px;
  padding: 24px 0; border-bottom: 1px solid var(--line); color: inherit;
}
.doc-map a.doc-map-row:hover { text-decoration: none; background: var(--deck); }
.doc-map .doc-map-title { font-size: 15.5px; font-weight: 600; color: var(--channel-cyan); }
.doc-map p { font-size: 14px; line-height: 1.65; color: var(--mist); max-width: 44em; }
@media (max-width: 640px) {
  .doc-map a.doc-map-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* --- Prose pages (legal, support) ---------------------------------------------------- */

.prose-layout { max-width: var(--measure); padding-top: 56px; padding-bottom: 96px; }

/* --- How-it-works: flow + scenarios --------------------------------------------------- */

.flow {
  margin-top: 56px;
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(110px, 5fr) minmax(0, 9fr) minmax(110px, 5fr) minmax(0, 9fr);
  align-items: center;
}
.flow-node { padding: 20px 22px; min-width: 0; }
.flow-node h3 { font-size: 16px; font-weight: 600; margin-top: 4px; color: var(--fog); }
.flow-node ul { margin-top: 12px; }
.flow-node li { list-style: none; font-size: 13px; color: var(--mist); padding: 2px 0; line-height: 1.55; }
.flow-node.bridge { border-color: var(--channel-cyan); }

.flow-link { padding: 0 10px; min-width: 0; }
.flow-link .lbl {
  display: block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.02em; color: var(--mist); text-align: center;
  line-height: 1.4; margin-bottom: 6px;
}
.flow-link .lane {
  display: block; position: relative; height: 0;
  border-top: 1.5px solid var(--mist); margin: 0 2px 18px;
}
.flow-link .lane::after {
  content: ""; position: absolute; top: -4.75px; border: 4px solid transparent;
}
.flow-link .lane.fwd::after { right: -2px; border-left-color: var(--mist); }
.flow-link .lane.back::after { left: -2px; border-right-color: var(--mist); }
.flow-link .lane.accent { border-top-color: var(--channel-cyan); }
.flow-link .lane.accent.back::after { border-right-color: var(--channel-cyan); }

@media (max-width: 880px) {
  .flow { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .flow-link { padding: 8px 0; }
  .flow-link .lbl { text-align: left; }
  .flow-link .lane { display: none; }
}

.scenarios { margin-top: 56px; border-top: 1px solid var(--line); }
.scenario {
  display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 40px;
  padding: 30px 0; border-bottom: 1px solid var(--line);
}
.scenario .idx {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--channel-cyan);
}
.scenario h3 {
  font-family: var(--display); font-size: 21px; font-weight: 700;
  margin-top: 6px; line-height: 1.3; color: var(--fog);
}
.scenario ol { counter-reset: seq; max-width: 46em; }
.scenario ol li {
  list-style: none; counter-increment: seq;
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px;
  padding: 8px 0; font-size: 14px; line-height: 1.65; color: var(--fog);
}
.scenario ol li::before {
  content: counter(seq, decimal-leading-zero);
  font-family: var(--mono); font-size: 12px; color: var(--mist); padding-top: 2px;
}
.scenario .outcome {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 14px; line-height: 1.65; max-width: 46em; color: var(--mist);
}
.scenario .outcome .mono-label { color: var(--shore-teal); margin-right: 10px; }

@media (max-width: 880px) {
  .scenario { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
