/* Layout: a deep ink-teal rail holds the navigation; the content is paper. Teal means "found or in progress",
   gold is kept for one thing only: money the bill has proved. Everything is written against tokens. */

@font-face { font-family: "Plex Arabic"; src: url("fonts/IBMPlexSansArabic-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/IBMPlexSansArabic-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/IBMPlexSansArabic-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/IBMPlexSansArabic-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f1f5f3; --surface: #ffffff; --sunken: #f5f8f7;
  --ink: #0c1f1c; --ink-2: #4f625e; --ink-3: #5f726d; --line: #e0e7e4; --line-2: #c9d4d0;
  --side: #072620; --side-ink: #e2efeb; --side-mute: #8fb1a8; --side-active: rgba(255, 255, 255, 0.10);
  --brand: #0e7c66; --brand-strong: #0a5c4c; --brand-soft: #dff2ec; --on-brand: #ffffff;
  --gold: #9a6c12; --gold-fill: #b5831f; --gold-soft: #f7edd5;
  --c1: #0c8068; --c2: #2f6fd6; --c3: #a9650f; --c4: #7a5be0; --c5: #d9548b; --c-mute: #9aa8a4;
  --o1: #0a5c4c; --o2: #0c8068; --o3: #6cc7b1; --o-none: #c9d3cf;
  --seg-ink: #ffffff; --seg-ink-alt: #06231f; --gold-seg: #9a6c12;
  --good: #0aac23; --warn: #c77700; --crit: #dc3c3d; --good-ink: #006c10; --crit-ink: #b42324;
  --hero-a: #13836c; --hero-b: #0a4c40; --hero-c: #072b25; --track: #cfe9e2; --gold-line: #e3cf9d;
  --shadow: 0 1px 2px rgba(12, 31, 28, 0.05), 0 12px 28px -20px rgba(12, 31, 28, 0.25);
  --font: "Plex Arabic", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, Consolas, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07110f; --surface: #0e1b18; --sunken: #0a1512;
  --ink: #e8f1ee; --ink-2: #a3b6b0; --ink-3: #72867f; --line: #1c2d29; --line-2: #2b403b;
  --side: #040c0a; --side-ink: #dcebe6; --side-mute: #7f9f96; --side-active: rgba(255, 255, 255, 0.08);
  --brand: #2bb596; --brand-strong: #58d2b6; --brand-soft: #11302a; --on-brand: #03130f;
  --gold: #d5a54a; --gold-fill: #c4943a; --gold-soft: #2c2412;
  --c1: #2bb596; --c2: #5b93ea; --c3: #cc8433; --c4: #9c87f2; --c5: #db6c9a; --c-mute: #5d716b;
  --o1: #49c9ac; --o2: #2bb596; --o3: #1b6f5e; --o-none: #2a3d38;
  --seg-ink: #03130f; --seg-ink-alt: #e8f1ee; --gold-seg: #c4943a;
  --good-ink: #53c556; --crit-ink: #f08a8b; --warn: #fbb315;
  --hero-a: #136c59; --hero-b: #0a3d33; --hero-c: #06201b; --track: #17362f; --gold-line: #4a3c17;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #07110f; --surface: #0e1b18; --sunken: #0a1512;
    --ink: #e8f1ee; --ink-2: #a3b6b0; --ink-3: #72867f; --line: #1c2d29; --line-2: #2b403b;
    --side: #040c0a; --side-ink: #dcebe6; --side-mute: #7f9f96; --side-active: rgba(255, 255, 255, 0.08);
    --brand: #2bb596; --brand-strong: #58d2b6; --brand-soft: #11302a; --on-brand: #03130f;
    --gold: #d5a54a; --gold-fill: #c4943a; --gold-soft: #2c2412;
    --c1: #2bb596; --c2: #5b93ea; --c3: #cc8433; --c4: #9c87f2; --c5: #db6c9a; --c-mute: #5d716b;
    --o1: #49c9ac; --o2: #2bb596; --o3: #1b6f5e; --o-none: #2a3d38;
  --seg-ink: #03130f; --seg-ink-alt: #e8f1ee; --gold-seg: #c4943a;
    --good-ink: #53c556; --crit-ink: #f08a8b; --warn: #fbb315;
    --hero-a: #136c59; --hero-b: #0a3d33; --hero-c: #06201b; --track: #17362f; --gold-line: #4a3c17;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }
html { font-family: var(--font); font-size: 15px; line-height: 1.6; }
html[lang="ar"] { font-size: 16px; }      /* Arabic letterforms need a little more size than Latin */
html[lang="en"] { line-height: 1.5; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.45rem; font-weight: 700; }
h2 { font-size: 1rem; font-weight: 600; }
h3 { font-size: .82rem; font-weight: 600; color: var(--ink-3); }
button, input, select, textarea { font: inherit; color: var(--ink); }
.mute { color: var(--ink-3); }
.small { font-size: .82rem; }
.mono, code { font-family: var(--mono); font-size: .86em; direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.ico { flex: none; }
[dir="rtl"] .ico.flip { transform: scaleX(-1); }
.ico.back { transform: scaleX(-1); }
[dir="rtl"] .ico.back { transform: none; }
[dir="rtl"] .spark { transform: scaleX(-1); }      /* time runs right to left in Arabic, in every chart */
.money { white-space: nowrap; unicode-bidi: isolate; }
.money .cur { font-size: .62em; font-weight: 600; opacity: .72; }
.sar { height: .74em; width: auto; fill: currentColor; vertical-align: -0.02em; opacity: .82; }
.fig, .num { font-variant-numeric: tabular-nums; }

/* ---- shell ---- */
.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 14px 16px; gap: 6px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 20px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(150deg, #19ab8c, #0a6553); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.brand-mark .mark { width: 24px; height: 24px; display: block; }
[dir="rtl"] .brand-mark .mark { transform: scaleX(-1); }      /* the bill shrinks in the direction of reading */
.brand-name { font-weight: 700; font-size: 1.3rem; line-height: 1.2; color: #fff; }
.brand-tag { font-size: .8rem; color: var(--side-mute); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: var(--side-mute); font-weight: 500; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.nav a[aria-current="page"] { color: #fff; background: var(--side-active); }
.nav a[aria-current="page"] .ico { color: #5fe0c2; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.side-row { display: flex; gap: 8px; }
.side-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 10px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .12); background: none; color: var(--side-ink); cursor: pointer; font-size: .86rem; }
.side-btn:hover { background: rgba(255, 255, 255, .07); }
.who { display: flex; flex-direction: column; gap: 6px; }
.intro { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; border-inline-start: 4px solid var(--brand); }
.intro p { margin: 0; flex: 1 1 420px; color: var(--ink-2); }
.intro .actions { flex: 0 1 auto; flex-wrap: wrap; }
.legend em { font-style: normal; color: var(--ink-3); font-weight: 400; }
.side-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: .8rem; line-height: 1.5; color: var(--side-mute); }
.side-note .ico { flex: none; margin-top: 2px; }
.who-wrap > summary { list-style: none; cursor: pointer; }
.who-wrap > summary::-webkit-details-marker { display: none; }
.who-wrap[open] .who { margin-top: 8px; }
.who label { font-size: .8rem; color: var(--side-mute); }
.who input, .who select { width: 100%; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: var(--side-ink); border-radius: 8px; padding: 6px 8px; font-size: .84rem; }
.who select option { color: #111; }
.main { min-width: 0; }
/* The top bar stays in view, so the "sample data" label travels with whatever the reader has scrolled to. */
.bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 30px 10px; position: sticky; top: 0; z-index: 20; background: var(--bg); }
.bar h1 { margin-inline-end: auto; }
.content { padding: 8px 30px 56px; max-width: 1320px; display: flex; flex-direction: column; gap: 16px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: .86rem; }
.crumb:hover { color: var(--ink); }

/* ---- pieces ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head .sub { color: var(--ink-3); font-size: .82rem; }
.grid { display: grid; gap: 16px; }
.g-top { grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.g-2e { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-2r { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media screen and (max-width: 1100px) { .g-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-top .hero { grid-column: 1 / -1; } .flow-step::after { display: none; } .g-2, .g-2e, .g-2r, .g-3 { grid-template-columns: minmax(0, 1fr); } }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px; border-radius: 999px; font-size: .8rem; font-weight: 500; background: var(--sunken); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.gold { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.pill.st-implemented { background: var(--brand-soft); color: var(--brand-strong); border-color: transparent; }
.pill.st-approved { color: var(--brand); border-color: currentColor; background: none; }
.pill.sample { background: none; color: var(--ink-2); border: 1px dashed var(--line-2); }
/* risk: a shape and a word, never colour alone */
.risk { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: .84rem; }
.risk::before { content: ""; width: 9px; height: 9px; flex: none; }
.risk.low::before { background: var(--good); border-radius: 50%; }
.risk.medium::before { background: var(--warn); clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 11px; height: 10px; }
.risk.high::before { background: var(--crit); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); width: 11px; height: 11px; }
.conf { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.conf i { width: 4px; border-radius: 1px; background: var(--line-2); }
.conf i:nth-child(1) { height: 5px; } .conf i:nth-child(2) { height: 8px; } .conf i:nth-child(3) { height: 12px; }
.conf.low i:nth-child(1), .conf.medium i:nth-child(-n+2), .conf.high i { background: var(--ink-2); }
.conf-wrap { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; white-space: nowrap; }
.tico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-strong); flex: none; }

.btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 500; }
.btn:hover { background: var(--sunken); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 600; }
.btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn.gold { background: var(--gold-seg); border-color: var(--gold-seg); color: var(--seg-ink); font-weight: 600; }
.btn.quiet { border-color: transparent; background: none; color: var(--ink-2); padding-inline: 6px; }
.btn.sm { padding: 4px 10px; font-size: .82rem; border-radius: 8px; }
input, select, textarea { background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; padding: 7px 10px; width: 100%; }
textarea { min-height: 64px; resize: vertical; }
label { display: block; font-size: .8rem; color: var(--ink-3); margin-bottom: 3px; }
.field { margin-bottom: 10px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.flash { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.flash.ok { border-inline-start: 4px solid var(--good); }
.flash.err { border-inline-start: 4px solid var(--crit); }
.flash.warn { border-inline-start: 4px solid var(--warn); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- hero and tiles ---- */
.hero { position: relative; overflow: hidden; border: 0; color: #fff; background: radial-gradient(130% 150% at 0% 0%, var(--hero-a) 0%, var(--hero-b) 48%, var(--hero-c) 100%); display: flex; flex-direction: column; gap: 6px; justify-content: space-between; }
[dir="rtl"] .hero { background: radial-gradient(130% 150% at 100% 0%, var(--hero-a) 0%, var(--hero-b) 48%, var(--hero-c) 100%); }
/* fine engraved rings, as on a banknote or a certificate */
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-radial-gradient(circle at 105% -10%, rgba(255, 255, 255, .07) 0 1px, transparent 1px 13px), repeating-radial-gradient(circle at -5% 120%, rgba(255, 255, 255, .05) 0 1px, transparent 1px 17px); }
.hero > * { position: relative; }
.hero .label { font-size: .9rem; color: rgba(255, 255, 255, .78); }
.hero .big { font-size: clamp(2.3rem, 4.4vw, 3.5rem); font-weight: 700; line-height: 1.12; }
.hero .big .sar { height: .62em; opacity: .9; }
.hero .share { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: .9rem; color: rgba(255, 255, 255, .9); }
.hero .meter { flex: 1; max-width: 220px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.hero .meter i { display: block; height: 100%; border-radius: 999px; background: #fff; }
.hero .note { font-size: .8rem; color: rgba(255, 255, 255, .64); margin-top: 6px; }
.tile { display: flex; flex-direction: column; gap: 4px; }
.tile .label { font-size: .84rem; color: var(--ink-3); display: flex; align-items: center; gap: 7px; }
.tile .value { font-size: 1.9rem; font-weight: 700; line-height: 1.25; }
.tile .foot { margin-top: auto; padding-top: 8px; font-size: .8rem; color: var(--ink-3); display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tile.proved .value { color: var(--gold); }
/* the story in one row: found, approved, implemented, proved. A chevron joins each card to the next. */
.flow-step { position: relative; }
.flow-step::after { content: ""; position: absolute; top: 50%; inset-inline-end: -13px; width: 10px; height: 10px; border-top: 2px solid var(--line-2); border-inline-end: 2px solid var(--line-2); transform: translateY(-50%) rotate(45deg); z-index: 2; }
[dir="rtl"] .flow-step::after { transform: translateY(-50%) rotate(-45deg); }
.flow-step:last-child::after { display: none; }
.tile .value small { font-size: .5em; font-weight: 500; color: var(--ink-3); }
.bar-total { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.proved-num b { color: var(--gold); }
table.t td.wl { white-space: nowrap; }
table.t th.grp { text-align: center; border-bottom-color: var(--line); padding-bottom: 4px; }
.fill { display: flex; flex-direction: column; }
.fill .bars { flex: 1; justify-content: space-around; }
.stack > .grow { flex: 1; }
.risk-mix { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.risk-mix b { font-weight: 600; color: var(--ink); }

/* ---- bars ---- */
.bars { display: flex; flex-direction: column; gap: 4px; }
.bar-row { display: grid; grid-template-columns: 26px minmax(0, 136px) minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; }
.bar-row:hover, .bar-row:focus-visible { background: var(--sunken); }
.bar-row .bico { color: var(--brand-strong); display: grid; place-items: center; }
.bar-row .name { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-line { display: flex; align-items: center; gap: 9px; min-width: 0; }
.bar-line i { display: block; height: 18px; min-width: 3px; background: var(--c1); border-start-end-radius: 4px; border-end-end-radius: 4px; }
.bar-line span { font-size: .85rem; white-space: nowrap; font-weight: 600; }
/* one whole, split into parts: each part its own block */
.seg { display: flex; gap: 2px; height: 28px; }
.seg > span { border-radius: 4px; min-width: 3px; display: flex; align-items: center; padding-inline: 9px; font-size: .8rem; font-weight: 600; white-space: nowrap; color: var(--seg-ink); }
.seg > span.dark-ink { color: var(--seg-ink-alt); }      /* the pale steps flip with the theme, and so does their ink */
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: .84rem; }
.legend > span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend b { font-weight: 600; }
.legend em { font-style: normal; color: var(--ink-3); }
.s-implemented { background: var(--o1); } .s-approved { background: var(--o2); } .s-open { background: var(--o3); } .s-declined { background: var(--o-none); }
.k1 { background: var(--c1); } .k2 { background: var(--c2); } .k3 { background: var(--c3); } .k4 { background: var(--c4); } .k5 { background: var(--c5); } .k6 { background: var(--c-mute); }
.kg { background: var(--gold-seg); } .kd { background: var(--o1); }
.meters { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) auto; gap: 12px 14px; align-items: center; font-size: .88rem; }
.meter { position: relative; height: 8px; border-radius: 999px; background: var(--track); }
.meter > i { display: block; height: 100%; border-radius: 999px; background: var(--c1); }
.meter > u { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 1px; text-decoration: none; }

/* ---- time series ---- */
.ts { position: relative; outline: none; }
.ts-svg { display: block; width: 100%; height: auto; overflow: visible; }
.ts-grid { stroke: var(--line); stroke-width: 1; }
.ts-axis { stroke: var(--line-2); }
.ts-tick { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.ts-cross { stroke: var(--ink-3); stroke-width: 1; }
.ts-x { position: relative; height: 20px; font-size: .8rem; color: var(--ink-3); }
.ts-x span { position: absolute; top: 2px; transform: translateX(-50%); white-space: nowrap; }
.key { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; color: var(--ink-2); }
.key i { width: 16px; height: 0; border-top: 2.5px solid var(--c1); border-radius: 2px; }
.key i.ref { border-color: var(--c-mute); }
.keys { display: flex; gap: 16px; flex-wrap: wrap; }
.tip { position: fixed; z-index: 30; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: 11px; padding: 9px 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); font-size: .84rem; max-width: 300px; }
.tip .t-title { color: var(--ink-3); font-size: .8rem; margin-bottom: 3px; }
.tip .t-row { display: flex; align-items: center; gap: 8px; }
.tip .t-row i { width: 12px; border-top: 2.5px solid var(--c1); }
.tip .t-row b { font-weight: 700; }
.tip .t-row span { color: var(--ink-2); }
.tip .t-note { color: var(--gold); font-size: .8rem; margin-top: 3px; }
.duo { display: flex; gap: 22px; flex-wrap: wrap; align-items: baseline; }
.duo div { display: flex; flex-direction: column; }
.duo .v { font-size: 1.25rem; font-weight: 700; }
.duo .v.now { color: var(--brand); }

/* ---- opportunity rows ---- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chips a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: .84rem; color: var(--ink-2); white-space: nowrap; }
.chips a:hover { border-color: var(--ink-3); }
.chips a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chips a b { font-weight: 600; opacity: .75; }
.chips .sep { width: 1px; align-self: stretch; background: var(--line-2); margin-inline: 6px; }
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 100px 100px 132px 150px 18px; align-items: center; gap: 14px; padding: 11px 8px; border-bottom: 1px solid var(--line); border-radius: 10px; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--sunken); }
.row .name { font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; }
.row .name bdi { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .name .pill { flex: none; }
.row .sum { display: block; color: var(--ink-3); font-size: .83rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.row-head { padding-block: 4px 6px; border-bottom: 1px solid var(--line-2); border-radius: 0; font-size: .8rem; color: var(--ink-3); }
.row.row-head:hover { background: none; }
.row.row-head .amt { font-weight: 500; font-size: .8rem; }
.rows.no-status .row { grid-template-columns: 40px minmax(0, 1fr) 100px 100px 150px 18px; }
.row .amt { text-align: end; font-weight: 700; font-size: 1.02rem; }
.row .go { color: var(--ink-3); display: grid; place-items: center; }
.rows.tight .row { grid-template-columns: 40px minmax(0, 1fr) 116px 128px 18px; gap: 10px; }
@media screen and (max-width: 1320px) { .rows.tight .row { grid-template-columns: 40px minmax(0, 1fr) 128px 18px; } .rows.tight .row > .hide-s { display: none; } }
@media screen and (max-width: 1000px) { .row, .rows.tight .row, .rows.no-status .row { grid-template-columns: 40px minmax(0, 1fr) 120px; } .row > .hide-s, .row .go { display: none; } }
@media screen and (max-width: 600px) { .ts-x span:nth-child(even) { display: none; } }

/* ---- opportunity detail ---- */
.head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.head .tico { width: 52px; height: 52px; border-radius: 15px; }
.head .title { min-width: 0; flex: 1 1 240px; }      /* on a phone the chips drop to the next row; the name keeps its width */
.head .title h1 { font-size: 1.35rem; overflow-wrap: anywhere; }
.head .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; align-items: center; }
/* where the opportunity stands: found, approved, implemented, proved on the bill */
.track { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; }
.track li { flex: 1 1 0; min-width: 0; display: flex; align-items: flex-start; gap: 10px; }
.track li:last-child { flex: 0 1 auto; }
.track li::after { content: ""; flex: 1 1 12px; min-width: 12px; margin-top: 14px; border-top: 2px solid var(--line-2); }
.track li:last-child::after { display: none; }
.track .dot { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); color: var(--ink-3); border: 1px solid var(--line-2); }
.track .txt { display: flex; flex-direction: column; min-width: 0; }
.track .tl { font-weight: 600; font-size: .9rem; white-space: nowrap; }
.track .ts-sub { font-size: .8rem; color: var(--ink-3); white-space: nowrap; }
.track li.todo .tl { color: var(--ink-3); font-weight: 500; }
.track li.done .dot { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.track li.done::after { border-color: var(--brand); }
.track li.gold .dot { background: var(--gold-fill); border-color: var(--gold-fill); color: #fff; }
.track li.gold .ts-sub { color: var(--gold); font-weight: 600; }
.track li.no .dot { background: var(--surface); border-color: var(--crit); color: var(--crit-ink); }
@media screen and (max-width: 900px) { .track { flex-direction: column; } .track li::after { display: none; } }
.cost3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.cost3 > div { padding-inline: 16px; border-inline-start: 1px solid var(--line); }
.cost3 > div:first-child { padding-inline-start: 0; border: 0; }
.cost3 .v { font-size: 1.5rem; font-weight: 700; }
.cost3 .save .v { color: var(--brand); }
.ba { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px 14px; align-items: center; }
.ba .pair { display: flex; flex-direction: column; gap: 4px; }
.ba .line { display: flex; align-items: center; gap: 9px; }
.ba .line i { height: 12px; border-start-end-radius: 4px; border-end-end-radius: 4px; min-width: 3px; }
.ba .line.was i { background: var(--o-none); }
.ba .line.will i { background: var(--c1); }
.ba .line span { font-size: .84rem; white-space: nowrap; }
.ba .line.will span { font-weight: 600; }
.nodes { display: flex; flex-wrap: wrap; gap: 6px; max-width: 320px; }
.nodes i { width: 24px; height: 24px; border-radius: 6px; background: var(--c1); }
.nodes i.cut { background: none; border: 1.5px dashed var(--ink-3); }
.gauge-line { display: grid; grid-template-columns: 76px minmax(0, 1fr) 88px; gap: 12px; align-items: center; font-size: .86rem; margin-top: 10px; }
.bigfact { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bigfact b { font-size: 2.1rem; font-weight: 700; line-height: 1.2; }
.facts { width: 100%; border-collapse: collapse; font-size: .88rem; }
.facts th { text-align: start; font-weight: 400; color: var(--ink-3); width: 40%; padding: 7px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
.facts td { padding: 7px 0 7px; padding-inline-start: 12px; border-bottom: 1px solid var(--line); }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
details.more > summary { cursor: pointer; color: var(--ink-2); font-weight: 500; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary .ico { transform: rotate(90deg); }
details.more > div { margin-top: 12px; }
.why { margin: 6px 0 0; padding-inline-start: 18px; color: var(--ink-2); font-size: .88rem; }
.steps { display: flex; flex-direction: column; gap: 14px; position: relative; }
.step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.step .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-strong); }
.step .dot.no { background: var(--sunken); color: var(--ink-3); }
.step .dot.gold { background: var(--gold-soft); color: var(--gold); }
.step .what { font-weight: 600; }
.step .by { color: var(--ink-3); font-size: .8rem; }

/* ---- tables ---- */
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th { text-align: start; font-size: .8rem; font-weight: 500; color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t .n { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tbody tr:hover { background: var(--sunken); }
.scroll { overflow-x: auto; }
.vs { display: flex; flex-direction: column; gap: 3px; min-width: 120px; }
.vs i { display: block; height: 7px; border-radius: 4px; min-width: 2px; }
.vs i.v { background: var(--gold-fill); }
.vs i.e { background: var(--o-none); }

/* ---- verified savings ---- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { padding: 6px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 500; color: var(--ink-2); display: inline-flex; gap: 8px; align-items: center; }
.tabs a[aria-current="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.proved { border-color: var(--gold-line); }
.proved .big { font-size: 3rem; font-weight: 700; color: var(--gold); line-height: 1.15; }
.proved .big .sar { height: .62em; }
.split { margin-top: 16px; }
.bridge { display: flex; flex-direction: column; gap: 8px; }
.bridge-row { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr) 112px; gap: 12px; align-items: center; font-size: .88rem; }
.bridge-track { position: relative; height: 20px; border-inline-start: 1px solid var(--line-2); }
.bridge-bar { position: absolute; top: 0; bottom: 0; border-radius: 4px; min-width: 3px; }
.b-start { background: var(--c1); } .b-minus { background: var(--c-mute); } .b-total { background: var(--gold-fill); }
.bridge-row .val { text-align: end; font-weight: 600; font-variant-numeric: tabular-nums; }
.bridge-row.total { font-weight: 700; }
.recon { width: 100%; border-collapse: collapse; font-size: .88rem; }
.recon td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.recon td.n { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.recon tr.sum td { border-top: 1px solid var(--line-2); font-weight: 700; }
.recon tr:last-child td { border-bottom: 0; }

/* ---- columns chart (months) ---- */
.cols { display: flex; align-items: flex-end; gap: 18px; height: 150px; border-bottom: 1px solid var(--line-2); padding-inline: 8px; }
.cols .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 5px; max-width: 90px; }
.cols .col i { width: 22px; background: var(--c1); border-start-start-radius: 4px; border-start-end-radius: 4px; min-height: 2px; }
.cols .col span { font-size: .8rem; font-weight: 600; white-space: nowrap; }
.cols-x { display: flex; gap: 18px; padding: 6px 8px 0; font-size: .8rem; color: var(--ink-3); }
.cols-x span { flex: 1; text-align: center; max-width: 90px; }

/* ---- audit ---- */
.trail { display: flex; flex-direction: column; }
.trail .ev { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); align-items: center; }
.trail .ev:last-child { border-bottom: 0; }
.trail .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); color: var(--ink-2); }
.trail .l1 { font-weight: 600; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.trail .l1 span { font-weight: 400; color: var(--ink-2); overflow-wrap: anywhere; }
.trail .l2 { color: var(--ink-3); font-size: .8rem; }
.trail .meta { text-align: end; font-size: .8rem; color: var(--ink-3); white-space: nowrap; }
.empty { text-align: center; padding: 36px 12px; color: var(--ink-3); }

@media screen and (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; }
  .brand { padding: 0 6px; } .nav { flex-direction: row; flex-wrap: wrap; } .side-foot { margin: 0; border: 0; padding: 0; flex-direction: row; }
  .who { display: none; } .bar, .content { padding-inline: 16px; }
  .row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .bridge-row { grid-template-columns: minmax(0, 1fr) 100px; } .bridge-track { grid-column: 1 / -1; order: 3; }
  .cost3 { grid-template-columns: minmax(0, 1fr); gap: 10px; } .cost3 > div { border: 0; padding: 0; }
}
@media print {
  .side, .bar .btn, form, .no-print { display: none !important; }
  .app { display: block; } body { background: #fff; } .card { box-shadow: none; break-inside: avoid; }
}
@media (prefers-reduced-motion: no-preference) { .btn, .nav a, .row, .chips a { transition: background-color .12s ease, border-color .12s ease, color .12s ease; } }

/* phones: one tile per line; names and summaries wrap instead of being cut; wide tables scroll inside their card */
@media screen and (max-width: 760px) {
  .scroll > table.t { min-width: 620px; }
  .scroll > table.t.wide { min-width: 860px; }
  .card { min-width: 0; }
}
@media screen and (max-width: 560px) {
  .g-top { grid-template-columns: minmax(0, 1fr); }
  .row .name .pill { display: none; }
  .row .name bdi, .row .sum { white-space: normal; overflow-wrap: anywhere; }
  .card-head .btn { white-space: nowrap; }
}
