/* MYTECHLEARN v6 — global refinements. Loaded LAST on every page.
   Restores the brand palette, fixes mobile overflow, improves type scale,
   contrast, tap targets, focus states and rendering performance. */

/* 1. Brand tokens (override v5.1 drift) */
:root{
  --navy:#10243A;--navy-2:#18334F;--navy-3:#244766;
  --cobalt:#1769AA;--cobalt-2:#12558D;--tech:#168BDB;
  --amber:#F28C28;--amber-2:#D97716;
  --bg:#F4F7FA;--surface:#FFFFFF;--surface-alt:#F4F7FA;
  --ink:#243447;--ink-2:#334155;
  --muted:#5A6A7E;            /* brand secondary #64748B darkened one step: 4.4:1 -> 5.1:1 on #F4F7FA */
  --muted-alt:#566478;
  --line:#E2E8F0;--line-2:#CBD5E1;
  --v51-navy:#10243A;--v51-navy2:#18334F;--v51-navy3:#244766;
  --v51-blue:#1769AA;--v51-blue2:#12558D;--v51-amber:#F28C28;
  --v51-paper:#F4F7FA;--v51-ink:#243447;--v51-muted:#5A6A7E;
  --font:'Inter','Inter Fallback',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
  --fs-body:1rem;
}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:110px}
body{font-family:var(--font);font-size:var(--fs-body);line-height:1.7;color:var(--ink);background:var(--bg);
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;overflow-x:clip}
.mtl-hero,.mtl-home-hero{background:radial-gradient(ellipse at 82% 18%,rgba(22,139,219,.32),transparent 36%),
  radial-gradient(ellipse at 8% 100%,rgba(242,140,40,.12),transparent 32%),
  linear-gradient(122deg,#0C1B2C 0%,#10243A 56%,#18334F 100%)}
.mtl-btn-primary,.btn--primary{background:var(--amber)!important;border-color:var(--amber)!important;color:#10243A!important}
.mtl-btn-primary:hover,.btn--primary:hover{background:#F9A04A!important;border-color:#F9A04A!important;color:#10243A!important}
.mtl-section-alt small,.mtl-section-alt .muted,.mtl-card small{color:var(--muted-alt)}

/* 2. Type scale (fluid, readable) */
h1{font-size:clamp(2rem,1.2rem + 3.2vw,3.25rem);line-height:1.12;letter-spacing:-.02em}
h2{font-size:clamp(1.55rem,1.1rem + 1.8vw,2.3rem);line-height:1.2;letter-spacing:-.015em}
h3{font-size:clamp(1.15rem,1rem + .6vw,1.4rem);line-height:1.3}
h1,h2,h3{text-wrap:balance}
p,li,figcaption{text-wrap:pretty}
.mtl-article p,.mtl-article li{max-width:75ch}
p,li,td,th,a,h1,h2,h3,h4{overflow-wrap:anywhere;word-break:normal}

/* 3. Mobile overflow + buttons (root cause of 484px homepage width) */
.mtl-btn,.btn{white-space:normal!important;text-align:center;max-width:100%;line-height:1.3;
  padding-block:.7em;display:inline-flex;align-items:center;justify-content:center}
img,svg,video,canvas,iframe{max-width:100%}
img{height:auto}
pre,code{max-width:100%;overflow-x:auto}
.mtl-table-wrap,.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}

/* 4. Tap targets & focus (WCAG 2.2: 24px min, 44px comfortable) */
.mtl-nav a,.mtl-nav-trigger,.mtl-footer a{min-height:44px;display:inline-flex;align-items:center}
.mtl-footer li{margin-block:2px}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{
  outline:3px solid #F28C28;outline-offset:3px;border-radius:6px}
input,select,textarea{font-size:16px;min-height:46px} /* stops iOS zoom-on-focus */
label{display:inline-block;margin-bottom:4px;font-weight:600;color:var(--ink)}
::placeholder{color:#64748B;opacity:1}

/* 5. Links in body copy: visible without relying on colour alone */
.mtl-article a:not(.mtl-btn):not(.btn),main p a,main li a{color:#12558D;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.mtl-article a:not(.mtl-btn):not(.btn):hover,main p a:hover,main li a:hover{color:#0B3E69;text-decoration-thickness:2px}
.mtl-dark a:not(.mtl-btn):not(.btn),.mtl-hero a:not(.mtl-btn):not(.btn){color:#FFD29B}

/* 6. Performance: skip rendering work for below-the-fold blocks */
.mtl-footer{content-visibility:auto;contain-intrinsic-size:auto 640px}
main>.mtl-section:nth-of-type(n+3){content-visibility:auto;contain-intrinsic-size:auto 720px}

/* 7. Mobile refinements */
@media(max-width:680px){
  :root{--fs-body:1rem}
  body{font-size:16px;line-height:1.68}
  .mtl-main-inner,.mtl-wrap{width:calc(100% - 32px)}
  .mtl-section{padding-block:44px}
  h1{font-size:clamp(1.85rem,8.2vw,2.5rem)}
  .mtl-grid-4,.mtl-grid-3,.mtl-grid-2{grid-template-columns:1fr}
  .mtl-center-cta .mtl-btn,.mtl-section .mtl-btn{width:100%}
  .mtl-bottom-dock a{min-height:40px;display:inline-flex;align-items:center}
}
@media(min-width:1600px){.mtl-wrap{max-width:1360px}}

/* 8. Motion, print, forced colours */
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
@media(prefers-contrast:more){:root{--muted:#475569;--line:#94A3B8}}
@media print{.mtl-topbar,.mtl-header,.mtl-bottom-dock,.mtl-hero-cta,form{display:none!important}body{background:#fff;color:#000;font-size:11pt}a{color:#000;text-decoration:underline}}

.mtl-intl-note{margin-top:14px;padding:12px 16px;border-left:4px solid #F28C28;background:rgba(255,255,255,.1);border-radius:8px;max-width:75ch}

/* 9. Contrast fixes found by automated audit */
.mtl-section:not(.mtl-dark) .mtl-eyebrow,.mtl-section-heading .mtl-eyebrow{color:#9A4F00;background:#FFF3E3;border-color:#F5C58A}
.mtl-hero .mtl-eyebrow,.mtl-dark .mtl-eyebrow{color:#F8BD73;background:rgba(255,255,255,.09);border-color:rgba(255,255,255,.18)}
main figcaption,main figure span,main .visual-kicker{color:var(--muted-alt)!important}
.mtl-section:not(.mtl-dark) .mtl-section-heading p{color:var(--muted-alt)}
.mtl-dark .mtl-section-heading p,.mtl-lifecycle .mtl-section-heading p{color:#D5E1EC}
.mtl-breadcrumb li,.mtl-breadcrumb a{color:#475569}
.mtl-breadcrumb li:last-child,.mtl-breadcrumb [aria-current]{color:#243447;font-weight:600}
.ee-links a{color:#145A91!important}
.mtl-footer a{color:#D9E5EF}.mtl-footer a:hover{color:#fff}
.skip-link{background:#10243A;color:#fff}
th a,thead a{color:#FFD29B!important;text-decoration:underline}
.prose a:not(.btn):not(.mtl-btn),.section--surface .prose p a{color:#12558D}
.mtl-method-grid article>b,.mtl-method-grid b{color:#A34A00}
a[style*="var(--accent)"]{color:#9A4A06!important} /* 4.18:1 -> 5.9:1 on light grey */

/* 10. Homepage hero: primary CTAs above the fold (visual order only; DOM/SEO unchanged) */
.mtl-home-copy{display:flex;flex-direction:column;align-items:flex-start}
.mtl-home-copy>.mtl-eyebrow{order:0}.mtl-home-copy>h1{order:1}.mtl-home-copy>.mtl-hero-lead{order:2}
.mtl-home-copy>.mtl-hero-cta{order:3;margin-top:22px}.mtl-home-copy>.mtl-positioning-note{order:4;margin-top:26px}
.mtl-home-copy>.mtl-hero-domains{order:5}
@media(max-width:680px){.mtl-home-copy{align-items:stretch}}

/* 11. Dark surfaces: guarantee light, readable text (fixes dark-on-dark cards/captions) */
.page-hero :is(h1,h2,h3,h4,h5,strong){color:#fff}
.page-hero :is(p,li,figcaption,figcaption span,.visual-kicker,small,dd,dt){color:#D5E1EC}
.page-hero .mono-tag,.page-hero .eyebrow{color:#FDBA74}
.spec-card :is(h2,h3,h4,strong){color:#fff}
.spec-card :is(p,li,span:not(.check):not(.spec-rev)){color:#D5E1EC}
.mtl-dark :is(h1,h2,h3,h4,strong){color:#fff}
.mtl-dark :is(p,li,small,figcaption,span){color:#D5E1EC}
.mtl-dark .mtl-eyebrow{color:#F8BD73}
.lead-magnet__box :is(h2,h3){color:#fff}
.lead-magnet__box>div>p,.lead-magnet__box>div>ul li{color:#D5E1EC}

/* 12. Specificity wins for dark surfaces (override component rules) */
.page-hero :is(h1,h2,h3,h4,h5,strong),.spec-card :is(h2,h3,h4,strong),.mtl-dark :is(h1,h2,h3,h4,strong){color:#fff!important}
.page-hero figcaption,.page-hero figcaption span,.page-hero figure span,.page-hero .visual-kicker,.mtl-dark figcaption,.mtl-dark figure span{color:#D5E1EC!important}
.lead-interview-link a{color:#FFD29B!important}

/* 13. Remaining findings from full-site audit */
.eyebrow,.kicker,span.kicker,p.eyebrow{color:#9A4F00}
.page-hero .eyebrow,.page-hero .kicker,.mtl-dark .eyebrow,.mtl-dark .kicker,.spec-card .eyebrow{color:#FDBA74!important}
.on-page-label,.on-page .on-page-label{color:#475569!important}
.btn--ghost{color:#12558D!important;border:1px solid #12558D;background:transparent}
.page-hero .btn--ghost,.mtl-dark .btn--ghost,.mtl-hero .btn--ghost,.lead-magnet__box .btn--ghost{color:#fff!important;border-color:rgba(255,255,255,.6)}
.page-hero .engineering-figure :is(figcaption,figcaption span,span,p){color:#475569!important}
.page-hero .engineering-figure :is(h2,h3,h4,strong){color:#10243A!important}

/* 14. Specificity corrections (v5.1 !important rules forced blue labels onto dark bands) */
.page-hero .on-page-label,.page-hero nav.on-page .on-page-label{color:#FFC17B!important}
.cta-band .kicker,.cta-band .ind-k,.ind-cta .kicker,section.hero .eyebrow,.hero .eyebrow{color:#FFC17B!important}
.mtl-article .discuss-card .btn--ghost{color:#10243A!important;border-color:#8CA3BA!important}

/* v6.4 vehicle engineering map */
.mtl-eng-map{background:#0b1626;border:1px solid rgba(120,196,245,.25);border-radius:16px;padding:14px;max-width:none}
.mtl-map-head{display:flex;justify-content:space-between;font:700 .68rem/1 var(--mono,monospace);letter-spacing:.12em;color:#f29a38;margin-bottom:10px}.mtl-map-head em{font-style:normal;color:#8fa4b8}
.mtl-map-photo{margin:0;position:relative}.mtl-eng-map .mtl-map-photo img{width:100%;height:auto;aspect-ratio:1248/714;object-fit:cover;border-radius:10px;border:1px solid rgba(255,255,255,.15);box-shadow:none;max-height:none;background:#0d1e31}
.mtl-map-photo figcaption{font:.7rem/1.4 var(--mono,monospace);color:#cfe3f3;background:rgba(7,18,30,.92);border:1px solid rgba(255,255,255,.14);border-radius:6px;padding:8px 10px;margin-top:8px}
.mtl-map-svg{display:block;width:100%;height:auto;margin:14px 0 6px}
.mtl-hs{cursor:pointer}.mtl-hs-dot{fill:#0c1a2b;stroke:#f29a38;stroke-width:1.8;transition:fill .15s}.mtl-hs-ring{fill:none;stroke:#f29a38;opacity:.35;animation:mtlPulse 2.4s infinite;transform-box:fill-box;transform-origin:center}
.mtl-hs text{fill:#f7b35f;font:700 8px var(--mono,monospace);pointer-events:none}.mtl-hs:hover .mtl-hs-dot,.mtl-hs:focus .mtl-hs-dot,.mtl-hs.is-on .mtl-hs-dot{fill:#f29a38}.mtl-hs:hover text,.mtl-hs:focus text,.mtl-hs.is-on text{fill:#0c1a2b}
@keyframes mtlPulse{0%{transform:scale(.8);opacity:.6}100%{transform:scale(1.5);opacity:0}}
@media(prefers-reduced-motion:reduce){.mtl-hs-ring{animation:none}}
.mtl-map-list{list-style:none;margin:8px 0 0;padding:12px 0 0;border-top:1px solid rgba(255,255,255,.12);display:grid;grid-template-columns:1fr 1fr;gap:6px 14px}
.mtl-map-list a{display:block;color:#6fc3f5;font-size:.82rem;font-weight:600;padding:5px 2px}.mtl-map-list a b{font:700 .68rem var(--mono,monospace);color:#f29a38;margin-right:8px}.mtl-map-list a:hover,.mtl-map-list a.is-on{color:#fff}
.mtl-arch-section{padding:clamp(44px,6vw,80px) 0;background:#f4f7fb}
.mtl-arch-figure{position:relative;border-radius:16px;overflow:hidden;box-shadow:0 20px 50px rgba(15,35,60,.18);background:#dfe6ee}.mtl-arch-figure img{display:block;width:100%;height:auto}
.mtl-arch-pin{position:absolute;transform:translate(-50%,-50%);display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#f29a38;color:#10243a;font:800 .68rem var(--mono,monospace);border:2px solid #fff;box-shadow:0 4px 12px rgba(0,0,0,.3);text-decoration:none}
.mtl-arch-pin i{position:absolute;bottom:130%;left:50%;transform:translateX(-50%);white-space:nowrap;background:#10243a;color:#fff;font-style:normal;font:600 .72rem var(--font-body,sans-serif);padding:5px 9px;border-radius:6px;opacity:0;pointer-events:none;transition:opacity .15s}
.mtl-arch-pin:hover i,.mtl-arch-pin:focus i{opacity:1}.mtl-arch-pin:hover,.mtl-arch-pin:focus{background:#10243a;color:#fff}
.mtl-arch-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.mtl-arch-chips a{background:#fff;border:1px solid #d5dfea;border-radius:999px;padding:8px 14px;font-size:.84rem;font-weight:600;color:#10243a}.mtl-arch-chips a b{font:700 .68rem var(--mono,monospace);color:#d97a0c;margin-right:6px}.mtl-arch-chips a:hover{border-color:#f29a38}
@media(max-width:600px){.mtl-map-list{grid-template-columns:1fr}.mtl-arch-pin{width:24px;height:24px;font-size:.58rem}.mtl-arch-pin i{display:none}}
