/* Shared visual language for the course and its public pages. */
:root {
  font-size: 100%;
  --blue: #245fd1;
  --experience-blue: #245fd1;
  --experience-ink: #102b4b;
  --experience-cyan: #85e5f4;
  --experience-line: #d6e2f3;
  --experience-shadow: 0 12px 32px #153d7010;
}

body:not(.homepage) {
  background: radial-gradient(ellipse at 85% 0%, #e6efff 0, transparent 48%), #f2f6fc;
}

.site-header, .courseHeader { box-shadow: 0 5px 22px #153d700b; }
.brand-mark, .brandMark {
  background: linear-gradient(145deg, #174da3, #0b284b);
  box-shadow: 0 4px 12px #174da323;
}

/* Keep every course destination readable on the dark sidebar. */
@media (min-width: 851px) {
  .courseLayout { grid-template-columns: 294px minmax(0, 1fr); }
  .courseLayout > .sidebar {
    top: var(--course-header-height, 76px);
    height: calc(100dvh - var(--course-header-height, 76px));
    scrollbar-gutter: stable;
  }
}
.courseLayout > .sidebar {
  min-width: 0;
  background: radial-gradient(ellipse at 0% 0%, #1c4e7b, transparent 60%), #0b233e;
  gap: 20px;
  overflow-x: hidden;
}
.sidebarIntro .eyebrow { color: #a7e9f5; }
.sidebarIntro h2 { line-height: 1.35; }
.modeNav { min-width: 0; }
.modeNav button {
  width: 100%;
  min-width: 0;
  white-space: normal;
  line-height: 1.5;
  border-radius: 11px;
  font-size: .9375rem;
  color: #f0f6ff;
  gap: 10px;
}
.modeNav .navIcon {
  display: grid;
  place-items: center;
  width: 30px;
  min-height: 30px;
  border-radius: 8px;
  color: #aeeaf7;
  background: #ffffff0d;
}
.modeNav .navLabel { min-width: 0; overflow-wrap: anywhere; }
.modeNav button.active {
  background: #f5f9ff;
  color: #12375e;
  border-left-color: #6ddbeb;
  box-shadow: 0 5px 15px #061b3524;
}
.modeNav button.active .navIcon { color: #245fd1; background: #e3ecff; }
.sidebarExtras {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid #ffffff2e;
}
.sidebarExtras a, .sidebarExtras a[href="/examenes"] {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #ffffff1f;
  border-radius: 10px;
  background: #ffffff08;
  color: #f3f8ff;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  white-space: normal;
  transition: background .18s, border-color .18s, box-shadow .18s;
}
.sidebarExtras .navLabel { min-width: 0; overflow-wrap: anywhere; }
.extraNavIcon {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  min-height: 30px;
  border-radius: 8px;
  background: #7fcfe51a;
  color: #b1f0ff;
}
.extraNavIcon svg { width: 19px; height: 19px; }
.sidebarExtras a[href="/examenes"] { background: #166c8e3b; border-color: #70d4ed4d; }
.sidebarExtras a:hover { background: #ffffff16; border-color: #a3d9f777; text-decoration: none; }
.sidebarExtras a:focus-visible, .modeNav button:focus-visible { outline-color: #f8d273; outline-offset: 2px; }
.sidebarProgress { background: #ffffff0d; border-color: #b0cde42b; border-radius: 13px; }
.sidebarProgress .row { align-items: flex-start; font-size: .875rem; line-height: 1.5; }
.sidebarProgress .row strong { min-width: 0; }
.sidebarProgress .row span { flex-shrink: 0; color: #b5efff; }
.sidebar .sidebarFooter a { display: block; min-height: 36px; line-height: 1.5; color: #e4efff; }
.sidebar .audioSettings { border-top-color: #ffffff2e; }
.audioSettings .voiceHelp, .audioSettings .voiceQuality { font-size: .875rem; }
.voicePauseToggle, .n400-audio-grid .voicePauseToggle, .exam-voice-controls .voicePauseToggle {
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  font-size: .875rem; line-height: 1.5; min-height: 44px; cursor: pointer;
}
.voicePauseToggle input {
  appearance: auto; width: 18px; height: 18px; min-height: 18px;
  flex-shrink: 0; padding: 0; margin: 0; accent-color: #36a9e0;
}
.audioSettings .voicePauseToggle { color: #e5f1ff; margin-top: 12px; }
.audioSettings .voiceQuality {
  display: inline-block; color: #a8efd8; font-weight: 650;
  margin: 8px 0 0; line-height: 1.5;
}
.audioSettings .voiceQuality:empty { display: none; }
.audioSettings #recommendedVoice { display: block; font-size: .875rem; min-height: 40px; padding: 5px 0; }
.voiceExamples, .voiceDeviceHelp { margin-top: 12px; min-width: 0; }
.voiceExamples > summary, .voiceDeviceHelp > summary {
  color: #e5f1ff; font-size: .875rem; line-height: 1.5; cursor: pointer; padding-block: 7px;
}
.voiceExamples label { display: block; color: #cfe1f7; font-size: .875rem; margin: 10px 0 7px; }
.voiceExamples select { width: 100%; min-width: 0; min-height: 44px; font-size: .875rem; }
.voicePreviewText { color: #fff; font-size: 1rem; line-height: 1.6; padding-left: 10px; border-left: 2px solid #6ecbef; margin-bottom: 6px; overflow-wrap: anywhere; }
.voiceHelpLinks { display: grid; gap: 3px; margin-top: 8px; }
.voiceHelpLinks a { color: #aee0ff; font-size: .875rem; line-height: 1.5; padding-block: 7px; }
.resourceMenu { min-width: 0; border-top: 1px solid #ffffff2e; padding-top: 12px; }
.resourceMenu > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 5px 10px;
  list-style: none;
  cursor: pointer;
  color: #e3f3ff;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.5;
}
.resourceMenu > summary::-webkit-details-marker { display: none; }
.resourceChevron { font-size: 1.25rem; line-height: 1; transition: transform .18s; }
.resourceMenu[open] .resourceChevron { transform: rotate(180deg); }
.resourceMenu > .sidebarExtras { border: 0; padding-top: 8px; }
.resourceMenu:not([open]) > .sidebarExtras { display: none; }
.menuToggle { display: none; }
.menuToggle svg { width: 19px; height: 19px; flex-shrink: 0; }

/* Color supports the activity; questions and answer text stay crisp. */
.welcome { padding: 4px 0 2px; }
.welcome .eyebrow { color: #245fd1; }
.courseBadge { background: #173e71; color: #eaf7ff; border-color: #173e71; box-shadow: 0 4px 15px #245fd11a; }
.stats > div:not(.saveSummary) { border-radius: 15px; box-shadow: var(--experience-shadow); }
.stats > div:nth-child(1) { background: linear-gradient(130deg, #f0fff6, #fff 80%); border-top: 3px solid #43a980; }
.stats > div:nth-child(2) { background: linear-gradient(130deg, #fff8e7, #fff 80%); border-top: 3px solid #e9b548; }
.stats > div:nth-child(3) { background: linear-gradient(130deg, #eef3ff, #fff 80%); border-top: 3px solid #6694f0; }
.statIcon { border-radius: 12px; }
.courseDaily { background: linear-gradient(110deg, #e5f7f6, #f0f6ff); border-color: #bddedc; border-left: 4px solid #369daa; }
.studyPanel, .tutorPanel { border-color: var(--experience-line); box-shadow: var(--experience-shadow); border-radius: 18px; }
/* A paper deck, with a separate question face and answer face. */
.flashcardDeck { position: relative; isolation: isolate; perspective: 1600px; margin: 12px 9px 28px; }
.flashcardDeck::before, .flashcardDeck::after {
  content: ""; position: absolute; inset: 8px 3px -8px;
  border: 1px solid #c6d4e6; border-radius: 14px; background: #f6f9fe;
  box-shadow: 0 4px 8px #193b6010; transform: rotate(-.8deg); pointer-events: none;
}
.flashcardDeck::after { inset: 14px 8px -14px; background: #eaf0f8; transform: rotate(.8deg); z-index: -1; }
.flashcard {
  position: relative; z-index: 1; border: 0; border-radius: 14px; overflow: visible;
  background: transparent; box-shadow: none; transform-style: preserve-3d;
  transition: transform .56s cubic-bezier(.22,.65,.3,1);
}
.flashcard.is-flipped { transform: rotateY(180deg); }
.flashcardFront, .flashcard .answerSide {
  box-sizing: border-box; width: 100%; min-height: 22rem; padding: 27px 30px;
  border: 1px solid #c4d2e5; border-radius: 14px;
  background: linear-gradient(180deg, #eff5ff 0, #fff 78px, #fff calc(100% - 40px), #f5f8fd 100%);
  box-shadow: 0 2px 0 #fff inset, 0 -3px 0 #dce5f1 inset, 0 14px 25px -10px #17375635;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.flashcardFront { position: relative; display: flex; flex-direction: column; border-top: 4px solid #3272d0; }
.flashcard .answerSide { position: absolute; inset: 0; transform: rotateY(180deg); border-top: 4px solid #ba3a48; text-align: left; }
.flashcard.is-flipped .flashcardFront { position: absolute; inset: 0; }
.flashcard.is-flipped .answerSide { position: relative; inset: auto; }
.flashcard [aria-hidden="true"] { pointer-events: none; }
.cardFaceHeader, .cardBackHeader { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.cardFaceHeader { padding-bottom: 18px; border-bottom: 1px solid #ceddf0; }
.cardEyebrow { font-size: .8125rem; color: #355a83; line-height: 1.6; }
.cardFaceLabel { font-size: .875rem; color: #245599; background: #dfebff; border: 1px solid #c4d8f5; border-radius: 5px; padding: 5px 10px; }
.cardPrompt { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-block: 14px; }
.flashcard .cardPrompt h2 { margin: 12px auto; font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1.45; }
.cardPrompt .translation { max-width: 680px; margin: 0 auto; color: #4f6580; }
.flashcard .cardTools { margin-top: 20px; }
.cardBackHeader { flex-wrap: wrap; padding-bottom: 17px; border-bottom: 1px solid #d7e1ed; }
.cardBackHeader .eyebrow { font-size: .8125rem; line-height: 1.6; color: #873b48; margin: 0; }
.cardBackHeader button { font-size: .875rem; min-height: 42px; }
.cardAnswerQuestion { font-size: 1rem; line-height: 1.55; color: #355478; margin: 18px 0; overflow-wrap: anywhere; }
.flashcard .acceptedList li { background: #f6f9ff; border-color: #d9e4f3; box-shadow: 0 1px 0 #fff inset; }
.flashcard .acceptedList button { font-size: .875rem; min-height: 42px; }
.cardBackTools { margin-top: 18px; }
.flashcard .micro { font-size: .875rem; line-height: 1.6; }
.flashcard .confidence { border-top-style: dashed; font-size: .9375rem; }
@media (max-width: 550px) {
  .flashcardDeck { margin-inline: 5px; }
  .flashcardFront, .flashcard .answerSide { padding: 20px 17px; min-height: 21rem; }
  .cardFaceHeader { gap: 10px; align-items: flex-start; }
  .cardFaceLabel { flex-shrink: 0; }
  .flashcard .cardPrompt h2 { font-size: 1.45rem; }
  .flashcard .cardTools { display: grid; grid-template-columns: 1fr; gap: 9px; }
  .flashcard .cardTools button { width: 100%; }
  .flashcard .confidence { flex-direction: column; align-items: stretch; }
  .flashcard .confidence > div { display: grid; grid-template-columns: 1fr; }
  .flashcard .acceptedList li { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .flashcard { transition: none; transform: none; }
  .flashcard.is-flipped { transform: none; }
  .flashcard .answerSide { transform: none; }
  .flashcard [aria-hidden="true"] { display: none; }
}
.questionItem { border-color: #d7e3f3; border-radius: 13px; }
.exerciseCard { background: linear-gradient(145deg, #edf5ff, #f8fcff); border-color: #d3e2f5; border-radius: 15px; }
.exerciseSymbol { color: #2762c9; box-shadow: 0 6px 18px #245fd112; }
.interviewer { background: linear-gradient(120deg, #12385e, #225da0); border-radius: 13px; }
.tutorMark { background: linear-gradient(145deg, #e6eeff, #e6f6fb); }
.feedback.correct { box-shadow: 0 4px 15px #2076530a; }
.cardDots button[aria-current="true"] { box-shadow: 0 3px 10px #245fd12b; }

/* Carry the same finish through the homepage, exams and account screens. */
.feature-card, .price-card, .home-additions article, .testimonial-card,
.extra-panel, .video-card, .exam-launch, .exam-block-panel, .exam-question-card,
.exam-history-row, .loginCard, .accountCard, .panel, .request-box {
  box-shadow: var(--experience-shadow);
  border-color: var(--experience-line);
}
.home-additions article { border-top: 3px solid #4a82df; }
.home-additions article:nth-child(2) { border-top-color: #38a7a9; }
.home-additions article:nth-child(3) { border-top-color: #c29a3c; }
.feature-card:not(.feature-main) { background: linear-gradient(145deg, #fff, #f5f9ff); }
.feature-number { color: #275db7; }
.home-exams { background: linear-gradient(120deg, #edf4ff, #eaf8fc); border-color: #c2d8ef; border-left: 4px solid #367dcc; }
.oralPreview { box-shadow: 0 16px 40px #041d3626; }
.oralAvatar { box-shadow: 0 0 0 8px #ffffff08; }
.steps span { box-shadow: 0 4px 15px #245fd115; }
.price-card.featured { box-shadow: 0 16px 42px #12335926; }
.faqs details, .help-section details { border-color: #d7e3f0; }
.faqs details[open], .help-section details[open] { background: #f4f8ff; border-radius: 10px; padding-inline: 14px; }
.extra-heading .eyebrow, .exam-heading .eyebrow { color: #2866c4; }
.extra-panel { background: linear-gradient(155deg, #fff, #fbfdff); }
.plan-stat:first-child { background: linear-gradient(135deg, #163f70, #215bb4); border-color: #215bb4; }
.plan-stat:not(:first-child) { background: #f4f8ff; border-color: #d6e3f6; }
.video-player { background: linear-gradient(125deg, #0f2a48, #1d558b); }
.video-tag { color: #25629e; }
.help-nav a { background: #f5f9ff; border-color: #ccddf3; color: #1c4d85; }
.exam-bank-tabs button[aria-pressed="true"], .exam-block-heading {
  background: linear-gradient(125deg, #15395f, #205cad); border-color: #205cad;
}
.exam-launch { background: radial-gradient(ellipse at top right, #edf5ff, #fff 75%); }
.exam-icon { background: #e1ecff; color: #2e64bc; }
.exam-choice.selected { background: #edf4ff; border-color: #3e76d4; box-shadow: 0 4px 12px #245fd110; }
.accessIntro { background: radial-gradient(ellipse at top right, #2864aa, transparent 70%), #102e50; box-shadow: 0 16px 40px #0c2b4920; }
.aiSection { background: #f1f6ff; border: 1px solid #d7e4f6; border-radius: 18px; padding: 24px 28px; margin-bottom: 24px; }
.aiSection h2 { font-size: 1.4rem; }
.aiSection .eyebrow { font-size: .875rem; }
.top { background: linear-gradient(120deg, #102b4b, #1b4879); }
.loginCard, .accountCard, .panel { border-radius: 18px; }

button, .button, a.primary, a.secondary, .continueLink {
  transition: background .18s, border-color .18s, box-shadow .18s, transform .18s;
}
button.primary, a.primary, .button.primary, .continueLink.primary {
  background: linear-gradient(120deg, #245fd1, #1d4eaf);
  border-color: #2055b5;
  color: #fff;
  box-shadow: 0 4px 12px #245fd11a;
}
.extra-language { font-size: .875rem; }
input:not([type="checkbox"]):not([type="radio"]):focus, textarea:focus, select:focus {
  border-color: #6293df;
  box-shadow: 0 0 0 3px #245fd114;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  button:not(:disabled):not(.modeNav button):hover, .button:hover, .continueLink:hover { transform: translateY(-1px); }
  .feature-card:hover, .home-additions article:hover, .video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 35px #153d701a;
  }
  .feature-card, .home-additions article, .video-card { transition: transform .2s, box-shadow .2s, border-color .2s; }
}
@media (prefers-reduced-motion: no-preference) {
  .welcome, .extra-heading, .exam-heading, .accessIntro { animation: experience-enter .35s ease-out; }
  .stats > div:not(.saveSummary) { animation: experience-enter .35s ease-out backwards; }
  .stats > div:nth-child(2) { animation-delay: .045s; }
  .stats > div:nth-child(3) { animation-delay: .09s; }
  .studyPanel > section:not([hidden]), .exam-question-card, .feedback:not([hidden]) { animation: experience-enter .25s ease-out; }
  .extraNavIcon, .modeNav .navIcon { transition: background .18s, color .18s; }
}
@keyframes experience-enter {
  from { opacity: .55; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 851px) and (max-width: 1200px) {
  .courseLayout { grid-template-columns: 280px minmax(0, 1fr); }
  .courseLayout > .sidebar { padding-inline: 14px; }
}
@media (max-width: 900px) {
  .homepage .header-inner { flex-wrap: wrap; gap: 10px; padding-block: 12px; }
  .homepage .header-inner > .brand { flex: 1; min-width: 0; }
  .homepage .header-inner > .menuToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 9px 11px;
    color: #1e4677;
    background: #edf4ff;
    border: 1px solid #d0dff2;
    border-radius: 9px;
    font-size: .875rem;
    font-weight: 650;
    order: 1;
  }
  .homepage .header-inner > .button { order: 2; padding-inline: 13px; }
  .homepage .header-inner > #siteNav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    order: 3;
    padding: 8px 0 0;
    font-size: .875rem;
  }
  .homepage #siteNav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 9px;
    border: 1px solid #d8e4f3;
    background: #f5f9ff;
    color: #234971;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .homepage .header-inner[data-menu-ready] > #siteNav { display: none; }
  .homepage .header-inner[data-menu-ready].menuOpen > #siteNav { display: grid; }
}
@media (max-width: 850px) {
  .courseLayout > .sidebar { gap: 12px; overflow: visible; padding-block: 16px; }
  .modeNav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; gap: 7px; padding: 0; margin: 0; }
  .modeNav button { min-height: 52px; padding: 9px 10px; font-size: .875rem; gap: 8px; }
  .modeNav button.active { border-bottom-color: #69d9ee; }
  .modeNav .navIcon { width: 25px; min-height: 28px; }
  .sidebarExtras { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 12px; gap: 7px; }
  .sidebarExtras a, .sidebarExtras a[href="/examenes"] { font-size: .875rem; min-height: 48px; padding: 8px 10px; gap: 8px; }
  .extraNavIcon { flex-basis: 25px; width: 25px; min-height: 28px; }
  .sidebar .audioSettings { padding-top: 12px; }
  .resourceMenu { padding-top: 0; border: 0; }
  .resourceMenu > summary { border: 1px solid #ffffff24; border-radius: 9px; background: #ffffff08; padding: 10px 12px; min-height: 44px; }
  .courseBadge { white-space: normal; }
}
@media (max-width: 550px) {
  .homepage .header-inner > #siteNav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .homepage .header-inner > .brand small { display: none; }
  .modeNav, .sidebarExtras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modeNav button, .sidebarExtras a, .sidebarExtras a[href="/examenes"] { padding: 9px 10px; }
  .modeNav button:last-child, .sidebarExtras a:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .studyPanel { border-radius: 15px; }
  .extra-tools { justify-content: flex-start; }
  .header-inner { flex-wrap: wrap; padding-block: 12px; }
  .header-inner > .extra-tools { width: 100%; }
  .extra-tools > a { font-size: .875rem; min-height: 36px; display: inline-flex; align-items: center; }
  .extra-language { font-size: .875rem; }
  .extra-language select { min-height: 40px; }
  .exam-bank-tabs button { padding: 15px; }
  .sidebarProgress .row { flex-wrap: wrap; }
}
@media (max-width: 360px) {
  .homepage .menuToggle span { display: none; }
  .homepage .header-inner > .menuToggle { padding-inline: 11px; }
  .homepage .header-inner > .button { padding-inline: 10px; }
}
