/* =====================================================================
   AUDIT SIMULATION - design system
   Professional enterprise aesthetic: light surfaces, strong type,
   restrained colour, subtle borders, dense but legible tables.
   ===================================================================== */
:root {
  --ink: #0e1726;
  --ink-2: #334155;
  --ink-3: #5b6678;
  --ink-4: #8a94a6;
  --line: #e2e6ed;
  --line-2: #eef1f5;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --brand: #13294b;       /* deep navy */
  --brand-2: #1d3f72;
  --accent: #1f5fae;      /* restrained blue */
  --accent-soft: #eaf1fb;
  --ok: #1d7a4f;   --ok-soft: #e7f4ee;
  --warn: #a45b05; --warn-soft: #fcf1e3;
  --bad: #b42318;  --bad-soft: #fdecea;
  --violet: #5b3fa8; --violet-soft: #f0ecfa;
  --info: #0f6b84; --info-soft: #e5f3f7;
  --neutral-soft: #f1f3f6;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(14, 23, 38, .04), 0 1px 1px rgba(14, 23, 38, .03);
  --shadow-lg: 0 8px 24px rgba(14, 23, 38, .06), 0 1px 2px rgba(14, 23, 38, .04);
  --font: 'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sidebar: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: 24px; font-weight: 650; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
p { margin: 0 0 10px; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.xs { font-size: 11.5px; }
.upper { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 6px } .mt-2 { margin-top: 12px } .mt-3 { margin-top: 20px } .mt-4 { margin-top: 32px }
.mb-1 { margin-bottom: 6px } .mb-2 { margin-bottom: 12px } .mb-3 { margin-bottom: 20px }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 16px; }
.hide-sm { }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Brand mark ---------- */
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; }
.brand-mark { width: 30px; height: 30px; border-radius: 5px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; letter-spacing: .04em; }
.brand-text { line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 13.5px; letter-spacing: .14em; }
.brand-by { font-size: 11px; color: var(--ink-3); letter-spacing: .01em; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 550 13px/1 var(--font); cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: #f8fafc; border-color: #cfd6e0; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: #1a529a; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--neutral-soft); }
.btn-danger { color: var(--bad); border-color: #f1c9c4; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #17663f; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-dashed { border-style: dashed; color: var(--ink-3); background: #fbfcfd; }
.btn i { font-size: 12px; }

/* ---------- Pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.no-dot::before { display: none; }
.tone-neutral { background: var(--neutral-soft); color: var(--ink-3); border-color: #e4e8ee; }
.tone-info { background: var(--info-soft); color: var(--info); }
.tone-accent { background: var(--accent-soft); color: var(--accent); }
.tone-violet { background: var(--violet-soft); color: var(--violet); }
.tone-warn { background: var(--warn-soft); color: var(--warn); }
.tone-ok { background: var(--ok-soft); color: var(--ok); }
.tone-bad { background: var(--bad-soft); color: var(--bad); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 11px; font-weight: 600; border: 1px solid var(--line); color: var(--ink-3); background: #fff; letter-spacing: .02em; white-space: nowrap; }
.tag-dark { background: var(--brand); color: #fff; border-color: var(--brand); }
.tag-lock { color: var(--ink-4); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 700; background: var(--warn-soft); color: var(--warn); }
.count.zero { background: var(--neutral-soft); color: var(--ink-4); }

/* ---------- Cards / panels ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-h h2, .card-h h3 { font-size: 14px; }
.card-b { padding: 18px; }
.card-b.tight { padding: 0; }
.card-f { padding: 12px 18px; border-top: 1px solid var(--line-2); background: #fbfcfd; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 12px; }
.section-title h2 { font-size: 15px; }
.note-box { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: #fbfcfe; padding: 12px 14px; border-radius: var(--radius); color: var(--ink-2); font-size: 13px; }
.note-box.warn { border-left-color: var(--warn); background: #fffaf3; }
.note-box.ok { border-left-color: var(--ok); background: #f6fbf8; }
.note-box.future { border-left-color: var(--ink-4); background: #fafbfc; }
.divider { height: 1px; background: var(--line-2); margin: 16px 0; border: 0; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main-side { grid-template-columns: minmax(0, 1fr) 340px; }

/* ---------- Key/value ---------- */
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink); font-weight: 500; }

/* ---------- KPI strip ---------- */
.kpis { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.kpi { padding: 14px 16px; border-right: 1px solid var(--line-2); min-width: 0; }
.kpi:last-child { border-right: 0; }
.kpi-label { font-size: 11.5px; color: var(--ink-3); font-weight: 550; display: flex; align-items: center; gap: 6px; line-height: 1.3; min-height: 15px; }
.kpi-label .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.kpi-value { font-size: 24px; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.kpi.alert .kpi-value { color: var(--warn); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.t th { text-align: left; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 10px 14px; background: #fafbfc; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: #fafcff; }
table.t td.wp-id { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--brand); white-space: nowrap; }
table.t tr.locked td { color: var(--ink-4); background: #fcfcfd; }
table.t tr.group td { background: #f7f8fa; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 650; color: var(--ink-3); padding: 8px 14px; }
.t-title { font-weight: 600; color: var(--ink); }
.t-sub { font-size: 12px; color: var(--ink-3); }

/* ---------- Forms ---------- */
label.lbl { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input, .select, .textarea { width: 100%; border: 1px solid #d5dbe4; border-radius: var(--radius); background: #fff; padding: 8px 11px; font: 13.5px/1.45 var(--font); color: var(--ink); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 95, 174, .12); }
.textarea { min-height: 120px; resize: vertical; }
.textarea[readonly], .input[readonly] { background: #f8f9fb; color: var(--ink-2); }
.field + .field { margin-top: 14px; }
.help { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--brand); width: 15px; height: 15px; flex: none; }
.check.disabled { cursor: default; }

/* ---------- Flash ---------- */
.flash { padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; border: 1px solid; display: flex; gap: 10px; align-items: center; }
.flash.ok { background: var(--ok-soft); border-color: #c5e5d4; color: #145a3a; }
.flash.err { background: var(--bad-soft); border-color: #f4c7c1; color: #8f1d14; }

/* =====================================================================
   PUBLIC / MARKETPLACE
   ===================================================================== */
.pub-header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.96); backdrop-filter: saturate(160%) blur(6px); border-bottom: 1px solid var(--line); }
.pub-header .inner { max-width: 1200px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.pub-nav { display: flex; gap: 22px; margin-left: 12px; }
.pub-nav a { color: var(--ink-2); font-weight: 550; font-size: 13.5px; }
.pub-nav a:hover { color: var(--ink); text-decoration: none; }
.pub-main { background: #fff; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.hero { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fbfcfd 0%, #fff 100%); }
.hero .wrap { padding-top: 72px; padding-bottom: 64px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1.12; letter-spacing: -0.015em; margin: 14px 0 18px; }
.hero p.lead { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 600px; }
.hero-panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-lg); overflow: hidden; }
.hero-panel .hp-h { padding: 12px 16px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; background: #fafbfc; }
.hero-panel table.t td { padding: 9px 14px; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.pillar { padding: 28px 24px; border-right: 1px solid var(--line-2); }
.pillar:last-child { border-right: 0; }
.pillar .n { font-family: var(--mono); font-size: 12px; color: var(--ink-4); }
.pillar h3 { font-size: 15px; margin: 8px 0 6px; }
.pillar p { color: var(--ink-3); font-size: 13.5px; margin: 0; }
.pub-section { padding: 64px 0; }
.pub-section.alt { background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pub-section h2.big { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: -0.01em; margin: 8px 0 10px; }
.pub-section .intro { color: var(--ink-3); max-width: 720px; font-size: 15px; }

.prog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.prog-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; padding: 22px 22px 18px; color: var(--ink); text-decoration: none !important; transition: border-color .15s, box-shadow .15s; min-height: 292px; }
.prog-card:hover { border-color: #c3ccd9; box-shadow: var(--shadow-lg); }
.prog-card .pc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.prog-card .pc-code { font-family: var(--mono); font-size: 11.5px; color: var(--ink-4); }
.prog-card h3 { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.2; margin-bottom: 6px; }
.prog-card .pc-sub { color: var(--ink-3); font-size: 13.5px; }
.prog-card .pc-meta { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-2); display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.prog-card .pc-meta b { color: var(--ink-2); font-weight: 600; }
.prog-card .pc-cta { margin-top: 14px; font-weight: 600; font-size: 13px; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.prog-card.available { border-color: #c9d5e6; box-shadow: inset 0 3px 0 var(--brand); }
.prog-card.soon .pc-cta { color: var(--ink-3); }
.status-available { background: var(--ok-soft); color: var(--ok); }
.status-soon { background: var(--neutral-soft); color: var(--ink-3); }

.stage-rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff; }
.stage { padding: 18px 20px; border-right: 1px solid var(--line-2); position: relative; min-width: 0; }
.stage:last-child { border-right: 0; }
.stage .s-n { font-family: var(--mono); font-size: 12px; color: var(--ink-4); display: flex; justify-content: space-between; align-items: center; }
.stage h3 { margin: 8px 0 6px; font-size: 14.5px; }
.stage p { font-size: 12.5px; color: var(--ink-3); margin: 0; }
.stage.active { background: #f7faff; box-shadow: inset 0 3px 0 var(--accent); }
.stage.done { box-shadow: inset 0 3px 0 var(--ok); }
.stage.locked { background: #fbfbfc; }
.stage.locked h3, .stage.locked p { color: var(--ink-4); }

.journey { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 0; counter-reset: j; }
.j-step { position: relative; padding: 0 6px; text-align: center; }
.j-step .j-dot { width: 28px; height: 28px; margin: 0 auto 10px; border-radius: 50%; border: 1.5px solid #cfd6e0; background: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink-3); position: relative; z-index: 1; }
.j-step::before { content: ''; position: absolute; top: 14px; left: -50%; right: 50%; height: 1.5px; background: #dfe4ea; }
.j-step:first-child::before { display: none; }
.j-step .j-name { font-size: 12px; font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.j-step .j-note { font-size: 10.5px; color: var(--ink-4); margin-top: 3px; }
.j-step.done .j-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.j-step.done::before, .j-step.current::before { background: var(--ok); }
.j-step.current .j-dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.j-step.future .j-name { color: var(--ink-3); }

.detail-hero { border-bottom: 1px solid var(--line); background: #fbfcfd; }
.detail-hero .wrap { padding-top: 40px; padding-bottom: 40px; }
.crumbs { font-size: 12.5px; color: var(--ink-3); margin-bottom: 18px; }
.crumbs a { color: var(--ink-3); }
.detail-hero h1 { font-family: var(--serif); font-size: 38px; font-weight: 600; letter-spacing: -0.01em; margin: 10px 0 8px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; padding: 40px 0 72px; }
.detail-sec { padding: 26px 0; border-bottom: 1px solid var(--line-2); }
.detail-sec:first-child { padding-top: 0; }
.detail-sec h2 { font-size: 16px; margin-bottom: 12px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: 14px; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: 8px; width: 9px; height: 5px; border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(-45deg); }
.ticks.two { grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.enrol-box { position: sticky; top: 88px; }
.enrol-box .price { font-size: 13px; color: var(--ink-3); }
.pub-footer { border-top: 1px solid var(--line); background: #fff; }
.pub-footer .wrap { padding: 28px 24px; display: flex; justify-content: space-between; gap: 20px; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }

/* ---------- Sign-in ---------- */
.signin { min-height: calc(100vh - 64px); display: grid; place-items: start center; padding: 56px 20px; background: var(--bg); }
.signin .card { width: 100%; max-width: 760px; }
.acct { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.acct:hover { border-color: #b9c4d4; background: #fbfcfe; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #e8edf5; color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }

/* =====================================================================
   APPLICATION SHELL (candidate + admin)
   ===================================================================== */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.side-top { padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.side-ctx { margin: 14px 12px 4px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fafbfc; font-size: 12px; }
.side-ctx .mono { font-size: 12px; font-weight: 600; color: var(--brand); }
.side-nav { padding: 10px 10px 16px; flex: 1; }
.side-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; font-weight: 650; color: var(--ink-4); padding: 16px 10px 6px; }
.side-link { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--radius); color: var(--ink-2); font-weight: 530; font-size: 13.5px; text-decoration: none !important; }
.side-link i { width: 16px; text-align: center; color: var(--ink-4); font-size: 13px; }
.side-link:hover { background: var(--neutral-soft); color: var(--ink); }
.side-link.active { background: var(--accent-soft); color: var(--brand); font-weight: 620; }
.side-link.active i { color: var(--accent); }
.side-link .count { margin-left: auto; }
.side-link.locked { color: var(--ink-4); }
.side-link.locked .tag { margin-left: auto; height: 18px; font-size: 10px; }
.side-foot { padding: 12px; border-top: 1px solid var(--line-2); }
.side.admin .side-top { background: var(--brand); border-bottom-color: var(--brand); }
.side.admin .side-top .brand, .side.admin .side-top .brand-by { color: #fff; }
.side.admin .side-top .brand-by { opacity: .7; }
.side.admin .side-top .brand-mark { background: #fff; color: var(--brand); }

.topbar { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 28px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.topbar .tb-title { font-size: 13px; color: var(--ink-3); }
.topbar .tb-title b { color: var(--ink); font-weight: 600; }
.topbar .user { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 12.5px; }
.topbar .user .role { font-size: 11px; color: var(--ink-3); }
.menu-btn { display: none; }
.main { padding: 26px 28px 60px; max-width: 1480px; width: 100%; }
.page-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-h .sub { color: var(--ink-3); margin-top: 4px; font-size: 13.5px; }
.demo-banner { background: #fffaf0; border-bottom: 1px solid #f0e0c0; color: #7a4a06; font-size: 12px; padding: 6px 28px; display: flex; gap: 8px; align-items: center; }

/* Engagement header */
.eng-head { display: grid; grid-template-columns: repeat(7, minmax(0, auto)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.eng-head > div { padding: 14px 18px; border-right: 1px solid var(--line-2); min-width: 0; }
.eng-head > div:last-child { border-right: 0; }
.eng-head .l { font-size: 11px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.eng-head .v { font-size: 14px; font-weight: 600; margin-top: 4px; }
.progress { height: 6px; border-radius: 3px; background: #edf0f4; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.progress.ok > span { background: var(--ok); }
.prog-inline { display: flex; align-items: center; gap: 10px; }
.prog-inline .progress { flex: 1; min-width: 60px; }

/* =====================================================================
   WORKPAPER SPLIT WORKSPACE
   ===================================================================== */
.wp-head { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.wp-head .wp-ref { font-family: var(--mono); font-weight: 600; font-size: 13px; color: var(--brand); padding: 3px 8px; border: 1px solid #cfd9e8; border-radius: 4px; background: #f5f8fc; }
.wp-head h1 { font-size: 21px; }
.wp-steps { display: flex; align-items: center; gap: 0; margin-top: 14px; overflow-x: auto; }
.wp-step { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-4); white-space: nowrap; padding-right: 10px; }
.wp-step .d { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #d3d9e2; display: grid; place-items: center; font-size: 10px; font-weight: 700; background: #fff; }
.wp-step + .wp-step::before { content: ''; width: 22px; height: 1.5px; background: #dde2e9; margin-right: 10px; }
.wp-step.done { color: var(--ink-2); }
.wp-step.done .d { background: var(--ok); border-color: var(--ok); color: #fff; }
.wp-step.now { color: var(--ink); font-weight: 650; }
.wp-step.now .d { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.wp-step.warn .d { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }

.split { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pane { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); min-width: 0; }
.pane-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fafbfc; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.pane-h .upper { color: var(--ink-2); }
.pane.guidance { position: sticky; top: 72px; max-height: calc(100vh - 88px); display: flex; flex-direction: column; }
.pane.guidance .pane-body { overflow-y: auto; }
.tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); background: #fff; overflow-x: auto; }
.tab { padding: 10px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0; font-family: inherit; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-panel { display: none; padding: 18px 20px 24px; }
.tab-panel.active { display: block; }
.g-block + .g-block { margin-top: 22px; }
.g-block h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 8px; font-weight: 650; }
.g-block p { color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.std { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.std + .std { margin-top: 10px; }
.std .code { font-family: var(--mono); font-weight: 600; font-size: 12.5px; color: var(--brand); }
.std .rel { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.learn + .learn { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.learn h3 { font-size: 13.5px; margin-bottom: 6px; }
.learn p { color: var(--ink-2); font-size: 13.5px; line-height: 1.65; margin: 0; }
ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; }
ol.steps li { counter-increment: s; position: relative; padding: 10px 0 10px 40px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink-2); }
ol.steps li:last-child { border-bottom: 0; }
ol.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 10px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--ink-4); width: 28px; height: 20px; border: 1px solid var(--line); border-radius: 4px; display: grid; place-items: center; }
.wb-flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wb-flow span { font-size: 11.5px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px; background: #fafbfc; color: var(--ink-2); font-weight: 550; }
.wb-flow i { color: var(--ink-4); font-size: 9px; }

.work-sec { padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.work-sec:last-child { border-bottom: 0; }
.work-sec > h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 12px; font-weight: 650; display: flex; justify-content: space-between; align-items: center; }
.gw-box { border: 1px dashed #c9d2de; border-radius: var(--radius); padding: 14px; background: #fbfcfd; display: flex; gap: 14px; align-items: center; }
.gw-icon { width: 38px; height: 38px; border-radius: 6px; background: #eef2f7; display: grid; place-items: center; color: var(--ink-3); flex: none; }
.rn { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rn + .rn { margin-top: 10px; }
.rn-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; background: #fafbfc; border-bottom: 1px solid var(--line-2); font-size: 12px; flex-wrap: wrap; }
.rn-b { padding: 10px 12px; font-size: 13px; color: var(--ink-2); }
.rn-resp { margin-top: 8px; padding: 8px 10px; background: #f5f8fc; border-left: 2px solid var(--accent); border-radius: 0 4px 4px 0; font-size: 12.5px; }
.rn.open { border-left: 3px solid var(--warn); }
.rn.responded { border-left: 3px solid var(--info); }
.rn.resolved { opacity: .85; }
.ref-chip { font-family: var(--mono); font-size: 11.5px; padding: 1px 6px; background: #eef2f7; border-radius: 3px; color: var(--ink-2); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 12px 18px; font-size: 12.5px; color: var(--ink-2); }
.timeline li::before { content: ''; position: absolute; left: 3px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: #c7cfda; }
.timeline li::after { content: ''; position: absolute; left: 6px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .when { color: var(--ink-4); font-size: 11.5px; }

/* Checklist */
.cl-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.cl-item:last-child { border-bottom: 0; }
.cl-mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; border: 1.5px solid #d3d9e2; color: var(--ink-4); }
.cl-item.met .cl-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.cl-item.unmet .cl-mark { border-color: #e6c89c; color: var(--warn); background: var(--warn-soft); }

/* Q&A thread */
.msg { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.msg:last-child { border-bottom: 0; }
.msg .who { font-size: 12.5px; font-weight: 600; }
.msg .who .muted { font-weight: 400; }
.msg .body { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; white-space: pre-wrap; }
.msg.staff .avatar { background: var(--brand); color: #fff; }

/* Mobile drawer */
.scrim { display: none; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi:nth-child(4n) { border-right: 0; }
  .kpi:nth-child(-n+4) { border-bottom: 1px solid var(--line-2); }
  .eng-head { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .eng-head > div { border-bottom: 1px solid var(--line-2); }
}
@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .pane.guidance { position: static; max-height: none; }
  .g-main-side { grid-template-columns: minmax(0, 1fr); }
  .prog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .detail-grid { grid-template-columns: 1fr; }
  .enrol-box { position: static; }
  .journey { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 24px; }
  .j-step:nth-child(7)::before { display: none; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .side { transform: translateX(0); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(14,23,38,.3); z-index: 40; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .main { padding: 20px 16px 48px; }
  .demo-banner { padding: 6px 16px; }
  .g-4, .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pillars { grid-template-columns: 1fr 1fr; }
  .pillar:nth-child(2) { border-right: 0; }
  .pillar:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
  .stage-rail { grid-template-columns: 1fr 1fr; }
  .stage:nth-child(2) { border-right: 0; }
  .stage:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
  .pub-nav { display: none; }
  .hide-sm { display: none !important; }
  .topbar .user .meta { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 13.5px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { border-bottom: 1px solid var(--line-2); }
  .kpi:nth-child(2n) { border-right: 0; }
  .eng-head { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2, .g-3, .g-4 { grid-template-columns: minmax(0, 1fr); }
  .prog-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .hero .wrap { padding-top: 40px; padding-bottom: 40px; }
  .detail-hero h1 { font-size: 30px; }
  .pillars, .stage-rail { grid-template-columns: 1fr; }
  .pillar, .stage { border-right: 0 !important; border-bottom: 1px solid var(--line-2); }
  .journey { grid-template-columns: 1fr; }
  .j-step { display: grid; grid-template-columns: 28px 1fr; gap: 12px; text-align: left; padding: 0 0 14px; }
  .j-step .j-dot { margin: 0; }
  .j-step::before { left: 13px; top: -14px; right: auto; width: 1.5px; height: 28px; }
  .ticks.two { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  /* Tracker becomes stacked cards on phones (engagement-companion view) */
  table.t.stack-sm thead { display: none; }
  table.t.stack-sm, table.t.stack-sm tbody, table.t.stack-sm tr, table.t.stack-sm td { display: block; width: 100%; }
  table.t.stack-sm tr { border-bottom: 1px solid var(--line); padding: 10px 14px; }
  table.t.stack-sm tr.group { padding: 0; }
  table.t.stack-sm td { border: 0; padding: 3px 0; }
  table.t.stack-sm td[data-l]::before { content: attr(data-l); display: inline-block; min-width: 130px; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
  .cl-item { grid-template-columns: 28px minmax(0, 1fr); }
  .cl-item > :last-child { grid-column: 2; }
}
@media print {
  .side, .topbar, .demo-banner, .btn { display: none !important; }
  .shell { display: block; }
}
