/* AWQAF SA · Waqf Savings Club prototype — no external dependencies */
:root {
  --red: #EC1C24;
  --yellow: #FED541;
  --yellow-ink: #8a6a00;
  --green: #01A652;
  --green-dark: #00803f;
  --blue: #0072BD;
  --blue-dark: #005a96;
  --ink: #141414;
  --ink-2: #4a4f57;
  --ink-3: #7b818a;
  --line: #e4e6ea;
  --bg: #f6f5f1;
  --card: #ffffff;
  --soft-blue: #e8f2fa;
  --soft-green: #e6f6ee;
  --soft-yellow: #fff7d9;
  --soft-red: #fdeaea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; }
h1 { font-family: var(--serif); font-size: 30px; font-weight: 700; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0 0 .8em; }
a { color: var(--blue); }
small, .muted { color: var(--ink-3); }
.mono { font-family: var(--mono); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
[hidden] { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: 68px;
  display: flex; align-items: center; gap: 20px; padding: 0 20px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.topbar::after { /* logo colour stripe */
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px;
  background: linear-gradient(90deg, var(--red) 0 25%, var(--yellow) 25% 50%, var(--green) 50% 75%, var(--blue) 75%);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 210px; }
.brand img { height: 48px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 17px; }
.brand-text small { font-size: 12px; }
.persona { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: center; }
.persona-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.persona-switch { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.persona-switch button {
  border: 0; background: transparent; padding: 7px 13px; border-radius: 999px; color: var(--ink-2); font-size: 13.5px; white-space: nowrap;
}
.persona-switch button:hover { color: var(--ink); }
.persona-switch button.active { background: var(--ink); color: #fff; }
.topbar-actions { display: flex; gap: 8px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; border: 1px solid transparent; padding: 9px 14px; font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-danger { background: #fff; color: var(--red); border-color: #f3b5b7; }
.btn-danger:hover { background: var(--soft-red); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg); }
.btn-ghost-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn-ghost-dark:hover { background: rgba(255,255,255,.1); }
.btn-locked { background: #f2f2f2; color: var(--ink-3); border: 1px dashed #c9cbd0; }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 13px 20px; font-size: 16px; border-radius: 12px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: calc(100vh - 68px); }
.sidebar { width: 236px; flex-shrink: 0; padding: 22px 12px 120px; border-right: 1px solid var(--line); background: #fbfbf9; position: sticky; top: 72px; height: calc(100vh - 72px); overflow-y: auto; }
.nav-group { margin-bottom: 18px; }
.nav-group h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 10px 6px; font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 9px; color: var(--ink-2); font-size: 14px; text-decoration: none; }
.nav-item:hover { background: #f0efea; color: var(--ink); }
.nav-item.active { background: var(--ink); color: #fff; }
.nav-item .oct { width: 10px; height: 10px; flex-shrink: 0; clip-path: polygon(30% 0,70% 0,100% 30%,100% 70%,70% 100%,30% 100%,0 70%,0 30%); }
.nav-item.locked { opacity: .5; }
.nav-item.locked::after { content: "🔒"; font-size: 11px; margin-left: auto; }
.nav-role { margin: 10px 10px 0; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.nav-role strong { display: block; color: var(--ink); font-size: 13.5px; }

.view { flex: 1; min-width: 0; padding: 28px 34px 140px; outline: none; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.view-head p { color: var(--ink-2); margin: 0; max-width: 720px; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--blue); margin-bottom: 4px; }
.fade-in { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Cards & grids ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .grid > * > .card:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 28px; }

/* KPI tiles */
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent, var(--blue)); }
.kpi .label { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--ink-3); }
.kpi.kpi-hero { display: flex; flex-direction: column; justify-content: center; }
.kpi.kpi-hero .value { font-size: 34px; }
.kpi.flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { background: var(--soft-green); } 100% { background: #fff; } }

/* Pills / badges */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.pill-blue { background: var(--soft-blue); color: var(--blue-dark); }
.pill-green { background: var(--soft-green); color: var(--green-dark); }
.pill-yellow { background: var(--soft-yellow); color: var(--yellow-ink); }
.pill-red { background: var(--soft-red); color: #b5121a; }
.pill-dark { background: var(--ink); color: #fff; }

/* Notices */
.notice { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; background: var(--soft-blue); color: #12395a; }
.notice .ico { font-size: 18px; line-height: 1.1; }
.notice-yellow { background: var(--soft-yellow); color: #5c4700; }
.notice-green { background: var(--soft-green); color: #0c4f2d; }
.notice-red { background: var(--soft-red); color: #7a0f14; }
.notice-dark { background: var(--ink); color: #fff; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid #f0f1f3; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { white-space: nowrap; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #fafaf7; }
tr.new td { animation: flash 1.6s ease; }
.table-wrap { overflow-x: auto; }

/* Progress bars */
.bar { height: 10px; background: #eef0f2; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--accent, var(--green)); transition: width .8s cubic-bezier(.2,.8,.2,1); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea { border: 1px solid #d5d8dd; border-radius: 10px; padding: 10px 12px; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; background: #fff; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--blue); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid #d5d8dd; background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
input[type=range] { width: 100%; accent-color: var(--blue); }

/* ---------- Intro / lifecycle ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 34px 38px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hero h1 { font-size: 40px; line-height: 1.1; margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--green-dark); }
.hero .lead { font-size: 17px; color: var(--ink-2); max-width: 520px; }
.hero .arabic { font-family: "Geeza Pro", "Noto Naskh Arabic", "Traditional Arabic", serif; font-size: 26px; direction: rtl; color: var(--ink); margin: 18px 0 2px; }
.cycle { position: relative; width: 100%; max-width: 470px; aspect-ratio: 1; margin: 0 auto; }
.cycle svg { width: 100%; height: 100%; }
.cycle-node { cursor: pointer; }
.cycle-node circle { transition: r .25s, fill .25s; }
.cycle-node text { font-size: 11px; font-weight: 700; letter-spacing: .04em; pointer-events: none; }
.cycle-center { position: absolute; inset: 31%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6px; }
.cycle-center strong { font-size: 17px; font-family: var(--serif); }
.cycle-center span { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; margin-top: 4px; }
.cycle-center .step-num { font-size: 11px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.principle { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; border-top: 4px solid var(--accent); }
.principle h3 { font-size: 15px; }
.principle p { font-size: 13.5px; color: var(--ink-2); margin: 0; }
.banner { margin-top: 18px; background: var(--ink); color: #fff; border-radius: 14px; padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.banner strong { font-family: var(--serif); font-size: 19px; letter-spacing: .02em; }

/* ---------- Phone frame ---------- */
.phone-stage { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 34px; align-items: start; }
.phone { width: 390px; height: min(790px, calc(100vh - 110px)); min-height: 620px; border-radius: 52px; background: #0d0d0d; padding: 13px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.35), inset 0 0 0 2px #333; position: sticky; top: 92px; }
.phone-screen { width: 100%; height: 100%; border-radius: 40px; background: #fff; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.phone-notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 110px; height: 30px; background: #0d0d0d; border-radius: 20px; z-index: 5; }
.phone-status { height: 46px; flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; padding: 6px 28px 0; font-size: 13px; font-weight: 600; }
.phone-body { flex: 1; overflow-y: auto; padding: 4px 18px 24px; scrollbar-width: none; }
.phone-body::-webkit-scrollbar { display: none; }
.phone-appbar { display: flex; align-items: center; gap: 10px; padding: 8px 0 14px; }
.phone-appbar img { height: 34px; }
.phone-appbar .t { font-weight: 700; font-size: 15px; line-height: 1.1; }
.phone-appbar .s { font-size: 12px; color: var(--ink-3); }
.phone-tabs { display: flex; border-top: 1px solid var(--line); flex-shrink: 0; background: #fff; }
.phone-tabs button { flex: 1; border: 0; background: none; padding: 10px 0 18px; font-size: 11px; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.phone-tabs button span { font-size: 18px; }
.phone-tabs button.active { color: var(--blue); font-weight: 700; }
.m-card { border-radius: 18px; padding: 16px; background: var(--bg); margin-bottom: 12px; }
.m-hero { background: linear-gradient(135deg, var(--blue) 0%, #0a5d97 100%); color: #fff; }
.m-hero .big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.m-hero small { color: rgba(255,255,255,.8); }
.m-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 16px 0 8px; }
.m-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-amounts button { border: 1.5px solid #d5d8dd; background: #fff; border-radius: 14px; padding: 13px 0; font-weight: 700; font-size: 16px; }
.m-amounts button.active { border-color: var(--blue); background: var(--soft-blue); color: var(--blue-dark); }
.m-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-methods button { border: 1.5px solid #d5d8dd; background: #fff; border-radius: 12px; padding: 9px 4px; font-size: 11.5px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink-2); }
.m-methods button span { font-size: 18px; }
.m-methods button.active { border-color: var(--blue); background: var(--soft-blue); color: var(--blue-dark); }
.seg { display: flex; background: var(--bg); border-radius: 12px; padding: 3px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.toggle-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; padding: 10px 0; border-bottom: 1px solid #f0f1f3; }
.toggle-row input { margin-top: 2px; accent-color: var(--blue); width: 16px; height: 16px; flex-shrink: 0; }
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.badge { text-align: center; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.badge .medal { width: 58px; height: 58px; margin: 0 auto 4px; display: flex; align-items: center; justify-content: center; font-size: 26px; background: var(--soft-yellow); clip-path: polygon(30% 0,70% 0,100% 30%,100% 70%,70% 100%,30% 100%,0 70%,0 30%); }
.badge.locked .medal { background: #eee; filter: grayscale(1); opacity: .5; }
.badge.new .medal { animation: pop .6s cubic-bezier(.2,1.6,.4,1); background: var(--yellow); }
@keyframes pop { 0% { transform: scale(.2); } 100% { transform: scale(1); } }
.quiz-opt { display: block; width: 100%; text-align: left; border: 1.5px solid #d5d8dd; background: #fff; border-radius: 12px; padding: 11px 12px; margin-bottom: 8px; font-size: 14px; }
.quiz-opt.right { border-color: var(--green); background: var(--soft-green); }
.quiz-opt.wrong { border-color: var(--red); background: var(--soft-red); }
.success-tick { width: 76px; height: 76px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 40px; margin: 16px auto 10px; animation: pop .6s cubic-bezier(.2,1.6,.4,1); }
.spinner { width: 46px; height: 46px; border: 4px solid var(--soft-blue); border-top-color: var(--blue); border-radius: 50%; margin: 40px auto 14px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Side explainer next to phone */
.explainer h2 { font-family: var(--serif); font-size: 24px; }
.explainer .card { box-shadow: none; }
.trail { display: flex; flex-direction: column; gap: 0; }
.trail-step { display: flex; gap: 14px; align-items: stretch; opacity: .35; transition: opacity .4s; }
.trail-step.on { opacity: 1; }
.trail-dot { display: flex; flex-direction: column; align-items: center; }
.trail-dot b { width: 34px; height: 34px; border-radius: 50%; background: #d9dce1; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; transition: background .4s; }
.trail-step.on .trail-dot b { background: var(--accent, var(--blue)); }
.trail-dot i { flex: 1; width: 2px; background: #d9dce1; min-height: 16px; }
.trail-step:last-child .trail-dot i { display: none; }
.trail-body { padding: 5px 0 16px; }
.trail-body strong { display: block; font-size: 14.5px; }
.trail-body span { font-size: 13px; color: var(--ink-2); }

/* ---------- Wizard ---------- */
.stepper { display: flex; gap: 0; margin-bottom: 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stepper div { flex: 1; padding: 11px 12px; font-size: 13px; color: var(--ink-3); border-right: 1px solid var(--line); display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper div:last-child { border-right: 0; }
.stepper div b { width: 22px; height: 22px; border-radius: 50%; background: #e7e8eb; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.stepper div.done b { background: var(--green); color: #fff; }
.stepper div.current { color: var(--ink); font-weight: 700; background: var(--soft-blue); }
.stepper div.current b { background: var(--blue); color: #fff; }
.stepper-compact div { flex: 0 0 auto; padding: 9px 10px; }
.stepper-compact div.current { flex: 1; }
.doc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.doc-row .name { font-weight: 600; font-size: 14px; }
.idcard { background: var(--ink); color: #fff; border-radius: 18px; padding: 24px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; position: relative; overflow: hidden; }
.idcard::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; background: var(--yellow); opacity: .12; clip-path: polygon(30% 0,70% 0,100% 30%,100% 70%,70% 100%,30% 100%,0 70%,0 30%); }
.idcard .lbl { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.idcard .val { font-family: var(--mono); font-size: 24px; font-weight: 700; letter-spacing: .04em; }
.qr { background: #fff; padding: 8px; border-radius: 10px; width: 132px; height: 132px; }
.qr svg { width: 100%; height: 100%; display: block; }

/* ---------- Ledger flow ---------- */
.flow { display: grid; grid-template-columns: 1fr 34px 1.15fr 34px 1fr; align-items: stretch; gap: 0; }
.flow .arrow { display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 22px; }
.bucket { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; position: relative; }
.bucket + .bucket { margin-top: 10px; }
.grid > .bucket + .bucket { margin-top: 0; }
.bucket .label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.bucket .value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bucket .sub { font-size: 12px; color: var(--ink-3); }
.bucket.locked { border: 2px solid var(--ink); background: repeating-linear-gradient(135deg, #fff 0 10px, #fafafa 10px 20px); }
.bucket.locked .lock { position: absolute; top: 12px; right: 14px; font-size: 12px; font-weight: 700; background: var(--ink); color: #fff; padding: 3px 9px; border-radius: 999px; }
.bucket.flash { animation: flash 1.2s ease; }
.col-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; margin-bottom: 8px; }

/* ---------- Projects kanban ---------- */
.pipeline { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.lane { background: #efeee9; border-radius: 12px; padding: 10px; min-height: 260px; }
.lane h4 { gap: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .02em; color: var(--ink-2); margin: 2px 4px 10px; display: flex; justify-content: space-between; }
.lane h4 span { color: var(--ink-3); }
.pcard { background: #fff; border-radius: 10px; padding: 11px; box-shadow: 0 1px 2px rgba(0,0,0,.08); margin-bottom: 8px; font-size: 13px; cursor: pointer; border-left: 4px solid var(--accent, var(--blue)); transition: transform .12s; }
.pcard:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.08); }
.pcard strong { display: block; font-size: 13.5px; line-height: 1.3; margin-bottom: 4px; }
.pcard .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.pcard.moved { animation: flash 1.4s ease; }

/* ---------- Impact ---------- */
.impact-out { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.impact-tile { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: center; }
.impact-tile .ico { font-size: 28px; }
.impact-tile .n { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.impact-tile .l { font-size: 12.5px; color: var(--ink-2); }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 12.5px; padding: 8px 10px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .1s; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.equation { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.equation .eq-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.equation .eq-box b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.equation .eq-box small { font-size: 12px; }
.equation .op { color: var(--ink-3); font-size: 20px; }

/* ---------- Governance ---------- */
.timeline { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 18px; }
.timeline div { position: relative; padding-bottom: 14px; font-size: 13.5px; }
.timeline div::before { content: ""; position: absolute; left: -24px; top: 5px; width: 10px; height: 10px; background: var(--blue); clip-path: polygon(30% 0,70% 0,100% 30%,100% 70%,70% 100%,30% 100%,0 70%,0 30%); }
.timeline time { display: block; font-size: 12px; color: var(--ink-3); }
.sim { border: 2px dashed #d5d8dd; border-radius: 16px; padding: 20px; background: #fff; }
.sim-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 14px; }
.sim-step { border-radius: 12px; padding: 12px; background: var(--bg); font-size: 12.5px; opacity: .35; transition: opacity .4s, background .4s; }
.sim-step > b { display: block; font-size: 13.5px; margin-bottom: 4px; }
.sim-step.on { opacity: 1; background: var(--soft-green); }
.sim-step.warn.on { background: var(--soft-yellow); }

/* ---------- National ---------- */
.crumbs { display: flex; gap: 6px; align-items: center; font-size: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.crumbs button { border: 0; background: none; color: var(--blue); padding: 0; font-weight: 600; }
.crumbs span { color: var(--ink-3); }
.crumbs b { color: var(--ink); }
.prov-bar { display: grid; grid-template-columns: 130px 1fr 110px; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 8px; font-size: 13.5px; cursor: pointer; }
.prov-bar:hover { background: var(--bg); }
.prov-bar .bar { height: 14px; border-radius: 4px; }
.prov-bar .bar > span { border-radius: 4px; }

/* ---------- Presenter ---------- */
.presenter { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; width: min(1060px, calc(100vw - 36px)); }
.presenter-inner { background: var(--ink); color: #fff; border-radius: 18px; padding: 14px 16px 14px 20px; display: grid; grid-template-columns: auto 1fr auto auto; gap: 18px; align-items: center; box-shadow: 0 20px 40px -10px rgba(0,0,0,.45); }
.presenter-step { font-family: var(--mono); font-size: 13px; color: var(--yellow); background: rgba(255,255,255,.08); padding: 6px 10px; border-radius: 8px; }
.presenter-text strong { display: block; font-size: 15px; }
.presenter-text p { margin: 2px 0 0; font-size: 13.5px; color: rgba(255,255,255,.75); line-height: 1.4; }
.presenter-dots { display: flex; gap: 5px; }
.presenter-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.25); padding: 0; }
.presenter-dots button.on { background: var(--yellow); }
.presenter-nav { display: flex; gap: 6px; }
body.presenting .sidebar { opacity: .55; }
body.presenting .phone { height: min(790px, calc(100vh - 220px)); }
.spotlight { animation: spot 1.8s ease 2; border-radius: 12px; }
@keyframes spot { 0%,100% { box-shadow: 0 0 0 0 rgba(254,213,65,0); } 50% { box-shadow: 0 0 0 6px rgba(254,213,65,.9); } }

/* ---------- Toast & modal ---------- */
.toast { position: fixed; top: 84px; left: 50%; transform: translate(-50%, -20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px; z-index: 80; opacity: 0; pointer-events: none; transition: all .25s; max-width: 90vw; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,15,15,.45); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .2s; }
.modal { background: #fff; border-radius: 18px; padding: 26px; width: min(560px, 100%); max-height: 88vh; overflow-y: auto; box-shadow: 0 30px 60px -10px rgba(0,0,0,.4); }
.modal h2 { font-family: var(--serif); font-size: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .persona-label { display: none; }
  .persona-switch button { padding: 7px 10px; font-size: 13px; }
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .sidebar { width: 200px; }
  .brand-text { display: none; }
  .brand { min-width: 0; }
  .phone-stage { grid-template-columns: 1fr; }
  .phone { position: relative; top: 0; margin: 0 auto; }
  .hero { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: 1fr; }
  .flow .arrow { transform: rotate(90deg); padding: 6px 0; }
  .impact-out { grid-template-columns: repeat(2, 1fr); }
  .sim-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .topbar { height: auto; flex-wrap: wrap; padding: 10px; gap: 8px; }
  .persona { order: 3; flex: 1 1 100%; overflow-x: auto; justify-content: flex-start; }
  .topbar-actions { margin-left: auto; }
  .sidebar { display: none; }
  .view { padding: 18px 14px 160px; }
  .grid-2, .grid-3, .principles { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .phone { width: 100%; max-width: 390px; height: 720px; }
  .phone-stage { grid-template-columns: minmax(0, 1fr); }
  .grid-4, .grid-5, .impact-out { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .value { font-size: 20px; }
  .kpi.kpi-hero .value { font-size: 26px; }
  .topbar-actions .btn { padding: 7px 10px; font-size: 13px; }
  .hero { padding: 22px; }
  .hero h1 { font-size: 30px; }
  h1 { font-size: 24px; }
  .pipeline { grid-template-columns: repeat(7, 200px); }
  .presenter-inner { grid-template-columns: 1fr auto; }
  .presenter-dots, .presenter-step { display: none; }
}
@media print {
  .topbar, .sidebar, .presenter, .toast { display: none !important; }
  .view { padding: 0; }
}
