/* ==========================================================================
   ROTBA — design system
   Colours are tokens: change them here and the whole site follows.
   BRITON: navy #101860 (main) + wine #791F1F (details). Other colours are shades of these two.
   ========================================================================== */
:root {
  /* BRITON palette — navy for big surfaces, wine for details; light fills are neutral grey only */
  --navy: #101860;
  --navy-strong: #0B1145;
  --navy-light: #2A3590;
  --wine: #791F1F;
  --wine-strong: #641A1A;
  --wine-dark: #501313;

  --bg: #F5F5F5;
  --surface: #FFFFFF;
  --surface-2: #FAFAFA;
  --ink: #1B1E2B;
  --muted: #4E5260;
  --border: #E3E3E3;
  --primary: var(--navy);
  --primary-strong: var(--navy-strong);
  --primary-soft: #EFEFEF;
  --accent: var(--wine);
  --accent-soft: #EFEFEF;
  --gold: var(--wine);
  --gold-soft: #EFEFEF;
  --success: var(--navy);
  --success-soft: #EFEFEF;
  --danger: var(--wine);
  --danger-soft: #EFEFEF;
  --info: var(--navy-light);
  --info-soft: #EFEFEF;
  --on-primary: #FFFFFF;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: none;
  --shadow-lg: 0 6px 20px rgba(16, 24, 96, .10);
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-head: "Noto Kufi Arabic", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --max: 1160px;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.75;
  background: var(--bg); color: var(--ink);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-strong); }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--primary); color: var(--on-primary);
  padding: 8px 14px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.4rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 38px; height: 38px; }
.brand-logo { display: block; height: 34px; width: auto; }
@media (max-width: 620px) { .brand-logo { height: 40px; } }
.nav-links { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav-links a { color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--surface); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--ink); font-weight: 500; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: var(--primary-soft); color: var(--primary-strong); }
.nav-toggle { display: none; margin-inline-start: auto; background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px; color: var(--ink); cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu { display: none; position: absolute; inset-inline: 0; top: 68px; background: var(--surface);
    border-bottom: 1px solid var(--border); padding: 12px 16px 20px; box-shadow: var(--shadow-lg);
    flex-direction: column; align-items: stretch; gap: 12px; }
  .nav-menu.open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; margin: 0; }
  .nav-actions { flex-direction: column; align-items: stretch; }
  .nav-actions .btn, .nav-actions form, .nav-actions form .btn { width: 100%; }
}
@media (min-width: 861px) {
  .nav-menu { display: flex; align-items: center; gap: 16px; flex: 1; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .98rem; line-height: 1;
  padding: 12px 20px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn-primary:hover { background: var(--primary-strong); color: var(--on-primary); }
.btn-accent { background: var(--wine); color: #fff; box-shadow: 0 6px 16px rgba(80, 19, 19, .25); }
.btn-accent:hover { filter: brightness(.95); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); color: var(--ink); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-success { background: var(--success-soft); color: var(--success); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- cards & layout ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }
.page { padding-block: 36px 64px; }   /* block only: keeps .container's side gutter */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.page-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }

/* ---------- pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-strong); white-space: nowrap; }
.pill-accent { background: var(--wine); color: #fff; }
.pill-gold { background: var(--gold-soft); color: var(--gold); }
.pill-muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.pill-success { background: var(--success-soft); color: var(--success); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }

/* ---------- flash messages ---------- */
.flashes { display: grid; gap: 10px; margin: 18px auto 0; }
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; animation: slideIn .35s ease both; }
.flash-success { background: var(--surface); color: var(--navy); border-inline-start: 4px solid var(--navy); }
.flash-error { background: var(--surface); color: var(--wine); border-inline-start: 4px solid var(--wine); }
.flash-info { background: var(--surface); color: var(--navy-light); border-inline-start: 4px solid var(--navy-light); }
.flash p { margin: 0; flex: 1; color: var(--ink); }
.flash-close { background: none; border: 0; color: inherit; cursor: pointer; padding: 2px; border-radius: 6px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .95rem; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .icon { position: absolute; inset-inline-start: 14px; color: var(--muted); pointer-events: none; }
.input {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface-2);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; padding-inline-start: 44px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.input:focus { outline: none; border-color: var(--primary); background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
/* LTR inputs (email, phone, password) inside the RTL page: the icon sits on the right, the eye button on the left */
[dir="rtl"] .input[dir="ltr"] { text-align: right; padding-right: 44px; padding-left: 14px; }
[dir="rtl"] .input[dir="ltr"].has-toggle { padding-left: 44px; }
.field.has-error .input { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .88rem; display: flex; gap: 6px; align-items: flex-start; }
.field-help { color: var(--muted); font-size: .86rem; }
.toggle-pass { position: absolute; inset-inline-end: 8px; background: none; border: 0; color: var(--muted); cursor: pointer;
  padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.toggle-pass:hover { color: var(--ink); background: var(--surface); }
.input.has-toggle { padding-inline-end: 44px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); margin-top: 4px; flex: none; }

.strength { display: grid; gap: 6px; }
.strength-bar { height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; }
.strength-bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--danger); transition: width .25s, background .25s; }
.strength[data-level="2"] .strength-bar span { background: var(--gold); }
.strength[data-level="3"] .strength-bar span { background: var(--success); }
.strength-text { font-size: .84rem; color: var(--muted); }

/* role picker */
.role-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; border: 0; padding: 0; margin: 0; }
.role-picker legend { font-weight: 600; margin-bottom: 10px; font-size: .95rem; }
.role-option { position: relative; }
.role-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.role-card { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 16px 10px; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: var(--surface-2); transition: all .18s ease; height: 100%; }
.role-card .role-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); transition: all .18s ease; }
.role-card strong { font-size: .98rem; }
.role-card small { color: var(--muted); font-size: .8rem; line-height: 1.5; }
.role-option input:hover + .role-card { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); transform: translateY(-2px); }
.role-option input:checked + .role-card { border-color: var(--wine); background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent); }
.role-option input:checked + .role-card .role-icon { background: var(--wine); color: #fff; }
.role-option input:focus-visible + .role-card { outline: 3px solid var(--primary); outline-offset: 2px; }

/* auth layout */
.auth { display: grid; grid-template-columns: 1.05fr .95fr; min-height: calc(100vh - 69px); }
.auth-side { position: relative; overflow: hidden; padding: 56px 48px; color: #fff;
  background: radial-gradient(circle at 15% 20%, #2A3590 0, transparent 50%),
              radial-gradient(circle at 85% 85%, #501313 0, transparent 45%), #101860; }
.auth-side h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.auth-side p { color: rgba(255,255,255,.85); }
.auth-side ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.auth-side li { display: flex; gap: 12px; align-items: flex-start; }
.auth-side li .icon { color: #FFFFFF; margin-top: 4px; }
.auth-main { display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 520px; }
.auth-card h1 { font-size: 1.8rem; margin-bottom: 4px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--muted); }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- home ---------- */
.hero { position: relative; padding: 64px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero-lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; color: var(--muted); font-size: .92rem; }
.hero-trust span { display: inline-flex; gap: 6px; align-items: center; }
.hero-trust .icon { color: var(--success); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 40px; } }

/* journey (hero visual) */

/* audience cards */
.aud-card { display: flex; flex-direction: column; gap: 10px; transition: transform .2s ease, box-shadow .2s ease; }
.aud-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.aud-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; }
.aud-icon.t-primary { background: var(--primary-soft); color: var(--primary); }
.aud-icon.t-accent { background: var(--accent-soft); color: var(--accent); }
.aud-icon.t-gold { background: var(--gold-soft); color: var(--gold); }
.aud-icon.t-info { background: var(--info-soft); color: var(--info); }
.aud-card ul { margin: 0; padding-inline-start: 18px; color: var(--muted); font-size: .94rem; }
.aud-card .btn { margin-top: auto; align-self: flex-start; }

/* steps */
.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.step { position: relative; padding: 22px 18px; }
.step::before { counter-increment: step; content: counter(step, arabic-indic); position: absolute; top: -14px; inset-inline-start: 18px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem;
  background: var(--wine); color: #fff; box-shadow: 0 4px 12px rgba(80, 19, 19, .25); }
.step h3 { margin-top: 6px; }
.step p { color: var(--muted); font-size: .94rem; margin: 0; }

/* living CV preview */
.cv-band { background: var(--surface); border-block: 1px solid var(--border); }
.cv-preview { padding: 22px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.cv-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.cv-head .avatar { width: 54px; height: 54px; font-size: 1.3rem; }
.cv-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--border); }
.cv-row .icon { color: var(--primary); }
.cv-row .pill { margin-inline-start: auto; }
.meter { height: 10px; background: var(--border); border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 99px; }
.cta-band { text-align: center; border-radius: 28px; padding: 48px 24px; color: #fff;
  background: radial-gradient(circle at 20% 10%, #2A3590 0, transparent 50%), radial-gradient(circle at 90% 90%, #501313 0, transparent 45%), #101860; }
.cta-band h2, .cta-band p { color: #fff; }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.12); }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .icon { color: var(--success); margin-top: 5px; }

/* ---------- dashboard ---------- */
.dash-hero { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  background: var(--surface); border-top: 4px solid var(--navy); }
.dash-hero h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 6px; }
.ring { --p: 0; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--border) 0); }
.ring-inner { width: 86px; height: 86px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; line-height: 1.2; }
.ring-inner strong { font-size: 1.4rem; display: block; }
.ring-inner small { color: var(--muted); font-size: .75rem; }
@media (max-width: 560px) { .dash-hero { grid-template-columns: 1fr; justify-items: start; } }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.timeline li { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border-radius: var(--radius-sm); }
.timeline li:hover { background: var(--surface-2); }
.t-mark { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 2px dashed var(--border); color: var(--muted); }
.timeline li.done .t-mark { border: 0; background: var(--success); color: #fff; }
.timeline li strong { display: block; }
.timeline li p { margin: 0; color: var(--muted); font-size: .92rem; }
.timeline .pill { margin-inline-start: auto; }
.tip { display: flex; gap: 14px; align-items: flex-start; background: var(--gold-soft); border-color: transparent; }
.tip .icon { color: var(--gold); width: 1.6em; height: 1.6em; }
.quick-links { display: grid; gap: 10px; }
.quick-links a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); color: var(--ink); background: var(--surface-2); transition: all .15s; }
.quick-links a:hover { border-color: var(--primary); transform: translateX(-3px); }
[dir="ltr"] .quick-links a:hover { transform: translateX(3px); }
.flip-ltr { display: inline-block; }
[dir="ltr"] .flip-ltr, [dir="ltr"] .icon-arrow { transform: scaleX(-1); }
.quick-links .icon { color: var(--primary); }

/* tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs a { padding: 9px 16px; border-radius: 999px; color: var(--muted); font-weight: 600; border: 1px solid var(--border); background: var(--surface); }
.tabs a[aria-current="page"] { background: var(--wine); color: #fff; border-color: var(--wine); }

/* ---------- tables (admin) ---------- */
.stat { display: flex; align-items: center; gap: 14px; }
.stat-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.stat strong { font-size: 1.6rem; display: block; line-height: 1.2; }
.stat small { color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: .85rem; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.filters .input { padding-inline-start: 14px; width: auto; flex: 1; min-width: 180px; }
.filters select.input { flex: 0 1 200px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); }
.pagination .current { background: var(--wine); color: #fff; border-color: var(--wine); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }

/* ---------- prose (terms) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.3rem; margin-top: 1.6em; }
.note { background: var(--info-soft); color: var(--ink); border-radius: var(--radius-sm); padding: 12px 16px; }

/* ---------- error page ---------- */
.error-page { text-align: center; padding: 80px 16px; }
.error-code { font-size: clamp(4rem, 12vw, 7rem); font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: .92rem; }
.footer-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer-row a { color: var(--muted); }
.footer-row a:hover { color: var(--ink); }

/* ---------- motion ---------- */
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes floatIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- utilities (inline style attributes are blocked by the CSP) ---------- */
.ms-auto { margin-inline-start: auto; }
.cv-row.stack { display: block; }
.center { justify-content: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 16px; }
.stack-sm { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.h3 { font-size: 1.15rem; }
.center-block { margin-inline: auto; }
.row.between { justify-content: space-between; }
.row.between .field { gap: 0; }

/* ---------- sprint 2: profile forms ---------- */
.input.no-icon { padding-inline-start: 14px; }
[dir="rtl"] .input[dir="ltr"].no-icon { padding-right: 14px; }
textarea.input { resize: vertical; min-height: 110px; line-height: 1.7; }
select.input { appearance: auto; }
.form-section { display: grid; gap: 16px; padding-top: 6px; }
.form-section + .form-section { border-top: 1px dashed var(--border); padding-top: 20px; }
.form-section h3 { margin: 0; display: flex; gap: 8px; align-items: center; }
.form-section h3 .icon { color: var(--primary); }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .profile-layout { grid-template-columns: 1fr; } }
.side-stack { display: grid; gap: 16px; position: sticky; top: 88px; }
@media (max-width: 900px) { .side-stack { position: static; } }

.segmented { border: 0; padding: 0; margin: 0; }
.segmented legend { font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.segmented-options { display: inline-flex; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 999px; padding: 4px; gap: 4px; }
.seg { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 7px 18px; border-radius: 999px; font-weight: 600; color: var(--muted); transition: all .15s; }
.seg input:checked + span { background: var(--wine); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 44px; height: 26px; border-radius: 99px; background: var(--border); position: relative; transition: background .15s; flex: none; }
.switch-track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 96, .25); transition: inset-inline-start .15s; }
.switch input:checked + .switch-track { background: var(--wine); }
.switch input:checked + .switch-track::after { inset-inline-start: 21px; }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--primary); outline-offset: 2px; }

.chips-group + .chips-group { margin-top: 14px; }
.chips-group h4 { font-size: .9rem; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--surface-2); font-size: .92rem; font-weight: 500; transition: all .15s; }
.chip input:hover + span { border-color: var(--primary); }
.chip input:checked + span { background: var(--wine); border-color: var(--wine); color: #fff; }
.chip input:checked + span::before { content: "✓"; font-weight: 700; }
.chip input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }

.completion { display: grid; gap: 8px; }
.review { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid transparent; }
.review .icon { width: 1.5em; height: 1.5em; margin-top: 2px; }
.review-body { flex: 1; }
.review-body p { margin: 2px 0 0; font-size: .92rem; color: var(--ink); }
.review-info { background: var(--info-soft); color: var(--info); }
.review-gold { background: var(--gold-soft); color: var(--gold); }
.review-success { background: var(--success-soft); color: var(--success); }
.review-danger { background: var(--danger-soft); color: var(--danger); }
.review form { align-self: center; }
@media (max-width: 560px) { .review { flex-wrap: wrap; } .review form { width: 100%; } .review form .btn { width: 100%; } }
.btn[aria-disabled="true"] { opacity: .55; }
.verify-banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--gold-soft); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; }
.verify-banner .icon { color: var(--gold); width: 1.5em; height: 1.5em; }
.verify-banner p { margin: 0; flex: 1; min-width: 200px; }
.teach-card { background: var(--surface); border-top: 4px solid var(--wine); }
.stat-link { color: var(--ink); transition: transform .15s; }
.stat-link:hover { color: var(--ink); transform: translateY(-2px); border-color: var(--primary); }
.review-card { display: grid; gap: 12px; }
.picture-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.picture-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; }
.picture-card .reject-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.picture-card .input { width: 100%; }
.picture-card .reject-form .btn { justify-self: start; }
.picture-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--border); border-radius: 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 16px; margin: 0; }
.facts div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 12px; }
.facts dt { font-size: .8rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.decide { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; border-top: 1px dashed var(--border); padding-top: 12px; }
.reject-form { display: flex; gap: 8px; flex: 1; min-width: min(260px, 100%); }
.reject-form .input { flex: 1; padding-block: 8px; }
.timeline a.step-link { font-size: .88rem; font-weight: 600; }
.segmented-options { justify-self: start; width: max-content; }

/* ---------- sprint 3: courses ---------- */
[hidden] { display: none !important; }
.catalog-hero { padding: 40px 0 28px; background: linear-gradient(180deg, #EAEAEA, transparent); }
.catalog-hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.catalog-search { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; background: var(--surface); padding: 12px;
  border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.catalog-search .grow { flex: 2 1 260px; }
.catalog-search select.input, .catalog-search .narrow { flex: 1 1 150px; width: auto; }
.course-card { display: flex; flex-direction: column; gap: 10px; transition: transform .2s, box-shadow .2s; }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.course-title { margin: 0; font-size: 1.08rem; }
.course-title a { color: var(--ink); }
.course-title a:hover { color: var(--primary); }
.course-provider { margin: 0; color: var(--muted); display: flex; align-items: center; gap: 6px; font-size: .92rem; }
.verified { color: var(--primary); display: inline-flex; }
.course-meta { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; color: var(--muted); font-size: .9rem; }
.course-meta li { display: flex; gap: 6px; align-items: center; }
.course-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--border); }
.price { font-size: 1.2rem; color: var(--primary-strong); }
.detail-title { font-size: clamp(1.4rem, 3vw, 2rem); }
.prose-text { white-space: pre-line; color: var(--ink); }
.sessions { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.sessions li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.sessions li.past { opacity: .55; }
.sessions li small { display: block; color: var(--muted); }
.session-no { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: .85rem;
  background: var(--primary-soft); color: var(--primary-strong); }
.book-card .price-big { font-size: 2rem; font-weight: 700; color: var(--primary-strong); line-height: 1.2; }
.provider-mini { display: flex; gap: 12px; align-items: flex-start; }
.provider-mini strong { display: block; }
.provider-hero { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.provider-hero > div { flex: 1; min-width: 240px; }
.aud-icon.big { width: 72px; height: 72px; border-radius: 22px; }
.aud-icon.big .icon { width: 2em; height: 2em; }
.lead { font-size: 1.1rem; color: var(--muted); }
.sessions-editor { display: grid; gap: 10px; }
.session-row { display: grid; grid-template-columns: auto minmax(0, 2fr) minmax(0, 1fr) auto; gap: 10px; align-items: end;
  background: var(--surface-2); padding: 10px; border-radius: var(--radius-sm); }
.session-row .session-no { margin-bottom: 8px; }
.session-row .field { grid-template-columns: minmax(0, 1fr); }
.session-row .input { min-width: 0; width: 100%; }
@media (max-width: 560px) {
  .session-row { grid-template-columns: minmax(0, 1fr) auto; }
  .session-row .field { grid-column: 1 / -1; }
  .session-row .session-no { margin-bottom: 0; width: fit-content; }
  .session-row [data-remove-session] { grid-row: 1; grid-column: 2; }
}
td.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.booking-row { display: grid; gap: 12px; }
.pay-box { background: var(--primary-soft); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0; }
.pay-box p { margin: 4px 0 0; }


/* ---------- header v2: compact nav + user menu + language ---------- */
.nav-main { display: flex; align-items: center; gap: 4px; }
.nav-main a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 600; }
.nav-main a:hover, .nav-main a[aria-current="page"] { color: var(--primary-strong); background: var(--primary-soft); }
.nav-end { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.lang-toggle { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); font-weight: 700; font-size: .9rem; }
.lang-toggle:hover { border-color: var(--primary); color: var(--primary-strong); }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 10px 4px 4px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; }
[dir="rtl"] .user-menu summary { padding: 4px 4px 4px 10px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { border-color: var(--primary); }
.user-menu .chevron { width: 1em; height: 1em; transition: transform .15s; color: var(--muted); }
.user-menu[open] .chevron { transform: rotate(180deg); }
.menu-panel { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; display: grid; gap: 2px; z-index: 60; animation: slideIn .15s ease both; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; display: grid; }
.menu-panel a, .menu-logout { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--ink);
  font: inherit; font-weight: 500; background: none; border: 0; width: 100%; text-align: start; cursor: pointer; }
.menu-panel a:hover, .menu-logout:hover { background: var(--primary-soft); color: var(--primary-strong); }
.menu-panel .icon { color: var(--primary); }
.menu-panel form { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.menu-logout { color: var(--danger); }
.menu-logout .icon { color: var(--danger); }
@media (max-width: 640px) {
  .nav { gap: 8px; }
  .user-name, .hide-xs { display: none; }
  .nav-main a { padding: 8px; }
  .nav-main a .icon { width: 1.4em; height: 1.4em; }
  .wordmark { font-size: 1.45rem; }
}
@media (max-width: 420px) { .nav-main a { font-size: 0; gap: 0; } .nav-main a .icon { font-size: 16px; } }

/* ---------- sprint 4: quizzes ---------- */
.d-block { display: block; }
.q-editor { display: grid; gap: 14px; }
.q-row { display: grid; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.narrow-field { max-width: 240px; }
.quiz-page { max-width: 820px; }
.quiz-bar { position: sticky; top: 76px; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.timer { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 1.3rem; color: var(--primary-strong);
  background: var(--primary-soft); padding: 6px 14px; border-radius: 999px; font-variant-numeric: tabular-nums; direction: ltr; }
.timer.warn { color: var(--danger); background: var(--danger-soft); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .65; } }
.question { border: 1px solid var(--border); margin: 0; }
.question legend { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: 1.05rem; padding: 0 4px; float: left; width: 100%; margin-bottom: 12px; }
[dir="rtl"] .question legend { float: right; }
.answers { display: grid; gap: 8px; clear: both; }
.answer { position: relative; cursor: pointer; }
.answer input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.answer span { display: block; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); transition: all .15s; }
.answer input:hover + span { border-color: var(--primary); }
.answer input:checked + span { border-color: var(--wine); background: var(--wine); color: #fff; font-weight: 600; }
.answer input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.quiz-submit { display: grid; justify-items: center; gap: 8px; padding: 10px 0 30px; }
.result-card { text-align: center; max-width: 620px; margin-inline: auto; }
.score { font-size: 3.4rem; font-weight: 700; line-height: 1.1; color: var(--primary-strong); }
.result-card.passed .score { color: var(--gold); }
.quiz-box { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--gold-soft); border-radius: var(--radius-sm); padding: 12px 14px; }
.quiz-box > .icon { color: var(--gold); width: 1.6em; height: 1.6em; }
.quiz-box p { margin: 2px 0 0; font-size: .92rem; }

/* ---------- sprint 4: living CV ---------- */
.cv-sheet { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; display: grid; gap: 22px; }
.cv-top { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.cv-top > div:nth-child(2) { flex: 1; min-width: 220px; }
.cv-avatar { width: 64px; height: 64px; font-size: 1.6rem; }
.cv-name { margin: 0; font-size: 1.7rem; }
.cv-sub { margin: 2px 0 0; color: var(--muted); }
.cv-goal { margin: 6px 0 0; display: flex; gap: 6px; align-items: center; }
.cv-goal .icon { color: var(--accent); }
.cv-mark { display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: .75rem; text-align: center; }
.cv-mark .brand-mark { width: 34px; height: 34px; }
.cv-bio { margin: 0; color: var(--ink); white-space: pre-line; }
.cv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cv-stats div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.cv-stats strong { display: block; font-size: 1.5rem; color: var(--primary-strong); }
.cv-stats small { color: var(--muted); }
.cv-section h2 { font-size: 1.1rem; display: flex; gap: 8px; align-items: center; border-bottom: 2px solid var(--primary-soft); padding-bottom: 6px; }
.cv-section h2 .icon { color: var(--primary); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.cv-badge { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--ink); transition: all .15s; }
.cv-badge:hover { border-color: var(--gold); color: var(--ink); transform: translateY(-2px); }
.cv-badge strong, .cv-badge small { display: block; }
.cv-badge small { color: var(--muted); }
.cv-badge .pill { margin-inline-start: auto; }
.badge-medal { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; background: var(--wine); }
.badge-medal.big { width: 84px; height: 84px; margin-inline: auto; margin-bottom: 10px; }
.badge-medal.big .icon { width: 2.4em; height: 2.4em; }
.level-advanced .badge-medal, .badge-medal.level-advanced { background: linear-gradient(135deg, #791F1F, #501313); }
.level-intermediate .badge-medal, .badge-medal.level-intermediate { background: linear-gradient(135deg, #2A3590, #101860); }
.level-beginner .badge-medal, .badge-medal.level-beginner { background: linear-gradient(135deg, #8E8E8E, #5F5F5F); }
.cv-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cv-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.cv-list li > div { flex: 1; }
.cv-list small { display: block; color: var(--muted); }
.cv-link { font-size: .85rem; word-break: break-all; }
.cv-foot { display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 12px; }
.copy-box { display: flex; gap: 6px; }
.copy-box .input { font-size: .82rem; }
.qr { display: block; margin: 12px auto 0; background: #fff; border-radius: 12px; padding: 6px; border: 1px solid var(--border); }
.verify-card { text-align: center; max-width: 640px; margin-inline: auto; }
.verify-card .facts { text-align: start; margin-top: 16px; }
@media (max-width: 560px) { .cv-sheet { padding: 18px; } .cv-stats strong { font-size: 1.2rem; } }

/* ---------- print: only the CV ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; }
  .site-header, .site-footer, .flashes, .no-print, .skip-link, .side-stack { display: none !important; }
  .page { padding: 0 !important; }
  .profile-layout { display: block !important; }
  .cv-sheet { box-shadow: none !important; border: 0 !important; padding: 0 !important; }
  .cv-badge, .cv-list li, .cv-stats div { break-inside: avoid; border: 1px solid #ddd; }
  a { color: inherit !important; text-decoration: none !important; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- sprint 5: bell, reviews, attendance, notifications ---------- */
.bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink); }
.bell:hover { border-color: var(--primary); color: var(--primary-strong); }
.bell .icon { width: 1.3em; height: 1.3em; }
.bell-count { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.narrow-page { max-width: 760px; }
.notif-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.notif-list a { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); color: var(--ink); }
.notif-list a:hover { border-color: var(--primary); color: var(--ink); }
.notif-list li.unread a { background: var(--primary-soft); border-color: transparent; }
.notif-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--primary); }
.notif-body { flex: 1; display: grid; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.stars { color: var(--gold); letter-spacing: 1px; white-space: nowrap; }
.avatar.small { width: 32px; height: 32px; font-size: .9rem; }
.review-list { display: grid; gap: 0; }
.review-item { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px dashed var(--border); }
.review-item:last-child { border-bottom: 0; }
.verified-review { justify-self: start; font-size: .72rem; }
.review-reply { background: var(--surface-2); border-inline-start: 3px solid var(--primary); padding: 8px 12px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .92rem; }
[dir="rtl"] .review-reply { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.card-rating { display: inline-flex; align-items: center; gap: 3px; color: var(--gold); font-weight: 600; margin-inline-start: auto; }
.card-rating .icon { width: 1em; height: 1em; }
.card-rating small { color: var(--muted); font-weight: 400; }
.review-box { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.star-input { border: 0; padding: 0; margin: 0; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.star-input legend { font-weight: 600; margin-bottom: 6px; width: 100%; }
.star-input label { position: relative; cursor: pointer; color: var(--border); }
.star-input input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.star-input .icon { width: 2em; height: 2em; transition: color .1s, transform .1s; }
.star-input label.on { color: var(--gold); }
.star-input label:hover .icon { transform: scale(1.12); }
.star-input input:focus-visible + .icon { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.attendance-table th { text-align: center; vertical-align: top; }
.attendance-table td { text-align: center; }
.attendance-table td:first-child, .attendance-table th:first-child { text-align: start; }
.att-select { padding: 6px 8px; min-width: 92px; }
.att-select.is-present { border-color: var(--success); background: var(--success-soft); }
.att-select.is-absent { border-color: var(--danger); background: var(--danger-soft); }
.all-present { margin-top: 6px; font-size: .75rem; padding: 4px 8px; }

/* ---------- sprint 6: company tasks ---------- */
.criterion-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) auto; gap: 10px; align-items: end;
  background: var(--surface-2); padding: 10px; border-radius: var(--radius-sm); }
.criteria-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.criteria-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.facts.compact { grid-template-columns: 1fr 1fr; }
.solution { display: grid; gap: 12px; }
.score-form { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.warn-note { display: flex; gap: 8px; align-items: center; background: var(--danger-soft) !important; color: var(--danger); }
.interview summary { list-style: none; display: inline-flex; }
.interview summary::-webkit-details-marker { display: none; }
.task-card .pill-accent .icon { width: 1em; height: 1em; }
@media (max-width: 560px) { .criterion-row { grid-template-columns: minmax(0, 1fr) 90px auto; } }

/* ---------- sprint 7: protected lectures ---------- */
.player { position: relative; background: #0B1145; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; user-select: none; }
.player video { width: 100%; height: 100%; display: block; background: #0B1145; }
.player video.blurred { filter: blur(18px); }
.watermark { position: absolute; top: 10%; left: 10%; z-index: 3; pointer-events: none; white-space: nowrap;
  color: rgba(255, 255, 255, .55); font-size: .85rem; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
  transition: top 1.2s ease, left 1.2s ease; direction: ltr; }
.player-lock { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; align-content: center; gap: 10px;
  text-align: center; color: #fff; background: rgba(11, 17, 69, .88); padding: 20px; }
.player-lock .icon { width: 2.4em; height: 2.4em; color: #fff; }
.player-error { position: absolute; inset: auto 0 0 0; z-index: 4; margin: 0; padding: 10px 14px; background: var(--wine); color: #fff; }
.sessions li.current { background: var(--wine); color: #fff; }
.sessions li.current a, .sessions li.current small { color: #fff !important; }
.sessions li a { color: var(--ink); flex: 1; }
.upload-box { border-top: 1px dashed var(--border); padding-top: 16px; }
.lecture-btn { justify-self: start; }

.danger-zone { border-top: 4px solid var(--wine); }

/* ---------- sprint 8: launch ---------- */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.faq-group { display: grid; gap: 6px; margin-bottom: 16px; }
.faq-item { border-bottom: 1px dashed var(--border); padding: 10px 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq-item summary::after { content: "+"; color: var(--wine); font-weight: 700; }
.faq-item[open] summary::after { content: "–"; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: 8px 0 0; color: var(--muted); }
.kpi { display: grid; gap: 6px; }
.kpi strong { font-size: 1.8rem; color: var(--navy); line-height: 1.2; }
.bars { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; align-items: end; height: 220px; padding-top: 10px; }
.bar-col { display: grid; justify-items: center; gap: 4px; height: 100%; grid-template-rows: 1fr auto auto; min-width: 0; }
.bar { width: 100%; max-width: 48px; height: 100%; background: #EFEFEF; border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; }
.bar-fill { display: block; width: 100%; height: 0; background: linear-gradient(180deg, var(--navy-light), var(--navy)); border-radius: 8px; }
code { font-family: Consolas, monospace; background: #EFEFEF; padding: 2px 6px; border-radius: 6px; }

/* ---------- protected player: own controls ---------- */
.player:focus { outline: none; }
.player:fullscreen, .player:-webkit-full-screen { border-radius: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.player.player-page-full { position: fixed; inset: 0; z-index: 1000; border-radius: 0; aspect-ratio: auto; width: 100%; height: 100%; }
.player video { object-fit: contain; cursor: pointer; }
.player-bar { position: absolute; inset: auto 0 0 0; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 26px 10px 8px;
  background: linear-gradient(180deg, transparent, rgba(11, 17, 69, .92)); color: #fff; transition: opacity .25s ease; }
.player.player-idle .player-bar { opacity: 0; }
.player.player-idle { cursor: none; }
.player-bar button { background: none; border: 0; color: #fff; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer;
  min-width: 34px; height: 34px; padding: 0 6px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.player-bar button:hover, .player-bar button:focus-visible { background: rgba(255, 255, 255, .18); }
.player-bar input[type="range"] { flex: 1; min-width: 40px; accent-color: var(--wine); cursor: pointer; }
.player-time { font-size: .78rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .player-time, .player-bar [data-act="back"], .player-bar [data-act="fwd"] { display: none; } }
.upload-progress { display: grid; gap: 8px; }
.upload-progress .meter span { transition: width .3s ease; }

/* ---------- goal map ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--ink); font-weight: 600; font-size: .9rem; }
.chip:hover { border-color: var(--navy); color: var(--navy); }
.chip[aria-current="true"] { background: var(--wine); border-color: var(--wine); color: #fff; }
.goal-card { display: flex; flex-direction: column; gap: 6px; color: inherit; transition: transform .18s ease, box-shadow .18s ease; }
.goal-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(16, 24, 96, .14); color: inherit; }
.goal-card h2 { color: var(--navy); }
.goal-card p { flex: 1; margin: 0; }
.goal-stops { display: flex; align-items: center; margin-top: 10px; }
.goal-stops span { width: 12px; height: 12px; border-radius: 50%; background: var(--navy); flex: none; }
.goal-stops span + span { margin-inline-start: 22px; position: relative; }
.goal-stops span + span::before { content: ""; position: absolute; inset-inline-end: 12px; top: 5px; width: 22px; height: 2px; background: var(--navy); }
.goal-stops span:last-child { background: var(--wine); }
.goal-hero { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-top: 4px solid var(--navy); }
.goal-hero > div:first-child { flex: 1; min-width: 240px; }
.goal-hero h1 { margin: 0 0 6px; color: var(--navy); }
.next-step { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 20px 24px; border-radius: var(--radius);
  background: linear-gradient(120deg, var(--navy-strong), var(--navy) 60%, var(--navy-light)); color: #fff; }
.next-step > div:first-child { flex: 1; min-width: 220px; }
.next-step small { opacity: .9; }
.next-step strong { color: #fff; }
.next-step p { margin: 6px 0 0; font-size: 1.08rem; font-weight: 700; color: #fff; }
.next-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.next-link { color: #fff; text-decoration: underline; font-size: .9rem; }
.next-link:hover { color: #fff; }
.btn-light { background: #fff; color: var(--navy); border: 0; box-shadow: none; }
.btn-light:hover { background: #EFEFEF; color: var(--navy); }
.meter-on-dark { background: rgba(255, 255, 255, .25); margin-top: 8px; }
.meter-on-dark span { background: #fff; }
.road { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 14px; }
.road::before { content: ""; position: absolute; top: 12px; bottom: 12px; inset-inline-start: 21px; width: 4px; border-radius: 4px; background: var(--border); }
.station { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; align-items: start; }
.station-mark { position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  background: var(--surface); color: var(--navy); border: 3px solid var(--border); }
.station-done .station-mark { background: var(--navy); border-color: var(--navy); color: #fff; }
.station-upgrade .station-mark, .station-attended .station-mark, .station-booked .station-mark { border-color: var(--navy); }
.station-current .station-mark { background: var(--wine); border-color: var(--wine); color: #fff; animation: station-pulse 2.2s ease-out infinite; }
.station-current .station-card { border-inline-start: 4px solid var(--wine); }
.station-goal .station-mark { background: var(--wine-dark); border-color: var(--wine-dark); color: #fff; }
.station-work .station-mark { border-color: var(--navy-light); }
.station-note { margin: 6px 0 8px; }
.station-card .meter { height: 6px; }
@keyframes station-pulse { 0% { box-shadow: 0 0 0 0 rgba(121, 31, 31, .45); } 100% { box-shadow: 0 0 0 16px rgba(121, 31, 31, 0); } }
@media (prefers-reduced-motion: reduce) { .station-current .station-mark { animation: none; } }
@media (min-width: 861px) {
  .road::before { inset-inline-start: calc(50% - 2px); }
  .station { grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr); }
  .station .station-mark { grid-column: 2; grid-row: 1; }
  .station .station-card { grid-column: 1; grid-row: 1; }
  .station:nth-child(even) .station-card { grid-column: 3; }
}
.how-score summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.how-score summary + p { margin-top: 10px; }
.goal-hint { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 10px; background: var(--wine); color: #fff; font-size: .88rem; font-weight: 600; }
.goal-hint:hover { background: var(--wine-strong); color: #fff; }
.goal-strip { margin-top: 26px; text-align: center; }
.goal-strip .chips { justify-content: center; }
.cv-meter { height: 6px; max-width: 320px; margin-top: 4px; }
@media (max-width: 360px) { .wordmark { display: none; } .nav, .nav-end { gap: 4px; } .nav-main a { padding: 6px; } }

.road { margin-top: 20px; }
@media (max-width: 480px) {
  .wordmark { display: none; }
  .nav { gap: 4px; }
  .nav-end { gap: 4px; }
  .nav-main { gap: 0; }
  .nav-main a { padding: 7px; }
  .user-menu .chevron { display: none; }
}
@media (max-width: 360px) { .nav-main a { padding: 5px; } .lang-toggle, .bell { width: 30px; height: 30px; min-width: 30px; } }

/* ---------- trust layers, pictures, sharing ---------- */
.course-card { overflow: hidden; }
.course-cover { display: grid; place-items: center; aspect-ratio: 16 / 9; margin: -20px -20px 12px; color: #fff; font-weight: 800; font-size: 1.15rem;
  text-align: center; padding: 14px; position: relative; overflow: hidden; }
.course-cover:hover { color: #fff; }
.course-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.course-cover span { position: relative; }
.course-cover::before { content: ""; position: absolute; inset-block-end: -30%; inset-inline-end: -8%; width: 58%; aspect-ratio: 1; border-radius: 50%;
  border: 22px solid rgba(255, 255, 255, .1); }
.course-cover img + *, .course-cover:has(img)::before { display: none; }
.cover-tone-0 { background: linear-gradient(135deg, var(--navy-strong), var(--navy-light)); }
.cover-tone-1 { background: linear-gradient(135deg, var(--wine-dark), var(--wine)); }
.cover-tone-2 { background: linear-gradient(135deg, var(--navy), var(--wine-strong)); }
.detail-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); display: block; }
.cover-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.cover-card .form { flex: 1; min-width: 240px; }
.cover-preview { width: 200px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.provider-photo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; }
.provider-photo.big { width: 96px; height: 96px; }
.profile-photo { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; display: block; margin-bottom: 10px; }
.doc-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.doc-rows { list-style: none; margin: 0 0 12px; padding: 0; }
.doc-rows li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.report-box summary { cursor: pointer; color: var(--muted); font-size: .9rem; display: inline-flex; gap: 6px; align-items: center; }
.report-list { margin: 8px 0; padding-inline-start: 18px; }
.recovery-codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.setup-steps { display: grid; gap: 14px; padding-inline-start: 20px; }
.setup-steps .qr { display: block; width: 190px; margin: 10px 0; background: #fff; padding: 8px; border-radius: 10px; }
.narrow-card { max-width: 560px; }
.share-box { display: grid; gap: 10px; justify-items: center; padding: 14px; border-radius: 12px; background: #EFEFEF; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; }
.check input { margin-top: 4px; flex: none; }
.cv-badge .pill { flex: none; }
@media (max-width: 480px) { .nav-login, .nav-end .btn { padding-inline: 8px; font-size: .78rem; white-space: nowrap; } }

/* ==========================================================================
   ROTBA: the staircase. One bold thing on the home page, everything else flat and quiet.
   ========================================================================== */
h1, h2 { font-family: var(--font-head); font-weight: 700; line-height: 1.4; letter-spacing: 0; }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); }
.page-head h1 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
.site-header { background: var(--surface); backdrop-filter: none; }
.brand-logo { height: 38px; }
.card { box-shadow: none; padding: 20px; }
.section { padding: 56px 0; }
.section-tight { padding: 40px 0 0; }
.section-head { text-align: start; max-width: none; margin: 0 0 28px; }
.page { padding-block: 28px 56px; }
.btn { border-radius: var(--radius-sm); box-shadow: none; }
.btn-primary, .btn-accent { box-shadow: none; }
.input { border-radius: var(--radius-sm); }
.pill { border-radius: 6px; font-weight: 500; padding: 2px 8px; }
.tabs a { border-radius: var(--radius-sm); }
.chip { border-radius: var(--radius-sm); }

.hero { padding: 0; background: var(--navy-strong); color: #fff; overflow: hidden; }
.hero .container { position: relative; padding-block-start: 56px; }
.hero-text { max-width: 680px; position: relative; z-index: 1; }
.hero h1 { color: #fff; margin-bottom: 14px; }
.hero-lead { color: #E3E3E8; font-size: 1.05rem; max-width: 52ch; }
.hero-cta { margin-top: 22px; }
.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.ladder { list-style: none; margin: -110px 0 0; padding: 0; counter-reset: rung; display: grid;
  grid-template-columns: repeat(5, 1fr); align-items: end; gap: 6px; }
.ladder li { counter-increment: rung; display: flex; flex-direction: column; justify-content: flex-start; gap: 2px;
  padding: 16px 14px; color: #fff; background: var(--navy-light); transform-origin: bottom;
  animation: rung-up .55s cubic-bezier(.2, .7, .2, 1) both;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); }
[dir="rtl"] .ladder li { clip-path: polygon(16px 0, 100% 0, 100% 100%, 0 100%, 0 16px); }
.ladder li::before { content: counter(rung); font-family: var(--font-head); font-size: 1.5rem; line-height: 1.2; opacity: .55; }
.ladder strong { font-family: var(--font-head); font-size: 1.05rem; }
.ladder small { color: #E3E3E8; line-height: 1.5; font-size: .84rem; }
.ladder li:nth-child(1) { min-height: 120px; background: #1B2470; animation-delay: 0s; }
.ladder li:nth-child(2) { min-height: 165px; background: #222C7E; animation-delay: .07s; }
.ladder li:nth-child(3) { min-height: 210px; background: var(--navy-light); animation-delay: .14s; }
.ladder li:nth-child(4) { min-height: 255px; background: #353FA0; animation-delay: .21s; }
.ladder li:nth-child(5) { min-height: 300px; background: var(--wine); animation-delay: .28s; }
.ladder li:nth-child(5) small { color: #fff; }
@keyframes rung-up { from { transform: scaleY(.25); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ladder li { animation: none; } }
@media (max-width: 900px) {
  .hero .container { padding-block-start: 36px; }
  .hero-text { max-width: none; }
  .ladder { margin-top: 28px; grid-template-columns: 1fr; gap: 4px; }
  .ladder li { min-height: 0 !important; display: grid; grid-template-columns: 34px 1fr; column-gap: 8px; align-items: baseline; padding: 10px 14px; }
  .ladder li::before { grid-row: span 2; font-size: 1.2rem; }
  .ladder li:nth-child(1) { margin-inline-end: 32%; } .ladder li:nth-child(2) { margin-inline-end: 24%; }
  .ladder li:nth-child(3) { margin-inline-end: 16%; } .ladder li:nth-child(4) { margin-inline-end: 8%; }
}

.aud-card { border: 0; border-top: 3px solid var(--navy); border-radius: 0; background: transparent; padding: 16px 0 0; }
.aud-card .btn { align-self: flex-start; }
.goal-strip { margin-top: 0; text-align: start; }
.cv-band { background: var(--surface); border-block: 1px solid var(--border); }
.cta-band { border-radius: var(--radius); background: var(--navy); }

.catalog-hero { padding: 28px 0 22px; background: var(--surface); border-bottom: 1px solid var(--border); }
.catalog-hero h1 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); margin-bottom: 14px; }
.catalog-search { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 0; background: none; border: 0; box-shadow: none; }
.catalog-search .input-wrap { min-width: 0; }
.catalog-search > .btn { padding-inline: 28px; }
.filter-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.filter-row .input { min-height: 40px; padding-block: 6px; font-size: .92rem; width: 100%; max-width: none; }
@media (max-width: 760px) { .filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.course-card { gap: 6px; padding: 16px; }
.course-card:hover { transform: none; box-shadow: none; border-color: var(--navy); }
.course-cover { aspect-ratio: 2 / 1; margin: -16px -16px 8px; border-radius: 0; font-family: var(--font-head); font-size: 1.05rem; }
.course-cover::before { content: none; }
.course-cover:not(:has(img)) { aspect-ratio: 3 / 1; }
.cover-tone-0 { background: var(--navy); }
.cover-tone-1 { background: var(--wine); }
.cover-tone-2 { background: var(--navy-strong); }
.course-kind { margin: 0; color: var(--muted); font-size: .86rem; }
.course-title { font-size: 1.05rem; margin: 0; line-height: 1.5; }
.course-provider { margin: 0; font-size: .92rem; }
.course-meta { margin: 4px 0; font-size: .88rem; }
.course-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }
.course-foot .pill-muted { background: none; padding: 0; color: var(--muted); }
.price { font-family: var(--font-head); font-size: 1.1rem; }

.auth-side { background: var(--navy-strong); }
.auth-side::before, .auth-side::after { content: none; }
.auth-side .brand-mark { background: #fff; border-radius: var(--radius-sm); padding: 6px; width: 54px; height: 54px; }
.sessions li > .btn { flex: none; width: auto; justify-self: end; }
.sessions li > div { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
td.course-name { min-width: 200px; }

/* ---------- every screen: calm by default, thumb-friendly on a phone ---------- */
.menu-lang { display: none !important; }
.nav-main a { border-radius: var(--radius-sm); }
.dash-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; margin-bottom: 16px; }
.dash-head h1 { margin: 0; font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
.dash-progress { flex: 0 1 300px; display: grid; gap: 4px; }
.next-step { border-radius: var(--radius); }
.stat { padding: 14px 16px; gap: 10px; }
.stat strong { font-family: var(--font-head); }
.timeline li { align-items: center; }
.timeline p { margin: 0; font-size: .9rem; color: var(--muted); }
.t-mark { background: var(--surface-2); color: var(--navy); border: 1px solid var(--border); }
.admin-head { margin-bottom: 10px; }
.admin-tabs { gap: 4px; align-items: center; }
.admin-tabs a { padding: 6px 12px; font-size: .9rem; border-color: transparent; background: none; }
.admin-tabs a:hover { background: var(--primary-soft); }
.admin-tabs a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.tabs-gap { width: 1px; height: 18px; margin-inline: 6px; background: var(--border); }
.table-wrap { box-shadow: none; }
th { font-weight: 600; color: var(--muted); font-size: .85rem; }

@media (max-width: 900px) {
  .course-page { display: flex; flex-direction: column; }
  .course-page > .stack-sm { display: contents; }
  .course-page > .stack-sm > * { order: 3; width: 100%; }
  .course-page .detail-cover { order: 0; }
  .course-page > .stack-sm > section:first-of-type { order: 1; }
  .course-page > .side-stack { order: 2; width: 100%; }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .nav { min-height: 56px; gap: 8px; }
  .brand-logo { height: 40px; }
  .nav-main { position: fixed; inset-inline: 0; bottom: 0; z-index: 60; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    gap: 2px; background: var(--surface); border-top: 1px solid var(--border); padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); }
  .nav-main a { flex-direction: column; justify-content: center; gap: 1px; font-size: .72rem !important; line-height: 1.3; padding: 6px 2px !important; text-align: center; min-height: 50px; }
  .nav-main a .icon { width: 1.5em; height: 1.5em; font-size: 15px; }
  .nav-main a[aria-current="page"] { background: none; color: var(--navy); font-weight: 700; box-shadow: inset 0 2px 0 var(--wine); border-radius: 0; }
  .nav-end { gap: 6px; }
  .nav-end:has(.user-menu) .lang-toggle { display: none; }
  .menu-lang { display: flex !important; }
  .user-name, .user-menu .chevron { display: none; }
  .nav-end .btn { min-height: 38px; font-size: .84rem; padding-inline: 10px; }

  .page { padding-block: 18px 32px; }
  .section { padding: 36px 0; }
  .card { padding: 16px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
  .input { font-size: 16px; }                   /* below this, iPhone zooms the page on focus */
  .page-head { gap: 8px; }
  .page-head .btn { flex: 0 0 auto; }
  .dash-progress { flex: 1 1 100%; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; }
  .aud-card { padding-top: 12px; }
  section .grid-4 > .aud-card { grid-column: span 2; }

  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: none; white-space: nowrap; }
  .tabs-gap { flex: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; padding-block-end: 2px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; white-space: nowrap; }
  .timeline li { flex-wrap: wrap; }
  .timeline li > div { flex: 1 1 60%; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer { padding-block: 20px; }
  .footer-row, .site-footer nav { flex-wrap: wrap; justify-content: flex-start; gap: 6px 14px; }
}

@media (max-width: 640px) {
  .stack-table { overflow: visible; border: 0; background: none; border-radius: 0; }
  .stack-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack-table table, .stack-table tbody, .stack-table tr, .stack-table td { display: block; width: 100%; }
  .stack-table tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
  .stack-table td { border: 0; padding: 3px 0; min-width: 0; white-space: normal; }
  .stack-table td.actions { display: flex; margin-top: 8px; }
}

@media print { .nav-main { display: none !important; } body { padding-bottom: 0; } }

.eyebrow { background: none; padding: 0; border: 0; border-radius: 0; color: var(--muted); font-weight: 500; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.cover-card { display: grid; gap: 10px; }
.cover-preview { width: 100%; }
.side-stack .cover-card .form { min-width: 0; }
input[type="file"].input { padding: 8px; font-size: .88rem; color: var(--muted); }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; color: var(--navy); background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 12px; margin-inline-end: 10px; cursor: pointer; }
input[type="file"]::file-selector-button:hover { border-color: var(--navy); }

/* tasks and other short searches: filters and the button share one row */
.catalog-search:not(:has(.filter-box)) { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) auto; }
.catalog-search select.input { min-width: 0; width: 100%; }
@media (max-width: 760px) {
  .catalog-search:not(:has(.filter-box)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-search:not(:has(.filter-box)) > .btn { grid-column: 1 / -1; }
}
.filter-box { grid-column: 1 / -1; }
.filter-box > summary { list-style: none; width: fit-content; cursor: pointer; }
.filter-box > summary::-webkit-details-marker { display: none; }
.filter-box[open] > summary { margin-bottom: 8px; }
@media (min-width: 761px) { .filter-box > summary { display: none; } }

/* goal map: one straight road, read from the top */
.road { max-width: 780px; }
@media (min-width: 861px) {
  .road::before { inset-inline-start: 21px; }
  .station { grid-template-columns: 46px minmax(0, 1fr); }
  .station .station-mark { grid-column: 1; }
  .station .station-card, .station:nth-child(even) .station-card { grid-column: 2; }
}

.grid-4:has(> .stat) { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

@media (max-width: 760px) {
  .role-picker { grid-template-columns: 1fr 1fr; gap: 8px; }
  .role-card { padding: 10px 8px; }
  .role-card small { display: none; }
  .role-card .role-icon { width: 38px; height: 38px; }
  .dash-actions .btn { flex: 1 1 auto; }
  .catalog-hero { padding: 16px 0; }
  .grid-4:has(> .stat) { grid-template-columns: 1fr 1fr; }
}

.profile-layout > *, .card, .form, .form-section, .field { min-width: 0; }
@media (max-width: 760px) {
  .chips:has(input) { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .chips:has(input) .chip { white-space: normal; flex: 0 1 auto; }
}

@media (max-width: 760px) { .stat-icon { display: none; } }

/* ---------- proof, readiness, talent, market ---------- */
.proof-link { flex: none; font-size: .86rem; font-weight: 600; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.cv-badge .proof-link { margin-inline-start: auto; }
.market-card .note { margin-block: 12px; }
.market-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; align-items: center; margin-bottom: 12px; }
.market-score { display: grid; text-align: end; line-height: 1.3; }
.market-score strong { font-family: var(--font-head); font-size: 1.5rem; color: var(--navy); }
.market-score small { color: var(--muted); }
.market-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.market-bar-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 4px; }
.market-bar-head small { color: var(--muted); white-space: nowrap; }
.market-bars .meter { height: 6px; }
.market-bars li.is-proven .market-bar-head a { font-weight: 700; }
.market-add { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.market-postings { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.market-postings li { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.skill-pick { border: 0; padding: 0; margin: 0; }
.skill-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.talent-filters { grid-template-columns: repeat(4, minmax(0, 1fr)) auto !important; }
.talent-filters .input { min-width: 0; width: 100%; }
.talent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.talent-card { display: grid; gap: 10px; }
.talent-code { font-family: var(--font-head); font-size: 1.05rem; color: var(--navy); }
.talent-badges { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.talent-badges li { display: flex; justify-content: space-between; gap: 10px; padding-block: 4px; border-bottom: 1px solid var(--border); }
.talent-badges small { color: var(--muted); white-space: nowrap; }
.talent-proof { font-size: .9rem; color: var(--muted); }
.talent-ask > summary { list-style: none; width: fit-content; cursor: pointer; }
.talent-ask > summary::-webkit-details-marker { display: none; }
.talent-preview { display: grid; gap: 10px; padding: 14px; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.readiness-head { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.readiness-head h1 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
.review-list-plain { margin: 0; padding-inline-start: 22px; display: grid; gap: 18px; }
.readiness-box { align-items: flex-start; }
.exam-date { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: .9rem; }
.exam-date .input { width: auto; min-height: 36px; padding-block: 4px; }
@media (max-width: 760px) {
  .talent-filters { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .talent-filters > .btn { grid-column: 1 / -1; }
  .talent-grid { grid-template-columns: minmax(0, 1fr); }
  .readiness-box > .btn { width: 100%; }
}


/* ---------- nothing wider than the phone ---------- */
@media (max-width: 760px) {
  main .btn, .page .btn { white-space: normal; max-width: 100%; text-align: center; }
  .sessions li { flex-wrap: wrap; }
  .sessions li > div { flex: 1 1 150px; }
  .segmented-options { display: flex; flex-wrap: wrap; width: auto; max-width: 100%; border-radius: var(--radius-sm); }
  .seg { flex: 1 1 auto; text-align: center; }
  .bars { gap: 4px; }
  .bar-col small { font-size: .62rem; }
}

/* ---------- signup: e-mail first ---------- */
.signup-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.signup-steps li { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .88rem; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.signup-steps span { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); font-size: .76rem; font-weight: 700; }
.signup-steps .icon { width: 13px; height: 13px; }
.signup-steps .is-current { color: var(--navy); font-weight: 700; border-color: var(--wine); }
.signup-steps .is-current span { background: var(--wine); color: #fff; }
.signup-steps .is-done { color: var(--navy); border-color: var(--navy); }
.signup-steps .is-done span { background: var(--navy); color: #fff; }
.code-input { text-align: center; font-size: 1.6rem; font-weight: 700; letter-spacing: .3em; }

/* ---------- where a student starts ---------- */
.start-results { display: grid; gap: 12px; margin-top: 10px; }
.start-goal { display: grid; gap: 8px; }
.skill-ticks { border: 0; padding: 0; margin: 6px 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.skill-ticks legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: .92rem; }
.skill-tick { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-size: .92rem; }
.skill-tick:has(input:checked) { border-color: var(--navy); background: var(--primary-soft); }
.skill-tick.is-proven { border-color: var(--navy); cursor: default; }
.skill-tick small { color: var(--muted); }
.skill-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.station-claimed .station-mark { border-style: dashed; border-color: var(--navy-light); }
.station[id] { scroll-margin-top: 90px; }

/* ---------- home: a goal's path, right on the page ---------- */
.try-path { display: grid; gap: 12px; margin-top: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-align: start; }
.try-path[hidden] { display: none; }
.try-path > .btn { justify-self: start; }
.try-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; counter-reset: step; }
.try-steps li { position: relative; counter-increment: step; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; font-weight: 600; }
.try-steps li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .8rem; }
.try-steps small { grid-column: 2; color: var(--muted); font-weight: 400; }
.try-steps .is-goal::before { background: var(--wine); }
.try-steps .is-goal { color: var(--wine); }
@media (max-width: 760px) { .try-steps { flex-direction: column; } .try-path > .btn { justify-self: stretch; } }

