/* Matches anomalyresearch.io: black field, white type, Inter, sticky lockup. */
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #8a8a8a;
  --rule: rgba(255, 255, 255, 0.12);
  --wrap: 960px;
  --text: 46rem;
  --pad: clamp(1.25rem, 5vw, 3.5rem);
  --mark: 56px;
  --name: 29px;
  --header-h: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }
img, svg { max-width: 100%; }
code, pre, .hash, .held-block strong, .moment .held-line strong, .facts dd {
  font-variant-numeric: tabular-nums;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--pad));
  margin-inline: auto;
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--fg); color: var(--bg); padding: 0.5rem 0.75rem; z-index: 10;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.fixture-banner {
  margin: 0;
  padding: 0.55rem 1rem;
  text-align: center;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.85rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  padding-top: env(safe-area-inset-top);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  min-height: var(--header-h);
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
.lockup {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--mark) * 0.3);
  text-decoration: none;
  flex: none;
}
.mark {
  display: block;
  width: calc(var(--mark) * 0.983);
  height: var(--mark);
  overflow: hidden;
  position: relative;
  flex: none;
}
.mark img {
  position: absolute;
  width: calc(var(--mark) * 1.2853);
  height: calc(var(--mark) * 1.2853);
  max-width: none;
  left: calc(var(--mark) * -0.151);
  top: calc(var(--mark) * -0.1362);
}
.name {
  display: flex;
  flex-direction: column;
  font-size: var(--name);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.92;
  white-space: nowrap;
  margin-top: -0.04em;
}
.name > span { display: block; }
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a {
  text-decoration: none;
  color: var(--fg);
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--fg); }

main { padding-bottom: clamp(4rem, 10vw, 7rem); }
h1 {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0.15em 0 0.35em;
}
h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 0.45em; }
.kicker, .label {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: none;
}
.lede { color: var(--fg); max-width: 40rem; }
.section-title { margin: 2.5rem 0 1rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 2rem 2.5rem;
  align-items: center;
  padding: clamp(2rem, 6vw, 4rem) 0 1rem;
}
.seal {
  background: var(--bg);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.seal img, .seal svg { width: 100%; height: auto; display: block; }
.controls { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.6rem 0 1rem; }
.seg { display: inline-flex; border: 1px solid var(--rule); }
button, .button {
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  min-height: 2.4rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.seg button { border: 0; border-radius: 0; }
button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
button:hover, .button:hover { border-color: var(--fg); }
.button.quiet { color: var(--muted); }
.when { color: var(--muted); margin: 0; font-variant-numeric: tabular-nums; }
.held-block { margin: 0.4rem 0 0.8rem; }
.held-block span, .meter-top span { color: var(--muted); font-size: 0.85rem; }
.held-block strong, .moment .held-line strong {
  display: block;
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.meters { display: grid; gap: 0.7rem; margin: 1rem 0; }
.meter-top { display: flex; gap: 0.5rem; align-items: baseline; }
.meter-top strong { margin-left: auto; font-weight: 600; }
.meter-top em { font-style: normal; font-size: 0.75rem; background: var(--fg); color: var(--bg); border-radius: 999px; padding: 0.15rem 0.45rem; }
.track { height: 2px; background: var(--rule); }
.track span { display: block; height: 100%; background: var(--fg); }
.swatch { width: 0.45rem; height: 0.45rem; border-radius: 50%; display: inline-block; background: var(--fg); }
.swatch.ground, .swatch.solar, .swatch.space, .swatch.seismic, .swatch.atmosphere { background: var(--fg); }
.hash { margin: 0.7rem 0; font-size: 0.85rem; word-break: break-all; }
.hash span:first-child { display: block; color: var(--muted); font-size: 0.8rem; }
.status { min-height: 1.2em; color: var(--muted); margin: 0 0 0.4rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0.5rem 0 1.5rem; border-top: 1px solid var(--rule); }
.card, .use, .panel {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
}
.cards .card { padding-right: 1.25rem; }
.card p, .use p { color: var(--fg); }
.warn { border-bottom: 1px solid var(--rule); }
.use { margin: 0 0 0.5rem; }
.use h2 { display: flex; gap: 0.6rem; align-items: baseline; }
.num { color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.works { margin: 0.4rem 0 0.8rem; padding-left: 1.1rem; }
.works li { margin: 0.2em 0; }

.panel label { display: block; margin: 0.8rem 0 0.3rem; color: var(--muted); font-size: 0.9rem; }
input[type="file"], input[type="text"], select, textarea {
  width: 100%;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.65rem 0.75rem;
  font: inherit;
}
textarea { min-height: 10rem; font-size: 0.85rem; }
.drop { border: 1px solid var(--rule); padding: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.8rem; }
.checks { list-style: none; padding: 0; margin: 0.8rem 0; }
.checks li { padding: 0.25rem 0; font-variant-numeric: tabular-nums; }
.checks li.ok { color: var(--fg); }
.checks li.bad { color: var(--muted); }
.receipt-view { max-height: 18rem; }

pre {
  overflow: auto;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: transparent;
  font-size: 0.82rem;
  line-height: 1.45;
}
.prose { padding-top: 2rem; }
.prose h2 { margin-top: 1.6em; }
.prose a, .use a, .card a, .site-footer a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: rgba(255, 255, 255, 0.45);
}
.prose a:hover, .site-footer a:hover { text-decoration-color: var(--fg); }

.moment-grid { display: grid; grid-template-columns: minmax(220px, 420px) minmax(160px, 220px); gap: 1.5rem; align-items: start; padding-top: 2rem; }
.moment figure { margin: 0; }
.moment figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 0.4rem; }
.qr-card { background: var(--fg); color: var(--bg); padding: 0.75rem; }
.qr-card svg { width: 100%; height: auto; display: block; }
.qr-card figcaption { color: var(--bg); }
.facts { margin: 1rem 0; border-top: 1px solid var(--rule); }
.facts div { display: grid; grid-template-columns: 7rem 1fr; gap: 0.5rem; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
details { margin-top: 1rem; }
summary { cursor: pointer; color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.75rem;
  padding-bottom: max(1.75rem, env(safe-area-inset-bottom));
}

@media (max-width: 800px) {
  .hero, .cards, .moment-grid, .facts div { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  :root { --mark: 48px; --name: 25px; --header-h: 148px; }
  body { font-size: 1rem; }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding-top: 1rem;
    padding-bottom: 0.85rem;
  }
  .nav { gap: 0.75rem 1.1rem; font-size: 0.92rem; }
  .footer-inner { flex-direction: column; }
}
