/* ============================================================
   MASS TUTORING — DESIGN SYSTEM v3
   "A clean, academically credible SAT resource platform built
   around blue, white, black, and controlled neutral grays."
   ------------------------------------------------------------
   Typography: Sora (display) + Inter (body), self-hosted.
   Color rules:
   - One primary blue system: #1769AA (hover #12578F, active
     #0E4776). All CTAs, links, active states share it.
   - Blue guides attention; white creates clarity; near-black
     (#101820 / #0D1721) provides structure; gray supports
     hierarchy. Green/amber/red appear ONLY as status colors.
   - Key contrast results (WCAG 2.2 AA) are recorded in
     docs/COLOR-REDESIGN.md.
   ============================================================ */

@import url("/assets/fonts/fonts.css");

:root {
  /* Surfaces — blue, white, black, and neutral gray only */
  --page-background: #F5F7FA;
  --surface-primary: #FFFFFF;
  --surface-secondary: #EEF4FA;
  --surface-muted: #F8FAFC;
  --surface-warm: #EEF4FA;       /* legacy alias → soft blue */
  --surface-mint: #EDF3F7;       /* legacy alias → blue-gray */
  --surface-lavender: #F1F6FA;   /* legacy alias → extra-light blue */
  --surface-navy: #0D1721;
  --surface-navy-2: #15242F;

  /* Text */
  --text-heading: #101820;
  --text-primary: #1D2935;
  --text-secondary: #5E6B76;
  --text-on-dark: #FFFFFF;
  --text-on-dark-secondary: #B8C4CE;

  /* Primary blue system */
  --primary: #1769AA;
  --primary-hover: #12578F;
  --primary-active: #0E4776;
  --primary-soft: #DCEAF6;
  --primary-extra-light: #F1F6FA;
  --link: #1769AA;

  /* Legacy accent aliases — all routes lead to the blue system */
  --accent: #1769AA;
  --accent-strong: #1769AA;
  --accent-strong-hover: #12578F;
  --accent-soft: #DCEAF6;

  /* Borders */
  --border-light: #DCE3E9;
  --border-medium: #BCC9D3;

  /* Status — the only non-blue/gray colors, reserved for meaning */
  --success-background: #E7F4EC;
  --success-text: #27653F;
  --warning-background: #FFF4D8;
  --warning-text: #75550E;
  --error-background: #FBE9E9;
  --error-text: #9B3030;
  --official-background: #DCEAF6;
  --official-text: #0E4776;
  --recommended-background: #101820;
  --recommended-text: #FFFFFF;

  /* Category tints — blue-gray family, differentiated by icon + label */
  --tint-math: #E5F0F8;
  --tint-rw: #DCEAF6;
  --tint-desmos: #EDF3F7;
  --tint-practice: #EEF1F4;
  --tint-plans: #F1F6FA;
  --tint-wellness: #EDF3F7;
  --tint-official: #DCEAF6;
  --tint-strategy: #EAF1F6;

  /* Shape + depth — ONE radius system (3 steps), THREE shadow levels */
  --radius-small: 10px;   /* buttons, inputs, chips */
  --radius-medium: 16px;  /* cards, callouts, media */
  --radius-large: 24px;   /* large panels */
  --radius-xl: var(--radius-large);
  --shadow-small: 0 2px 10px rgba(13, 23, 33, 0.06);
  --shadow-card: 0 6px 20px rgba(13, 23, 33, 0.07);
  --shadow-hover: 0 12px 30px rgba(13, 23, 33, 0.12);
  --shadow-soft: var(--shadow-card);
  --shadow-nav: var(--shadow-small);

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 5.5rem;

  --font-display: "Sora", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --speed: 0.16s;
}

/* ============================== base ============================== */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.62;
  color: var(--text-primary);
  background: var(--page-background);
}
img { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-heading);
  line-height: 1.16;
  letter-spacing: -0.025em;
  margin: 0 0 0.5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -0.03em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; max-width: 68ch; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.35em; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--text-heading); }

:focus-visible {
  outline: 3px solid var(--primary-hover);
  outline-offset: 3px;
  border-radius: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 0.75rem; top: -100px;
  z-index: 200;
  background: var(--surface-navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-small) var(--radius-small);
  font-weight: 600;
  transition: top var(--speed) ease;
}
.skip-link:focus { top: 0; color: #fff; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-hover);
  margin-bottom: 0.9rem;
}
.section-lede { font-size: 1.1rem; color: var(--text-secondary); max-width: 56ch; }

/* ============================== header ============================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow var(--speed) ease;
}
@supports not (backdrop-filter: blur(10px)) {
  .site-header { background: #FFFFFF; }
}
.site-header.is-scrolled { box-shadow: var(--shadow-nav); }

.site-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.55rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 0.55rem;
  text-decoration: none;
  color: var(--text-heading);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.02em;
  margin-right: auto;
}
.nav-toggle {
  display: none;
  font: inherit;
  font-weight: 600;
  color: var(--text-heading);
  background: var(--surface-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-small);
  padding: 0.5rem 1rem;
  cursor: pointer;
  min-height: 44px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-small);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 550;
  font-size: 0.95rem;
  transition: background var(--speed) ease, color var(--speed) ease;
}
.nav-links a:hover { background: var(--surface-secondary); color: var(--text-heading); }
.nav-links a.is-active,
.nav-links a[aria-current="page"] {
  color: var(--primary-hover);
  background: var(--primary-soft);
}
.nav-cta {
  background: var(--accent-strong);
  color: #fff !important;
  border-radius: var(--radius-small);
  margin-left: 0.35rem;
  font-weight: 650 !important;
}
.nav-cta:hover { background: var(--accent-strong-hover) !important; color: #fff !important; }

@media (max-width: 920px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-light);
    margin-top: 0.5rem;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 0.85rem; font-size: 1.02rem; }
  .nav-cta { margin-left: 0; text-align: center; }
}

/* ============================== layout ============================== */

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 1.25rem; }

.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section-tight { padding-block: clamp(2rem, 4vw, 3.5rem); }
@media (max-width: 768px) {
  .section { padding-block: 2.5rem; }
  .section-tight { padding-block: 2rem; }
}
.section-white { background: var(--surface-primary); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.section-blue { background: var(--surface-secondary); }
.section-warm { background: var(--surface-warm); }
.section-mint { background: var(--surface-mint); }
.section-lavender { background: var(--surface-lavender); }

.section-dark {
  background: linear-gradient(160deg, var(--surface-navy) 0%, var(--surface-navy-2) 100%);
  color: var(--text-on-dark);
}
.section-dark h2, .section-dark h3 { color: #FFFFFF; }
.section-dark p { color: var(--text-on-dark); }
.section-dark .muted { color: var(--text-on-dark-secondary); }
.section-dark a { color: #9FCBF2; }
.section-dark a:hover { color: #FFFFFF; }
.section-dark :focus-visible { outline-color: #9FCBF2; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 2rem; } }

.breadcrumbs { font-size: 0.9rem; margin-bottom: 1.2rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "/"; color: var(--text-secondary); margin-right: 0.35rem; }

/* ============================== page hero ============================== */

.page-hero {
  padding-block: clamp(2.75rem, 5vw, 3.75rem);
  background:
    radial-gradient(circle at 85% 15%, rgba(23, 105, 170, 0.14), transparent 38%),
    radial-gradient(circle at 10% 85%, rgba(13, 23, 33, 0.05), transparent 32%),
    var(--page-background);
  border-bottom: 1px solid var(--border-light);
}
.page-hero .page-title {
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 800;
  margin-bottom: 0.4em;
}
.page-hero .section-lede { font-size: 1.15rem; }
.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3rem;
  align-items: center;
}
.hero-illus { display: flex; justify-content: center; }
.hero-illus svg { width: 100%; max-width: 420px; height: auto; }
@media (max-width: 860px) {
  .page-hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-illus { display: none; }
}
.page-hero.tint-math { background: linear-gradient(180deg, var(--tint-math), var(--page-background)); }
.page-hero.tint-rw { background: linear-gradient(180deg, var(--tint-rw), var(--page-background)); }
.page-hero.tint-desmos { background: linear-gradient(180deg, var(--tint-desmos), var(--page-background)); }
.page-hero.tint-practice { background: linear-gradient(180deg, var(--tint-practice), var(--page-background)); }
.page-hero.tint-plans { background: linear-gradient(180deg, var(--tint-plans), var(--page-background)); }
.page-hero.tint-wellness { background: linear-gradient(180deg, var(--tint-wellness), var(--page-background)); }
.page-hero.tint-official { background: linear-gradient(180deg, var(--tint-official), var(--page-background)); }
.page-hero.tint-strategy { background: linear-gradient(180deg, var(--tint-strategy), var(--page-background)); }
.page-hero.tint-warm { background: linear-gradient(180deg, var(--surface-warm), var(--page-background)); }

/* ============================== home hero ============================== */

.hero {
  background:
    radial-gradient(circle at 80% 20%, rgba(23, 105, 170, 0.14), transparent 34%),
    radial-gradient(circle at 15% 75%, rgba(13, 23, 33, 0.05), transparent 30%),
    var(--page-background);
  border-bottom: 1px solid var(--border-light);
  padding-block: clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  gap: 3rem;
  align-items: center;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  font-weight: 800;
  margin: 0 0 0.45em;
}
.hero-title .accent-line { color: var(--accent-strong); }
.hero .lede { font-size: 1.18rem; color: var(--text-primary); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.7rem; }
.hero-points {
  display: flex; flex-wrap: wrap; gap: 0.55rem 1.4rem;
  list-style: none; padding: 0; margin: 1.8rem 0 0;
  font-size: 0.93rem; font-weight: 550; color: var(--text-secondary);
}
.hero-points li { margin: 0; display: flex; align-items: center; gap: 0.45rem; }
.hero-points .pt { color: var(--success-text); font-weight: 800; }

/* --- hero product preview (pure HTML/CSS composition) --- */

.hero-preview {
  position: relative;
  min-height: 430px;
}
.hp-panel {
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-soft);
}
.hp-main { padding: 1.2rem 1.2rem 1.35rem; }
.hp-search {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--page-background);
  border: 1px solid var(--border-medium);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.hp-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.hp-chip {
  font-size: 0.78rem; font-weight: 600;
  padding: 0.22rem 0.7rem; border-radius: 999px;
  background: var(--surface-secondary); color: var(--official-text);
  border: 1px solid var(--border-light);
}
.hp-chip.on { background: var(--primary-soft); border-color: var(--primary); }
.hp-row {
  display: flex; gap: 0.75rem; align-items: center;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-medium);
  padding: 0.65rem 0.75rem;
  margin-top: 0.75rem;
  background: var(--surface-primary);
}
.hp-row .ico {
  flex-shrink: 0;
  width: 40px; height: 40px; border-radius: var(--radius-small);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.8rem; color: #fff;
}
.hp-row .t { font-weight: 650; font-size: 0.9rem; color: var(--text-heading); line-height: 1.25; }
.hp-row .s { font-size: 0.78rem; color: var(--text-secondary); }
@media (max-width: 960px) {
  .hero-preview { min-height: 0; display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-preview .hp-panel {
    animation: hp-rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }
  @keyframes hp-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ============================== buttons ============================== */

.button-primary, .button-secondary, .button-ghost-dark {
  display: inline-block;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  border-radius: var(--radius-small);
  padding: 0.85rem 1.6rem;
  min-height: 44px;
  cursor: pointer;
  text-align: center;
  transition: background var(--speed) ease, border-color var(--speed) ease,
              transform var(--speed) ease, box-shadow var(--speed) ease;
}
.button-primary {
  background: var(--accent-strong);
  color: #FFFFFF;
  border: 1px solid var(--accent-strong);
  box-shadow: 0 6px 18px rgba(180, 74, 30, 0.22);
}
.button-primary:hover { background: var(--accent-strong-hover); border-color: var(--accent-strong-hover); color: #fff; transform: translateY(-1px); }
.button-primary:active { transform: translateY(0) scale(0.98); }
.button-secondary {
  background: var(--surface-primary);
  color: var(--primary-hover);
  border: 1px solid var(--primary);
}
.button-secondary:hover { background: var(--surface-secondary); border-color: var(--primary-hover); color: var(--text-heading); transform: translateY(-1px); }
.button-secondary:active { transform: translateY(0) scale(0.98); }
.button-ghost-dark {
  background: transparent; color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.45);
}
.button-ghost-dark:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.text-link { font-weight: 650; white-space: nowrap; }
.text-link .arr { display: inline-block; transition: transform var(--speed) ease; }
.text-link:hover .arr { transform: translateX(3px); }

/* ============================== resource cards ============================== */

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 1.75rem;
  margin: 2.5rem 0;
  align-items: stretch;
}
.video-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 1.75rem;
  margin: 2.5rem 0;
  align-items: stretch;
}
.book-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: 1.75rem;
  margin: 2.5rem 0;
  align-items: stretch;
}

.rcard {
  display: flex;
  flex-direction: column;
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
/* `display: flex` above would otherwise override the browser default
   `[hidden] { display: none }`, leaving search/filter-hidden cards visible. */
.rcard[hidden] { display: none !important; }
.rcard:hover {
  border-color: #9EBED6;
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.rcard:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.2), var(--shadow-hover);
  transform: translateY(-3px);
}
.card-body {
  padding: 1.2rem 1.3rem 1.3rem;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.card-title { margin-bottom: 0.15rem; font-size: 1.08rem; line-height: 1.3; }
.card-title a { color: var(--text-heading); text-decoration: none; }
.card-title a:hover { color: var(--primary-hover); text-decoration: underline; }
.card-creator { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.7rem; }
.card-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: 0.45rem; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.7rem; }
.card-meta-item {
  background: var(--page-background);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 0.08rem 0.62rem;
}
.card-desc { font-size: 0.95rem; margin-bottom: 0.8em; }
.card-why {
  font-size: 0.92rem;
  background: var(--surface-secondary);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  padding: 0.7rem 0.95rem;
}
.card-limitations { font-size: 0.9rem; color: var(--text-primary); }
.card-reviewed { color: var(--text-secondary); font-size: 0.8rem; margin: auto 0 0; padding-top: 0.75rem; }

/* --- equal-height cards: clamp long text, reveal in full on hover/focus.
       Clamp only on hover-capable devices so touch users always see all text. --- */
@media (hover: hover) and (pointer: fine) {
  .card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .feature-card .card-desc { -webkit-line-clamp: 5; }
  .compact-card .card-desc { -webkit-line-clamp: 2; }
  .rcard:hover .card-desc,
  .rcard:focus-within .card-desc { -webkit-line-clamp: 40; }
}

/* --- media area (shared) --- */

.card-media {
  position: relative;
  display: block;
  background: var(--surface-secondary);
  overflow: hidden;
}
/* image skeleton: fixed-ratio panels shimmer until the (opaque) thumbnail,
   fallback panel, or cover paints over it — no layout shift, no spinners */
.card-media::before, .book-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, 0.6) 50%, transparent 68%);
  background-size: 220% 100%;
  animation: skeleton-sheen 1.8s ease-in-out infinite;
}
@keyframes skeleton-sheen {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .card-media::before, .book-cover::before { animation: none; background: none; }
}
.ratio-16x9 { aspect-ratio: 16 / 9; }
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.rcard:hover .card-media img, .rcard:focus-within .card-media img { transform: scale(1.035); }

/* broken remote thumbnail → hide the img and show a branded panel instead */
.card-media.media-error img, [data-media].media-error img { display: none; }
.card-media.media-error::before, [data-media].media-error::before {
  content: "";
  position: absolute; inset: 0;
  animation: none;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.24), transparent 42%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 22px),
    linear-gradient(150deg, #1D4E79 0%, #0D1721 100%);
}

.media-cta {
  position: absolute;
  left: 0.8rem; bottom: 0.8rem;
  background: rgba(13, 23, 33, 0.88);
  color: #fff;
  font-size: 0.8rem; font-weight: 650;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--speed) ease, transform var(--speed) ease;
  pointer-events: none;
}
.rcard:hover .media-cta, .rcard:focus-within .media-cta { opacity: 1; transform: translateY(0); }

.play-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(13, 23, 33, 0.82);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--speed) ease, background var(--speed) ease;
}
.play-badge svg { margin-left: 3px; }
.rcard:hover .play-badge, .rcard:focus-within .play-badge {
  transform: translate(-50%, -50%) scale(1.08);
  background: var(--accent-strong);
}
.duration-badge {
  position: absolute;
  right: 0.65rem; bottom: 0.65rem;
  background: rgba(13, 23, 33, 0.88);
  color: #fff;
  font-size: 0.78rem; font-weight: 650;
  padding: 0.14rem 0.5rem;
  border-radius: 6px;
}
.rcard:hover .duration-badge, .rcard:focus-within .duration-badge { opacity: 0; }

/* --- designed fallback previews --- */

.media-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: flex-end;
  padding: 1rem 1.1rem;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.28), transparent 42%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 22px),
    linear-gradient(150deg, var(--fb) 0%, color-mix(in srgb, var(--fb) 72%, #0D1721) 100%);
  color: #fff;
  overflow: hidden;
  transition: padding-bottom var(--speed) ease;
}
/* lift the fallback text clear of the media CTA pill when it fades in */
.rcard:hover .media-fallback, .rcard:focus-within .media-fallback { padding-bottom: 3.1rem; }
.media-fallback::before {
  content: "";
  position: absolute;
  top: -34px; right: -34px;
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 16px solid rgba(255, 255, 255, 0.13);
}
.media-fallback::after {
  content: "";
  position: absolute;
  bottom: -46px; right: 34px;
  width: 92px; height: 92px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

/* interface-style motif inside designed previews */
.fb-art {
  position: absolute;
  inset: 12% 8% 34% 34%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.fb-art svg { height: 100%; width: auto; max-width: 100%; }
.feature-card .fb-art { inset: 14% 8% 30% 30%; }
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .media-fallback { background: linear-gradient(150deg, var(--fb), #0D1721 160%); }
}
.fb-mark {
  position: absolute; top: 0.9rem; left: 1rem;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--fb);
  font-family: var(--font-display);
  font-weight: 800; font-size: 1rem;
  border-radius: var(--radius-small);
}
.fb-name {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.05rem;
  line-height: 1.25; letter-spacing: -0.02em;
  max-width: 90%;
}
.fb-domain { font-size: 0.76rem; opacity: 0.85; margin-top: 0.2rem; }
.fb-kind {
  position: absolute; top: 1rem; right: 1rem;
  font-size: 0.72rem; font-weight: 650;
  background: rgba(13, 23, 33, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.15rem 0.6rem; border-radius: 999px;
}

/* --- book cards --- */

.book-card { display: flex; flex-direction: column; }
.book-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  max-height: 340px;
  background: var(--surface-secondary);
  overflow: hidden;
}
.book-cover .cover-img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 1.1rem;
  transition: transform 0.25s ease;
}
.rcard:hover .cover-img, .rcard:focus-within .cover-img { transform: scale(1.03); }
.cover-designed {
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 80% 12%, rgba(255, 255, 255, 0.2), transparent 46%),
    linear-gradient(160deg, var(--fb), color-mix(in srgb, var(--fb) 65%, #0D1721));
}
.cover-designed .cover-text {
  display: flex; flex-direction: column; justify-content: space-between;
  width: 62%; height: 78%;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(13, 23, 33, 0.35);
  padding: 1rem 0.9rem;
}
.cover-designed .cover-title {
  font-family: var(--font-display);
  font-weight: 800; font-size: 0.98rem; line-height: 1.25;
  letter-spacing: -0.02em; color: var(--text-heading);
}
.cover-designed .cover-author { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.cover-designed .cover-note { font-size: 0.62rem; color: var(--text-secondary); }
.book-details { margin: 0 0 0.8rem; padding: 0; display: grid; gap: 0.2rem; }
.book-detail { display: flex; gap: 0.5rem; font-size: 0.88rem; }
.book-detail dt { font-weight: 650; color: var(--text-heading); min-width: 4.4em; }
.book-detail dd { margin: 0; color: var(--text-secondary); }
.library-note {
  background: var(--success-background);
  color: var(--success-text);
  border-radius: var(--radius-small);
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 550;
}

/* --- creator cards --- */

.creator-card .creator-head {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.2rem 1.3rem 0;
  margin-bottom: 0.6rem;
}
.creator-card .card-badges, .creator-card .card-meta, .creator-card .card-desc,
.creator-card .card-why, .creator-card .card-limitations, .creator-card .card-reviewed {
  margin-left: 1.3rem; margin-right: 1.3rem;
}
.creator-card .card-reviewed { padding-bottom: 1.3rem; }
.creator-avatar-link { display: block; border-radius: 50%; flex-shrink: 0; }
.creator-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--border-light);
}
.avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-family: var(--font-display);
  font-weight: 800;
}
.creator-card .card-title { margin-bottom: 0; }
.creator-card .card-creator { margin-bottom: 0; }

/* --- compact cards --- */

.compact-card {
  display: flex; flex-direction: row; gap: 1rem;
  padding: 1rem 1.1rem;
  align-items: flex-start;
}
.compact-card .card-body { padding: 0; }
.compact-card .card-title { font-size: 1rem; }
.compact-card .card-desc { font-size: 0.88rem; margin-bottom: 0.5em; }
.compact-mark {
  flex-shrink: 0;
  width: 58px; height: 58px;
  border-radius: var(--radius-small);
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.30), transparent 55%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 12px),
    linear-gradient(150deg, var(--fb), color-mix(in srgb, var(--fb) 70%, #0D1721));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.05rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* ============================== bento ============================== */

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  margin: 2.5rem 0;
  align-items: stretch;
}
.bento > .feature-card { grid-column: span 2; grid-row: span 2; }
.bento .rcard { margin: 0; }
@media (max-width: 980px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento > .feature-card { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .bento > .feature-card { grid-column: auto; }
}
.feature-card .card-title { font-size: 1.35rem; }
.feature-card .card-desc { font-size: 1rem; }

/* ============================== category / pathway cards ============================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr));
  gap: 1.6rem;
  margin: 2.5rem 0;
  align-items: stretch;
}
.category-card {
  display: block;
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color var(--speed) ease, box-shadow var(--speed) ease, transform var(--speed) ease;
}
.category-card:hover, .category-card:focus-visible {
  border-color: var(--primary-soft);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  color: var(--text-primary);
}
.category-card .cat-icon {
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-small);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: inset 0 0 0 1px rgba(13, 23, 33, 0.06);
}

/* --- category visuals: one drawing system (2px strokes, blue on pale blue) --- */
.cat-viz {
  display: block;
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.cat-viz svg {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 180ms ease;
}
.category-card:hover .cat-viz svg,
.category-card:focus-visible .cat-viz svg { transform: scale(1.03); }

/* category page heroes: the category's graphic in a framed panel */
.hero-illus-viz {
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-card);
  padding: 1.25rem;
  width: 100%;
  max-width: 400px;
}
.hero-illus-viz svg { display: block; width: 100%; height: auto; }
.category-card h3 { margin-bottom: 0.3rem; }
.category-card p { color: var(--text-secondary); margin: 0; font-size: 0.93rem; }
.category-card .cat-go { display: inline-block; margin-top: 0.8rem; color: var(--link); font-weight: 650; font-size: 0.93rem; }
.category-card .cat-go .arr { display: inline-block; transition: transform var(--speed) ease; }
.category-card:hover .cat-go .arr { transform: translateX(3px); }

.tint-math .cat-icon { background: var(--tint-math); }
.tint-rw .cat-icon { background: var(--tint-rw); }
.tint-desmos .cat-icon { background: var(--tint-desmos); }
.tint-practice .cat-icon { background: var(--tint-practice); }
.tint-plans .cat-icon { background: var(--tint-plans); }
.tint-wellness .cat-icon { background: var(--tint-wellness); }
.tint-official .cat-icon { background: var(--tint-official); }
.tint-strategy .cat-icon { background: var(--tint-strategy); }

.pathway-list {
  list-style: none; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.9rem;
}
.pathway-list a {
  display: block;
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-medium);
  padding: 1rem 1.15rem;
  text-decoration: none;
  font-weight: 650;
  color: var(--text-heading);
  box-shadow: var(--shadow-card);
  transition: border-color var(--speed) ease, box-shadow var(--speed) ease, transform var(--speed) ease;
}
.pathway-list a:hover { border-color: var(--primary-soft); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.pathway-list .path-hint { display: block; font-weight: 400; font-size: 0.87rem; color: var(--text-secondary); margin-top: 0.2rem; }

/* ============================== badges ============================== */

.badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 650;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-free { background: #EEF4FA; color: #12578F; border: 1px solid #C7DCEB; }
.badge-official { background: var(--official-background); color: var(--official-text); }
.badge-recommended { background: var(--recommended-background); color: var(--recommended-text); }
.badge-paid { background: var(--warning-background); color: var(--warning-text); }
.badge-neutral { background: #F1F3F5; color: #45525D; border: 1px solid var(--border-light); }

/* ============================== search + filters ============================== */

.guide-tools {
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: 1.6rem;
  margin: 1.75rem 0;
}
.search-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.search-row label { font-weight: 650; display: block; margin-bottom: 0.45rem; width: 100%; }
.search-input {
  flex: 1 1 260px;
  font: inherit;
  color: var(--text-primary);
  background: var(--surface-primary);
  border: 1px solid var(--border-medium);
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  min-height: 48px;
  transition: border-color var(--speed) ease, box-shadow var(--speed) ease;
}
.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.25);
}
fieldset.filter-group { border: 0; padding: 0; margin: 1.1rem 0 0; }
fieldset.filter-group legend { font-weight: 650; padding: 0; margin-bottom: 0.5rem; font-size: 0.95rem; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  cursor: pointer;
  border: 1px solid var(--border-medium);
  border-radius: 999px;
  background: var(--surface-primary);
  padding: 0.42rem 0.95rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--text-primary);
  min-height: 40px;
  transition: background var(--speed) ease, border-color var(--speed) ease, color var(--speed) ease;
}
.filter-chip input { accent-color: var(--primary-hover); width: 1rem; height: 1rem; }
.filter-chip:has(input:checked) {
  background: var(--primary-soft);
  color: var(--official-text);
  border-color: var(--primary);
  font-weight: 650;
}
.filter-chip:has(input:focus-visible) { outline: 3px solid var(--primary-hover); outline-offset: 2px; }
.clear-filters {
  font: inherit; font-weight: 650;
  color: var(--primary-hover);
  background: var(--surface-primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-small);
  padding: 0.55rem 1.2rem;
  margin-top: 1.1rem;
  cursor: pointer;
  min-height: 44px;
  transition: background var(--speed) ease;
}
.clear-filters:hover { background: var(--surface-secondary); }
.results-count { font-weight: 650; color: var(--text-heading); margin: 1.1rem 0 0; }
.empty-state .empty-mascot { display: inline-block; margin-bottom: 0.75rem; }
.empty-state .empty-mascot svg, .empty-state .empty-mascot img { display: block; }
.empty-state .clear-filters { margin-top: 0.5rem; }

.cta-mascot { display: inline-block; margin-bottom: 1rem; }
.callout-quote { display: flex; gap: 1.25rem; align-items: flex-start; }
.callout-quote .callout-mascot { flex-shrink: 0; }
.callout-quote p { margin: 0; }
@media (max-width: 560px) { .callout-quote { flex-direction: column; } }

.empty-state {
  background: var(--surface-primary);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-large);
  padding: 2.25rem;
  text-align: center;
  color: var(--text-primary);
}

/* ============================== callouts, steps, FAQ, tables ============================== */

.callout {
  border-radius: var(--radius-medium);
  padding: 1.15rem 1.35rem;
  margin: 1.4rem 0;
  border: 1px solid var(--border-light);
  background: var(--surface-primary);
  box-shadow: var(--shadow-card);
}
.callout-official { background: var(--official-background); border-color: var(--primary-soft); box-shadow: none; }
.callout-warning { background: var(--warning-background); border-color: #E8D9A8; box-shadow: none; }
.callout-success { background: var(--success-background); border-color: #BCE3CC; box-shadow: none; }
.callout p:last-child { margin-bottom: 0; }

.step-list { list-style: none; padding: 0; counter-reset: step; }
.step-list > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.4rem 3.4rem;
  margin: 0;
}
.step-list > li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 2.3rem; height: 2.3rem;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--official-text);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step-list > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1.12rem; top: 2.5rem; bottom: 0.2rem;
  width: 2px;
  background: var(--border-light);
}
.step-list h3 { margin-bottom: 0.2rem; }

details.faq-item {
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-medium);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-card);
}
details.faq-item summary {
  cursor: pointer;
  font-weight: 650;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-heading);
  padding: 1.05rem 1.3rem;
  border-radius: var(--radius-medium);
  list-style-position: outside;
}
details.faq-item[open] summary { border-bottom: 1px solid var(--border-light); }
details.faq-item .faq-body { padding: 1rem 1.3rem; }
details.faq-item .faq-body p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 1.4rem 0; border-radius: var(--radius-medium); border: 1px solid var(--border-light); box-shadow: var(--shadow-card); }
table.mt-table { border-collapse: collapse; width: 100%; min-width: 560px; background: var(--surface-primary); }
.mt-table caption {
  text-align: left; font-weight: 700; font-family: var(--font-display);
  color: var(--text-heading); padding: 0.9rem 1rem;
  background: var(--surface-primary);
}
.mt-table th, .mt-table td { border-top: 1px solid var(--border-light); padding: 0.65rem 1rem; text-align: left; vertical-align: top; }
.mt-table th { background: var(--surface-secondary); color: var(--text-heading); }

/* ============================== trust strip ============================== */

/* --- homepage: guide overview --- */
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
@media (max-width: 860px) { .overview-grid { grid-template-columns: 1fr; gap: 1.75rem; } }
.guide-links {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.guide-links li { margin: 0; }
.guide-links a {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.8rem 1rem;
  min-height: 44px;
  background: var(--page-background);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-small);
  text-decoration: none;
  color: var(--text-heading);
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color var(--speed) ease, background var(--speed) ease;
}
.guide-links a:hover, .guide-links a:focus-visible { border-color: var(--primary); background: var(--surface-secondary); color: var(--text-heading); }
.guide-links .gl-ico { display: inline-flex; color: var(--primary); flex-shrink: 0; }
.guide-links .gl-ico .icon { width: 20px; height: 20px; }
@media (max-width: 400px) { .guide-links { grid-template-columns: 1fr; } }

/* --- homepage: essential resources + tutoring CTA --- */
.essential-grid { margin-bottom: 0; }
.essential-card .card-body { padding-bottom: 1.1rem; }
.tutoring-cta {
  display: flex; gap: 1.75rem; align-items: flex-start;
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
}
.tutoring-cta h2 { margin-bottom: 0.4em; }
.tutoring-cta .section-lede { margin-bottom: 1.2em; }
.tutoring-cta .hero-actions { margin-top: 0; align-items: center; }
.tutoring-mascot { flex-shrink: 0; }
@media (max-width: 640px) { .tutoring-cta { flex-direction: column; gap: 1rem; } }

/* ============================== stat tiles (dark section) ============================== */

.fact-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}
.fact-tile {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-medium);
  padding: 1.2rem 1.3rem;
}
.fact-tile .big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: #fff;
  display: block;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}
.fact-tile p { font-size: 0.92rem; color: var(--text-on-dark-secondary); margin: 0; }

/* ============================== footer ============================== */

.site-footer {
  background: var(--surface-navy);
  color: var(--text-on-dark);
  margin-top: 3rem;
  padding-block: 2.5rem;
  font-size: 0.95rem;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.footer-compact { display: flex; flex-direction: column; gap: 1.25rem; }
.footer-brand-row { display: flex; align-items: center; gap: 1rem; }
.footer-brand { font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 1.05rem; margin: 0; }
.footer-mission { margin: 0.15rem 0 0; max-width: 52ch; }
.footer-links {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem;
}
.site-footer a { color: #B9CFE3; }
.site-footer a:hover { color: #FFFFFF; }
.site-footer :focus-visible { outline-color: #9FCBF2; }
.footer-fineprint { color: var(--text-on-dark-secondary); font-size: 0.83rem; }

/* ============================== misc ============================== */

.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0; }
.divider { border: 0; border-top: 1px solid var(--border-light); margin: 2.75rem 0; }
.center { text-align: center; }

.mascot-note {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-large);
  padding: 1.3rem;
  box-shadow: var(--shadow-card);
}
.mascot-note svg { flex-shrink: 0; }

/* ============================== reduced motion ============================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .rcard:hover, .rcard:focus-within,
  .category-card:hover, .pathway-list a:hover,
  .button-primary:hover, .button-secondary:hover { transform: none; }
  .rcard:hover .card-media img, .rcard:focus-within .card-media img,
  .rcard:hover .cover-img, .rcard:focus-within .cover-img { transform: none; }
}


/* ============================== v3 simplification ============================== */

.ratio-16x10 { aspect-ratio: 16 / 10; }

/* Expandable secondary card info (spec §5) */
.card-more {
  border: 0;
  border-top: 1px solid var(--border-light);
  margin: var(--space-3) 0 0;
  box-shadow: none;
  background: none;
}
.card-more summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--link);
  padding: var(--space-3) 0 var(--space-2);
  list-style-position: outside;
}
.card-more summary:hover { color: var(--text-heading); }
.card-more .card-more-body { padding: var(--space-2) 0 var(--space-2); }
.card-more .card-more-body > * { margin-bottom: var(--space-3); }
.card-more .card-more-body > *:last-child { margin-bottom: 0; }
.card-note { font-size: 0.9rem; color: var(--text-secondary); }

/* One icon family: outline, stroke 2, primary color on tinted containers */
.icon { display: block; }
.cat-icon .icon { color: var(--primary-hover); width: 26px; height: 26px; }
.hp-row .ico .icon { color: #fff; width: 20px; height: 20px; }

/* Brand / logo slots */
.brand-logo { display: block; border-radius: 8px; }
.brand .brand-mark, .brand .brand-logo { flex-shrink: 0; }
.footer-brand-link {
  display: inline-flex;
  background: #FFFFFF;            /* clean surface for the dark footer (§14) */
  border-radius: var(--radius-small);
  padding: var(--space-2);
  margin-bottom: var(--space-3);
}
.hero-signature {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: 0.9rem; font-weight: 650; color: var(--text-secondary);
  margin-bottom: var(--space-4);
}
.hero-signature .brand-mark, .hero-signature .brand-logo { flex-shrink: 0; }

/* Hero preview: one coherent panel (no floating pile) */
.hero-preview { min-height: 0; }
.hp-panel.hp-main { position: static; width: 100%; max-width: 430px; margin-left: auto; }
.hp-video {
  display: flex; gap: var(--space-3); align-items: center;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-small);
  padding: var(--space-2);
  margin-top: var(--space-3);
  background: var(--surface-primary);
}
.hp-video img { border-radius: 7px; width: 108px; height: 61px; object-fit: cover; flex-shrink: 0; }
.hp-video .t { font-weight: 650; font-size: 0.85rem; color: var(--text-heading); line-height: 1.3; }
.hp-video .s { font-size: 0.76rem; color: var(--text-secondary); }
.hp-footer {
  margin-top: var(--space-4);
  font-size: 0.8rem; font-weight: 650;
  color: var(--official-text);
  background: var(--surface-secondary);
  border-radius: 999px;
  padding: var(--space-2) var(--space-4);
  text-align: center;
}

/* ============================== hero mascot (activates with official art) ============================== */

.hero-mascot-wrap { position: relative; display: flex; justify-content: center; align-items: flex-end; }
.hero-mascot { position: relative; width: clamp(300px, 34vw, 520px); height: auto; object-fit: contain; z-index: 1; filter: drop-shadow(0 18px 20px rgba(13, 23, 33, 0.18)); }
.hero-mascot-halo {
  position: absolute; inset: auto 50% 6% auto;
  transform: translateX(50%);
  width: min(90%, 460px); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #DCEAF6 0%, #EEF4FA 62%, transparent 72%);
}
.hero-mascot-badge {
  position: absolute; top: 8%; right: 4%; z-index: 2;
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  padding: 0.4rem 0.9rem;
  font-weight: 700; font-size: 0.85rem; color: var(--primary-hover);
}
@media (max-width: 860px) {
  .hero-mascot-wrap { order: 2; margin-top: 0.5rem; }
  .hero-mascot { width: clamp(220px, 60vw, 320px); }
}

/* ============================== nav search + toast ============================== */

.nav-search-ico { display: inline-flex; vertical-align: -2px; margin-right: 0.15rem; }
.mt-toast {
  position: fixed; left: 50%; bottom: 1.25rem; z-index: 300;
  transform: translate(-50%, 12px);
  background: var(--surface-navy); color: #fff;
  border-radius: 999px; padding: 0.6rem 1.2rem;
  font-size: 0.92rem; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity var(--speed) ease, transform var(--speed) ease;
}
.mt-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============================== card actions + quick view ============================== */

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-small);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color var(--speed) ease, color var(--speed) ease, background var(--speed) ease;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary-hover); }
.icon-btn[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-active); }
.icon-btn[aria-pressed="true"] svg { fill: currentColor; }
.card-actions { display: flex; gap: 0.5rem; margin-top: auto; padding-top: 0.75rem; }
.card-actions .icon-btn { width: 38px; height: 38px; }

.qv-open { overflow: hidden; }
.qv-root { position: fixed; inset: 0; z-index: 400; }
.qv-overlay { position: absolute; inset: 0; background: rgba(13, 23, 33, 0.45); }
.qv-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(440px, 92vw);
  background: var(--surface-primary);
  box-shadow: -12px 0 40px rgba(13, 23, 33, 0.2);
  display: flex; flex-direction: column;
  animation: qv-in 200ms ease-out;
}
@keyframes qv-in { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.qv-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  padding: 1.25rem 1.4rem 1rem;
  border-bottom: 1px solid var(--border-light);
}
.qv-head h2 { font-size: 1.15rem; margin: 0; }
.qv-creator { color: var(--text-secondary); font-size: 0.9rem; margin: 0.2rem 0 0; }
.qv-body { padding: 1.25rem 1.4rem; overflow-y: auto; }
.qv-body .card-meta { display: flex; flex-wrap: wrap; gap: 0.45rem; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.9rem; }
.qv-action { margin: 1.25rem 0 0; }
@media (max-width: 560px) {
  .qv-panel { top: auto; left: 0; width: 100%; max-height: 88vh; border-radius: var(--radius-large) var(--radius-large) 0 0; animation: qv-up 220ms ease-out; }
  @keyframes qv-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) { .qv-panel { animation: none; } }

/* ============================== SAT countdown ============================== */

.sat-countdown {
  display: flex; gap: clamp(1.25rem, 4vw, 3rem); align-items: center; flex-wrap: wrap;
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
  padding: 1.25rem clamp(1.25rem, 3vw, 2rem);
}
.sc-label { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary-hover); margin: 0 0 0.2rem; }
.sc-days { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.03em; color: var(--text-heading); margin: 0; line-height: 1.05; }
.sc-date { color: var(--text-secondary); margin: 0.2rem 0 0; }
.sc-side { flex: 1; min-width: 240px; }
.sc-status { font-weight: 600; margin: 0 0 0.35rem; }
.sc-details summary { cursor: pointer; color: var(--link); font-weight: 600; font-size: 0.92rem; }
.sc-details-body { font-size: 0.92rem; color: var(--text-secondary); padding-top: 0.4rem; }
.sc-details-body ul { margin: 0.3rem 0; }
.sc-source { font-size: 0.88rem; margin: 0.45rem 0 0; }

/* ============================== homepage My Study promo ============================== */

.mystudy-promo { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
@media (max-width: 860px) { .mystudy-promo { grid-template-columns: 1fr; gap: 1.5rem; } }
.mystudy-snapshot {
  background: var(--surface-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-medium);
  padding: 1.4rem 1.5rem;
}
.ms-snap-label { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary-hover); margin: 0 0 0.3rem; }
.ms-snap-task { font-weight: 650; color: var(--text-heading); margin: 0 0 0.8rem; }
.ms-snap-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin: 0; padding: 0; font-size: 0.9rem; color: var(--text-secondary); }
.ms-snap-stats li { margin: 0; }
.ms-snap-stats strong { color: var(--text-heading); }

/* ============================== My Study dashboard ============================== */

.ms-statusrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.ms-stat {
  background: var(--surface-primary); border: 1px solid var(--border-light);
  border-radius: var(--radius-medium); padding: 0.9rem 1.1rem;
  display: flex; flex-direction: column;
}
.ms-stat strong { font-family: var(--font-display); font-size: 1.35rem; color: var(--text-heading); }
.ms-stat span { font-size: 0.82rem; color: var(--text-secondary); }

.ms-today {
  background: var(--surface-secondary); border: 1px solid var(--border-light);
  border-radius: var(--radius-large); padding: clamp(1.25rem, 3vw, 1.9rem);
  margin-bottom: 1.5rem;
}
.ms-today-title { font-size: 1.25rem; margin-bottom: 0.3em; }
.ms-today-hint { color: var(--text-secondary); font-size: 0.95rem; }
.ms-today-actions { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; margin-top: 0.9rem; }
.ms-mini-btn {
  background: none; border: none; padding: 0.45rem 0.3rem; cursor: pointer;
  color: var(--link); font: inherit; font-size: 0.92rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px; border-radius: 4px;
}
.ms-mini-btn:hover { color: var(--text-heading); }

.ms-tabs { display: flex; gap: 0.25rem; border-bottom: 2px solid var(--border-light); margin-bottom: 1.25rem; overflow-x: auto; }
.ms-tabs [role="tab"] {
  font: inherit; font-weight: 600; font-size: 0.98rem;
  background: none; border: none; border-bottom: 3px solid transparent;
  padding: 0.7rem 1rem; margin-bottom: -2px;
  color: var(--text-secondary); cursor: pointer; white-space: nowrap;
  min-height: 44px;
}
.ms-tabs [role="tab"][aria-selected="true"] { color: var(--primary-hover); border-bottom-color: var(--primary); }
[role="tabpanel"] { padding: 0.25rem 0 1rem; }

.ms-wizard { max-width: 560px; }
.ms-wiz-progress { font-size: 0.85rem; font-weight: 700; color: var(--primary-hover); text-transform: uppercase; letter-spacing: 0.06em; }
.ms-wiz-nav { display: flex; gap: 0.8rem; margin-top: 1.25rem; }
.ms-field { display: block; margin-bottom: 0.9rem; font-weight: 600; font-size: 0.95rem; }
.ms-field input, .ms-field select, .ms-field textarea {
  display: block; width: 100%; margin-top: 0.3rem;
  font: inherit; font-weight: 400;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border-medium); border-radius: var(--radius-small);
  background: var(--surface-primary); color: var(--text-primary);
}
.ms-field input:focus, .ms-field select:focus, .ms-field textarea:focus { outline: 3px solid var(--primary-hover); outline-offset: 1px; }
fieldset.ms-field { border: 1px solid var(--border-light); border-radius: var(--radius-small); padding: 0.7rem 0.9rem; }
fieldset.ms-field label { display: inline-flex; gap: 0.4rem; margin-right: 1.2rem; font-weight: 400; }
.ms-note { font-size: 0.88rem; color: var(--text-secondary); }

.ms-plan-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.ms-week { border: 1px solid var(--border-light); border-radius: var(--radius-medium); background: var(--surface-primary); margin-bottom: 0.6rem; }
.ms-week summary { cursor: pointer; font-weight: 650; padding: 0.8rem 1.1rem; display: flex; justify-content: space-between; gap: 1rem; }
.ms-week-count { color: var(--text-secondary); font-weight: 500; font-size: 0.9rem; }
.ms-tasklist { list-style: none; margin: 0; padding: 0 1.1rem 0.9rem; }
.ms-tasklist li { margin: 0 0 0.45rem; }
.ms-tasklist label { display: flex; gap: 0.6rem; align-items: flex-start; }
.ms-tasklist input { margin-top: 0.25rem; width: 18px; height: 18px; }

.ms-addform { border: 1px solid var(--border-light); border-radius: var(--radius-medium); background: var(--surface-primary); margin-bottom: 1rem; }
.ms-addform summary { cursor: pointer; font-weight: 650; padding: 0.8rem 1.1rem; color: var(--primary-hover); }
.ms-addform form { padding: 0 1.1rem 1.1rem; }
.ms-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 0 1rem; }
.ms-insights { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 0.9rem; color: var(--text-secondary); background: var(--surface-secondary); border-radius: var(--radius-small); padding: 0.7rem 1rem; margin-bottom: 1rem; }
.ms-err { border: 1px solid var(--border-light); border-radius: var(--radius-small); background: var(--surface-primary); margin-bottom: 0.5rem; }
.ms-err summary { cursor: pointer; padding: 0.65rem 1rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-weight: 600; font-size: 0.95rem; }
.ms-err-tags { color: var(--text-secondary); font-weight: 500; font-size: 0.85rem; }
.ms-err-body { padding: 0 1rem 0.8rem; font-size: 0.93rem; }
.ms-err-actions { display: flex; gap: 1rem; margin: 0.4rem 0 0; }

.ms-savedlist { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.ms-savedlist li { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; border: 1px solid var(--border-light); border-radius: var(--radius-small); background: var(--surface-primary); padding: 0.6rem 1rem; margin-bottom: 0.45rem; }
.ms-saved-actions { display: flex; gap: 0.8rem; }

.ms-checklist { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.ms-checklist li { margin: 0 0 0.4rem; }
.ms-checklist label { display: flex; gap: 0.6rem; align-items: center; min-height: 32px; }
.ms-checklist input { width: 18px; height: 18px; }

.ms-settings { margin-top: 2rem; border-top: 1px solid var(--border-light); padding-top: 1rem; }
.ms-settings summary { cursor: pointer; font-weight: 650; color: var(--text-secondary); }
.ms-settings-body { padding-top: 0.75rem; font-size: 0.93rem; }
.ms-settings-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.ms-import-label { cursor: pointer; }

/* --- mascot page placements --- */
.hero-mascot--page { width: clamp(240px, 26vw, 380px); }
.hero-mascot-wrap--page { align-items: center; }
.guide-mascot-cta { display: flex; gap: 2rem; align-items: center; justify-content: center; text-align: left; max-width: 760px; margin: 0 auto; }
.guide-mascot-cta img { flex-shrink: 0; object-fit: contain; }
@media (max-width: 560px) { .guide-mascot-cta { flex-direction: column; text-align: center; } .guide-mascot-cta img { width: 120px; height: 120px; } }

/* ============================== hero fluid background ============================== */

.hero { isolation: isolate; }
.hero > .wrap { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero > canvas { display: none !important; }
}

/* ============================== tutoring intake trust copy (Task 1.2) ============================== */

.intake-trust {
  margin-top: 1.4rem;
  max-width: 46ch;
}
.intake-trust p { font-size: 0.95rem; color: var(--text-secondary); margin: 0 0 0.6rem; }
.intake-trust p strong { color: var(--text-heading); }
.intake-privacy { display: flex; gap: 0.55rem; align-items: flex-start; }
.intake-privacy .intake-lock { color: var(--primary); flex-shrink: 0; margin-top: 0.15rem; }

/* ============================== in-guide tutoring nudge (Task 2.1) ============================== */

.tutoring-nudge {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin: 2.25rem 0 0.5rem;
  padding: 1rem 1.15rem;
  background: var(--surface-secondary);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-medium);
}
.tutoring-nudge .tn-text { margin: 0; flex: 1 1 15rem; font-size: 0.96rem; color: var(--text-primary); }
.tutoring-nudge .tn-link { font-weight: 650; white-space: nowrap; text-decoration: none; color: var(--link); }
.tutoring-nudge .tn-link:hover { text-decoration: underline; }
.tutoring-nudge .tn-link .arr { display: inline-block; transition: transform var(--speed) ease; }
.tutoring-nudge .tn-link:hover .arr { transform: translateX(3px); }
.tutoring-nudge .tn-dismiss {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; min-width: 32px;
  background: none; border: none; border-radius: var(--radius-small);
  color: var(--text-secondary); cursor: pointer;
}
.tutoring-nudge .tn-dismiss:hover { background: var(--border-light); color: var(--text-heading); }
@media (max-width: 480px) {
  .tutoring-nudge { flex-direction: column; align-items: flex-start; position: relative; }
  .tutoring-nudge .tn-dismiss { position: absolute; top: 0.5rem; right: 0.5rem; }
  .tutoring-nudge .tn-text { padding-right: 2rem; }
}

/* ============================== Start Here quiz (Task 2.2) ============================== */

.start-quiz {
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 720px;
}
.start-quiz .hero-actions { margin-top: 1.25rem; align-items: center; }
.sq-flow { border: 0; padding: 0; margin: 0; }
.sq-progress { font-family: var(--font-body); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary-hover); margin: 0 0 1rem; }
.sq-step { border: 0; padding: 0; margin: 0; }
.sq-step legend { font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 700; color: var(--text-heading); letter-spacing: -0.02em; margin-bottom: 1.1rem; padding: 0; }
.sq-options { display: grid; gap: 0.6rem; }
@media (min-width: 480px) { .sq-options { grid-template-columns: 1fr 1fr; } }
.sq-opt {
  text-align: left;
  font: inherit; font-weight: 600; font-size: 1rem;
  color: var(--text-heading);
  background: var(--surface-primary);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-small);
  padding: 0.85rem 1rem;
  min-height: 48px;
  cursor: pointer;
  transition: border-color var(--speed) ease, background var(--speed) ease;
}
.sq-opt:hover, .sq-opt:focus-visible { border-color: var(--primary); background: var(--surface-secondary); }
.sq-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.4rem; }
.sq-result .hero-actions { margin-top: 1.25rem; }

/* ============================== educators page + referral form (Task 2.3) ============================== */

.edu-offer { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1rem; }
.edu-offer li {
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-medium);
  padding: 1.1rem 1.25rem;
}
.edu-form-lede { color: var(--text-secondary); }
.edu-form { max-width: 32rem; margin-top: 1rem; }
.edu-form fieldset.ms-field legend .req,
.edu-optional { font-weight: 400; color: var(--text-secondary); font-size: 0.88rem; }
.edu-form fieldset.ms-field label { display: flex; align-items: flex-start; gap: 0.5rem; margin: 0.4rem 0; min-height: 32px; }
.edu-form fieldset.ms-field input[type="radio"] { margin-top: 0.2rem; width: 18px; height: 18px; }
.edu-error { color: var(--error-text); background: var(--error-background); border-radius: var(--radius-small); padding: 0.6rem 0.85rem; font-size: 0.92rem; }
.form-privacy { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.9rem; color: var(--text-secondary); margin: 1rem 0; }
.form-privacy .intake-lock { color: var(--primary); flex-shrink: 0; margin-top: 0.15rem; }
.edu-confirm { max-width: 34rem; }
.edu-confirm h2 { margin-top: 0.75rem; }
.edu-confirm-mascot img { display: block; }

/* ============================== print / Save-as-PDF (Task 3.1) ============================== */

@media print {
  :root { --page-background: #fff; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .site-header, .site-footer, .skip-link, .nav-toggle,
  .hero > canvas, .hero-mascot-wrap, .hero-mascot-halo, .hero-preview,
  .sat-countdown, .start-quiz, .tutoring-nudge, .qv-root, .mt-toast,
  .ms-tabs, .ms-settings, .ms-today-actions, .hero-illus,
  [data-print], .cta-mascot, .tutoring-mascot, .mystudy-snapshot { display: none !important; }
  .section, .section-tight, .page-hero { padding-block: 0.6rem !important; }
  .rcard, .ms-week, .callout, .guide-card, .feature-card, .mission-card,
  .ms-err, .book-card, .video-card, .site-card { break-inside: avoid; box-shadow: none !important; border-color: #999 !important; }
  a { color: #000 !important; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #444; }
  a[href^="/"]::after, a[href^="#"]::after, a[href^="mailto"]::after { content: ""; }
  /* force collapsed disclosures open so nothing is missing from the PDF */
  details > *:not(summary) { display: revert !important; }
  [role="tabpanel"][hidden] { display: block !important; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* ============================== My Study welcome-back + opt-in (Tasks 3.3, 3.4) ============================== */

.ms-welcome {
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; flex-wrap: wrap;
  background: var(--surface-secondary);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-medium);
  padding: 1.1rem 1.35rem;
  margin-bottom: 1.25rem;
}
.ms-welcome h2 { margin: 0.1rem 0 0.3rem; font-size: 1.25rem; }
.ms-welcome .section-lede { margin: 0; font-size: 0.98rem; }
.ms-welcome .button-secondary { flex-shrink: 0; }
.ms-optin {
  display: flex; gap: 0.6rem; align-items: flex-start;
  background: var(--surface-secondary); border: 1px solid var(--border-light);
  border-radius: var(--radius-small); padding: 0.85rem 1rem; margin: 0 0 1rem;
  font-size: 0.92rem; color: var(--text-primary); font-weight: 400;
}
.ms-optin input { margin-top: 0.15rem; width: 18px; height: 18px; flex-shrink: 0; }
.ms-optin em { color: var(--text-secondary); font-style: normal; }
@media (max-width: 560px) { .ms-welcome .button-secondary { width: 100%; } }

/* educator radio rows: comfortable tap targets (Task 3.2) */
.edu-form fieldset.ms-field label { min-height: 44px; align-items: center; padding: 0.25rem 0; }

.guide-pdf-row { margin-top: 1rem; }

/* ============================== Phase 1 trust pages (tutoring, impact, hero note) ============================== */

.hero-tutoring-note { font-size: 0.95rem; color: var(--text-secondary); max-width: 42ch; margin: 0.9rem 0 0; }
.impact-example {
  margin: 1.25rem 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-medium);
  background: var(--surface-primary);
  padding: 1.25rem 1.4rem;
}
.impact-metric { text-align: center; }
.impact-metric .im-value { font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; color: var(--text-heading); line-height: 1; margin: 0; }
.impact-metric .im-name { font-weight: 650; color: var(--text-heading); margin: 0.35rem 0 0.1rem; }
.impact-metric .im-period { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }
.impact-example figcaption { font-size: 0.9rem; color: var(--text-secondary); border-top: 1px solid var(--border-light); margin-top: 1rem; padding-top: 0.8rem; }

/* ============================== Access Corps proposal flag ============================== */

.status-flag {
  display: flex; gap: 0.6rem; align-items: baseline;
  background: var(--warning-background); color: var(--warning-text);
  border: 1px solid #E8D9A8; border-radius: var(--radius-medium);
  padding: 0.85rem 1.1rem; margin-top: 1.1rem; font-size: 0.95rem; max-width: 60ch;
}
.status-flag .status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warning-text); flex-shrink: 0; align-self: center; }
.status-flag strong { color: var(--warning-text); }

/* ============================== My Study tutoring escalation ============================== */

.ms-escalate { position: relative; margin: 1rem 0 0; }
.ms-escalate p:first-of-type { margin-top: 0; }
.ms-escalate-x {
  position: absolute; top: 0.5rem; right: 0.6rem;
  border: 0; background: transparent; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: var(--text-secondary);
  padding: 0.15rem 0.4rem; border-radius: var(--radius-small);
}
.ms-escalate-x:hover { color: var(--text-heading); background: var(--surface-secondary); }

/* ============================== Official provider logo frame ============================== */
/* Neutral white frame that overlays the designed fallback tile when a resource
   has a verified official logo (visual.logoUrl). If the image fails, the
   [data-media].logo-error rule hides the frame and the tile shows through. */

.resource-logo-frame {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  width: 116px; height: 72px;
  max-width: 70%;
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(13, 23, 33, 0.16);
  z-index: 2;
}
.resource-logo-frame img {
  display: block;
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  transition: none;
}
.rcard:hover .resource-logo-frame img,
.rcard:focus-within .resource-logo-frame img { transform: none; }
[data-media].logo-error .resource-logo-frame { display: none; }

/* ============================== Data-driven status + impact metrics ============================== */

.status-flag .status-updated { color: var(--warning-text); font-weight: 400; opacity: 0.85; }
.impact-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); margin: 1rem 0 1.5rem; }
.impact-grid .impact-example { margin: 0; }
.impact-metric .im-note { font-size: 0.82rem; color: var(--text-secondary); margin: 0.3rem 0 0; }
.impact-example .im-cat {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; color: var(--primary); background: var(--surface-secondary);
  padding: 0.1rem 0.5rem; border-radius: 999px; margin-left: 0.3rem;
}
