/* AI First Courses UI kit. Version 0.2.1. Source of truth for every surface.
   Doctrine in docs/DESIGN.md. Primitives never bind to a page; pages bind to roles.
   Palette from Muds, Sep 7 2026: six blues plus a white to pale blue tint strip.
   Every contrast figure below was measured with the WCAG formula, not eyeballed. */

:root {
  /* Primitives, the palette as given */
  --blue-50: #EFF3FF;
  --blue-100: #C6DBEF;
  --blue-200: #9ECAE1;
  --blue-300: #6BAED6;
  --blue-500: #3182BD;
  --blue-700: #08519C;
  /* Derived in HSB with hue rotation toward navy, never by nudging hex */
  --blue-800: #054185;   /* hover, white on it 9.99 */
  --blue-900: #033370;   /* active, white on it 12.27 */
  --navy-950: #091A2E;   /* ink, 17.52 on white, 15.79 on blue 50 */
  --slate-600: #395673;  /* secondary text, 7.63 on white, 6.88 on blue 50 */
  --slate-500: #506A85;  /* tertiary text, 5.61 on white, 5.06 on blue 50 */
  --white: #FFFFFF;
  --page-tint: #F2F5FC;  /* page ground, hue 222, never pure white */
  /* Status hues, the only colors outside the blues. Status only, never decoration. */
  --red-600: #B82F25;    /* 6.05 on white */
  --red-50: #FFE7E6;
  --green-700: #117345;  /* 5.90 on white */
  --green-50: #DCFAEB;
  --amber-800: #733F0B;  /* 8.59 on white */
  --amber-50: #FFF0D1;

  /* Roles. Components bind to these. */
  --ground: var(--page-tint);
  --surface: var(--white);
  --surface-raised: var(--white);
  --surface-sunken: var(--blue-50);
  --surface-brand: var(--blue-700);
  --line: var(--blue-100);
  --line-strong: var(--blue-200);
  --text: var(--navy-950);
  --text-2: var(--slate-600);
  --text-3: var(--slate-500);
  --text-on-brand: var(--white);
  --link: var(--blue-700);
  --action: var(--blue-700);
  --action-hover: var(--blue-800);
  --action-active: var(--blue-900);
  --focus: var(--blue-500);
  --danger: var(--red-600);
  --danger-bg: var(--red-50);
  --success: var(--green-700);
  --success-bg: var(--green-50);
  --warning: var(--amber-800);
  --warning-bg: var(--amber-50);

  /* Type. Inter, one family, four weights, read from the Dreams LMS file on September 7, 2026 (569 of 605 text nodes). Scale: 13 14 16 18 20 24 32 44. */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-xs: 13px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;
  --text-display: 44px;
  --leading-body: 1.45;
  --leading-tight: 1.25;
  --measure: 68ch;

  /* Space, base 4. Off scale needs a stated reason. */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;

  /* Shape and depth. Two layer shadows on light surfaces. */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(9, 26, 46, 0.06), 0 1px 1px rgba(9, 26, 46, 0.04);
  --shadow-2: 0 8px 24px rgba(9, 26, 46, 0.08), 0 2px 6px rgba(9, 26, 46, 0.06);
  --inset: inset 0 1px 2px rgba(9, 26, 46, 0.06);

  /* Chrome */
  --topbar-h: 56px;
  --bottombar-h: 56px;
  --bottombar-clearance: calc(var(--bottombar-h) + env(safe-area-inset-bottom, 0px));
  --tap: 44px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --fast: 160ms;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--text-md); line-height: var(--leading-body); color: var(--text); background: var(--ground); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: var(--leading-tight); font-weight: 650; letter-spacing: -0.01em; color: var(--text); }
h1 { font-size: var(--text-3xl); letter-spacing: -0.02em; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
.display { font-size: var(--text-display); line-height: 1.1; letter-spacing: -0.025em; font-weight: 700; }
p { margin: 0; max-width: var(--measure); }
p + p { margin-top: var(--s-3); }
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--action-hover); }
small, .text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.lead { font-size: var(--text-lg); color: var(--text-2); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--blue-100); }
@media (max-width: 599px) { h1 { font-size: 28px; } .display { font-size: 36px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Layout */
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: var(--s-6) var(--s-4) var(--s-12); }
.wrap-narrow { max-width: 560px; }
.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-8); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); }
.grid { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-6); }
.page-head p { margin-top: var(--s-1); }
.section { margin-top: var(--s-10); }
.section > h2 { margin-bottom: var(--s-4); }
.section > h3 { margin-bottom: var(--s-3); }
.divider { border: 0; border-top: 1px solid var(--line); margin: var(--s-6) 0; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Top bar and navigation */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: 0 var(--s-4); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 700; font-size: var(--text-lg); color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.brand-logo { height: 32px; width: auto; display: block; }
.brand-sep { width: 1px; height: 22px; background: var(--line); margin: 0 var(--s-1); flex: none; }
.site-foot .brand-sep { background: rgba(255, 255, 255, 0.3); }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-brand); display: inline-grid; place-items: center; color: var(--text-on-brand); font-size: 14px; font-weight: 700; }
.nav { display: none; align-items: center; gap: var(--s-1); }
.nav a, .nav button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s-3); border-radius: var(--r-sm); color: var(--text-2); text-decoration: none; font-weight: 500; font-size: var(--text-sm); background: none; border: 0; font-family: inherit; cursor: pointer; }
.nav a:hover, .nav button:hover { background: var(--surface-sunken); color: var(--text); }
.nav a[aria-current="page"] { color: var(--action); background: var(--surface-sunken); }
@media (min-width: 1024px) { .nav { display: flex; } }

/* Bottom bar, phones and tablets only. The inset lives inside the tappable child, never on the bar. */
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: var(--surface); box-shadow: 0 -1px 0 var(--line); }
.bottombar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--bottombar-h); padding: 6px var(--s-1) calc(6px + env(safe-area-inset-bottom, 0px)); color: var(--text-3); text-decoration: none; font-size: 12px; font-weight: 500; }
.bottombar a[aria-current="page"] { color: var(--action); }
.bottombar svg { width: 22px; height: 22px; }
body.has-bottombar { padding-bottom: var(--bottombar-clearance); }
@media (min-width: 1024px) { .bottombar { display: none; } body.has-bottombar { padding-bottom: 0; } }

/* Buttons. One primary per view. The label is the action. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--tap); padding: 0 var(--s-5); border-radius: var(--r-sm); border: 1px solid transparent; font-family: inherit; font-size: var(--text-md); font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background var(--fast) var(--ease), box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--action); color: var(--text-on-brand); box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--action-hover); color: var(--text-on-brand); }
.btn-primary:active { background: var(--action-active); }
.btn-secondary { background: var(--surface); color: var(--action); border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.btn-secondary:hover { background: var(--surface-sunken); color: var(--action-hover); }
.btn-ghost { background: transparent; color: var(--action); }
.btn-ghost:hover { background: var(--surface-sunken); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--line-strong); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { min-height: 36px; padding: 0 var(--s-3); font-size: var(--text-sm); }
.btn-block { width: 100%; }
.btn.is-loading { position: relative; color: transparent; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: rgba(255,255,255,0.35); border-top-color: var(--white); animation: spin 0.8s linear infinite; }
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after { border-color: var(--blue-100); border-top-color: var(--action); }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: var(--r-sm); border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-sunken); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }

/* Fields. Label above, visible always. Error in words next to the field. */
.field { display: grid; gap: var(--s-2); align-content: start; }
.field > label, .label { font-size: var(--text-sm); font-weight: 600; color: var(--text); }
.field .help { font-size: var(--text-sm); color: var(--text-3); }
.field .error-text { font-size: var(--text-sm); color: var(--danger); font-weight: 500; }
.input, .select, .textarea { width: 100%; min-height: var(--tap); padding: 10px var(--s-3); font-family: inherit; font-size: var(--text-md); color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm); box-shadow: var(--inset); transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
.input::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--blue-300); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(49, 130, 189, 0.25); }
.input[aria-invalid="true"], .field.is-error .input { border-color: var(--danger); }
.input:disabled { background: var(--surface-sunken); color: var(--text-3); }
.textarea { min-height: 120px; resize: vertical; line-height: var(--leading-body); }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path d='M4 6l4 4 4-4' fill='none' stroke='%23395673' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.check { display: flex; align-items: flex-start; gap: var(--s-3); min-height: var(--tap); padding: var(--s-2) 0; font-size: var(--text-md); font-weight: 400; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--action); flex: none; }
.form { display: grid; gap: var(--s-5); }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; padding-top: var(--s-2); }

/* Cards. Separation by background shift and shadow, borders last. Never a card inside a card. */
.card { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-1); padding: var(--s-6); }
.card-raised { box-shadow: var(--shadow-2); }
.card-flat { box-shadow: none; border: 1px solid var(--line); }
.card > h2, .card > h3 { margin-bottom: var(--s-3); }
.card-media { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-sunken); margin-bottom: var(--s-4); }
@media (max-width: 599px) { .card { padding: var(--s-5); } }

/* Roster row. One anatomy for every list: tile, title line with right meta, fact lines, status line, one primary action, rest behind the dots. */
.roster { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-1); overflow: hidden; }
.roster-head { padding: var(--s-3) var(--s-5); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); background: var(--surface-sunken); }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-4); align-items: center; padding: var(--s-4) var(--s-5); }
.row + .row { border-top: 1px solid var(--line); }
.row-tile { position: relative; width: 44px; height: 44px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--surface-sunken); color: var(--action); font-weight: 700; font-size: var(--text-sm); }
.row-tile .dot { position: absolute; right: -3px; top: -3px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); background: var(--text-3); }
.row-tile .dot.is-success { background: var(--success); }
.row-tile .dot.is-warning { background: var(--warning); }
.row-tile .dot.is-danger { background: var(--danger); }
.row-main { min-width: 0; }
.row-title { display: flex; justify-content: space-between; gap: var(--s-3); align-items: baseline; }
.row-title strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-title .meta { flex: none; font-size: var(--text-sm); color: var(--text-3); }
.row-fact { font-size: var(--text-sm); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); font-size: var(--text-sm); color: var(--text-3); margin-top: var(--s-1); }
.row-status > span:not(.pill) { white-space: nowrap; }
.row-act { display: flex; align-items: center; gap: var(--s-2); }
@media (max-width: 599px) { .row { grid-template-columns: auto 1fr; padding: var(--s-4); } .row-act { grid-column: 2; justify-content: flex-start; } }

/* Pills and status. Never color alone: every pill carries words. */
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 2px 10px; border-radius: var(--r-pill); font-size: var(--text-xs); font-weight: 600; line-height: 1.2; background: var(--surface-sunken); color: var(--text-2); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.pill-brand { background: var(--blue-50); color: var(--action); }
.pill-success { background: var(--success-bg); color: var(--success); }
.pill-warning { background: var(--warning-bg); color: var(--warning); }
.pill-danger { background: var(--danger-bg); color: var(--danger); }
.pill-plain::before { display: none; }

/* Notices. Icon plus words, never a bare color. */
.notice { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-sm); background: var(--surface-sunken); color: var(--text); font-size: var(--text-sm); }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.notice strong { display: block; font-weight: 600; margin-bottom: 2px; }
.notice-success { background: var(--success-bg); color: var(--success); }
.notice-warning { background: var(--warning-bg); color: var(--warning); }
.notice-danger { background: var(--danger-bg); color: var(--danger); }

/* Progress, the course ladder, and steps */
.progress { position: relative; height: 8px; border-radius: var(--r-pill); background: var(--blue-100); overflow: hidden; }
.progress > span { position: absolute; inset: 0 auto 0 0; background: var(--action); border-radius: var(--r-pill); }
.progress-label { display: flex; justify-content: space-between; font-size: var(--text-sm); color: var(--text-2); margin-bottom: var(--s-2); }
.ladder { list-style: none; margin: 0; padding: 0; }
.ladder li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: var(--s-3); padding: var(--s-3) 0; align-items: start; }
.ladder li + li::before { content: ""; position: absolute; left: 13px; top: -8px; height: 16px; border-left: 2px solid var(--line-strong); }
.ladder .step { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: var(--text-xs); font-weight: 700; background: var(--surface-sunken); color: var(--text-3); border: 2px solid var(--line-strong); }
.ladder li.is-done .step { background: var(--action); border-color: var(--action); color: var(--white); }
.ladder li.is-current .step { border-color: var(--action); color: var(--action); background: var(--surface); }
.ladder li.is-locked { color: var(--text-3); }
.ladder .step-title { font-weight: 600; }
.ladder .step-meta { font-size: var(--text-sm); color: var(--text-3); }

/* Tables, for admin ledgers. One scale: one title size, one meta size. */
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-1); overflow: hidden; }
.table th { text-align: left; padding: var(--s-3) var(--s-4); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); background: var(--surface-sunken); }
.table td { padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line); vertical-align: middle; color: var(--text); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr:hover td { background: #FAFBFF; }

/* Tabs */
.tabs { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--s-3); margin-bottom: -1px; color: var(--text-2); text-decoration: none; font-weight: 500; font-size: var(--text-sm); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--action); border-bottom-color: var(--action); }

/* Empty state, designed with real words */
.empty { text-align: center; padding: var(--s-12) var(--s-6); color: var(--text-2); }
.empty h3 { color: var(--text); margin-bottom: var(--s-2); }
.empty p { margin: 0 auto var(--s-5); }

/* Stat tile, no ink without data */
.stat { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-1); padding: var(--s-5); }
.stat .stat-label { font-size: var(--text-sm); color: var(--text-2); }
.stat .stat-value { font-size: var(--text-3xl); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-top: var(--s-1); font-variant-numeric: tabular-nums; }
.stat .stat-note { font-size: var(--text-sm); color: var(--text-3); margin-top: var(--s-1); }

/* Video frame, stream only, no download control ever */
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: var(--navy-950); box-shadow: var(--shadow-2); }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Utilities */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.foot { padding: var(--s-8) var(--s-4); color: var(--text-3); font-size: var(--text-xs); text-align: center; }

/* ============================================================
   Dreams layer, version 0.4.0. Screen structures from the Dreams LMS kit,
   measured in Figma (frames 5013:75550, 398:51274, 398:52163, 373:44660,
   5013:76334), recolored to the blues. Container 1296 at 1600.
   ============================================================ */

.container { width: 100%; max-width: 1296px; margin: 0 auto; padding: 0 var(--s-4); }

/* Site header: dark strip plus white bar */
.site-strip { background: var(--navy-950); color: var(--white); font-size: var(--text-sm); }
.site-strip .container { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: var(--s-4); }
.site-strip a { color: var(--white); text-decoration: none; }
.site-strip .muted { color: var(--blue-100); }
.site-head { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head .container { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 70px; }
.site-menu { display: none; gap: var(--s-8); align-items: center; }
.site-menu a { color: var(--text); font-weight: 500; font-size: var(--text-sm); text-decoration: none; padding: var(--s-2) 0; }
.site-menu a[aria-current="page"], .site-menu a:hover { color: var(--action); }
.site-actions { display: flex; align-items: center; gap: var(--s-3); }
.pill-btn { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 40px; padding: 0 var(--s-4); border-radius: var(--r-pill); font-size: var(--text-sm); font-weight: 500; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; white-space: nowrap; }
.pill-btn-light { background: var(--surface-sunken); color: var(--text); }
.pill-btn-light:hover { background: var(--blue-100); color: var(--text); }
.pill-btn-brand { background: var(--action); color: var(--white); }
.pill-btn-brand:hover { background: var(--action-hover); color: var(--white); }
.pill-btn-white { background: var(--white); color: var(--text); }
.pill-btn-white:hover { background: var(--blue-50); color: var(--text); }
.pill-btn-dark { background: var(--navy-950); color: var(--white); min-height: 28px; padding: 0 10px; font-size: 13px; }
.pill-btn-dark:hover { background: var(--blue-900); color: var(--white); }
.pill-btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.pill-btn-ghost:hover { background: var(--surface-sunken); color: var(--text); }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--blue-100); color: var(--blue-900); font-weight: 700; overflow: hidden; flex: none; }
.avatar-24 { width: 24px; height: 24px; font-size: 12px; }
.avatar-36 { width: 36px; height: 36px; font-size: 13px; }
.avatar-48 { width: 48px; height: 48px; font-size: 16px; }
.avatar-64 { width: 64px; height: 64px; font-size: 20px; }
.avatar-96 { width: 96px; height: 96px; font-size: 32px; border: 3px solid var(--white); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 1024px) { .site-menu { display: flex; } }

/* Page title band */
.title-band { background: linear-gradient(90deg, #EAF1FF 0%, #F2F5FC 50%, #DCEBFF 100%); padding: var(--s-10) 0; text-align: center; }
.title-band h1 { font-size: var(--text-3xl); }
.crumbs { display: inline-flex; gap: var(--s-2); align-items: center; margin-top: var(--s-2); font-size: var(--text-sm); color: var(--text-2); }
.crumbs a { color: var(--text); text-decoration: none; }
.crumbs .sep { width: 12px; height: 4px; border-radius: 2px; background: var(--blue-500); display: inline-block; }
@media (max-width: 599px) { .title-band { padding: var(--s-8) 0; } .title-band h1 { font-size: 28px; } }

/* Profile banner, 200 tall at desktop */
.banner { position: relative; overflow: hidden; border-radius: var(--r-md); min-height: 200px; padding: var(--s-8) var(--s-8); display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); flex-wrap: wrap; color: var(--white); background: linear-gradient(88deg, #2C7A9C 0%, #08519C 55%, #0936CB 120%); }
.banner::before, .banner::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,0.14); pointer-events: none; }
.banner::before { width: 380px; height: 380px; right: -60px; top: -180px; }
.banner::after { width: 220px; height: 220px; right: 200px; bottom: -140px; background: rgba(255,255,255,0.08); }
.banner-who { display: flex; align-items: center; gap: var(--s-4); position: relative; z-index: 1; }
.banner-name { font-size: var(--text-xl); font-weight: 700; line-height: 1.3; color: var(--white); }
.banner-role { color: var(--blue-100); font-size: var(--text-md); }
.banner-actions { display: flex; gap: var(--s-4); flex-wrap: wrap; position: relative; z-index: 1; }
@media (max-width: 599px) { .banner { padding: var(--s-6) var(--s-5); min-height: 0; } }

/* Dashboard layout: sidebar 306, gap 24, content */
.dash { display: grid; grid-template-columns: 1fr; gap: var(--s-6); margin-top: var(--s-10); }
@media (min-width: 1024px) { .dash { grid-template-columns: 306px 1fr; align-items: start; } }
.side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); }
.side h4 { font-size: var(--text-md); font-weight: 600; margin-bottom: var(--s-4); }
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.side li a { display: flex; align-items: center; gap: var(--s-2); min-height: 40px; padding: 0 var(--s-2); margin: 0 calc(var(--s-2) * -1); border-radius: var(--r-sm); color: var(--text-2); font-size: var(--text-sm); text-decoration: none; }
.side li a svg { width: 16px; height: 16px; flex: none; }
.side li a:hover { background: var(--surface-sunken); color: var(--text); }
.side li a[aria-current="page"] { color: var(--action); font-weight: 600; }
.side hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-5) 0; }
.side form button { display: flex; align-items: center; gap: var(--s-2); min-height: 40px; width: calc(100% + var(--s-4)); margin: 0 calc(var(--s-2) * -1); padding: 0 var(--s-2); border: 0; background: none; color: var(--text-2); font: inherit; font-size: var(--text-sm); border-radius: var(--r-sm); cursor: pointer; text-align: left; }
.side form button:hover { background: var(--surface-sunken); color: var(--text); }
@media (max-width: 1023px) { .side ul { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } .side h4 + ul { margin-bottom: 0; } }

/* Stat tiles */
.tiles { display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.tile-icon { width: 56px; height: 56px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--blue-50); color: var(--action); }
.tile-icon svg { width: 28px; height: 28px; }
.tile-icon.is-green { background: var(--success-bg); color: var(--success); }
.tile-icon.is-amber { background: var(--warning-bg); color: var(--warning); }
.tile-icon.is-navy { background: var(--blue-100); color: var(--blue-900); }
.tile-label { font-size: var(--text-md); color: var(--text-2); }
.tile-value { font-size: var(--text-2xl); font-weight: 700; line-height: 1.5; font-variant-numeric: tabular-nums; }

/* Strip notice, the quiz strip on the dashboard */
.strip { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: linear-gradient(90deg, #EAF1FF, #F7FAFF); border: 1px solid var(--line); flex-wrap: wrap; }
.strip strong { display: block; font-weight: 600; }
.strip .text-2 { font-size: var(--text-sm); }

/* Course cards, the Dreams Dashboard Card: padding 20, radius 10, image 165 */
.cards { display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } .cards-4 { grid-template-columns: repeat(4, 1fr); } }
.ccard { position: relative; display: flex; flex-direction: column; gap: var(--s-5); padding: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.ccard-img { position: relative; display: block; height: 165px; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--blue-700), var(--blue-300)); }
.ccard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ccard-img .fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--white); font-weight: 700; font-size: 40px; letter-spacing: -0.02em; }
.ccard-mark { position: absolute; left: 15px; top: 15px; width: 30px; height: 30px; border-radius: 50%; background: var(--white); display: grid; place-items: center; color: var(--action); font-size: 12px; font-weight: 700; }
.ccard-mark.is-done { background: var(--success); color: var(--white); }
.ccard-body { display: flex; flex-direction: column; gap: var(--s-4); flex: 1; }
.ccard-meta { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); }
.ccard-who { display: flex; align-items: center; gap: var(--s-2); font-size: var(--text-sm); color: var(--text-2); min-width: 0; }
.ccard-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: var(--r-pill); background: var(--surface-sunken); color: var(--text); font-size: 13px; font-weight: 500; white-space: nowrap; }
.ccard-title { font-size: var(--text-lg); font-weight: 700; line-height: 1.35; color: var(--text); text-decoration: none; display: block; }
.ccard-title:hover { color: var(--action); }
.ccard-facts { display: flex; align-items: center; gap: var(--s-2); font-size: var(--text-sm); color: var(--text-2); }
.ccard-facts svg { width: 16px; height: 16px; color: var(--blue-500); }
.ccard-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin-top: auto; }
.ccard-price { font-size: var(--text-md); font-weight: 600; color: var(--action); }
.ccard .progress { margin-top: var(--s-1); }

/* Catalog: filters column plus grid */
.catalog { display: grid; grid-template-columns: 1fr; gap: var(--s-6); }
@media (min-width: 1024px) { .catalog { grid-template-columns: 306px 1fr; align-items: start; } }
.filter { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); margin-bottom: var(--s-4); }
.filter h4 { font-size: var(--text-md); font-weight: 600; margin-bottom: var(--s-3); }
.filter ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.filter li a { display: flex; justify-content: space-between; color: var(--text-2); font-size: var(--text-sm); text-decoration: none; min-height: 28px; align-items: center; }
.filter li a[aria-current="page"], .filter li a:hover { color: var(--action); }
.catalog-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-6); }
.catalog-bar form { display: flex; gap: var(--s-2); }
.catalog-bar .input { min-width: 220px; min-height: 40px; }

/* Course hero, the detail page: dark navy band, right column card that overlaps */
.hero { background: linear-gradient(100deg, #061A33 0%, #08519C 120%); color: var(--white); padding: var(--s-10) 0 var(--s-12); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: var(--s-8); }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1fr 330px; align-items: start; } .detail-grid { grid-template-columns: 1fr 330px; } }
.hero h1 { color: var(--white); font-size: var(--text-3xl); }
.hero .sub { color: var(--blue-100); margin-top: var(--s-3); max-width: 62ch; }
.hero-facts { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); margin-top: var(--s-5); font-size: var(--text-sm); color: var(--white); }
.hero-facts span { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero-facts svg { width: 16px; height: 16px; color: var(--blue-200); }
.hero-who { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-6); }
.hero-who .avatar { background: var(--white); color: var(--blue-900); border: 2px solid rgba(255,255,255,0.6); }
.hero-who small { display: block; color: var(--blue-100); }
.detail-grid { display: grid; grid-template-columns: 1fr; gap: var(--s-6); margin-top: calc(var(--s-12) * -1); position: relative; }
.buy { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); display: grid; gap: var(--s-4); }
.buy .cover { aspect-ratio: 8 / 5; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--blue-700), var(--blue-300)); position: relative; }
.buy .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.buy .price { font-size: var(--text-2xl); font-weight: 700; color: var(--success); }
.buy .btn { width: 100%; }
.list-check { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); font-size: var(--text-sm); color: var(--text-2); }
.list-check li { display: flex; gap: var(--s-2); align-items: flex-start; }
.list-check svg { width: 16px; height: 16px; flex: none; color: var(--blue-500); margin-top: 3px; }
.detail-main { display: grid; gap: var(--s-6); }
.detail-main .card h2 { font-size: var(--text-xl); }
.detail-main .card h3 { font-size: var(--text-md); margin: var(--s-5) 0 var(--s-2); }
.detail-main ul.plain { margin: 0; padding-left: 18px; color: var(--text-2); font-size: var(--text-sm); display: grid; gap: var(--s-1); }
@media (min-width: 1024px) { .detail-grid > aside { position: sticky; top: 86px; } .hero { padding-bottom: 120px; } .detail-grid { margin-top: -96px; } }

/* Accordion, the course content */
.acc { display: grid; gap: var(--s-3); }
.acc details { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); background: var(--surface-sunken); font-weight: 600; font-size: var(--text-sm); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg); transition: transform var(--fast) var(--ease); }
.acc details[open] summary::after { transform: rotate(225deg); }
.acc .lesson { display: grid; grid-template-columns: 24px 1fr auto; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line); font-size: var(--text-sm); color: var(--text-2); }
.acc .lesson a { color: var(--text); text-decoration: none; }
.acc .lesson a:hover { color: var(--action); }
.acc .lesson svg { width: 16px; height: 16px; color: var(--blue-500); }
.acc .lesson.is-done svg { color: var(--success); }
.acc .lesson.is-locked { color: var(--text-3); }

/* Lesson page with curriculum rail */
.learn { display: grid; grid-template-columns: 1fr; gap: var(--s-6); }
@media (min-width: 1024px) { .learn { grid-template-columns: 1fr 360px; align-items: start; } .learn > aside { position: sticky; top: 86px; max-height: calc(100vh - 100px); overflow: auto; } }
.rail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.rail-head { padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); }
.rail-head strong { display: block; }
.rail-mod { padding: var(--s-3) var(--s-5); background: var(--surface-sunken); font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); }
.rail a.rl, .rail div.rl { display: grid; grid-template-columns: 24px 1fr auto; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-5); font-size: var(--text-sm); color: var(--text); text-decoration: none; border-top: 1px solid var(--line); }
.rail a.rl:hover { background: var(--blue-50); }
.rail .rl[aria-current="page"] { background: var(--blue-50); color: var(--action); font-weight: 600; }
.rail .rl svg { width: 16px; height: 16px; color: var(--blue-500); }
.rail .rl.is-done svg { color: var(--success); }
.rail .rl.is-locked { color: var(--text-3); }
.rail .rl small { color: var(--text-3); font-size: var(--text-xs); }

/* Simple lists inside dashboard cards: invoices and quizzes in Dreams */
.dlist { display: grid; gap: 0; }
.dlist > div { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.dlist > div:first-child { border-top: 0; padding-top: 0; }
.dlist strong { display: block; font-weight: 600; font-size: var(--text-sm); }
.dlist .facts { font-size: var(--text-sm); color: var(--text-2); display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.dlist .facts i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue-300); display: inline-block; }
.ring { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; background: conic-gradient(var(--success) calc(var(--p) * 1%), var(--blue-100) 0); color: var(--text); position: relative; }
.ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface); }
.ring span { position: relative; }
.ring.is-low { background: conic-gradient(var(--danger) calc(var(--p) * 1%), var(--blue-100) 0); }

/* Bar chart, Tufte: bars are the data, light gridlines, labels outside the SVG */
.chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s-2); align-items: end; height: 220px; padding-top: var(--s-4); border-bottom: 1px solid var(--line); }
.chart .bar { background: linear-gradient(180deg, var(--blue-700), var(--blue-300)); border-radius: 6px 6px 0 0; min-height: 4px; position: relative; }
.chart .bar b { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.chart-x { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s-2); font-size: var(--text-xs); color: var(--text-3); text-align: center; margin-top: var(--s-2); }

/* Split auth page */
.split { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - 0px); }
@media (min-width: 1024px) { .split { grid-template-columns: 1fr 1fr; } }
.split-art { display: none; position: relative; overflow: hidden; background: linear-gradient(160deg, #EAF1FF 0%, #F7FAFF 50%, #DCEBFF 100%); align-items: center; justify-content: center; padding: var(--s-16); text-align: center; }
@media (min-width: 1024px) { .split-art { display: flex; } }
.split-art .orb { position: absolute; border-radius: 50%; }
.split-art .orb-1 { width: 520px; height: 520px; background: var(--white); left: 50%; top: 22%; transform: translateX(-50%); box-shadow: var(--shadow-2); }
.split-art .orb-2 { width: 160px; height: 160px; background: var(--blue-300); right: 18%; top: 14%; opacity: 0.8; }
.split-art .orb-3 { width: 90px; height: 90px; background: var(--blue-700); left: 20%; top: 60%; opacity: 0.9; }
.split-art .phone { position: relative; width: 240px; height: 420px; border-radius: 36px; background: var(--navy-950); padding: 14px; box-shadow: var(--shadow-2); }
.split-art .phone > div { height: 100%; border-radius: 26px; background: var(--white); display: grid; gap: 14px; align-content: start; padding: 40px 22px; }
.split-art .phone i { display: block; height: 12px; border-radius: 6px; background: var(--blue-100); }
.split-art .phone i.is-brand { background: var(--action); height: 40px; border-radius: 10px; margin-top: 12px; }
.split-art .phone i.is-short { width: 50%; }
.split-copy { position: relative; margin-top: var(--s-10); max-width: 46ch; }
.split-copy h2 { font-size: var(--text-2xl); }
.split-copy h2 em { font-style: normal; color: var(--action); }
.split-copy p { color: var(--text-2); margin-top: var(--s-3); }
.split-form { display: flex; align-items: center; justify-content: center; padding: var(--s-10) var(--s-4); background: var(--surface); }
.split-form > div { width: 100%; max-width: 410px; }
.split-form h1 { font-size: var(--text-3xl); margin: var(--s-10) 0 var(--s-6); }

/* Big footer */
.site-foot { margin-top: var(--s-16); background: var(--surface); border-top: 1px solid var(--line); }
.site-foot .container { display: grid; gap: var(--s-8); padding: var(--s-12) var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 768px) { .site-foot .container { grid-template-columns: 1.4fr 1fr 1fr 1.4fr; } }
.site-foot h4 { font-size: var(--text-md); font-weight: 700; margin-bottom: var(--s-4); }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.site-foot a { color: var(--text-2); text-decoration: none; font-size: var(--text-sm); }
.site-foot a:hover { color: var(--action); }
.site-foot p { font-size: var(--text-sm); color: var(--text-2); }
.site-foot-bar { background: var(--navy-950); color: var(--blue-100); font-size: var(--text-sm); }
.site-foot-bar .container { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; padding: var(--s-4); }
.site-foot-bar a { color: var(--white); text-decoration: none; }

/* Certificate */
.cert { max-width: 860px; margin: 0 auto; padding: var(--s-12) var(--s-8); background: var(--white); border: 10px solid var(--blue-50); outline: 2px solid var(--blue-700); outline-offset: -20px; text-align: center; position: relative; }
.cert h1 { font-size: var(--text-display); letter-spacing: -0.02em; margin: var(--s-4) 0; }
.cert .who { font-size: var(--text-2xl); font-weight: 700; color: var(--action); margin: var(--s-6) 0 var(--s-2); }
.cert .what { font-size: var(--text-lg); }
.cert .sig { display: flex; justify-content: space-between; gap: var(--s-6); margin-top: var(--s-12); font-size: var(--text-sm); color: var(--text-2); }
.cert .sig b { display: block; color: var(--text); border-top: 1px solid var(--line-strong); padding-top: var(--s-2); margin-top: var(--s-6); }
@media print { .site-strip, .site-head, .site-foot, .site-foot-bar, .bottombar, .no-print { display: none !important; } body { background: #fff; } }

/* Landing hero */
.land-hero { background: linear-gradient(120deg, #EAF1FF 0%, #F7FAFF 60%, #DCEBFF 100%); padding: var(--s-16) 0; }
.land-hero .container { display: grid; gap: var(--s-8); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1024px) { .land-hero .container { grid-template-columns: 1.1fr 1fr; } }
.land-hero h1 { font-size: var(--text-display); line-height: 1.1; letter-spacing: -0.025em; }
.land-hero h1 em { font-style: normal; color: var(--action); }
.land-hero p { margin-top: var(--s-4); font-size: var(--text-lg); color: var(--text-2); }
.land-hero .actions { display: flex; gap: var(--s-3); margin-top: var(--s-6); flex-wrap: wrap; }
.land-art { position: relative; min-height: 360px; }
.land-art .panel { position: absolute; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: var(--s-4); }
.land-art .panel-1 { left: 0; top: 20px; width: 62%; }
.land-art .panel-2 { right: 0; top: 130px; width: 55%; }
.land-art .panel-3 { left: 14%; bottom: 0; width: 50%; }
.land-art .panel strong { display: block; font-size: var(--text-sm); }
.land-art .panel .text-3 { font-size: var(--text-xs); }
.band-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-6); }
.band-head h2 { font-size: var(--text-2xl); }
.steps { display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step-card { padding: var(--s-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.step-card .n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-50); color: var(--action); font-weight: 700; margin-bottom: var(--s-4); }
.step-card h3 { font-size: var(--text-lg); margin-bottom: var(--s-2); }
.step-card p { font-size: var(--text-sm); color: var(--text-2); }

/* Tabs as pills, the Enrolled Courses page */
.pilltabs { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.pilltabs a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--s-4); border-radius: var(--r-pill); background: var(--surface-sunken); color: var(--text-2); font-size: var(--text-sm); font-weight: 500; text-decoration: none; }
.pilltabs a[aria-current="page"] { background: var(--action); color: var(--white); }

/* Quiz */
.q { display: grid; gap: var(--s-6); }
.q fieldset { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); margin: 0; background: var(--surface); }
.q legend { font-weight: 600; padding: 0 var(--s-2); }
.q .choice { display: flex; gap: var(--s-3); align-items: center; min-height: 44px; padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); cursor: pointer; }
.q .choice:hover { background: var(--surface-sunken); }
.q .choice input { width: 18px; height: 18px; accent-color: var(--action); }
.q .choice.is-right { background: var(--success-bg); }
.q .choice.is-wrong { background: var(--danger-bg); }

/* Table with thumbnails, admin recent courses */
.table .thumb { display: flex; align-items: center; gap: var(--s-3); }
.table .thumb i { width: 48px; height: 36px; border-radius: 6px; background: linear-gradient(135deg, var(--blue-700), var(--blue-300)); flex: none; overflow: hidden; display: block; }
.table .thumb i img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Phone fixes from the Sep 9 walk at 390: one line strip, brand never wraps, 44 tap targets on touch widths */
@media (max-width: 1023px) {
  .site-strip .container > span:last-child { display: none; }
  .site-strip .container { min-height: 36px; }
  .brand { white-space: nowrap; font-size: var(--text-md); }
  .pill-btn { min-height: 44px; }
  .pill-btn-dark { min-height: 32px; }
  .site-actions .pill-btn { padding: 0 var(--s-3); }
}
@media (max-width: 599px) { .site-strip .container > span:first-child > span:last-child { display: none; } }
@media (max-width: 599px) {
  .site-actions .pill-btn-light span + * , .site-actions .pill-btn-light { gap: 0; }
  .site-actions .pill-btn-light { font-size: 0; padding: 0 var(--s-2); }
  .site-actions .pill-btn-light .avatar { font-size: 12px; }
  .site-actions .pill-btn-ghost { font-size: 0; padding: 0 var(--s-3); }
  .site-actions .pill-btn-ghost svg { width: 18px; height: 18px; }
  .site-actions .pill-btn-brand { display: none; }
}

/* Home page, version 0.5.0. Coursera and Udemy structure, TED restraint. */
.home-hero { background: var(--surface-brand); background: linear-gradient(110deg, #061A33 0%, #08519C 62%, #1B6BC0 100%); color: var(--white); padding: var(--s-16) 0; }
.home-hero .container { display: grid; gap: var(--s-10); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1024px) { .home-hero .container { grid-template-columns: 1.15fr 0.85fr; } .home-hero { padding: 88px 0; } }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s-2); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue-200); }
.home-hero h1 { color: var(--white); font-size: 48px; line-height: 1.08; letter-spacing: -0.03em; margin-top: var(--s-4); max-width: 16ch; }
.home-hero h1 em { font-style: normal; color: var(--blue-200); }
.home-hero .lead { color: var(--blue-100); max-width: 52ch; margin-top: var(--s-5); font-size: var(--text-lg); }
.home-hero .actions { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-8); }
.home-hero .facts { display: flex; gap: var(--s-6); flex-wrap: wrap; margin-top: var(--s-8); color: var(--blue-100); font-size: var(--text-sm); }
.home-hero .facts b { display: block; color: var(--white); font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.offer { background: var(--white); color: var(--text); border-radius: var(--r-lg); padding: var(--s-8); box-shadow: var(--shadow-2); display: grid; gap: var(--s-4); }
.offer .tag { display: inline-flex; align-self: start; padding: 4px 10px; border-radius: var(--r-pill); background: var(--blue-50); color: var(--action); font-size: 13px; font-weight: 600; }
.offer h3 { font-size: var(--text-2xl); letter-spacing: -0.02em; }
.offer .big { font-size: var(--text-3xl); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.offer .big small { display: block; font-size: var(--text-sm); font-weight: 400; color: var(--text-2); margin-top: var(--s-1); }
@media (max-width: 599px) { .home-hero h1 { font-size: 34px; } .home-hero { padding: var(--s-12) 0; } .offer { padding: var(--s-6); } }

.band { padding: var(--s-16) 0; }
.band-tint { background: var(--surface-sunken); }
.band h2 { font-size: var(--text-3xl); letter-spacing: -0.02em; max-width: 24ch; }
.band .lead { max-width: 56ch; }
.chips { display: flex; gap: var(--s-2); flex-wrap: wrap; margin: var(--s-6) 0; }
.chips a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--s-4); border-radius: var(--r-pill); border: 1px solid var(--line-strong); color: var(--text); font-size: var(--text-sm); font-weight: 500; text-decoration: none; background: var(--surface); }
.chips a:hover, .chips a[aria-current="page"] { background: var(--action); border-color: var(--action); color: var(--white); }
.audiences { display: flex; gap: var(--s-3) var(--s-8); flex-wrap: wrap; justify-content: center; margin-top: var(--s-6); color: var(--text-2); font-weight: 600; }
.audiences span { display: inline-flex; align-items: center; gap: var(--s-2); }
.audiences svg { color: var(--blue-500); }

.split-band { display: grid; gap: var(--s-8); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1024px) { .split-band { grid-template-columns: 1fr 1fr; } .split-band.flip > :first-child { order: 2; } }
.proof-cert { transform: rotate(-2deg); max-width: 480px; margin: 0 auto; box-shadow: var(--shadow-2); }
.proof-cert .cert { padding: var(--s-8) var(--s-6); outline-offset: -14px; border-width: 8px; }
.proof-cert .cert h1 { font-size: var(--text-2xl); }
.proof-cert .cert .who { font-size: var(--text-xl); }
.proof-cert .cert .what { font-size: var(--text-sm); }
.proof-cert .cert .sig { margin-top: var(--s-6); font-size: 12px; }
.progress-demo { max-width: 460px; margin: 0 auto; }
.progress-demo .card { box-shadow: var(--shadow-2); }
.who-teaches { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .who-teaches { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .who-teaches { grid-template-columns: repeat(4, 1fr); } }
.teacher { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.teacher strong { display: block; }
.teacher span { font-size: var(--text-sm); color: var(--text-2); }

.plans { display: grid; gap: var(--s-6); grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 1024px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { position: relative; display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-8) var(--s-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.plan.is-best { border-color: var(--action); box-shadow: var(--shadow-2); }
.plan .best { position: absolute; top: 0; left: 0; right: 0; transform: translateY(-100%); background: var(--navy-950); color: var(--white); text-align: center; font-size: 13px; font-weight: 600; padding: 6px; border-radius: var(--r-md) var(--r-md) 0 0; }
.plan h3 { font-size: var(--text-xl); }
.plan .for { color: var(--text-2); font-size: var(--text-sm); }
.plan .seats { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.02em; }
.plan .seats small { display: block; font-size: var(--text-sm); font-weight: 400; color: var(--text-2); }
.plan .btn { width: 100%; }
.plan .list-check { margin-top: var(--s-2); }
@media (min-width: 1024px) { .plans { padding-top: var(--s-6); } }

.cta-band { border-radius: var(--r-lg); padding: var(--s-10) var(--s-8); color: var(--white); background: linear-gradient(100deg, #08519C 0%, #1B6BC0 60%, #3182BD 100%); display: flex; justify-content: space-between; align-items: center; gap: var(--s-6); flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -80px; top: -120px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.cta-band h2 { color: var(--white); font-size: var(--text-2xl); max-width: 30ch; }
.cta-band p { color: var(--blue-100); margin-top: var(--s-2); }
.cta-band .btn { position: relative; z-index: 1; background: var(--white); color: var(--action); border-color: var(--white); }

.faq { display: grid; gap: var(--s-3); max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--text-3); }
.faq details[open] summary::after { content: "\2212"; }
.faq p { padding: 0 var(--s-5) var(--s-5); color: var(--text-2); font-size: var(--text-sm); max-width: none; }

.foot-cols { display: grid; gap: var(--s-8); grid-template-columns: 1fr 1fr; padding: var(--s-10) 0 0; }
@media (min-width: 768px) { .foot-cols { grid-template-columns: repeat(4, 1fr); } }
.foot-cols h4 { font-size: var(--text-sm); font-weight: 700; margin-bottom: var(--s-3); }
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.foot-cols a { color: var(--text-2); font-size: var(--text-sm); text-decoration: none; }
.foot-cols a:hover { color: var(--action); }
.vendor-note { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-sm); background: var(--blue-50); color: var(--text); font-size: var(--text-sm); }
.vendor-note svg { flex: none; color: var(--action); margin-top: 1px; }
.vendor-note strong { display: block; margin-bottom: 2px; }

.cert .cert-h { font-size: var(--text-2xl); font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; margin: var(--s-4) 0; }
@media (max-width: 1023px) { .chips a { min-height: 44px; } }

/* ============================================================
   Motion, version 0.6.0. One curve, three durations, reduced motion off switch at the top of this file.
   ============================================================ */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 160ms var(--ease) both; }
::view-transition-new(root) { animation: vt-in 220ms var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 560ms var(--ease) var(--stagger, 0ms), transform 560ms var(--ease) var(--stagger, 0ms); will-change: opacity, transform; }
.js .reveal.is-in { opacity: 1; transform: none; will-change: auto; }
.js .home-hero .offer.reveal { transition-delay: 120ms; }

.ccard, .tile, .plan, .step-card, .teacher, .stat { transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease); }
.ccard:hover, .plan:hover, .step-card:hover, .teacher:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--blue-200); }
.ccard-img img { transition: transform 600ms var(--ease); }
.ccard:hover .ccard-img img { transform: scale(1.04); }
.progress > span { transition: width 700ms var(--ease); }
.btn, .pill-btn { transition: background var(--fast) var(--ease), color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), transform 120ms var(--ease), border-color var(--fast) var(--ease); }
.btn:active, .pill-btn:active { transform: scale(0.98); }
.btn-primary:hover, .pill-btn-brand:hover { box-shadow: 0 6px 16px rgba(8, 81, 156, 0.28); }
.site-head { transition: box-shadow 200ms var(--ease); }
.site-head.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(9, 26, 46, 0.06); }
.side li a, .rail a.rl, .chips a, .pilltabs a, .tabs a, .filter li a { transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.acc details.is-opening > :not(summary), .faq details.is-opening > :not(summary) { animation: acc-in 220ms var(--ease) both; }
@keyframes acc-in { from { opacity: 0; transform: translateY(-4px); } }
.ladder li.is-current .step { animation: pulse 1.8s var(--ease) 2; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(49, 130, 189, 0.35); } 50% { box-shadow: 0 0 0 6px rgba(49, 130, 189, 0); } }
.avatar-96 { transition: transform 300ms var(--ease); }
.banner:hover .avatar-96 { transform: scale(1.03); }
.notice { animation: notice-in 260ms var(--ease) both; }
@keyframes notice-in { from { opacity: 0; transform: translateY(-6px); } }
.player { animation: player-in 400ms var(--ease) both; }
@keyframes player-in { from { opacity: 0; transform: scale(0.99); } }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* Login photo panel: the picture fills the half, the copy sits on a navy gradient at the foot, white on dark. */
.split-photo { padding: 0; align-items: flex-end; justify-content: flex-start; text-align: left; background: var(--navy-950); }
.split-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.split-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,26,51,0) 35%, rgba(6,26,51,0.55) 65%, rgba(6,26,51,0.92) 100%); }
.split-photo .split-copy { position: relative; z-index: 1; margin: 0; padding: var(--s-12) var(--s-12) var(--s-12); max-width: 60ch; }
.split-photo .split-copy h2 { color: var(--white); font-size: var(--text-3xl); }
.split-photo .split-copy h2 em { color: var(--blue-200); }
.split-photo .split-copy p { color: var(--blue-100); }

/* Language switch */
.lang-pick { font: inherit; font-size: 13px; color: var(--white); background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.25); border-radius: var(--r-pill); padding: 4px 28px 4px 10px; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'><path d='M4 6l4 4 4-4' fill='none' stroke='%23C6DBEF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; min-height: 28px; }
.lang-pick option { color: var(--text); }
.lang-pick-dark { color: var(--text); background-color: var(--surface-sunken); border-color: var(--line-strong); background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'><path d='M4 6l4 4 4-4' fill='none' stroke='%23395673' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>"); }
.lang-form { display: inline; }
@media (max-width: 599px) { .site-strip .container > span:last-child { display: flex; } .site-strip .container > span:last-child > .muted { display: none; } }

/* ============================================================
   Right to left. Flex and grid mirror on their own; these are the places that named a side.
   ============================================================ */
[dir="rtl"] body, [dir="rtl"] { font-family: "Noto Sans Arabic", "Noto Sans Hebrew", var(--font); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] .display, [dir="rtl"] .home-hero h1 { letter-spacing: 0; }
[dir="rtl"] .table th, [dir="rtl"] .table td, [dir="rtl"] .side li a, [dir="rtl"] .filter li a, [dir="rtl"] .rail .rl { text-align: right; }
[dir="rtl"] .table td.num, [dir="rtl"] .table th.num, [dir="rtl"] .right { text-align: left; }
[dir="rtl"] .select, [dir="rtl"] .lang-pick { background-position: left 12px center; padding-right: var(--s-3); padding-left: 40px; }
[dir="rtl"] .lang-pick { padding-left: 28px; padding-right: 10px; background-position: left 10px center; }
[dir="rtl"] .progress > span { inset: 0 0 0 auto; }
[dir="rtl"] .ccard-mark { left: auto; right: 15px; }
[dir="rtl"] .banner::before { right: auto; left: -60px; }
[dir="rtl"] .banner::after { right: auto; left: 200px; }
[dir="rtl"] .cta-band::after { right: auto; left: -80px; }
[dir="rtl"] .ladder li + li::before { left: auto; right: 13px; }
[dir="rtl"] .row-tile .dot { right: auto; left: -3px; }
[dir="rtl"] ul.plain, [dir="rtl"] ol.plain, [dir="rtl"] .detail-main ul.plain { padding-left: 0; padding-right: 18px; }
[dir="rtl"] .list-check li, [dir="rtl"] .hero-facts span, [dir="rtl"] .ccard-facts { flex-direction: row; }
[dir="rtl"] .side li a, [dir="rtl"] .side form button { margin: 0 calc(var(--s-2) * -1); }
[dir="rtl"] .split-photo .split-copy, [dir="rtl"] .split-form { text-align: right; }
[dir="rtl"] .home-hero .container > div:first-child, [dir="rtl"] .land-hero .container > div:first-child { text-align: right; }
[dir="rtl"] .crumbs .sep { transform: none; }
[dir="rtl"] .acc summary::after { transform: rotate(135deg); }
[dir="rtl"] .acc details[open] summary::after { transform: rotate(225deg); }
[dir="rtl"] .btn svg, [dir="rtl"] .pill-btn svg { transform: scaleX(-1); }
[dir="rtl"] .brand-logo, [dir="rtl"] .brand-mark, [dir="rtl"] .avatar, [dir="rtl"] .cert, [dir="rtl"] .ring { direction: ltr; }
[dir="rtl"] .chart .bar b { transform: translateX(50%); }
[dir="rtl"] code, [dir="rtl"] .cert .sig b, [dir="rtl"] input[type="email"], [dir="rtl"] input[type="password"] { direction: ltr; unicode-bidi: embed; }

/* Documentation layout: contents rail, parts as segments, numbered step cards. */
.doc { display: grid; grid-template-columns: 1fr; gap: var(--s-8); align-items: start; }
@media (min-width: 1024px) { .doc { grid-template-columns: 260px 1fr; } .doc > .toc { position: sticky; top: 86px; } }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); }
.toc h4 { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s-3); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: part; }
.toc li a { display: flex; gap: var(--s-2); align-items: baseline; padding: 6px var(--s-2); margin: 0 calc(var(--s-2) * -1); border-radius: var(--r-sm); color: var(--text-2); font-size: var(--text-sm); text-decoration: none; }
.toc li a::before { counter-increment: part; content: counter(part); flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--blue-50); color: var(--action); transform: translateY(2px); }
.toc li a:hover { background: var(--surface-sunken); color: var(--text); }
.doc-part { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-8); scroll-margin-top: 90px; }
.doc-part + .doc-part { margin-top: var(--s-8); }
.doc-part .eyebrow { color: var(--action); }
.doc-part h2 { font-size: var(--text-2xl); margin-top: var(--s-2); }
.doc-part h2::after { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--blue-500); margin-top: var(--s-3); }
.doc-part > p.lead { margin-top: var(--s-4); font-size: var(--text-md); }
.doc-part h3 { font-size: var(--text-lg); margin-top: var(--s-8); }
.doc-part h3 + p, .doc-part h3 + .docsteps { margin-top: var(--s-3); }
.docsteps { list-style: none; margin: var(--s-5) 0 0; padding: 0; counter-reset: step; display: grid; gap: var(--s-3); }
.docsteps li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: var(--s-4); padding: var(--s-4) var(--s-5); background: var(--surface-sunken); border-radius: var(--r-md); font-size: 15px; line-height: 1.55; color: var(--text-2); }
.docsteps li::before { content: counter(step); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--action); color: var(--white); font-weight: 700; font-size: 14px; }
.docsteps li strong { color: var(--text); display: block; margin-bottom: 2px; }
.docsteps li code { background: var(--white); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.doc-note { margin-top: var(--s-5); padding: var(--s-4) var(--s-5); background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--r-sm); color: var(--text-2); font-size: var(--text-sm); }
.doc-note::before { content: "Note"; display: block; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--blue-700); margin-bottom: var(--s-1); }
.doc .table { margin-top: var(--s-4); }
@media (max-width: 599px) { .doc-part { padding: var(--s-5); } .docsteps li { grid-template-columns: 30px 1fr; padding: var(--s-3) var(--s-4); } .docsteps li::before { width: 30px; height: 30px; font-size: 13px; } }

/* Contact band: facts on the left, the form in a card on the right at 1024 and up, stacked below. */
.contact-band { display: grid; gap: var(--s-8); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1024px) { .contact-band { grid-template-columns: 5fr 7fr; gap: var(--s-12); } }
.contact-side .eyebrow { color: var(--action); }
.contact-side h2 { font-size: var(--text-2xl); margin-top: var(--s-2); }
.contact-side .lead { margin-top: var(--s-3); }
.contact-facts { list-style: none; padding: 0; margin: var(--s-6) 0 0; display: grid; gap: var(--s-4); }
.contact-facts li { display: flex; gap: var(--s-3); align-items: flex-start; color: var(--text-2); }
.contact-facts li > svg { flex: none; margin-top: 3px; color: var(--action); }
.contact-facts li > span { display: grid; gap: 2px; }
.contact-facts strong { color: var(--text); font-size: var(--text-sm); }
.contact-form { padding: var(--s-6); }
@media (min-width: 640px) { .contact-form { padding: var(--s-8); } }
.form-row { display: grid; gap: var(--s-5); grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }
.field.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-sent { display: grid; justify-items: center; text-align: center; gap: var(--s-2); padding: var(--s-6) 0; }
.contact-sent .avatar { background: var(--success-bg); color: var(--success); }
.contact-sent h3 { font-size: var(--text-xl); margin-top: var(--s-2); }
.contact-sent p { max-width: 40ch; }
.table tr.is-muted td { color: var(--text-3); }
