/* ==========================================================================
   YourMoney prototype — design system
   Structure, type scale, spacing, grid and component shapes follow Ripple 2
   (github.com/dpc-sdp/ripple, Apache-2.0). No Victorian Government logos,
   no VIC typeface, no coat of arms. Arial/Helvetica is Ripple's own fallback.
   ========================================================================== */

:root {
  color-scheme: light;
  /* Ripple 2 default theme tokens */
  /* YourMoney site theme on Ripple (sites theme per site, as DTF and Buying for Victoria do).
     Deliberately not the vic.gov.au blues, so it can never be mistaken for an existing site. */
  --primary: #1b365d;
  --primary-alt: #0f2342;
  --primary-50: #e8edf4;
  --primary-100: #d1dbe8;
  --primary-200: #a3b6d1;
  --primary-600: #162d4e;
  --gold: #f2c14e;
  --accent: #00a3a1;
  --accent-alt: #e5f6f5;
  --text: #1a1a1a;
  --text-2: #333333;
  --muted: #666666;
  --line: #cccccc;
  --line-2: #e6e6e6;
  --neutral: #f5f5f5;
  --white: #ffffff;
  --focus: #ff9e1b;
  --info: #005ba5;      --info-light: #e6eff6;
  --success: #007d85;   --success-light: #e6f2f3;   --success-dark: #00646a;
  --warning: #b75b00;   --warning-light: #f8efe6;   --warning-dark: #924900;
  --error: #aa0028;     --error-light: #f7e6ea;     --error-dark: #880020;
  --gradient: linear-gradient(90deg, #0f2342 0%, #1b365d 14%, #0080a8 34%, #00a3a1 52%, #7fcfa6 70%, #f2c14e 88%, #f28c28 100%);
  --gradient-v: linear-gradient(180deg, #0f2342 0%, #1b365d 14%, #0080a8 34%, #00a3a1 52%, #7fcfa6 70%, #f2c14e 88%, #f28c28 100%);
  /* Chart series (validated: scripts/validate_palette.js, light, white surface) */
  --s1: #0080a8;
  --s2: #e36c0a;
  --s3: #7a5bd6;
  --s-context: #b8c0cc;
  --grid: #e6e6e6;
  --axis: #c3c2b7;
  /* Layers */
  --elev-1: 0 2px 8px rgb(26 26 26 / 16%);
  --elev-2: 0 4px 8px 2px rgb(26 26 26 / 16%);
  --radius: 4px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --container: 1200px;
  --pad: 16px;
}
@media (min-width: 768px) { :root { --pad: 32px; } }
@media (min-width: 992px) { :root { --pad: 64px; } }
@media (min-width: 1200px) { :root { --pad: 80px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 26px;
  letter-spacing: 0.012em;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--text) inset, 0 0 0 4px var(--focus); border-radius: 0 !important; }
a:focus-visible { background: var(--focus); color: var(--text); box-shadow: -1px 0 var(--focus), 1px 0 var(--focus), 0 4px 0 -1px var(--text); text-decoration: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--focus); color: var(--text); padding: 8px 16px; font-weight: 700; }
.skip-link:focus { top: 8px; }

.container { max-width: calc(var(--container) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 21px; }
.nowrap { white-space: nowrap; }

/* --- Typography (Ripple scale at its own 16px base; the P key enlarges everything for projection) --- */
h1, h2, h3, h4, h5 { font-weight: 700; margin: 0; }
.h1 { font-size: 32px; line-height: 36px; letter-spacing: 0.014em; color: var(--primary); }
.h2 { font-size: 24px; line-height: 32px; letter-spacing: 0.016em; }
.h3 { font-size: 20px; line-height: 28px; letter-spacing: 0.018em; }
.h4 { font-size: 18px; line-height: 26px; }
@media (min-width: 992px) {
  .h1 { font-size: 44px; line-height: 50px; letter-spacing: 0.004em; }
  .h2 { font-size: 28px; line-height: 36px; letter-spacing: 0.012em; }
  .h3 { font-size: 21px; line-height: 29px; }
  .h4 { font-size: 18px; line-height: 26px; }
}
.lead { font-size: 18px; line-height: 28px; }
@media (min-width: 992px) { .lead { font-size: 20px; line-height: 30px; } }
.eyebrow { font-size: 13px; line-height: 18px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
p { margin: 0 0 16px; }
.prose { max-width: 720px; }
.prose p + h2, .prose ul + h2 { margin-top: 40px; }
.prose h2 { margin-bottom: 16px; }
.prose ul { padding-left: 24px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }

/* --- Phase banner (government 'new service' convention: GOV.UK alpha/beta, Ripple site alert) --- */
.phase { background: #eef2f7; color: var(--text); font-size: 14px; line-height: 20px; position: sticky; top: 0; z-index: 60; border-bottom: 1px solid #d8e0ea; }
.phase .container { display: flex; gap: 10px; align-items: center; padding-top: 7px; padding-bottom: 7px; }
.phase-tag { background: var(--primary); color: #fff; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 8px; border-radius: 2px; flex: none; }
.phase a { color: var(--primary); font-weight: 700; }

/* --- Primary navigation (Ripple floating nav bar) --- */
.site-header { position: relative; z-index: 50; padding: 16px 16px 0; }
.nav-bar { max-width: calc(var(--container) + 48px); margin: 0 auto; background: var(--primary); color: #fff; border-radius: var(--radius); min-height: 60px; display: flex; align-items: stretch; padding: 0 8px 0 20px; position: relative; }
.nav-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; padding-right: 24px; margin-right: 8px; border-right: 2px solid rgb(255 255 255 / 30%); }
.nav-brand:hover { text-decoration: none; }
.nav-brand .ym-mark { width: 34px; height: 34px; flex: none; }
.wm { font-size: 21px; line-height: 1; letter-spacing: -0.01em; white-space: nowrap; }
.wm b { font-weight: 700; }
.wm span { font-weight: 400; opacity: 0.78; }
.nav-divider { width: 2px; height: 24px; background: rgb(255 255 255 / 55%); align-self: center; margin-right: 8px; }
.nav-links { display: flex; align-items: stretch; margin: 0; padding: 0; list-style: none; flex: 1; }
.nav-links a, .nav-links button { display: flex; align-items: center; gap: 8px; height: 100%; padding: 8px 14px; color: #fff; text-decoration: none; font-size: 16px; font-weight: 700; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -4px 0 rgb(255 255 255 / 85%); }
.nav-search { margin-left: auto; }
.nav-search svg { width: 20px; height: 20px; }
.nav-links .nav-menu-btn { display: none; }
@media (max-width: 1099px) {
  .nav-links .nav-item { display: none; }
  .nav-menu-btn { display: flex !important; }
  .site-header.menu-open .nav-links .nav-item { display: block; }
  .site-header.menu-open .nav-bar { flex-wrap: wrap; background: var(--primary-alt); padding-bottom: 12px; }
  .site-header.menu-open .nav-links { flex-direction: column; flex-basis: 100%; order: 3; }
  .site-header.menu-open .nav-links a { padding: 12px 8px; }
  .nav-links { flex: 0 1 auto; margin-left: auto; }
  .nav-links.nav-search { margin-left: 0; }
}

@media (max-width: 575px) {
  .site-header { padding: 12px 12px 0; }
  .nav-bar { padding: 0 4px 0 12px; min-height: 52px; }
  .nav-brand { padding-right: 6px; gap: 8px; }
  .wm { font-size: 18px; }
  .nav-brand { border-right: 0; margin-right: 0; }
  .nav-brand .ym-mark { width: 28px; height: 28px; }
  .nav-search span { display: none; }
  .nav-links a, .nav-links button { padding: 8px 10px; }
  .div-row { grid-template-columns: 1fr !important; gap: 4px !important; }
  .div-head { display: none !important; }
  .ticker-value { font-size: 52px; }
}

/* --- Page header / hero (Ripple header, tucked behind the nav) --- */
.page-header { position: relative; margin-top: -76px; padding: 156px 0 56px; border-bottom: 1px solid var(--line); overflow: hidden; background: #fff; }
.page-header.has-crumbs { padding-top: 136px; }
.page-header::before { content: ""; position: absolute; left: 0; top: 0; width: 292px; height: 200px; background: var(--gradient); clip-path: polygon(0 0, 100% 0, 85% 60%, 0% 100%); opacity: 0.95; }
.page-header::after { content: ""; position: absolute; right: 0; bottom: 0; width: 272px; height: 96px; background: var(--gradient); clip-path: polygon(15% 40%, 100% 0, 100% 100%, 0 100%); opacity: 0.9; }
.page-header .container { position: relative; z-index: 1; }
.page-header .h1 { max-width: 900px; }
.page-header .lead { margin-top: 20px; max-width: 820px; }
@media (max-width: 767px) { .page-header::after { display: none; } .page-header::before { width: 168px; height: 112px; } .page-header { padding-top: 132px; } }
@media (min-width: 992px) { .page-header { padding: 176px 0 56px; } .page-header.has-crumbs { padding-top: 148px; } }
.page-header.compact { padding-bottom: 32px; }
@media (min-width: 992px) { .page-header.compact { padding-top: 144px; padding-bottom: 32px; } }
.page-header.compact .lead { margin-top: 12px; }

.journey { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.journey a { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.journey a:hover { text-decoration: underline; }
.journey a::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.12s; }
.journey a:hover::after { transform: translateX(4px) rotate(45deg); }

/* --- Breadcrumbs (floating pill) --- */
.crumbs { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--elev-1); padding: 8px 19px; font-size: 15px; line-height: 22px; margin-bottom: 28px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { color: var(--muted); }

/* --- Sections --- */
.section { padding: 48px 0; }
@media (min-width: 992px) { .section { padding: 56px 0; } }
.section.tight { padding: 32px 0; }
.section.alt { background: var(--neutral); }
.section.dark { background: var(--primary-alt); color: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 760px; }
.stack > * + * { margin-top: 24px; }

/* --- Grid --- */
.grid { display: grid; gap: 24px; }
.g-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.two-col { display: grid; gap: 40px; }
.two-col > *, .grid > *, .doc-layout > * { min-width: 0; }
@media (min-width: 992px) { .two-col { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 56px; } }

/* --- Cards --- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; transition: box-shadow 0.16s; display: flex; flex-direction: column; }
.card.highlight { padding-top: 32px; overflow: hidden; }
.card.highlight::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px; background: var(--gradient); }
a.card { text-decoration: none; color: var(--text); }
a.card:hover, .card.clickable:hover { box-shadow: var(--elev-1); }
a.card:hover .card-cta { text-decoration: underline; text-decoration-thickness: 2px; }
.card-meta { font-size: 14px; line-height: 20px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; margin-bottom: 12px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.card h3 { margin-bottom: 10px; }
.card p { margin-bottom: 0; }
.card-cta { margin-top: auto; padding-top: 20px; color: var(--primary); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.card-cta::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); }
.card-figure { font-size: 28px; line-height: 34px; font-weight: 700; color: var(--text); margin: 14px 0 4px; }
.pillar-num { position: absolute; top: 24px; right: 24px; font-size: 14px; font-weight: 700; color: var(--muted); }

/* --- Statistics grid (Ripple stats-grid) --- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0 -4px; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .stats.s4 { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--neutral); border: 4px solid #fff; padding: 28px 20px; text-align: center; }
.section.alt .stat { background: #fff; border-color: var(--neutral); }
.stat-label { font-size: 14px; line-height: 20px; color: var(--text-2); }
.stat-value { font-size: clamp(22px, 2.6vw, 34px); line-height: 1.2; font-weight: 700; margin: 6px 0 4px; color: var(--primary-alt); }
@media (max-width: 575px) { .stat-value { font-size: 26px; } }
.stat-note { font-size: 14px; line-height: 20px; color: var(--muted); }

/* --- Hero figure / live counter --- */
.ticker-band { background: var(--primary-alt); color: #fff; position: relative; overflow: hidden; }
.ticker-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--gradient); }
.ticker { padding-top: 48px; padding-bottom: 52px; display: grid; gap: 28px; align-items: end; }
@media (min-width: 992px) { .ticker { grid-template-columns: 1.4fr 1fr; padding-top: 64px; padding-bottom: 68px; } }
.ticker-label { font-size: 18px; line-height: 26px; opacity: 0.92; }
.ticker-value { font-size: 64px; line-height: 1.05; font-weight: 700; letter-spacing: -0.01em; margin-top: 8px; font-variant-numeric: tabular-nums; }
@media (min-width: 992px) { .ticker-value { font-size: 80px; } }
.ticker-sub { font-size: 18px; line-height: 27px; margin-top: 12px; }
.ticker-sub strong { font-variant-numeric: tabular-nums; }
.ticker-side { border-left: 4px solid var(--accent); padding-left: 24px; }
.ticker-side .big { font-size: 34px; line-height: 42px; font-weight: 700; }
.ticker-source { font-size: 14px; line-height: 20px; opacity: 0.8; margin-top: 18px; }

/* --- Callout --- */
.callout { background: var(--accent-alt); border-left: 4px solid var(--accent); padding: 18px 22px; font-size: 16px; line-height: 25px; }
.callout strong:first-child { display: block; margin-bottom: 4px; }
.callout.warn { background: var(--warning-light); border-color: var(--warning); }
.callout.neutral { background: transparent; border-color: var(--muted); padding: 8px 24px; }

/* --- Chips / tags / status --- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; line-height: 20px; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text-2); white-space: nowrap; text-transform: none; letter-spacing: 0; }
.chip svg { width: 14px; height: 14px; flex: none; }
.chip.ok { background: var(--success-light); border-color: #99cbce; color: var(--success-dark); }
.chip.warn { background: var(--warning-light); border-color: #e2bd99; color: var(--warning-dark); }
.chip.bad { background: var(--error-light); border-color: #dd99a9; color: var(--error-dark); }
.chip.info { background: var(--info-light); border-color: #99bddb; color: var(--info); }
.chip.solid { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.sample { white-space: normal; background: #fff7e6; border: 1px dashed #c98500; color: #6e4a00; font-weight: 700; letter-spacing: 0.02em; }
.chip.real { background: #fff; border-color: var(--primary-200); color: var(--primary-alt); }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.status.open::before { background: var(--success); }
.status.closing::before { background: var(--warning); }
.status.eval::before { background: var(--info); }
.status.awarded::before { background: var(--primary); }
.status.varied::before { background: var(--s2); }
.status.planned::before { background: #fff; border: 2px solid var(--muted); }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; border-radius: var(--radius); border: 2px solid var(--primary); background: var(--primary); color: #fff; font-weight: 700; font-size: 16px; line-height: 22px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--primary-alt); border-color: var(--primary-alt); text-decoration: underline; color: #fff; }
.btn.outline { background: #fff; color: var(--primary); }
.btn.outline:hover { background: var(--primary-50); color: var(--primary-alt); }
.btn.small { padding: 7px 14px; font-size: 15px; }
.btn svg { width: 18px; height: 18px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* --- Search --- */
.search-box { display: flex; background: #fff; border: 2px solid var(--primary); border-radius: var(--radius); overflow: hidden; max-width: 860px; }
.search-box input { flex: 1; border: 0; padding: 14px 18px; font: inherit; font-size: 18px; min-width: 0; color: var(--text); }
.search-box input:focus { outline: none; }
.search-box:focus-within { box-shadow: 0 0 0 4px var(--focus); }
.search-box button { border: 0; background: var(--primary); color: #fff; padding: 0 24px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.search-box button svg { width: 20px; height: 20px; }
.search-hints { margin-top: 12px; font-size: 15px; color: var(--muted); display: flex; gap: 8px 16px; flex-wrap: wrap; }
.search-hints a { font-weight: 700; }

/* --- Tabs (Ripple tabs) --- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
.tabs button, .tabs a { background: none; border: 0; padding: 12px 16px; font-weight: 700; font-size: 16px; cursor: pointer; color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; white-space: nowrap; position: relative; }
.tabs [aria-selected="true"] { color: var(--primary); text-decoration: none; }
.tabs [aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: var(--primary); }
.tabs .count { font-weight: 400; color: var(--muted); margin-left: 4px; }

.seg { display: inline-flex; border: 2px solid var(--primary); border-radius: var(--radius); overflow: hidden; }
.seg button { border: 0; background: #fff; color: var(--primary); font-weight: 700; padding: 8px 16px; cursor: pointer; font-size: 16px; }
.seg button + button { border-left: 2px solid var(--primary); }
.seg button[aria-pressed="true"] { background: var(--primary); color: #fff; }

/* --- Filters --- */
.filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin-bottom: 24px; padding: 20px; background: var(--neutral); border-radius: var(--radius); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 170px; }
.field label { font-size: 14px; font-weight: 700; color: var(--text-2); }
.field select, .field input { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--muted); border-radius: var(--radius); background: #fff; color: var(--text); min-height: 46px; }
.field select:focus, .field input:focus { outline: none; box-shadow: 0 0 0 1px var(--text) inset, 0 0 0 4px var(--focus); }
.field.grow { flex: 1; min-width: 240px; }
.field select { max-width: 300px; }
.feed-layout .filters { padding: 16px; gap: 10px 12px; }
.feed-layout .field { min-width: 0; }
.feed-layout .field.grow { min-width: 220px; }
.chip-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip-filter button { border: 1px solid var(--muted); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 15px; font-weight: 700; cursor: pointer; }
.chip-filter button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* --- Tables (Ripple: zebra, right-aligned money) --- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 21px; }
table.data caption { text-align: left; font-weight: 700; padding: 16px; font-size: 17px; }
table.data th, table.data td { padding: 14px 12px; text-align: left; vertical-align: top; }
table.data th:first-child, table.data td:first-child { padding-left: 16px; }
table.data th:last-child, table.data td:last-child { padding-right: 16px; }
table.data thead th { border-bottom: 2px solid var(--muted); font-weight: 700; white-space: nowrap; background: #fff; position: sticky; top: 0; }
table.data tbody tr { border-bottom: 1px solid var(--line); }
table.data tbody tr:nth-child(odd) { background: rgb(0 0 0 / 3.5%); }
table.data tbody tr.link-row { cursor: pointer; }
table.data tbody tr.link-row:hover { background: var(--primary-50); }
table.data .num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tfoot td { font-weight: 700; border-top: 2px solid var(--muted); }
table.data td a { font-weight: 700; }
table.data .sub { display: block; font-size: 14px; color: var(--muted); line-height: 20px; margin-top: 2px; }
table.data .bar-cell { width: 120px; }
.mini-bar { height: 8px; background: var(--primary-50); border-radius: 0 4px 4px 0; position: relative; }
.mini-bar span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--s1); border-radius: 0 4px 4px 0; }
.up { color: var(--error-dark); }
.down { color: var(--success-dark); }

/* --- The wall: where today's budget papers stop --- */
.the-wall { position: relative; margin: 40px 0 32px; padding: 28px 28px 28px 92px; border: 2px dashed #c98500; background: #fffaf0; border-radius: var(--radius); }
.the-wall .wall-icon { position: absolute; left: 24px; top: 26px; width: 48px; height: 48px; border-radius: 50%; background: #1a1a1a; color: #fff; display: grid; place-items: center; }
.the-wall .wall-icon svg { width: 24px; height: 24px; }
.the-wall h3 { margin-bottom: 6px; }
.the-wall p { margin: 0; max-width: 820px; }

/* --- Timeline (Ripple progressive timeline) --- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline > li { position: relative; padding: 0 0 26px 40px; }
.timeline > li::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: -6px; width: 4px; background: var(--line); }
.timeline > li:last-child::before { display: none; }
.timeline > li::after { content: ""; position: absolute; left: 2px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--line); }
.timeline > li.done::before { background: var(--primary); }
.timeline > li.done::after { background: var(--primary); border-color: var(--primary); }
.timeline > li.current::after { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px var(--primary-100); }
.timeline > li.flag::after { border-color: var(--s2); background: var(--s2); }
.tl-title { font-weight: 700; font-size: 16px; line-height: 24px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tl-meta { font-size: 15px; line-height: 22px; color: var(--muted); margin-top: 2px; }
.tl-body { font-size: 15px; line-height: 23px; margin-top: 6px; }

/* Lifecycle dots (compact) */
.lifecycle { display: flex; align-items: center; gap: 0; margin-top: 14px; }
.lifecycle i { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--line); flex: none; }
.lifecycle i.done { background: var(--primary); border-color: var(--primary); }
.lifecycle i.now { background: #fff; border: 3px solid var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.lifecycle b { height: 2px; background: var(--line); flex: 1; min-width: 10px; }
.lifecycle b.done { background: var(--primary); }
.lifecycle-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }

/* Big lifecycle stepper on the tender page */
.stepper { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; margin: 8px 0 0; counter-reset: step; }
.step { position: relative; padding-top: 34px; text-align: center; font-size: 14px; line-height: 19px; font-weight: 700; color: var(--muted); }
.step::before { content: ""; position: absolute; top: 12px; left: -50%; right: 50%; height: 4px; background: var(--line); }
.step:first-child::before { display: none; }
.step::after { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid var(--line); font-size: 13px; line-height: 22px; color: var(--muted); }
.step.done { color: var(--text); }
.step.done::before { background: var(--primary); }
.step.done::after { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.now { color: var(--primary); }
.step.now::before { background: var(--primary); }
.step.now::after { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--primary-100); }
.step small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
@media (max-width: 767px) { .stepper { grid-template-columns: 1fr; text-align: left; } .step { text-align: left; padding: 0 0 14px 40px; } .step::before { display: none; } .step::after { left: 0; transform: none; } }

/* --- Key / value list --- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; font-size: 16px; line-height: 24px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: #fff; }
.panel + .panel { margin-top: 24px; }
.panel h3 { margin-bottom: 16px; }
.panel.tint { background: var(--neutral); border-color: var(--neutral); }

/* --- Meter --- */
.meter { height: 12px; background: var(--primary-50); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--s1); border-radius: 999px; }
.meter.ok span { background: var(--success); }

/* --- Charts --- */
.chart { position: relative; }
.chart-title { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.chart-sub { font-size: 15px; color: var(--muted); margin-bottom: 16px; }
.chart-foot { font-size: 14px; line-height: 20px; color: var(--muted); margin-top: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; color: var(--text-2); margin-bottom: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.legend i.line { height: 3px; width: 18px; border-radius: 2px; }

.treemap { position: relative; width: 100%; height: 540px; user-select: none; }
@media (max-width: 767px) { .treemap { height: 520px; } }
.tm-tile { position: absolute; background: var(--primary); color: #fff; border-radius: 3px; overflow: hidden; cursor: pointer; transition: background 0.15s, transform 0.15s; display: flex; flex-direction: column; justify-content: space-between; padding: 12px 14px; text-decoration: none; }
.tm-tile:hover, .tm-tile:focus-visible { background: var(--primary-alt); }
.tm-tile.emph { background: var(--s2); }
.tm-tile.emph:hover { background: #b65300; }
.tm-tile.ctx { background: #8592a6; }
.tm-name { font-weight: 700; font-size: 15px; line-height: 19px; }
.tm-val { font-size: 15px; line-height: 20px; opacity: 0.95; }
.tm-big .tm-name { font-size: 19px; line-height: 24px; }
.tm-big .tm-val { font-size: 26px; line-height: 32px; font-weight: 700; }
.tm-tile.tiny { padding: 4px 6px; }

.barlist { display: grid; gap: 14px; }
.barlist .row { display: grid; grid-template-columns: minmax(140px, 260px) 1fr; gap: 16px; align-items: center; }
.barlist .lbl { font-size: 15px; line-height: 20px; }
.barlist .lbl small { display: block; color: var(--muted); font-size: 14px; }
.barlist .track { position: relative; height: 24px; display: flex; align-items: center; }
.barlist .bar { height: 22px; background: var(--s1); border-radius: 0 4px 4px 0; min-width: 2px; transition: width 0.5s ease; }
.barlist .bar.emph { background: var(--s2); }
.barlist .bar.ctx { background: var(--s-context); }
.barlist .val { margin-left: 10px; font-size: 16px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.barlist .row.clickable { cursor: pointer; border-radius: 4px; }
.barlist .row.clickable:hover .lbl { text-decoration: underline; color: var(--primary); }
@media (max-width: 575px) { .barlist .row { grid-template-columns: 1fr; gap: 4px; } }

svg.viz text { font-family: var(--font); fill: var(--muted); font-size: 13px; }
svg.viz .axis-line { stroke: var(--axis); stroke-width: 1; }
svg.viz .grid-line { stroke: var(--grid); stroke-width: 1; }

.tooltip { position: fixed; z-index: 200; pointer-events: none; background: #fff; color: var(--text); border: 1px solid var(--line-2); box-shadow: var(--elev-2); border-radius: var(--radius); padding: 10px 14px; font-size: 15px; line-height: 21px; max-width: 320px; opacity: 0; transition: opacity 0.1s; }
.tooltip.show { opacity: 1; }
.tooltip strong { font-size: 18px; display: block; }
.tooltip .tt-row { display: flex; gap: 8px; align-items: center; }
.tooltip .tt-key { width: 14px; height: 3px; border-radius: 2px; flex: none; }

/* --- Feed list --- */
.feed { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.feed li { border-bottom: 1px solid var(--line); }
.feed a { display: grid; grid-template-columns: 120px 1fr auto; gap: 20px; padding: 18px 4px; text-decoration: none; color: var(--text); align-items: center; }
.feed a:hover { background: var(--primary-50); }
.feed a:hover .feed-title { text-decoration: underline; color: var(--primary); }
.feed-date { font-size: 15px; color: var(--muted); }
.feed-type { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--muted); }
.feed-title { font-weight: 700; font-size: 16px; line-height: 23px; }
@media (max-width: 767px) { .feed a { grid-template-columns: 1fr; gap: 6px; } }

/* --- Cabinet document viewer --- */
.doc-layout { display: grid; gap: 32px; }
@media (min-width: 1100px) { .doc-layout { grid-template-columns: minmax(0, 1fr) 360px; } }
.paper { background: #fff; border: 1px solid var(--line); box-shadow: var(--elev-1); padding: 56px 64px; font-family: Georgia, "Times New Roman", serif; font-size: 16px; line-height: 26px; color: #222; position: relative; }
@media (max-width: 767px) { .paper { padding: 32px 22px; } }
.paper + .paper { margin-top: 28px; }
.paper.sample-doc { overflow: hidden; }
/* concept watermark removed at Mark's request; disclosure is in the phase banner */
.paper.sample-doc::after { display: none; content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-28deg); font-family: var(--font); font-size: 150px; font-weight: 700; letter-spacing: 0.08em; color: rgb(0 0 0 / 4.5%); pointer-events: none; white-space: nowrap; }
.paper .classif { font-family: var(--font); text-align: center; font-size: 13px; letter-spacing: 0.14em; font-weight: 700; color: #595959; margin-bottom: 28px; }
.paper .classif s { color: #6b6b6b; }
.paper h4 { font-family: var(--font); font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; color: #444; margin: 26px 0 8px; }
.paper .doc-title { font-family: var(--font); font-size: 24px; line-height: 30px; font-weight: 700; color: #111; margin-bottom: 6px; }
.paper ol, .paper ul { padding-left: 24px; margin: 0 0 12px; }
.paper li { margin-bottom: 6px; }
.stamp { position: absolute; top: 34px; right: 34px; border: 3px solid var(--success); color: var(--success); font-family: var(--font); font-weight: 700; font-size: 12px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 10px; transform: rotate(4deg); text-align: center; background: rgb(255 255 255 / 80%); }
@media (max-width: 767px) { .stamp { position: static; display: inline-block; margin-bottom: 16px; transform: none; } }
.redact { background: #111; color: transparent; border-radius: 1px; padding: 0 2px; cursor: help; position: relative; user-select: none; }
.redact::after { content: attr(data-code); position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-family: var(--font); font-size: 11px; line-height: 14px; color: #fff; background: #a84b00; padding: 0 5px; border-radius: 2px; font-weight: 700; }
.redact:hover, .redact:focus-visible { outline: 3px solid var(--s2); }
.redaction-key { font-size: 15px; line-height: 22px; }
.redaction-key .code { display: inline-block; min-width: 34px; text-align: center; background: #a84b00; color: #fff; font-weight: 700; border-radius: 2px; padding: 0 6px; margin-right: 8px; font-size: 13px; }
.redaction-key li { margin-bottom: 12px; list-style: none; }
.redaction-key ul, ul.redaction-key { padding: 0; margin: 0; }
.sealed { display: grid; place-items: center; text-align: center; min-height: 420px; background: repeating-linear-gradient(45deg, #f5f5f5, #f5f5f5 14px, #efefef 14px, #efefef 28px); border: 1px solid var(--line); }
.sealed .inner { background: #fff; padding: 32px 36px; max-width: 560px; border: 1px solid var(--line); }

/* Era cards (archive) */
.eras { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.era { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.era-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line-2); }
.era-years { font-size: 15px; color: var(--muted); font-weight: 700; }
.era-name { font-size: 19px; line-height: 25px; font-weight: 700; margin-top: 4px; }
.era-body { padding: 16px 22px 22px; display: grid; gap: 10px; font-size: 15px; line-height: 22px; flex: 1; }
.era-row { display: flex; justify-content: space-between; gap: 12px; }
.era-row span:first-child { color: var(--muted); }
.era-row span:last-child { font-weight: 700; text-align: right; }
.strike { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); font-weight: 400 !important; }

/* Countdown chips */
.countdown { font-variant-numeric: tabular-nums; }

/* Code blocks (API page) */
pre.code { background: #0d1b2e; color: #e6eef9; padding: 20px 22px; border-radius: var(--radius); overflow-x: auto; font-size: 14px; line-height: 21px; font-family: "SF Mono", Menlo, Consolas, monospace; margin: 0; }
pre.code .k { color: #7fc4ff; }
pre.code .s { color: #ffd38a; }
pre.code .c { color: #8a9bb3; }

/* Architecture diagram */
.arch { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 992px) { .arch { grid-template-columns: 1fr 48px 1fr 48px 1fr; } }
.arch-col { display: grid; gap: 10px; align-content: start; }
.arch-col h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 4px; }
.arch-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: #fff; font-size: 16px; line-height: 22px; }
.arch-box b { display: block; }
.arch-box small { color: var(--muted); font-size: 14px; }
.arch-box.core { border-color: var(--primary); background: var(--primary-50); }
.arch-arrow { display: grid; place-items: center; color: var(--primary); }
.arch-arrow svg { width: 32px; height: 32px; }
@media (max-width: 991px) { .arch-arrow svg { transform: rotate(90deg); } }

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgb(26 26 26 / 55%); z-index: 300; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: var(--radius); max-width: 560px; width: 100%; padding: 32px; box-shadow: var(--elev-2); position: relative; }
.modal h2 { margin-bottom: 12px; }
.modal .close { position: absolute; top: 12px; right: 12px; background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; padding: 8px; color: var(--muted); }

/* Footer (Ripple footer, own content) */
.site-footer { background: var(--primary-alt); color: #fff; border-top: 2px solid var(--primary-alt); margin-top: 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-top { display: grid; gap: 28px; padding: 48px 0 32px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-top h3 { font-size: 16px; margin-bottom: 14px; }
.footer-top ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 15px; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / 25%); padding: 24px 0 32px; display: grid; gap: 16px; font-size: 15px; line-height: 22px; }
.footer-core { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-note { margin: 0; opacity: 0.9; }
.footer-auth { margin: 0; font-size: 14px; line-height: 21px; color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .ym-mark { width: 30px; height: 30px; }
.footer-brand .wm { font-size: 21px; }

/* Shortcut help */
.kbd { display: inline-block; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 6px; font-size: 14px; font-family: "SF Mono", Menlo, monospace; background: #fff; }

/* Empty state */
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Page transitions */
main { min-height: 60vh; }
.view-enter > * { animation: fadeUp 0.5s cubic-bezier(.16, 1, .3, 1) both; }
.view-enter > :nth-child(2) { animation-delay: 50ms; }
.view-enter > :nth-child(3) { animation-delay: 100ms; }
.view-enter > :nth-child(4) { animation-delay: 150ms; }
.view-enter > :nth-child(n+5) { animation-delay: 200ms; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view-enter > * { animation: none; } html { scroll-behavior: auto; } .tm-tile, .barlist .bar { transition: none; } }

/* Presentation mode: bigger type for projectors (toggle with the P key) */
html.present { zoom: 1.25; }

@media print {
  .proto-banner { background: #fff; color: #000; border-bottom: 2px solid #000; }
  .site-header, .site-footer .footer-top { display: none; }
  .page-header { margin-top: 0; padding-top: 24px; }
}

/* ==========================================================================
   v2 additions: dark home hero, live spending feed, pop-ups, receipts, ledger
   ========================================================================== */
.hero-dark { position: relative; margin-top: -76px; padding: 150px 0 72px; background: radial-gradient(1200px 500px at 85% 20%, rgb(0 163 161 / 18%), transparent 60%), linear-gradient(160deg, #0f2342 0%, #132c52 55%, #0d1f3c 100%); color: #fff; overflow: hidden; }
.hero-dark::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--gradient); }
.hero-dark::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: 40px; align-items: center; }
@media (min-width: 1100px) { .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; } }
@media (min-width: 992px) { .hero-dark { padding: 148px 0 72px; } }
.hero-dark .eyebrow { color: #9fd9d6; }
.hero-title { font-size: 46px; line-height: 1.04; font-weight: 700; letter-spacing: -0.02em; margin: 14px 0 20px; }
@media (min-width: 992px) { .hero-title { font-size: 64px; } }
.hero-title em { font-style: normal; background: linear-gradient(90deg, #7fcfa6, #f2c14e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: 18px; line-height: 28px; max-width: 620px; color: rgb(255 255 255 / 88%); margin: 0 0 28px; }
.hero-dark .search-box { border-color: #fff; }
.hero-dark .search-box button { background: var(--gold); color: #1a1a1a; }
.hero-dark .search-hints { color: rgb(255 255 255 / 70%); }
.hero-dark .search-hints a, .hero-dark .journey a { color: #fff; }
.live-card { background: rgb(255 255 255 / 6%); border: 1px solid rgb(255 255 255 / 16%); border-radius: 12px; padding: 24px; backdrop-filter: blur(4px); }
.live-head { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; display: flex; align-items: center; gap: 10px; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: #9fd9d6; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 0 rgb(61 220 151 / 60%); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(61 220 151 / 55%); } 70% { box-shadow: 0 0 0 10px rgb(61 220 151 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(61 220 151 / 0%); } }
.live-big { font-size: 52px; line-height: 1.05; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; margin: 8px 0 2px; }
@media (min-width: 992px) { .live-big { font-size: 56px; } }
.live-sub { color: rgb(255 255 255 / 80%); font-size: 15px; }
.live-sub b { color: #fff; font-variant-numeric: tabular-nums; }
.mini-feed { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; min-height: 124px; align-content: start; }
.mini-feed li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; background: rgb(255 255 255 / 8%); border-radius: 8px; padding: 10px 12px; animation: slideIn 0.45s ease; cursor: pointer; }
.mini-feed li:hover { background: rgb(255 255 255 / 14%); }
.mini-feed .mf-desc { font-size: 15px; line-height: 20px; font-weight: 700; }
.mini-feed .mf-meta { font-size: 13px; line-height: 18px; color: rgb(255 255 255 / 70%); }
.mini-feed .mf-amt { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 17px; }
.live-foot { font-size: 13px; line-height: 18px; color: rgb(255 255 255 / 62%); margin-top: 14px; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.cat-ic { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.cat-ic svg { width: 18px; height: 18px; }

/* Spotlight cards (real facts) */
.spot-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .spot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.spot { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 26px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.spot::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--gradient-v); }
.spot-fig { font-size: 34px; line-height: 1.1; font-weight: 700; color: var(--primary); margin: 6px 0 10px; letter-spacing: -0.01em; }
.spot p { margin: 0; }
.spot .src { margin-top: auto; padding-top: 16px; font-size: 13px; line-height: 18px; color: var(--muted); }

/* Live feed page (bank-feed style) */
.feed-layout { display: grid; gap: 32px; }
@media (min-width: 1100px) { .feed-layout { grid-template-columns: minmax(0, 1fr) 340px; } }
.txn-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #fff; }
.txn { display: grid; grid-template-columns: 104px 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.txn:last-child { border-bottom: 0; }
.txn:hover, .txn:focus-visible { background: var(--primary-50); }
.txn.new { animation: txnIn 0.7s ease; }
@keyframes txnIn { from { background: #fff7d6; opacity: 0; transform: translateY(-8px); } 40% { background: #fff7d6; opacity: 1; transform: none; } to { background: #fff; } }
.txn-time { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.txn-desc { font-weight: 700; font-size: 17px; line-height: 23px; }
.txn-meta { font-size: 14px; line-height: 20px; color: var(--muted); }
.txn-amt { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.txn-amt small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .txn { grid-template-columns: 40px minmax(0, 1fr); } .txn-time { display: none; } .txn-amt { grid-column: 2; text-align: left; } }
.feed-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--primary); background: #fff; color: var(--primary); border-radius: 999px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
.pill-btn[aria-pressed="true"] { background: var(--primary); color: #fff; }

/* Pop-up notifications */
.toasts { position: fixed; left: 20px; bottom: 20px; z-index: 250; display: flex; flex-direction: column-reverse; gap: 10px; width: min(400px, calc(100vw - 40px)); pointer-events: none; }
.toast { pointer-events: auto; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; background: #0f2342; color: #fff; border-radius: 10px; padding: 14px 16px; box-shadow: 0 10px 30px rgb(15 35 66 / 35%); animation: toastIn 0.4s cubic-bezier(.2,.9,.3,1.2); cursor: pointer; border-left: 4px solid var(--gold); }
.toast.out { animation: toastOut 0.35s ease forwards; }
.toast-dept { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: #9fd9d6; font-weight: 700; }
.toast-desc { font-size: 15px; line-height: 20px; font-weight: 700; margin: 2px 0; }
.toast-amt { font-size: 15px; color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-24px); } }

/* Receipt (tax invoice) */
.receipt { font-size: 15px; line-height: 22px; }
.receipt-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--text); padding-bottom: 12px; margin-bottom: 12px; }
.receipt h2 { font-size: 22px; line-height: 28px; margin: 0; }
.receipt table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.receipt td, .receipt th { padding: 6px 0; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.receipt .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.receipt .tot td { border-bottom: 0; font-weight: 700; font-size: 17px; }
.receipt dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 0; }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-weight: 700; }
.modal.wide { max-width: 680px; }

/* General ledger */
table.ledger td.code, table.ledger th.code { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 14px; color: var(--muted); width: 72px; }
table.ledger tr.group td { background: var(--primary-50); font-weight: 700; color: var(--primary); text-transform: uppercase; font-size: 13px; letter-spacing: 0.06em; }
table.ledger tbody tr.group:nth-child(odd) { background: var(--primary-50); }
.ledger-note { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 13px; color: var(--muted); }
.hero-grid > * { min-width: 0; }
.chip.real { white-space: normal; background: transparent; border-color: var(--line); color: var(--muted); font-weight: 400; }
.chip.real svg { color: var(--success); }

/* ==========================================================================
   v3: live map, odometer, animated spotlight charts (docs/MOTION-PLAN.md)
   ========================================================================== */
.live-card { position: relative; }

/* Odometer */
.odo { display: inline-flex; align-items: flex-start; line-height: 1.08; transform-origin: left 60%; }
.odo-d { display: inline-block; height: 1.08em; overflow: hidden; }
.odo-s { display: block; will-change: transform; }
.odo-s > span { display: block; height: 1.08em; line-height: 1.08em; }
.odo-c { display: inline-block; height: 1.08em; }
.odo.kick { animation: kick 0.3s cubic-bezier(.3, 1.6, .5, 1); }
.odo.kick .odo-cur { animation: curFlash 0.5s ease; }
@keyframes kick { 0% { transform: scale(1); } 35% { transform: scale(1.035); } 100% { transform: scale(1); } }
@keyframes curFlash { 0%, 30% { color: var(--gold); } 100% { color: inherit; } }
.live-pop { position: absolute; z-index: 3; font-size: 18px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; animation: livePop 0.95s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes livePop { 0% { opacity: 0; transform: translate(-6px, 8px) scale(0.8); } 20% { opacity: 1; transform: translate(0, 0) scale(1.12); } 35% { transform: translate(2px, -6px) scale(1); } 100% { opacity: 0; transform: translate(10px, -26px) scale(1); } }
.ym-pulse { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px 3px rgb(242 193 78 / 55%); z-index: 3; pointer-events: none; opacity: 0; }

/* Live map */
.live-map { position: relative; margin: 16px -6px 0; }
.live-map canvas { position: absolute; inset: 0; display: block; }
.map-callout { position: absolute; z-index: 2; background: #fff; color: var(--text); border-radius: 6px; padding: 6px 10px 6px; font-size: 13px; line-height: 17px; white-space: nowrap; box-shadow: 0 6px 18px rgb(0 0 0 / 30%); pointer-events: none; transform-origin: var(--tip, 50%) 100%; animation: calloutIn 0.26s cubic-bezier(.3, 1.5, .5, 1) both; }
.map-callout b { color: var(--primary); font-variant-numeric: tabular-nums; margin-right: 2px; }
.map-callout span { display: block; font-size: 11px; line-height: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; margin-top: 1px; }
.map-callout::after { content: ""; position: absolute; left: var(--tip, 50%); bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: #fff; transform: rotate(45deg); }
.map-callout.below { transform-origin: var(--tip, 50%) 0; }
.map-callout.below::after { bottom: auto; top: -5px; }
.map-callout.out { animation: calloutOut 0.3s ease forwards; }
.map-callout.still { animation: none; }
@keyframes calloutIn { 0% { opacity: 0; transform: scale(0.85); } 70% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }
@keyframes calloutOut { to { opacity: 0; transform: translateY(-8px); } }

/* Spotlight charts */
.spot-viz { margin: 2px 0 14px; }
.sv-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; line-height: 16px; color: var(--muted); font-weight: 700; margin-top: 8px; }
.sv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sv-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--gold); }
.sv-legend i.was { background: var(--primary); }
.sv-legend i.ghost { background: none; border: 2px solid var(--primary-200); border-radius: 50%; }
.sv-legend i.k, .is-gauge .sv-legend i:not(.ghost) { background: #e36c0a; }

.sv-bars { display: grid; gap: 7px; }
.sv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lbl val" "track track"; gap: 2px 10px; align-items: end; }
.sv-lbl { grid-area: lbl; font-size: 13px; line-height: 17px; color: var(--text-2); }
.sv-val { grid-area: val; font-size: 13px; line-height: 17px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; opacity: 0; transform: translateY(4px) scale(0.9); transition: opacity 0.2s, transform 0.3s cubic-bezier(.3, 1.6, .5, 1); }
.sv-val.pop { opacity: 1; transform: none; }
.sv-track { grid-area: track; position: relative; height: 10px; background: var(--neutral); border-radius: 2px; overflow: hidden; }
.sv-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--primary-200); border-radius: 2px; }
.sv-row.hi .sv-bar { background: linear-gradient(90deg, var(--primary), #0080a8 60%, var(--accent)); }
.sv-row.hi .sv-val { color: var(--primary); }
.sv-flat { position: absolute; left: 0; top: 4px; width: 3px; height: 2px; background: var(--muted); }

.sv-people { display: flex; flex-wrap: wrap; gap: 3px 4px; }
.sv-p { width: 11px; height: 15px; display: inline-block; opacity: 0; transform: scale(0); }
.sv-p svg { width: 100%; height: 100%; display: block; fill: var(--gold); }
.sv-p.was { opacity: 1; transform: none; }
.sv-p.was svg { fill: var(--primary); }
.sv-p.in { animation: personIn 0.32s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes personIn { 0% { opacity: 0; transform: translateY(4px) scale(0); } 60% { opacity: 1; transform: translateY(-1px) scale(1.25); } 100% { opacity: 1; transform: none; } }

.sv-gauge svg { width: 132px; height: 75px; display: block; overflow: visible; }
.g-track, .g-fill { fill: none; stroke-width: 10; }
.g-track { stroke: var(--neutral); }
.g-fill { stroke: #e36c0a; }
.g-ghost { stroke: var(--primary); stroke-width: 2; stroke-dasharray: 2 2; }
.g-needle { stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; transform-box: view-box; transform-origin: 60px 62px; }
.g-hub { fill: var(--text); }

.sv-waffle { display: grid; grid-template-columns: repeat(25, minmax(0, 1fr)); gap: 2px; max-width: 250px; }
.sv-waffle i { display: block; aspect-ratio: 1; border-radius: 1px; background: var(--line-2); }
.sv-waffle i.k.in { animation: cellIn 0.4s ease forwards; }
@keyframes cellIn { 0% { background: var(--gold); transform: scale(1.5); } 100% { background: #e36c0a; transform: none; } }

/* Big figure: anticipation and landing */
.spot-fig { transform-origin: left 70%; transition: transform 0.08s ease-out; font-variant-numeric: tabular-nums; }
.spot-fig.anticipate { transform: scale(0.97); }
.spot-fig.land { animation: figLand 0.28s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes figLand { 0% { transform: scale(1); } 45% { transform: scale(1.05); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .odo.kick, .odo.kick .odo-cur, .spot-fig.land, .sv-p.in, .sv-waffle i.k.in, .map-callout { animation: none; }
  .sv-p.in { opacity: 1; transform: none; }
  .sv-waffle i.k.in { background: #e36c0a; }
  .sv-val { transition: none; }
}
@media print { .sv-p, .sv-val { opacity: 1; transform: none; } .sv-waffle i.k { background: #e36c0a; } }

/* ---------- Guided tour ---------- */
.tour-ring { position: fixed; z-index: 390; pointer-events: none; border: 3px solid var(--gold); border-radius: 10px; box-shadow: 0 0 0 200vmax rgb(10 22 44 / 46%); opacity: 0; transition: opacity 0.3s; }
.tour-ring.moving { transition: left 0.35s cubic-bezier(.2,.8,.2,1), top 0.35s cubic-bezier(.2,.8,.2,1), width 0.35s cubic-bezier(.2,.8,.2,1), height 0.35s cubic-bezier(.2,.8,.2,1), opacity 0.3s; }
.tour-card { position: fixed; z-index: 400; right: 24px; bottom: 24px; width: min(420px, calc(100vw - 32px)); background: #fff; color: var(--text); border-radius: 12px; box-shadow: 0 18px 50px rgb(10 22 44 / 35%); padding: 20px 22px 18px; border-top: 6px solid transparent; border-image: var(--gradient) 1; opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity 0.3s, transform 0.3s; }
.tour-card.show { opacity: 1; transform: none; pointer-events: auto; }
.tour-top { display: flex; justify-content: space-between; align-items: center; }
.tour-count { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tour-x { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; }
.tour-title { font-size: 22px; line-height: 28px; margin: 6px 0 8px; color: var(--primary); }
.tour-text { font-size: 16px; line-height: 24px; margin: 0 0 10px; }
.tour-note { font-size: 13px; line-height: 18px; margin: 0 0 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.tour-note::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tour-note-real::before { background: var(--success); }
.tour-note-illus::before { background: var(--gold); }
.tour-progress { height: 4px; background: var(--primary-50); border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.tour-progress span { display: block; height: 100%; background: var(--primary); transition: width 0.4s; }
.tour-btns { display: flex; justify-content: space-between; gap: 12px; }
.tour-fab { position: fixed; z-index: 240; right: 22px; bottom: 22px; display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: #fff; border: 2px solid #fff; border-radius: 999px; padding: 11px 18px; font-weight: 700; font-size: 15px; cursor: pointer; box-shadow: 0 8px 24px rgb(10 22 44 / 30%); }
.tour-fab:hover { background: var(--primary-alt); }
.tour-fab svg { width: 18px; height: 18px; }
body.touring .tour-fab { display: none; }
.hero-tour { margin-top: 22px; display: inline-flex; align-items: center; gap: 10px; background: transparent; color: #fff; border: 2px solid rgb(255 255 255 / 70%); border-radius: 999px; padding: 10px 18px; font-weight: 700; cursor: pointer; }
.hero-tour:hover { background: rgb(255 255 255 / 10%); border-color: #fff; }
@media (max-width: 640px) { .tour-card { right: 8px; left: 8px; bottom: 8px; width: auto; padding: 14px 16px 12px; } .tour-title { font-size: 18px; line-height: 23px; margin: 2px 0 4px; } .tour-text { font-size: 15px; line-height: 21px; margin-bottom: 6px; } .tour-note { margin-bottom: 8px; } .tour-progress { margin-bottom: 10px; } .tour-fab { right: 12px; bottom: 12px; } }
@media (prefers-reduced-motion: reduce) { .tour-ring, .tour-card { transition: none; } }

/* ---------- Who gets paid what (real pay comparison) ---------- */
.pay-compare { border: 1px solid var(--line); border-radius: 10px; padding: 28px; margin-bottom: 40px; background: #fff; }
.pay-rows { display: grid; gap: 12px; }
.pay-row { display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: 16px; align-items: center; }
.pay-lbl { font-size: 16px; line-height: 21px; }
.pay-lbl small { display: block; font-size: 13px; color: var(--muted); }
.pay-track { position: relative; height: 26px; background: linear-gradient(90deg, var(--line-2) 1px, transparent 1px) 0 0 / 27.78% 100%; }
.pay-bar { position: absolute; top: 3px; height: 20px; border-radius: 0 4px 4px 0; }
.pay-bar.school { background: var(--s1); }
.pay-bar.exec { background: var(--s2); border-radius: 4px; }
.pay-val { position: absolute; top: 3px; font-weight: 700; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pay-axis { position: relative; height: 20px; margin: 6px 0 0 calc(min(300px, 40%) + 16px); font-size: 13px; color: var(--muted); }
.pay-axis span { position: absolute; transform: translateX(-50%); }
.pay-axis span:first-child { transform: none; }
@media (max-width: 700px) { .pay-row { grid-template-columns: 1fr; gap: 4px; } .pay-axis { margin-left: 0; } .pay-compare { padding: 18px; } }
