/* ──────────────────────────────────────────────────────────────────────
 * MedStudyStream — site.css
 * Shared stylesheet for landing, signin, homeroom, player, certificate.
 *
 * Brand: medical authority + warm professionalism. Deep teal primary,
 * cream background, Crimson Pro serif headings on Inter body.
 * Mobile-first. Light theme is canonical; dark theme honors prefers-color-scheme.
 *
 * Last updated 2026-05-20 (initial brand pass for OAuth launch).
 * ────────────────────────────────────────────────────────────────────── */

/* ── Design tokens ─────────────────────────────────────────────────── */
:root {
  /* Brand */
  --brand-primary:        #0F4C5C;   /* deep clinical teal */
  --brand-primary-hover:  #15677E;
  --brand-primary-active: #0A3A47;
  --brand-accent:         #C97B3C;   /* warm amber — used sparingly for CTAs */
  --brand-accent-hover:   #B66A2D;

  /* Surfaces */
  --bg-canvas:    #FAF7F2;   /* warm cream — the page */
  --bg-surface:   #FFFFFF;   /* cards, modals */
  --bg-elevated:  #FFFFFF;
  --bg-muted:     #F3EFE7;   /* subtle banded sections */
  --bg-overlay:   rgba(15, 21, 26, 0.55);

  /* Text */
  --text-primary:   #1A1F2E;
  --text-secondary: #4A5160;
  --text-muted:     #7B8290;
  --text-inverse:   #FAF7F2;
  --text-link:      var(--brand-primary);
  --text-link-hover: var(--brand-primary-hover);

  /* Lines */
  --border:        #E5E1D9;
  --border-strong: #C8C2B3;
  --border-focus:  var(--brand-primary);

  /* Feedback */
  --success: #2E7D5F;
  --warning: #B07C2F;
  --error:   #C04A3D;
  --info:    var(--brand-primary);

  /* OAuth provider colors (the canonical ones — do not customize) */
  --google-bg:     #FFFFFF;
  --google-border: #DADCE0;
  --google-text:   #3C4043;
  --ms-bg:         #FFFFFF;
  --ms-border:     #8C8C8C;
  --ms-text:       #5E5E5E;
  --apple-bg:      #000000;
  --apple-text:    #FFFFFF;

  /* Typography */
  --font-serif: "Crimson Pro", Georgia, "Times New Roman", Times, serif;
  --font-sans:  "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --fs-xs:   0.8125rem;  /* 13 */
  --fs-sm:   0.875rem;   /* 14 */
  --fs-base: 1rem;       /* 16 */
  --fs-md:   1.125rem;   /* 18 */
  --fs-lg:   1.25rem;    /* 20 */
  --fs-xl:   1.5rem;     /* 24 */
  --fs-2xl:  1.875rem;   /* 30 */
  --fs-3xl:  2.5rem;     /* 40 */
  --fs-4xl:  3.25rem;    /* 52 */
  --fs-hero: 4rem;       /* 64 — desktop hero only */

  --lh-tight:  1.15;
  --lh-snug:   1.3;
  --lh-base:   1.55;
  --lh-loose:  1.75;

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold: 600;
  --fw-bold:    700;

  /* Spacing — 4px scale */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Shadows — layered for depth, soft for the warm palette */
  --shadow-xs: 0 1px 2px rgba(15, 32, 39, 0.04);
  --shadow-sm: 0 2px 4px rgba(15, 32, 39, 0.06), 0 1px 2px rgba(15, 32, 39, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 32, 39, 0.08), 0 2px 4px rgba(15, 32, 39, 0.05);
  --shadow-lg: 0 12px 32px rgba(15, 32, 39, 0.12), 0 4px 8px rgba(15, 32, 39, 0.06);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.45);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;

  /* Layout */
  --container-max: 1180px;
  --container-pad: var(--sp-6);
  --header-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-canvas:   #0E1620;
    --bg-surface:  #15202C;
    --bg-elevated: #1A2836;
    --bg-muted:    #131D27;
    --text-primary:   #F4F1EA;
    --text-secondary: #C3C8D2;
    --text-muted:     #8B919C;
    --border:        #2A3744;
    --border-strong: #3A4854;
    --brand-primary: #5BB3C9;
    --brand-primary-hover: #7BC4D7;
    --brand-primary-active: #3F9AB1;
    --text-link: var(--brand-primary);
    --text-link-hover: var(--brand-primary-hover);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.55), 0 2px 4px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.65), 0 4px 8px rgba(0, 0, 0, 0.45);
  }
}

/* User-explicit theme override (data-theme on <html>) — beats prefers-color-scheme */
html[data-theme="light"] {
  --bg-canvas:   #FAF7F2;
  --bg-surface:  #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-muted:    #F3EFE7;
  --text-primary:   #1A1F2E;
  --text-secondary: #4A5160;
  --text-muted:     #7B8290;
  --border:        #E5E1D9;
  --border-strong: #C8C2B3;
  --brand-primary: #0F4C5C;
}

html[data-theme="dark"] {
  --bg-canvas:   #0E1620;
  --bg-surface:  #15202C;
  --bg-elevated: #1A2836;
  --bg-muted:    #131D27;
  --text-primary:   #F4F1EA;
  --text-secondary: #C3C8D2;
  --text-muted:     #8B919C;
  --border:        #2A3744;
  --border-strong: #3A4854;
  --brand-primary: #5BB3C9;
}

/* ── Reset / base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--text-primary);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

img, video { max-width: 100%; height: auto; display: block; }

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--text-link-hover); text-decoration: underline; text-underline-offset: 0.18em; }
a:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 3px; border-radius: 2px; }

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 var(--sp-4); padding-left: var(--sp-6); }
ul:last-child, ol:last-child { margin-bottom: 0; }
li + li { margin-top: var(--sp-2); }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--sp-10) 0;
}

::selection { background: var(--brand-primary); color: var(--text-inverse); }

/* ── Typography ────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--text-primary);
  margin: 0 0 var(--sp-4);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }
h6 { font-size: var(--fs-base); letter-spacing: 0.04em; text-transform: uppercase; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin: 0 0 var(--sp-3);
}

.lede {
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
  color: var(--text-secondary);
  max-width: 60ch;
}

.text-muted    { color: var(--text-muted); }
.text-center   { text-align: center; }
.text-balance  { text-wrap: balance; }

@media (min-width: 768px) {
  h1 { font-size: var(--fs-4xl); }
  h2 { font-size: var(--fs-3xl); }
  h3 { font-size: var(--fs-2xl); }
  .lede { font-size: var(--fs-xl); }
}

/* ── Layout primitives ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.section {
  padding: var(--sp-16) 0;
}
.section--tight  { padding: var(--sp-10) 0; }
.section--loose  { padding: var(--sp-24) 0; }
.section--muted  { background: var(--bg-muted); }

.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-6); }
.stack-xl > * + * { margin-top: var(--sp-8); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-10);
  align-items: center;
}
@media (min-width: 880px) {
  .split { grid-template-columns: 1.1fr 0.9fr; gap: var(--sp-16); }
  .split--reverse > :first-child { order: 2; }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}
@media (min-width: 640px)  { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ── Header ────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.86);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-family: var(--font-serif);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-lg);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text-primary); text-decoration: none; }
.brand .brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: var(--brand-primary);
  color: var(--text-inverse);
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  letter-spacing: 0;
  align-self: center;
}
.brand .brand-suffix {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-left: var(--sp-2);
  align-self: center;
}

.nav {
  display: none;
  gap: var(--sp-6);
  align-items: center;
}
.nav a {
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
}
.nav a:hover { color: var(--text-primary); text-decoration: none; }

@media (min-width: 768px) {
  .nav { display: inline-flex; }
}

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.7rem 1.25rem;
  min-height: 44px;             /* touch target */
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--primary {
  background: var(--brand-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--brand-primary-hover); color: var(--text-inverse); text-decoration: none; }
.btn--primary:active { background: var(--brand-primary-active); transform: translateY(1px); }

.btn--accent {
  background: var(--brand-accent);
  color: #2A1505;
  box-shadow: var(--shadow-sm);
}
.btn--accent:hover { background: var(--brand-accent-hover); color: #2A1505; text-decoration: none; }

.btn--secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn--secondary:hover { background: var(--bg-muted); color: var(--text-primary); text-decoration: none; }

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
}
.btn--ghost:hover { background: var(--bg-muted); color: var(--text-primary); text-decoration: none; }

.btn--lg { padding: 0.95rem 1.6rem; font-size: var(--fs-md); min-height: 52px; }
.btn--sm { padding: 0.45rem 0.85rem; font-size: var(--fs-sm); min-height: 36px; }
.btn--block { width: 100%; }

/* ── OAuth provider buttons ───────────────────────────────────────────
 * Provider styling follows each vendor's brand guidelines. We DO NOT
 * customize colors. Width is identical across providers for visual rhythm.
 * ────────────────────────────────────────────────────────────────────── */

.oauth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1.25rem;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  text-decoration: none;
  transition: filter var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  background: transparent;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.oauth-button:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.oauth-button:hover { box-shadow: var(--shadow-sm); text-decoration: none; }
.oauth-button:active { transform: translateY(1px); }
.oauth-button[aria-busy="true"] { opacity: 0.7; cursor: progress; pointer-events: none; }
.oauth-button[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

.oauth-button .icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.oauth-button--google {
  background: var(--google-bg);
  border-color: var(--google-border);
  color: var(--google-text);
}
.oauth-button--google:hover { background: #F8F9FA; color: var(--google-text); }

.oauth-button--microsoft {
  background: var(--ms-bg);
  border-color: var(--ms-border);
  color: var(--ms-text);
}
.oauth-button--microsoft:hover { background: #F2F2F2; color: var(--ms-text); }

.oauth-button--apple {
  background: var(--apple-bg);
  color: var(--apple-text);
}
.oauth-button--apple:hover { background: #1A1A1A; color: var(--apple-text); }
.oauth-button--apple:active { background: #000000; }

@media (prefers-color-scheme: dark) {
  /* In dark mode keep Google and Microsoft on white for brand fidelity; Apple already correct. */
  .oauth-button--google,
  .oauth-button--microsoft {
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.35);
  }
}

/* ── Cards ─────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-xs);
}
.card--feature {
  padding: var(--sp-8);
  box-shadow: var(--shadow-md);
}
.card--centered { text-align: center; }

.card-title {
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  margin: 0 0 var(--sp-3);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--bg-muted);
  color: var(--brand-primary);
  margin-bottom: var(--sp-4);
}

/* ── Pills / badges ────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.25rem 0.7rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  background: var(--bg-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.pill--brand   { background: rgba(15, 76, 92, 0.08); color: var(--brand-primary); border-color: rgba(15, 76, 92, 0.16); }
.pill--accent  { background: rgba(201, 123, 60, 0.12); color: #8B4F1A; border-color: rgba(201, 123, 60, 0.24); }
.pill--success { background: rgba(46, 125, 95, 0.10); color: var(--success); border-color: rgba(46, 125, 95, 0.24); }

/* ── Hero ──────────────────────────────────────────────────────────── */
.hero {
  padding: var(--sp-16) 0 var(--sp-12);
  background:
    radial-gradient(80% 60% at 0% 0%, rgba(15, 76, 92, 0.08), transparent 60%),
    radial-gradient(70% 50% at 100% 100%, rgba(201, 123, 60, 0.10), transparent 60%),
    var(--bg-canvas);
}
.hero h1 {
  font-size: clamp(var(--fs-3xl), 6vw, var(--fs-hero));
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 var(--sp-4);
}
.hero .lede { margin: 0 0 var(--sp-8); }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-8);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

/* ── Instructor card ───────────────────────────────────────────────── */
.instructor {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--sp-4);
  align-items: start;
}
.instructor-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-xl);
  color: var(--brand-primary);
  border: 1px solid var(--border);
}
.instructor-name {
  font-family: var(--font-serif);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-lg);
  margin: 0 0 var(--sp-1);
}
.instructor-title {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* ── Forms ─────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
}
.input, .select, .textarea {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  min-height: 44px;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(15, 76, 92, 0.18);
}

/* ── Alerts ────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--r-md);
  background: var(--bg-surface);
  font-size: var(--fs-sm);
}
.alert--info    { border-left-color: var(--info); }
.alert--success { border-left-color: var(--success); }
.alert--warning { border-left-color: var(--warning); }
.alert--error   { border-left-color: var(--error); }

/* ── Footer ────────────────────────────────────────────────────────── */
.site-footer {
  flex-shrink: 0;
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
  padding: var(--sp-12) 0 var(--sp-8);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}
.site-footer .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
}
@media (min-width: 768px) {
  .site-footer .container { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer-brand {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
}
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li + li { margin-top: var(--sp-2); }
.footer-list a { color: var(--text-secondary); }
.footer-list a:hover { color: var(--text-primary); text-decoration: none; }
.footer-heading {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--sp-3);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: var(--sp-8);
  padding-top: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.footer-bottom strong { color: var(--text-secondary); font-weight: var(--fw-semibold); }
.footer-bottom a { color: var(--text-secondary); }

/* ── Auth-card (sign-in / sign-up panel) ───────────────────────────── */
.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h));
  padding: var(--sp-10) 0;
}
.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-10) var(--sp-8);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 {
  font-size: var(--fs-2xl);
  margin: 0 0 var(--sp-2);
  text-align: center;
}
.auth-card .auth-sub {
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  margin: 0 0 var(--sp-8);
}
.auth-providers {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: var(--sp-6) 0;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-fine {
  margin-top: var(--sp-6);
  font-size: var(--fs-xs);
  text-align: center;
  color: var(--text-muted);
  line-height: 1.55;
}
.auth-fine a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 0.18em; }

/* ── Module card placeholders (homeroom) ───────────────────────────── */
.module-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.module-card[data-state="locked"] { opacity: 0.55; cursor: not-allowed; }
.module-card[data-state="available"]:hover,
.module-card[data-state="in_progress"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.module-card .module-position {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.module-card .module-title {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  margin: 0;
}
.module-progress-bar {
  height: 6px;
  background: var(--bg-muted);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.module-progress-bar > span {
  display: block;
  height: 100%;
  background: var(--brand-primary);
  border-radius: var(--r-pill);
  transition: width var(--dur-slow) var(--ease-out);
}

/* ── Utilities ─────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.hidden { display: none !important; }
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: var(--sp-2) !important; }
.mt-4 { margin-top: var(--sp-4) !important; }
.mt-6 { margin-top: var(--sp-6) !important; }
.mt-8 { margin-top: var(--sp-8) !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: var(--sp-2) !important; }
.mb-4 { margin-bottom: var(--sp-4) !important; }
.mb-6 { margin-bottom: var(--sp-6) !important; }
.mb-8 { margin-bottom: var(--sp-8) !important; }

/* ── Reduced motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
