/* M42N: paper for words, night for stars. */
/* Fonts are self-hosted (no third-party request blocks the first paint). Latin subsets from Google Fonts,
   SIL Open Font License 1.1: see fonts/LICENSE.txt. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/plex-mono-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/plex-mono-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f1eee8;
  --paper-2: #e7e3db;
  --ink: #1c1c1c;
  --night: #161616;
  --night-2: #202020;
  --ink-muted: #6b6860;
  --paper-muted: #9a968e;
  --warm: #ff7a45;
  --rule-day: rgba(28, 28, 28, 0.14);
  --rule-night: rgba(241, 238, 232, 0.12);
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --spine-x: 40px;
  --gutter: 96px;
  --a: 0;
  --b: 0;
  --c: 0;
  --q: 1;
  --progress: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html.lerp {
  scroll-behavior: auto;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3 {
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(44px, 6.4vw, 92px);
}

h2 {
  font-size: clamp(36px, 5vw, 72px);
  max-width: 14ch;
}

h3 {
  font-size: 28px;
  letter-spacing: -0.02em;
}

h3.big {
  font-size: clamp(30px, 3.6vw, 48px);
  max-width: 13ch;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--warm);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 13px;
}

.skip:focus {
  top: 16px;
}

/* Catalogue labels: the small mono lines over every heading. */
.cat {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  /* Written in capitals in the markup: text-transform would turn α into Α. */
  color: var(--ink-muted);
  margin-bottom: 22px;
}

.night .cat {
  color: var(--paper-muted);
}

.lede,
.body {
  max-width: 46ch;
  color: var(--ink-muted);
  margin-top: 24px;
}

.night .body {
  color: var(--paper-muted);
}

.lede {
  font-size: 19px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}

.btn--sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.btn--ink {
  background: var(--ink);
  color: var(--paper);
}

.btn--ink:hover {
  background: #000;
}

.btn--ghost {
  background: var(--paper-2);
  color: var(--ink);
}

.btn--ghost:hover {
  background: #dcd7cd;
}

.btn--warm {
  background: var(--warm);
  color: #1a0d06;
}

.btn--warm:hover {
  background: #ff9466;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}

/* The floating toolbar */
.bar {
  position: fixed;
  top: 14px;
  left: 50%;
  translate: -50% 0;
  z-index: 50;
  width: min(640px, calc(100% - 32px));
  background: var(--night);
  color: var(--paper);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.bar__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 2px 6px 8px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.logo__mark {
  width: 20px;
  height: 20px;
  fill: currentColor;
  filter: drop-shadow(0 0 3px rgba(241, 238, 232, 0.5));
}

.bar__nav {
  display: flex;
  gap: 18px;
  margin-inline: auto;
}

.bar__nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper-muted);
  transition: color 0.2s;
}

.bar__nav a:hover {
  color: var(--paper);
}

.bar__row .btn {
  margin-left: auto;
}

.bar__nav + .btn {
  margin-left: 0;
}

.bar__ticker {
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  line-height: 18px;
}

.ticker {
  display: flex;
  width: max-content;
}

.motion .ticker {
  animation: ticker 28s linear infinite;
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 720px) {
  .bar__nav {
    display: none;
  }

  .bar__nav + .btn {
    margin-left: auto;
  }
}

/* The spine: Orion from head to feet, drawn as you scroll. */
.spine {
  position: fixed;
  top: 0;
  bottom: 0;
  left: var(--spine-x);
  width: 1px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.28);
  mix-blend-mode: difference;
  pointer-events: none;
}

.spine__fill {
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleY(var(--progress));
  transform-origin: top;
  will-change: transform;
}

.mark {
  position: absolute;
  left: calc(var(--spine-x) - 4.5px);
  top: 128px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  z-index: 21;
  box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.6);
}

.mark--warm {
  background: var(--warm);
  mix-blend-mode: normal;
  box-shadow: 0 0 14px 3px rgba(255, 122, 69, 0.55);
}

.mark--empty {
  background: transparent;
  border: 1px dashed #fff;
  box-shadow: none;
}

/* Layout */
.section {
  position: relative;
  padding: 120px 0 140px;
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter) 48px;
}

.day {
  background: var(--paper);
  color: var(--ink);
}

.night {
  background-color: var(--night);
  background-image: radial-gradient(rgba(241, 238, 232, 0.09) 1px, transparent 1.2px);
  background-size: 22px 22px;
  color: var(--paper);
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: start;
}

@media (max-width: 900px) {
  :root {
    --spine-x: 14px;
    --gutter: 36px;
  }

  .wrap {
    padding-right: 16px;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .section {
    padding: 96px 0 104px;
  }

  .mark {
    top: 100px;
  }
}

/* Hero: the head. Everything here animates with transform and opacity only, so it stays on the GPU.
   --a: the paper side slides away; --b: the rings fly outward; --k: Meissa opens into day. */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
}

.motion .hero {
  height: 300vh;
}

.hero__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--night);
  contain: layout paint;
}

.hero__sky {
  position: absolute;
  inset: 0;
  /* Without JavaScript: faint orbits around the star. The canvas tunnel covers them when it runs. */
  background: repeating-radial-gradient(
    circle at 75% 50%,
    transparent 0 46px,
    rgba(241, 238, 232, 0.07) 46px 47px
  );
}

.tunnel-on .hero__sky {
  background: none;
}

.hero__star {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 16px 6px rgba(241, 238, 232, 0.5);
  transform: translate3d(calc(25vw * (1 - var(--a))), 0, 0) scale(var(--glow, 1));
  will-change: transform;
}

/* The tunnel: rings of text flowing outward from Meissa, drawn on a canvas. */
.tunnel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  opacity: calc(1 - var(--b) * 1.1);
}

.tunnel-on .tunnel {
  display: block;
}

.hero__sky {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.tunnel-on .hero__sky {
  cursor: crosshair;
}

/* "Click & hold" label that follows the pointer over the sky. */
.tip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: none;
  padding: 6px 8px 7px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  will-change: transform;
}

.tunnel-on .tip {
  display: block;
}

.tip.is-on {
  opacity: 1;
}

.tip__bar {
  display: block;
  height: 2px;
  margin-top: 5px;
  background: var(--warm);
  transform: scaleX(var(--hold, 0));
  transform-origin: left;
}

/* Meissa opening into day: one large paper disc scaled up from a point. */
.hero__open {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--d, 2400px);
  height: var(--d, 2400px);
  margin: calc(var(--d, 2400px) / -2) 0 0 calc(var(--d, 2400px) / -2);
  border-radius: 50%;
  background: var(--paper);
  transform: scale(var(--k, 0));
  will-change: transform;
}

.hero__day {
  position: absolute;
  inset: 0 50% 0 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 110px 48px 48px var(--gutter);
  background: var(--paper);
  transform: translate3d(calc(-100% * var(--a)), 0, 0);
  will-change: transform;
}

.hero__copy {
  opacity: calc(1 - var(--a) * 1.5);
}

.hero__copy h1 {
  max-width: 10ch;
}

.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 40px 0 0;
  max-width: 520px;
  border-top: 1px dashed var(--rule-day);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
}

.specs div {
  padding: 10px 12px 10px 0;
  border-bottom: 1px dashed var(--rule-day);
}

.specs dt {
  color: var(--ink-muted);
  text-transform: uppercase;
}

.specs dd {
  margin: 2px 0 0;
}

.hint {
  position: absolute;
  bottom: 28px;
  left: var(--gutter);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.hint__dot {
  width: 12px;
  height: 12px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.hint__dot::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

@media (max-width: 900px) {
  .hero__star {
    transform: translate3d(0, calc(28vh * (1 - var(--a))), 0) scale(var(--glow, 1));
  }

  .hero__day {
    inset: 0 0 44% 0;
    padding: 100px 16px 20px var(--gutter);
    justify-content: flex-end;
    transform: translate3d(0, calc(-100% * var(--a)), 0);
  }

  .hint,
  .specs {
    display: none;
  }

  .lede {
    font-size: 17px;
    margin-top: 16px;
  }

  .actions {
    margin-top: 24px;
  }
}

@media (max-width: 900px) and (max-height: 760px) {
  .hero__day .lede {
    display: none;
  }
}

@media (max-height: 880px) {
  .hint {
    display: none;
  }
}

/* Observation log */
.log {
  font-family: var(--mono);
  font-size: 13px;
  border: 1px dashed var(--rule-day);
  background: rgba(255, 255, 255, 0.35);
  padding: 20px 22px;
}

.log__head,
.log__foot {
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  font-size: 11.5px;
}

.log__head {
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--rule-day);
}

.log__foot {
  padding-top: 14px;
}

.log__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px 16px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--rule-day);
}

.log__n {
  color: var(--ink-muted);
}

.log__star {
  letter-spacing: 0.04em;
}

.log__star--warm {
  color: #c4501f;
}

.log__star--warm::before {
  content: "● ";
  color: var(--warm);
}

.log__what {
  font-weight: 500;
  letter-spacing: 0.06em;
}

.log__row p {
  grid-column: 2 / -1;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink-muted);
}

@media (max-width: 520px) {
  .log__row {
    grid-template-columns: 1fr auto;
  }

  .log__n {
    grid-column: 1 / -1;
  }

  .log__row p {
    grid-column: 1 / -1;
  }
}

/* Belt */
.belt {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 56px 0 24px;
  overflow: visible;
}

.belt line {
  stroke: rgba(241, 238, 232, 0.35);
  stroke-width: 1;
  stroke-dasharray: 2 6;
}

.belt circle {
  fill: var(--paper);
  filter: drop-shadow(0 0 8px rgba(207, 224, 255, 0.9));
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  border: 1px solid var(--rule-night);
  border-radius: 8px;
  padding: 28px 24px 24px;
  background: var(--night-2);
}

.card--core {
  border-color: rgba(241, 238, 232, 0.32);
  background: #262626;
}

.card h3 {
  margin-bottom: 14px;
}

.card > p:not(.cat) {
  color: var(--paper-muted);
  font-size: 15.5px;
}

.card .aside {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule-night);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .belt {
    margin-top: 36px;
  }
}

/* Work: the sword and M42 */
.work {
  position: relative;
  padding-bottom: 140px;
}

.motion .work__track {
  height: 200vh;
}

.work__pin {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 120px 0 40px;
}

.motion .work__pin {
  position: sticky;
  top: 0;
}

.work__grid {
  display: grid;
  /* minmax(0, …): the counter's changing width must never move the nebula. */
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 40px;
  align-items: center;
}

.work__copy {
  container-type: inline-size;
}

/* Sized for its widest value, "100" (3 glyphs, 0.6em each), so counting never changes its width. */
.count {
  font-family: var(--mono);
  font-weight: 400;
  font-size: min(200px, calc(100cqw / 2.4));
  width: 3ch;
  text-align: right;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 36px 0 12px;
  font-variant-numeric: tabular-nums;
}

.nebula {
  margin: 0;
  font-family: var(--mono);
  line-height: 1.12;
  color: #f4dfe2;
  opacity: calc(0.25 + var(--q) * 0.75);
  overflow: hidden;
  justify-self: center;
  text-shadow: 0 0 8px rgba(232, 121, 143, 0.6);
  will-change: opacity;
}

.nebula .young {
  color: #fff;
  text-shadow: 0 0 6px #cfe0ff, 0 0 14px #cfe0ff;
}

.case {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  border: 1px solid var(--rule-night);
  border-radius: 10px;
  overflow: hidden;
  background: var(--night-2);
  margin-top: 40px;
}

.case__shot {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 90% at 30% 20%, #34302c 0%, transparent 60%),
    linear-gradient(135deg, #2a2724, #1b1a19);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--paper-muted);
}

.case__body {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

.case__body h3 {
  margin-bottom: 10px;
}

.case__body > p:not(.cat) {
  color: var(--paper-muted);
}

.facts {
  list-style: none;
  margin: 24px 0;
  padding: 0;
  font-size: 15px;
}

.facts li {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px dashed var(--rule-night);
}

.facts span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--paper-muted);
  padding-top: 2px;
}

.link {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-underline-offset: 4px;
}

.forming {
  margin: 28px 0 0;
  text-align: center;
}

@media (max-width: 900px) {
  .work__grid,
  .case {
    grid-template-columns: 1fr;
  }

  .work__pin {
    padding-top: 100px;
  }
}

/* Feet */
.feet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 24px;
}

.feet > div {
  border-top: 1px solid var(--rule-day);
  padding-top: 28px;
}

@media (max-width: 900px) {
  .feet {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* The name */
.name {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.sky {
  margin: 0;
  font-family: var(--mono);
  line-height: 1.2;
  color: var(--paper);
  overflow: hidden;
}

@media (max-width: 900px) {
  .name {
    grid-template-columns: 1fr;
  }
}

/* Contact */
.contact__grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 56px;
  align-items: center;
}

.seed {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 1px dashed var(--ink);
  position: relative;
  opacity: 0.7;
}

.seed::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--ink);
}

.motion .seed {
  animation: pulse 3.6s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    transform: scale(1.08);
    opacity: 0.35;
  }
}

.mail {
  display: inline-block;
  margin-top: 28px;
  font-size: clamp(28px, 4.4vw, 60px);
  letter-spacing: -0.03em;
  text-decoration: none;
  border-bottom: 2px solid var(--warm);
  line-height: 1.15;
}

@media (max-width: 640px) {
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .seed {
    width: 80px;
    height: 80px;
  }
}

/* Footer */
.foot {
  padding: 28px 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--paper-muted);
}

.foot__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  justify-content: space-between;
}

/* Reveal on scroll */
.motion .reveal,
.motion .log__row {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.7s ease, translate 0.7s ease;
  transition-delay: calc(var(--d, 0) * 120ms);
}

.motion .reveal.is-in,
.motion .is-in .log__row {
  opacity: 1;
  translate: 0 0;
}

.motion .is-in .log__row {
  transition-delay: calc(200ms + var(--d, 0) * 260ms);
}

/* Dense details: numbered lists, deliverables, the spec catalogue, fact rows. */
.ticks {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  max-width: 520px;
  font-size: 15px;
  border-top: 1px dashed var(--rule-day);
}

.ticks li {
  display: flex;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--rule-day);
}

.ticks span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
  padding-top: 2px;
}

.ticks--inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  margin-top: 20px;
}

.deliver {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--paper);
}

.deliver li {
  padding: 7px 0;
  border-top: 1px dashed var(--rule-night);
}

.deliver li::before {
  content: "✦ ";
  color: var(--paper-muted);
}

.belt text {
  fill: var(--paper-muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-anchor: middle;
}

.spec {
  margin-top: 72px;
  border: 1px solid var(--rule-night);
  border-radius: 10px;
  padding: 24px 28px 8px;
  background: rgba(22, 22, 22, 0.75);
}

.spec__head {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--rule-night);
  margin-bottom: 4px;
}

.spec__head .cat {
  margin-bottom: 16px;
}

.spec dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
}

.spec dl > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--rule-night);
}

.spec dt {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.spec dt span {
  color: var(--paper-muted);
  margin-right: 10px;
}

.spec dd {
  margin: 0;
  color: var(--paper-muted);
  font-size: 15px;
}

.facts-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 32px 0 0;
  max-width: 520px;
  border-top: 1px dashed var(--rule-night);
  border-bottom: 1px dashed var(--rule-night);
  font-family: var(--mono);
}

.facts-row div {
  padding: 12px 10px 12px 0;
}

.facts-row dt {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper-muted);
}

.facts-row dd {
  margin: 4px 0 0;
  font-size: 17px;
}

.facts-row--night {
  margin-bottom: 28px;
}

.checks {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.checks li {
  padding: 9px 0;
  border-top: 1px dashed var(--rule-day);
}

.checks li::before {
  content: "[✓] ";
  color: var(--ink-muted);
}

/* The constellation chart */
.sky .k-field {
  color: rgba(241, 238, 232, 0.28);
}

.sky .k-line {
  color: rgba(241, 238, 232, 0.55);
}

.sky .k-star {
  color: #fff;
  text-shadow: 0 0 6px rgba(207, 224, 255, 0.9);
}

.sky .k-warm {
  color: var(--warm);
  text-shadow: 0 0 8px rgba(255, 122, 69, 0.8);
}

.sky .k-label {
  color: var(--paper-muted);
}

.sky .k-note {
  color: rgba(241, 238, 232, 0.4);
}

@media (max-width: 900px) {
  .spec dl {
    grid-template-columns: 1fr;
  }

  .spec dl > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .spec {
    padding: 20px 18px 4px;
  }
}

@media (max-width: 520px) {
  .facts-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ticks--inline {
    grid-template-columns: 1fr;
  }
}

/* ASCII art fills its column exactly: IBM Plex Mono glyphs are 0.6em wide. */
.fit {
  container-type: inline-size;
  width: 100%;
  min-width: 0;
}

.fit--nebula .nebula {
  font-size: calc(100cqw / 96 / 0.6);
}

.fit--sky .sky {
  font-size: calc(100cqw / 86 / 0.6);
}
