/* =====================================================================
   Training Platform — design system
   Theme colours arrive as CSS variables from themes.js. Every coloured
   surface has a matching *-ink colour picked for WCAG AA contrast.
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,400..800;1,14..32,400..600&display=swap');

:root {
  --brand: #0b4f6c; --brand-ink: #fff; --accent: #20bf9f; --accent-ink: #062b24;
  --brand-soft: #e6f0f4; --grad: linear-gradient(135deg, #0b4f6c, #20bf9f);
  --bg: #f7f8fa; --surface: #fff; --surface-2: #f1f3f6; --line: #e3e6eb;
  --text: #0f172a; --muted: #5b6474; --ok: #15803d; --warn: #b45309; --bad: #b91c1c;
  --r-sm: 10px; --r: 16px; --r-lg: 24px; --pill: 999px;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
  --shadow-lg: 0 12px 40px rgba(15,23,42,.14);
  --top-h: 64px; --bottom-h: 68px;
  --font: 'Inter', 'Google Sans', 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  color-scheme: light;
}
[data-mode="dark"] {
  --bg: #0b0f17; --surface: #121826; --surface-2: #1a2233; --line: #263044;
  --text: #e8edf5; --muted: #9aa6b8; --brand-soft: rgba(255,255,255,.06);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}
* { 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: 1.55; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); overflow-x: hidden; }
@media (min-width: 900px) { body { padding-bottom: 0; } }
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
[data-mode="dark"] a { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(1.9rem, 5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 3.4vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.section { padding: 48px 0; }
@media (min-width: 900px) { .section { padding: 72px 0; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
[data-mode="dark"] .eyebrow { color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; height: var(--top-h); background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar .wrap { height: 100%; display: flex; align-items: center; gap: 12px; }
.topbar.logo-center .brand { position: absolute; left: 50%; transform: translateX(-50%); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand img { height: 34px; width: auto; }
.brand .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; color: var(--brand-ink); }
.brand-name { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
.home-pill { flex: none; }
.menu-scroller { flex: 1; min-width: 0; display: none; align-items: center; gap: 4px; }
@media (min-width: 900px) { .menu-scroller { display: flex; } }
.menu-track { display: flex; gap: 4px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); padding: 0 8px; }
.menu-track::-webkit-scrollbar { display: none; }
.menu-track a { flex: none; padding: 8px 14px; border-radius: var(--pill); text-decoration: none; color: var(--text); font-weight: 600; font-size: .92rem; }
.menu-track a:hover { background: var(--surface-2); }
.menu-track a.on { background: var(--brand-soft); color: var(--brand); }
[data-mode="dark"] .menu-track a.on { color: var(--accent); }
.arrow-btn { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.arrow-btn[hidden] { display: none; }
.top-actions { display: flex; gap: 6px; margin-left: auto; align-items: center; }

/* ---------- buttons ---------- */
.btn { --b: var(--brand); --bi: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border-radius: var(--pill); border: 0; background: var(--b); color: var(--bi); font: inherit; font-weight: 700; font-size: .97rem; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s; box-shadow: 0 2px 0 rgba(0,0,0,.06); white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.accent { --b: var(--accent); --bi: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.soft { background: var(--brand-soft); color: var(--brand); }
[data-mode="dark"] .btn.soft { color: var(--text); }
.btn.white { background: #fff; color: #0f172a; }
.btn.wa { --b: #128c4b; --bi: #fff; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: .87rem; }
.btn.lg { min-height: 54px; padding: 0 28px; font-size: 1.05rem; }
.btn.block { width: 100%; }
.btn.icon { width: 42px; min-height: 42px; padding: 0; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row.center { justify-content: center; }

/* ---------- bottom nav (phones) ---------- */
.bottomnav { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60; height: 60px; display: flex; justify-content: space-around; align-items: center;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); }
@media (min-width: 900px) { .bottomnav { display: none; } }
.bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 100%; text-decoration: none; color: var(--muted); font-size: .68rem; font-weight: 600; border-radius: 16px; }
.bottomnav a svg { width: 24px; height: 24px; }
.bottomnav a.on { color: var(--brand); }
[data-mode="dark"] .bottomnav a.on { color: var(--accent); }
.bottomnav a.home { position: relative; }
.bottomnav a.home .dot { width: 46px; height: 46px; border-radius: 16px; background: var(--grad); color: var(--brand-ink); display: grid; place-items: center; margin-top: -24px; box-shadow: var(--shadow-lg); }

/* ---------- hero carousel ---------- */
.hero { position: relative; overflow: hidden; background: var(--grad); color: var(--brand-ink); }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 85% 10%, rgba(255,255,255,.22), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(0,0,0,.22), transparent 60%); pointer-events: none; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; position: relative; z-index: 1; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; padding: 40px 0 76px; }
.slide .wrap { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .slide { padding: 72px 0 96px; } .slide .wrap { grid-template-columns: 1.05fr .95fr; } }
.slide h1 { color: inherit; }
.slide .lead { font-size: clamp(1.02rem, 2.2vw, 1.22rem); opacity: .92; max-width: 34em; }
.slide .tag { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: var(--pill); background: rgba(255,255,255,.16); font-weight: 700; font-size: .8rem; margin-bottom: 16px; }
.slide-art { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: var(--r-lg); padding: 22px; backdrop-filter: blur(6px); }
.dots { position: absolute; z-index: 2; left: 0; right: 0; bottom: 22px; display: flex; justify-content: center; align-items: center; gap: 10px; }
.dots button { width: 9px; height: 9px; border-radius: 9px; border: 0; background: rgba(255,255,255,.45); padding: 0; cursor: pointer; transition: width .25s; }
.dots button.on { width: 30px; background: #fff; }
.dots .arrow-btn { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3); color: #fff; }
.mini-steps { display: grid; gap: 10px; }
.mini-step { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.12); border-radius: 14px; padding: 12px 14px; font-weight: 600; }
.mini-step .n { flex: none; width: 30px; height: 30px; border-radius: 10px; background: #fff; color: #0f172a; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.mini-step svg { width: 26px; height: 26px; flex: none; margin-left: auto; opacity: .9; }

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.tint { background: var(--brand-soft); border-color: transparent; }
.card h3 { margin-bottom: 6px; }
.card-link { text-decoration: none; color: inherit; display: block; transition: transform .15s; }
.card-link:hover { transform: translateY(-2px); }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 20px 14px; }
.tile .ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
[data-mode="dark"] .tile .ico { color: var(--accent); }
.tile .ico svg { width: 30px; height: 30px; }
.tile b { font-size: .98rem; }
.tile span { font-size: .85rem; color: var(--muted); }
.stat { text-align: center; }
.stat .v { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; color: var(--brand); }
[data-mode="dark"] .stat .v { color: var(--accent); }
.stat .l { font-size: .82rem; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--pill); font-size: .75rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: #dcfce7; color: #14532d; } .badge.warn { background: #fef3c7; color: #78350f; } .badge.bad { background: #fee2e2; color: #7f1d1d; }
.badge.brand { background: var(--brand); color: var(--brand-ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--pill); border: 1.5px solid var(--line); background: var(--surface); font-size: .87rem; font-weight: 600; cursor: pointer; user-select: none; color: var(--text); }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- journey / numbered steps ---------- */
.journey { display: grid; gap: 14px; counter-reset: step; }
@media (min-width: 900px) { .journey.h { grid-template-columns: repeat(var(--n, 4), 1fr); } }
.jstep { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
@media (min-width: 900px) { .journey.h .jstep { flex-direction: column; align-items: center; text-align: center; } }
.jstep .num { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--grad); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; }
.jstep .ico { width: 46px; height: 46px; color: var(--brand); }
[data-mode="dark"] .jstep .ico { color: var(--accent); }
.jstep h3 { font-size: 1.02rem; margin: 0 0 4px; }
.jstep p { margin: 0; font-size: .9rem; color: var(--muted); }
@media (min-width: 900px) { .journey.h .jstep:not(:last-child)::after { content: ""; position: absolute; top: 40px; right: -14px; width: 14px; height: 2px; background: var(--line); } }

/* progress strip for multi-step flows */
.progress { display: flex; gap: 6px; margin: 8px 0 22px; }
.progress span { flex: 1; height: 6px; border-radius: 6px; background: var(--line); }
.progress span.done { background: var(--brand); }
.progress span.now { background: var(--accent); }
.step-head { display: flex; align-items: center; gap: 12px; }
.step-head .num { width: 38px; height: 38px; border-radius: 12px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field > label, .label { font-weight: 700; font-size: .95rem; }
.help { font-size: .84rem; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.help svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.input, select, textarea { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.phone-row { display: grid; grid-template-columns: 116px 1fr; gap: 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface); }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: var(--pill); }
.seg button { min-height: 40px; border: 0; border-radius: var(--pill); background: transparent; font: inherit; font-weight: 700; font-size: .9rem; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.voice-wrap { position: relative; }
.voice-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.mic-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: var(--pill); border: 0; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer; }
.mic-btn svg { width: 20px; height: 20px; }
.rec { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--bad); font-variant-numeric: tabular-nums; }
.rec i { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.interim { color: var(--muted); font-style: italic; }

/* likert & sliders: big, thumb-friendly, explained */
.q { padding: 18px 0; border-bottom: 1px solid var(--line); }
.q .qt { font-weight: 650; margin-bottom: 12px; }
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.likert button { min-height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-weight: 800; color: var(--text); cursor: pointer; }
.likert button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.likert-legend { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-top: 6px; gap: 10px; }
.scale-key { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; font-size: .72rem; text-align: center; color: var(--muted); }
.scale-key b { display: block; font-size: .95rem; color: var(--text); }
input[type=range] { width: 100%; accent-color: var(--brand); height: 36px; }

/* ---------- tables that never scroll sideways ---------- */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
@media (max-width: 640px) {
  .table.stack thead { display: none; }
  .table.stack tr { display: block; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; padding: 6px 12px; background: var(--surface); }
  .table.stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 7px 0; text-align: right; }
  .table.stack td::before { content: attr(data-l); font-weight: 700; color: var(--muted); text-align: left; }
}

/* ---------- misc ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 90; background: rgba(2,6,23,.55); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 700px) { .modal-bg { align-items: center; } }
.modal { width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 24px 24px 0 0; padding: 22px; box-shadow: var(--shadow-lg); }
@media (min-width: 700px) { .modal { border-radius: 24px; } }
.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(var(--bottom-h) + 28px); transform: translateX(-50%); background: #0f172a; color: #fff; padding: 12px 18px; border-radius: var(--pill); font-weight: 600; box-shadow: var(--shadow-lg); max-width: 90vw; }
.demo-banner { background: #fef3c7; color: #78350f; font-size: .85rem; text-align: center; padding: 8px 14px; }
.demo-banner a { color: #78350f; font-weight: 700; }
.footer { border-top: 1px solid var(--line); padding: 36px 0 24px; font-size: .9rem; color: var(--muted); background: var(--surface); }
.pdpa-chip { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: var(--pill); background: var(--brand-soft); color: var(--text); font-weight: 600; text-decoration: none; font-size: .85rem; }
.pdpa-chip svg { width: 18px; height: 18px; color: var(--ok); }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; min-height: 40px; padding: 0 16px; border-radius: var(--pill); border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-weight: 700; font-size: .88rem; color: var(--text); cursor: pointer; }
.tabs button.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.avatar { border-radius: 50%; object-fit: cover; background: var(--grad); }
.split { display: grid; gap: 24px; }
@media (min-width: 900px) { .split { grid-template-columns: 260px 1fr; } }
.side-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
@media (min-width: 900px) { .side-nav { flex-direction: column; position: sticky; top: 84px; align-self: start; } }
.side-nav a { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .92rem; }
.side-nav a svg { width: 20px; height: 20px; color: var(--muted); }
.side-nav a.on { background: var(--brand-soft); color: var(--brand); }
.side-nav a.on svg { color: var(--brand); }
.locked { position: relative; }
.locked::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, var(--surface) 85%); border-radius: inherit; }
.swatch { width: 100%; aspect-ratio: 1.6; border-radius: 12px; border: 2px solid transparent; cursor: pointer; position: relative; overflow: hidden; }
.swatch.on { border-color: var(--text); }
.swatch span { position: absolute; left: 6px; bottom: 4px; font-size: .68rem; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.timeline { position: relative; display: grid; gap: 14px; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; }
.tl-item::before { content: ""; position: absolute; left: -23px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.kit-slot { display: grid; grid-template-columns: 78px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.kit-slot .t { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--brand); }

/* ---------- photo studio ---------- */
.studio { position: relative; width: 100%; max-width: 360px; aspect-ratio: 1; margin: 0 auto; border-radius: 20px; overflow: hidden; touch-action: none; background: var(--surface-2); }
.studio canvas { width: 100%; height: 100%; display: block; }
.studio .guide { position: absolute; inset: 0; pointer-events: none; }

/* ---------- printable pages: dossier & certificate (A4) ---------- */
.paper-stage { background: #e5e7eb; padding: 16px 0 40px; }
[data-mode="dark"] .paper-stage { background: #05070c; }
.page { width: min(100%, 210mm); margin: 0 auto 16px; background: #fff; color: #111827; box-shadow: 0 4px 24px rgba(0,0,0,.12); padding: 14mm 14mm 18mm; position: relative; overflow: hidden; }
@media (min-width: 820px) { .page { min-height: 297mm; } }
.page.landscape { width: min(100%, 297mm); }
@media (min-width: 1100px) { .page.landscape { min-height: 210mm; } }
.page .pfoot { position: absolute; left: 14mm; right: 14mm; bottom: 7mm; display: flex; justify-content: space-between; font-size: 8.5pt; color: #6b7280; border-top: 1px solid #e5e7eb; padding-top: 6px; }
.page h2 { font-size: 20pt; color: var(--brand); }
.page h3 { font-size: 12.5pt; }
.page p, .page li { font-size: 10.5pt; line-height: 1.55; }
.page .pgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.page .box { border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px 14px; break-inside: avoid; }
.page .box.tint { background: color-mix(in srgb, var(--brand) 6%, #fff); border-color: transparent; }
.page .kicker { font-size: 8.5pt; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-strong, var(--brand)); }
.page .chart { width: 100%; height: auto; }
.page .cover { position: absolute; inset: 0; background: var(--grad); color: var(--brand-ink); padding: 18mm; display: flex; flex-direction: column; justify-content: space-between; }
.page table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
.page td, .page th { padding: 6px 8px; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
.page .bar { height: 9px; border-radius: 9px; background: #eef0f3; overflow: hidden; }
.page .bar i { display: block; height: 100%; background: var(--grad); border-radius: 9px; }
.cert { aspect-ratio: 297 / 210; }
.cert.portrait { aspect-ratio: 210 / 297; }

@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; padding: 0; }
  .topbar, .bottomnav, .no-print, .footer, .demo-banner, .toast { display: none !important; }
  .paper-stage { background: none; padding: 0; }
  .page { width: 210mm; min-height: 297mm; height: 297mm; margin: 0; box-shadow: none; page-break-after: always; break-after: page; }
  .page.landscape { width: 297mm; min-height: 210mm; height: 210mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 560px) { .hide-sm { display: none; } .brand-name { max-width: 28vw; } .top-actions .btn.sm { padding: 0 10px; } }
@media (max-width: 560px) { .topbar .wrap { gap: 6px; padding: 0 12px; } .top-actions { gap: 4px; } .top-actions .btn.sm, .home-pill { min-height: 38px; padding: 0 10px; } .brand .mark { width: 30px; height: 30px; } .brand-name { max-width: 30vw; font-size: .95rem; } }
@media (max-width: 360px) { .brand-name { display: none; } }
/* icon sizing inside inline elements */
.eyebrow svg, .tag svg, .slide .tag svg, .badge svg, .chip svg, .help svg, .arrow-btn svg, .check > span > svg { width: 18px; height: 18px; flex: none; }
.arrow-btn svg { width: 18px; height: 18px; }
.ico svg, .num svg { width: 60%; height: 60%; }
.slide .tag { white-space: nowrap; }

.wrap.section { padding-left: 20px; padding-right: 20px; }
@media print { .page:last-child { break-after: auto; page-break-after: auto; } }
@media (max-width: 640px) {
  [data-row], [data-crow], #mat-add { grid-template-columns: 1fr 1fr !important; }
  [data-row] [data-del], [data-crow] [data-del] { width: 100%; }
  .kit-slot { grid-template-columns: 64px 1fr; }
}
.split > * { min-width: 0; } .side-nav { max-width: 100%; }
.kit-slot > * { min-width: 0; overflow-wrap: anywhere; }
.kit-slot > .btn, .kit-slot > a.btn { min-width: max-content; overflow-wrap: normal; }
.cert { width: 297mm !important; max-width: none; }
.cert.portrait { width: 210mm !important; }
@media (max-width: 560px) { .btn { white-space: normal; text-align: center; line-height: 1.25; padding-top: 8px; padding-bottom: 8px; } }
@media (max-width: 640px) { [data-op] { grid-template-columns: 30px 1fr 34px !important; } [data-op] [data-o=ms] { grid-column: 2; grid-row: 2; } [data-op] [data-odel] { grid-column: 3; grid-row: 1; } }
