/* Shared stylesheet for the static pages (planets, moons, hub, book). The game keeps my-styles.css. */
:root { --ground: #12181f; --navy: #1b2447; --surface: rgba(27, 36, 71, 0.72); --ink: #f1ecdf; --muted: #a9b2cf; --accent: #f4894a; --accent-ink: #12181f; --rule: #33407a; --sky: #8fb8de; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground) url("/src/assets/img/bg.jpg") repeat; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.55; }
a { color: var(--sky); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip:focus { left: 12px; top: 12px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 20px; }
header.site { padding: 18px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); }
header.site .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 15px; }
header.site .brand img { width: 34px; height: 34px; object-fit: contain; }
header.site nav { display: flex; gap: 16px; flex-wrap: wrap; font-family: Arial, Helvetica, sans-serif; font-size: 14px; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--ink); }
header.site nav a.nav-cta { color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 6px 12px; font-weight: bold; }
header.site nav a.nav-cta:hover { color: var(--accent-ink); filter: brightness(1.08); }
.book-card { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; margin: 40px 0 10px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; }
.book-card img { width: 120px; height: auto; border-radius: 6px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
.book-card .eyebrow { margin-bottom: 4px; }
.book-card-title { margin: 0 0 8px; font-size: 20px; line-height: 1.3; }
.book-card .ctas { margin: 8px 0 0; }
@media (max-width: 520px) { .book-card { grid-template-columns: 1fr; text-align: center; } .book-card img { margin: 0 auto; } .book-card .ctas { justify-content: center; } }
.crumbs { font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: var(--muted); margin: 18px 0 0; }
.crumbs a { color: var(--muted); }
.hero { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; margin: 22px 0 10px; }
@media (min-width: 700px) { .hero { grid-template-columns: 260px 1fr; } }
.hero img { width: 100%; max-width: 260px; height: auto; display: block; margin: 0 auto; }
.eyebrow { font-family: Arial, Helvetica, sans-serif; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
h1 { font-weight: 500; font-size: clamp(34px, 6vw, 54px); line-height: 1.05; margin: 0 0 10px; text-wrap: balance; }
.tagline { font-size: 21px; color: var(--muted); margin: 0 0 16px; }
.verse { font-style: italic; color: var(--muted); border-left: 3px solid var(--accent); padding-left: 14px; margin: 14px 0 18px; }
.verse small { display: block; font-style: normal; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-top: 6px; }
.listen-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-style: normal; background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.listen-btn:hover { border-color: var(--accent); }
.listen-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ctas { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 8px; }
.cta { display: inline-block; background: var(--accent); color: var(--accent-ink); font-family: Arial, Helvetica, sans-serif; font-weight: bold; text-decoration: none; padding: 11px 16px; border-radius: 8px; font-size: 15px; }
.cta.secondary { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
/* A subtle rule above each section: a faint line that fades out to the right. */
h2 { font-weight: 500; font-size: 30px; margin: 44px 0 12px; padding-top: 26px; text-wrap: balance; scroll-margin-top: 16px; background: linear-gradient(90deg, var(--rule), rgba(51, 64, 122, 0)) no-repeat top left / 100% 1px; }
.onpage + h2 { padding-top: 0; background: none; }
.onpage { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; }
.onpage a { color: var(--ink); text-decoration: none; background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; padding: 6px 12px; }
.onpage a:hover { border-color: var(--accent); }
h3 { font-weight: 500; font-size: 22px; margin: 26px 0 8px; }
p { margin: 0 0 14px; }
.tiers { display: flex; gap: 8px; flex-wrap: wrap; font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin: 26px 0 6px; }
.tiers button { background: transparent; color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 7px 14px; cursor: pointer; font: inherit; }
.tiers button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tier { display: none; }
.tier.active { display: block; }
.tier.little { font-size: 22px; line-height: 1.6; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin: 16px 0 6px; font-family: Arial, Helvetica, sans-serif; }
.facts div { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; }
.facts dt { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.facts dd { margin: 0; font-size: 16px; font-variant-numeric: tabular-nums; }
.dyk { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.dyk li { background: var(--surface); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 0 8px 8px 0; }
.moonlist { columns: 2; column-gap: 24px; padding-left: 20px; }
@media (max-width: 600px) { .moonlist { columns: 1; } }
.moonlist li { break-inside: avoid; margin: 0 0 6px; }
details { border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); margin: 8px 0; }
summary { cursor: pointer; padding: 12px 16px; font-weight: normal; font-size: 18px; }
details p { padding: 0 16px 12px; margin: 0; }
.quiz { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 12px; }
.quiz li { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; }
.quiz .opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.quiz button { font: inherit; font-size: 15px; background: transparent; color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; padding: 7px 12px; cursor: pointer; }
.quiz li { position: relative; transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease; }
.quiz li.answered.right { border-color: #2f9c6a; box-shadow: 0 0 0 3px rgba(143, 227, 182, 0.25), 0 12px 30px rgba(31, 107, 78, 0.35); animation: quiz-lift 0.7s cubic-bezier(0.34, 1.56, 0.64, 1); }
.quiz li.answered.wrong { border-color: #a0463f; animation: quiz-card-shake 0.55s ease, quiz-flash 0.8s ease; }
.quiz button { transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.3s ease; }
.quiz button:disabled { cursor: default; opacity: 1; color: var(--muted); }
.quiz li.answered.wrong button:disabled:not(.right):not(.wrong) { opacity: 0.45; }
.quiz button.right { background: #1f6b4e; border-color: #1f6b4e; color: #fff; }
.quiz button.wrong { background: #6b2a2a; border-color: #6b2a2a; color: #fff; }
.quiz button.right::before { content: "\2713\00a0"; }
.quiz button.wrong::before { content: "\2717\00a0"; }
/* Right: the chosen answer pops, the card lifts and glows, confetti flies, Hugo cheers. */
.quiz li.answered.right button.right { animation: quiz-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
/* Wrong: the card shakes with a red flash, the wrong answer sinks, the real answer glows in a beat later. */
.quiz li.answered.wrong button.wrong { animation: quiz-shake 0.5s ease; }
.quiz li.answered.wrong button.right { animation: quiz-reveal 0.9s ease 0.35s both, quiz-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.1s; }
.quiz-feedback { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 10px 0 0; font-family: Arial, Helvetica, sans-serif; font-size: 15px; font-weight: bold; animation: quiz-rise 0.45s ease 0.15s both; }
.quiz li.right .quiz-feedback { color: #8fe3b6; }
.quiz li.wrong .quiz-feedback { color: #ffb3a7; }
.quiz-hugo { width: 44px; height: 44px; object-fit: contain; }
.quiz-hugo.cheer { animation: hugo-cheer 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.quiz-hugo.hmm { animation: hugo-hmm 0.9s ease both; }
.quiz-tools { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.sfx-toggle { font: inherit; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background: transparent; color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.sfx-toggle[aria-pressed="true"] { color: var(--ink); border-color: var(--sky); }
.listen-btn .ico, .sfx-toggle .ico { width: 15px; height: 15px; vertical-align: -2px; }
.quiz-stars { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.quiz-stars span { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); animation: quiz-confetti 1.4s cubic-bezier(0.2, 0.6, 0.4, 1) forwards; }
.quiz-stars .confetti { width: 8px; height: 12px; border-radius: 2px; }
.quiz-stars .star { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 8px 2px rgba(255, 233, 168, 0.7); }
@keyframes quiz-pop { 0% { transform: scale(1); } 45% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes quiz-lift { 0% { transform: translateY(0); } 40% { transform: translateY(-8px) scale(1.015); } 100% { transform: translateY(0) scale(1); } }
@keyframes quiz-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
@keyframes quiz-card-shake { 0%, 100% { transform: translateX(0); } 15% { transform: translateX(-6px) rotate(-0.4deg); } 30% { transform: translateX(6px) rotate(0.4deg); } 45% { transform: translateX(-4px); } 60% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
@keyframes quiz-flash { 0% { background: rgba(107, 42, 42, 0.55); } 100% { background: var(--surface); } }
@keyframes quiz-reveal { 0% { background: transparent; border-color: var(--rule); color: var(--muted); box-shadow: 0 0 0 0 rgba(143, 227, 182, 0); } 50% { box-shadow: 0 0 0 7px rgba(143, 227, 182, 0.45); } 100% { background: #1f6b4e; border-color: #1f6b4e; color: #fff; box-shadow: 0 0 0 0 rgba(143, 227, 182, 0); } }
@keyframes quiz-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hugo-cheer { 0% { opacity: 0; transform: translateY(14px) scale(0.5) rotate(-15deg); } 60% { opacity: 1; transform: translateY(-6px) scale(1.1) rotate(8deg); } 100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); } }
@keyframes hugo-hmm { 0% { opacity: 0; transform: translateX(10px) rotate(0); } 50% { opacity: 1; transform: translateX(0) rotate(-12deg); } 100% { opacity: 1; transform: translateX(0) rotate(-6deg); } }
/* Up and out, then down under gravity, spinning as it goes. */
@keyframes quiz-confetti {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(0.6); }
  35% { opacity: 1; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(calc(var(--rot) * 0.4)) scale(1.1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx) * 1.4), calc(-50% + var(--dy) * -0.2 + 120px)) rotate(var(--rot)) scale(0.8); }
}
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 12px; text-align: center; text-decoration: none; color: var(--ink); font-family: Arial, Helvetica, sans-serif; font-size: 14px; }
.card img { width: 84px; height: 84px; object-fit: contain; display: block; margin: 0 auto 8px; }
.card:hover { border-color: var(--accent); }
.cards.resources { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.cards.resources .card { text-align: left; font-size: 14px; line-height: 1.45; color: var(--muted); }
.cards.resources .card strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.cards.resources .card a { color: var(--sky); }
.prevnext { display: flex; justify-content: space-between; gap: 12px; margin: 30px 0 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; }
.prevnext a { color: var(--ink); }
.tablewrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); margin: 14px 0; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-family: Arial, Helvetica, sans-serif; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
.byline { font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: var(--muted); margin: 30px 0 0; }
.byline a { color: var(--muted); }
footer.site { margin-top: 48px; padding: 24px 0 60px; border-top: 1px solid var(--rule); font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: var(--muted); }
footer.site a { color: var(--muted); }
footer.site .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.note { font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .quiz li, .quiz button, .quiz-feedback, .quiz-hugo { animation: none !important; } .quiz-stars { display: none; } }

/* ---- Daily Planet ---- */
.daily { margin: 18px 0 6px; }
.dchips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; }
.chip { background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; padding: 5px 12px; }
.chip b { color: var(--accent); }
.drows { display: grid; gap: 8px; margin: 0 0 14px; }
.drow { display: grid; grid-template-columns: minmax(120px, 1.4fr) repeat(5, 1fr); gap: 6px; align-items: stretch; }
.dname { display: flex; align-items: center; gap: 8px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 14px; }
.dname img { width: 34px; height: 34px; object-fit: contain; }
.dcell { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 6px 8px; border-radius: 8px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; text-align: center; background: var(--surface); border: 1px solid var(--rule); color: var(--muted); }
.dcell small { font-size: 10px; letter-spacing: .05em; text-transform: uppercase; opacity: .8; }
.dcell.hit { background: #1f6b4e; border-color: #1f6b4e; color: #fff; }
.dcell.near { background: #8a6200; border-color: #8a6200; color: #fff; }
.dlegend { font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.dlegend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin: 0 4px 0 8px; }
.dlegend .hit { background: #1f6b4e; } .dlegend .near { background: #8a6200; }
.dhint { background: var(--surface); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 0 0 14px; }
.dform { display: flex; gap: 8px; flex-wrap: wrap; }
.dform input { flex: 1 1 260px; font: inherit; font-size: 18px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); }
.dend { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 18px 20px; }
.dend img { width: 140px; height: 140px; object-fit: contain; }
.dbig { font-size: 24px; margin: 0 0 6px; }
.dgrid { display: grid; gap: 3px; margin: 10px 0; }
.dgrid div { display: flex; gap: 3px; }
.dgrid i { width: 18px; height: 18px; border-radius: 3px; background: var(--rule); }
.dgrid i.hit { background: #1f6b4e; } .dgrid i.near { background: #8a6200; }
@media (max-width: 640px) { .drow { grid-template-columns: repeat(3, 1fr); } .dname { grid-column: 1 / -1; } .dend { grid-template-columns: 1fr; text-align: center; } .dend img { margin: 0 auto; } .dend .ctas { justify-content: center; } }

/* ---- Weekly challenge ---- */
.wstart { display: grid; gap: 10px; max-width: 480px; margin: 18px 0; }
.wstart label { font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: var(--muted); }
.wstart input { font: inherit; font-size: 17px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); }
.wmeta { font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: var(--muted); }
.wqq { margin: 6px 0 12px; font-size: 26px; }
.wopts { display: grid; gap: 8px; max-width: 560px; }
.wopt { font: inherit; font-size: 17px; text-align: left; background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.wopt:hover { border-color: var(--accent); }
.wopt.right { background: #1f6b4e; border-color: #1f6b4e; color: #fff; }
.wopt.wrong { background: #6b2a2a; border-color: #6b2a2a; color: #fff; }
.wopt:disabled { cursor: default; }
.wfb { margin: 14px 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.wresult { display: flex; gap: 18px; align-items: center; margin: 18px 0; }
.wbig { font-size: 56px; font-weight: bold; color: var(--accent); }
.wbig small { font-size: 22px; color: var(--muted); }
.wcode { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 18px; margin: 0 0 14px; max-width: 480px; }
.wcodeval { font-family: "Courier New", monospace; font-size: 40px; letter-spacing: .2em; font-weight: bold; margin: 4px 0; }
