/* Meredith Math — shared styles.
   Colors and sizes are taken from the original Wix site. */

:root {
  --cream: #fbf8f5;
  --blue: #1d698c;
  --blue-light: #4587a3;
  --orange: #b45914;
  --navy: #0b3d4f;
  --cloud: #8fa6de;
  --card: #97a6e0;
  --card-border: #4f6f9f;
  --purple: #5b4bd1;
  --purple-bg: #efeefe;
  --page-width: 980px;
  --heading-font: "Work Sans", sans-serif;
  /* The Wix site uses "Aether", a Wix-only font. Figtree is the closest free match. */
  --body-font: "Figtree", "Work Sans", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: #000;
  font-family: var(--heading-font);
  font-size: 16px;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
/* Keep the hidden attribute working even on elements styled with display (e.g. img above). */
[hidden] { display: none !important; }

.container {
  width: var(--page-width);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 1012px) {
  .container { padding: 0; }
}

/* ---------- Header ---------- */

.site-header {
  background: var(--cream);
  height: 117px;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  color: var(--blue);
  margin-left: 34px;
}
.brand img { width: 87px; height: auto; margin-right: 0; }
.brand-name { font-weight: 600; font-size: 22px; line-height: 26px; display: block; }
.brand-tagline { font-weight: 300; font-size: 18px; line-height: 21px; display: block; }

.nav { display: flex; list-style: none; margin: 0; padding: 0; }
.nav > li { position: relative; }
.nav a {
  display: block;
  padding: 0 15px;
  line-height: 50px;
  font-weight: 600;
  font-size: 16px;
  color: var(--blue);
  text-decoration: none;
  transition: color 0.4s ease;
}
.nav a:hover, .nav a.active { color: var(--blue-light); }
.nav .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--cream);
  z-index: 10;
}
.nav .submenu a { white-space: nowrap; }
.nav li:hover > .submenu, .nav li:focus-within > .submenu { display: block; }

.menu-toggle { display: none; }

@media (max-width: 800px) {
  .site-header { height: auto; }
  .site-header .container { flex-wrap: wrap; padding-block: 16px; }
  .brand { margin-left: 0; }
  .brand img { width: 60px; }
  .brand-name { font-size: 18px; line-height: 22px; }
  .brand-tagline { font-size: 14px; line-height: 18px; }
  .menu-toggle {
    display: block;
    background: none;
    border: 0;
    font-size: 28px;
    color: var(--blue);
    cursor: pointer;
  }
  .nav { display: none; width: 100%; flex-direction: column; }
  .nav.open { display: flex; }
  .nav .submenu { display: block; position: static; padding-left: 16px; }
}

/* ---------- Footer (blank band, as on the Wix site) ---------- */

.site-footer { background: var(--cream); min-height: 57px; }

/* ---------- Home ---------- */

.home-hero {
  background: url("../images/background.jpg") center top / cover no-repeat;
  padding-bottom: 116px;
}
.banner { position: relative; }
.banner img { width: 980px; height: auto; }
/* Invisible link sitting on the "Schedule a Free Call" button painted into the banner image */
.banner-link {
  position: absolute;
  left: 5.3%;
  top: 61.6%;
  width: 37.4%;
  height: 11.6%;
}

.intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 6px 27px 0;
}
.intro-text { max-width: 600px; }
.intro-text p, .intro-text ul { max-width: 543px; }
.intro h1 {
  font-weight: 600;
  font-size: 45px;
  line-height: 63px;
  margin: 0;
  max-width: 600px;
}
.intro p, .intro li {
  font-family: var(--body-font);
  font-size: 18px;
  line-height: 25.2px;
  margin: 0;
}
.intro p { margin-bottom: 11px; }
.intro ul { margin: 0 0 18px; padding-left: 33px; }
.intro .gap { margin-top: 18px; }

.cloud {
  position: relative;
  flex: 0 0 296px;
  height: 292px;
  margin-top: 90px;
  display: grid;
  place-items: center;
}
.cloud svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cloud p {
  position: relative;
  margin: 0;
  width: 180px;
  text-align: center;
  font-weight: 600;
  font-size: 22px;
  line-height: 31px;
}

.video {
  width: 866px;
  max-width: 100%;
  margin: 50px auto 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.video video, .video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 0; }

.apply {
  display: block;
  width: 278px;
  margin: 58px auto 0;
  padding: 17px 0;
  background: var(--navy);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.2em;
  font-weight: 500;
}
.apply:hover { background: var(--blue); }

.ingredients-title {
  text-align: center;
  color: var(--blue);
  font-weight: 600;
  font-size: 22px;
  margin: 24px 0 26px;
}
.cards {
  display: flex;
  justify-content: center;
  gap: 94px;
  flex-wrap: wrap;
}
.card {
  width: 226px;
  padding: 12px 2px 10px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  text-align: center;
}
.card h3 { font-weight: 600; font-size: 22px; line-height: 30.8px; margin: 10px 0 8px; }
.card p { font-weight: 300; font-size: 16px; line-height: 28.8px; margin: 0; color: #000; }

/* ---------- Forms ---------- */

.form-section { padding: 46px 0 64px; }
.form-section h2 {
  color: var(--blue);
  font-weight: 600;
  font-size: 33px;
  line-height: 46px;
  margin: 0;
}
.form-section .lead {
  color: var(--blue);
  font-weight: 300;
  font-size: 18px;
  margin: 0 0 10px;
}

.contact-form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 36px; row-gap: 14px; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form label {
  display: block;
  color: var(--blue);
  font-weight: 300;
  font-size: 16px;
  margin-bottom: 6px;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--blue-light);
  background: transparent;
  font: 16px var(--heading-font);
  padding: 8px 4px;
  outline: none;
}
.contact-form input:focus, .contact-form textarea:focus { border-bottom-width: 2px; }
.contact-form textarea { height: 75px; resize: vertical; }
.contact-form button {
  grid-column: 1 / -1;
  margin-top: 18px;
  height: 46px;
  border: 0;
  background: var(--blue);
  color: var(--cream);
  font: 600 20px var(--heading-font);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.contact-form button:disabled { opacity: 0.6; cursor: wait; }
.form-status { grid-column: 1 / -1; color: var(--blue); margin: 4px 0 0; }
.form-status.error { color: #b00020; }

@media (max-width: 600px) {
  .contact-form { grid-template-columns: 1fr; }
}

/* ---------- Simple content pages ---------- */

.page { padding: 34px 0 80px; min-height: 560px; }
.page h1, .page h2 { color: var(--blue); font-weight: 600; }
.page h1 { font-size: 33px; line-height: 46px; margin: 0; }
.page h2 { font-size: 22px; margin: 40px 0 0; }
.page p { color: var(--blue); font-weight: 300; font-size: 16px; line-height: 22px; margin: 0; }
.page .spacer { height: 22px; }
.empty-note { text-align: center; color: #9aa6ad; font-weight: 300; font-size: 20px; margin-top: 90px !important; }

.contact-page h1 { text-align: center; }
.contact-page .lead-small { color: var(--blue); font-weight: 300; font-size: 14px; margin: 0 4px 20px; }
.contact-page .contact-form label { font-size: 14px; }
.contact-page .contact-form button { background: var(--blue); font-size: 16px; height: 50px; box-shadow: none; }

/* ---------- Practice test start pages ---------- */

.test-intro { padding: 30px 0 60px; }
.test-intro .inner { width: 800px; max-width: 100%; margin: 0 auto; }
.test-intro h1 {
  text-align: center;
  color: var(--blue);
  font-weight: 600;
  font-size: 45px;
  line-height: 70px;
  margin: 0 0 20px;
}
.test-intro p { font-weight: 300; font-size: 16px; line-height: 26px; margin: 0; color: #333; }
.test-intro .gap { height: 26px; }

.start-form {
  display: grid;
  grid-template-columns: repeat(2, 310px);
  column-gap: 10px;
  row-gap: 6px;
  margin: 40px 0 0;
}
.start-form label { display: block; font-weight: 700; font-size: 12px; color: var(--purple); margin-bottom: 4px; }
.start-form input {
  width: 100%;
  height: 52px;
  border: 0;
  border-bottom: 1px solid var(--purple);
  background: var(--purple-bg);
  font: 16px var(--heading-font);
  padding: 0 10px;
}
.start-note { text-align: center; color: var(--blue) !important; font-size: 16px; margin: 30px 0 12px !important; }
.btn-orange {
  display: block;
  margin: 0 auto;
  padding: 10px 6px;
  border: 0;
  border-radius: 4px;
  background: var(--blue);
  color: #fff;
  font: 700 16px var(--heading-font);
  cursor: pointer;
}

@media (max-width: 680px) {
  .start-form { grid-template-columns: 1fr; }
}

/* ---------- Test runner ---------- */

.runner { display: grid; grid-template-columns: 250px 1fr; gap: 40px; padding: 34px 0 60px; }
.runner-top { display: flex; justify-content: space-between; align-items: baseline; grid-column: 1 / -1; }
.runner-top h1 { color: var(--blue); font-weight: 600; font-size: 33px; margin: 0; }
.timer { font: 600 24px var(--heading-font); color: var(--blue); }
.timer.low { color: #b00020; }
.question-text { font-size: 18px; line-height: 28px; white-space: pre-line; margin: 0 0 18px; }
.question-figure { margin: 0 0 20px; max-width: 540px; }
.answers-label { font-weight: 600; color: var(--blue); margin-bottom: 8px; }
.answers { list-style: none; padding: 0; margin: 0 0 20px; }
.answers label {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #d8dde3;
  margin-bottom: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 17px;
}
.answers input { accent-color: var(--blue); width: 18px; height: 18px; }
.answers label:has(input:checked) { border-color: var(--blue); background: #eaf3f7; }
.flag { display: flex; gap: 8px; align-items: center; cursor: pointer; color: var(--blue); font-weight: 600; }
.runner-nav { display: flex; gap: 12px; margin-top: 26px; }
.runner-nav button {
  padding: 10px 22px;
  border: 0;
  background: var(--blue);
  color: #fff;
  font: 600 16px var(--heading-font);
  cursor: pointer;
}
.runner-nav button:disabled { opacity: 0.4; cursor: default; }
.runner-nav .submit { margin-left: auto; background: var(--navy); }

.qgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; align-content: start; }
.qgrid button {
  height: 36px;
  border: 1px solid #b8c4cc;
  background: #fff;
  font: 14px var(--heading-font);
  cursor: pointer;
  position: relative;
}
.qgrid button.answered { background: #cfe2ea; }
.qgrid button.current { outline: 2px solid var(--blue); outline-offset: -2px; font-weight: 700; }
.qgrid button.flagged::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue-light);
}
.grid-legend { grid-column: 1 / -1; font-size: 12px; color: #555; margin-top: 8px; }

.confirm-box {
  grid-column: 1 / -1;
  border: 2px solid var(--blue);
  background: #fff;
  padding: 16px 20px;
}
.confirm-box p { margin: 0 0 12px; }
.confirm-box button { margin-right: 10px; }

@media (max-width: 800px) {
  .runner { grid-template-columns: 1fr; }
  .runner > div:nth-child(2) { order: 3; } /* navigator below the question on phones */
}

/* ---------- Diagnostic report (results page) ---------- */

.results {
  --chart-correct: #16a34a;
  --chart-wrong: #dc2626;
  padding: 34px 16px 80px;
}
.report-hero {
  background: linear-gradient(135deg, var(--navy), var(--blue) 60%, var(--blue-light));
  color: #fff;
  padding: 24px 26px 28px;
  border-radius: 8px;
  margin-bottom: 18px;
}
.report-hero h1 { margin: 0 0 6px; font-weight: 600; font-size: 30px; line-height: 38px; }
.report-hero p { margin: 0; color: #dbeaf1; font-weight: 300; }
.report-student {
  color: #bfe0ee;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}
.report-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.report-card { background: #fff; border: 1px solid #e3e6ea; border-radius: 8px; padding: 14px; }
.report-card .label { color: #5b6472; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.report-card .value { font-size: 26px; font-weight: 700; color: var(--blue); }
.panel {
  background: #fff;
  border: 1px solid #e3e6ea;
  border-radius: 8px;
  padding: 12px 16px 14px;
  margin-bottom: 14px;
}
.panel h2 { margin: 6px 0 4px; font-size: 22px; font-weight: 600; color: var(--navy); }
.panel-desc { margin: 0 0 10px; color: #5b6472; font-size: 14px; line-height: 1.4; }
.rec-list { margin: 0 0 12px 20px; padding: 0; line-height: 1.45; }
.rec-list li { margin-bottom: 6px; }
.table-wrap { overflow-x: auto; }
.panel table { width: 100%; border-collapse: collapse; font-size: 14px; }
.panel th { background: var(--navy); color: #fff; text-align: left; padding: 9px 10px; font-weight: 600; white-space: nowrap; }
.panel td { border-bottom: 1px solid #eef0f3; padding: 8px 10px; vertical-align: top; }
.panel tbody tr:nth-child(even) { background: #f8fafb; }
.panel tr.row-wrong td:nth-child(2) { color: var(--chart-wrong); font-weight: 600; }
.panel tr.row-correct td:nth-child(2) { color: var(--chart-correct); font-weight: 600; }
.prompt-cell { min-width: 300px; white-space: pre-line; }
.prompt-cell img { max-width: 300px; margin-top: 8px; }
/* Question-level review: stats row + full-width question row */
.panel tr.review-stats td { border-bottom: 0; background: #f3f6f8; }
.panel tr.review-question td { background: #fff; border-bottom: 2px solid #dfe4e8; padding: 4px 10px 14px; }
.review-prompt { margin: 4px 0 8px; white-space: pre-line; line-height: 1.45; }
.review-question img { max-width: 360px; margin: 0 0 8px; }
.review-choices { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.review-choices li { padding: 2px 6px; border-radius: 4px; }
.review-choices li.is-correct { background: #dcf3e3; color: #14532d; font-weight: 600; }
.review-choices li.is-selected { background: #fde2e2; color: #7f1d1d; text-decoration: line-through; }
.time-chart { width: 100%; min-width: 640px; height: auto; display: block; }
.chart-grid { stroke: #e5e7eb; }
.chart-axis { stroke: #9aa3ad; }
.chart-label { font: 11px var(--heading-font); fill: #5b6472; }
.chart-legend { display: flex; gap: 18px; font-size: 13px; color: #333; margin-bottom: 6px; flex-wrap: wrap; }
.chart-legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border-radius: 2px; }
.chart-legend i.hatched { background: repeating-linear-gradient(45deg, #777 0 2px, #fff 2px 4px); }
.report-cta { text-align: center; padding: 30px 0 0; }
.report-cta h2 { color: var(--blue); font-weight: 600; font-size: 24px; margin: 0; }
.report-cta .apply { margin-top: 18px; }

/* ---------- Phones ---------- */

/* Below desktop width, the banner runs edge to edge (cancelling the page's side padding), as on the Wix mobile site. */
@media (max-width: 1011px) {
  .banner { margin-inline: -16px; }
  .banner img { width: 100%; }
}

@media (max-width: 700px) {
  /* Phones: the text runs full width, and the quote cloud sits beside the bullet list, like the Wix mobile layout.
     .intro-text uses "display: contents" so its paragraphs and list can be placed on the grid individually. */
  .intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; align-items: center; padding: 16px 0 0; }
  .intro-text { display: contents; }
  .intro h1, .intro p { grid-column: 1 / -1; }
  .intro ul { grid-area: 4 / 1; margin-bottom: 0; padding-left: 26px; }
  .intro h1 { font-size: 32px; line-height: 44px; }
  .cloud { grid-area: 4 / 2; width: min(44vw, 190px); height: auto; aspect-ratio: 296 / 292; margin: 0; }
  .cloud p { width: 72%; font-size: clamp(14px, 4.1vw, 18px); line-height: 1.3; }
  .intro .gap { margin-top: 11px; }
  .intro ul + p { margin-top: 18px; }
  .cards { gap: 20px; }
  .test-intro h1 { font-size: 32px; line-height: 46px; }
  .report-hero h1 { font-size: 24px; line-height: 30px; }
}

/* Scaled score (out of 36) on the report */
.report-score { font-size: 20px; margin: 4px 0 8px; color: #fff; }
.report-score strong { font-size: 30px; }
.report-card.is-score { background: var(--blue); border-color: var(--blue); }
.report-card.is-score .label { color: #d6e9f2; }
.report-card.is-score .value { color: #fff; }
.report-card .value small { font-size: 16px; font-weight: 500; opacity: 0.8; }

/* ---------- Courses (shared layout; these variables map it onto the classic palette) ---------- */

.course-stats, #course-overview, .lesson-layout {
  --ink: #000;
  --ink-soft: #333;
  --muted: #6b7780;
  --line: #d8dde3;
  --bg-soft: #f3f1ee;
  --primary: var(--blue);
  --primary-dark: #134b66;
  --primary-tint: #e3eff4;
  --success: #1f7a3a;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 4px 14px rgba(0, 0, 0, 0.18);
  --heading: var(--heading-font);
  --body: var(--heading-font);
}
.page #course-subtitle { margin: 10px 0 0; font-size: 18px; }
.page .course-stats { margin-bottom: 28px; }

/* ---------- Courses: overview ---------- */

.course-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin-top: 24px; color: var(--ink-soft); }
.course-stats strong { color: var(--ink); font-size: 18px; }
.course-start {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
}
.course-start:hover { background: var(--primary-dark); }
.lesson-filter {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  font: 16px var(--body);
  margin-bottom: 20px;
}
.lesson-filter:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(31, 95, 191, 0.14); }
.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.lesson-list a {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 14px;
  align-items: start;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.lesson-list a:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.lesson-list .lesson-num {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-tint);
  color: var(--primary-dark);
  font: 700 16px var(--heading);
  display: grid;
  place-items: center;
}
.lesson-list .lesson-topics { font-weight: 500; line-height: 1.4; }
.lesson-list .lesson-status { font-size: 13px; color: var(--primary); font-weight: 600; }
.lesson-list .is-soon a { background: var(--bg-soft); }
.lesson-list .is-soon .lesson-num { background: #e9eef4; color: var(--muted); }
.lesson-list .is-soon .lesson-status { color: var(--muted); font-weight: 500; }
.lesson-list .is-done .lesson-num { background: var(--success); color: #fff; }
.lesson-list .is-done .lesson-status { color: var(--success); }

/* Course overview: search, the two ways in, lesson panels, help card */
#course-overview > .lesson-filter { margin-bottom: 16px; }
.path-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 8px; }
.path-card { display: flex; flex-direction: column; padding: 22px 24px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--primary); border-radius: 12px; transition: box-shadow 0.15s; }
.path-card:hover, .path-card.is-open { box-shadow: var(--shadow-lg); }
.path-card.is-open { border-color: var(--primary); }
.path-card h2 { margin: 0 0 8px; font-size: 22px; color: var(--ink); }
.path-card p { margin: 0 0 18px; color: var(--ink-soft); line-height: 1.5; }
.path-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.path-meta { color: var(--muted); font-size: 14px; }
.path-button { border: 0; cursor: pointer; background: var(--primary); color: #fff; font: inherit; font-weight: 600; padding: 10px 20px; border-radius: 999px; }
.path-button:hover { background: var(--primary-dark); }
.path-button::after { content: " ▾"; }
.path-card.is-open .path-button::after { content: " ▴"; }
.lesson-panel { padding: 16px 0 8px; scroll-margin-top: 90px; }
.path-cards > .lesson-panel { grid-column: 1 / -1; padding-top: 4px; }
.lesson-section-intro { margin: 0 0 6px; color: var(--ink-soft); max-width: 760px; }
.lesson-group-title { margin: 22px 0 10px; font-size: 18px; color: var(--ink); }
.lesson-no-match { margin: 0 0 10px; color: var(--muted); }
.course-help { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin: 32px 0 8px; padding: 22px 24px; background: var(--primary-tint); border-radius: 12px; }
.course-help h2 { margin: 0 0 4px; font-size: 20px; color: var(--ink); }
.course-help p { margin: 0; color: var(--ink-soft); }
.course-help .course-start { margin-left: 0; }

/* ---------- Courses: lesson page ---------- */

.lesson-layout { display: grid; grid-template-columns: 290px 1fr; gap: 40px; padding: 32px 0 80px; align-items: start; }
.lesson-sidebar {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.sidebar-head { padding: 16px 16px 4px; border-bottom: 1px solid var(--line); }
.sidebar-course { display: block; font: 600 17px var(--heading); color: var(--ink); text-decoration: none; margin-bottom: 10px; }
.sidebar-head .lesson-filter { padding: 9px 14px; font-size: 14px; margin-bottom: 12px; }
.sidebar-list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.sidebar-list a {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
}
.sidebar-list a:hover { background: var(--bg-soft); color: var(--ink); }
.sidebar-list .lesson-num { font-weight: 700; color: var(--ink); }
.sidebar-list .is-soon a { color: #9aa6b5; }
.sidebar-list .is-soon .lesson-num { color: #9aa6b5; }
.sidebar-list .is-done .lesson-num::after { content: " \2713"; color: var(--success); }
.sidebar-list .is-current a { background: var(--primary-tint); color: var(--primary-dark); }
.sidebar-list .is-current .lesson-num { color: var(--primary-dark); }

.lesson-main { min-width: 0; max-width: 820px; }
.sidebar-toggle { display: none; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.lesson-kicker { font-weight: 700; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); margin-bottom: 8px; }
.lesson-kicker span { color: var(--muted); font-weight: 500; letter-spacing: 0; text-transform: none; }
.lesson-header h1 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; margin-bottom: 28px; }

.lesson-video { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; box-shadow: var(--shadow-lg); margin-bottom: 40px; }
.lesson-video iframe, .lesson-video video { width: 100%; height: 100%; border: 0; display: block; }
.lesson-video.placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  background: linear-gradient(135deg, var(--navy), var(--primary));
  color: #fff;
  box-shadow: none;
}
.lesson-video.placeholder strong { display: block; font: 600 22px var(--heading); }
.lesson-video.placeholder span { color: #c9dcf2; }

.lesson-body { font-size: 17px; line-height: 1.7; }
.lesson-body h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.lesson-body > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.lesson-body h3 { font-size: 20px; font-weight: 600; margin: 28px 0 10px; }
.lesson-body p, .lesson-body ul, .lesson-body ol { margin: 0 0 16px; }
.lesson-body table { border-collapse: collapse; width: 100%; margin: 8px 0 20px; font-size: 15.5px; display: block; overflow-x: auto; }
.lesson-body th, .lesson-body td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.lesson-body th { background: var(--bg-soft); font-weight: 600; }
.lesson-body .katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.lesson-figure { margin: 20px 0 24px; text-align: center; color: var(--ink); }
.lesson-figure svg { max-width: 320px; width: 100%; height: auto; }
.lesson-figure svg text { fill: currentColor; font-family: var(--body); font-style: italic; }
.lesson-figure figcaption { font-size: 14.5px; color: var(--muted); margin-top: 8px; }
/* Practice problem solutions: <details> blocks */
.lesson-body details {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.lesson-body summary {
  cursor: pointer;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--primary);
  list-style: none;
}
.lesson-body summary::-webkit-details-marker { display: none; }
.lesson-body summary::before { content: "\25B8"; display: inline-block; margin-right: 8px; transition: transform 0.15s; }
.lesson-body details[open] summary::before { transform: rotate(90deg); }
.lesson-body details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.lesson-body details > :not(summary) { margin-left: 16px; margin-right: 16px; }
.lesson-body details > :last-child { margin-bottom: 16px; }
.lesson-soon { background: var(--bg-soft); border: 1px dashed #c6d2e1; border-radius: var(--radius); padding: 28px 32px; }
.lesson-soon h2 { border: 0; margin: 0 0 8px; padding: 0; font-size: 24px; }

.lesson-complete {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 40px 0 0;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--primary-tint);
  font-weight: 600;
  cursor: pointer;
}
.lesson-complete input { width: 20px; height: 20px; accent-color: var(--success); }
.lesson-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; }
.lesson-pager a {
  flex: 1;
  max-width: 260px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.lesson-pager a:hover { border-color: var(--primary); color: var(--primary); }
.lesson-pager small { display: block; color: var(--muted); font-weight: 500; font-size: 13px; }
.pager-next { text-align: right; margin-left: auto; }

@media (max-width: 960px) {
  .lesson-layout { grid-template-columns: 1fr; gap: 0; padding-top: 20px; }
  .lesson-sidebar { display: none; position: static; max-height: 60vh; margin-bottom: 20px; }
  .lesson-sidebar.open { display: flex; }
  .sidebar-toggle {
    display: inline-block;
    margin-bottom: 16px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font: 600 14px var(--body);
    cursor: pointer;
  }
  .course-start { margin-left: 0; }
}

/* Classic header scrolls away, so the lesson sidebar can stick nearer the top */
.lesson-sidebar { top: 20px; max-height: calc(100vh - 40px); }

/* Lesson graphs (drawn by js/course.js from <div class="graph">) */
.lesson-body .graph { margin: 16px auto 24px; max-width: 340px; text-align: center; }
.lesson-body .graph svg { width: 100%; height: auto; display: block; }
.g-grid { stroke: var(--line); stroke-width: 1; }
.g-axis { stroke: var(--ink-soft); stroke-width: 1.5; }
.g-tick { font: 11px var(--body); fill: var(--muted); }
.g-name { font-style: italic; fill: var(--ink-soft); }
.g-line { stroke-width: 2.5; }
.g-point { fill: var(--ink); stroke: #fff; stroke-width: 1.5; }
.g-label { font: 600 12px var(--body); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.graph-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 14px; margin-top: 6px; }
.graph-legend i { display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.lesson-layout { --graph-1: var(--primary); --graph-2: #e07a2e; --graph-3: #16a34a; }
.g-seg { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 4; }
.g-shade { opacity: 0.14; }
.lesson-body .numberline { margin: 10px auto 18px; max-width: 360px; }
.lesson-body .numberline svg { width: 100%; height: auto; display: block; }
.nl-axis, .nl-tick { stroke: var(--ink-soft); stroke-width: 1.5; }
.nl-arrow { fill: var(--ink-soft); }
.nl-label { font: 11px var(--body); fill: var(--muted); }
.nl-shade { stroke: var(--primary); stroke-width: 5; stroke-linecap: round; }
.nl-dot { fill: var(--primary); stroke: var(--primary); stroke-width: 2; }
.nl-dot.open { fill: var(--bg, #fff); }


/* ---------- Click-to-play video (player loads only on click; see js/site.js) ---------- */
.video-facade { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; margin: 0; padding: 0; border: 0; overflow: hidden; background: #000; cursor: pointer; font: inherit; color: #fff; }
.video-facade img { display: block; width: 100%; height: 100%; object-fit: cover; }
.play-icon { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(0, 0, 0, 0.6); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); transition: transform 0.15s, background 0.15s; }
.play-icon::after { content: ""; position: absolute; left: 30px; top: 24px; border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent #fff; }
.video-facade:hover .play-icon, .video-facade:focus-visible .play-icon { transform: scale(1.08); background: var(--navy, #1b3a6b); }
.lesson-video .video-facade { height: 100%; aspect-ratio: auto; background: linear-gradient(135deg, var(--navy), var(--primary)); }
.play-label { position: absolute; left: 0; right: 0; top: calc(50% + 50px); text-align: center; font-weight: 600; }
.lesson-header h1:focus { outline: none; } /* focused by script after switching lessons */


/* ---------- Lessons with several videos: numbered tabs above one player ---------- */
.lesson-videos { margin-bottom: 40px; }
.lesson-videos .lesson-video { margin-bottom: 0; }
.video-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.video-tab { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border: 1px solid #c9d3e3; border-radius: 999px; background: #fff; color: var(--navy); font: inherit; font-size: 15px; font-weight: 600; line-height: 1.25; text-align: left; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.video-tab:hover { border-color: var(--navy); }
.video-tab:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.video-tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.video-tab-num { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 13px; }
.video-tab[aria-selected="true"] .video-tab-num { background: #fff; color: var(--navy); }


/* ---------- Mailing-list checkbox on the consultation form and practice test start pages ---------- */
.consent { grid-column: 1 / -1; }
.consent label { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 0; font-size: 14px; font-weight: 400; line-height: 1.4; cursor: pointer; }
.consent input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 1px 0 0; padding: 0; border: 0; box-shadow: none; background: none; accent-color: var(--navy); cursor: pointer; }

/* ---------- Course page in the modern style (classic header and footer stay) ---------- */
/* Mirrors site-modern's course page. Scoped to .course-page so the lesson pages keep their current look. */

.course-page .course-stats, .course-page #course-overview, .course-page .page-hero {
  --ink: #0f1d2e;
  --ink-soft: #44546a;
  --muted: #6b7a8f;
  --line: #e2e8f0;
  --bg-soft: #f5f8fc;
  --primary: #1f5fbf;
  --primary-dark: #174a96;
  --primary-tint: #e8f1fc;
  --success: #16a34a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 29, 46, 0.04), 0 8px 24px rgba(15, 29, 46, 0.06);
  --shadow-lg: 0 20px 50px rgba(15, 29, 46, 0.14);
  --heading: "Work Sans", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.course-page { font: 16px/1.6 var(--body, "Inter", system-ui, sans-serif); color: #0f1d2e; -webkit-font-smoothing: antialiased; }
.course-page .page-hero {
  padding: 64px 0 48px;
  background:
    radial-gradient(800px 360px at 90% 0%, rgba(74, 155, 230, 0.16), transparent 60%),
    var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-family: var(--body);
}
.course-page .eyebrow {
  display: inline-block;
  font: 600 13px/1 var(--body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}
.course-page .page-hero h1 {
  margin: 0;
  font: 700 clamp(32px, 4.6vw, 52px)/1.15 var(--heading);
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 820px;
}
.course-page .page-hero p { color: var(--ink-soft); font-size: 19px; line-height: 1.6; max-width: 680px; margin: 18px 0 0; font-weight: 400; }
.course-page .course-stats { font-family: var(--body); }
.course-page .course-body { padding: 48px 0 72px; background: #fff; }
.course-page #course-overview { font-family: var(--body); }
.course-page #course-overview h2, .course-page #course-overview h3 { font-family: var(--heading); letter-spacing: -0.02em; line-height: 1.15; }
.course-page .lesson-filter { font-family: var(--body); }
@media (max-width: 680px) {
  .course-page .page-hero { padding: 40px 0 32px; }
  .course-page .course-body { padding: 32px 0 56px; }
}

.report-download {
  display: inline-block;
  margin-top: 16px;
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  background: #fff;
  color: #174a96;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.report-download:hover { background: #e8f1fc; }
.report-download:disabled { opacity: 0.7; cursor: wait; }
@media print { .report-download, .report-cta { display: none; } }

/* ---------- Accounts (account page, admin page, members-only lessons) ---------- */
.account-page { padding: 56px 0 80px; background: #f5f8fc; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; }
.account-card, .admin-card { max-width: 460px; margin: 0 auto; padding: 32px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 8px 24px rgba(15, 29, 46, 0.06); color: #0f1d2e; }
.admin-card { max-width: 900px; }
.account-card h1, .admin-card h1 { margin: 0 0 8px; font: 700 28px/1.2 "Work Sans", system-ui, sans-serif; color: #0f1d2e; }
.admin-card h2 { margin: 24px 0 10px; font: 600 18px "Work Sans", system-ui, sans-serif; color: #0f1d2e; }
.account-intro, .account-who, .account-footer { color: #44546a; margin: 0 0 18px; font-weight: 400; font-size: 16px; line-height: 1.5; }
.account-footer { margin: 18px 0 0; font-size: 14px; }
.account-form, .admin-login, .admin-grant { display: grid; gap: 14px; }
.account-form label, .admin-card label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: #0f1d2e; }
.account-form input, .admin-card input { font: inherit; font-weight: 400; padding: 11px 13px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #0f1d2e; }
.account-form input:focus, .admin-card input:focus { outline: none; border-color: #1f5fbf; box-shadow: 0 0 0 4px rgba(31, 95, 191, 0.14); }
.account-button, .admin-card button { display: inline-block; border: 0; border-radius: 999px; padding: 12px 22px; background: #1f5fbf; color: #fff; font: inherit; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer; }
.account-button:hover, .admin-card button:hover { background: #174a96; color: #fff; }
.account-button:disabled { opacity: 0.6; cursor: wait; }
.account-link { border: 0; background: none; padding: 0; font: inherit; color: #1f5fbf; cursor: pointer; text-decoration: underline; }
.account-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; }
.account-status { padding: 12px 14px; border-radius: 10px; background: #f5f8fc; color: #44546a; margin: 0; line-height: 1.5; }
.account-status.is-member { background: #e9f7ef; color: #14532d; }
.account-message, .admin-message { margin: 0; min-height: 1.2em; color: #16a34a; font-size: 14px; word-break: break-all; }
.account-message.is-error, .admin-message.is-error { color: #dc2626; }
.admin-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-paywall { padding: 10px 14px; border-radius: 10px; background: #fff7ed; color: #7c2d12; }
.admin-card table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-card th, .admin-card td { text-align: left; padding: 8px; border-bottom: 1px solid #e2e8f0; }
.lesson-locked { padding: 28px; border: 1px solid #e2e8f0; border-radius: 14px; background: #f5f8fc; text-align: center; }
.lesson-locked h2 { margin: 0 0 8px; }
.lesson-locked p { margin: 0 auto 18px; max-width: 520px; }
.lesson-locked .account-actions { justify-content: center; }
.lesson-body .lesson-locked h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.account-page [hidden] { display: none !important; }
.paywall-preview-banner {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center;
  max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 999px;
  background: #7c2d12; color: #fff; font: 14px/1.4 "Inter", system-ui, sans-serif; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.paywall-preview-banner a { color: #fed7aa; font-weight: 600; }
.admin-preview { margin: 12px 0 0; padding: 12px 14px; border: 1px dashed #cbd5e1; border-radius: 10px; }
.admin-preview p { margin: 0 0 10px; color: #44546a; }
.footer-links { padding: 14px 0; text-align: center; font-size: 14px; }
.footer-links a { color: inherit; }
.legal-card { max-width: 760px; margin: 0 auto; padding: 36px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; color: #0f1d2e; font-size: 16px; line-height: 1.6; }
.legal-card h1 { margin: 0 0 4px; font: 700 32px/1.2 "Work Sans", system-ui, sans-serif; color: #0f1d2e; }
.legal-card h2 { margin: 28px 0 8px; font: 600 20px "Work Sans", system-ui, sans-serif; color: #0f1d2e; }
.legal-card p, .legal-card li { color: #44546a; font-weight: 400; font-size: 16px; line-height: 1.6; }
.legal-card p { margin: 0 0 12px; }
.legal-card ul { padding-left: 20px; margin: 0 0 12px; }
.legal-card li { margin-bottom: 8px; }
.legal-card a { color: #1f5fbf; }
.legal-updated { color: #6b7a8f !important; font-size: 14px !important; margin-bottom: 20px !important; }

/* SAT grid-in (typed answer) questions */
.answers .grid-in label { display: block; padding: 0; border: 0; background: none; cursor: default; font-size: 16px; margin-bottom: 8px; }
.answers .grid-in input { width: 160px; max-width: 100%; padding: 10px 12px; font-size: 18px; border: 1px solid #d8dde3; accent-color: auto; height: auto; }
.answers .grid-in input:focus { outline: 2px solid var(--blue); border-color: var(--blue); }

/* ACT Boot Camp schedule */
.bootcamp-dates { list-style: none; padding: 0; margin: 10px 0 18px; }
.bootcamp-dates li { padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.08); }
.bootcamp-dates li:last-child { border-bottom: 0; }
.bootcamp-paid { background: #e8f5ee; border: 1px solid #9ad3b0; color: #14532d; border-radius: 8px; padding: 14px 18px; margin: 0 0 20px; }
.bootcamp-flyer { margin: 24px 0 28px; text-align: center; }
.bootcamp-flyer img { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,0.15); }
.bootcamp-flyer figcaption { font-size: 0.9rem; color: #555; margin-top: 10px; }

/* Membership plans on /account (billing) */
.membership-box { margin: 18px 0; padding: 18px; border: 1px solid #dde5ef; border-radius: 12px; }
.membership-box h2 { margin: 0 0 12px; font-size: 1.2rem; }
.plan-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.plan-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid #dde5ef; border-radius: 10px; background: #fafcff; }
.plan-price { font-size: 1.4rem; font-weight: 700; }
.plan-price small { font-size: 0.85rem; font-weight: 400; color: #5b6b80; }
.plan-note { margin: 12px 0 0; color: #5b6b80; font-size: 0.9rem; }

/* Weekly classes page (/classes, hidden until switched on) */
.classes-app { margin-top: 24px; }
.classes-notice { padding: 12px 16px; border-radius: 10px; background: #f5f8fc; color: #44546a; margin: 0 0 16px; }
.classes-notice.is-good { background: #e9f7ef; color: #14532d; }
.class-week { display: grid; gap: 12px; margin: 8px 0 28px; }
.class-day h3 { font-size: 1rem; margin: 0 0 8px; }
.class-slot { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid #dde5ef; border-left: 4px solid #1f5fbf; border-radius: 8px; text-decoration: none; color: inherit; background: #fafcff; }
.class-slot.is-full { border-left-color: #9aa6ad; opacity: 0.8; }
.class-slot-time { font-size: 0.85rem; color: #5b6b80; }
.class-slot-name { font-weight: 600; }
.class-slot-seats { font-size: 0.85rem; color: #5b6b80; }
.class-cards { display: grid; gap: 16px; }
.class-card { padding: 18px 20px; border: 1px solid #dde5ef; border-radius: 12px; background: #fff; }
.class-card-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.class-card h2 { margin: 0; font-size: 1.3rem; }
.class-when, .class-meta, .class-where { color: #5b6b80; font-size: 0.95rem; }
.class-price { font-size: 1.6rem; font-weight: 700; white-space: nowrap; }
.class-price small { font-size: 0.85rem; font-weight: 400; color: #5b6b80; }
.class-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.class-member { color: #14532d; font-weight: 600; }
.class-message.is-error { color: #b00020; }
.class-form { margin-top: 14px; }
@media (max-width: 640px) { .class-week { grid-template-columns: 1fr !important; } .class-card-head { flex-direction: column; } }
/* Practice-test report study help (SITE_CONFIG.diagnosticStudyLinks) */
.review-solution { margin: 8px 0 4px; }
.review-solution summary { cursor: pointer; font-weight: 600; color: #1f5fbf; }
.review-solution p { margin: 6px 0 0; }
.review-lessons { font-size: 0.9em; }
.study-plan ol li { margin-bottom: 6px; }

/* Algebra 2 diagnostic: lessons-to-review list */
.concept-lessons ol > li ul { margin: 4px 0 10px 18px; padding: 0; }
.concept-lessons ol > li ul li { margin: 2px 0; }

/* Brand buttons (Oct 2026): hover darkens to navy */
.btn-orange:hover, .contact-page .contact-form button:hover { background: var(--navy); }

.course-diagnostic-link { margin: 12px 0 0; font-size: 0.95rem; }
.course-diagnostic-link a { font-weight: 600; }
