/* Homepage redesign (2026-10-22) — scoped, additive styling only.
   Deliberately a SEPARATE file from css/styles.css: every rule here
   targets markup added or restyled as part of this redesign
   (.site-nav, .hero-redesign, .how-it-works, .career-section,
   .resources-section, .closing-cta, and a photographic skin on the
   existing .entry-price-card grid), so none of it can destabilize the
   shared rules practice/checkout/admin screens still depend on.
   Reuses the existing --navy/--red/--card/--gold custom properties
   from styles.css (loaded first) rather than redefining a second,
   possibly-drifting palette.

   PHOTOGRAPHY (2026-10-23): hero/career/closing-cta now use the three
   AI-generated, user-authorized WebP assets in /images (see
   ROADMAP.md's homepage-redesign entry for the full integration
   writeup).

   PHASE 3B (2026-10-23): the 8 exam-category cards now use 4 more
   user-authorized AI-generated vehicle photos (semi truck, tanker
   truck, box truck, school bus), each reused across 2 thematically
   related categories -- see the per-category [data-name] rules below
   and ROADMAP.md's homepage-redesign entry for the full reasoning.
   #entryPriceGridSection itself also moved out of #startPracticingCard
   (index.html) to its own, wider sibling container -- see the comment
   left at that point in index.html.

   PHASE 3A (2026-10-23): full-bleed marketing layout + Barlow Condensed
   display type + navy/red/white branding, closing the gap between
   staging and the approved mockup. --font-display and --gutter below
   are new, additive custom properties (same convention as reusing
   styles.css's --navy/--red/etc.) -- --gutter recreates .entry-wrap's
   own max-width:1180px/margin:0 auto centering as padding instead, so
   full-bleed sections (background spans the full viewport) still keep
   their actual CONTENT aligned with the nav/footer/functional cards
   that remain inside .entry-wrap at the original width. Those
   functional pieces (How It Works, the Start Practicing card, the
   returning-user dashboard, the category-price grid, the footer)
   deliberately stay at .entry-wrap's existing width and the system
   font stack -- this phase is marketing presentation only, per its own
   explicit scope. */
:root{
  --font-display:"Barlow Condensed",Inter,"Segoe UI",Arial,sans-serif;
  --gutter:max(18px,calc((100vw - 1180px)/2));
}
/* Shared by every full-bleed marketing band (.site-nav, .hero-redesign,
   .career-section, .resources-section, .closing-cta): breaks the
   element out to the full viewport width regardless of .entry-wrap's
   max-width, then re-applies that same width as left/right padding so
   the actual content lines up with everything that's still inside
   .entry-wrap above and below it. */
.full-bleed{
  width:100vw;position:relative;left:50%;right:50%;
  margin-left:-50vw;margin-right:-50vw;
  padding-left:var(--gutter);padding-right:var(--gutter);
  box-sizing:border-box;
}

/* styles.css's .entry-screen background is a dark-navy-to-light gradient
   hardcoded to switch at 55% of page height -- tuned for the old, much
   shorter hero (nav + a single hero block, nothing else dark). This
   redesign's .hero-redesign is a self-contained card with its own navy
   background (below), so the page itself no longer needs a dark top
   region at all; without this override, the new taller hero + the new
   How It Works section push content past that 55% mark while still
   using dark navy text (.site-nav-link, .section-eyebrow, .how-it-works
   h2), rendering as dark-on-dark and effectively invisible. */
.entry-screen{background:var(--bg)}

/* Phase 3A correction: styles.css's .entry-screen has padding-top:28px
   (shared with #legalScreen, which also uses this class) -- harmless
   and invisible before Phase 3A, when the first child here was light
   and blended into the page background. Now the first child is
   .site-nav, a full-bleed navy band, so that same pre-existing 28px
   shows up as a stark light-colored strip above it (confirmed via
   getBoundingClientRect: nav's own top was 28px, not 0, with .site-nav
   itself correctly flush at margin-top:0 -- the gap was entirely this
   ancestor's padding, not a nav-side margin to compensate for).
   Scoped to #entryScreen by ID, not the shared .entry-screen class, so
   #legalScreen (no full-bleed element at its top, still wants its
   original top padding for the "Back to CDLPrepUSA" link) is
   unaffected. Only padding-top is touched -- the 18px side / 46px
   bottom padding are still load-bearing for the non-full-bleed content
   (How It Works, the Start Practicing card, the footer) on narrow
   viewports where .entry-wrap's own max-width doesn't apply. */
#entryScreen{padding-top:0}

/* Phase 3A: nav goes back to a solid navy band (full-bleed), matching
   the mockup -- .auth-link (styles.css) is white-on-translucent and was
   ORIGINALLY built for exactly this dark context; Phase 1/2's light nav
   needed a scoped override to make it readable, which is now removed
   since the dark background it was designed for is back. Same for
   .auth-user-name. .auth-link-primary (Sign Up) already has a white
   fill, which worked on the old light nav too, but gets its own red
   override below per "primary MARKETING CTAs use the approved red
   style." */
.site-nav{
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  flex-wrap:wrap;padding-top:16px;padding-bottom:16px;
  background:var(--navy);color:#fff;
}
.site-nav .entry-brand h2{
  font-family:var(--font-display);font-weight:800;font-size:28px;
  letter-spacing:.2px;color:#fff;
}
.site-nav .entry-brand h2 .brand-accent{color:var(--red)}
.site-nav .entry-brand p{color:rgba(255,255,255,.62)}
.site-nav .auth-link-primary{background:var(--red);border-color:var(--red);color:#fff}
.site-nav .auth-link-primary:hover{background:#c22e22}

.hero-redesign{
  /* Full-bleed: no rounded corners/overflow-clip anymore (Phase 1/2 had
     these for a contained rounded card; Phase 3A's bands are edge to
     edge, matching the mockup). margin is longhand top/bottom ONLY --
     .full-bleed's margin-left/right:-50vw is the breakout itself, and a
     margin SHORTHAND here would silently reset those back to 0 and
     collapse the breakout (hit this, fixed it, flagging it so nothing
     downstream reintroduces it by using shorthand `margin:` again on a
     .full-bleed element). */
  position:relative;
  background:
    /* 2026-11-10: position nudged from 58% to 50% -- at desktop widths
       (>900px) this section is width-constrained by `cover` (same
       reasoning as .hero-compact's own comment below), so a lower Y%
       shifts the visible crop window up the image, revealing more
       headroom above the blue truck's cab roof (previously clipped
       nearly flush with the top edge) while keeping the wheels/road
       fully in frame -- verified at 375-1920px, not assumed from one
       width. No effect at <=900px (the mobile rule just below): that
       breakpoint's `cover` is already height-constrained there with
       ~0 vertical slack, so the full photo height shows regardless of
       this value -- confirmed via screenshot, not just the math. */
    linear-gradient(100deg,rgba(7,19,33,.96) 0%,rgba(7,19,33,.88) 32%,rgba(7,19,33,.42) 62%,rgba(7,19,33,.18) 100%),
    url("../images/homepage-hero.webp") center 50% / cover no-repeat,
    linear-gradient(135deg,var(--navy) 0%,var(--navy2) 70%);
  color:#fff;margin-top:0;margin-bottom:48px;
  min-height:580px;display:flex;align-items:center;
  /* Physical "left", not justify-content:flex-start -- the photo's dark
     scrim and open road sit on a fixed physical side regardless of
     reading direction. flex-start would follow text direction instead
     and, in RTL, push the content box onto the photo's bright/occupied
     side (confirmed by testing: Arabic headline landed directly over
     the vehicles). Pinning the box physically keeps it over the scrim
     in both directions; text-align:start below still lets the text
     itself read in its own natural direction inside that fixed box. */
  justify-content:left;
}
.hero-redesign-content{
  padding:72px 0;display:flex;flex-direction:column;gap:18px;
  max-width:680px;
}
/* Logged-in "compact welcome" variant -- toggled by
   hideAnonymousOnboardingForAuthUser()/showAnonymousOnboarding()
   (js/app.js). Headline/subtext/CTA font sizes are left as-is (still
   readable, still on-brand); only the band's own height and vertical
   padding shrink, since there's no eyebrow/trust-row/secondary-CTA left
   to fill the taller marketing version's space. */
.hero-redesign.hero-compact{min-height:clamp(340px,27vw,516px)}
.hero-redesign.hero-compact .hero-redesign-content{padding:40px 0}
/* 2026-11-18: superseding the 320px/22% pairing below it -- a real-
   browser pass (puppeteer screenshots of the actual compact hero, not
   just the crop math) across all 6 required widths (1920/1440/1024/
   768/390/375) found the truck/buses' fronts (grille, headlights, the
   top of the hood) were cut off at 1920 and 1440 specifically: the
   previous fixed 320px height is only ~34% of the 1600x901 source's
   height at 1920 (vs ~62-69% at 1024/768, which already looked fine --
   this band is always width-constrained by `cover` at every width in
   this breakpoint, so a WIDER viewport scales the same photo up MORE,
   shrinking the fraction of it a fixed-px height can show). A flat
   min-height increase would have fixed 1920 by over-growing 1024/768,
   which didn't need it; clamp() instead keeps the 340px floor (barely
   above the old 320px, since 1024/768's own content-driven height
   already covers that range) and only grows toward the 516px ceiling
   as the viewport widens past ~1260px, reaching it at 1920 -- verified
   via getBoundingClientRect() at each width, not assumed from the
   clamp() formula alone. 516px is a deliberate ceiling, not a rounding
   accident: it keeps this band visibly shorter than the anonymous
   hero's own 580px floor at every tested width (confirmed), so a
   returning user still isn't made to scroll past something the size of
   the full marketing hero. */
.hero-redesign.hero-compact{background-position:0% 0%, 50% 36%, 0% 0%}
/* Y moved from 22% to 36% in the same pass, together with the height
   change above -- the two were tuned jointly (not independently) since
   the visible crop window depends on both. 22% kept a wide margin above
   the cab roof but ended the crop at the TOP of the grille, before any
   headlight or hood was visible on any of the three vehicles, which is
   what actually read as "cut off" in the reported screenshots, not
   merely "wheels missing" (wheels staying out of frame was always an
   accepted tradeoff, confirmed still true here -- this is about
   reaching the grille/headlights, not the wheels). 36% gives up some of
   that top margin (still clears the cab roof by a comfortable margin at
   every width checked) in exchange for reaching through the full
   grille/headlight line and into the top of the hood -- re-verified
   with correctly-origin-clipped screenshots (this element's own
   getBoundingClientRect, not the page's top) at all 6 widths, including
   1024/768 which already looked acceptable before this pass and were
   re-checked to confirm the shared Y value still reads well there too,
   not just at the two widths that motivated the change. Does not touch
   the anonymous hero's own `center 50%` (confirmed unaffected, pixel-
   identical before/after) or the mobile breakpoint's min-height rule
   just below (mobile's `cover` is always height-constrained there, so
   the full photo height is already visible regardless of this value --
   re-confirmed via screenshot at 390/375, not just assumed from the
   math). */
.hero-eyebrow{
  color:var(--gold);font-weight:800;font-size:13px;letter-spacing:1.5px;
  text-transform:uppercase;display:flex;align-items:center;gap:8px;
}
.hero-eyebrow::before{content:"";width:22px;height:3px;background:var(--red);display:inline-block;border-radius:2px}
.hero-redesign .entry-hero{margin:0;text-align:start;max-width:none}
.hero-redesign .entry-hero h1{
  font-family:var(--font-display);text-transform:uppercase;
  font-size:clamp(40px,6.5vw,72px);line-height:1.03;margin:0 0 12px;
  letter-spacing:.2px;font-weight:800;color:#fff;
}
.hero-redesign .entry-hero p{font-size:17px;line-height:1.55;color:#cfe0f5;margin:0;max-width:50ch}
.hero-cta-row{display:flex;gap:12px;flex-wrap:wrap;margin-top:4px}
.btn-outline-light{
  display:inline-flex;align-items:center;justify-content:center;
  border:1.5px solid rgba(255,255,255,.6);color:#fff;background:transparent;
  padding:13px 22px;border-radius:10px;font-weight:700;font-size:14.5px;
  text-decoration:none;cursor:pointer;
}
.btn-outline-light:hover{background:rgba(255,255,255,.1)}
/* Primary marketing CTAs use the approved red style, scoped to the
   three full-bleed marketing sections specifically -- the functional
   purchase/trial buttons elsewhere (the pricing-card grid, "Unlock All
   8", the Start Practicing card's own trial button) stay the existing
   green, unchanged, since those are the actual purchase/trial
   mechanism, not marketing copy. All three share the one .entry-cta
   class, so this is scoped by section, not by a different class. */
.hero-redesign .btn.entry-cta,
.career-content .btn.entry-cta,
.closing-cta .btn.entry-cta{
  background:var(--red);color:#fff;padding:14px 26px;font-size:15px;
}
.hero-redesign .btn.entry-cta:hover,
.career-content .btn.entry-cta:hover,
.closing-cta .btn.entry-cta:hover{background:#c22e22}
.hero-trust-row{display:flex;flex-wrap:wrap;gap:12px 22px;margin-top:8px}
.hero-trust-pill{
  display:flex;align-items:center;gap:9px;font-size:13.5px;color:#eaf1fb;font-weight:600;
}
.hero-trust-pill::before{
  content:"✓";flex-shrink:0;width:22px;height:22px;border-radius:50%;
  background:var(--red);color:#fff;font-size:12px;font-weight:800;
  display:flex;align-items:center;justify-content:center;
}

.section-eyebrow{
  color:var(--red);font-weight:800;font-size:12px;letter-spacing:1.5px;
  text-transform:uppercase;display:flex;align-items:center;gap:8px;margin-bottom:8px;
}
.section-eyebrow::before{content:"";width:20px;height:3px;background:var(--red);display:inline-block;border-radius:2px}
.section-eyebrow-light{color:var(--gold)}
.section-eyebrow-light::before{background:var(--gold)}
/* .section-eyebrow is display:flex, a block-level container -- its
   parent's text-align:center (how-it-works, resources-section) only
   centers inline content/text, not a block-level flex box, so without
   this the eyebrow sat flush left while its own H2 right below it
   (ordinary centered text) correctly centered. Scoped to the two
   sections that are actually text-align:center; career's eyebrow stays
   left-pinned by the flex default, matching its own left-aligned
   content column. */
.how-it-works .section-eyebrow,
.resources-section .section-eyebrow{justify-content:center}

/* Phase 3B: #entryPriceGridSection (index.html) is now a sibling of
   #startPracticingCard instead of nested inside it, so it's no longer
   constrained by .entry-card's 980px max-width + 26px padding -- it
   naturally gets the full ~1180px .entry-wrap gives it, which is
   "approximately 1200-1280px" within a few percent and, deliberately,
   exactly matches the width everything else on the page (nav, hero,
   footer) already aligns to, rather than introducing a third width
   value. Just needs more breathing room of its own now that the cards
   inside it are much bigger. */
.entry-pricing{padding:28px}
.entry-price-grid{gap:18px}
@media(max-width:760px){
  /* styles.css's own @media(max-width:760px) block already forces
     .entry-price-card{min-height:auto !important} so cards can shrink
     to fit their text content on narrow screens -- correct for the old
     flat-color cards, but it leaves a real photo cropped down to almost
     nothing. Same !important, later in source order (this file loads
     after styles.css), so this wins without touching the shared rule. */
  .entry-price-card{min-height:170px !important}
}

/* Phase 3C: Welcome Back / progress dashboard (#returningUserDashboard)
   and its row list (#dashboardList .cat). Scoped by ID throughout --
   .cat/.cat-arrow are SHARED with #categoryList (the separate exam/
   practice interface's own category rail), which this phase explicitly
   must not touch, so every rule below is #dashboardList-prefixed rather
   than editing the shared base classes in styles.css. */
#returningUserDashboard{max-width:1180px}
#dashboardHeading{color:var(--navy);font-size:27px;font-weight:800;margin:0}
#dashboardSub{color:var(--muted);font-size:14.5px;margin-top:4px}
#dashboardList{gap:12px}
@media(min-width:761px){
  #dashboardList{grid-template-columns:repeat(2,1fr)}
}
#dashboardList .cat{
  border-radius:14px;padding:16px 18px;border-color:var(--line);
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
#dashboardList .cat:hover{
  transform:translateY(-2px);box-shadow:0 10px 22px rgba(7,19,33,.12);
  border-color:#b9c8dc;background:#fff;
}
#dashboardList .cat:focus-visible{outline:3px solid var(--red);outline-offset:2px}
#dashboardList .cat-main{flex:1;min-width:0}
#dashboardList .cat .name{color:var(--navy);font-size:15px}
#dashboardList .cat .qty{margin-top:2px}
#dashboardList .cat-arrow{color:var(--muted);font-size:20px;flex-shrink:0;margin-left:8px}
/* The single most actionable row (an in-progress exam, trial or owned --
   the same condition dashboardRowPriority() (js/app.js) already uses to
   rank these first) gets a left accent + tinted background so "pick up
   where you left off" has an obvious visual answer, not just the 1st
   position in a list of otherwise-identical rows. */
#dashboardList .cat.in-progress{
  border-left:4px solid var(--red);background:#fff8f7;
}
#dashboardList .cat.in-progress:hover{background:#fff1f0}
/* Real attempted/total (or attempted/trialCap) ratio, computed in
   dashboardRowHtml() -- not an invented or estimated value. Only rendered
   for in-progress rows; a 0% or 100% bar would be redundant with the
   status text those rows already show ("Start Studying"/"✓ Exam
   Completed"). */
.cat-progress{
  margin-top:8px;height:5px;border-radius:3px;background:var(--line);overflow:hidden;
}
.cat-progress-fill{height:100%;background:var(--red);border-radius:3px}

/* How It Works */
.how-it-works{text-align:center;margin:36px 0}
.how-it-works h2{
  font-family:var(--font-display);text-transform:uppercase;font-weight:800;
  font-size:clamp(26px,3.6vw,38px);letter-spacing:.2px;margin:4px 0 24px;color:var(--navy);
}
.how-it-works-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;text-align:left}
.how-step{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:22px}
.how-step-num{
  width:34px;height:34px;border-radius:50%;background:var(--navy);color:#fff;
  display:flex;align-items:center;justify-content:center;font-weight:800;margin-bottom:12px;
}
.how-step h3{margin:0 0 6px;font-size:16.5px;color:var(--navy)}
.how-step p{margin:0;font-size:14px;color:var(--muted);line-height:1.5}

/* Category-cards eyebrow lives inside the existing .entry-pricing-head;
   no new rule needed beyond .section-eyebrow above. Photographic skin on
   the real, functional .entry-price-card grid -- keyed by the SAME
   data-name attribute renderEntryPricing() (js/app.js) already writes on
   every card, so no JS change was needed to add either this phase's
   photos or Phase 1's gradient placeholders they replace.

   Phase 4B (2026-10-29): each of the 8 categories now has its own
   dedicated photo (previously 4 photos were reused across 2 categories
   each -- see git history/ROADMAP.md for that provisional mapping).
   Source images were square (1254x1254); cropped to 4:3 (top=250px,
   height=940px -- verified by inspection to keep every subject's full
   body/signage/placard in frame, not just assumed) and resized to
   700x525 (matching this slot's pre-existing established size, so no
   upscaling) before WebP export. HazMat vs Tank Vehicles were
   distinguished by the supplied photos themselves: the HazMat photo
   carries an explicit, legible placard (UN1203, flammable liquid class
   3); the Tank Vehicles photo is the same style of tanker with a blank/
   unmarked placard holder, i.e. a tank hauling a non-hazardous load --
   a real distinction in the source material, not an arbitrary split. */
.entry-price-card{
  position:relative;overflow:hidden;color:#fff;border:none;
  border-radius:16px;min-height:252px;padding:20px;
  transition:transform .15s ease, box-shadow .15s ease;
}
.entry-price-card:hover{transform:translateY(-4px);box-shadow:0 16px 34px rgba(7,19,33,.4)}
.entry-price-card::before{
  content:"";position:absolute;inset:0;z-index:0;
  /* Content is stacked top-to-bottom (name, price, cart badge, learn-more
     link all required -- see the brief's own "preserve every data point"
     instruction, so unlike the mockup's simpler bottom-anchored
     name+subtitle this can't be a pure bottom scrim) so the gradient
     darkens fairly evenly rather than just at the bottom, keeping every
     stacked line readable while the photo stays clearly identifiable. */
  background:
    linear-gradient(180deg,rgba(7,19,33,.5) 0%,rgba(7,19,33,.72) 55%,rgba(7,19,33,.9) 100%),
    var(--card-photo) center/cover no-repeat,
    linear-gradient(160deg,var(--navy) 0%,#132f4d 60%,#0a1726 100%);
}
.entry-price-card>*{position:relative;z-index:2}
.entry-price-card .ep-name{color:#fff;font-weight:800;font-size:16px}
.entry-price-card .ep-meta{color:#cfe0f5;font-size:12.5px}
.entry-price-card .ep-price{color:var(--gold);font-weight:800;font-size:27px;margin-top:12px}
.entry-price-card .ep-learn-more{color:#bcd4f5;display:block;margin-top:8px;font-size:12px;font-weight:700}
.entry-price-card .ep-card-link:hover .ep-learn-more{color:#fff}
.entry-price-card .ep-card-link:focus-visible{outline:3px solid var(--red);outline-offset:2px}
.entry-price-card.selected{outline:3px solid var(--red);outline-offset:-3px}
/* .in-cart (styles.css) is a light-green card background + border,
   designed for the old flat card -- invisible here since .entry-price
   -card's own background/border are already overridden above (the
   ::before photo layer paints over the real element's background
   regardless), so it needs its own outline here for the same reason
   .selected already has one. */
.entry-price-card.in-cart{outline:3px solid #34d366;outline-offset:-3px}
/* Phase 4C (2026-11-18): dedicated "Add to Cart" button, replacing the
   old plain-text .ep-cart-badge -- needs real contrast/borders of its
   own against the dark photo (unlike the flat styles.css card, nothing
   here can rely on a light page background showing through). */
.entry-price-card .ep-cart-btn{
  margin-top:12px;
  width:100%;
  border:1.5px solid rgba(255,255,255,.55);
  border-radius:10px;
  background:rgba(7,19,33,.35);
  color:#fff;
  font:inherit;
  font-size:13px;
  font-weight:800;
  letter-spacing:.02em;
  padding:10px 12px;
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease, color .15s ease;
}
.entry-price-card .ep-cart-btn:hover{background:rgba(7,19,33,.55);border-color:#fff}
.entry-price-card .ep-cart-btn:focus-visible{outline:3px solid var(--red);outline-offset:3px}
.entry-price-card .ep-cart-btn.added{background:#1f9d55;border-color:#34d366;color:#fff}
.entry-price-card .ep-cart-btn.added:hover{background:#17803f}
.entry-price-card[data-name="General Knowledge"]{--card-photo:url("../images/card-general-knowledge.webp")}
.entry-price-card[data-name="Air Brakes"]{--card-photo:url("../images/card-air-brakes.webp")}
.entry-price-card[data-name="Combination Vehicles"]{--card-photo:url("../images/card-combination-vehicles.webp")}
.entry-price-card[data-name="Passenger"]{--card-photo:url("../images/card-passenger.webp")}
.entry-price-card[data-name="HazMat"]{--card-photo:url("../images/card-hazmat.webp")}
.entry-price-card[data-name="Tank Vehicles"]{--card-photo:url("../images/card-tank-vehicles.webp")}
.entry-price-card[data-name="Doubles / Triples"]{--card-photo:url("../images/card-doubles-triples.webp")}
.entry-price-card[data-name="School Bus"]{--card-photo:url("../images/card-school-bus.webp")}

/* Career section -- full-bleed, same margin-shorthand caution as the
   hero (longhand top/bottom only, never a margin: shorthand here). */
.career-section{
  position:relative;
  background:
    linear-gradient(100deg,rgba(7,19,33,.95) 0%,rgba(7,19,33,.85) 38%,rgba(7,19,33,.35) 68%,rgba(7,19,33,.12) 100%),
    url("../images/homepage-career-driver-v3.webp") center 45% / cover no-repeat,
    var(--navy);
  color:#fff;min-height:440px;display:flex;align-items:center;
  margin-top:0;margin-bottom:0;
  justify-content:left; /* physical, not flex-start -- see .hero-redesign's comment above */
}
.career-content{padding:60px 0;display:flex;flex-direction:column;gap:16px;justify-content:center;max-width:580px}
.career-content h2{
  font-family:var(--font-display);text-transform:uppercase;font-weight:800;
  font-size:clamp(32px,5vw,54px);line-height:1.05;margin:0;color:#fff;letter-spacing:.2px;
}
.career-content p{color:#cfe0f5;font-size:16px;line-height:1.55;margin:0;max-width:52ch}
.career-pills{display:flex;flex-wrap:wrap;gap:10px;margin-top:6px}
.career-pill{
  font-size:12.5px;font-weight:700;color:var(--navy);background:#fff;
  border-radius:999px;padding:7px 14px;
}

/* Resources section -- full-bleed light band (not photographic, just a
   solid off-white fill distinct from the page's own --bg), giving the
   page the mockup's alternating dark-photo/light-band rhythm one more
   beat between the career and closing-cta photo sections. Longhand
   margin only, same reasoning as the hero/career comments above. */
.resources-section{
  text-align:center;background:#eef1f6;
  margin-top:0;margin-bottom:0;padding-top:56px;padding-bottom:56px;
}
.resources-section h2{
  font-family:var(--font-display);text-transform:uppercase;font-weight:800;
  font-size:clamp(28px,4vw,42px);line-height:1.08;margin:4px 0 32px;
  letter-spacing:.2px;color:var(--navy);
}
.resources-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.resource-card{
  background:var(--card);border:1px solid var(--line);border-radius:14px;
  padding:22px 16px;text-align:center;
}
.resource-icon{
  font-size:24px;width:52px;height:52px;border-radius:50%;
  background:rgba(227,59,46,.08);display:flex;align-items:center;justify-content:center;
  margin:0 auto 12px;
}
.resource-card h4{margin:0 0 6px;font-size:15px;color:var(--navy)}
.resource-card p{margin:0;font-size:12.5px;color:var(--muted);line-height:1.45}

/* Closing CTA band -- full-bleed. padding/margin are longhand only,
   same reasoning as the hero/career comments above (this one WAS using
   both shorthands and would have silently clobbered .full-bleed's
   gutter padding and breakout margin). */
.closing-cta{
  position:relative;color:#fff;
  padding-top:64px;padding-bottom:64px;min-height:280px;
  margin-top:0;margin-bottom:0;
  display:flex;align-items:center;justify-content:right; /* physical, not flex-end -- see .hero-redesign's comment above */
  background:
    linear-gradient(100deg,rgba(7,19,33,.15) 0%,rgba(7,19,33,.3) 55%,rgba(7,19,33,.6) 100%),
    url("../images/closing-cta-mountain-highway.webp") center 42% / cover no-repeat,
    var(--navy);
}
.closing-cta-card{
  background:rgba(7,19,33,.82);border:1px solid rgba(255,255,255,.12);
  border-radius:14px;padding:30px 34px;max-width:420px;text-align:start;
  backdrop-filter:blur(2px);
}
.closing-cta h2{
  font-family:var(--font-display);text-transform:uppercase;font-weight:800;
  margin:0 0 10px;font-size:clamp(24px,3.2vw,34px);letter-spacing:.2px;
}
.closing-cta p{margin:0 0 20px;color:#cfe0f5;font-size:15px;line-height:1.5}

/* Below 900px there's no longer room for the photo's right-hand "clear"
   area the desktop gradients leave for the vehicles/driver to show
   through -- text wraps to fill the full card width instead, so the
   scrim needs to go uniformly darker rather than left-to-right, or
   wrapped lines on the right would sit directly on bright sky/photo.
   Every padding/margin override below is longhand for the same reason
   documented on the base rules -- a shorthand here would reset
   .full-bleed's gutter padding or breakout margin back to 0. */
@media(max-width:900px){
  .hero-redesign{
    min-height:440px;
    /* Kept in sync with the desktop rule's 50% above even though it has
       no visible effect here (this breakpoint's `cover` is already
       height-constrained with ~0 vertical slack, confirmed via
       screenshot) -- avoids the two rules silently drifting apart for
       no visual reason. */
    background:
      linear-gradient(180deg,rgba(7,19,33,.55) 0%,rgba(7,19,33,.9) 100%),
      url("../images/homepage-hero.webp") center 50% / cover no-repeat,
      linear-gradient(135deg,var(--navy) 0%,var(--navy2) 70%);
  }
  .hero-redesign.hero-compact{min-height:260px}
  .hero-redesign-content{padding-top:40px;padding-bottom:40px;max-width:none}
  .hero-redesign.hero-compact .hero-redesign-content{padding-top:28px;padding-bottom:28px}
  .career-section{
    min-height:380px;
    /* Phase 4B/4B-trial history: this rule went through homepage-career
       -driver.webp (75% position), then -v2.webp (40% 45%, cover), each
       re-tuned for that photo's own driver position rather than reusing
       the prior value blindly.
       2026-11-10: swapped to homepage-career-driver-v3.webp (a
       deliberately wider-angle re-shoot, same 1672x941 frame, supplied
       after a real-browser report that v2 cropped the face) and the
       positioning approach itself changed, not just the percentages.
       Isolated crop-math testing (replicating the `cover` algorithm in
       Python against the raw photo) suggested 40% 45% still worked, but
       rendering the ACTUAL composited page showed the driver's face
       landing squarely behind the paragraph text, not beside it --
       because at this breakpoint `.career-content` has max-width:none
       (see this media query's own top comment), so the text block spans
       the section's *full* width/height, not just a left column, and
       plain `cover` leaves ~0 vertical slack once the section's real
       (content-driven) height is used instead of the min-height alone.
       Fix: `background-size:auto,auto 130%,auto` on just the photo layer
       (the other two layers keep their own natural sizing) trades a
       deliberately small amount of extra zoom for real vertical crop
       freedom, then `50% 100%` was empirically chosen -- by rendering
       the actual live page, not assumed from the photo alone -- as the
       position placing the driver's full face in the one clear strip
       (upper-right, past the short eyebrow line, above/beside "FUTURE")
       at 375/390/768px alike. Hands/wheel are not reliably visible at
       this breakpoint as a result -- an accepted tradeoff per explicit
       instruction to prioritize face visibility and text readability
       over full composition where the two can't both fit. */
    background:
      linear-gradient(180deg,rgba(7,19,33,.55) 0%,rgba(7,19,33,.92) 100%),
      url("../images/homepage-career-driver-v3.webp") 50% 100% / auto 130% no-repeat,
      var(--navy);
  }
  .career-content{padding-top:40px;padding-bottom:40px;max-width:none}
  .closing-cta{justify-content:center;padding-top:40px;padding-bottom:40px}
  .closing-cta-card{max-width:100%}
  .how-it-works-steps{grid-template-columns:1fr}
  .resources-grid{grid-template-columns:repeat(2,1fr)}
}

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

/* Phase 4A (2026-10-23): mobile-first visual QA pass. Found by actually
   looking at rendered screenshots, not just checking for horizontal
   overflow -- these are all cases where nothing overflowed the page but
   content was still cramped, clipped, or hard to use on a real phone. */
@media(max-width:400px){
  /* The Exam dropdown's option text ("Air Brakes — 87 questions",
     entryExamOptionLabel() in js/app.js) was being clipped mid-word
     ("...87 qu") by styles.css's own 42px-right/13px-left select
     padding -- sized generously, more than a native dropdown arrow
     actually needs. font-size stays untouched at 16px (styles.css,
     !important) deliberately -- that's the iOS Safari auto-zoom-on
     -focus threshold, not negotiable. Reclaiming width from padding
     instead, with the same !important + later-source-order technique
     used throughout this file to win over styles.css's own
     !important rules without editing them (State/Language text is
     already short enough that tighter padding only helps, never hurts,
     so scoping this to just #entryExam wasn't necessary). */
  .entry-step select{padding:11px 30px 11px 10px !important}
  .entry-step{padding:13px}
}

@media(max-width:760px){
  /* Nav touch targets measured at just 23-28px tall (getBoundingClientRect,
     not guessed) -- styles.css's own @media(max-width:760px) block
     (its own comment: "shrink Log In/Sign Up so they read as secondary
     header actions instead of a stacked card") was tuned for the
     pre-Phase-3A header, before it became a full-bleed navy band with
     room to spare. Restoring more vertical padding here (same
     !important + later-source-order technique as elsewhere in this
     file) without reverting the smaller font-size, which still keeps
     the buttons visually compact -- just tall enough to comfortably
     tap. */
  .site-nav .auth-link{padding:10px 14px !important}
}

/* Phase 4A-2: real-device testing found the logged-in mobile header
   spanning 3 full rows (branding / account controls / Home · Practice
   Tests) at 214px tall before any page content -- confirmed via
   getBoundingClientRect(). The nav-links row itself (and the rules that
   once sized/spaced it below 600px) is gone as of 2026-11-15's nav
   simplification; the remaining rules here are the other two rows'
   sizing, still load-bearing. */
@media(max-width:600px){
  .site-nav{padding-top:12px;padding-bottom:12px;gap:10px}
  .site-nav .entry-brand .logo{width:42px;height:42px}
  .site-nav .entry-brand h2{font-size:22px}
  .site-nav .entry-brand p{display:none}

  /* Real-device testing: the anonymous homepage "looks clean... but
     requires substantial scrolling." Trimming vertical rhythm around
     How It Works / Start Practicing / Resources specifically, per
     that feedback -- content, text size, and touch targets all
     untouched, only the empty space between/around them. */
  .hero-redesign{margin-bottom:32px}
  .how-it-works{margin-top:24px;margin-bottom:24px}
  .entry-pricing{padding:20px}
  /* .resources-section had no mobile-specific padding override at all
     before this -- still using the desktop value (56px top+bottom)
     on every phone, the single largest unnecessary gap found. */
  .resources-section{padding-top:32px;padding-bottom:32px}
}
