/* ==========================================================================
   Blueblack Learning Hub — design system
   Deep black + royal blue + sky, silver neutrals, controlled colourful accents.
   No framework, no build step. Mobile-first.
   ========================================================================== */

:root {
  /* Brand */
  --ink: #070a1c;
  --ink-2: #0e1333;
  --navy: #1b1f5e;
  --royal: #2741c8;
  --royal-600: #1f35a8;
  --royal-50: #eef1ff;
  --sky: #1fb2e8;
  --sky-50: #e8f7fd;
  --silver: #d9dde8;

  /* Accents */
  --violet: #7b61ff;
  --violet-50: #f1eeff;
  --emerald: #0fa872;
  --emerald-50: #e7f8f1;
  --amber: #e89a0c;
  --amber-50: #fff6e3;
  --coral: #e5484d;
  --coral-50: #fdecec;
  --pink: #e14fa3;

  /* Neutrals */
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #f9fafd;
  --line: #e3e6ef;
  --line-2: #eef0f6;
  --text: #0d1230;
  --text-2: #3b4263;
  --muted: #6a7192;

  /* System */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(13, 18, 48, .06);
  --shadow: 0 1px 2px rgba(13, 18, 48, .05), 0 8px 24px -8px rgba(13, 18, 48, .12);
  --shadow-lg: 0 24px 60px -20px rgba(13, 18, 48, .35);
  --ring: 0 0 0 3px rgba(39, 65, 200, .25);
  --grad-brand: linear-gradient(135deg, #1b1f5e 0%, #2741c8 55%, #1fb2e8 100%);
  --grad-ink: radial-gradient(1200px 500px at 85% -10%, rgba(31, 178, 232, .35), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(123, 97, 255, .30), transparent 60%), linear-gradient(180deg, #070a1c 0%, #0e1333 100%);
  --grad-silver: linear-gradient(180deg, #ffffff 0%, #eef0f6 100%);
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Roboto", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  --sidebar: 264px;
  --topbar-bg: rgba(245, 246, 251, .85);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
figure { margin: 0; }
a { color: var(--royal); text-decoration: none; }
a:hover { color: var(--royal-600); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; color: var(--text); }
h1 { font-size: clamp(1.7rem, 2.5vw, 2.2rem); font-weight: 750; }
h2 { font-size: clamp(1.35rem, 2vw, 1.65rem); font-weight: 720; }
h3 { font-size: 1.12rem; font-weight: 680; }
h4 { font-size: .98rem; font-weight: 650; }
p { margin: 0 0 1em; }
small, .small { font-size: .85rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
code, .mono { font-family: var(--mono); font-size: .88em; }
.icon { flex: none; vertical-align: middle; }
::selection { background: rgba(39, 65, 200, .18); }
:focus-visible { outline: 2px solid var(--royal); outline-offset: 2px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 760px; }
.container-md { max-width: 960px; }
.stack > * + * { margin-top: var(--gap, 1rem); }
.row { display: flex; gap: var(--gap, 12px); align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: var(--gap, 20px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 640px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); --gap: 12px; } .stat { padding: 14px; } .stat .stat-value { font-size: 1.25rem; } .stat .stat-icon { width: 28px; height: 28px; } }
@media (min-width: 1000px) { .grid-main { grid-template-columns: minmax(0, 1fr) 360px; } .grid-main.reverse { grid-template-columns: 320px minmax(0, 1fr); } }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.text-muted { color: var(--muted); } .text-2 { color: var(--text-2); }
.text-center { text-align: center; } .text-right { text-align: right; }
.text-success { color: var(--emerald); } .text-danger { color: var(--coral); } .text-warning { color: var(--amber); }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.nowrap { white-space: nowrap; }
.w-100 { width: 100%; }
.hide-mobile { display: none; }
@media (min-width: 760px) { .hide-mobile { display: initial; } .show-mobile { display: none !important; } }
.divider { height: 1px; background: var(--line); margin: 1.25rem 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 700; color: var(--royal); }
.lead { font-size: 1.1rem; color: var(--text-2); }

/* ---------- Buttons ---------- */
.btn {
  --b-bg: var(--surface); --b-fg: var(--text); --b-bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--b-bd); background: var(--b-bg); color: var(--b-fg);
  font: 600 .93rem/1 var(--font); cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: var(--b-fg); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn-primary { --b-bg: var(--royal); --b-fg: #fff; --b-bd: var(--royal); background-image: linear-gradient(135deg, #2741c8, #3150e0); }
.btn-primary:hover { --b-fg: #fff; box-shadow: 0 10px 24px -10px rgba(39, 65, 200, .7); }
.btn-dark { --b-bg: var(--ink); --b-fg: #fff; --b-bd: var(--ink); }
.btn-sky { --b-bg: var(--sky); --b-fg: #04243a; --b-bd: var(--sky); }
.btn-success { --b-bg: var(--emerald); --b-fg: #fff; --b-bd: var(--emerald); }
.btn-danger { --b-bg: var(--surface); --b-fg: var(--coral); --b-bd: #f3c3c5; }
.btn-danger:hover { --b-bg: var(--coral); --b-fg: #fff; }
.btn-ghost { --b-bg: transparent; --b-bd: transparent; --b-fg: var(--text-2); }
.btn-ghost:hover { --b-bg: var(--line-2); box-shadow: none; }
.btn-light { --b-bg: rgba(255, 255, 255, .1); --b-fg: #fff; --b-bd: rgba(255, 255, 255, .28); backdrop-filter: blur(6px); }
.btn-light:hover { --b-bg: rgba(255, 255, 255, .18); --b-fg: #fff; }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: .85rem; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--royal); font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.inline-form { display: inline; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 650; line-height: 1.5; background: var(--line-2); color: var(--text-2); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.badge-success { background: var(--emerald-50); color: #067a52; }
.badge-danger { background: var(--coral-50); color: #b42328; }
.badge-warning { background: var(--amber-50); color: #9a5d00; }
.badge-info { background: var(--royal-50); color: var(--royal-600); }
.badge-violet { background: var(--violet-50); color: #5a3fe0; }
.badge-sky { background: var(--sky-50); color: #0a6f95; }
.badge-neutral { background: var(--line-2); color: var(--text-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .84rem; color: var(--text-2); }
.chip-dark { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #dfe5ff; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-body { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.02rem; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card-hover { transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cfd5f5; }
.card-flat { box-shadow: none; }
.card-tint { background: linear-gradient(180deg, #fbfcff, #f4f6ff); border-color: #dfe4fb; }
.card + .card { margin-top: 20px; }
.grid > .card + .card, .grid-main > * > .card + .card { margin-top: 0; }

/* ---------- Stats ---------- */
.stat { position: relative; padding: 18px 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.stat > .row-between { flex-wrap: nowrap; align-items: flex-start; }
.stat .stat-label { font-size: .8rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat .stat-value { font-size: 1.7rem; font-weight: 760; letter-spacing: -.03em; margin-top: 4px; }
.stat .stat-hint { font-size: .8rem; color: var(--muted); }
.stat .stat-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--royal-50); color: var(--royal); }
.stat.tone-sky .stat-icon { background: var(--sky-50); color: #0a6f95; }
.stat.tone-violet .stat-icon { background: var(--violet-50); color: var(--violet); }
.stat.tone-success .stat-icon { background: var(--emerald-50); color: var(--emerald); }
.stat.tone-warning .stat-icon { background: var(--amber-50); color: var(--amber); }
.stat.tone-danger .stat-icon { background: var(--coral-50); color: var(--coral); }
.stat::after { content: ""; position: absolute; right: -40px; top: -40px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(39, 65, 200, .08), transparent 70%); }
a.stat { color: inherit; text-decoration: none; }
a.stat:hover { border-color: #c9d0f4; box-shadow: var(--shadow); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table-compact td, .table-compact th { padding: 8px 12px; }
@media (max-width: 700px) {
  .table-stack thead { display: none; }
  .table-stack tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .table-stack td { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
  .table-stack td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; }
  .table-stack td.actions { justify-content: flex-end; }
}
dl.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 10px 16px; margin: 0; font-size: .92rem; }
dl.kv dt { color: var(--muted); font-weight: 600; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 16px; }
.field > label, .label { display: block; font-weight: 620; font-size: .88rem; margin-bottom: 6px; color: var(--text); }
.field .help { font-size: .8rem; color: var(--muted); margin-top: 5px; }
.field .error, .error-text { font-size: .82rem; color: var(--coral); margin-top: 5px; font-weight: 550; }
.req { color: var(--coral); }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font: 400 .95rem/1.4 var(--font); transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 110px; resize: vertical; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236a7192' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }
select[multiple].input { background-image: none; padding-right: 14px; min-height: 120px; }
.input:focus { outline: none; border-color: var(--royal); box-shadow: var(--ring); }
.input.is-invalid { border-color: var(--coral); }
.input[readonly] { background: var(--surface-2); }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; background: var(--surface-2); border: 1px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); color: var(--muted); font-weight: 600; }
.input-group .input { border-radius: 0 var(--radius) var(--radius) 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; margin-bottom: 10px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--royal); flex: none; }
.form-grid { display: grid; gap: 0 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 650; font-size: .92rem; margin-bottom: 8px; padding: 0; }

/* Choice tiles (radio/checkbox cards) */
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tile span { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); font-weight: 600; font-size: .9rem; transition: .15s; }
.tile span small { font-weight: 450; color: var(--muted); }
.tile input:checked + span { border-color: var(--royal); background: var(--royal-50); box-shadow: 0 0 0 3px rgba(39, 65, 200, .12); }
.tile input:focus-visible + span { box-shadow: var(--ring); }

/* Range with output */
input[type=range] { width: 100%; accent-color: var(--royal); }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: var(--radius); border: 1px solid; font-size: .92rem; margin-bottom: 16px; }
.alert .icon { margin-top: 1px; }
.alert-success { background: var(--emerald-50); border-color: #bfe9d6; color: #065f40; }
.alert-danger { background: var(--coral-50); border-color: #f5c6c8; color: #8f1d22; }
.alert-warning { background: var(--amber-50); border-color: #f5dea6; color: #7a4a00; }
.alert-info { background: var(--royal-50); border-color: #d4dbfb; color: #1c2c85; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------- Public site ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(7, 10, 28, .86); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .07); }
.site-header .inner { display: flex; align-items: center; gap: 20px; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 780; letter-spacing: -.02em; font-size: 1.08rem; text-decoration: none !important; }
.brand img { width: 38px; height: 38px; filter: drop-shadow(0 4px 10px rgba(31, 178, 232, .35)); }
.brand small { display: block; font-size: .64rem; letter-spacing: .22em; font-weight: 650; color: #8fa2ff; text-transform: uppercase; margin-top: -2px; }
.brand:hover { color: #fff; }
.site-nav { display: none; gap: 2px; margin-left: 10px; }
.site-nav a { color: #c8cff5; padding: 8px 10px; white-space: nowrap; border-radius: 999px; font-weight: 550; font-size: .92rem; }
.site-nav a:hover, .site-nav a.active { color: #fff; background: rgba(255, 255, 255, .08); text-decoration: none; }
.site-header .cta { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.mobile-nav { margin-left: auto; }
.mobile-nav > summary { list-style: none; cursor: pointer; color: #fff; padding: 8px; border-radius: 10px; }
.mobile-nav > summary::-webkit-details-marker { display: none; }
.mobile-nav[open] > summary { background: rgba(255, 255, 255, .1); }
.mobile-nav .panel { position: absolute; left: 0; right: 0; top: 70px; background: var(--ink); padding: 12px 20px 22px; border-bottom: 1px solid rgba(255, 255, 255, .08); box-shadow: var(--shadow-lg); }
.mobile-nav .panel { max-height: calc(100vh - 70px); overflow-y: auto; }
.mobile-nav .when-open, .mobile-nav[open] .when-closed { display: none; }
.mobile-nav[open] .when-open { display: inline; }

/* Main menu with click-to-open submenus */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; display: flex; align-items: center; gap: 4px; color: #c8cff5; padding: 8px 12px; border-radius: 999px; font-weight: 550; font-size: .92rem; cursor: pointer; white-space: nowrap; user-select: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown > summary:hover, .dropdown[open] > summary, .dropdown > summary.active { color: #fff; background: rgba(255, 255, 255, .08); }
.dropdown > summary:focus-visible, .accordion > summary:focus-visible, .nav-group-label:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.chev { transition: transform .18s ease; flex: none; }
details[open] > summary .chev { transform: rotate(180deg); }
.dropdown-panel { position: absolute; top: calc(100% + 10px); left: 0; min-width: 240px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 80; animation: drop .14s ease-out; }
.dropdown-panel.wide { min-width: 460px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 4px; }
.dropdown-panel a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--text); font-size: .9rem; font-weight: 550; white-space: nowrap; }
.dropdown-panel a .icon { color: var(--royal); flex: none; }
.dropdown-panel a:hover, .dropdown-panel a[aria-current] { background: var(--bg); text-decoration: none; color: var(--royal); }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dropdown-panel, .nav-sub { animation: none !important; } .chev { transition: none; } }
.accordion { border-bottom: 1px solid rgba(255, 255, 255, .06); }
.accordion > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 13px 0; color: #fff; font-weight: 650; cursor: pointer; }
.accordion > summary::-webkit-details-marker { display: none; }
.accordion > summary .chev { margin-left: auto; color: #8fa2ff; }
.accordion-body { padding: 0 0 10px 28px; }
.mobile-nav .panel .accordion-body a { display: block; padding: 9px 0; border: 0; color: #c8cff5; font-weight: 500; }
.mobile-nav .panel .row { margin-top: 14px; }
.mobile-nav .panel .row a { display: inline-flex; }
@media (min-width: 1024px) { .site-nav { display: flex; } .mobile-nav { display: none; } }
@media (max-width: 1023px) { .site-header .cta { display: none; } }

.hero { position: relative; color: #fff; background: var(--grad-ink); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 75%); }
.hero .container { position: relative; padding-top: 72px; padding-bottom: 84px; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5.2vw, 3.9rem); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; max-width: 14ch; }
.hero h1 .accent { background: linear-gradient(90deg, #7fd8ff, #8f9bff 50%, #c2a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: #c6cdf0; max-width: 56ch; font-size: 1.14rem; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }
.hero-card { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius-xl); padding: 22px; backdrop-filter: blur(10px); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.hero-search { display: grid; gap: 10px; grid-template-columns: 1fr; background: var(--surface); padding: 10px; border-radius: 20px; box-shadow: var(--shadow-lg); margin-top: 28px; max-width: 720px; }
.hero-search .input { border: 0; background: var(--surface-2); }
@media (min-width: 720px) { .hero-search { grid-template-columns: 1.3fr 1fr auto; } }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 30px; color: #b8c1ee; font-size: .88rem; }
.hero-stats strong { display: block; color: #fff; font-size: 1.45rem; letter-spacing: -.02em; }
.hero-logo { width: min(340px, 70vw); margin: 0 auto; display: block; filter: drop-shadow(0 30px 60px rgba(31, 178, 232, .35)); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .hero-logo { animation: none; } * { scroll-behavior: auto !important; } }

.section { padding: 76px 0; }
.section-sm { padding: 48px 0; }
.section-dark { background: var(--grad-ink); color: #dfe4ff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-tint { background: linear-gradient(180deg, #f5f7ff 0%, #fff 100%); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -.03em; }

.feature { padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); height: 100%; }
.feature .f-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--grad-brand); margin-bottom: 14px; box-shadow: 0 10px 20px -10px rgba(39, 65, 200, .8); }
.feature .f-icon.violet { background: linear-gradient(135deg, #6a4dff, #b06bff); }
.feature .f-icon.emerald { background: linear-gradient(135deg, #0a8f63, #2fd39b); }
.feature .f-icon.amber { background: linear-gradient(135deg, #ea8a00, #ffc24d); }
.feature .f-icon.coral { background: linear-gradient(135deg, #e5484d, #ff8a7a); }
.feature .f-icon.sky { background: linear-gradient(135deg, #0a8fc2, #4fd1ff); }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--text-2); margin: 0; font-size: .94rem; }
.section-dark .feature { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .1); }
.section-dark .feature p { color: #b9c2ea; }

.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.step { position: relative; padding: 22px 20px 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; font-weight: 800; font-size: .82rem; letter-spacing: .08em; color: var(--royal); margin-bottom: 10px; }
.step h3 { font-size: 1rem; margin-bottom: 4px; }
.step p { font-size: .9rem; color: var(--text-2); margin: 0; }

.cat-card { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.cat-card:hover { text-decoration: none; border-color: #c9d0f4; box-shadow: var(--shadow); color: var(--text); }
.cat-card .c-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.cat-card strong { display: block; }
.cat-card small { color: var(--muted); }

.cta-band { border-radius: var(--radius-xl); padding: 44px; background: var(--grad-brand); color: #fff; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #dbe3ff; max-width: 56ch; }

.quote-card { padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.quote-card blockquote { margin: 0 0 14px; font-size: 1rem; color: var(--text-2); }

.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 18px 24px; font-weight: 620; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary:hover { color: var(--royal); }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--royal); }
.faq details[open] summary::after { content: "–"; }
.faq .answer, .faq details > p { margin: 0; padding: 0 24px 20px; color: var(--text-2); line-height: 1.65; max-width: 72ch; }
@media (max-width: 560px) { .faq summary { padding: 16px 18px; } .faq .answer, .faq details > p { padding: 0 18px 18px; } }

.site-footer { background: var(--ink); color: #9aa4d4; padding: 56px 0 28px; font-size: .9rem; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.site-footer a { color: #c3cbf2; display: block; padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { display: inline-flex; align-items: center; padding: 0; color: #fff; }
.site-footer .brand span { line-height: 1.15; }
.site-footer .grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.site-footer .bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .82rem; }

.page-hero { background: var(--grad-ink); color: #cfd6ff; padding: 56px 0 48px; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -.03em; }
.page-hero p { max-width: 64ch; font-size: 1.05rem; }
.page-hero .lead, .profile-hero .lead { color: #cfd6ff; }
.prose { max-width: 72ch; font-size: 1rem; color: var(--text-2); }
.prose h2 { margin-top: 1.8em; } .prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }

/* ---------- Marketplace ---------- */
.market { display: grid; gap: 24px; }
@media (min-width: 1000px) { .market { grid-template-columns: 290px minmax(0, 1fr); } }
.filters { position: sticky; top: 90px; align-self: start; }
.filters .card-body { padding: 18px; }
.filter-toggle { display: block; }
@media (min-width: 1000px) { .filter-toggle > summary { display: none; } .filter-toggle:not([open]) > .card { display: block; } }
.tutor-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.tutor-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform .15s, box-shadow .2s, border-color .2s; }
.tutor-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cdd4f6; }
.tutor-card .tc-top { display: flex; gap: 14px; padding: 18px 18px 12px; }
.tutor-card .tc-body { padding: 0 18px 14px; flex: 1; }
.tutor-card .tc-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.tutor-card h3 { margin: 0; font-size: 1.05rem; }
.tutor-card .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .82rem; color: var(--muted); margin-top: 6px; }
.tutor-card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.price { font-weight: 760; font-size: 1.1rem; letter-spacing: -.02em; }
.price small { font-weight: 500; color: var(--muted); font-size: .78rem; }
.avatar { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-weight: 750; font-size: 1.2rem; color: #fff; background: var(--grad-brand); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 96px; height: 96px; border-radius: 26px; font-size: 2rem; }
.avatar-sm { width: 34px; height: 34px; border-radius: 10px; font-size: .82rem; }
.verified { display: inline-flex; align-items: center; gap: 4px; color: var(--emerald); font-size: .78rem; font-weight: 700; }
.stars { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .88rem; }
.stars .icon { color: #f5b301; fill: #f5b301; }
.trust { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.trust-exemplary { background: linear-gradient(90deg, #ecf0ff, #e9f8ff); color: #1c35b5; }
.trust-trusted { background: var(--emerald-50); color: #067a52; }
.trust-established { background: var(--sky-50); color: #0a6f95; }
.trust-emerging { background: var(--line-2); color: var(--text-2); }
.match-score { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--royal) calc(var(--p) * 1%), var(--line-2) 0); flex: none; }
.match-score span { width: 50px; height: 50px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: .95rem; }
.why { font-size: .88rem; color: var(--text-2); background: var(--royal-50); border-radius: var(--radius); padding: 10px 12px; margin-top: 10px; }
.component-bars { display: grid; gap: 7px; font-size: .8rem; }
.component-bars .cb { display: grid; grid-template-columns: 90px 1fr 36px; gap: 8px; align-items: center; }
.bar { height: 7px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--grad-brand); }

/* Radar (approximate location view) */
.radar { position: relative; aspect-ratio: 1; width: 100%; max-width: 420px; margin: 0 auto; border-radius: 50%; background: radial-gradient(circle, #0f1a4a 0%, #070a1c 70%); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), var(--shadow-lg); }
.radar svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.radar .sweep { transform-origin: 50% 50%; animation: sweep 6s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .radar .sweep { animation: none; } }

/* Profile */
.profile-hero { background: var(--grad-ink); color: #cdd4f7; padding: 44px 0 36px; }
.profile-hero h1 { color: #fff; margin: 0; }
.profile-hero .row { gap: 22px; }

/* ---------- App shell (portals + admin) ---------- */
.app { display: grid; min-height: 100vh; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .app { grid-template-columns: var(--sidebar) minmax(0, 1fr); background: linear-gradient(90deg, var(--ink) var(--sidebar), var(--bg) var(--sidebar)); } }
.sidebar { background: var(--ink); color: #aeb7e6; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 60; transform: translateX(-100%); transition: transform .2s ease; overflow-y: auto; background-image: radial-gradient(500px 300px at 0% 100%, rgba(123, 97, 255, .18), transparent 70%), radial-gradient(400px 300px at 100% 0%, rgba(31, 178, 232, .12), transparent 70%); }
.sidebar .brand { padding: 20px 20px 14px; }
.nav-toggle:checked ~ .sidebar { transform: none; box-shadow: var(--shadow-lg); }
.nav-toggle:checked ~ .scrim { display: block; }
.scrim { display: none; position: fixed; inset: 0; background: rgba(7, 10, 28, .5); z-index: 55; }
@media (min-width: 1024px) { .sidebar { position: sticky; top: 0; height: 100vh; transform: none; } .scrim, .nav-open-btn { display: none !important; } }
.nav-group { padding: 6px 12px; }
.nav-group-label { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: #6c77ad; font-weight: 700; padding: 12px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; color: #c4cbf0; font-weight: 550; font-size: .9rem; }
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-link.active { background: linear-gradient(90deg, rgba(39, 65, 200, .55), rgba(39, 65, 200, .15)); color: #fff; box-shadow: inset 2px 0 0 var(--sky); }
.nav-link .count { margin-left: auto; font-size: .72rem; font-weight: 700; background: var(--sky); color: #04243a; padding: 1px 7px; border-radius: 99px; }
.nav-link .count.warn { background: var(--amber); color: #3a2500; }
.sidebar-foot { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .07); font-size: .8rem; }
.nav-link .nav-text, .nav-group-label .nav-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Collapsible menu groups: click a heading to open its submenu */
.nav-collapsible { padding-top: 2px; padding-bottom: 2px; }
.nav-collapsible > .nav-group-label { list-style: none; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; cursor: pointer; user-select: none;
    color: #c4cbf0; font-size: .9rem; letter-spacing: 0; text-transform: none; font-weight: 650; }
.nav-collapsible > .nav-group-label::-webkit-details-marker { display: none; }
.nav-collapsible > .nav-group-label:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-collapsible > .nav-group-label.active { color: #fff; }
.nav-collapsible > .nav-group-label .chev { color: #6c77ad; }
.nav-collapsible > .nav-group-label .count { font-size: .72rem; font-weight: 700; background: var(--sky); color: #04243a; padding: 1px 7px; border-radius: 99px; }
.nav-collapsible[open] > .nav-group-label .count { display: none; }
.nav-sub { margin: 2px 0 6px 19px; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .1); animation: drop .14s ease-out; }
.nav-sub .nav-link { padding: 8px 10px; font-size: .87rem; }
.rail-btn { width: 100%; background: none; border: 0; cursor: pointer; font: inherit; font-size: .9rem; text-align: left; }
.rail-icon { transform: rotate(90deg); transition: transform .18s ease; }
.icon-btn.rail-top-btn { display: none; }
.fly-title { display: none; }
@media (max-width: 1023px) { .rail-btn { display: none; } }

/* Collapsed sidebar ("rail"): icons only, on large screens */
@media (min-width: 1024px) {
    .icon-btn.rail-top-btn { display: inline-grid; }
    :root.nav-rail { --sidebar: 76px; }
    .nav-rail .sidebar { overflow-x: hidden; }
    .nav-rail .sidebar .brand { padding: 20px 19px 14px; }
    .nav-rail .sidebar .brand span, .nav-rail .sidebar .nav-text, .nav-rail .sidebar .chev, .nav-rail .nav-link .count, .nav-rail .nav-sub { display: none; }
    .nav-rail .nav-group { padding-left: 10px; padding-right: 10px; }
    .nav-rail .nav-link, .nav-rail .nav-group-label { justify-content: center; position: relative; }
    .nav-rail .nav-group-label .count { display: block !important; position: absolute; top: 2px; right: 2px; padding: 0 5px; font-size: .62rem; }
    .nav-rail .nav-group-label.active { background: linear-gradient(90deg, rgba(39, 65, 200, .55), rgba(39, 65, 200, .15)); box-shadow: inset 2px 0 0 var(--sky); }
    .nav-rail .rail-icon { transform: rotate(-90deg); }
    /* Pop-out submenu next to the icon */
    .nav-rail .nav-collapsible.fly > .nav-group-label { background: rgba(255, 255, 255, .1); color: #fff; }
    .nav-rail .nav-collapsible.fly > .nav-sub { display: block; position: fixed; left: calc(var(--sidebar) + 8px); top: 80px; z-index: 90; min-width: 230px; margin: 0;
        padding: 10px 8px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; background: var(--ink-2); box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .6); animation: flyin .14s ease-out; }
    .nav-rail .fly .fly-title { display: block; padding: 4px 10px 8px; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: #6c77ad; font-weight: 700; }
    .nav-rail .fly .nav-sub .nav-link { justify-content: flex-start; }
    .nav-rail .fly .nav-sub .nav-text { display: block; }
    .nav-rail .fly .nav-sub .count { display: inline-block; }
}
@keyframes flyin { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 20px; background: var(--topbar-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .spacer { flex: 1; }
.topbar .who { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.topbar .who .avatar-sm { background: var(--grad-brand); }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--text-2); border: 1px solid transparent; background: transparent; cursor: pointer; }
.icon-btn:hover { background: var(--surface); border-color: var(--line); color: var(--text); text-decoration: none; }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--coral); color: #fff; font-size: .64rem; font-weight: 700; display: grid; place-items: center; }
.main { padding: 26px 20px 60px; max-width: 1400px; width: 100%; min-width: 0; }
@media (min-width: 760px) { .main { padding: 30px 32px 70px; } }
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-header h1 { margin: 0; font-size: 1.6rem; }
.page-header p { margin: 4px 0 0; color: var(--muted); }
.breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu .menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 70; }
.menu .menu-panel a, .menu .menu-panel button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border-radius: 8px; color: var(--text); font: 500 .9rem var(--font); background: none; border: 0; cursor: pointer; text-align: left; }
.menu .menu-panel a:hover, .menu .menu-panel button:hover { background: var(--bg); text-decoration: none; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; font-weight: 600; font-size: .9rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active, .tabs a:hover { color: var(--royal); border-color: var(--royal); text-decoration: none; }
.pill-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--line-2); flex-wrap: wrap; }
.pill-tabs a { padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--text-2); }
.pill-tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); text-decoration: none; }
.pill-tabs a:hover { text-decoration: none; }

/* Welcome banner in portals */
.welcome { position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: 28px; background: var(--grad-ink); color: #cdd4f7; margin-bottom: 24px; }
.welcome h1 { color: #fff; font-size: 1.6rem; margin-bottom: 4px; }
.welcome p { margin: 0; }
.welcome img:not(.avatar) { position: absolute; right: -30px; bottom: -40px; width: 200px; opacity: .22; }
.welcome .avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255, 255, 255, .25); }
.welcome .avatar-add { border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .06); color: #cdd4f7; }
.welcome .text-2 { color: #cdd4f7; }

/* Stepper (wizards, workflow progress) */
.stepper { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 24px; overflow-x: auto; }
.stepper li { flex: 1; min-width: 90px; font-size: .76rem; font-weight: 650; color: var(--muted); }
.stepper li::before { content: ""; display: block; height: 5px; border-radius: 99px; background: var(--line); margin-bottom: 8px; }
.stepper li.done::before { background: var(--emerald); }
.stepper li.current { color: var(--royal); }
.stepper li.current::before { background: var(--grad-brand); }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 26px; font-size: .88rem; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 1px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--royal); }
.timeline .when { color: var(--muted); font-size: .78rem; }

/* Checklist (tutor onboarding) */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.checklist li:last-child { border: 0; }
.checklist .tick { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--line-2); color: var(--muted); }
.checklist li.done .tick { background: var(--emerald); color: #fff; }
.checklist li.warn .tick { background: var(--amber); color: #fff; }
.checklist .grow { flex: 1; }

.progress { height: 10px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--grad-brand); border-radius: 99px; }

/* Empty states */
.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty .e-icon { width: 58px; height: 58px; border-radius: 18px; background: var(--royal-50); color: var(--royal); display: grid; place-items: center; margin: 0 auto 14px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }

/* Charts (inline SVG) */
.chart { width: 100%; height: auto; display: block; }
.chart text { font: 500 12px var(--font); fill: var(--muted); }
.chart .grid-line { stroke: var(--line-2); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr 64px; gap: 10px; align-items: center; font-size: .85rem; padding: 5px 0; }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Messages / chat */
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; padding: 4px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); font-size: .92rem; }
.bubble.mine { align-self: flex-end; background: var(--royal); color: #fff; border-color: var(--royal); }
.bubble .by { font-size: .74rem; opacity: .75; margin-bottom: 3px; }
.bubble.internal { background: var(--amber-50); border-color: #f2dba1; }

/* Quote / invoice document */
.doc { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line); padding: 34px; }
.doc-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 18px; margin-bottom: 20px; }
.doc .ref { font-family: var(--mono); font-size: 1.05rem; font-weight: 700; letter-spacing: .03em; background: var(--royal-50); color: var(--royal-600); padding: 6px 12px; border-radius: 8px; display: inline-block; }
.doc .total-row td { font-weight: 800; font-size: 1.05rem; border-top: 2px solid var(--ink); }
.bank-box { border: 1.5px dashed #b8c3f4; border-radius: var(--radius); padding: 16px 18px; background: #f8f9ff; }

/* Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--bg); }
@media (min-width: 980px) { .auth { grid-template-columns: 1fr 1fr; } }
.auth-aside { display: none; position: relative; overflow: hidden; background: var(--grad-ink); color: #cdd4f7; padding: 48px; }
@media (min-width: 980px) { .auth-aside { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-aside h2 { color: #fff; font-size: 2.2rem; letter-spacing: -.03em; max-width: 14ch; }
.auth-aside-body { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-start; height: 100%; gap: 40px; }
.auth-aside-body > small { margin-top: auto; }
.auth-aside h2, .auth-aside p { text-shadow: 0 2px 18px rgba(7, 10, 28, .6); }
/* Photo on the sign-in/sign-up panel: kept at its natural shape, faded into the brand colours */
.auth-photo { position: absolute; right: 0; bottom: 0; z-index: 0; height: 60%; width: auto; max-width: 70%; object-fit: contain; object-position: right bottom; opacity: .9;
    -webkit-mask-image: linear-gradient(to left, #000 45%, transparent 100%), linear-gradient(to top, #000 70%, transparent 100%); -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to left, #000 45%, transparent 100%), linear-gradient(to top, #000 70%, transparent 100%); mask-composite: intersect; }
.auth-photo.wide { height: auto; width: 88%; max-width: none; max-height: 58%; opacity: .6; }
.auth-aside::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(180deg, rgba(7, 10, 28, .55) 0%, rgba(7, 10, 28, 0) 45%, rgba(7, 10, 28, .35) 100%); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card .brand { color: var(--text); margin-bottom: 26px; }
.auth-card .brand small { color: var(--royal); }

/* Pagination */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 16px; font-size: .86rem; color: var(--muted); }
.pagination .pages { display: flex; gap: 4px; }
.pagination a, .pagination span.cur { min-width: 36px; height: 36px; display: grid; place-items: center; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-weight: 600; }
.pagination span.cur { background: var(--royal); border-color: var(--royal); color: #fff; }
.pagination a:hover { text-decoration: none; border-color: var(--royal); }

/* Print (quotes) */
@media print {
  .sidebar, .topbar, .site-header, .site-footer, .no-print, .scrim { display: none !important; }
  .app { display: block; } .main { padding: 0; } body { background: #fff; }
  .doc { border: 0; padding: 0; }
}


/* ---------- Light / dark mode ---------- */
.show-dark { display: none; }
:root[data-theme="dark"] .show-dark { display: inline-flex; }
:root[data-theme="dark"] .show-light { display: none; }
.theme-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; border: 1px solid transparent; background: transparent; cursor: pointer; }
.theme-btn.on-dark { color: #c8cff5; }
.theme-btn.on-dark:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.theme-choice { display: flex; align-items: center; gap: 4px; padding: 8px 10px; flex-wrap: wrap; }
.theme-choice-label { width: 100%; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.menu .menu-panel .theme-choice { border-top: 1px solid var(--line); margin-top: 4px; }
.menu .menu-panel .theme-choice button { width: auto; flex: 1; justify-content: center; padding: 7px 6px; font-size: .8rem; border: 1px solid var(--line); border-radius: 8px; gap: 5px; }
.theme-choice button[aria-pressed="true"] { border-color: var(--royal) !important; color: var(--royal) !important; background: var(--royal-50) !important; }
.theme-choice.on-dark { padding: 14px 0 0; }
.theme-choice.on-dark .theme-choice-label { color: #8f9bd0; }
.theme-choice.on-dark button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 6px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14); background: transparent; color: #dfe4ff; font: 600 .85rem var(--font); cursor: pointer; }
.theme-choice.on-dark button[aria-pressed="true"] { border-color: var(--sky) !important; color: #fff !important; background: rgba(31, 178, 232, .16) !important; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0d1f;
  --surface: #121733;
  --surface-2: #181e40;
  --line: #262d55;
  --line-2: #1d2346;
  --text: #e9ecfb;
  --text-2: #c4cae9;
  --muted: #8f97c2;
  --royal: #7189ff;
  --royal-600: #93a4ff;
  --royal-50: rgba(113, 137, 255, .15);
  --sky-50: rgba(31, 178, 232, .15);
  --violet-50: rgba(123, 97, 255, .18);
  --emerald-50: rgba(15, 168, 114, .17);
  --amber-50: rgba(232, 154, 12, .17);
  --coral-50: rgba(229, 72, 77, .17);
  --silver: #3a4270;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .55);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .75);
  --ring: 0 0 0 3px rgba(113, 137, 255, .35);
  --grad-silver: linear-gradient(180deg, #161c3c 0%, #121733 100%);
  --topbar-bg: rgba(10, 13, 31, .85);
}
:root[data-theme="dark"] .badge-success { color: #4fd8a4; }
:root[data-theme="dark"] .badge-danger { color: #ff8f93; }
:root[data-theme="dark"] .badge-warning { color: #ffc65c; }
:root[data-theme="dark"] .badge-violet { color: #b5a6ff; }
:root[data-theme="dark"] .badge-sky, :root[data-theme="dark"] .stat.tone-sky .stat-icon { color: #6fd3f7; }
:root[data-theme="dark"] .alert-success { border-color: rgba(15, 168, 114, .4); color: #8de8c4; }
:root[data-theme="dark"] .alert-danger { border-color: rgba(229, 72, 77, .45); color: #ffb3b6; }
:root[data-theme="dark"] .alert-warning { border-color: rgba(232, 154, 12, .45); color: #ffd58a; }
:root[data-theme="dark"] .alert-info { border-color: rgba(113, 137, 255, .4); color: #c3ccff; }
:root[data-theme="dark"] .btn-danger { --b-bd: rgba(229, 72, 77, .5); --b-fg: #ff8f93; }
:root[data-theme="dark"] .btn-primary { background-image: linear-gradient(135deg, #2741c8, #3a5af0); --b-bd: #3150e0; }
:root[data-theme="dark"] .card-tint, :root[data-theme="dark"] .bank-box { background: var(--surface-2); border-color: var(--line); }
:root[data-theme="dark"] .section-tint { background: linear-gradient(180deg, #0e1230 0%, var(--bg) 100%); }
:root[data-theme="dark"] .trust-exemplary { background: linear-gradient(90deg, rgba(113, 137, 255, .2), rgba(31, 178, 232, .2)); color: #c3ccff; }
:root[data-theme="dark"] .card-hover:hover, :root[data-theme="dark"] a.stat:hover { border-color: #3a4378; }
:root[data-theme="dark"] .bubble.internal { border-color: rgba(232, 154, 12, .4); }
:root[data-theme="dark"] .stat::after { background: radial-gradient(circle, rgba(113, 137, 255, .14), transparent 70%); }
:root[data-theme="dark"] select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238f97c2' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] .bubble.mine { background: #2741c8; border-color: #2741c8; }
:root[data-theme="dark"] ::selection { background: rgba(113, 137, 255, .35); }
@media print { :root[data-theme="dark"] { color-scheme: light; --bg: #fff; --surface: #fff; --surface-2: #f9fafd; --line: #e3e6ef; --line-2: #eef0f6; --text: #0d1230; --text-2: #3b4263; --muted: #6a7192; --royal: #2741c8; } }


/* ---------- Photography (never stretched: natural aspect ratio, cover only inside fixed frames) ---------- */
.photo { display: block; width: 100%; height: auto; }

/* Hero: framed study photo with floating cards */
.hero-photo { position: relative; margin: 8px 0 30px; }
.hero-photo::before { content: ""; position: absolute; z-index: 0; top: -40px; right: -30px; width: 70%; height: 80%; border-radius: 50%;
    background: radial-gradient(circle, rgba(31, 178, 232, .45), rgba(123, 97, 255, .15) 55%, transparent 72%); filter: blur(30px); }
.hero-photo .frame { position: relative; z-index: 1; border-radius: 28px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .85), 0 0 0 8px rgba(255, 255, 255, .03); }
.hero-photo .frame::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(7, 10, 28, 0) 50%, rgba(7, 10, 28, .6) 100%), linear-gradient(120deg, rgba(39, 65, 200, .22), transparent 45%); }
.hero-photo .hero-card { position: absolute; z-index: 2; left: -36px; bottom: -58px; max-width: 330px; padding: 16px 18px; background: rgba(14, 19, 51, .82); }
.float-badge { position: absolute; z-index: 2; top: 18px; right: -12px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px;
    background: rgba(255, 255, 255, .94); color: #0d1230; font-weight: 650; font-size: .85rem; box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .6); }
.float-badge .icon { color: #0fa872; }
@media (max-width: 979px) {
    .hero-photo { margin-top: 0; }
    .hero-photo .hero-card { position: relative; left: auto; bottom: auto; margin: -46px 14px 0; max-width: none; }
    .float-badge { right: 12px; top: 12px; }
}

/* Split section with the tutor portrait */
.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: .9fr 1.1fr; gap: 64px; } }
.portrait { position: relative; margin: 0 auto; max-width: 440px; width: 100%; padding: 0 0 10px; }
.portrait .photo { position: relative; z-index: 1; border-radius: 999px 999px 28px 28px; box-shadow: var(--shadow-lg);
    -webkit-mask-image: linear-gradient(180deg, #000 82%, rgba(0, 0, 0, .25) 100%); mask-image: linear-gradient(180deg, #000 82%, rgba(0, 0, 0, .25) 100%); }
.portrait-bg { position: absolute; z-index: 0; inset: 26px -22px -6px 30px; border-radius: 999px 999px 32px 32px; background: var(--grad-brand); opacity: .2; }
.portrait-bg::after { content: ""; position: absolute; width: 120px; height: 120px; left: -40px; top: 34%; border-radius: 50%; background: var(--sky); opacity: .35; filter: blur(30px); }
.float-stat { position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--surface);
    border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: .88rem; }
.float-stat strong { display: block; color: var(--text); }
.float-stat small { color: var(--muted); }
.float-stat.s1 { left: -24px; bottom: 22%; }
.float-stat.s2 { right: -46px; top: 30%; }
.fs-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #0a8f63, #2fd39b); flex: none; }
.fs-icon.amber { background: linear-gradient(135deg, #ea8a00, #ffc24d); }
@media (max-width: 560px) { .float-stat.s1 { left: 0; } .float-stat.s2 { right: 0; } }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.ticks .icon { color: var(--emerald); margin-top: 2px; }

/* Dark band with the team photo fading in from the right */
.team-band { position: relative; overflow: hidden; background: var(--grad-ink); color: #cdd4f7; }
.team-grid { display: grid; align-items: center; }
@media (min-width: 900px) { .team-grid { grid-template-columns: 1fr 1fr; min-height: 520px; } }
.team-copy { position: relative; z-index: 1; padding: 72px 0 32px; }
@media (min-width: 900px) { .team-copy { padding: 72px 0; } }
.team-copy h2 { color: #fff; }
.team-copy p { max-width: 50ch; }
.team-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px; max-width: 520px; }
.team-stats div { padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); }
.team-stats strong { display: block; color: #fff; font-size: 1.35rem; }
.team-stats span { font-size: .8rem; color: #aab4e4; }
.team-photo { margin: 0 -20px; opacity: .92;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%); mask-image: linear-gradient(180deg, transparent 0%, #000 22%); }
@media (min-width: 900px) {
    .team-photo { position: absolute; right: 0; top: 0; bottom: 0; width: 52%; margin: 0; display: flex; align-items: center;
        -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .55) 28%, #000 60%); mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .55) 28%, #000 60%); }
    .team-photo .photo { height: 100%; width: 100%; object-fit: cover; object-position: center 30%; }
}
@media (max-width: 480px) { .team-stats { grid-template-columns: 1fr; } }

/* ---------- Tutor application: progress tracker, steps and photo ---------- */
.progress-lg { height: 10px; }
.onboard { padding: 18px 20px; display: grid; gap: 14px; border-color: color-mix(in srgb, var(--royal) 25%, var(--line)); background: linear-gradient(180deg, var(--royal-50), var(--surface) 70%); }
.onboard-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.onboard-top h2 { font-size: 1.15rem; }
.onboard-pct { text-align: right; line-height: 1.1; }
.onboard-pct strong { display: block; font-size: 1.5rem; color: var(--royal); }
.onboard-pct span { font-size: .78rem; color: var(--muted); }
.onboard-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.onboard-steps a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
    color: var(--text-2); font-size: .82rem; font-weight: 600; text-decoration: none; }
.onboard-steps a:hover { border-color: var(--royal); color: var(--royal); }
.onboard-steps .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; background: var(--line-2); color: var(--muted); flex: none; }
.onboard-steps .done .dot { background: var(--emerald); color: #fff; }
.onboard-steps .done a { color: var(--text); }
.onboard-steps .current a { border-color: var(--royal); background: var(--royal); color: #fff; }
.onboard-steps .current .dot { background: #fff; color: var(--royal); }
.onboard-steps small { font-weight: 500; opacity: .75; }
.onboard-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.apply { overflow: hidden; }
.apply-head { display: flex; align-items: center; gap: 22px; padding: 22px; flex-wrap: wrap; background: linear-gradient(135deg, var(--royal-50), var(--sky-50)); border-bottom: 1px solid var(--line); }
.ring { --pct: 0; width: 96px; height: 96px; border-radius: 50%; flex: none; display: grid; place-items: center;
    background: conic-gradient(var(--royal) calc(var(--pct) * 1%), var(--line) 0); }
.ring span { width: 76px; height: 76px; border-radius: 50%; background: var(--surface); display: grid; place-content: center; text-align: center; line-height: 1.05; }
.ring strong { font-size: 1.35rem; color: var(--text); }
.ring small { font-size: .68rem; color: var(--muted); }
.apply-steps { list-style: none; margin: 0; padding: 6px 22px; }
.apply-steps li { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.apply-steps li:last-child { border-bottom: 0; }
.apply-steps .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: .85rem; background: var(--line-2); color: var(--muted); }
.apply-steps .done .num { background: var(--emerald); color: #fff; }
.apply-steps .next { background: linear-gradient(90deg, var(--royal-50), transparent 70%); margin: 0 -22px; padding: 13px 22px; }
.apply-steps .next .num { background: var(--royal); color: #fff; }
.apply-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 22px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
@media (max-width: 560px) { .apply-steps li { flex-wrap: wrap; } .apply-steps li .badge { margin-left: 44px; } }

.journey { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 760px) { .journey { grid-template-columns: repeat(4, 1fr); } }
.journey li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: .9rem; }
.journey .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--line-2); font-size: .8rem; }
.journey .done { color: var(--text); } .journey .done .num { background: var(--emerald); color: #fff; }
.journey .now { color: var(--royal); border-color: var(--royal); background: var(--royal-50); } .journey .now .num { background: var(--royal); color: #fff; }

.avatar-add { display: inline-grid; place-items: center; border: 2px dashed var(--line); background: var(--surface-2); color: var(--muted); }
.avatar-add:hover { border-color: var(--royal); color: var(--royal); }
.photo-pick { display: flex; justify-content: center; margin: 6px 0 4px; }
.photo-preview img, .photo-preview .placeholder { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
    border: 4px solid var(--surface); box-shadow: 0 0 0 2px var(--line), var(--shadow); background: var(--grad-brand); color: #fff; font-size: 2.4rem; font-weight: 750; }
.upload-note { font-size: .8rem; margin-top: 6px; }
.upload-note.ok { color: var(--emerald); } .upload-note.bad { color: var(--coral); font-weight: 600; }

/* Skills practitioners: roles, quality bodies, scope */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 2px 16px; margin-top: 8px; }
.choice-grid .check { margin-bottom: 6px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 4px; }
@media (min-width: 900px) { .form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-cloud .chip { color: var(--text); font-weight: 600; text-decoration: none; }
.chip-cloud .chip:hover { border-color: var(--royal); color: var(--royal); }
.chip .count { background: var(--royal-50); color: var(--royal); border-radius: 999px; padding: 0 7px; font-size: .74rem; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.role-tile, .body-tile { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
    color: var(--text); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.role-tile:hover, .body-tile:hover { border-color: var(--royal); box-shadow: var(--shadow); transform: translateY(-1px); text-decoration: none; }
.role-tile .f-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--royal-50); color: var(--royal); margin: 0; }
.role-tile strong, .role-tile small { display: block; } .role-tile small { color: var(--muted); }
.body-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.body-tile { flex-direction: column; align-items: stretch; gap: 4px; }
.reg-block + .reg-block { border-top: 1px solid var(--line-2); }
.quick-find .field { margin-bottom: 10px; }
.topic-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-top: 8px; background: var(--surface); }
.topic-group > summary { cursor: pointer; font-weight: 650; list-style: revert; }
.topic-group > summary .count { background: var(--royal-50); color: var(--royal); border-radius: 999px; padding: 0 8px; font-size: .76rem; margin-left: 6px; }
.topic-group .choice-grid { margin-top: 10px; }
.mt-0 { margin-top: 0; }

/* Search-facing pages: breadcrumbs, guides, link lists */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0 0 14px; font-size: .84rem; }
.crumbs li + li::before { content: "›"; margin: 0 6px 0 2px; opacity: .6; }
.crumbs a { color: inherit; opacity: .85; } .crumbs a:hover { opacity: 1; }
.page-hero .crumbs, .profile-hero .crumbs { color: #b8c2f0; }
.link-list { list-style: none; padding: 0; margin: 0; } .link-list li { padding: 5px 0; border-bottom: 1px solid var(--line-2); } .link-list li:last-child { border-bottom: 0; }
.steps-list { padding-left: 20px; } .steps-list li { margin-bottom: 8px; }
.guide-card { color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; } .guide-card:hover { border-color: var(--royal); transform: translateY(-1px); text-decoration: none; }
.guide-card h3 { font-size: 1.05rem; }
.guide-body h2 { margin-top: 1.8rem; scroll-margin-top: 80px; } .guide-body h3 { margin-top: 1.2rem; }
.toc { margin-bottom: 1.4rem; } .toc ol { margin: 8px 0 0; padding-left: 20px; } .toc li { margin: 3px 0; }
.byline { color: #b8c2f0; margin-top: 12px; }
.prose ol { padding-left: 22px; }
.how-strip { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.how-strip li { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.how-strip .num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--royal); color: #fff; font-weight: 700; font-size: .85rem; margin-bottom: 4px; }
.directory-list { list-style: none; padding: 0; margin: 0; columns: 3 280px; column-gap: 28px; }
.directory-list li { break-inside: avoid; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.brand small { white-space: nowrap; }

/* Document viewer (/files/{uuid}/view) */
.doc-view { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .doc-view { grid-template-columns: minmax(0, 1fr) 300px; } }
.doc-preview .card-head { flex-wrap: wrap; gap: 8px; }
.doc-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.doc-frame-wrap { background: var(--surface-2); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.doc-frame { display: block; width: 100%; height: 75vh; min-height: 420px; border: 0; background: #fff; }
.doc-image { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; object-fit: contain; }
.doc-side h3 { font-size: 1rem; }

/* Application documents: one row per document, each with its own upload */
.doc-steps { counter-reset: docstep; }
.doc-step > .card-head h2::before { counter-increment: docstep; content: counter(docstep); display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 10px; border-radius: 50%; background: var(--royal); color: #fff; font-size: .85rem; vertical-align: 2px; }
.doc-step-intro { color: var(--muted); margin: 0; }
.doc-row { padding: 16px 22px; border-top: 1px solid var(--line-2); }
.doc-row:first-child { border-top: 0; }
.doc-row-head { display: flex; gap: 12px; align-items: flex-start; }
.doc-row-icon { color: var(--muted); flex: none; margin-top: 2px; }
.doc-row-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.doc-row-status { flex: none; }
.doc-row-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 12px 0 0 32px; }
.doc-row-form .field { margin: 0; min-width: 0; }
.doc-row-form .field.grow { flex: 1 1 260px; }
.doc-row-form .btn { flex: none; }
.doc-row-replace { margin: 8px 0 0 32px; }
.doc-row-replace summary { cursor: pointer; color: var(--royal); font-weight: 600; }
.doc-row-replace .doc-row-form { margin-left: 0; }
@media (max-width: 640px) {
  .doc-row { padding: 14px 16px; }
  .doc-row-head { flex-wrap: wrap; }
  .doc-row-status { width: 100%; padding-left: 32px; }
  .doc-row-form, .doc-row-replace { margin-left: 0; }
  .doc-row-form .btn { width: 100%; }
}
.doc-extra > summary { list-style: none; cursor: pointer; }
.doc-extra > summary::-webkit-details-marker { display: none; }
.doc-extra[open] > summary svg { transform: rotate(180deg); }
.other-profile .row-between { flex-wrap: wrap; gap: 12px; }
.other-profile-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--line-2); color: var(--royal); flex: none; }
@media (max-width: 640px) { .apply-head .btn { white-space: normal; text-align: center; width: 100%; justify-content: center; } }
