/* ===========================================================================
   OLT — Outdoor Leader Training
   Video-first library, public pages. Ported from the approved design mock.
   Brand: AdventureWorks (Montserrat + Source Sans 3). See
   ~/.claude/skills/adventureworks-design for the source tokens.
   =========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --ink:        #1A1819;
  --charcoal:   #373435;
  --muted:      #4D5258;
  --muted-2:    #6E747D;
  --border:     #E1E4E9;
  --border-2:   #C9CDD4;
  --bg-alt:     #F7F8FA;
  --bg-chip:    #EEF0F3;

  --blue:       #0082C6; /* fills/large text only */
  --blue-action:#006AA3; /* links, buttons, body-size text */
  --blue-dark:  #00507D; /* small text */
  --blue-darker:#005585;
  --blue-tint:  #EAF4FA;
  --cyan:       #00BBF1;
  --cyan-tint:  #B6EEFC;
  --gold:       #F6C233;
  --gold-text:  #C99A18;
  --gold-tint:  #FEF7E1;
  --green:      #90C050;
  --green-text: #466321;
  --green-text2:#6B9636;
  --green-tint: #F1F7E6;
}

body {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--charcoal);
  background: #fff;
  font-size: 17px;
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', system-ui, sans-serif;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--charcoal);
  text-wrap: balance;
  line-height: 1.15;
}

p { margin: 0; text-wrap: pretty; }
a { color: var(--blue-action); }
a:hover { color: var(--blue-darker); }

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

img { max-width: 100%; display: block; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

.eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-dark);
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 220ms cubic-bezier(.4,0,.2,1), box-shadow 220ms cubic-bezier(.4,0,.2,1), transform 140ms;
  cursor: pointer;
  white-space: nowrap;
  font: inherit;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue-action); color: #fff; box-shadow: 0 8px 24px rgba(0,130,198,.28); }
.btn-primary:hover { background: var(--blue-darker); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.9); color: #fff; background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn-outline { border-color: var(--blue-action); color: var(--blue-action); background: #fff; }
.btn-outline:hover { background: var(--blue-tint); color: var(--blue-darker); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 17px; }
.btn-link {
  background: none; border: none; cursor: pointer; font: inherit; color: var(--blue-action);
  padding: 0; min-height: 44px; display: inline-flex; align-items: center;
}
.btn-link:hover { color: var(--blue-darker); }
.btn-full { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ── Cards ────────────────────────────────────────────────────────────────── */

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(26,24,25,.08), 0 2px 4px rgba(26,24,25,.05);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 220ms cubic-bezier(.4,0,.2,1), box-shadow 220ms cubic-bezier(.4,0,.2,1);
}
a.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(26,24,25,.12), 0 4px 8px rgba(26,24,25,.06); color: inherit; text-decoration: none; }

.thumb { position: relative; aspect-ratio: 16/9; background: var(--ink); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-3-2 { aspect-ratio: 3/2; overflow: hidden; }
/* Interactive course delivered elsewhere, not open yet — a card, not a link. */
.card-soon .thumb-3-2 { position: relative; }
.soon-badge {
  position: absolute; left: 14px; top: 14px; padding: 6px 12px; border-radius: 999px;
  background: rgba(26,24,25,.84); color: #fff; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 13px;
}
.soon-link { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px; color: var(--blue-action); align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; }
.thumb-3-2 img { width: 100%; height: 100%; object-fit: cover; display: block; }

.dur {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(26,24,25,.84); color: #fff; font-weight: 600; font-size: 13px;
  line-height: 1; padding: 5px 8px; border-radius: 6px;
}

.free {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--green-text); background: var(--green-tint);
  border-radius: 999px; padding: 4px 10px;
}
.sub {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue-dark); background: var(--blue-tint);
  border-radius: 999px; padding: 4px 10px;
}
.soon {
  display: inline-flex; align-items: center;
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); background: var(--bg-chip);
  border-radius: 999px; padding: 4px 10px;
}

.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.card-body-lg { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; }

/* ── Nav / header ─────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 32px;
  height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand-link { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-link img { width: 40px; height: 40px; object-fit: contain; }
.brand-name { display: flex; flex-direction: column; gap: 2px; }
.brand-name-main {
  font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 18px;
  color: var(--charcoal); letter-spacing: -0.01em; line-height: 1.1;
}
.brand-name-sub { font-size: 10px; color: var(--muted); }

.main-nav { display: flex; align-items: center; gap: 28px; }
.navlink {
  font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 15px;
  color: var(--charcoal); text-decoration: none; padding: 10px 2px;
}
.navlink:hover { color: var(--blue-action); text-decoration: none; }
.navlink[aria-current="page"] { color: var(--blue-action); }

.header-actions { display: flex; align-items: center; gap: 16px; }
.avatar {
  width: 44px; height: 44px; border-radius: 999px; background: var(--cyan-tint); color: var(--blue-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 14px; text-decoration: none;
}
.header-menu-btn {
  width: 44px; height: 44px; border: 0; background: transparent; border-radius: 999px;
  display: none; align-items: center; justify-content: center; cursor: pointer;
}

.nav-role-badge {
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--blue-dark); background: var(--blue-tint);
  border-radius: 999px; padding: 6px 12px;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
  position: relative; min-height: 520px; display: flex; align-items: flex-end; overflow: hidden;
}
.hero img.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(26,24,25,.78) 0%, rgba(26,24,25,.45) 50%, rgba(26,24,25,.05) 100%);
}
.hero-inner {
  position: relative; width: 100%; max-width: 1280px; margin: 0 auto;
  padding: 72px 32px 72px; display: flex; flex-direction: column; gap: 24px; max-width: 680px;
  box-sizing: content-box;
}
.hero h1 { font-size: 48px; font-weight: 800; color: #fff; }
.hero-sub { font-size: 19px; color: #F7F8FA; max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 8px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; padding-top: 16px; color: #fff; font-weight: 600; }
.hero-stats span { display: flex; align-items: center; gap: 8px; }
.glyph-cyan { color: var(--cyan); }
.glyph-gold { color: var(--gold); }
.glyph-green { color: var(--green); }

/* ── Sections ─────────────────────────────────────────────────────────────── */

.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; flex-direction: column; gap: 10px; }
.section-head-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.section-title { font-size: 34px; font-weight: 800; }
.section-lead { font-size: 18px; color: var(--muted); max-width: 720px; }

.grid-courses { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px,100%),1fr)); gap: 28px; }
/* Library page: compact course cards, 4 across, so the whole catalogue scans at a glance. */
.grid-courses-compact { grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-courses-compact .thumb-3-2 { aspect-ratio: 2/1; }
.grid-courses-compact .card { border-radius: 12px; }
.grid-courses-compact .card-body-lg { padding: 12px 14px 14px; gap: 4px; }
.grid-courses-compact .card-body-lg h3 { font-size: 17px; line-height: 1.25; margin: 0; }
.grid-courses-compact .card-body-lg > span:last-of-type { font-size: 13px !important; }
.grid-courses-compact .soon-badge { left: 10px; top: 10px; padding: 4px 9px; font-size: 11px; }
@media (max-width: 1100px) { .grid-courses-compact { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .grid-courses-compact { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .grid-courses-compact { grid-template-columns: 1fr; } }
.grid-videos  { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px,100%),1fr)); gap: 24px; }

/* Activity chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--border-2); background: #fff;
  font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 14px;
  color: var(--charcoal); text-decoration: none; cursor: pointer;
  transition: background-color 140ms, border-color 140ms, color 140ms;
}
.chip:hover { border-color: var(--blue-action); color: var(--blue-action); text-decoration: none; }
.chip.is-active { background: var(--blue-action); color: #fff; border-color: var(--blue-action); }

/* Segmented control (Courses / All videos) */
.seg-group { display: flex; gap: 4px; background: var(--bg-chip); border-radius: 999px; padding: 4px; }
.seg {
  min-height: 44px; padding: 0 22px; border-radius: 999px; border: 0; background: transparent;
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted);
  text-decoration: none; display: inline-flex; align-items: center;
}
.seg.is-active { background: #fff; color: var(--blue-dark); box-shadow: 0 1px 3px rgba(26,24,25,.12); }

/* Search */
.search-wrap { position: relative; flex: 1 1 420px; max-width: 620px; display: flex; align-items: center; }
.search-wrap svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.search-input {
  width: 100%; box-sizing: border-box; min-height: 52px; padding: 0 20px 0 52px;
  border: 1px solid var(--muted-2); border-radius: 999px; font: inherit; font-size: 17px;
  color: var(--charcoal); background: #fff;
}
.search-input:focus-visible { outline: 3px solid var(--cyan); outline-offset: 1px; }

/* ── Get-qualified panel ──────────────────────────────────────────────────── */

.qualify-panel {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px,100%),1fr));
  border-radius: 24px; overflow: hidden;
  box-shadow: 0 12px 28px rgba(26,24,25,.12), 0 4px 8px rgba(26,24,25,.06);
  background: var(--blue-dark);
}
.qualify-panel img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.qualify-panel-body { padding: 48px; display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.qualify-panel-body h2 { font-size: 30px; font-weight: 800; color: #fff; }
.qualify-panel-body p { font-size: 18px; color: #EEF0F3; }

.qualify-side {
  background: var(--blue-dark); border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.qualify-side p { color: #fff; font-size: 16px; }
.qualify-side a { color: #fff; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 15px; }

/* ── Pricing ──────────────────────────────────────────────────────────────── */

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px,100%),1fr)); gap: 28px; align-items: stretch; }
.pricing-card {
  background: #fff; border-radius: 16px; box-shadow: 0 4px 12px rgba(26,24,25,.08), 0 2px 4px rgba(26,24,25,.05);
  padding: 40px; display: flex; flex-direction: column; gap: 22px;
}
.pricing-card.is-featured { box-shadow: 0 24px 56px rgba(26,24,25,.16); border: 2px solid var(--blue-action); }
.price { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 44px; color: var(--charcoal); }
.pricing-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 17px; }
.pricing-list li { display: flex; gap: 10px; }

/* ── Footer ───────────────────────────────────────────────────────────────── */

.site-footer { background: var(--ink); color: #E1E4E9; padding: 56px 0 36px; }
.site-footer a { color: #E1E4E9; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; max-width: 360px; }
.footer-brand img { width: 180px; height: auto; }
.footer-brand p { font-size: 15px; color: #C9CDD4; }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 56px; font-size: 16px; }
.footer-bottom { border-top: 1px solid #4D5258; padding-top: 24px; font-size: 14px; color: #C9CDD4; margin-top: 40px; }
.footer-simple { background: var(--ink); color: #C9CDD4; padding: 40px 0; }
.footer-simple-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-simple img { width: 150px; height: auto; }

/* ── Library page ─────────────────────────────────────────────────────────── */

.library-hero { background: var(--bg-alt); padding: 56px 0 36px; border-bottom: 1px solid var(--border); }
.library-controls { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.count-label { font-size: 15px; color: var(--muted); }
.empty-state { font-size: 17px; color: var(--muted); padding: 40px 0; }

/* ── Course page ──────────────────────────────────────────────────────────── */

.course-hero { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.course-hero-inner {
  max-width: 1280px; margin: 0 auto; padding: 44px 32px 48px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px,100%),1fr));
  gap: 48px; align-items: center;
}
.breadcrumb { font-size: 15px; display: flex; gap: 8px; color: var(--muted); flex-wrap: wrap; }
.course-hero h1 { font-size: 40px; font-weight: 800; }
.course-hero-desc { font-size: 19px; color: var(--muted); }
.course-meta-row { display: flex; gap: 24px; flex-wrap: wrap; font-weight: 600; font-size: 16px; }
.progress-block { display: flex; flex-direction: column; gap: 8px; max-width: 460px; }
.progress-row { display: flex; justify-content: space-between; font-size: 15px; }
.progress-track { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); border-radius: 999px; }

.course-preview-link {
  position: relative; display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 16/10;
  box-shadow: 0 12px 28px rgba(26,24,25,.12), 0 4px 8px rgba(26,24,25,.06); text-decoration: none;
}
.course-preview-link img { width: 100%; height: 100%; object-fit: cover; }
.course-preview-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,24,25,0) 40%, rgba(26,24,25,.72) 100%); }
.play-btn-lg {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 76px; height: 76px; border-radius: 999px; background: rgba(255,255,255,.94);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(26,24,25,.25);
}
.course-preview-caption {
  position: absolute; left: 24px; bottom: 20px; color: #fff;
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 17px;
}

.course-body {
  max-width: 1280px; margin: 0 auto; padding: 48px 32px 96px;
  display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 56px; align-items: start;
}
.course-sections { display: flex; flex-direction: column; gap: 36px; }
.course-section { display: flex; flex-direction: column; gap: 6px; }
.course-section-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 0 16px 8px; border-bottom: 1px solid var(--border);
}
.course-section-head h3 { font-size: 19px; font-weight: 800; }
.course-section-meta { font-size: 14px; color: var(--muted); white-space: nowrap; }

.lesson-row {
  display: grid; grid-template-columns: 32px minmax(0,1fr) auto auto; align-items: center;
  gap: 16px; padding: 14px 16px; border-radius: 10px; text-decoration: none; color: var(--charcoal); min-height: 44px;
}
a.lesson-row:hover { background: var(--bg-alt); color: var(--charcoal); text-decoration: none; }
.lesson-row.is-current { background: var(--blue-tint); }
.lesson-row.is-soon { color: var(--muted-2); }
.lesson-row-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 999px; font-size: 13px;
}
.icon-done { background: var(--green); color: var(--ink); font-weight: 700; }
.icon-free { background: #E0F8FE; color: #015E7B; }
.icon-current { background: var(--blue-action); color: #fff; }
.icon-locked { background: var(--bg-chip); color: var(--muted); }
.icon-soon { background: var(--bg-alt); color: var(--muted-2); }
.lesson-row-title { font-size: 17px; font-weight: 600; }
.lesson-row-dur { font-size: 15px; color: var(--muted); min-width: 44px; text-align: right; }

.course-downloads { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.download-row {
  display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 10px;
  text-decoration: none; color: var(--charcoal); min-height: 44px; background: var(--bg-alt);
}
.download-row:hover { background: var(--bg-chip); text-decoration: none; }
.download-row-name { font-weight: 600; }
.download-row-type { margin-left: auto; font-size: 14px; color: var(--muted); }

.side-card {
  background: #fff; border-radius: 16px; box-shadow: 0 12px 28px rgba(26,24,25,.12), 0 4px 8px rgba(26,24,25,.06);
  padding: 28px; display: flex; flex-direction: column; gap: 14px;
}
.side-card h3 { font-size: 20px; font-weight: 800; }
.side-card p { font-size: 16px; color: var(--muted); }
.course-sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 24px; }

/* ── Lesson page ──────────────────────────────────────────────────────────── */

.lesson-layout {
  max-width: 1360px; margin: 0 auto; padding: 32px 32px 96px;
  display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 40px; align-items: start;
}
.lesson-main { display: flex; flex-direction: column; gap: 28px; }
.player-frame {
  border-radius: 16px; overflow: hidden; background: var(--ink);
  box-shadow: 0 12px 28px rgba(26,24,25,.12), 0 4px 8px rgba(26,24,25,.06);
}
.player-aspect { position: relative; aspect-ratio: 16/9; }
.player-aspect iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-placeholder {
  position: relative; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 10px; color: #E1E4E9; background: var(--ink); text-align: center; padding: 24px;
}
.player-placeholder h3 { color: #fff; }

.lesson-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.lesson-head-text { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.lesson-head h1 { font-size: 30px; font-weight: 800; }
.lesson-meta { font-size: 16px; color: var(--muted); }
.lesson-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.lesson-summary { font-size: 18px; max-width: 760px; }
.completed-badge {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: 999px; background: var(--green-tint); color: var(--green-text);
  font-family: 'Montserrat', sans-serif; font-weight: 700;
}

.exercise-card {
  background: var(--gold-tint); border-radius: 16px; padding: 32px;
  display: flex; flex-direction: column; gap: 16px; max-width: 820px;
}
.exercise-card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.exercise-card-head h2 { font-size: 22px; font-weight: 800; }
.exercise-meta { margin-left: auto; font-size: 15px; color: var(--muted); }
.exercise-body { font-size: 17px; }
.exercise-body ol, .exercise-body ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.exercise-body p { margin: 0 0 .6em; }

.lesson-downloads { display: flex; flex-direction: column; gap: 14px; max-width: 820px; }
.lesson-downloads h2 { font-size: 20px; font-weight: 800; }

.upnext-card {
  background: #fff; border-radius: 16px; box-shadow: 0 4px 12px rgba(26,24,25,.08), 0 2px 4px rgba(26,24,25,.05);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 6px;
}
.upnext-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 10px 8px; }
.upnext-head h2 { font-size: 17px; font-weight: 800; }
.upnext-head span { font-size: 14px; color: var(--muted); }
.up {
  display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 14px; align-items: center;
  padding: 10px; border-radius: 10px; text-decoration: none; color: var(--charcoal);
}
a.up:hover { background: var(--bg-alt); color: var(--charcoal); text-decoration: none; }
.up.is-current { background: var(--blue-tint); }
.up-thumb { position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: var(--ink); }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; }
.up-dur { position: absolute; right: 6px; bottom: 6px; background: rgba(26,24,25,.84); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; padding: 3px 6px; border-radius: 4px; }
.up-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.up-state { font-size: 13px; color: var(--muted); }
.upnext-all { padding: 10px 10px 0; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px; display: inline-block; }

/* "Full course" — the whole course, expandable inside the Up next panel. */
.course-outline { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 4px; }
.course-outline > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 10px; border-radius: 10px;
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px; color: var(--blue-action);
}
.course-outline > summary::-webkit-details-marker { display: none; }
.course-outline > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.course-outline[open] > summary::after { transform: rotate(-135deg); }
.course-outline > summary span { color: var(--muted); font-weight: 600; }
.course-outline > summary:hover { background: var(--bg-alt); }
.course-outline > summary:focus-visible { outline: 3px solid var(--blue-action); outline-offset: 2px; }
.outline-chapter { padding: 10px 0 4px; }
.outline-chapter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 10px 4px; }
.outline-chapter-head h3 { font-size: 14px; font-weight: 800; }
.outline-chapter-head span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.course-outline ol { list-style: none; margin: 0; padding: 0; }
.outline-item {
  display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 10px; align-items: center;
  min-height: 44px; padding: 6px 10px; border-radius: 10px; text-decoration: none; color: var(--charcoal); font-size: 14px;
}
a.outline-item:hover { background: var(--bg-alt); color: var(--charcoal); text-decoration: none; }
.outline-item.is-current { background: var(--blue-tint); font-weight: 600; }
.outline-mark { font-size: 12px; color: var(--blue-action); text-align: center; }
.outline-mark.is-watched { color: var(--green-text); font-weight: 700; }
.outline-title { line-height: 1.3; }
.outline-dur { font-size: 13px; color: var(--muted); }

/* Video controls bar (custom chrome over Vimeo where applicable) */
.player-bar { display: flex; align-items: center; gap: 8px; padding: 6px 12px; color: #fff; }
.ctl { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 999px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ctl:hover { background: rgba(255,255,255,.14); }

/* ── Auth pages ───────────────────────────────────────────────────────────── */

.auth-page { max-width: 1280px; margin: 0 auto; padding: 64px 32px 96px; display: flex; justify-content: center; }
.auth-box {
  width: 100%; max-width: 440px; background: #fff; border-radius: 16px;
  box-shadow: 0 4px 12px rgba(26,24,25,.08), 0 2px 4px rgba(26,24,25,.05);
  padding: 40px; display: flex; flex-direction: column; gap: 20px;
}
.auth-box h1 { font-size: 28px; font-weight: 800; }
.auth-sub { color: var(--muted); font-size: 16px; }
.auth-switch { text-align: center; font-size: 15px; color: var(--muted); }

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px,100%),1fr)); gap: 16px; }
.form-group label {
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px; color: var(--charcoal);
}
.required { color: #B3261E; }
.form-hint { font-size: 13px; color: var(--muted); }
.form-check { flex-direction: row; align-items: flex-start; gap: 10px; }
.form-check input { margin-top: 4px; width: 18px; height: 18px; }
.form-check label { font-weight: 400; font-family: inherit; }

input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="search"], input[type="number"], textarea, select {
  min-height: 48px; padding: 0 16px; border: 1px solid var(--muted-2); border-radius: 10px;
  font: inherit; font-size: 16px; color: var(--charcoal); background: #fff;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--cyan); outline-offset: 1px; }
textarea { min-height: 96px; padding-top: 12px; }

.alert { padding: 14px 18px; border-radius: 10px; font-size: 15px; }
.alert-error { background: #FBE9E7; color: #8C2F24; }
.alert-success { background: var(--green-tint); color: var(--green-text); }

/* ── Simple inner pages: My Certificates, verify page, 404/error ─────────── */

.page-header { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 40px 0; }
.page-header h1 { font-size: 30px; font-weight: 800; }
.page-header p { color: var(--muted); margin-top: 6px; }

.empty-state { text-align: center; padding: 56px 16px; color: var(--muted); }
.empty-state .btn { margin-top: 16px; }

.cert-verify-page {
  min-height: 60vh; display: flex; align-items: center; justify-content: center;
  padding: 48px 16px; background: var(--bg-alt);
}
.cert-card {
  background: #fff; border: 2px solid var(--blue-action); border-radius: 16px;
  padding: 48px 40px; text-align: center; max-width: 480px; width: 100%;
  box-shadow: 0 4px 20px rgba(0,106,163,.12);
}
.cert-badge {
  width: 64px; height: 64px; background: var(--blue-action); color: #fff; border-radius: 50%;
  font-size: 28px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
}
.cert-card h1 { font-size: 22px; margin-bottom: 12px; }
.cert-name { font-size: 24px; font-weight: 800; margin-bottom: 5px; }
.cert-course { font-size: 16px; color: var(--blue-action); font-weight: 600; margin-bottom: 12px; }
.cert-date { color: var(--muted); font-size: 15px; margin-bottom: 5px; }
.cert-uuid { font-size: 12px; color: var(--muted-2); margin-bottom: 24px; font-family: monospace; }

.cert-list { display: flex; flex-direction: column; gap: 12px; }
.cert-list-item {
  display: flex; align-items: center; justify-content: space-between; background: #fff;
  border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; flex-wrap: wrap; gap: 12px;
}
.cert-list-info { display: flex; flex-direction: column; gap: 3px; }
.cert-date-small { font-size: 13px; color: var(--muted); }
.cert-list-actions { display: flex; gap: 8px; }

/* ── Phone layout (≤480px) ───────────────────────────────────────────────── */

@media (max-width: 860px) {
  .site-header-inner { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; row-gap: 10px; }
  .main-nav { order: 3; width: 100%; gap: 20px; flex-wrap: wrap; justify-content: center; }
  .course-body, .lesson-layout { grid-template-columns: 1fr; }
  .course-sidebar, aside.lesson-aside { position: static; }
}

@media (max-width: 480px) {
  .site-header-inner, .container, .hero-inner,
  .library-hero > .container, .course-hero-inner, .course-body, .lesson-layout {
    padding-left: 16px; padding-right: 16px;
  }
  .hero { min-height: 420px; }
  .hero h1 { font-size: 32px; }
  .hero-sub { font-size: 17px; }
  .section { padding: 48px 0; }
  .section-title { font-size: 26px; }
  .course-hero h1 { font-size: 28px; }
  .lesson-head h1 { font-size: 24px; }
  .pricing-grid { gap: 20px; }
  .auth-box { padding: 28px 20px; }

  /* Coming-soon / free badge no longer squeezes the title into a sliver —
     it wraps onto its own line under the title instead. */
  .lesson-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    grid-template-areas: "icon title dur" "icon badge badge";
    row-gap: 4px;
    align-items: start;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .lesson-row-icon { grid-area: icon; }
  .lesson-row-title { grid-area: title; }
  .lesson-row-badge { grid-area: badge; justify-self: start; }
  .lesson-row-dur { grid-area: dur; min-width: 0; }
}

/* Library chip counts + course sign-up hint */
.chip-count { margin-left: 8px; font-weight: 700; opacity: .65; }
.chip.is-active .chip-count { opacity: .85; }
.course-signup-note { margin: 12px 0 20px; font-size: 16px; color: var(--muted); }
.course-signup-note a { font-weight: 700; }
.empty-state a { font-weight: 600; }
