  :root {
    --void: #020309;
    --gold: #e8c98b;
    --ice: #d5e4ff;
    --ink: #eef0fa;
    --mute: #a3a9c6;
    --panel: rgba(8, 10, 28, 0.78);
    --line: rgba(190, 205, 255, 0.2);
    --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
    --body: "Newsreader", Georgia, "Times New Roman", serif;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  *, *::before, *::after { box-sizing: inherit; }
  html { height: 100%; scroll-behavior: smooth; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 72px); }
  body {
    margin: 0;
    min-height: 100%;
    color: var(--ink);
    font-family: var(--body);
    font-size: 1.125rem;
    line-height: 1.6;
    background:
      radial-gradient(ellipse 55% 40% at 15% 6%, rgba(46, 40, 130, 0.30), transparent 70%),
      radial-gradient(ellipse 50% 40% at 90% 75%, rgba(20, 56, 128, 0.20), transparent 70%),
      var(--void);
    background-attachment: fixed;
  }
  #sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
  main, header.bar { position: relative; z-index: 1; }
  a { color: var(--gold); text-underline-offset: 3px; }
  :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

  .bar {
    position: fixed !important;
    top: 0; left: 0; right: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) clamp(16px, 4vw, 48px) 14px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: linear-gradient(to bottom, rgba(2, 3, 9, 0.85), rgba(2, 3, 9, 0));
    z-index: 5 !important;
  }
  /* The Home button (top left) is only there when you are not on the home screen. It fades in and out. */
  .homebtn {
    font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--ink);
    background: none; border: 0; padding: 6px 4px; cursor: pointer;
    opacity: 0; visibility: hidden; transform: translateX(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
  }
  .homebtn span { display: inline-block; transition: transform 0.2s ease; }
  .homebtn:hover span { transform: translateX(-3px); }
  body.show-home .homebtn { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .bar nav { display: flex; gap: clamp(12px, 3vw, 32px); }
  .bar nav a { font-family: var(--display); font-size: 0.95rem; font-weight: 600; color: var(--mute); text-decoration: none; }
  .bar nav a:hover { color: var(--ink); }

  /* Home page: one screen for the journey, then the blog.
     Explore page: no scrolling to fly in (that happens by itself). The stage stays fixed and the facts sit on top of it. */
  main { transition: opacity 0.3s ease; }
  #flight { height: 100vh; height: 100dvh; position: relative; }
  body.explore-page #flight { height: 0; }
  body.explore-page .stage { position: fixed; top: 0; left: 0; right: 0; }
  body.explore-page .hero-copy { display: none; }
  #closer { display: none; }
  body.explore-page #closer { display: flex; align-items: center; min-height: 100vh; min-height: 100dvh; padding-top: 84px; padding-bottom: 32px; }
  body.explore-page #closer .wrap { width: 100%; }
  /* Explore pages end after the facts: no blog and no Sources section on the page, and no Sources link.
     The Blog link stays: it goes home, resumes the journey and glides to the blog. */
  body.explore-page #blog, body.explore-page #credits,
  body.explore-page .bar a[href="#credits"] { display: none; }
  .stage {
    position: sticky; top: 0; height: 100vh; height: 100dvh;
    display: flex; flex-direction: column; justify-content: center;
    padding: 0 clamp(20px, 6vw, 96px);
    pointer-events: none;
  }
  .hero-copy { max-width: 46rem; will-change: opacity; pointer-events: auto; }
  h1 {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(3.4rem, 11vw, 8.5rem);
    line-height: 0.92;
    letter-spacing: -0.04em;
    margin: 0 0 24px;
  }
  .tagline { font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: var(--ice); max-width: 32rem; margin: 0 0 24px; }
  .hud {
    position: absolute; left: clamp(20px, 6vw, 96px); bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
    font-family: var(--display); color: var(--mute); font-size: 0.9rem;
  }
  .hud b { display: block; color: var(--ink); font-size: clamp(1.4rem, 3.4vw, 2.2rem); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
  .hud span { display: block; margin-top: 2px; }

  section { padding: clamp(72px, 12vw, 150px) clamp(20px, 6vw, 96px); }
  .wrap { max-width: 1120px; margin: 0 auto; }
  h2 { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.02; letter-spacing: -0.03em; margin: 0 0 20px; }
  .lede { color: var(--ice); max-width: 34rem; margin: 0 0 40px; }



  .jbtn { font-family: var(--display); font-weight: 600; font-size: 0.95rem; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; margin: 0 0 18px; }
  .jbtn[aria-pressed="true"] { background: var(--ice); color: #0a0c1e; border-color: var(--ice); }
  .navbtn.plain::after { display: none; }
  .navbtn.plain { color: var(--mute); }
  .navbtn.plain[aria-pressed="true"] { color: var(--gold); }
  .navbtn { font-family: var(--display); font-size: 0.95rem; font-weight: 600; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; }
  .navbtn::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
  .navbtn[aria-expanded="true"]::after { transform: translateY(0) rotate(225deg); }
  .explore { position: fixed; z-index: 6; left: clamp(8px, 4vw, 48px); right: clamp(8px, 4vw, 48px); top: calc(env(safe-area-inset-top, 0px) + 56px);
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 72px); overflow-y: auto; background: rgba(4, 6, 20, 0.95); border: 1px solid var(--line);
    border-radius: 18px; padding: 20px clamp(16px, 3vw, 32px) 24px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .explore[hidden] { display: none; }
  .explore header { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }
  .explore h2 { font-size: 1.5rem; margin: 0; letter-spacing: -0.02em; }
  .explore header p { margin: 0; color: var(--mute); font-size: 0.95rem; }
  .exclose { font-family: var(--display); font-weight: 600; font-size: 0.9rem; color: var(--mute); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; cursor: pointer; }
  .exbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px 24px; }
  .kids { margin: 4px 0 0 7px; padding-left: 12px; border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
  .eitem { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 600; color: var(--mute); background: none; border: 0; padding: 5px 0; cursor: pointer; text-align: left; }
  .eitem.head { font-size: 1.05rem; color: var(--ink); }
  .eitem.kid { font-size: 0.92rem; }
  .eitem i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); flex: none; }
  .eitem:hover { color: var(--gold); }
  .eitem[aria-pressed="true"] { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }
  .morebtn { font-family: var(--display); font-weight: 600; font-size: 0.95rem; color: #0a0c1e; background: var(--ice); border: 0; border-radius: 999px; padding: 9px 18px; cursor: pointer; margin-top: 20px; }
  .imgnote { color: var(--mute); font-size: 0.95rem; margin: 16px 0 0; max-width: 34rem; }
  .credlist { padding-left: 1.1rem; color: var(--ink); font-size: 1rem; }
  .credlist li { margin-bottom: 6px; }
  #closer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
  #closer .copy { grid-column: 1; }
  .facts { margin: 0; padding: 0; }
  .facts div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); align-items: baseline; }
  .facts div:last-child { border-bottom: 1px solid var(--line); }
  .facts dt { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--ice); margin: 0; letter-spacing: -0.01em; }
  .facts dd { margin: 0; color: var(--ink); font-size: 1.05rem; }
  .note { color: var(--mute); font-size: 0.95rem; font-style: italic; margin-top: 16px; max-width: 34rem; }

  #blog { background: linear-gradient(to bottom, rgba(2, 3, 9, 0), rgba(2, 3, 9, 0.72) 12%, rgba(2, 3, 9, 0.72)); }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; }
  .chip {
    font-family: var(--display); font-size: 0.95rem; font-weight: 600;
    background: transparent; color: var(--mute);
    border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; cursor: pointer;
  }
  .chip:hover { color: var(--ink); }
  .chip[aria-pressed="true"] { background: var(--ice); color: #0a0c1e; border-color: var(--ice); }

  .grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
  .card {
    grid-column: span 2;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px 18px 18px 4px;
    padding: 24px;
    display: flex; flex-direction: column; gap: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .card.feature { grid-column: span 4; padding: 32px; }
  .card.feature h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
  .meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-family: var(--display); font-size: 0.85rem; color: var(--mute); }
  .tag { color: var(--ice); border: 1px solid rgba(213, 228, 255, 0.3); border-radius: 999px; padding: 2px 10px; }
  .card h3 { font-family: var(--display); font-weight: 600; font-size: 1.35rem; line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
  .card p { margin: 0; }
  .more { display: grid; gap: 12px; color: #dfe3f5; border-left: 2px solid var(--gold); padding-left: 16px; margin-top: 4px; }
  .more[hidden] { display: none; }
  .toggle {
    align-self: flex-start; font-family: var(--display); font-weight: 600; font-size: 0.95rem;
    background: none; border: 0; padding: 4px 0; color: var(--gold); cursor: pointer; text-decoration: underline; text-underline-offset: 4px;
  }
  .credit { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--display); font-size: 0.9rem; color: var(--mute); }
  .empty { color: var(--mute); grid-column: 1 / -1; }

  #credits .wrap { max-width: 860px; }
  .rules { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 0; }
  .rules li { padding: 18px 0; border-top: 1px solid var(--line); }
  .rules li:last-child { border-bottom: 1px solid var(--line); }
  .rules strong { font-family: var(--display); font-weight: 600; display: block; font-size: 1.2rem; margin-bottom: 2px; }
  .srcs { display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 0; list-style: none; font-family: var(--display); }


  /* on shorter laptop screens, pack the facts closer so the whole Explore page fits without scrolling */
  @media (min-width: 861px) and (max-height: 900px) {
    body.explore-page #closer { padding-top: 76px; padding-bottom: 20px; }
    #closer h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 12px; }
    #closer .lede { margin-bottom: 20px; }
    .facts div { padding: 8px 0; }
    .imgnote { margin-top: 10px; }
    .morebtn { margin-top: 12px; padding: 7px 16px; }
    .note { margin-top: 10px; }
  }
  @media (max-width: 860px) {
    #closer .wrap { grid-template-columns: 1fr; }
    .grid { grid-template-columns: 1fr; }
    .card, .card.feature { grid-column: auto; }
    .facts div { grid-template-columns: 1fr; gap: 2px; }
    body.explore-page #closer { padding-top: 46vh; align-items: flex-start; }
    #closer .copy { background: linear-gradient(to bottom, rgba(2,3,9,0), rgba(2,3,9,0.78) 14%); padding-top: 24px; margin: 0 calc(-1 * clamp(20px, 6vw, 96px)); padding-left: clamp(20px, 6vw, 96px); padding-right: clamp(20px, 6vw, 96px); }
    .bar nav a:last-child { display: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
  }
