/* ==========================================================================
   SkillBridger design system
   Palette from the UI/UX specification (inspired by the supplied logo):
   teal #159B83 · growth orange #F2A000 · deep navy #26364B
   ========================================================================== */
:root {
  --teal: #159B83;
  --teal-600: #11806C;
  --teal-700: #0E6A5A;
  --teal-50: #E8F6F2;
  --teal-100: #CDEDE5;
  --orange: #F2A000;
  --orange-600: #C98500;
  --orange-700: #8F5E00;
  --orange-50: #FEF5E2;
  --orange-100: #FDE7B8;
  --navy: #26364B;
  --navy-800: #1C293A;
  --navy-600: #3A4C64;
  --navy-50: #EEF1F5;
  --canvas: #F5F7FA;
  --surface: #FFFFFF;
  --muted: #64748B;
  --ink: #1B2636;
  --line: #E3E8EF;
  --line-strong: #CBD3DE;
  --red: #C2410C;
  --red-50: #FDEEE6;
  --blue: #2F6FB3;
  --blue-50: #EAF2FB;

  --accent: var(--teal);
  --accent-50: var(--teal-50);
  --accent-700: var(--teal-700);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(38, 54, 75, .06);
  --shadow: 0 1px 2px rgba(38, 54, 75, .05), 0 6px 18px -8px rgba(38, 54, 75, .14);
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --sidebar-w: 264px;
}

/* Workspace accents: related but not identical (UI spec §13) */
.ws-employee { --accent: var(--teal); --accent-50: var(--teal-50); --accent-700: var(--teal-700); }
.ws-organization { --accent: var(--navy); --accent-50: var(--navy-50); --accent-700: var(--navy-800); }
.ws-provider { --accent: var(--orange-600); --accent-50: var(--orange-50); --accent-700: var(--orange-700); }
.ws-admin { --accent: #4B5B70; --accent-50: #EDF0F4; --accent-700: #2C3A4C; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-ui); font-size: 14.5px; line-height: 1.55; color: var(--ink);
  background: var(--canvas); -webkit-font-smoothing: antialiased;
}
a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); margin: 0; letter-spacing: -0.015em; line-height: 1.2; }
h1 { font-size: 1.65rem; font-weight: 750; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
small, .small { font-size: .8rem; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
[x-cloak] { display: none !important; }

.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 38px; padding: 0 1rem;
  border-radius: var(--radius-sm); border: 1px solid transparent; font: 600 .875rem/1 var(--font-ui);
  cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-600); }
.btn-accent { background: var(--orange); color: var(--navy-800); }
.btn-accent:hover { background: #E59700; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-800); }
.btn-outline { background: var(--surface); color: var(--navy); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--navy-600); }
.btn-ghost { background: transparent; color: var(--navy-600); }
.btn-ghost:hover { background: var(--navy-50); }
.btn-danger { background: var(--surface); color: var(--red); border-color: #F1C4AE; }
.btn-danger:hover { background: var(--red-50); }
.btn-sm { height: 31px; padding: 0 .7rem; font-size: .8rem; }
.btn-lg { height: 46px; padding: 0 1.4rem; font-size: .95rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--teal-700); font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label, .label { font-weight: 600; font-size: .82rem; color: var(--navy); }
.field .hint { font-size: .78rem; color: var(--muted); }
.field .error { font-size: .78rem; color: var(--red); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius-sm);
  padding: .55rem .7rem; font: inherit; color: var(--ink); min-height: 40px; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(21, 155, 131, .15); }
.has-error .input, .has-error .select, .has-error .textarea { border-color: var(--red); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.1rem; }
.form-grid .span-2 { grid-column: span 2; }
.fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
.fieldset-title { font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: .95rem; margin-bottom: .2rem; }
.fieldset-sub { color: var(--muted); font-size: .82rem; margin-bottom: .9rem; }
.form-actions { display: flex; gap: .6rem; justify-content: flex-end; padding-top: 1rem; border-top: 1px solid var(--line); margin-top: .5rem; }
.check { display: flex; align-items: center; gap: .5rem; font-size: .88rem; }
.check input { width: 16px; height: 16px; accent-color: var(--teal); }

/* Level picker — segmented proficiency selector */
.level-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.level-picker input { position: absolute; opacity: 0; pointer-events: none; }
.level-picker label {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: .55rem .4rem; text-align: center; cursor: pointer;
  font-weight: 600; font-size: .8rem; color: var(--navy-600); background: var(--surface); display: flex; flex-direction: column; gap: .3rem; align-items: center;
}
.level-picker label .pips { pointer-events: none; }
.level-picker input:checked + label { border-color: var(--teal); background: var(--teal-50); color: var(--teal-700); box-shadow: inset 0 0 0 1px var(--teal); }
.level-picker input:focus-visible + label { outline: 2px solid var(--orange); }

/* ---------- Cards / panels ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 1.25rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: .98rem; }
.card-head .sub { color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.card-body { padding: 1.1rem 1.25rem; }
.card-foot { padding: .8rem 1.25rem; border-top: 1px solid var(--line); background: #FAFBFC; border-radius: 0 0 var(--radius) var(--radius); }

.grid { display: grid; gap: 1.1rem; }
.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-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 1.1rem; }
.row { display: flex; align-items: center; gap: .6rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ---------- Metric strip ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.metric { padding: 1rem 1.2rem; position: relative; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric .k { font-size: .76rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: center; gap: .35rem; }
.metric .v { font-family: var(--font-head); font-size: 1.85rem; font-weight: 750; color: var(--navy); line-height: 1.1; margin-top: .35rem; }
.metric .d { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.metric .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.metric.m-teal .bar { background: var(--teal); }
.metric.m-orange .bar { background: var(--orange); }
.metric.m-navy .bar { background: var(--navy); }
.metric.m-red .bar { background: var(--red); }
.metric a.v { display: inline-block; text-decoration: none; }

/* ---------- Status chips (text + icon, never colour alone) ---------- */
.chip { display: inline-flex; align-items: center; gap: .3rem; height: 23px; padding: 0 .55rem; border-radius: 999px; font-size: .74rem; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.chip .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.chip-verified { background: var(--teal-50); color: var(--teal-700); border-color: var(--teal-100); }
.chip-self { background: #F1F3F6; color: var(--navy-600); border-color: var(--line-strong); border-style: dashed; }
.chip-pending { background: var(--orange-50); color: var(--orange-700); border-color: var(--orange-100); }
.chip-dev { background: var(--blue-50); color: var(--blue); border-color: #CFE0F3; }
.chip-done { background: var(--navy-50); color: var(--navy); border-color: #D6DDE7; }
.chip-high { background: var(--red-50); color: var(--red); border-color: #F6CDB8; }
.chip-medium { background: var(--orange-50); color: var(--orange-700); border-color: var(--orange-100); }
.chip-low { background: #F1F3F6; color: var(--navy-600); border-color: var(--line-strong); }
.chip-none { background: var(--teal-50); color: var(--teal-700); border-color: var(--teal-100); }
.chip-neutral { background: #F1F3F6; color: var(--navy-600); }

/* ---------- Skill Proficiency Indicator ---------- */
.prof { display: inline-flex; align-items: center; gap: .55rem; }
.pips { display: inline-grid; grid-template-columns: repeat(4, 10px); gap: 3px; }
.pips i { height: 8px; border-radius: 2px; background: #E1E6ED; }
.pips i.on { background: var(--teal); }
.pips.req i.on { background: var(--navy); }
.pips.self i.on { background: repeating-linear-gradient(135deg, var(--teal) 0 2px, #9CD6C9 2px 4px); }
.prof .t { font-size: .8rem; font-weight: 600; color: var(--navy); min-width: 78px; }

/* ---------- Gap Comparison Row ---------- */
.gap-list { display: flex; flex-direction: column; }
.gap-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr) auto; gap: 1rem; align-items: center; padding: .85rem 1.25rem; border-top: 1px solid var(--line); }
.gap-row:first-child { border-top: 0; }
.gap-row .name { font-weight: 650; color: var(--navy); }
.gap-row .expl { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.gap-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; position: relative; }
.gap-track span { height: 10px; border-radius: 3px; background: #EBEEF3; position: relative; }
.gap-track span.cur { background: var(--teal); }
.gap-track span.miss { background: repeating-linear-gradient(135deg, #FBD9C6 0 4px, #FDEEE6 4px 8px); outline: 1px solid #F6CDB8; }
.gap-track span.miss.p-medium { background: repeating-linear-gradient(135deg, var(--orange-100) 0 4px, var(--orange-50) 4px 8px); outline-color: var(--orange-100); }
.gap-track span.miss.p-low { background: repeating-linear-gradient(135deg, #DCE2EA 0 4px, #F1F3F6 4px 8px); outline-color: var(--line-strong); }
.gap-track span.req-mark::after { content: ""; position: absolute; right: -3px; top: -4px; bottom: -4px; width: 2px; background: var(--navy); border-radius: 2px; }
.gap-scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: .68rem; color: var(--muted); margin-top: .3rem; }
.gap-legend { display: flex; gap: 1rem; font-size: .75rem; color: var(--muted); flex-wrap: wrap; }
.gap-legend i { display: inline-block; width: 14px; height: 8px; border-radius: 2px; margin-right: .3rem; vertical-align: middle; }

/* ---------- Capability Journey Path ---------- */
.journey { display: grid; grid-template-columns: repeat(6, 1fr); position: relative; counter-reset: step; }
.journey::before { content: ""; position: absolute; top: 21px; left: 8.33%; right: 8.33%; height: 3px; background: linear-gradient(90deg, var(--teal), var(--teal) 50%, var(--orange)); border-radius: 3px; opacity: .25; }
.journey .progress-line { position: absolute; top: 21px; left: 8.33%; height: 3px; background: linear-gradient(90deg, var(--teal), var(--orange)); border-radius: 3px; }
.journey-step { text-align: center; position: relative; padding: 0 .25rem; }
.journey-step .node { width: 45px; height: 45px; margin: 0 auto .6rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-strong); color: var(--muted); font-family: var(--font-head); font-weight: 750; position: relative; z-index: 1; }
.journey-step.done .node { background: var(--teal); border-color: var(--teal); color: #fff; }
.journey-step.current .node { border-color: var(--orange); color: var(--orange-700); background: var(--orange-50); box-shadow: 0 0 0 5px rgba(242, 160, 0, .15); }
.journey-step .lbl { font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: .9rem; }
.journey-step .desc { font-size: .76rem; color: var(--muted); margin-top: .2rem; line-height: 1.35; }
.journey-step a { color: inherit; }

/* ---------- Growth Ledger Timeline ---------- */
.ledger { position: relative; padding-left: 0; list-style: none; margin: 0; }
.ledger-group { margin-bottom: 1.4rem; }
.ledger-period { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-head); font-weight: 750; color: var(--navy); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .6rem; }
.ledger-period::before { content: ""; width: 18px; height: 3px; border-radius: 2px; background: var(--orange); }
.ledger-item { display: grid; grid-template-columns: 96px 28px minmax(0, 1fr); gap: .5rem; position: relative; }
.ledger-item .when { font-size: .76rem; color: var(--muted); text-align: right; padding-top: .55rem; }
.ledger-item .rail { position: relative; display: flex; justify-content: center; }
.ledger-item .rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--line); }
.ledger-item:first-child .rail::before { top: 14px; }
.ledger-item:last-child .rail::before { bottom: calc(100% - 14px); }
.ledger-item .dot { width: 14px; height: 14px; border-radius: 50%; margin-top: .6rem; position: relative; z-index: 1; background: var(--surface); border: 3px solid var(--line-strong); }
.ledger-item.e-entry .dot { border-color: var(--navy); }
.ledger-item.e-self_assessed .dot { border-color: #9AA7B8; border-style: dashed; }
.ledger-item.e-acquired .dot { border-color: var(--blue); }
.ledger-item.e-applied .dot { border-color: var(--orange); }
.ledger-item.e-verified .dot { border-color: var(--teal); background: var(--teal); }
.ledger-item.e-advanced .dot { border-color: var(--orange); background: var(--orange); }
.ledger-item.e-verification_declined .dot { border-color: var(--red); }
.ledger-item .body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .8rem; margin-bottom: .55rem; }
.ledger-item .body .top { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; flex-wrap: wrap; }
.ledger-item .skill { font-weight: 700; color: var(--navy); }
.ledger-item .ev { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ledger-item .levels { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; color: var(--navy-600); margin-top: .2rem; }
.ledger-item .levels .to { color: var(--teal-700); }
.ledger-item .meta { font-size: .78rem; color: var(--muted); margin-top: .25rem; }
.ledger.compact .ledger-item { grid-template-columns: 70px 22px minmax(0, 1fr); }
.ledger.compact .body { padding: .45rem .65rem; }

/* ---------- Evidence Card ---------- */
.evidence { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: .8rem; align-items: start; padding: .9rem 1.1rem; border-top: 1px solid var(--line); }
.evidence:first-child { border-top: 0; }
.evidence .ico { width: 42px; height: 42px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--accent-50); color: var(--accent-700); }
.evidence .ico.cert { background: var(--orange-50); color: var(--orange-700); }
.evidence .ico.proj { background: var(--teal-50); color: var(--teal-700); }
.evidence .ttl { font-weight: 650; color: var(--navy); }
.evidence .meta { font-size: .78rem; color: var(--muted); margin-top: .1rem; }

/* ---------- Course card (Course-to-Skill Link) ---------- */
.course-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.course-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.course-card .cc-top { padding: 1rem 1.1rem .8rem; flex: 1; }
.course-card .provider { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.course-card h3 { margin: .3rem 0 .45rem; font-size: 1rem; line-height: 1.3; }
.course-card h3 a { color: var(--navy); }
.course-card .skills-line { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .55rem; }
.skill-tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 600; color: var(--teal-700); background: var(--teal-50); border-radius: 4px; padding: .15rem .45rem; }
.skill-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.skill-tag.gap::before { background: var(--orange); }
.course-card .cc-meta { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); font-size: .76rem; }
.course-card .cc-meta div { padding: .55rem .7rem; color: var(--navy-600); }
.course-card .cc-meta div + div { border-left: 1px solid var(--line); }
.course-card .cc-meta b { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.course-meta-line { display: flex; flex-wrap: wrap; gap: .25rem .5rem; color: var(--muted); font-size: .8rem; }
.course-meta-line span + span::before { content: "·"; margin-right: .5rem; color: var(--line-strong); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: #FAFBFC; white-space: nowrap; }
.table td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFBFD; }
.table .primary { font-weight: 650; color: var(--navy); }
.table .sub { font-size: .76rem; color: var(--muted); }
.table td.actions { text-align: right; white-space: nowrap; }

.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding: .85rem 1.25rem; border-bottom: 1px solid var(--line); }
.toolbar .input, .toolbar .select { min-height: 36px; padding: .4rem .6rem; width: auto; min-width: 150px; }
.toolbar .search { flex: 1; min-width: 200px; position: relative; }
.toolbar .search .input { width: 100%; padding-left: 2rem; }
.toolbar .search .icon { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); color: var(--muted); }

.pagination { display: flex; gap: .3rem; align-items: center; justify-content: space-between; padding: .75rem 1.25rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.pagination .pages { display: flex; gap: .3rem; }
.pagination a, .pagination span.cur { min-width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--navy); padding: 0 .5rem; }
.pagination span.cur { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Progress ---------- */
.progress { height: 8px; background: #E9EDF2; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), #2BB79C); border-radius: 99px; }
.progress.orange > span { background: var(--orange); }
.progress.navy > span { background: var(--navy); }
.progress-ring { --p: 0; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--teal) calc(var(--p) * 1%), #E9EDF2 0); }
.progress-ring::before { content: attr(data-label); width: 72px; height: 72px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-family: var(--font-head); font-weight: 750; font-size: 1.25rem; color: var(--navy); }

/* Learning status stepper */
.stepper { display: flex; gap: 3px; }
.stepper span { flex: 1; height: 6px; border-radius: 2px; background: #E6EAF0; }
.stepper span.on { background: var(--teal); }
.stepper-labels { display: flex; justify-content: space-between; font-size: .68rem; color: var(--muted); margin-top: .3rem; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 2.4rem 1.5rem; }
.empty .mark { width: 64px; height: 64px; margin: 0 auto 1rem; position: relative; }
.empty .mark i { position: absolute; border-radius: 50%; }
.empty .mark i:nth-child(1) { width: 18px; height: 18px; left: 10px; top: 4px; background: var(--teal); }
.empty .mark i:nth-child(2) { width: 18px; height: 18px; right: 10px; top: 4px; background: var(--orange); }
.empty .mark b { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent; border-bottom: 24px solid var(--navy); }
.empty h3 { margin-bottom: .35rem; }
.empty p { color: var(--muted); max-width: 440px; margin: 0 auto 1rem; font-size: .88rem; }

/* ---------- Flash ---------- */
.flashes { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.1rem; }
.flash { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem 1rem; border-radius: var(--radius-sm); border: 1px solid; font-size: .88rem; }
.flash-success { background: var(--teal-50); border-color: var(--teal-100); color: var(--teal-700); }
.flash-error, .flash-danger { background: var(--red-50); border-color: #F6CDB8; color: var(--red); }
.flash-info { background: var(--blue-50); border-color: #CFE0F3; color: var(--blue); }
.flash-warning { background: var(--orange-50); border-color: var(--orange-100); color: var(--orange-700); }
.flash .x { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .6; }

.note { padding: .75rem 1rem; border-radius: var(--radius-sm); background: var(--navy-50); color: var(--navy-600); font-size: .84rem; display: flex; gap: .6rem; align-items: flex-start; }
.note.orange { background: var(--orange-50); color: var(--orange-700); }
.note.teal { background: var(--teal-50); color: var(--teal-700); }

/* ---------- Definition list ---------- */
.dl { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: .55rem 1rem; font-size: .88rem; margin: 0; }
.dl dt { color: var(--muted); font-weight: 600; }
.dl dd { margin: 0; color: var(--ink); }

.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; overflow-x: auto; }
.tabs a { padding: .65rem .9rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: .88rem; }
.tabs a:hover { color: var(--navy); text-decoration: none; }
.tabs a.active { color: var(--navy); border-color: var(--accent); }
.tabs a .count { background: var(--navy-50); color: var(--navy-600); border-radius: 99px; padding: 0 .45rem; font-size: .72rem; margin-left: .3rem; }

.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-50); color: var(--accent-700); font-weight: 700; font-size: .78rem; flex: none; font-family: var(--font-head); }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.person { display: flex; align-items: center; gap: .65rem; }
.person .n { font-weight: 650; color: var(--navy); line-height: 1.25; }
.person .r { font-size: .76rem; color: var(--muted); }

/* ==========================================================================
   Application shell
   ========================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; }
.sidebar .brand { display: flex; align-items: center; gap: .65rem; padding: 1.05rem 1.2rem; border-bottom: 1px solid var(--line); }
.brand-mark { width: 46px; height: auto; border-radius: 4px; }
.brand-word { font-family: var(--font-head); font-weight: 800; font-size: 1.12rem; color: var(--navy); letter-spacing: -.02em; line-height: 1; }
.brand-word .r { color: var(--orange); }
.brand-word .s { color: var(--teal); }
.ws-label { display: block; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--accent); margin-top: .3rem; }
.nav { padding: .8rem .7rem 1rem; flex: 1; }
.nav-section { font-size: .66rem; text-transform: uppercase; letter-spacing: .09em; color: #93A1B3; font-weight: 700; padding: .9rem .6rem .35rem; }
.nav a { display: flex; align-items: center; gap: .65rem; padding: .5rem .65rem; border-radius: var(--radius-sm); color: var(--navy-600); font-weight: 550; font-size: .875rem; position: relative; text-decoration: none; }
.nav a:hover { background: var(--canvas); color: var(--navy); }
.nav a.active { background: var(--accent-50); color: var(--accent-700); font-weight: 650; }
.nav a.active::before { content: ""; position: absolute; left: -.7rem; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav a .badge { margin-left: auto; background: var(--orange); color: var(--navy-800); font-size: .68rem; font-weight: 750; border-radius: 99px; padding: 0 .45rem; line-height: 1.5; }
.sidebar .side-foot { padding: .9rem 1.1rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.sidebar .org-chip { display: flex; align-items: center; gap: .55rem; padding: .55rem .65rem; border-radius: var(--radius-sm); background: var(--canvas); }
.sidebar .org-chip .sq { width: 28px; height: 28px; border-radius: 6px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .75rem; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; display: flex; align-items: center; gap: 1rem; padding: 0 1.75rem; background: rgba(245, 247, 250, .9); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); }
.topbar .crumbs { font-size: .82rem; color: var(--muted); display: flex; gap: .4rem; align-items: center; min-width: 0; overflow: hidden; white-space: nowrap; }
.topbar .crumbs a { color: var(--muted); }
.topbar .crumbs .sep { color: var(--line-strong); }
.topbar .crumbs .here { color: var(--navy); font-weight: 600; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.icon-btn { width: 38px; height: 38px; border-radius: var(--radius-sm); display: grid; place-items: center; color: var(--navy-600); background: transparent; border: 0; position: relative; cursor: pointer; }
.icon-btn:hover { background: var(--surface); color: var(--navy); }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; min-width: 16px; height: 16px; border-radius: 99px; background: var(--orange); color: var(--navy-800); font-size: .62rem; font-weight: 800; display: grid; place-items: center; padding: 0 3px; border: 2px solid var(--canvas); }
.menu { position: relative; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 230px; padding: .4rem; z-index: 40; }
.menu-panel a, .menu-panel button { display: flex; width: 100%; align-items: center; gap: .55rem; padding: .5rem .65rem; border-radius: var(--radius-sm); color: var(--navy-600); font: 500 .86rem var(--font-ui); background: none; border: 0; cursor: pointer; text-align: left; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--canvas); text-decoration: none; }
.menu-head { padding: .55rem .65rem .65rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.user-btn { display: flex; align-items: center; gap: .5rem; padding: .25rem .35rem .25rem .25rem; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.user-btn .avatar { width: 30px; height: 30px; font-size: .72rem; }
.user-btn .nm { font-size: .82rem; font-weight: 600; color: var(--navy); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-toggle { display: none; }

.content { padding: 1.6rem 1.75rem 3rem; max-width: 1320px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.page-head .eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: var(--accent); margin-bottom: .35rem; display: flex; align-items: center; gap: .4rem; }
.page-head p.lead { color: var(--muted); margin: .4rem 0 0; max-width: 680px; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Welcome band (employee overview top area) */
.welcome { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; align-items: center; background: var(--navy); color: #fff; border-radius: var(--radius-lg); padding: 1.5rem 1.75rem; position: relative; overflow: hidden; margin-bottom: 1.1rem; }
.welcome h1 { color: #fff; font-size: 1.45rem; }
.welcome .ctx { color: #B8C4D3; font-size: .88rem; margin-top: .3rem; }
.welcome .ctx b { color: #fff; font-weight: 600; }
.welcome .shape { position: absolute; right: -40px; top: -60px; width: 260px; height: 260px; opacity: .14; pointer-events: none; }
.welcome .btn { position: relative; z-index: 1; }
.welcome.ws-org-band { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-800) 100%); }

/* Bar chart (pure CSS, with tabular data alongside) */
.hbar { display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr) 56px; gap: .75rem; align-items: center; padding: .5rem 0; font-size: .85rem; }
.hbar .track { height: 12px; background: #EDF0F4; border-radius: 3px; overflow: hidden; display: flex; }
.hbar .track span { display: block; height: 100%; }
.hbar .track .met { background: var(--teal); }
.hbar .track .open { background: repeating-linear-gradient(135deg, var(--orange-100) 0 4px, var(--orange-50) 4px 8px); }
.hbar .val { text-align: right; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.chart-box { position: relative; height: 260px; }
details.data-table summary { cursor: pointer; font-size: .8rem; color: var(--teal-700); font-weight: 600; padding: .4rem 0; }

/* Queue item */
.queue-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; padding: .85rem 1.25rem; border-top: 1px solid var(--line); align-items: center; }
.queue-item:first-child { border-top: 0; }
.queue-item .t { font-weight: 650; color: var(--navy); }
.queue-item .m { font-size: .78rem; color: var(--muted); }

/* Request summary card (IDEATION §5.9) */
.request-sheet { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.request-sheet .rs-head { background: var(--navy); color: #fff; padding: .9rem 1.2rem; display: flex; justify-content: space-between; align-items: center; }
.request-sheet .rs-head h3 { color: #fff; }
.request-sheet .dl { padding: 1.1rem 1.2rem; }

/* Timeline (request audit trail) */
.trail { list-style: none; margin: 0; padding: 0; }
.trail li { position: relative; padding: 0 0 1rem 1.4rem; font-size: .84rem; }
.trail li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.trail li::after { content: ""; position: absolute; left: 7px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.trail li:last-child::after { display: none; }
.trail .who { font-weight: 650; color: var(--navy); }

/* ==========================================================================
   Public site
   ========================================================================== */
.pub-nav { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.pub-nav .inner { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; height: 68px; display: flex; align-items: center; gap: 1.5rem; }
.pub-nav .brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.pub-nav .cta { margin-left: auto; display: flex; gap: .5rem; align-items: center; }
.pub-auth { display: flex; gap: .5rem; align-items: center; }
.pub-menu { position: relative; }
.pub-menu-btn { display: inline-flex; align-items: center; gap: .45rem; height: 40px; padding: 0 .95rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--navy); font: inherit; font-weight: 600; font-size: .875rem; cursor: pointer; transition: border-color .15s, background .15s; }
.pub-menu-btn > span { display: inline-flex; }
.pub-menu-btn:hover, .pub-menu-btn.is-open { border-color: var(--teal-700); background: var(--canvas); }
.pub-menu-btn:focus-visible, .pub-menu-panel a:focus-visible { outline: 2px solid var(--teal-700); outline-offset: 2px; }
.pub-menu-panel { position: absolute; right: 0; top: calc(100% + .6rem); width: 320px; max-width: calc(100vw - 2rem); max-height: calc(100vh - 90px); overflow-y: auto; padding: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 40px rgba(15, 30, 60, .16); z-index: 40; transform-origin: top right; }
.pub-menu-head { margin: .35rem .65rem .4rem; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--navy-600); opacity: .7; }
.pub-menu-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pub-menu-panel li a { display: flex; align-items: center; gap: .75rem; padding: .55rem .65rem; border-radius: var(--radius-sm); color: var(--navy); text-decoration: none; position: relative; }
.pub-menu-panel li a:hover { background: var(--canvas); }
.pm-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--canvas); color: var(--navy-600); }
.pm-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.pm-txt strong { font-size: .9rem; font-weight: 600; }
.pm-txt small { font-size: .76rem; color: var(--navy-600); opacity: .8; }
.pub-menu-panel li a.active { background: var(--canvas); }
.pub-menu-panel li a.active::before { content: ""; position: absolute; left: 0; top: .55rem; bottom: .55rem; width: 3px; border-radius: 3px; background: var(--teal-700); }
.pub-menu-panel li a.active strong, .pub-menu-panel li a.active .pm-ic { color: var(--teal-700); }
.pub-menu-foot { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .5rem; padding: .65rem .15rem .15rem; border-top: 1px solid var(--line); }
.pub-menu-foot .btn { justify-content: center; }
.pub-menu-foot .btn:only-child { grid-column: 1 / -1; }
.pub-menu-foot .pm-signin { border: 1px solid var(--line); }
.pm-enter, .pm-leave { transition: opacity .14s ease, transform .14s ease; }
.pm-from { opacity: 0; transform: translateY(-6px) scale(.98); }
.pm-to { opacity: 1; transform: none; }
@media (max-width: 640px) {
  .pub-auth { display: none; }
  .pub-menu-panel { position: fixed; left: 1rem; right: 1rem; top: 76px; width: auto; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .pm-enter, .pm-leave { transition: none; } }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4.5rem 0; }
.section-tight { padding: 3rem 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.dark { background: var(--navy); color: #CBD5E1; }
.section.dark h2, .section.dark h3 { color: #fff; }
.kicker { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 750; color: var(--teal); margin-bottom: .6rem; display: flex; align-items: center; gap: .5rem; }
.kicker::before { content: ""; width: 22px; height: 3px; background: var(--orange); border-radius: 2px; }
.section-title { font-size: 2rem; font-weight: 780; max-width: 720px; }
.section-lead { color: var(--muted); font-size: 1.04rem; max-width: 640px; margin-top: .7rem; }
.section.dark .section-lead { color: #AEBBCB; }

.hero { padding: 4.5rem 0 3.5rem; position: relative; overflow: hidden; background:
  radial-gradient(700px 360px at 85% 10%, rgba(21, 155, 131, .10), transparent 70%),
  radial-gradient(500px 300px at 100% 80%, rgba(242, 160, 0, .10), transparent 70%), var(--canvas); }
.hero .inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.hero h1 { font-size: 3.05rem; font-weight: 800; line-height: 1.06; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero h1 .o { color: var(--orange); }
.hero .lead { font-size: 1.12rem; color: var(--navy-600); margin: 1.1rem 0 1.6rem; max-width: 540px; }
.hero .ctas { display: flex; gap: .7rem; flex-wrap: wrap; }
.hero .tagline { margin-top: 1.6rem; font-size: .84rem; color: var(--muted); display: flex; align-items: center; gap: .55rem; }
.hero .tagline b { color: var(--navy); }

/* Hero visual: a capability card stack drawn from the documented Power BI example */
.hero-visual { position: relative; }
.hv-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 20px 50px -20px rgba(38, 54, 75, .28); padding: 1.2rem 1.3rem; }
.hv-card + .hv-card { margin-top: .9rem; }
.hv-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; color: var(--muted); }
.hv-float { position: absolute; right: -14px; bottom: -22px; width: 230px; }
.hv-path { display: flex; align-items: center; gap: .4rem; margin-top: .7rem; flex-wrap: wrap; }
.hv-path span { font-size: .74rem; font-weight: 650; padding: .3rem .55rem; border-radius: 5px; background: var(--canvas); color: var(--navy-600); }
.hv-path span.on { background: var(--teal-50); color: var(--teal-700); }
.hv-path span.now { background: var(--orange-50); color: var(--orange-700); }
.hv-path .arr { color: var(--line-strong); font-size: .8rem; padding: 0; background: none; }

.journey-big .journey-step .node { width: 58px; height: 58px; font-size: 1rem; }
.journey-big .journey::before, .journey-big .journey .progress-line { top: 28px; }
.journey-big .journey-step .lbl { font-size: 1rem; }

.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.cat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .4rem; color: inherit; transition: border-color .15s, transform .15s; }
.cat-card:hover { border-color: var(--teal); text-decoration: none; transform: translateY(-2px); }
.cat-card .ci { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-700); }
.cat-card:nth-child(4n+2) .ci { background: var(--orange-50); color: var(--orange-700); }
.cat-card:nth-child(4n+3) .ci { background: var(--navy-50); color: var(--navy); }
.cat-card h3 { font-size: .98rem; margin-top: .35rem; }
.cat-card .cnt { font-size: .78rem; color: var(--muted); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 1.2rem 0 1.5rem; display: grid; gap: .65rem; }
.ticks li { display: flex; gap: .6rem; align-items: flex-start; color: var(--navy-600); }
.ticks li .icon { color: var(--teal); margin-top: 2px; }
.section.dark .ticks li { color: #CBD5E1; }
.section.dark .ticks li .icon { color: var(--orange); }

.compare { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.compare > div { padding: 1.2rem 1.4rem; }
.compare > div:first-child { background: #FAFBFC; border-right: 1px solid var(--line); }
.compare h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .8rem; }
.compare ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .9rem; }
.compare li { display: flex; gap: .5rem; align-items: center; }
.compare .old li { color: var(--muted); }
.compare .new li { color: var(--navy); font-weight: 600; }
.compare .new li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex: none; }
.compare .old li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; }

.pathway { display: flex; flex-direction: column; gap: 0; counter-reset: pw; }
.pathway .pw { counter-increment: pw; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); column-gap: 1rem; align-items: start; position: relative; padding-bottom: .9rem; }
.pathway .pw:last-child { padding-bottom: 0; }
.pathway .pw::before { content: counter(pw); grid-row: 1 / span 2; width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: var(--orange); background: rgba(255, 255, 255, .06); border: 1.5px solid var(--orange); position: relative; z-index: 1; }
.pathway .pw:not(:last-child)::after { content: ""; position: absolute; left: calc(1.125rem - 1px); top: 2.25rem; bottom: 0; width: 2px; background: rgba(255, 255, 255, .15); }
.pathway .pw:last-child::before { background: var(--orange); color: var(--navy); }
.pathway .pw .k { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--orange); font-weight: 750; padding-top: .1rem; }
.pathway .pw .v { color: #fff; font-weight: 600; font-size: .95rem; margin-top: .15rem; line-height: 1.35; overflow-wrap: anywhere; }

.philosophy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.philosophy div { background: var(--surface); padding: 1.4rem; }
.philosophy .q { font-family: var(--font-head); font-size: 1.15rem; font-weight: 750; color: var(--navy); }
.philosophy .w { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); font-weight: 750; margin-bottom: .4rem; }

.footer { background: var(--navy-800); color: #9FB0C4; padding: 3rem 0 2rem; font-size: .86rem; }
.footer .cols { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2rem; }
.footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .8rem; }
.footer a { color: #C7D2DF; display: block; padding: .2rem 0; }
.footer .legal { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 2rem; padding-top: 1.2rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer .logo-tile { background: #fff; border-radius: 8px; padding: .35rem .5rem; display: inline-flex; align-items: center; gap: .5rem; }

.page-hero { padding: 3.2rem 0 2.4rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: 2.3rem; font-weight: 800; letter-spacing: -.03em; max-width: 760px; }
.page-hero .lead { color: var(--muted); font-size: 1.05rem; max-width: 660px; margin-top: .7rem; }

/* Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth .side { background: var(--navy); color: #C9D3E0; padding: 2.5rem 3rem; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth .side h2 { color: #fff; font-size: 1.9rem; font-weight: 780; line-height: 1.15; max-width: 420px; }
.auth .side .shape { position: absolute; right: -80px; bottom: -80px; width: 380px; opacity: .1; }
.auth .formside { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; background: var(--canvas); }
.auth .box { width: 100%; max-width: 460px; }
.auth .box h1 { font-size: 1.6rem; }
.role-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1.2rem; }
.role-cards input { position: absolute; opacity: 0; }
.role-cards label { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .8rem .7rem; cursor: pointer; background: var(--surface); display: flex; flex-direction: column; gap: .35rem; font-size: .76rem; color: var(--muted); }
.role-cards label b { color: var(--navy); font-size: .86rem; }
.role-cards input:checked + label { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); background: var(--teal-50); }
.role-cards input:focus-visible + label { outline: 2px solid var(--orange); }

/* Print-friendly reports */
@media print {
  .sidebar, .topbar, .no-print, .page-head .actions { display: none !important; }
  .app { display: block; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(3) { border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero .inner, .split { grid-template-columns: 1fr; gap: 2.2rem; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); z-index: 60; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(28, 41, 58, .4); z-index: 50; }
  .menu-toggle { display: grid; }
  .grid-main, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .topbar { padding: 0 1rem; }
  .content { padding: 1.2rem 1rem 3rem; }
  .gap-row { grid-template-columns: 1fr; gap: .5rem; }
  .auth { grid-template-columns: 1fr; }
  .auth .side { display: none; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
  .compare { grid-template-columns: 1fr; }
  .compare > div:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
  .philosophy { grid-template-columns: 1fr; }
  .hv-float { position: static; width: auto; margin-top: .9rem; }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .grid-4, .metrics { grid-template-columns: 1fr 1fr; }
  .metric .v { font-size: 1.5rem; }
  .journey { grid-template-columns: repeat(3, 1fr); row-gap: 1.2rem; }
  .journey::before, .journey .progress-line { display: none; }
  .cat-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
  .section { padding: 3rem 0; }
  .section-title { font-size: 1.55rem; }
  .role-cards { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; gap: .1rem; }
  .dl dd { margin-bottom: .55rem; }
  .ledger-item { grid-template-columns: 0 22px minmax(0, 1fr); }
  .ledger-item .when { display: none; }
  .welcome { grid-template-columns: 1fr; }
  .user-btn .nm { display: none; }
  .pub-nav .cta .btn-outline { display: none; }
  .footer .cols { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 90px minmax(0, 1fr) 44px; }
}

/* Live search suggestions */
.suggest-wrap { position: relative; flex: 1; min-width: 0; }
.suggest-wrap > .input { width: 100%; }
.suggest-box { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50; background: #fff; border: 1px solid rgba(15, 30, 50, .12); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(15, 30, 50, .14); max-height: 360px; overflow-y: auto; padding: .3rem; }
.suggest-item { display: flex; align-items: center; gap: .75rem; padding: .6rem .7rem; border-radius: calc(var(--radius) - 2px); text-decoration: none; color: var(--navy); }
.suggest-item:hover, .suggest-item.is-active { background: rgba(240, 140, 0, .1); }
.suggest-type { flex: none; font-size: .65rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--orange); max-width: 7rem; line-height: 1.25; }
.suggest-text { display: flex; flex-direction: column; min-width: 0; }
.suggest-label { font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-sub { font-size: .78rem; color: #6B7A8F; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-empty { padding: .7rem; font-size: .85rem; color: #6B7A8F; }

/* Sign In / Register switch */
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 1.5rem; background: var(--navy-50); border: 1px solid var(--line); border-radius: var(--radius); }
.auth-switch a { display: block; text-align: center; padding: .75rem; border-radius: var(--radius-sm); font-weight: 700; font-size: .95rem; color: var(--navy); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: background .15s, color .15s, border-color .15s, box-shadow .15s; }
.auth-switch a:hover { border-color: var(--teal-700); color: var(--teal-700); text-decoration: none; }
.auth-switch a.on, .auth-switch a.on:hover { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 4px 12px rgba(21, 155, 131, .3); }
.auth-switch a:focus-visible { outline: 2px solid var(--teal-700); outline-offset: 2px; }
.back-home { display: inline-flex; align-items: center; gap: .3rem; color: var(--navy-600); }
.back-home:hover { color: var(--teal-700); }


/* ==========================================================================
   Motion: scroll reveal, hover lift, hero entrance
   Reveal classes are only added by app.js, so content is visible without JS.
   ========================================================================== */
@keyframes sb-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes sb-pop { 0% { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.08); } 100% { opacity: 1; transform: none; } }
@keyframes sb-fill { from { transform: scaleX(0); } to { transform: none; } }
@keyframes sb-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.rv-wait { opacity: 0; }
.rv-in { animation: sb-rise .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--rv-delay, 0ms); }
.journey-step.rv-in { animation: none; opacity: 1; }
.journey-step.rv-in .node { animation: sb-pop .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--rv-delay, 0ms); }
.rv-in .progress > span { transform-origin: left; animation: sb-fill .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--rv-delay, 0ms) + 150ms); }

/* Hero entrance */
.js .hero .inner > div:first-child > * { animation: sb-rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.js .hero .inner > div:first-child > *:nth-child(2) { animation-delay: 80ms; }
.js .hero .inner > div:first-child > *:nth-child(3) { animation-delay: 160ms; }
.js .hero .inner > div:first-child > *:nth-child(4) { animation-delay: 240ms; }
.js .hero .inner > div:first-child > *:nth-child(5) { animation-delay: 320ms; }
.js .hero-visual { animation: sb-rise .7s .25s cubic-bezier(.2, .7, .2, 1) both; }
.hv-float { animation: sb-float 6s ease-in-out 1.2s infinite; }

/* Hover lift on clickable and showcase cards */
.course-card, .cat-card, .pub .card-pad, a.card { transition: transform .22s cubic-bezier(.2, .7, .2, 1), box-shadow .22s, border-color .22s; }
.course-card:hover, .pub .card-pad:hover, a.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(28, 41, 58, .1); border-color: rgba(21, 155, 131, .35); }
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(28, 41, 58, .08); }
.cat-card .ci { transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.cat-card:hover .ci { transform: scale(1.1) rotate(-4deg); }
.btn { transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s; }
.btn-primary:hover, .btn-accent:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(21, 155, 131, .25); }
.btn:active { transform: none; }

@media (hover: none) {
  .course-card:hover, .pub .card-pad:hover, a.card:hover, .cat-card:hover, .btn-primary:hover, .btn-accent:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rv-wait { opacity: 1; }
  .rv-in, .rv-in .node, .rv-in .progress > span,
  .js .hero .inner > div:first-child > *, .js .hero-visual, .hv-float { animation: none !important; }
  .course-card:hover, .pub .card-pad:hover, a.card:hover, .cat-card:hover, .cat-card:hover .ci,
  .btn-primary:hover, .btn-accent:hover { transform: none; }
}

/* ==========================================================================
   Responsive refinements
   ========================================================================== */
html, body { overflow-x: clip; }
img, video { max-width: 100%; height: auto; }
.card h2, .card h3, .course-card h3, .cat-card h3, .page-head h1 { overflow-wrap: anywhere; }
.table-wrap { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }

@media (max-width: 900px) {
  .page-hero h1 { font-size: 2rem; }
  .hero { padding: 3rem 0 2.5rem; }
}
@media (max-width: 640px) {
  .container { padding: 0 1rem; }
  .hero h1 { font-size: 2rem; letter-spacing: -.03em; }
  .hero .lead { font-size: 1.02rem; }
  .hero .ctas .btn { flex: 1 1 100%; justify-content: center; }
  .page-hero { padding: 2.2rem 0 1.8rem; }
  .page-hero h1 { font-size: 1.65rem; }
  .page-hero .lead, .section-lead { font-size: .98rem; }
  .section-tight { padding: 2.2rem 0; }
  .section-title { font-size: 1.4rem; }
  .section-tight .row-between { gap: 1rem; }
  .card-pad { padding: 1.05rem; }
  .card-head, .card-body { padding-left: 1rem; padding-right: 1rem; }
  .card-head { flex-wrap: wrap; }
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: 1.4rem; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1 1 auto; justify-content: center; }
  .queue-item { grid-template-columns: 1fr !important; padding: .85rem 1rem; }
  .queue-item > :last-child { justify-self: start; }
  .compare > div, .philosophy div { padding: 1.1rem; }
}
@media (max-width: 420px) {
  .grid-4, .metrics { grid-template-columns: 1fr; }
  .metric + .metric { border-left: 0; border-top: 1px solid var(--line); }
  .journey { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 1.8rem; }
  .auth-switch a { padding: .6rem; font-size: .88rem; }
}

/* Grid children may shrink below their content (wide tables scroll inside their card instead of widening the page). */
.split > *, .hero .inner > *, .grid > *, .grid-main > * { min-width: 0; }


/* ==========================================================================
   Smoothness: page transitions, scrolling, sticky-bar depth
   ========================================================================== */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: sb-vt-out .18s ease both; }
::view-transition-new(root) { animation: sb-vt-in .28s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes sb-vt-out { to { opacity: 0; } }
@keyframes sb-vt-in { from { opacity: 0; transform: translateY(6px); } }
.pub-nav { view-transition-name: sb-pubnav; }
@media (min-width: 901px) {
  .sidebar { view-transition-name: sb-sidebar; }
  .topbar { view-transition-name: sb-topbar; }
}

html { scroll-behavior: smooth; }
.pub-nav, .topbar { transition: box-shadow .25s ease, background .25s ease; }
.is-scrolled .pub-nav, .is-scrolled .topbar { box-shadow: 0 6px 20px rgba(28, 41, 58, .08); }
.metric .v { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
}


/* ==========================================================================
   Long-form pages (About, Privacy, Terms): ledger-styled documents
   ========================================================================== */
.doc-hero { position: relative; overflow: hidden; background: var(--navy); color: #C9D3E0; padding: 4rem 0 3.2rem; }
.doc-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(520px 260px at 92% 0%, rgba(242, 160, 0, .18), transparent 70%),
              radial-gradient(640px 320px at 0% 100%, rgba(21, 155, 131, .22), transparent 70%); }
.doc-hero::after { content: ""; position: absolute; right: -40px; bottom: -120px; width: 320px; height: 320px; pointer-events: none;
  background: linear-gradient(135deg, transparent 49.5%, rgba(255, 255, 255, .05) 50%); transform: rotate(8deg); }
.doc-hero .container { position: relative; z-index: 1; }
.doc-hero .kicker { color: #7FD6C4; }
.doc-hero h1 { color: #fff; font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; max-width: 820px; }
.doc-hero h1 em { font-style: normal; color: var(--orange); }
.doc-hero .lead { font-size: 1.08rem; max-width: 680px; margin-top: 1rem; color: #B9C5D4; }
.doc-stamp { display: flex; flex-wrap: wrap; margin-top: 2rem; border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; width: fit-content; max-width: 100%; background: rgba(255, 255, 255, .03); }
.doc-stamp > div { padding: .7rem 1.1rem; min-width: 0; }
.doc-stamp > div + div { border-left: 1px dashed rgba(255, 255, 255, .16); }
.doc-stamp small { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #8EA0B6; font-weight: 700; }
.doc-stamp b { color: #fff; font-weight: 650; font-size: .92rem; }

.doc-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 3.5rem; padding: 3.5rem 0 4.5rem; align-items: start; }
.doc-toc { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; }
.doc-toc > p { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 750; color: var(--muted); margin: 0 0 .8rem; }
.doc-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); counter-reset: toc; }
.doc-toc li { counter-increment: toc; }
.doc-toc ol a { display: grid; grid-template-columns: 1.9rem 1fr; padding: .42rem .6rem .42rem .8rem; margin-left: -2px; border-left: 2px solid transparent;
  color: var(--navy-600); font-size: .86rem; line-height: 1.35; transition: color .2s, border-color .2s, background .2s; }
.doc-toc ol a::before { content: counter(toc, decimal-leading-zero); font-variant-numeric: tabular-nums; color: var(--line-strong); font-weight: 700; font-size: .78rem; padding-top: 1px; }
.doc-toc ol a:hover { text-decoration: none; color: var(--navy); background: var(--navy-50); }
.doc-toc ol a.is-active { color: var(--teal-700); border-left-color: var(--teal); font-weight: 650; background: var(--teal-50); }
.doc-toc ol a.is-active::before { color: var(--orange-600); }
.doc-toc-foot { margin-top: 1.4rem; padding: 1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: .84rem; color: var(--muted); line-height: 1.5; }
.doc-toc-foot b { display: block; color: var(--navy); margin-bottom: .25rem; }
.doc-toc-foot a { font-weight: 600; }

.doc { counter-reset: sec; max-width: 760px; font-size: 1rem; line-height: 1.75; color: #2A3646; }
.doc > section { counter-increment: sec; scroll-margin-top: 90px; padding-bottom: 2.6rem; margin-bottom: 2.6rem; border-bottom: 1px solid var(--line); }
.doc > section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.doc h2 { font-size: 1.55rem; font-weight: 780; letter-spacing: -.02em; line-height: 1.25; display: flex; gap: .8rem; align-items: baseline; margin: 0 0 1rem; }
.doc h2::before { content: "§" counter(sec, decimal-leading-zero); font-size: .8rem; font-weight: 800; color: var(--orange-600); letter-spacing: .04em; font-variant-numeric: tabular-nums; flex: none; }
.doc h3 { font-size: 1.08rem; font-weight: 720; margin: 1.6rem 0 .5rem; }
.doc p { margin: 0 0 1rem; }
.doc ul, .doc ol { padding-left: 1.2rem; margin: 0 0 1rem; }
.doc li { margin: .35rem 0; }
.doc li::marker { color: var(--teal); }
.doc strong { color: var(--navy); }
.doc p a, .doc li a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--teal-100); text-underline-offset: 3px; }
.doc p a:hover, .doc li a:hover { text-decoration-color: var(--teal); }

.tldr { display: grid; grid-template-columns: auto 1fr; gap: .9rem; padding: 1rem 1.15rem; margin: 0 0 1.4rem; border-radius: var(--radius); background: linear-gradient(90deg, var(--teal-50), rgba(232, 246, 242, .25)); border: 1px solid var(--teal-100); font-size: .95rem; line-height: 1.6; }
.tldr::before { content: "In short"; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-700); background: #fff; border: 1px solid var(--teal-100); border-radius: 999px; padding: .2rem .55rem; height: fit-content; white-space: nowrap; }

.doc-scroll { overflow-x: auto; margin: .4rem 0 1.4rem; }
.doc-table { width: 100%; min-width: 520px; border-collapse: separate; border-spacing: 0; font-size: .9rem; line-height: 1.5; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.doc-table th { text-align: left; background: var(--navy-50); color: var(--navy); font-weight: 700; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; padding: .7rem .9rem; }
.doc-table td { padding: .75rem .9rem; border-top: 1px solid var(--line); vertical-align: top; }
.doc-table td:first-child { font-weight: 650; color: var(--navy); width: 28%; }

.own-split { display: grid; grid-template-columns: 1fr 1fr; margin: .4rem 0 1.4rem; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.own-split > div { padding: 1.2rem 1.3rem; }
.own-split > div + div { border-left: 1px solid var(--line); background: #FBFCFD; }
.own-split h4 { margin: 0 0 .6rem; font-size: .95rem; display: flex; align-items: center; gap: .5rem; }
.own-split > div:first-child h4 { color: var(--teal-700); }
.own-split ul { margin: 0; font-size: .9rem; }

.rights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: .4rem 0 1.4rem; }
.rights > div { padding: 1rem 1.1rem 1rem 1.25rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); font-size: .9rem; line-height: 1.55; position: relative; }
.rights > div::after { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--orange); }
.rights b { display: block; color: var(--navy); margin-bottom: .2rem; font-size: .95rem; }

.doc-faq { margin-top: .4rem; display: grid; gap: .6rem; }
.doc-faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.doc-faq details[open] { border-color: var(--teal-100); box-shadow: var(--shadow); }
.doc-faq summary { cursor: pointer; list-style: none; padding: 1rem 1.15rem; font-weight: 680; color: var(--navy); display: flex; justify-content: space-between; gap: 1rem; align-items: center; font-size: .98rem; line-height: 1.4; }
.doc-faq summary::-webkit-details-marker { display: none; }
.doc-faq summary::after { content: "+"; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-50); color: var(--navy); font-weight: 600; transition: transform .25s, background .2s; }
.doc-faq details[open] summary::after { transform: rotate(45deg); background: var(--orange-50); color: var(--orange-700); }
.doc-faq details > div { padding: 0 1.15rem 1.1rem; color: #3A4758; font-size: .95rem; }
.doc-faq details > div p:last-child { margin-bottom: 0; }

.pull { margin: 1.8rem 0; padding: 1.3rem 1.5rem; border-radius: var(--radius-lg); background: var(--navy); color: #DCE4EE; font-family: var(--font-head); font-size: 1.2rem; font-weight: 650; line-height: 1.45; letter-spacing: -.01em; position: relative; }
.pull::before { content: ""; position: absolute; left: 1.5rem; top: -6px; width: 44px; height: 6px; background: var(--orange); border-radius: 3px 3px 0 0; }
.pull span { color: #7FD6C4; }

.stage-rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: .6rem 0 1.4rem; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.stage-rail > div { padding: 1rem .9rem; font-size: .84rem; line-height: 1.45; color: var(--muted); }
.stage-rail > div + div { border-left: 1px solid var(--line); }
.stage-rail b { display: block; color: var(--navy); font-size: .93rem; margin: .35rem 0 .15rem; }
.stage-rail i { font-style: normal; font-size: .7rem; font-weight: 800; color: var(--orange-600); letter-spacing: .08em; }
.stage-rail > div:nth-child(n+4) { background: linear-gradient(180deg, var(--teal-50), transparent); }

.doc-cta { margin-top: 1rem; padding: 1.6rem; border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: radial-gradient(300px 140px at 100% 0%, rgba(242, 160, 0, .12), transparent 70%), var(--surface);
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.doc-cta h3 { margin: 0; font-size: 1.15rem; }
.doc-cta p { margin: .25rem 0 0; color: var(--muted); font-size: .92rem; }
.doc-cta .btn { text-decoration: none; }

.doc-mobile-toc { display: none; }
@media (max-width: 960px) {
  .doc-wrap { grid-template-columns: 1fr; gap: 0; padding-top: 1.5rem; }
  .doc-toc { display: none; }
  .doc-mobile-toc { display: block; margin-bottom: 2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .doc-mobile-toc summary { padding: .85rem 1rem; font-weight: 700; color: var(--navy); cursor: pointer; }
  .doc-mobile-toc ol { margin: 0; padding: 0 1rem 1rem 2.2rem; font-size: .92rem; }
  .doc-mobile-toc li { margin: .35rem 0; }
}
@media (max-width: 640px) {
  .doc-hero { padding: 2.8rem 0 2.4rem; }
  .doc-stamp { width: 100%; }
  .doc-stamp > div { flex: 1 1 45%; }
  .doc-stamp > div + div { border-left: 0; }
  .doc { font-size: .97rem; }
  .doc h2 { font-size: 1.3rem; flex-direction: column; gap: .2rem; }
  .own-split, .rights { grid-template-columns: 1fr; }
  .own-split > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .stage-rail { grid-template-columns: 1fr; }
  .stage-rail > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .tldr { grid-template-columns: 1fr; gap: .5rem; }
}


/* ==========================================================================
   Responsiveness: instant touch feedback, press states, busy buttons, nav progress
   ========================================================================== */
a, button, .btn, input, select, textarea, label, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* Press feedback: quick on the way down, eased on the way back. */
.btn:active, .pub-menu-btn:active, .auth-switch a:active { transform: scale(.97); transition-duration: .06s; }
.course-card:active, .cat-card:active, a.card:active { transform: translateY(-1px) scale(.99); transition-duration: .08s; }

/* Hover colours fade instead of snapping. */
a { transition: color .15s ease; }
.nav a { transition: background .15s ease, color .15s ease; }
.nav a:active { background: var(--accent-50); }
.tabs a { transition: color .15s ease, border-color .2s ease; }
.table tbody tr { transition: background .12s ease; }
.input:focus, .input:focus-visible { transition-duration: .1s; }
:focus-visible { outline-offset: 2px; transition: outline-offset .12s ease; }

/* Mobile sidebar: natural easing and a fading scrim. */
@media (max-width: 900px) {
  .sidebar { transition: transform .28s cubic-bezier(.2, .8, .2, 1); will-change: transform; }
  .scrim { animation: sb-fade .2s ease both; }
}
@keyframes sb-fade { from { opacity: 0; } }

/* Flash messages slide in, and fade out when dismissed. */
.flash { animation: sb-flash-in .32s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes sb-flash-in { from { opacity: 0; transform: translateY(-6px); } }
.flash-leave { transition: opacity .18s ease, transform .18s ease; }
.flash-leave-start { opacity: 1; }
.flash-leave-end { opacity: 0; transform: translateY(-4px); }

/* Submitting button shows a spinner so the click is acknowledged straight away. */
.btn.is-busy { position: relative; pointer-events: none; color: transparent !important; }
.btn.is-busy > * { visibility: hidden; }
.btn.is-busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 1.05em; height: 1.05em; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--busy-c, #fff) var(--busy-c, #fff) transparent transparent; animation: sb-spin .6s linear infinite; }
.btn-outline.is-busy, .btn-ghost.is-busy { --busy-c: var(--navy); }
@keyframes sb-spin { to { transform: rotate(360deg); } }

/* Thin progress bar while the next page loads (appears only if loading takes a moment). */
.nav-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 1000; pointer-events: none;
  background: var(--accent); transform-origin: left; transform: scaleX(0); opacity: 0; }
.nav-progress.run { opacity: 1; transform: scaleX(.85); transition: transform 8s cubic-bezier(.1, .7, .1, 1), opacity .15s; }

@media (prefers-reduced-motion: reduce) {
  .btn:active, .course-card:active, .cat-card:active, a.card:active, .pub-menu-btn:active, .auth-switch a:active { transform: none; }
  .flash, .scrim { animation: none; }
  .nav-progress.run { transition: opacity .15s; }
}


/* ==========================================================================
   "Talk With Us" floating action button
   ========================================================================== */
.talk-fab { --tf-green: #1DAA61; --tf-green-dk: #168A4E; position: fixed; right: 20px; bottom: 20px; z-index: 70;
  display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; font-family: inherit; }
.talk-btn { display: inline-flex; align-items: center; gap: .55rem; height: 54px; padding: 0 1.25rem 0 1.05rem; border: 0; border-radius: 999px;
  background: var(--tf-green); color: #fff; font: inherit; font-weight: 700; font-size: .95rem; letter-spacing: .01em; cursor: pointer;
  box-shadow: 0 10px 24px rgba(29, 170, 97, .35), 0 2px 6px rgba(28, 41, 58, .12);
  transition: background .15s, transform .15s, box-shadow .2s; }
.talk-btn:hover { background: var(--tf-green-dk); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(29, 170, 97, .4), 0 2px 6px rgba(28, 41, 58, .12); }
.talk-btn:active { transform: scale(.96); transition-duration: .06s; }
.talk-btn:focus-visible { outline: 3px solid rgba(29, 170, 97, .45); outline-offset: 3px; }
.talk-btn-ic { width: 24px; height: 24px; flex: none; }

.talk-panel { width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 110px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 24px 60px rgba(28, 41, 58, .22); transform-origin: bottom right; overscroll-behavior: contain; }
.tf-enter, .tf-leave { transition: opacity .18s ease, transform .2s cubic-bezier(.2, .8, .2, 1); }
.tf-from { opacity: 0; transform: translateY(8px) scale(.96); }

.talk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; padding: 1rem 1rem .9rem 1.15rem;
  background: linear-gradient(135deg, var(--tf-green), #128C7E); color: #fff; border-radius: 17px 17px 0 0; }
.talk-title { font-family: "Plus Jakarta Sans", Inter, sans-serif; font-weight: 800; font-size: 1.08rem; }
.talk-sub { font-size: .8rem; opacity: .9; margin-top: .15rem; }
.talk-x { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; transition: background .15s; }
.talk-x:hover { background: rgba(255, 255, 255, .28); }
.talk-x svg, .talk-go { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.talk-list { padding: .5rem; display: grid; gap: .2rem; }
.talk-opt { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .75rem; border: 0; border-radius: 12px; background: none; font: inherit;
  text-align: left; color: var(--ink); cursor: pointer; text-decoration: none !important; transition: background .15s; }
.talk-opt:hover, .talk-opt:focus-visible { background: var(--canvas); }
.talk-opt:active { transform: scale(.985); }
.talk-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.talk-ic svg { width: 22px; height: 22px; }
.talk-ic.wa { background: #25D366; }
.talk-ic.em { background: #EA4335; }
.talk-ic.sp { background: var(--navy); }
.talk-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.talk-txt b { color: var(--navy); font-size: .95rem; }
.talk-txt small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talk-go { color: var(--muted); flex: none; transition: transform .15s; }
.talk-opt:hover .talk-go { transform: translateX(3px); color: var(--navy); }

.talk-form { padding: 1rem 1.1rem 1.1rem; display: grid; gap: .7rem; }
.talk-form label { display: grid; gap: .3rem; font-size: .82rem; font-weight: 600; color: var(--navy); }
.talk-form textarea { resize: vertical; min-height: 96px; }
.talk-who { margin: 0; font-size: .82rem; color: var(--muted); background: var(--canvas); padding: .55rem .7rem; border-radius: 8px; }
.talk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.talk-err { margin: 0; font-size: .82rem; color: var(--red); }
.talk-actions { display: flex; justify-content: space-between; gap: .5rem; }
.talk-sent { padding: 1.5rem 1.2rem; text-align: center; display: grid; justify-items: center; gap: .6rem; }
.talk-sent p { margin: 0; color: var(--ink); font-size: .9rem; }
.talk-check { width: 52px; height: 52px; border-radius: 50%; background: #E7F8EE; color: var(--tf-green); display: grid; place-items: center; }
.talk-check svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 640px) {
  .talk-fab { right: 14px; bottom: 14px; }
  .talk-btn { height: 50px; padding: 0 1.05rem 0 .9rem; font-size: .9rem; }
}
@media print { .talk-fab { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .tf-enter, .tf-leave { transition: opacity .12s; }
  .tf-from { transform: none; }
  .talk-btn:hover, .talk-btn:active, .talk-opt:active { transform: none; }
}

/* Admin support inbox */
.support-item > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.support-item > summary::-webkit-details-marker { display: none; }
.support-item[open] > summary { background: var(--canvas); }
.support-body { padding: .2rem 1.25rem 1.2rem; border-bottom: 1px solid var(--line); }
.support-msg { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--canvas); border-radius: 10px; padding: .85rem 1rem; margin: .5rem 0; color: var(--ink); }
.support-status { font-size: .74rem; font-weight: 700; padding: .15rem .6rem; border-radius: 99px; flex: none; }
.support-status.open { background: var(--orange-50); color: var(--orange-700); }
.support-status.resolved { background: var(--teal-50); color: var(--teal-700); }

/* Unread support messages: bold subject + orange pip until first opened */
.support-item.is-unread > summary .t { font-weight: 750; color: var(--navy); }
.support-item.is-unread > summary { box-shadow: inset 3px 0 0 var(--orange); }
.new-pip { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-right: .5rem; vertical-align: middle; }

/* ---------- Resources: guides & insights ---------- */
.rs-narrow { max-width: 880px; }
.crumbs { color: var(--muted); margin-bottom: .9rem; }
.crumbs span { margin: 0 .3rem; opacity: .6; }
.rs-hero { background: radial-gradient(900px 300px at 85% -10%, var(--teal-50), transparent 70%), radial-gradient(600px 240px at 0% 110%, var(--orange-50), transparent 70%), var(--surface); }
.rs-hero h1 em { font-style: normal; color: var(--teal); }
.rs-stats { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; list-style: none; padding: 0; margin: 1.4rem 0 0; color: var(--muted); font-size: .92rem; }
.rs-stats strong { color: var(--navy); font-family: var(--font-head); font-size: 1.25rem; margin-right: .25rem; }
.rs-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.rs-filter button { border: 1px solid var(--line-strong); background: var(--surface); color: var(--navy-600); padding: .45rem .95rem; border-radius: 999px; font: inherit; font-weight: 600; font-size: .86rem; cursor: pointer; transition: all .15s; }
.rs-filter button:hover { border-color: var(--teal); color: var(--teal-700); }
.rs-filter button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.rs-tag { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--teal-700); }
.rs-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.1rem; color: var(--muted); font-size: .84rem; margin-top: auto; }
.rs-meta > span { display: inline-flex; align-items: center; gap: .35rem; }
.rs-feature { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; padding: 2rem; margin-bottom: 1.4rem; border-radius: 18px; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-800) 100%); color: #DDE5EE; box-shadow: 0 18px 40px -24px rgba(38,54,75,.7); transition: transform .2s; }
.rs-feature:hover { transform: translateY(-2px); }
.rs-feature h2 { color: #fff; font-size: 1.7rem; margin: .5rem 0 .6rem; }
.rs-feature p { margin: 0 0 1rem; line-height: 1.6; }
.rs-feature .rs-tag { color: var(--orange); }
.rs-feature .rs-meta { color: #AFC0D2; }
.rs-journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; counter-reset: j; }
.rs-journey li { counter-increment: j; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: .7rem .6rem; color: #fff; font-weight: 600; font-size: .88rem; text-align: center; }
.rs-journey li::before { content: counter(j); display: block; color: var(--orange); font-family: var(--font-head); font-size: 1.1rem; }
.rs-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.1rem; }
.rs-card { position: relative; display: flex; flex-direction: column; gap: .55rem; padding: 1.4rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: inherit; transition: border-color .18s, box-shadow .18s, transform .18s; }
.rs-card:hover { border-color: var(--teal-100); box-shadow: 0 14px 30px -20px rgba(21,155,131,.55); transform: translateY(-2px); }
.rs-card h3 { font-size: 1.08rem; line-height: 1.35; }
.rs-card p { color: var(--muted); font-size: .9rem; line-height: 1.55; margin: 0 0 .4rem; }
.rs-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-700); }
.rs-card:nth-child(3n+2) .rs-ic { background: var(--orange-50); color: var(--orange-700); }
.rs-card:nth-child(3n) .rs-ic { background: var(--navy-50); color: var(--navy); }
.rs-go { margin-left: auto; color: var(--teal); transition: transform .18s; }
.rs-card:hover .rs-go { transform: translateX(3px); }
.rs-faq-wrap { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rs-faq-wrap h2 { font-size: 1.6rem; margin: .3rem 0 1.2rem; }
.rs-faq details { border-bottom: 1px solid var(--line); padding: .2rem 0; }
.rs-faq summary { cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative; font-weight: 600; color: var(--navy); }
.rs-faq summary::-webkit-details-marker { display: none; }
.rs-faq summary::after { content: "+"; position: absolute; right: .3rem; top: .8rem; font-size: 1.3rem; color: var(--teal); transition: transform .2s; }
.rs-faq details[open] summary::after { transform: rotate(45deg); }
.rs-faq details p { margin: 0 0 1.1rem; color: var(--navy-600); line-height: 1.7; }
.rs-cta { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.8rem 2rem; border-radius: 18px; background: linear-gradient(120deg, var(--teal-50), var(--orange-50)); border: 1px solid var(--teal-100); }
.rs-cta h2 { font-size: 1.35rem; margin: 0 0 .3rem; padding: 0; border: 0; }
.rs-cta p { margin: 0; color: var(--navy-600); }

/* article */
.rs-progress { position: sticky; top: 0; z-index: 60; height: 3px; }
.rs-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--orange)); }
.rs-art-hero h1 { font-size: 2.5rem; max-width: 820px; margin-top: .4rem; }
.rs-art-hero .rs-meta { margin-top: 1.1rem; }
.rs-layout { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: 3rem; justify-content: center; }
.rs-layout.no-toc { grid-template-columns: minmax(0, 760px); }
.rs-toc-in { position: sticky; top: 90px; max-height: calc(100vh - 120px); overflow: auto; }
.rs-toc-h { text-transform: uppercase; letter-spacing: .07em; font-weight: 700; margin-bottom: .6rem; }
.rs-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.rs-toc a { display: block; padding: .38rem .9rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.rs-toc a:hover { color: var(--navy); }
.rs-toc a.on { color: var(--teal-700); border-left-color: var(--teal); font-weight: 600; }
.prose { font-size: 1.06rem; line-height: 1.8; color: #2B3A4E; }
.prose > p:first-child { font-size: 1.15rem; color: var(--navy); }
.prose > h2 { font-size: 1.55rem; margin: 2.6rem 0 .9rem; scroll-margin-top: 90px; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.prose > h3 { font-size: 1.15rem; margin: 1.7rem 0 .5rem; scroll-margin-top: 90px; }
.prose p { margin: 0 0 1.1rem; }
.prose ul, .prose ol { margin: 0 0 1.3rem; padding-left: 1.3rem; }
.prose li { margin: .4rem 0; padding-left: .25rem; }
.prose ul li::marker { color: var(--teal); }
.prose ol li::marker { color: var(--orange-600); font-weight: 700; }
.prose strong { color: var(--navy); }
.prose .callout { margin: 1.5rem 0; padding: 1rem 1.2rem; border-left: 4px solid var(--orange); background: var(--orange-50); border-radius: 0 12px 12px 0; color: var(--navy); }
.prose > h3.faq-q { margin-top: 1.3rem; padding: 1rem 1.1rem .2rem; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; font-size: 1.04rem; }
.prose > h3.faq-q + p { padding: .4rem 1.1rem 1rem; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; color: var(--navy-600); }
.rs-cta-in { margin-top: 2.8rem; }

@media (max-width: 1000px) {
  .rs-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .rs-layout { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .rs-toc-in { position: static; max-height: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
}
@media (max-width: 700px) {
  .rs-feature { grid-template-columns: 1fr; padding: 1.4rem; gap: 1.2rem; }
  .rs-feature h2 { font-size: 1.35rem; }
  .rs-grid { grid-template-columns: 1fr; }
  .rs-art-hero h1 { font-size: 1.85rem; }
  .prose { font-size: 1rem; }
  .rs-cta { flex-direction: column; align-items: flex-start; padding: 1.4rem; }
}
