/* ============================================================
   Shared site header + footer for pages that do not use styles.css
   (lessons, labs, 404). Injected by site.js.
   Everything is namespaced .lt-* and uses literal colours so it
   cannot clash with lesson.css / labs.css (which reuse names like
   .nav, .btn, .wrap and --bg). Visually matches styles.css.
   ============================================================ */
.lt-hdr,.lt-ftr{font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  -webkit-font-smoothing:antialiased;line-height:1.65}
.lt-hdr *,.lt-ftr *{box-sizing:border-box}
.lt-hdr a,.lt-ftr a{text-decoration:none}
.lt-hdr a:hover,.lt-ftr a:hover{text-decoration:none}
.lt-wrap{width:100%;max-width:1180px;margin:0 auto;padding:0 22px}

/* ---- header ---- */
.lt-hdr{position:relative;z-index:150;background:#08090B;border-bottom:1px solid #222730}
.lt-hdr-in{display:flex;align-items:center;justify-content:space-between;height:68px;gap:1rem}
.lt-brand{display:flex;align-items:center;gap:.6rem;color:#fff;font-size:1.05rem;font-weight:500;letter-spacing:-.03em}
.lt-brand b{font-weight:900}
.lt-brand img{height:38px;width:auto;flex:none;display:block}
.lt-right{display:flex;align-items:center;gap:.6rem}
.lt-nav{display:flex;align-items:center;gap:1.6rem}
.lt-nav a{font-size:.93rem;font-weight:500;color:#C9CFD8;position:relative;transition:color .15s}
.lt-nav a:hover,.lt-nav a.on{color:#fff}
.lt-nav a:not(.lt-btn)::after{content:"";position:absolute;left:0;bottom:-5px;width:0;height:2px;background:#FF914D;transition:width .22s}
.lt-nav a:not(.lt-btn):hover::after,.lt-nav a.on::after{width:100%}
.lt-btn{display:inline-flex;align-items:center;background:#FF914D;color:#000 !important;font-weight:750;
  font-size:.88rem;padding:.5rem 1.15rem;border:2px solid #FF914D;border-radius:999px;white-space:nowrap;transition:.18s}
.lt-btn:hover{background:#fff;border-color:#fff}
.lt-burger{display:none;flex-direction:column;gap:5px;background:none;border:0;padding:8px;cursor:pointer}
.lt-burger span{width:24px;height:2px;background:#fff;border-radius:2px;transition:.26s;display:block}
.lt-burger.open span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.lt-burger.open span:nth-child(2){opacity:0}
.lt-burger.open span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
/* ---- sign-in control (filled by auth.js; empty until accounts are set up) ---- */
.lt-auth{display:flex;align-items:center;gap:.5rem}
.lt-auth:empty{display:none}
.auth-btn{font-family:inherit;font-size:.84rem;font-weight:700;white-space:nowrap;cursor:pointer;
  background:#FF914D;color:#000;border:1px solid #FF914D;border-radius:999px;padding:.42rem 1rem;transition:.16s}
.auth-btn:hover{background:#fff;border-color:#fff}
.auth-btn.ghost{background:transparent;color:#C9CFD8;border-color:#2C333D;font-weight:500}
.auth-btn.ghost:hover{background:transparent;border-color:#7C838F;color:#fff}
.auth-who{display:inline-flex;align-items:center;gap:.4rem;font-size:.84rem;color:#C9CFD8;white-space:nowrap}
a.auth-who{text-decoration:none}a.auth-who:hover{color:#fff}
.auth-dot{width:7px;height:7px;border-radius:50%;background:#3DD68C;flex:none}
.auth-dot.is-saving{background:#FF914D}
@media(max-width:520px){.lt-hdr .auth-who{display:inline-block;max-width:7.5em;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.lt-hdr .auth-btn.ghost{display:none}}

/* theme button: layout + icon swap here (works on any page); colours below are header-only
   so the lesson bar's own button keeps the colours lesson.css gives it */
.theme-btn{display:inline-grid;place-items:center;width:34px;height:34px;flex:none;border-width:1px;border-style:solid;border-radius:9px;cursor:pointer;padding:0}
.theme-btn svg{width:17px;height:17px;display:block}
.theme-btn .i-sun{display:none}
:root[data-theme="light"] .theme-btn .i-sun{display:block}
:root[data-theme="light"] .theme-btn .i-moon{display:none}
.lt-hdr .theme-btn{background:#0E1013;border-color:#222730;color:#C9CFD8}
.lt-hdr .theme-btn:hover{border-color:#FF914D;color:#FF914D}
.lt-hdr a:focus-visible,.lt-hdr button:focus-visible,.lt-ftr a:focus-visible{outline:2px solid #FF914D;outline-offset:3px;border-radius:4px}

/* ---- footer ---- */
.lt-ftr{background:#08090B;color:#7C838F;padding:3.5rem 0 1.8rem;font-size:.92rem;border-top:1px solid #222730;margin-top:3rem}
.lt-ftr-in{display:grid;grid-template-columns:1.3fr 2fr;gap:3rem}
.lt-ftr .lt-brand{margin-bottom:1rem}
.lt-ftr p{margin:0;line-height:1.7}
.lt-ftr-cols{display:grid;grid-template-columns:repeat(3,1fr);gap:1.6rem}
.lt-ftr-cols h4{color:#fff;font-family:'JetBrains Mono',ui-monospace,Menlo,monospace;font-size:.72rem;
  letter-spacing:.15em;text-transform:uppercase;margin:0 0 .9rem;font-weight:700}
.lt-ftr-cols a{display:block;padding:.28rem 0;color:#7C838F;transition:color .15s}
.lt-ftr-cols a:hover{color:#FF914D}
.lt-ftr-btm{border-top:1px solid #222730;margin-top:3rem;padding-top:1.6rem;display:flex;
  justify-content:space-between;gap:1rem;flex-wrap:wrap;font-size:.83rem}
.lt-ftr-btm .lt-disc{color:#7C838F;max-width:520px}

@media(max-width:960px){.lt-ftr-in{grid-template-columns:1fr}}
@media(max-width:820px){
  .lt-burger{display:flex}
  .lt-nav{position:absolute;top:68px;left:0;right:0;flex-direction:column;align-items:stretch;gap:0;
    background:#08090B;border-bottom:1px solid #222730;padding:0 22px;max-height:0;overflow:hidden;
    transition:max-height .3s,padding .3s}
  .lt-nav.open{max-height:460px;padding:1rem 22px 1.5rem}
  .lt-nav a{padding:.75rem 0}
  .lt-nav a::after{display:none}
  .lt-nav .lt-btn{margin-top:.6rem;justify-content:center}
  .lt-ftr-cols{grid-template-columns:1fr 1fr}
}
@media(prefers-reduced-motion:reduce){.lt-nav,.lt-burger span,.lt-nav a::after{transition:none}}
@media print{.lt-hdr,.lt-ftr{display:none}}

/* ---- Site-wide polish (audit 2026-11-25) ----
   1. Form controls default to the browser font (Arial) unless told otherwise;
      make every button and field use the site font.
   2. Small uppercase labels and badges had drifted to 10px or below on phones.
      Give them a readable floor. html body raises specificity above page CSS. */
button,input,select,textarea{font-family:inherit}
html body .lvl,html body .src,html body .fl,html body .dir,
html body .tag,html body .lbl,html body .term-live,html body .goal-lbl,html body .labs-lbl,
html body .px-badge,html body .px-tag,html body .flagbox label{font-size:max(.72rem,11.5px)}

/* ---- Mobile polish (audit 2026-11-25) ----
   1. Tap targets: menu, theme and sign-in controls were 31-34px tall.
      44px is the comfortable thumb size.
   2. iPhone zooms the page when a text field under 16px is focused.
   3. On very small phones (320px) the header did not fit: show the logo
      mark without the word "learntechfacile" and tighten the gaps. */
@media(max-width:820px){
  .lt-burger,.burger{min-width:44px;min-height:44px;align-items:center;justify-content:center}
  .lt-hdr .theme-btn,.theme-btn{width:40px;height:40px}
  .auth-btn{min-height:40px}
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=submit]):not([type=button]),
  select,textarea{font-size:16px !important}
}
@media(max-width:380px){
  .lt-hdr .lt-brand>span{display:none}
  .lt-hdr-in{gap:.5rem}
  .lt-right{gap:.4rem}
  .lt-hdr .auth-btn{padding-left:.75rem;padding-right:.75rem}
}

/* Pages with a hand-written header (home, about, roadmap, privacy, terms)
   use the same .lt-hdr markup, kept sticky like before. They have no light
   theme, so an invisible stand-in holds the theme button's space and the
   menu sits at exactly the same place on every page. */
.lt-hdr.lt-sticky{position:sticky;top:0}
.lt-theme-ph{visibility:hidden;pointer-events:none}
