/* TwinkleHush design system — calm night-sky brand, light reading surface.
   No external fonts/requests: system stack keeps it fast and private. */

:root {
  --navy: #060816;
  --navy-2: #10173a;
  --navy-3: #1c2340;
  --cream: #fff4d6;
  --gold: #f5c442;
  --blue: #bfd0ff;
  --blue-deep: #3d54b8;
  --red: #d32f2f;
  --ink: #23293f;
  --ink-soft: #5a6072;
  --paper: #fbfaf7;
  --card: #ffffff;
  --line: #e7e3d9;
  --tint: #f3f0e8;
  --radius: 18px;
  --shadow: 0 2px 10px rgba(28, 35, 64, .07), 0 12px 32px rgba(28, 35, 64, .06);
  --shadow-lift: 0 4px 14px rgba(28, 35, 64, .12), 0 18px 44px rgba(28, 35, 64, .12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 8, 22, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(191, 208, 255, .14);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.nav .brand {
  color: var(--cream); text-decoration: none; font-weight: 800;
  font-size: 18px; letter-spacing: .2px; margin-right: auto;
  display: flex; align-items: center; gap: 8px;
}
.nav a.link {
  color: var(--blue); text-decoration: none; font-size: 15px; font-weight: 600;
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.nav a.link:hover { color: var(--cream); }
.nav a.link[aria-current="page"] { color: var(--cream); border-bottom-color: var(--gold); }

/* --------------------------------------------------------------- hero ---- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1.6px 1.6px at 12% 28%, rgba(255,255,255,.85) 49%, transparent 51%),
    radial-gradient(1.2px 1.2px at 26% 64%, rgba(255,255,255,.6) 49%, transparent 51%),
    radial-gradient(1.8px 1.8px at 38% 18%, rgba(255,244,214,.9) 49%, transparent 51%),
    radial-gradient(1.1px 1.1px at 49% 47%, rgba(255,255,255,.55) 49%, transparent 51%),
    radial-gradient(1.5px 1.5px at 63% 24%, rgba(255,255,255,.8) 49%, transparent 51%),
    radial-gradient(1.1px 1.1px at 72% 58%, rgba(191,208,255,.7) 49%, transparent 51%),
    radial-gradient(1.9px 1.9px at 84% 33%, rgba(255,244,214,.85) 49%, transparent 51%),
    radial-gradient(1.2px 1.2px at 92% 70%, rgba(255,255,255,.5) 49%, transparent 51%),
    radial-gradient(1.4px 1.4px at 8% 76%, rgba(255,255,255,.6) 49%, transparent 51%),
    radial-gradient(1.3px 1.3px at 57% 82%, rgba(191,208,255,.6) 49%, transparent 51%),
    radial-gradient(120% 150% at 72% 12%, var(--navy-2), var(--navy) 70%);
  color: var(--cream);
  text-align: center;
  padding: clamp(56px, 9vw, 108px) 24px clamp(64px, 10vw, 116px);
}
.hero .moon { font-size: clamp(44px, 6vw, 60px); line-height: 1; }
.hero h1 {
  font-size: clamp(30px, 5vw, 50px); line-height: 1.15;
  margin: 18px auto 14px; max-width: 21ch; font-weight: 800;
}
.hero p.lede {
  color: var(--blue); font-size: clamp(16px, 2.4vw, 20px);
  max-width: 56ch; margin: 0 auto 34px;
}
.hero.hero-sub { padding: clamp(44px, 7vw, 80px) 24px; }
.hero.hero-sub h1 { max-width: 26ch; }

/* ------------------------------------------------------------ buttons ---- */
.btn {
  display: inline-block; background: var(--cream); color: var(--navy);
  font-weight: 750; font-size: 17px; padding: 15px 32px;
  border-radius: 13px; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
.btn small { display: block; font-weight: 450; font-size: 13px; opacity: .72; }
.btn.btn-dark { background: var(--navy-3); color: var(--cream); }
.btn.btn-dark:hover { box-shadow: var(--shadow-lift); }
.btn.btn-red { background: var(--red); color: #fff; }

/* ------------------------------------------------------------- layout ---- */
main { max-width: 1100px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) 24px; }
section + section { margin-top: clamp(48px, 7vw, 84px); }

.eyebrow {
  display: block; font-size: 13px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue-deep); margin-bottom: 10px;
}
h2 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.2; margin-bottom: 14px; }
h3 { font-size: clamp(18px, 2.4vw, 22px); margin: 26px 0 8px; }
.prose { max-width: 70ch; }
.prose p + p { margin-top: 14px; }
.muted { color: var(--ink-soft); }
a { color: var(--blue-deep); }
a:focus-visible, .btn:focus-visible, .nav a:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px;
}

/* -------------------------------------------------------------- cards ---- */
.card-grid { display: grid; gap: 22px; margin-top: 28px;
             grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 26px 24px;
  box-shadow: var(--shadow);
}
.card .icon { font-size: 30px; }
.card h3 { margin: 12px 0 6px; }
.card p { font-size: 15.5px; color: var(--ink-soft); }
.card .more { display: inline-block; margin-top: 12px; font-weight: 700;
              font-size: 15px; text-decoration: none; }
.card-video { padding-top: 0; overflow: hidden; }
.card-video img.thumb { display: block; width: calc(100% + 52px); height: auto; aspect-ratio: 16 / 9;
                        margin: 0 -26px 14px; border-bottom: 1px solid var(--line); }
a.card { text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card ul { margin: 10px 0 0 18px; font-size: 15px; color: var(--ink-soft); }
.card ul li { margin: 4px 0; }

/* ------------------------------------------------------ image previews ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 14px; margin-top: 22px; align-items: start; }
/* Previews: fixed 2550:3300 box, image fills it. object-fit + align-items:start
   stop Safari/Firefox from stretching grid images to the row height. */
.grid img { display: block; width: 100%; height: auto; aspect-ratio: 2550 / 3300;
            object-fit: cover; background: #fff;
            border: 1px solid var(--line); border-radius: 8px;
            box-shadow: 0 1px 4px rgba(28, 35, 64, .10); }

/* ------------------------------------------------------------ callouts ---- */
.callout {
  background: var(--tint); border-left: 5px solid var(--gold);
  border-radius: 12px; padding: 18px 22px; margin: 22px 0; max-width: 74ch;
}
.callout .label { font-weight: 800; font-size: 13.5px; letter-spacing: .1em;
                  text-transform: uppercase; color: var(--blue-deep); }
.callout p { margin-top: 6px; font-size: 16px; }
.callout ul { margin: 8px 0 2px 20px; font-size: 16px; }
.callout li { margin: 5px 0; }

.stat-row { display: grid; gap: 18px; margin: 26px 0;
            grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
        padding: 20px 22px; box-shadow: var(--shadow); }
.stat .num { font-size: 30px; font-weight: 800; color: var(--navy-3); line-height: 1.1; }
.stat .lbl { font-size: 14px; color: var(--ink-soft); margin-top: 6px; }

/* ------------------------------------------------------------ commit ---- */
.commit-list { list-style: none; margin-top: 22px; display: grid; gap: 12px; }
.commit-list li {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; display: flex; gap: 12px; align-items: baseline;
  box-shadow: var(--shadow); font-size: 16px;
}
.commit-list .tick { color: var(--blue-deep); font-weight: 800; }

/* --------------------------------------------------------------- chips ---- */
.chip {
  display: inline-block; font-size: 12.5px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; vertical-align: middle;
  background: var(--tint); color: var(--blue-deep);
  border: 1px solid var(--line); letter-spacing: .02em; white-space: nowrap;
}

/* --------------------------------------------------------- references ---- */
.refs { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.refs h3 { font-size: 16px; margin-bottom: 8px; }
.refs ol { margin-left: 20px; }
.refs li { font-size: 13.5px; color: var(--ink-soft); margin: 5px 0; }

/* ------------------------------------------------------------- footer ---- */
footer { background: var(--navy); color: var(--blue); text-align: center;
         padding: 44px 24px; font-size: 14.5px; margin-top: clamp(48px, 7vw, 80px); }
footer a { color: var(--cream); }
footer .disclaimer { max-width: 640px; margin: 14px auto 0; opacity: .8; }
footer .foot-nav { margin-top: 10px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* ------------------------------------------------------ skip / crumbs ---- */
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--navy); font-weight: 800;
  padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; outline: 3px solid var(--navy); }
.crumbs { font-size: 14px; color: var(--ink-soft); margin: -12px 0 28px; }
.crumbs a { color: var(--blue-deep); text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { margin: 0 8px; }

/* ------------------------------------------------------- mobile nav ------ */
@media (max-width: 720px) {
  .nav-inner {
    flex-wrap: nowrap; gap: 4px; padding: 6px 12px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
            mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .nav-inner::-webkit-scrollbar { display: none; }
  .nav .brand { flex: 0 0 auto; margin-right: 8px; font-size: 17px; padding: 8px 4px; }
  .nav a.link { flex: 0 0 auto; white-space: nowrap; padding: 12px 10px;
                font-size: 14.5px; min-height: 44px; display: inline-flex; align-items: center; }
}

/* ---------------------------------------------------- start-here paths --- */
.paths { display: grid; gap: 14px; margin-top: 22px;
         grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
a.path {
  display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
a.path:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
a.path .icon { font-size: 28px; flex: 0 0 auto; }
a.path strong { display: block; font-size: 16.5px; }
a.path span.sub { display: block; font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
a.path .go { margin-left: auto; color: var(--blue-deep); font-weight: 800; }

/* ------------------------------------------------------- watch lanes ----- */
.lane { margin-top: 30px; }
.lane + .lane { margin-top: 38px; }
.lane-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
             border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.lane-head h3 { margin: 0; }
.lane-head .how { font-size: 14.5px; color: var(--ink-soft); }
.lane .card-grid { margin-top: 18px; }

/* ---------------------------------------------------- download cards ----- */
.dl-grid { display: grid; gap: 22px; margin-top: 26px;
           grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.dl-card h3 { margin-top: 0; }
.dl-card .meta { font-size: 14.5px; color: var(--ink-soft); margin: 4px 0 14px; }
.dl-card .inside { font-size: 15px; margin: 0 0 16px 18px; color: var(--ink-soft); }
.dl-card .inside li { margin: 3px 0; }
.dl-card .btn { width: 100%; text-align: center; padding: 14px 18px; }
.dl-card .grid { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
@media (max-width: 720px) {
  .dl-card { padding: 18px 16px; }
  .dl-card .grid { gap: 8px; }
}

/* ------------------------------------------------------------- footer ---- */
footer .foot-nav a { padding: 8px 4px; display: inline-block; }

/* ----------------------------------------------------------------- faq ---- */
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 18px; margin-top: 10px; box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none;
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue-deep); font-weight: 800; flex: 0 0 auto; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 16px; font-size: 16px; color: var(--ink-soft); }
.faq details p + p { margin-top: -6px; }

/* ------------------------------------------------------- shorts strip ---- */
.shorts-row { display: grid; gap: 12px; margin-top: 20px;
              grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
a.short {
  display: flex; gap: 12px; align-items: center; text-decoration: none;
  color: var(--cream); background: var(--navy-2); border-radius: 12px;
  padding: 14px 16px; font-weight: 650; font-size: 15px; line-height: 1.35;
  transition: transform .15s ease, background .15s ease;
}
a.short:hover { transform: translateY(-2px); background: var(--navy-3); }
a.short .play { color: var(--gold); font-size: 18px; flex: 0 0 auto; }
a.short small { display: block; color: var(--blue); font-weight: 500; font-size: 13px; }

/* -------------------------------------------------------------- print ---- */
@media print {
  .nav, .hero, footer .foot-nav, .skip, .crumbs, .paths, .shorts-row,
  section[aria-labelledby="watch"], section[aria-labelledby="listen"],
  section[aria-labelledby="watch-dev"], section[aria-labelledby="shorts"] { display: none !important; }
  .faq details { display: block; } .faq details > * { display: block; }
  body { font-size: 12pt; color: #000; background: #fff; }
  main { padding: 0; max-width: none; }
  .card, .stat, .dl-card, .callout { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .btn { border: 1px solid #000; background: #fff !important; color: #000 !important; }
  .dl-card .grid { grid-template-columns: repeat(6, 1fr); }
  a { color: #000; }
}
