/* Aviation Seminars Online Test Prep — styled to match the existing course site:
   navy header bar, green/blue nav buttons, light body, rounded blue pill actions. */

:root {
  --navy: #2b3e50;
  --navy-dark: #22323f;
  --green: #7cb342;
  --green-dark: #689f38;
  --info: #5bc0de;
  --info-dark: #46b8da;
  --pill: #4a90d9;
  --pill-dark: #357ebd;
  --donut-left: #3a6f9f;
  --donut-done: #21c521;
  --text: #333;
  --muted: #777;
  --rule: #e0e0e0;
  --page: #fff;
  --band: #f7f7f7;
  --reveal: #d9a520;
  --warn: #b9541b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--page);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.view { display: block; }
[hidden] { display: none !important; }

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

.site-header {
  background: var(--navy);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  flex-wrap: wrap;
}
.brand {
  color: #fff;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.02em;
  text-decoration: none;
  font-style: italic;
  margin-right: auto;
}
.brand-thin { font-size: 25px; }

.site-nav { display: flex; gap: 10px; align-items: center; }
.btn-nav {
  border: 0;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 16px;
  cursor: pointer;
}
.btn-nav-green { background: var(--green); }
.btn-nav-green:hover { background: var(--green-dark); }
.btn-nav-blue { background: var(--info); }
.btn-nav-blue:hover:not(:disabled) { background: var(--info-dark); }
.btn-nav:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---- Sub-header band ------------------------------------------------------ */

.subheader {
  background: var(--band);
  border-bottom: 1px solid var(--rule);
  padding: 16px 0;
  margin-bottom: 30px;
}
.subheader-title { margin: 0; font-size: 25px; font-weight: 700; color: #2f2f2f; }

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

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.h-underline {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  font-size: 21px;
  font-weight: 700;
}
.welcome p { margin: 0 0 14px; color: #444; }

.progress-card { text-align: center; }
.progress-title { margin: 0 0 10px; font-size: 23px; font-weight: 700; }
.legend {
  display: flex;
  gap: 22px;
  justify-content: center;
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
}
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 26px; height: 13px; display: inline-block; border-radius: 2px; }
.swatch-done { background: var(--donut-done); }
.swatch-left { background: var(--donut-left); }

.donut-wrap { position: relative; max-width: 320px; margin: 0 auto; }
.donut { width: 100%; display: block; }
.donut-ring { fill: none; stroke: var(--donut-left); stroke-width: 44; }
.donut-value {
  fill: none;
  stroke: var(--donut-done);
  stroke-width: 44;
  stroke-dasharray: 0 999;
  transition: stroke-dasharray 500ms ease;
}
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #2f2f2f;
  pointer-events: none;
}

/* ---- Session cards -------------------------------------------------------- */

.sessions { margin: 44px 0 60px; }
.sessions-label { font-size: 13px; color: #555; margin: 0 0 12px; }
.session-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 26px;
}
.session-card {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.session-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.32);
}
.session-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.session-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.session-play span {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  padding-left: 5px;
  transition: transform 140ms ease, background 140ms ease;
}
.session-card:hover .session-play span {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.06);
}
.session-error {
  grid-column: 1 / -1;
  border: 1px solid #e6c3c3;
  background: #fdf4f4;
  color: #a33;
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 14px;
}
.session-caption { margin: 10px 2px 0; font-size: 14px; color: #333; }
.session-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---- ACS review list ------------------------------------------------------ */

.acs-head { margin-bottom: 18px; }
.acs-sub { color: #555; margin: 0; max-width: 640px; }
.btn-link {
  background: none;
  border: 0;
  color: var(--pill);
  cursor: pointer;
  font: inherit;
  padding: 0;
  margin-bottom: 12px;
}
.btn-link:hover { text-decoration: underline; }
.acs-list {
  list-style: none;
  margin: 0;
  padding: 0 0 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.acs-item {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 14px 16px;
  cursor: pointer;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
}
.acs-item:hover { border-color: var(--pill); background: #f6faff; }
.acs-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--pill);
  flex-shrink: 0;
}
.acs-title { flex: 1; font-size: 14px; }
.acs-count { font-size: 12px; color: var(--muted); flex-shrink: 0; }

/* ---- Player --------------------------------------------------------------- */

.player-view { padding: 0 20px 50px; }

.stage-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 1040px;
  margin: 0 auto;
}
.stage-arrow {
  background: none;
  border: 0;
  color: #9aa4ad;
  font-size: 44px;
  line-height: 1;
  padding: 8px 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.stage-arrow:hover:not(:disabled) { color: var(--navy); }
.stage-arrow:disabled { opacity: 0.25; cursor: default; }

.stage {
  position: relative;
  flex: 1;
  min-width: 0;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.slide-img { width: 100%; height: 100%; object-fit: contain; display: block; }

.slide-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 24px;
  gap: 6px;
}
.fb-type {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5bc0de;
}
.fb-title { margin: 0; font-size: clamp(18px, 3.4vw, 30px); }
.fb-acs { margin: 0; font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: #9aa4ad; }
.fb-note { margin: 12px 0 0; font-size: 12px; color: #6b737a; }

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.play-glyph {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  padding-left: 6px;
}

.stage-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}
.slide-counter {
  position: absolute;
  left: 18px;
  color: #f2d024;
  font-size: 13px;
  font-weight: 700;
}
.stage-hint { color: rgba(255, 255, 255, 0.75); font-size: 12px; }

/* Ticks live below the stage in their own row, aligned to the slide's width so
   they read as that slide's progress without covering the artwork. */
.ticks-row {
  max-width: 1040px;
  margin: 10px auto 0;
  padding: 0 56px;
}
.ticks {
  display: flex;
  gap: 3px;
  height: 8px;
}
.tick {
  flex: 1;
  min-width: 0;
  background: #d5dade;
  border: 0;
  padding: 0;
  border-radius: 2px;
  cursor: pointer;
  transition: background 120ms ease;
}
.tick:hover { background: #a9b3bb; }
.tick.done { background: var(--donut-left); }
.tick.current { background: #e8a91d; }
.tick.question { background: #efe0b4; }
.tick.question.done { background: #c9a227; }

/* ---- Transport ------------------------------------------------------------ */

.transport {
  max-width: 1040px;
  margin: 14px auto 0;
  padding: 10px 14px;
  background: var(--navy);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.tp-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  border-radius: 4px;
  height: 36px;
  min-width: 44px;
  padding: 0 10px;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-shrink: 0;
}
.tp-btn:hover { background: rgba(255, 255, 255, 0.22); }
/* Solid triangles rather than curved-arrow glyphs: they render consistently on
   iOS and Android, where the arrow glyphs fall back to a different font. */
.tp-glyph { font-size: 12px; line-height: 1; letter-spacing: -1px; }
.tp-btn-skip { gap: 5px; padding: 0 12px; }
.tp-num { font-size: 11px; font-weight: 700; }
.tp-btn-play { min-width: 84px; background: var(--pill); border-color: var(--pill-dark); }
.tp-btn-play:hover { background: var(--pill-dark); }
.tp-btn-cc { font-weight: 700; letter-spacing: 0.04em; }
.tp-btn-cc[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green-dark);
}

.tp-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
  min-width: 38px;
  text-align: center;
}

.tp-scrub {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.tp-seek {
  flex: 1;
  min-width: 60px;
  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}
.tp-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  cursor: pointer;
}
.tp-seek::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  cursor: pointer;
}

/* ---- Captions ------------------------------------------------------------- */

.cc-panel {
  max-width: 1040px;
  margin: 14px auto 0;
  padding: 18px 22px;
  background: #f7f9fa;
  border: 1px solid var(--rule);
  border-radius: 6px;
  max-height: 190px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.cc-text {
  margin: 0;
  font-size: 17px;
  line-height: 1.75;
  color: #8a9299;
}
/* Sentences already spoken stay legible; the current one is the reading cue. */
.cc-seg { transition: color 140ms ease, background 140ms ease; }
.cc-seg.past { color: #56606a; }
.cc-seg.now {
  color: #14212c;
  background: #fdf0c8;
  border-radius: 3px;
  box-shadow: 0 0 0 3px #fdf0c8;
  font-weight: 500;
}

.audio-warning {
  text-align: center;
  color: var(--warn);
  font-size: 13px;
  margin: 12px 0 0;
}

.reveal-bar { display: flex; justify-content: center; margin-top: 16px; }
.btn-reveal {
  background: var(--reveal);
  border: 1px solid #bb8d16;
  color: #241a00;
  font-size: 16px;
  font-weight: 700;
  border-radius: 22px;
  padding: 12px 34px;
  cursor: pointer;
}
.btn-reveal:hover { background: #e7b32c; }

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.player-title { color: var(--muted); font-size: 13px; }

.player-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.btn-pill {
  background: var(--pill);
  border: 1px solid var(--pill-dark);
  color: #fff;
  border-radius: 22px;
  padding: 11px 26px;
  font-size: 15px;
  cursor: pointer;
}
.btn-pill:hover { background: var(--pill-dark); }
.btn-pill-wide { padding: 11px 30px; }

/* ---- Responsive ----------------------------------------------------------- */

@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; gap: 28px; }
  .subheader-title { font-size: 20px; }
  .brand { font-size: 18px; }
  .brand-thin { font-size: 21px; }
}

@media (max-width: 560px) {
  .site-header { padding: 12px 14px; }
  .site-nav { width: 100%; }
  .btn-nav { flex: 1; }
  .stage-arrow { font-size: 34px; padding: 4px 2px; }
  .player-view { padding: 0 10px 40px; }
  .stage-hint { display: none; }
  .ticks-row { padding: 0 30px; }
  /* Transport wraps to two rows on a phone: buttons, then the whole scrubber. */
  .transport { flex-wrap: wrap; justify-content: center; gap: 8px; }
  .tp-scrub { flex-basis: 100%; order: 10; }
  .cc-text { font-size: 16px; }
  .btn-pill, .btn-pill-wide { padding: 11px 18px; font-size: 14px; }
  .player-actions { flex-direction: column; align-items: stretch; }
}

.session-restart { margin-top: 6px; font-size: 13px; }

/* ---- Account area (header) ------------------------------------------------ */

.account {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}
.account-name { white-space: nowrap; }
.account-link {
  background: none;
  border: 0;
  color: #9ecbff;
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.account-link:hover { text-decoration: underline; }

/* ---- Sign in --------------------------------------------------------------- */

.signin-view {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 30px 20px 60px;
  background: #ececec;
}
.signin-card {
  width: 100%;
  max-width: 430px;
  background: #fafafa;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 34px 32px 28px;
}
.signin-title { margin: 0 0 10px; font-size: 34px; font-weight: 700; color: #2f3b45; }
.signin-sub { margin: 0 0 22px; color: #666; font-size: 15px; }

.field {
  display: flex;
  align-items: stretch;
  border: 1px solid #d8d8d8;
  border-radius: 3px;
  background: #fff;
  margin-bottom: 14px;
  overflow: hidden;
}
.field:focus-within { border-color: var(--pill); }
.field-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  background: #f0f0f0;
  border-right: 1px solid #d8d8d8;
  font-size: 17px;
  filter: grayscale(1);
  opacity: 0.65;
}
.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 13px 14px;
  font-size: 15px;
  color: #444;
  background: transparent;
}

.signin-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #e6c3c3;
  background: #fdf4f4;
  color: #a33;
  border-radius: 3px;
  font-size: 14px;
}

.signin-actions { display: flex; justify-content: flex-end; }
.btn-signin {
  background: var(--green);
  border: 1px solid var(--green-dark);
  color: #fff;
  font-size: 19px;
  padding: 12px 34px;
  border-radius: 3px;
  cursor: pointer;
}
.btn-signin:hover:not(:disabled) { background: var(--green-dark); }
.btn-signin:disabled { opacity: 0.6; cursor: default; }

.signin-help {
  margin: 20px 0 0;
  text-align: center;
  font-size: 13px;
  color: #888;
}

/* Word-level captions: tighter spacing than sentence mode, and the highlight is
   a single word so it reads as a pointer rather than a block. */
.cc-words .cc-seg { padding: 0 1px; }
.cc-words .cc-seg.now {
  background: #ffdf7a;
  box-shadow: 0 0 0 2px #ffdf7a;
  color: #14212c;
  font-weight: 600;
}

/* ---- Playback rate --------------------------------------------------------- */

.tp-rate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  height: 36px;
  padding: 0 8px 0 10px;
  color: #fff;
}
.tp-rate-label { font-size: 11px; opacity: 0.75; letter-spacing: 0.04em; }
.tp-rate select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 0 16px 0 2px;
  cursor: pointer;
  outline: none;
  /* Native arrow is hidden above; draw our own so it reads on the navy bar. */
  background-image: linear-gradient(45deg, transparent 50%, #fff 50%),
    linear-gradient(135deg, #fff 50%, transparent 50%);
  background-position: right 6px center, right 2px center;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
/* The dropdown list itself renders in the OS palette, so force readable text. */
.tp-rate select option { color: #222; background: #fff; }

@media (max-width: 560px) {
  .tp-rate-label { display: none; }
  .tp-rate { padding: 0 6px 0 8px; }
}

/* Per-session progress, sitting directly under its thumbnail. The donut above
   is the whole seminar; this is just this section. */
.session-bar {
  height: 10px;
  background: #6b7076;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 6px;
}
.session-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: #5ac85a;
  border-radius: 5px;
  transition: width 400ms ease;
}

/* First row of the review list: back to the unfiltered section. */
.acs-item-all { background: #f6faff; border-color: var(--pill); }
.acs-item-all .acs-code { font-weight: 700; }

/* ---- Welcome video ------------------------------------------------------- */
/* Sits over the slide inside the stage so it inherits the 16:9 box already
   sized there; the video is 1280x720 and matches it exactly. */
.intro-video-wrap { position: absolute; inset: 0; background: #000; z-index: 3; }
.intro-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.intro-play { z-index: 4; }
.intro-skip {
  position: absolute; right: 12px; bottom: 56px; z-index: 5;
  padding: 8px 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(12, 26, 51, 0.82); color: #fff; font: 600 14px/1 inherit;
}
.intro-skip:hover { background: rgba(12, 26, 51, 0.95); }
@media (max-width: 640px) { .intro-skip { bottom: 48px; right: 8px; padding: 7px 13px; } }

/* ---- Course references (Lesson Resources) -------------------------------- */
.ref-block { margin: 0 0 26px; padding: 16px 18px; background: #f6faff;
  border: 1px solid var(--pill); border-radius: 10px; }
.ref-title { margin: 0 0 10px; font-size: 15px; color: var(--navy); }
.ref-list { list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 20px; }
.ref-list a { color: var(--navy); text-decoration: none; font-size: 14px; }
.ref-list a:hover { text-decoration: underline; }
.ref-list li::before { content: "\1F4C4\00a0"; }
