/* Learn (/learn/): long reading pages in the Moon Suite look. Space-black like the home page, mono HUD kickers with the
   orange `//`, hairline glass panels, and a serif reading column held near 66 characters so a guide reads like print.
   Pages are built by src/learn/build.ts; no script, so everything here is CSS. */
:root {
  --bg: #000; --ink: #f5f5f5; --text: #d9d9d9; --muted: #a6a6a6; --sky: #b4c8e2; --link: #9ec1ee; --signal: #ff8a3d;
  --line: #ffffff2e; --line-strong: #ffffffa0; --glass: #0c0c0fd9; --panel: #0e0e10; --blur: blur(14px) saturate(120%);
  --hud: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Iowan Old Style', Charter, 'Bitstream Charter', 'Sitka Text', Cambria, 'Noto Serif', Georgia, serif;
  --measure: 38rem; --mast: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-padding-top: calc(var(--mast) + 16px); }
body { margin: 0; color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 10; padding: 8px 14px; border-radius: 999px; background: #fff; color: #000; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* Behind everything: the home page's star field over a faint lunar glow. */
.sky { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
  background: url(/earthrise/stars.webp) center top / cover no-repeat, radial-gradient(120% 60% at 50% 115%, #222 0%, #080808 55%, #000 80%); opacity: .8; }

/* Reading progress along the top, where the browser can tie an animation to the scroll. */
.progress { display: none; }
@supports (animation-timeline: scroll()) {
  .progress { display: block; position: fixed; top: 0; left: 0; z-index: 6; width: 100%; height: 2px; background: var(--signal);
    transform-origin: 0 50%; animation: read linear both; animation-timeline: scroll(root); }
  @keyframes read { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ── Masthead: the wordmark, "// Learn", then the nav ── */
.mast { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; height: var(--mast); padding: 0 24px;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-bottom: 1px solid var(--line); }
.mast .brand { color: #fff; text-decoration: none; font-size: 14px; }
.mast .section { margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line); color: var(--sky); font: 500 12px/1 var(--hud); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; }
.mast .section::before, .kicker::before { content: '// '; color: var(--signal); }
.mast nav { display: flex; align-items: center; margin-left: auto; }
.mast nav a { padding: 10px 0; color: #cfcfcf; font-size: 14px; font-weight: 500; text-decoration: none; }
.mast nav a + a { margin-left: 22px; }
.mast nav a:hover, .mast nav a[aria-current] { color: #fff; }
.mast nav .pill { padding: 8px 16px; border-radius: 999px; background: #fff; color: #000; }
.mast nav .pill:hover { color: #000; opacity: .85; }
.wordmark { font-family: var(--hud); font-weight: 800; text-transform: uppercase; letter-spacing: .18em; white-space: nowrap; }
.wordmark b { font-weight: 500; }
.logo { width: 1.3em; height: 1.3em; vertical-align: middle; margin-right: .3em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.kicker { margin: 0 0 14px; color: var(--sky); font: 500 12px/1.3 var(--hud); letter-spacing: .18em; text-transform: uppercase; }

/* ── Screenshots, framed as the device they came from ── */
.shot { margin: 40px 0; }
.shot .device { position: relative; overflow: hidden; background: #111; }
.shot img { display: block; width: 100%; height: auto; }
.shot.tv .device { padding: 8px; border: 1px solid #ffffff29; border-radius: 14px; box-shadow: 0 30px 80px -30px #7fa7d966, 0 1px 0 #ffffff14 inset; }
.shot.tv .device img { border-radius: 6px; }
.shot.tv .device + figcaption { margin-top: 26px; }
.shot.tv .device::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 6px; height: 2px; margin-left: -3px; border-radius: 2px; background: #ff8a3d99; }
.shot.tv::after { content: ''; display: block; width: 22%; height: 10px; margin: -1px auto 0; border-radius: 0 0 10px 10px; background: linear-gradient(#1a1a1a, #0b0b0b); border: 1px solid #ffffff1f; border-top: 0; }
.shot.tv { display: flex; flex-direction: column; }
.shot.tv::after { order: 1; }
.shot.tv figcaption { order: 2; }
.shot.screen .device { padding-top: 28px; border: 1px solid #ffffff29; border-radius: 12px; box-shadow: 0 30px 80px -30px #000; }
.shot.screen .device::before { content: ''; position: absolute; top: 10px; left: 14px; width: 8px; height: 8px; border-radius: 50%; background: #3a3a3a; box-shadow: 14px 0 #3a3a3a, 28px 0 #3a3a3a; }
.shot.phone { max-width: 280px; margin-left: auto; margin-right: auto; }
.shot.phone .device { border: 9px solid #161616; border-radius: 38px; outline: 1px solid #ffffff29; box-shadow: 0 30px 80px -30px #7fa7d966; }
.shot figcaption { margin-top: 12px; color: var(--muted); font: 14px/1.5 var(--sans); }
.shot figcaption a { color: var(--link); }

/* ── Article head ── */
.article-head { max-width: 46rem; padding: 48px 0 8px; }
.crumbs ol { display: flex; flex-wrap: wrap; margin: 0 0 28px; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: '/'; margin: 0 10px; color: #555; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.article-head h1, .intro h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1.06; letter-spacing: -.025em; font-weight: 700; text-wrap: balance; }
.deck { margin: 20px 0 0; color: #c8c8c8; font: 400 clamp(19px, 2.2vw, 22px)/1.5 var(--serif); text-wrap: pretty; }
.byline { display: flex; flex-wrap: wrap; margin: 28px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); color: var(--muted); font: 500 12px/1.6 var(--hud); letter-spacing: .1em; text-transform: uppercase; }
.byline span + span::before { content: '·'; margin: 0 12px; color: #555; }
.photo img { display: block; width: 100%; height: auto; }
.hero-photo { max-width: 960px; margin: 40px 0 8px; }
.hero-photo img { height: 420px; object-fit: cover; border: 1px solid var(--line); border-radius: 14px; }
@media (max-width: 700px) { .hero-photo img { height: 240px; } }
.hero-photo figcaption { margin-top: 10px; color: var(--muted); font: 13px/1.5 var(--sans); }
.hero-photo figcaption a { color: inherit; }
.prose > .shot:first-child { margin-top: 0; }

/* ── The reading column and its rail ── */
.layout { display: flex; align-items: flex-start; margin-top: 24px; }
.prose { flex: 0 1 var(--measure); min-width: 0; color: var(--text); font: 400 20px/1.65 var(--serif); font-variant-numeric: oldstyle-nums proportional-nums; hanging-punctuation: first; overflow-wrap: break-word; }
.prose p { margin: 0 0 1.05em; text-wrap: pretty; }
.prose strong { color: #fff; }
.prose a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose h2 { margin: 2.2em 0 .6em; color: #fff; font: 700 28px/1.2 var(--sans); letter-spacing: -.015em; text-wrap: balance; }
.prose h3 { margin: 1.8em 0 .4em; color: var(--sky); font: 500 13px/1.3 var(--hud); letter-spacing: .14em; text-transform: uppercase; }
.prose ul { margin: 0 0 1.2em; padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose ul li::marker { color: var(--signal); }
.prose code { padding: .1em .35em; border-radius: 6px; background: #ffffff14; color: #fff; font: .8em var(--hud); }
.prose pre { position: relative; margin: 1.6em 0; padding: 22px 20px 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #0a0a0c; font: 14px/1.65 var(--hud); color: #e8e8e8; }
.prose pre code { padding: 0; background: none; font: inherit; }
.prose pre[data-lang]::before { content: attr(data-lang); position: absolute; top: 8px; right: 12px; color: #666; font: 500 11px var(--hud); letter-spacing: .14em; text-transform: uppercase; }
.table-scroll { overflow-x: auto; margin: 1.6em 0; }
.prose table { width: 100%; border-collapse: collapse; font: 15px/1.5 var(--sans); font-variant-numeric: lining-nums tabular-nums; }
.prose th { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line-strong); color: #fff; text-align: left; font-weight: 600; }
.prose td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }

/* Numbered steps: big mono numbers on a hairline track. */
.steps { counter-reset: step; margin: 0 0 1.4em; padding: 0; list-style: none; }
.steps li { position: relative; counter-increment: step; margin: 0; padding: 0 0 18px 56px; }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: .1em; width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 50%;
  background: #000; color: #fff; font: 500 13px/38px var(--hud); text-align: center; letter-spacing: .04em; }
.steps li::after { content: ''; position: absolute; left: 19px; top: calc(.1em + 42px); bottom: 2px; width: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }

/* Boxes: the short version (HUD brackets), a tip, and what it can't do yet. Their h2 is a label. */
.box { margin: 2em 0; padding: 22px 24px 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); font: 17px/1.6 var(--sans); }
.prose .box h2 { margin: 0 0 12px; color: var(--sky); font: 500 12px/1.3 var(--hud); letter-spacing: .18em; text-transform: uppercase; }
.prose .box h2::before { content: '// '; color: var(--signal); }
.box.short { position: relative; margin-top: 0; border-color: transparent; background: #0d0d10; color: #ececec; font-size: 18px; }
.box.short::before, .box.short::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid var(--signal); }
.box.short::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.box.short::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.box.tip { border-left: 3px solid var(--sky); border-radius: 4px 16px 16px 4px; }
.box.limits { border-top: 2px solid #fff; border-radius: 4px 4px 16px 16px; background: var(--panel); }
.prose .box.limits h2 { color: #fff; }

/* A pull quote: the person's voice, set large. */
.pull { margin: 1.8em 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--signal); }
.pull blockquote { margin: 0; color: #fff; font: italic 400 clamp(22px, 2.6vw, 28px)/1.35 var(--serif); text-wrap: balance; }
.pull blockquote p { margin: 0; }
.pull blockquote p::before { content: '“'; }
.pull blockquote p::after { content: '”'; }
.pull figcaption { margin-top: 12px; color: var(--muted); font: 500 12px/1.3 var(--hud); letter-spacing: .14em; text-transform: uppercase; }
.pull figcaption::before { content: '— '; }

.fiction { margin: 2.4em 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font: 14px/1.6 var(--sans); }
.fiction strong { color: #ddd; }
.fiction a { color: var(--link); }

.rail { display: none; }
@media (min-width: 1040px) {
  .rail { display: block; flex: 0 0 260px; position: sticky; top: calc(var(--mast) + 32px); margin-left: auto; padding-left: 40px; color: var(--muted); font: 14px/1.5 var(--sans); }
  .rail h2 { margin: 0 0 10px; color: var(--sky); font: 500 11px/1.3 var(--hud); letter-spacing: .18em; text-transform: uppercase; }
  .rail ol { margin: 0 0 28px; padding: 0; list-style: none; border-left: 1px solid var(--line); }
  .rail li a { display: block; margin-left: -1px; padding: 6px 0 6px 14px; border-left: 1px solid transparent; text-decoration: none; }
  .rail li a:hover { border-color: var(--signal); color: #fff; }
  .person { margin: 0 0 20px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); }
  .person p { margin: 0 0 8px; }
  .person p:last-child { margin: 0; }
  .person strong { color: #fff; }
}
.rail-cta { margin: 0; }

/* ── Cards: a guide's photo, then what it is ── */
.cards { display: flex; flex-wrap: wrap; margin: 24px -10px 0; padding: 0; list-style: none; }
.cards li { display: flex; flex: 1 1 300px; max-width: 100%; margin: 0 10px 20px; }
@media (min-width: 1000px) { .cards li { flex-basis: 30%; max-width: calc(33.333% - 20px); } }
/* A collection with one guide shows it wide: the TV on the left, the words beside it. */
@media (min-width: 760px) {
  .collection .cards li:only-child { flex-basis: 100%; max-width: calc(100% - 20px); }
  .collection .cards li:only-child .card { flex-direction: row; align-items: center; padding: 20px; }
  .collection .cards li:only-child .photo { flex: 0 0 52%; margin: 0 32px 0 0; }
  .collection .cards li:only-child .t { font-size: 26px; }
}
.card { display: flex; flex-direction: column; width: 100%; padding: 16px 16px 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--glass);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); color: var(--ink); text-decoration: none; transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.card .photo, .people .photo { display: block; margin: 0 0 16px; overflow: hidden; border-radius: 12px; }
.card .body { display: flex; flex: 1 1 auto; flex-direction: column; }
.card .meta { color: var(--sky); font: 500 11px/1.3 var(--hud); letter-spacing: .16em; text-transform: uppercase; }
.card .t { margin: 8px 0 6px; font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
.card .d { color: #b8b8b8; font-size: 15px; line-height: 1.55; }
.card .who { margin-top: auto; padding-top: 14px; color: var(--muted); font: 500 11px/1.4 var(--hud); letter-spacing: .1em; text-transform: uppercase; }
.related { margin-top: 96px; padding-top: 28px; border-top: 1px solid var(--line); }
.related > h2 { margin: 0; font-size: 28px; letter-spacing: -.015em; }

/* ── Index: the intro over the Earthrise, the people, then each collection ── */
.intro { position: relative; max-width: 46rem; padding: 96px 0 40px; }
.horizon { position: absolute; top: 0; left: 0; z-index: -1; width: 100%; height: 760px; overflow: hidden; pointer-events: none; opacity: .55;
  background: linear-gradient(#000 0%, #0000 25%, #0000 50%, #000 92%), url(/photos/andromeda.webp) center / cover no-repeat; }
@media (max-width: 700px) { .horizon { height: 560px; } }
.intro .lede { margin: 22px 0 0; color: #d0d0d0; font: 400 clamp(19px, 2.2vw, 22px)/1.5 var(--serif); }
.people { margin: 32px 0 0; }
.people ul { display: flex; flex-wrap: wrap; margin: 16px -8px 0; padding: 0; list-style: none; }
.people li { display: flex; flex: 1 1 220px; margin: 0 8px 16px; }
.people a { display: flex; flex-direction: column; width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--glass); color: var(--ink); text-decoration: none; transition: border-color .2s; }
.people a:hover { border-color: var(--line-strong); }
.people .t { font-size: 18px; font-weight: 700; }
.people .d { color: var(--muted); font-size: 14px; }
.people .go { margin-top: auto; padding-top: 12px; color: var(--link); font-size: 14px; line-height: 1.4; }
.people .go::after { content: ' →'; }
.collection { margin-top: 72px; }
.collection h2 { max-width: 40rem; margin: 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.count { margin-left: 10px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); letter-spacing: .1em; }
main > .fiction { max-width: 46rem; margin-top: 56px; }

/* ── Call to action, then the home page's footer ── */
.btn { display: inline-block; padding: 12px 22px; border: 1px solid #fff; border-radius: 999px; background: #fff; color: #000; font-weight: 600; font-size: 15px; text-decoration: none; }
.btn:hover { opacity: .85; }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: #fff; }
.btn + .btn { margin-left: 10px; }
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; margin: 96px 0 0; padding: 32px; border: 1px solid var(--line); border-radius: 24px;
  background: radial-gradient(120% 140% at 100% 100%, #1b2533 0%, #0b0b0e 60%); }
.cta-band > div { flex: 1 1 420px; max-width: 40rem; margin-right: 24px; }
.cta-band h2 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.2; letter-spacing: -.02em; }
.cta-band p { color: #c8c8c8; }
.cta-band .ctas { margin: 16px 0 0; }

.site-foot { position: relative; margin-top: 112px; padding: 48px 24px 24px; background: #0a0a0ae6; color: #d4d4d4; font-size: 14px; }
.site-foot::before { content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, #7fa7d9, transparent); }
.foot-cols, .foot-base { display: flex; max-width: 1040px; margin: 0 auto; }
.foot-cols > * { flex: 1 1 0; }
.foot-cols > * + * { margin-left: 32px; }
.foot-about { flex-grow: 1.6; }
.foot-about .brand { display: inline-flex; align-items: center; color: #fff; text-decoration: none; font-weight: 600; font-size: 16px; }
.foot-about .logo { width: 22px; height: 22px; margin-right: 8px; }
.foot-about p { color: var(--muted); max-width: 320px; margin: 10px 0 0; }
.site-foot h3 { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #7fa7d9; }
.site-foot nav a { display: block; color: #d4d4d4; text-decoration: none; padding: 3px 0; }
.site-foot a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-base { justify-content: space-between; flex-wrap: wrap; margin-top: 40px; padding-top: 16px; border-top: 1px solid #ffffff1f; color: var(--muted); font-size: 12px; }
.foot-base a { color: var(--muted); text-decoration: none; }
.site-foot .langs a { display: inline; padding: 0; color: var(--muted); font-size: 13px; }
.site-foot .langs a + a { margin-left: 14px; }
.site-foot .langs a[aria-current] { color: #fff; }

/* ── Phones ── */
@media (max-width: 700px) {
  :root { --mast: 56px; }
  .mast { padding: 0 16px; }
  .mast .brand .wordmark { font-size: 0; letter-spacing: 0; }
  .mast .brand .logo { width: 22px; height: 22px; margin: 0; }
  .mast nav a:not(.pill) { display: none; }
  .wrap { padding: 0 16px; }
  .article-head { padding-top: 28px; }
  .prose { font-size: 18.5px; }
  .prose h2 { font-size: 24px; }
  .steps li { padding-left: 48px; }
  .box { padding: 18px 18px 4px; }
  .shot.tv .device { padding: 5px; border-radius: 10px; }
  .intro { padding-top: 56px; }
  .cta-band { padding: 24px 20px; }
  .btn { margin-top: 8px; }
  .foot-cols { flex-wrap: wrap; } .foot-cols > * { flex: 1 1 40%; margin: 0 0 24px; } .foot-cols > * + * { margin-left: 0; }
  .foot-about { flex-basis: 100%; } .foot-base span + span { display: block; width: 100%; margin: 4px 0; }
}
@media (prefers-reduced-motion: reduce) { .card, .people a { transition: none; } .card:hover { transform: none; } }

/* ── Print: a clean handout ── */
@media print {
  :root { --ink: #000; --text: #111; --muted: #444; --sky: #333; --link: #000; --line: #bbb; }
  html, body { background: #fff; color: #000; }
  .sky, .horizon, .progress, .mast, .skip, .rail, .related, .cta-band, .site-foot, .crumbs { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .article-head h1 { font-size: 26pt; color: #000; }
  .deck { color: #333; font-size: 13pt; }
  .prose { max-width: none; color: #111; font-size: 11pt; }
  .prose h2, .prose strong, .pull blockquote, .box.limits h2 { color: #000; }
  .prose h2 { break-after: avoid; }
  .box, .pull, .shot, pre { break-inside: avoid; background: #fff !important; }
  .shot .device { box-shadow: none !important; background: #fff; }
  .shot.tv::after { display: none; }
  .hero-photo { max-width: 120mm; }
  .prose a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: 8.5pt; color: #444; }
}
