/* ==========================================================================
   GA Applications — Dashboards subsite
   Decision observatory design system
   Branch-local stylesheet: /services/dashboards/assets/css/ga-dashboards.css
   ========================================================================== */

/* ---------- Webfonts (SIL Open Font License 1.1, served locally) ---------- */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../fonts/bricolage-grotesque-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../fonts/bricolage-grotesque-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/instrument-sans-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/instrument-sans-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/instrument-sans-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif-400-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/geist-mono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/geist-mono-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --canvas: #f4f1ea;          /* warm neutral paper */
  --canvas-soft: #ece8de;
  --ink: #1b1e23;             /* near-graphite ink */
  --ink-soft: #4b5058;
  --ink-faint: #6d727b;
  --graphite: #20242b;        /* deep graphite workspace */
  --graphite-2: #2a2f38;
  --graphite-3: #343a45;
  --on-graphite: #eceef1;
  --on-graphite-soft: #b6bcc6;
  --line: #d8d2c4;            /* warm hairline on paper */
  --line-dark: #3d434e;       /* hairline on graphite */
  --cobalt: #2f4fd0;
  --cobalt-deep: #24409f;
  --cobalt-ink: #1d2f7a;
  --mint: #2fbf8f;
  --mint-deep: #147a58;
  --cyan: #17a8c4;            /* brand signal */
  --lime: #c3e94b;            /* acid-lime brand signal */
  --lime-ink: #4c6210;
  --amber: #c47b1a;
  --alert: #c94f33;
  --unknown: #7a7286;         /* stale/unknown — never green */
  --paper-card: #fbf9f4;
  --radius: 10px;
  --radius-lg: 16px;
  --font-display: 'Bricolage Grotesque', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Instrument Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-mono: 'Geist Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --maxw: 1180px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 2.3vw, 2rem); font-weight: 600; }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: 70ch; }
a { color: var(--cobalt-deep); text-underline-offset: 2px; }
a:hover { color: var(--cobalt-ink); }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: .35em; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; border-radius: 3px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: .8rem 1.2rem; font-weight: 600;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 3.5vw, 2.5rem); }
.mono { font-family: var(--font-mono); font-size: .85em; }
.eyebrow {
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--cobalt-deep);
  margin: 0 0 .9rem; display: block;
}
.section { padding: clamp(2.6rem, 5vw, 4.5rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.lede { font-size: 1.15rem; color: var(--ink-soft); }
.serif-note { font-family: var(--font-serif); font-size: 1.2rem; font-style: italic; color: var(--ink-soft); }

/* ---------- Global GA shell header ---------- */
.shell-header {
  background: var(--ink); color: #fff;
  position: sticky; top: 0; z-index: 100;
  border-bottom: 3px solid var(--lime);
}
.shell-bar {
  display: flex; align-items: center; gap: 1.25rem;
  max-width: var(--maxw); margin: 0 auto;
  padding: .55rem clamp(1rem, 3.5vw, 2.5rem);
  min-height: 62px;
}
.brand {
  display: flex; align-items: baseline; gap: .5rem; text-decoration: none; color: #fff;
  flex: 0 0 auto; padding: .35rem 0;
}
.brand .brand-mark {
  font-family: var(--font-display); font-weight: 700; font-size: 1.28rem; letter-spacing: .01em;
}
.brand .brand-mark .brand-ga { color: var(--lime); }
.brand .brand-sub {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .18em;
  text-transform: uppercase; color: #9aa2ad;
}
.ga-nav { margin-left: auto; }
.ga-nav ul {
  display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; align-items: center;
}
.ga-nav a {
  color: #dfe3e9; text-decoration: none; font-size: .92rem; font-weight: 500;
  padding: .62rem .68rem; border-radius: 7px; display: inline-block; min-height: 44px;
  line-height: 1.35;
}
.ga-nav a:hover { background: var(--graphite-2); color: #fff; }
.ga-nav a[aria-current="page"], .ga-nav a[aria-current="true"] { color: var(--lime); }
.shell-actions { display: flex; gap: .55rem; align-items: center; flex: 0 0 auto; }
.nav-toggle {
  display: none; background: none; border: 2px solid #4a5260; color: #fff; border-radius: 8px;
  font: inherit; font-weight: 600; font-size: .95rem; padding: .5rem .9rem; min-height: 44px; cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block; font-weight: 600; font-size: .98rem; text-decoration: none;
  padding: .78rem 1.35rem; border-radius: 999px; border: 2px solid transparent;
  min-height: 44px; line-height: 1.25; cursor: pointer;
}
.btn-primary { background: var(--lime); color: #161a05; border-color: var(--lime); }
.btn-primary:hover { background: #d3f56c; color: #161a05; }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: var(--graphite-3); color: #fff; }
.btn-ghost { border-color: var(--cobalt); color: var(--cobalt-deep); background: transparent; }
.btn-ghost:hover { background: #e4e9fb; color: var(--cobalt-ink); }
.btn-outline-light { border-color: #6b7280; color: #fff; background: transparent; }
.btn-outline-light:hover { border-color: var(--lime); color: var(--lime); }
.btn-sm { padding: .5rem 1rem; font-size: .9rem; }

/* ---------- Branch secondary navigation ---------- */
.branch-nav {
  background: var(--graphite); color: var(--on-graphite);
  border-bottom: 1px solid var(--line-dark);
}
.branch-nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 3.5vw, 2.5rem);
  display: flex; align-items: center; gap: 1rem;
}
.branch-nav .branch-label {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--lime); white-space: nowrap; padding: .6rem 0;
}
.branch-nav ul {
  display: flex; gap: .1rem; list-style: none; margin: 0; padding: 0;
  overflow-x: auto; scrollbar-width: thin;
}
.branch-nav a {
  display: block; color: var(--on-graphite-soft); text-decoration: none; white-space: nowrap;
  font-size: .86rem; font-weight: 500; padding: .78rem .7rem; min-height: 44px;
  border-bottom: 3px solid transparent;
}
.branch-nav a:hover { color: #fff; }
.branch-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--cyan); }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: .85rem; color: var(--ink-faint); padding: .9rem 0 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: '/'; margin-right: .4rem; color: var(--ink-faint); }
.crumbs a { color: var(--ink-soft); }

/* ---------- Hero (decision observatory) ---------- */
.hero { padding: clamp(1.6rem, 3vw, 3rem) 0 clamp(2rem, 4vw, 3.2rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 3.5vw, 3rem); align-items: start; }
.hero h1 { margin-top: .1em; }
.direct-answer {
  background: var(--paper-card); border: 1px solid var(--line); border-left: 5px solid var(--cobalt);
  border-radius: var(--radius); padding: 1.1rem 1.3rem; margin: 1.3rem 0;
}
.direct-answer p { margin: 0; font-size: 1.06rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.hero-note { font-size: .88rem; color: var(--ink-faint); margin-top: .9rem; }

/* Graphite workspace panel (demonstrations) */
.panel {
  background: var(--graphite); color: var(--on-graphite);
  border-radius: var(--radius-lg); padding: clamp(1.1rem, 2vw, 1.6rem);
  border: 1px solid var(--graphite-3);
}
.panel h3, .panel h4 { color: #fff; }
.panel p { color: var(--on-graphite-soft); }
.panel a { color: #9fc1ff; }
.panel a:hover { color: #c6d9ff; }
.panel-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  border-bottom: 1px solid var(--line-dark); padding-bottom: .7rem; margin-bottom: 1rem;
  flex-wrap: wrap;
}
.panel-head h3 { margin: 0; font-size: 1.08rem; }
.demo-tag {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: #0f1420; background: var(--cyan); border-radius: 4px; padding: .28rem .55rem; white-space: nowrap;
}
.demo-banner {
  display: flex; gap: .6rem; align-items: center;
  background: #2c2413; color: #f0d48a; border: 1px dashed #8a6d2f;
  border-radius: var(--radius); padding: .6rem .9rem; font-size: .85rem; margin-bottom: 1rem;
}
.demo-banner .mono { color: #f0d48a; }
.freshness { font-family: var(--font-mono); font-size: .74rem; color: #8f97a3; display: block; margin-top: .35rem; }
.panel .freshness { color: #8f97a3; }

/* KPI tiles */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin: 0 0 1rem; }
.kpi {
  background: var(--graphite-2); border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: .85rem .95rem .7rem;
}
.kpi .kpi-label { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: #98a0ad; display: block; margin-bottom: .3rem; }
.kpi .kpi-value { font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; color: #fff; line-height: 1.1; }
.kpi .kpi-unit { font-size: .8rem; color: #98a0ad; font-weight: 400; }
.kpi .kpi-meta { font-size: .74rem; color: #8f97a3; margin-top: .35rem; font-family: var(--font-mono); }

/* Status chips — colour + icon + text (never colour alone) */
.chip {
  display: inline-flex; align-items: center; gap: .38rem;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .04em;
  border-radius: 999px; padding: .26rem .68rem; border: 1.5px solid transparent; white-space: nowrap;
  text-transform: uppercase;
}
.chip .dot { font-size: .8em; line-height: 1; }
.chip-ok { background: #123528; color: #7fe0ba; border-color: #1f6b4e; }
.chip-warn { background: #3a2c10; color: #f0c169; border-color: #8a6420; }
.chip-alert { background: #3d1c13; color: #ff9d82; border-color: #94472f; }
.chip-stale { background: repeating-linear-gradient(45deg, #2b2833, #2b2833 5px, #322f3b 5px, #322f3b 10px); color: #c3bccf; border-color: #585165; }
.chip-unknown { background: #26232e; color: #a89fb8; border-color: #585165; border-style: dashed; }
.chip-info { background: #16233f; color: #9fc1ff; border-color: #33507e; }
.chip-neutral { background: var(--graphite-3); color: #cfd4db; border-color: #4a5260; }

/* Light chips for paper backgrounds */
.chip-light-ok { background: #ddf2e8; color: var(--mint-deep); border-color: #7cc7a8; }
.chip-light-warn { background: #f7ecd4; color: #7a5410; border-color: #d3a959; }
.chip-light-alert { background: #f8e0d8; color: #8c3319; border-color: #d68d74; }
.chip-light-stale { background: repeating-linear-gradient(45deg, #e7e4ee, #e7e4ee 5px, #dcd8e5 5px, #dcd8e5 10px); color: #4e4759; border-color: #a29aae; }
.chip-light-info { background: #dfe8fb; color: var(--cobalt-ink); border-color: #9ab2e8; }

/* Exception queue */
.queue { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.queue li {
  display: flex; gap: .8rem; align-items: flex-start; justify-content: space-between;
  background: var(--graphite-2); border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: .65rem .85rem; font-size: .92rem; flex-wrap: wrap;
}
.queue .q-main { flex: 1 1 55%; min-width: 200px; }
.queue .q-title { color: #fff; font-weight: 600; display: block; }
.queue .q-sub { color: #8f97a3; font-size: .8rem; font-family: var(--font-mono); }

/* Source drill-through list */
.drill { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .88rem; }
.drill li { display: flex; justify-content: space-between; gap: .8rem; border-bottom: 1px dotted var(--line-dark); padding-bottom: .45rem; flex-wrap: wrap; }
.drill .d-name { color: #d7dbe1; }
.drill .d-meta { font-family: var(--font-mono); font-size: .74rem; color: #8f97a3; }

/* Figures & charts */
figure.chart { margin: 0 0 1.4rem; }
figure.chart .chart-q {
  font-weight: 600; color: #fff; font-size: .98rem; margin-bottom: .15rem;
}
figure.chart .chart-def { font-size: .8rem; color: #8f97a3; margin-bottom: .6rem; }
figure.chart svg { display: block; width: 100%; }
figcaption, .fig-cap { font-size: .82rem; color: var(--ink-faint); margin-top: .5rem; }
.panel figcaption { color: #8f97a3; }

/* Accessible data tables */
.data-details { margin: .4rem 0 1.2rem; }
.data-details summary {
  cursor: pointer; font-size: .88rem; font-weight: 600; color: #9fc1ff;
  padding: .55rem 0; min-height: 44px; display: flex; align-items: center;
}
.data-details summary:hover { color: #c6d9ff; }
.table-scroll { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: .88rem; margin: .6rem 0 1rem; }
table.data caption { text-align: left; font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }
table.data th, table.data td { border: 1px solid var(--line-dark); padding: .45rem .6rem; text-align: left; vertical-align: top; }
table.data thead th { background: var(--graphite-3); color: #fff; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
table.data td { color: #d7dbe1; }
table.data .num { font-family: var(--font-mono); text-align: right; }

/* Light tables on paper */
table.data.light th, table.data.light td { border-color: var(--line); }
table.data.light thead th { background: var(--canvas-soft); color: var(--ink); }
table.data.light td { color: var(--ink-soft); }

/* Metric glossary */
.glossary { display: grid; gap: .8rem; }
.term-card {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.term-card h3 { font-size: 1.02rem; margin-bottom: .3rem; }
.term-card .term-def { font-size: .95rem; color: var(--ink-soft); margin-bottom: .5rem; }
.term-card .term-meta { font-family: var(--font-mono); font-size: .74rem; color: var(--ink-faint); display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }

/* Kanban-style board (operations) */
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.lane { background: var(--graphite-2); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: .7rem; }
.lane h4 { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #98a0ad; margin: 0 0 .6rem; display: flex; justify-content: space-between; }
.lane .count { color: var(--lime); }
.job-card {
  background: var(--graphite-3); border: 1px solid #454c59; border-radius: 8px;
  padding: .6rem .7rem; margin-bottom: .55rem; font-size: .85rem;
}
.job-card .j-id { font-family: var(--font-mono); font-size: .7rem; color: #8f97a3; }
.job-card .j-name { color: #fff; font-weight: 600; display: block; margin: .1rem 0 .3rem; }
.job-card .chip { font-size: .62rem; padding: .15rem .5rem; }

/* Coverage matrix (workforce) */
.matrix-wrap { overflow-x: auto; }
table.matrix { border-collapse: collapse; font-size: .8rem; width: 100%; }
table.matrix caption { text-align: left; font-weight: 600; color: #fff; margin-bottom: .5rem; font-size: .92rem; }
table.matrix th, table.matrix td { border: 1px solid var(--line-dark); padding: .4rem .5rem; text-align: center; }
table.matrix thead th { background: var(--graphite-3); color: #fff; font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; }
table.matrix tbody th { text-align: left; color: #d7dbe1; font-weight: 500; white-space: nowrap; }
.cell { display: inline-block; width: 1.6rem; height: 1.6rem; line-height: 1.6rem; border-radius: 5px; font-family: var(--font-mono); font-size: .68rem; font-weight: 500; }
.cell-ok { background: #14503c; color: #7fe0ba; }
.cell-warn { background: #5c4313; color: #f0c169; }
.cell-gap { background: #3d1c13; color: #ff9d82; }
.cell-off { background: var(--graphite-3); color: #79808c; }
.cell-unknown { background: #26232e; color: #a89fb8; border: 1px dashed #585165; }

/* Funnel / waterfall (sales-finance) */
.stage-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.stage-list li { background: var(--graphite-2); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: .6rem .8rem; }
.stage-list .s-row { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.stage-list .s-name { color: #fff; font-weight: 600; font-size: .92rem; }
.stage-list .s-val { font-family: var(--font-mono); color: var(--lime); font-size: .9rem; }
.stage-list .s-note { color: #8f97a3; font-size: .76rem; font-family: var(--font-mono); margin-top: .2rem; }
.stage-bar { height: 8px; border-radius: 4px; background: var(--graphite-3); margin-top: .45rem; overflow: hidden; }
.stage-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--mint)); }

/* Asset register split (inventory) */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.split-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.split-40-60 { display: grid; grid-template-columns: 2fr 3fr; gap: 1.4rem; }
.split-60-40 { display: grid; grid-template-columns: 3fr 2fr; gap: 1.4rem; }

/* Source map diagram */
.srcmap { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: .8rem; align-items: stretch; margin: 1.2rem 0; }
.srcmap .sm-col { background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; }
.srcmap .sm-col h3 { font-size: .92rem; margin-bottom: .5rem; }
.srcmap .sm-col ul { margin: 0; padding-left: 1.1em; font-size: .88rem; color: var(--ink-soft); }
.srcmap .sm-arrow { align-self: center; font-size: 1.4rem; color: var(--cobalt); font-weight: 700; }
.srcmap.dark .sm-col { background: var(--graphite-2); border-color: var(--line-dark); }
.srcmap.dark .sm-col h3 { color: #fff; }
.srcmap.dark .sm-col ul { color: var(--on-graphite-soft); }
.srcmap.dark .sm-arrow { color: var(--cyan); }

/* Delivery sequence */
.steps { list-style: none; counter-reset: step; margin: 1.2rem 0; padding: 0; display: grid; gap: .9rem; }
.steps li {
  counter-increment: step; position: relative; padding: 1rem 1.2rem 1rem 3.6rem;
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 1rem; top: 1rem;
  font-family: var(--font-mono); font-weight: 500; font-size: .95rem; color: var(--cobalt-deep);
}
.steps li h3 { font-size: 1.02rem; margin-bottom: .25rem; }
.steps li p { margin: 0; font-size: .95rem; color: var(--ink-soft); }

/* Fit / not-fit */
.fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1.2rem; }
.fit-card { border-radius: var(--radius); padding: 1.1rem 1.3rem; border: 1px solid var(--line); background: var(--paper-card); }
.fit-card h3 { font-size: 1.05rem; display: flex; align-items: center; gap: .5rem; }
.fit-card.fit-yes { border-top: 4px solid var(--mint); }
.fit-card.fit-no { border-top: 4px solid var(--amber); }
.fit-card ul { margin: 0; font-size: .95rem; color: var(--ink-soft); }

/* Role cards */
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.role-card { background: var(--graphite); color: var(--on-graphite); border-radius: var(--radius-lg); padding: 1.1rem 1.2rem; border: 1px solid var(--graphite-3); }
.role-card h3 { color: #fff; font-size: 1.02rem; }
.role-card .role-q { font-family: var(--font-serif); font-style: italic; color: var(--on-graphite-soft); font-size: .98rem; margin-bottom: .6rem; }
.role-card ul { font-size: .88rem; color: var(--on-graphite-soft); margin: 0; padding-left: 1.1em; }

/* Direction cards (eight dashboard directions) */
.dir-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.1rem; margin-top: 1.4rem; }
.dir-card {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .55rem;
  text-decoration: none; color: inherit; border-top: 5px solid var(--cobalt);
  transition: transform .15s ease, box-shadow .15s ease;
}
.dir-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(27,30,35,.12); color: inherit; }
.dir-card h3 { font-size: 1.08rem; margin: 0; }
.dir-card .dir-q { font-family: var(--font-serif); font-style: italic; color: var(--ink-soft); font-size: .95rem; margin: 0; }
.dir-card .dir-for { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--cobalt-deep); }
.dir-card .dir-go { font-size: .85rem; font-weight: 600; color: var(--cobalt-deep); margin-top: auto; }
.dir-card.mini-anatomy { padding-top: .9rem; }
.mini-svg { background: var(--graphite); border-radius: 8px; padding: .5rem; }

/* Quality states legend */
.state-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin-top: 1.2rem; }
.state-card { background: var(--graphite); border: 1px solid var(--graphite-3); border-radius: var(--radius); padding: .9rem 1rem; color: var(--on-graphite); }
.state-card h3 { font-size: .92rem; color: #fff; display: flex; align-items: center; gap: .5rem; }
.state-card p { font-size: .84rem; margin: 0; color: var(--on-graphite-soft); }

/* FAQ */
.faq { display: grid; gap: .7rem; margin-top: 1.4rem; }
.faq details { background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.2rem; }
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 1.02rem; padding: 1rem 0; min-height: 44px;
  display: flex; align-items: center; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '+'; font-family: var(--font-mono); color: var(--cobalt); margin-right: .7rem; font-size: 1.2rem; flex: 0 0 auto; }
.faq details[open] summary::before { content: '–'; }
.faq details p { padding-bottom: 1rem; margin: 0; color: var(--ink-soft); }

/* CTA band */
.cta-band { background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: clamp(1.6rem, 3vw, 2.6rem); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c3c9d2; }
.cta-band .cta-row { margin-top: 1.2rem; }

/* Sibling links */
.siblings { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.siblings a {
  display: inline-block; background: var(--paper-card); border: 1px solid var(--line);
  border-radius: 999px; padding: .5rem 1rem; font-size: .88rem; font-weight: 500; text-decoration: none;
  min-height: 44px; line-height: 1.5;
}
.siblings a:hover { border-color: var(--cobalt); }

/* ---------- Footer ---------- */
.shell-footer { background: var(--ink); color: #b9bfc9; margin-top: 3rem; border-top: 3px solid var(--cyan); }
.shell-footer .wrap { padding-top: 2.4rem; padding-bottom: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.shell-footer h2, .shell-footer h3 { color: #fff; font-size: .95rem; font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.shell-footer ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.shell-footer li { margin-bottom: .45rem; break-inside: avoid; }
.shell-footer a { color: #b9bfc9; text-decoration: none; font-size: .92rem; padding: .25rem 0; display: inline-block; min-height: 32px; }
.shell-footer a:hover { color: var(--lime); }
.footer-brand p { font-size: .88rem; }
.footer-legal { border-top: 1px solid #343a45; margin-top: 2rem; padding-top: 1.2rem; font-size: .8rem; color: #79808c; display: flex; flex-wrap: wrap; gap: .5rem 2rem; }

/* ---------- Reveal animation (progressive only) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(2, 1fr); }
  .split-3 { grid-template-columns: 1fr 1fr; }
  .srcmap { grid-template-columns: 1fr; }
  .srcmap .sm-arrow { transform: rotate(90deg); justify-self: center; }
}
@media (max-width: 860px) {
  /* Without JS the primary nav stays visible as a stacked list (progressive
     enhancement); the toggle only appears when JS can operate it. */
  .nav-toggle { display: none; margin-left: auto; }
  html.js .nav-toggle { display: inline-block; }
  .ga-nav { display: block; width: 100%; background: var(--ink); border-top: 1px solid #343a45; }
  html.js .ga-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; width: auto; }
  html.js .ga-nav.open { display: block; }
  .ga-nav ul { flex-direction: column; align-items: stretch; padding: .6rem 1rem 1rem; gap: .1rem; }
  .ga-nav a { display: block; }
  .shell-bar { flex-wrap: wrap; }
  .split-2, .split-3, .fit-grid, .split-40-60, .split-60-40 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .board { grid-template-columns: 1fr; }
  .shell-actions .btn { padding: .45rem .7rem; font-size: .85rem; }
  .shell-actions { gap: .4rem; }
  .shell-bar { gap: .6rem; }
  .nav-toggle { padding: .45rem .7rem; font-size: .85rem; }
  .brand .brand-mark { font-size: 1.05rem; }
  .brand .brand-sub { display: none; }
  .demo-tag { white-space: normal; }
  .panel-head { gap: .5rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .dir-card:hover { transform: none; }
}

/* ---------- Zoom / reflow safety ---------- */
@media (max-width: 340px) {
  .kpi-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.65rem; }
}
