/*
 * The public site's look: the same gold-on-obsidian identity as the app, tuned for long reading.
 * Light (warm paper, dark ink, deep gold) is the default; dark follows the reader's system setting.
 * Mobile first. Fonts are served from this site; nothing loads from anywhere else.
 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/archive/assets/fonts/inter-latin-wght-normal.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: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/archive/assets/fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/archive/assets/fonts/cinzel-latin-700-normal.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 {
  --bg: #f7f3ea;
  --surface: #fffdf8;
  --ink: #1f1b14;
  --ink-2: #51493b;
  --line: #ddd2bc;
  --accent: #8a6414;
  --link: #6f4a00;
  --link-hover: #3d2900;
  --focus: #1d5fd1;
  --head-bg: #100e0b;
  --head-ink: #f6e7c1;
  --head-gold: #e9c46a;
  --draft-bg: #fff3d6;
  --draft-ink: #6b4a00;
  --official-bg: #e6f0ff;
  --official-ink: #123f86;
  --public-bg: #fde9e2;
  --public-ink: #8a2a12;
  --machine-bg: #ece9f7;
  --machine-ink: #3b2f7a;
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color-scheme: light dark;
}
:root[data-theme='light'] {
  color-scheme: light;
}
:root[data-theme='dark'] {
  color-scheme: dark;
}

/* dark: the reader's system setting (System, the default), unless they picked Light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #100e0b;
    --surface: #18150f;
    --ink: #f3e6c6;
    --ink-2: #cbbd9a;
    --line: #3a3222;
    --accent: #e9c46a;
    --link: #f0cf7a;
    --link-hover: #fff0c2;
    --focus: #8ab4ff;
    --head-bg: #06060a;
    --draft-bg: #3a2c0c;
    --draft-ink: #ffd98a;
    --official-bg: #13254a;
    --official-ink: #b9d3ff;
    --public-bg: #3d1a10;
    --public-ink: #ffc0a8;
    --machine-bg: #241e44;
    --machine-ink: #d2c8ff;
  }
}
/* dark: picked by the reader with the theme switch */
:root[data-theme='dark'] {
  --bg: #100e0b;
  --surface: #18150f;
  --ink: #f3e6c6;
  --ink-2: #cbbd9a;
  --line: #3a3222;
  --accent: #e9c46a;
  --link: #f0cf7a;
  --link-hover: #fff0c2;
  --focus: #8ab4ff;
  --head-bg: #06060a;
  --draft-bg: #3a2c0c;
  --draft-ink: #ffd98a;
  --official-bg: #13254a;
  --official-ink: #b9d3ff;
  --public-bg: #3d1a10;
  --public-ink: #ffc0a8;
  --machine-bg: #241e44;
  --machine-ink: #d2c8ff;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 16px;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 1.6em 0 0.5em;
}
h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4.6vw, 2.4rem);
  letter-spacing: 0.01em;
  margin-top: 0.4em;
}
.doc h1 {
  font-size: clamp(1.45rem, 3.6vw, 2.05rem);
}
h2 {
  font-size: 1.35rem;
  padding-bottom: 0.25em;
  border-bottom: 1px solid var(--line);
}
h3 {
  font-size: 1.1rem;
}
p,
li,
dd {
  max-width: 70ch;
}
code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--focus);
}
.skip:focus {
  top: 8px;
}
.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.muted {
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- header */
.site-head {
  background: var(--head-bg);
  color: var(--head-ink);
  border-bottom: 2px solid var(--head-gold);
}
.head-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-top: 10px;
  padding-bottom: 12px;
}
.brand {
  color: var(--head-gold);
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
}
.brand-tag {
  color: var(--head-ink);
  font-size: 0.8rem;
  opacity: 0.85;
  line-height: 1.35;
}
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.main-nav a {
  color: var(--head-ink);
  text-decoration: none;
  display: inline-block;
  padding: 4px 0;
  font-weight: 500;
  white-space: nowrap;
}
.main-nav a:hover {
  color: var(--head-gold);
  text-decoration: underline;
}
.site-head :focus-visible {
  outline-color: var(--head-gold);
}
.search-box {
  position: relative;
}
.search-box label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.search-box .hint {
  display: none;
}
.search-row {
  display: flex;
  gap: 6px;
}
.search-row input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
}
.search-row button,
button.sort {
  font: inherit;
}
.search-row button {
  padding: 8px 14px;
  border-radius: 4px;
  border: 1px solid var(--head-gold);
  background: var(--head-gold);
  color: #1b1405;
  font-weight: 600;
  cursor: pointer;
}
.search-page .search-row button {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}
.search-results {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  padding: 8px 12px;
  max-height: 70vh;
  overflow-y: auto;
}
.search-results ul,
.search-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.search-results li,
.search-list li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.search-results p {
  margin: 0 0 4px;
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------- breadcrumbs */
.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  margin: 12px 0 0;
  padding: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.crumbs li + li::before {
  content: '/';
  margin: 0 8px;
  color: var(--line);
}

/* ---------------------------------------------------------------- page parts */
main {
  padding-bottom: 48px;
}
.page-head {
  margin-bottom: 8px;
}
.eyebrow {
  margin: 16px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.lede {
  font-size: 1.15rem;
  line-height: 1.55;
}
.aka,
.built {
  color: var(--ink-2);
  font-size: 0.95rem;
  margin: 4px 0;
}
.review-state {
  margin: 12px 0;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  font-weight: 500;
}
.review-state.draft {
  background: var(--draft-bg);
  color: var(--draft-ink);
  border-left-color: var(--draft-ink);
  font-weight: 600;
}
.review-state.official {
  border-left-color: var(--official-ink);
}
.summary h2 {
  font-size: 1.1rem;
}
.badge {
  display: inline-block;
  padding: 0.1em 0.55em;
  border-radius: 3px;
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 0.08em;
  white-space: nowrap;
}
.badge-draft {
  background: var(--draft-bg);
  color: var(--draft-ink);
}
.badge-official {
  background: var(--official-bg);
  color: var(--official-ink);
}
.badge-public {
  background: var(--public-bg);
  color: var(--public-ink);
}
.badge-machine {
  background: var(--machine-bg);
  color: var(--machine-ink);
}
.tag {
  font-size: 0.75em;
  padding: 0 0.4em;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink-2);
  white-space: nowrap;
}
.tag-warn {
  border-color: var(--draft-ink);
  color: var(--draft-ink);
}
.reach {
  display: block;
  color: var(--ink-2);
  font-size: 0.92rem;
}
/* Long file names and file ids break anywhere rather than push the page sideways on a phone. */
.crumbs ol,
.facts code,
.doc h1,
.card h3,
table.data th[scope='row'] {
  overflow-wrap: anywhere;
}

.facts {
  display: grid;
  gap: 0;
  margin: 16px 0;
  border-top: 1px solid var(--line);
}
.facts > div {
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.facts dd {
  margin: 0;
}

.toc {
  margin: 20px 0;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.toc .toc-h {
  margin: 0 0 6px;
  font-size: 0.85rem;
  border: 0;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.toc a {
  display: inline-block;
  padding: 4px 0;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--accent);
}
.timeline li {
  position: relative;
  padding: 2px 0 14px 18px;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline p {
  margin: 0 0 4px;
}
.timeline .when {
  font-weight: 700;
}
.src,
.credit {
  font-size: 0.92rem;
  color: var(--ink-2);
}
.cite {
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.plain-list > li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.plain-list > li > p {
  margin: 0 0 4px;
}
.item-title {
  font-weight: 600;
}
.media-kind {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}
.sources {
  padding-left: 1.6em;
  margin: 0;
}
.sources li {
  padding: 5px 0;
}
.sources .held {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-2);
}
.cite-line {
  max-width: 70ch;
  margin: 0;
  font-size: 0.95rem;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.more {
  margin-top: 28px;
}

/* ---------------------------------------------------------------- answer box, citation, words */
.answer {
  max-width: calc(70ch + 32px);
  margin: 16px 0;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--official-ink);
  border-radius: 4px;
}
.answer .answer-h {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.answer p {
  margin: 0 0 6px;
}
.answer .answer-note {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--ink-2);
}
.cite-label {
  margin: 12px 0 4px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.cite-line,
.cite-bib {
  overflow-wrap: anywhere;
}
.cite-bib {
  max-width: 70ch;
  margin: 0;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.cite-copy {
  margin-left: 8px;
  min-height: 32px;
  padding: 4px 12px;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}
.cite-copy:hover {
  border-color: var(--link);
}
.cite-source {
  margin: 2px 0 6px;
}
.cite-source > summary {
  display: inline-block;
  font-size: 0.9rem;
}
.ref-list p {
  max-width: 70ch;
  margin: 0 0 10px;
  padding-left: 2em;
  text-indent: -2em;
  overflow-wrap: anywhere;
}
@media (pointer: coarse) {
  .cite-copy,
  .cite-source > summary {
    min-height: 44px;
    line-height: 32px;
  }
}
.cite-version {
  font-weight: 600;
}
.person-links {
  font-weight: 400;
  font-size: 0.92em;
}
.words > div {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 12px;
}
.words dt {
  font-weight: 700;
}
.words dd {
  margin: 2px 0 0;
}
.stats-list li {
  margin: 4px 0;
}
table.data tfoot th,
table.data tfoot td {
  font-weight: 700;
  border-top: 2px solid var(--line);
}
details > summary {
  cursor: pointer;
  padding: 6px 0;
  color: var(--link);
}
.sc-cite {
  margin-top: 28px;
}

/* ---------------------------------------------------------------- Ask the Atlas */
.ask {
  margin: 28px 0;
  padding: 16px;
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 25%, transparent);
  border-radius: 6px;
}
.ask[hidden] {
  display: none;
}
.ask h2 {
  margin-top: 0;
}
.ask-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}
.ask-form textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: 8px;
  resize: vertical;
}
.ask-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.ask-answer:empty {
  display: none;
}
.ask-answer {
  margin-top: 12px;
}
.ask-label {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ask-sources-h {
  margin-bottom: 4px;
  font-weight: 600;
}
.ask-cite {
  text-decoration: none;
  font-size: 0.85em;
  vertical-align: super;
}

/* ---------------------------------------------------------------- case videos, click to load */
.videos .video-item {
  margin-bottom: 20px;
}
.yt-player {
  margin: 8px 0 4px;
}
.yt-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 4px;
  background: #000;
}
.yt-note {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* ---------------------------------------------------------------- record player and transcript */
.player {
  margin: 16px 0;
}
.player video,
.player audio {
  width: 100%;
  max-height: 70vh;
  background: #000;
  border-radius: 4px;
}
.player audio {
  background: transparent;
}
.poster-frame {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: var(--head-bg);
  color: var(--head-gold);
  border-radius: 6px;
  border: 1px solid var(--line);
}
.player figcaption {
  margin-top: 8px;
  font-size: 0.95rem;
}
.transcript {
  list-style: none;
  padding: 0;
  margin: 0;
}
.transcript li {
  display: grid;
  grid-template-columns: 4.2em 1fr;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dotted var(--line);
  max-width: 80ch;
}
.transcript .t {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--ink-2);
  padding-top: 0.12em;
}

/* ---------------------------------------------------------------- lists, cards, tables */
.stats {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.stats li {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.stats strong {
  display: block;
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--accent);
}
.stats a {
  text-decoration: none;
  color: inherit;
}
.cards {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}
.card {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.card h3 {
  margin: 4px 0 6px;
}
.card p {
  margin: 0 0 6px;
}
.card-meta,
.card-foot {
  font-size: 0.88rem;
  color: var(--ink-2);
}
.labels {
  display: grid;
  gap: 10px;
}
.labels > div {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.labels dd {
  margin: 6px 0 0;
}
.credits > div {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.credits dt {
  font-weight: 600;
}
.credits dd {
  margin: 2px 0 0;
}
.chips {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips a {
  display: inline-block;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
}
.chips .count {
  color: var(--ink-2);
  font-size: 0.85em;
  margin-left: 4px;
}
/* a family's colour mark beside its name: the sign its pins carry on the globe */
.fam-mark {
  width: 1.15em;
  height: 1.15em;
  margin-right: 0.4em;
  vertical-align: -0.2em;
}
h1 .fam-mark {
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.08em;
}
.facets h2 {
  font-size: 1rem;
  border: 0;
  margin: 16px 0 4px;
}

.table-wrap {
  overflow-x: auto;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
table.data caption {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--ink-2);
}
table.data th,
table.data td {
  text-align: left;
  vertical-align: top;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
}
table.data thead th {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
table.data tbody th {
  font-weight: 600;
  min-width: 12rem;
}
table.data .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
button.sort {
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
  cursor: pointer;
  text-transform: inherit;
  letter-spacing: inherit;
  font-weight: 600;
}
th[aria-sort='ascending'] button.sort::after {
  content: ' \2191';
}
th[aria-sort='descending'] button.sort::after {
  content: ' \2193';
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}
.prose li {
  margin: 4px 0;
}

@media (max-width: 719px) {
  table.stack,
  table.stack tbody,
  table.stack tr,
  table.stack td,
  table.stack tbody th {
    display: block;
    width: 100%;
  }
  table.stack thead {
    display: none;
  }
  table.stack caption:not(.vh) {
    display: block;
  }
  .js table.sortable thead {
    display: block;
  }
  table.sortable thead tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 14px;
    padding: 6px 12px 10px;
  }
  table.sortable thead tr::before {
    content: 'Sort by';
    font-size: 0.8rem;
    color: var(--ink-2);
  }
  table.sortable thead th {
    display: block;
    padding: 0;
    border: 0;
  }
  table.stack tbody tr {
    padding: 10px 12px;
    border-top: 1px solid var(--line);
  }
  table.stack tbody th,
  table.stack td {
    border: 0;
    padding: 1px 0;
    min-width: 0;
    text-align: left;
  }
  table.stack tbody th {
    font-size: 1.02rem;
    padding-bottom: 2px;
  }
  table.stack td[data-label]::before {
    content: attr(data-label) ': ';
    color: var(--ink-2);
    font-size: 0.85em;
  }
  table.stack td.num {
    text-align: left;
  }
  table.stack tfoot,
  table.stack tfoot tr,
  table.stack tfoot th {
    display: block;
    width: 100%;
  }
  table.stack tfoot tr {
    padding: 10px 12px;
  }
  table.stack tfoot th,
  table.stack tfoot td {
    border: 0;
    padding: 1px 0;
  }
  table.stack tfoot td:empty {
    display: none;
  }
}

/* ---------------------------------------------------------------- footer */
.site-foot {
  background: var(--head-bg);
  color: var(--head-ink);
  border-top: 2px solid var(--head-gold);
  font-size: 0.92rem;
}
.site-foot a {
  color: var(--head-gold);
}
.foot-grid {
  display: grid;
  gap: 8px 32px;
  padding-top: 20px;
  padding-bottom: 28px;
}
.foot-grid ul {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}
.foot-grid li {
  padding: 3px 0;
}
.foot-name {
  font-family: var(--display);
  font-weight: 700;
  color: var(--head-gold);
  letter-spacing: 0.08em;
  font-size: 1.1rem;
  margin-bottom: 0;
}

/* ---------------------------------------------------------------- wider screens */
@media (min-width: 1000px) {
  .head-row {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem);
    grid-template-areas: 'brand search' 'nav theme';
    align-items: center;
    gap: 10px 24px;
  }
  .head-row .brand {
    grid-area: brand;
  }
  .head-row .search-box {
    grid-area: search;
  }
  .head-row .main-nav {
    grid-area: nav;
  }
  .head-row .theme-switch {
    grid-area: theme;
    justify-self: end;
    width: auto;
  }
}
@media (min-width: 720px) {
  .main-nav ul {
    flex-wrap: nowrap;
    gap: 4px 18px;
  }
  .facts > div {
    grid-template-columns: 11rem 1fr;
    gap: 16px;
  }
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .labels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .foot-grid {
    grid-template-columns: 1.2fr 1fr 1.6fr;
  }
}
@media (min-width: 1080px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media print {
  .site-head,
  .site-foot,
  .toc,
  .crumbs {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}

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

/* ---------------------------------------------------------------- THE HOOK: Sky Check and the globe
 * An instrument: the night panels (the globe, the sky view) are dark in both themes, everything
 * else follows the page. One moving moment only (the globe arriving); nothing else animates. */
:root {
  --night: #070a12;
  --night-2: #0d1322;
  --night-line: #26314a;
  --night-ink: #dfe6f5;
  --night-ink-2: #9aa7c2;
  --dome-star: #c9d4ff;
  --dome-planet: #ffe3a3;
  --dome-moon: #ece7da;
  --dome-sun: #ffcf6a;
  --ok-bg: #e3f3e6;
  --ok-ink: #1d5a2a;
  --weak-bg: #fff3d6;
  --weak-ink: #6b4a00;
  --none-bg: #ece9f7;
  --none-ink: #3b2f7a;
}
/* dark: the reader's system setting (System, the default), unless they picked Light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --night-line: #2c3754;
    --ok-bg: #143321;
    --ok-ink: #a8e2b6;
    --weak-bg: #3a2c0c;
    --weak-ink: #ffd98a;
    --none-bg: #241e44;
    --none-ink: #d2c8ff;
  }
}
/* dark: picked by the reader with the theme switch */
:root[data-theme='dark'] {
  --night-line: #2c3754;
  --ok-bg: #143321;
  --ok-ink: #a8e2b6;
  --weak-bg: #3a2c0c;
  --weak-ink: #ffd98a;
  --none-bg: #241e44;
  --none-ink: #d2c8ff;
}

.hook {
  display: grid;
  gap: 20px;
  margin: 18px 0 8px;
}
.hook h1 {
  margin: 0.2em 0 0.35em;
  font-size: clamp(1.55rem, 4.4vw, 2.3rem);
}
.hook .lede {
  font-size: 1.08rem;
  margin: 0 0 16px;
}
.hook-more {
  margin: 10px 0 0;
  font-size: 0.95rem;
}

/* the form */
.check-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  padding: 14px 14px 16px;
  display: grid;
  gap: 12px;
  max-width: 40rem;
}
.check-h {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.field {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.field > label,
.field legend {
  display: block;
  font-weight: 600;
  padding: 0;
  margin-bottom: 4px;
}
.field-note {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: var(--ink-2);
}
.field-error {
  margin: 0;
  padding: 8px 10px;
  border-radius: 4px;
  background: var(--public-bg);
  color: var(--public-ink);
}
.field-error[hidden] {
  display: none;
}
.place-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.combo {
  position: relative;
  flex: 1 1 14rem;
  min-width: 0;
}
.check-form input[type='text'],
.check-form input[type='datetime-local'],
.sc-link-row input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  color: var(--ink);
  min-height: 44px;
}
.check-form input[type='datetime-local'] {
  max-width: 17rem;
  margin-top: 8px;
}
.check-form input[hidden] {
  display: none;
}
.combo-list {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  max-height: 18rem;
  overflow-y: auto;
}
.combo-list[hidden] {
  display: none;
}
.combo-list li {
  padding: 8px 12px;
  cursor: pointer;
  max-width: none;
}
.combo-list li[aria-selected='true'],
.combo-list li:hover {
  background: var(--draft-bg);
}
.combo-list .muted {
  font-size: 0.88rem;
}
button.primary,
button.ghost {
  font: inherit;
  min-height: 44px;
  border-radius: 5px;
  cursor: pointer;
  padding: 9px 16px;
}
button.primary {
  justify-self: start;
  font-weight: 650;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  padding: 10px 22px;
}
button.primary:hover {
  filter: brightness(1.08);
}
button.ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}
button.ghost:hover {
  border-color: var(--accent);
}
button:disabled {
  opacity: 0.6;
  cursor: default;
}
.when-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.when-chips label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 9px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  cursor: pointer;
  font-size: 0.95rem;
}
.when-chips label:has(input:checked) {
  border-color: var(--accent);
  background: var(--draft-bg);
  color: var(--draft-ink);
}
.when-chips input {
  accent-color: var(--accent);
  margin: 0;
}
.when-out {
  font-variant-numeric: tabular-nums;
}

/* the globe */
.globe {
  margin: 0;
  min-width: 0;
}
.globe-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  background: var(--night);
  border: 1px solid var(--night-line);
  border-radius: 10px;
  overflow: hidden;
  touch-action: pan-y;
}
.globe-still,
.globe-still-marks,
.globe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.globe-canvas {
  touch-action: pan-y;
}
.globe-label {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffd24a;
  text-shadow: 0 0 4px #000, 0 0 2px #000;
  white-space: nowrap;
}
.globe-card {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: min(19rem, calc(100% - 16px));
  padding: 12px 14px 12px;
  background: rgba(10, 14, 26, 0.94);
  color: var(--night-ink);
  border: 1px solid var(--night-line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  font-size: 0.92rem;
  line-height: 1.45;
}
.globe-card[hidden] {
  display: none;
}
.globe-card.docked {
  left: 8px;
  right: 8px;
  top: auto;
  bottom: 8px;
  width: auto;
}
.globe-card p {
  margin: 0 0 4px;
}
.globe-card-meta {
  color: var(--night-ink-2);
  font-size: 0.82rem;
  padding-right: 26px;
}
.globe-card-title {
  font-weight: 650;
  font-size: 1.02rem;
  color: #fff;
}
.globe-card-where {
  color: var(--night-ink-2);
}
.globe-card-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.globe-card-link {
  color: #f2cf55;
  font-weight: 600;
}
.globe-card-link:hover {
  color: #fff0c2;
}
.globe-card-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  max-height: 11rem;
  overflow-y: auto;
}
.globe-card-list li {
  padding: 3px 0;
}
.globe-card-list a {
  color: #f2cf55;
  font-weight: 600;
}
.globe-card-list a:hover {
  color: #fff0c2;
}
.globe-card-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--night-ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.globe-card-close:hover {
  background: rgba(255, 255, 255, 0.08);
}
.fchips {
  list-style: none;
  margin: 10px auto 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 640px;
}
.fchips li {
  max-width: none;
}
.fchip {
  font: inherit;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 36px;
  padding: 4px 11px 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.fchip[data-family=''] {
  padding-left: 12px;
}
.fchip[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--draft-bg);
  color: var(--draft-ink);
  font-weight: 600;
}
.fchip .count {
  color: var(--ink-2);
  font-size: 0.85em;
  margin-left: 4px;
}
.globe-cap {
  max-width: 640px;
  margin: 8px auto 0;
  font-size: 0.86rem;
  color: var(--ink-2);
}

/* doorways and numbers */
.door-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.door-list li {
  max-width: none;
}
.door {
  display: block;
  height: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
}
.door:hover {
  border-color: var(--accent);
  color: var(--ink);
}
.door-t {
  display: block;
  font-weight: 650;
  color: var(--link);
  margin-bottom: 2px;
}
.door-t::after {
  content: ' \2192';
}
.door-d {
  display: block;
  font-size: 0.93rem;
  color: var(--ink-2);
}
.numbers .stats strong {
  font-variant-numeric: tabular-nums;
}

@media (min-width: 720px) {
  .door-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  .hook {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: start;
    gap: 36px;
    margin-top: 26px;
  }
  .hook .globe-stage,
  .hook .fchips,
  .hook .globe-cap {
    max-width: max(380px, min(640px, calc(100vh - 230px)));
  }
}

/* the Sky Check page */
.sc .check-form {
  margin-top: 8px;
}
.sc-progress {
  min-height: 1.6em;
  margin: 12px 0 0;
  font-size: 0.93rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.sc-result[hidden] {
  display: none;
}
.sc-result > section {
  margin-top: 28px;
}
.sc-verdict {
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--ink-2);
  background: var(--surface);
}
.sc-verdict.fit-match {
  border-left-color: #2f8f4e;
}
.sc-verdict.fit-weak-match {
  border-left-color: #c59316;
}
.sc-verdict.fit-nothing,
.sc-verdict.fit-not-checked {
  border-left-color: #6a5acd;
}
.sc-fit {
  margin: 0 0 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.sc-one {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  line-height: 1.35;
  font-weight: 600;
  max-width: 46ch;
}
.sc-one:focus {
  outline: none;
}
.sc-where {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.sc-dome {
  margin: 0;
  display: grid;
  gap: 10px;
}
.sc-dome-svg {
  background: var(--night);
  border: 1px solid var(--night-line);
  border-radius: 10px;
  padding: 6px;
  max-width: 560px;
}
.dome {
  display: block;
  width: 100%;
  height: auto;
}
.dome-sky {
  fill: var(--night-2);
  stroke: #4a5878;
  stroke-width: 1.5;
}
.dome-ring {
  fill: none;
  stroke: #26314a;
  stroke-width: 1;
}
.dome-alt {
  fill: #6f7d9c;
  font-size: 10px;
  font-family: var(--body);
}
.dome-compass {
  fill: var(--night-ink);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--body);
}
.dome-label {
  font-size: 12px;
  font-family: var(--body);
  font-weight: 600;
  paint-order: stroke;
  stroke: var(--night);
  stroke-width: 3px;
}
.dome-star {
  fill: var(--dome-star);
}
.dome-planet {
  fill: var(--dome-planet);
}
.dome-planet.faint {
  opacity: 0.5;
}
.dome-moon {
  fill: var(--dome-moon);
}
.dome-sun {
  fill: var(--dome-sun);
}
.dome-radiant {
  stroke: var(--dome-star);
  stroke-width: 1.4;
  fill: none;
}
.dome-path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dome-path-dim {
  fill: none;
  stroke-width: 1.4;
  stroke-dasharray: 3 4;
  opacity: 0.55;
}
.dome-arrow {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dome-high {
  fill: none;
  stroke-width: 1.6;
}
.sc-dome figcaption {
  font-size: 0.88rem;
  max-width: 560px;
}
.sc-words summary {
  cursor: pointer;
  color: var(--link);
}
.sc-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.sc-card {
  max-width: none;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.sc-card h3 {
  margin: 4px 0 8px;
}
.sc-card-meta {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 6px;
}
.swatch {
  display: inline-block;
  width: 16px;
  height: 4px;
  border-radius: 2px;
}
.fit {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
}
.fit.fit-match {
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.fit.fit-weak-match {
  background: var(--weak-bg);
  color: var(--weak-ink);
}
.fit.fit-poor {
  background: var(--none-bg);
  color: var(--none-ink);
}
.sc-facts {
  margin: 0;
  display: grid;
  gap: 4px;
}
.sc-facts > div {
  display: grid;
  grid-template-columns: 1fr;
}
.sc-facts dt {
  font-size: 0.82rem;
  color: var(--ink-2);
}
.sc-facts dd {
  margin: 0 0 4px;
  font-variant-numeric: tabular-nums;
}
.sc-card-link {
  margin: 8px 0 0;
  font-size: 0.9rem;
}
.sc-list {
  padding-left: 1.2em;
}
.sc-list li {
  margin: 4px 0;
}
.sc-honest {
  padding: 4px 16px 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.sc-honest h2 {
  border: 0;
}
.sc-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.sc-link-row input {
  flex: 1 1 16rem;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.sc-near {
  margin-top: 14px;
}
.sc-how {
  margin-top: 36px;
}
@media (min-width: 720px) {
  .sc-facts > div {
    grid-template-columns: 8.5rem 1fr;
    gap: 12px;
  }
  .sc-facts dd {
    margin: 0;
  }
}
@media (min-width: 1000px) {
  .sc-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sc-view {
    display: grid;
    grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
    gap: 0 28px;
    align-items: start;
  }
  .sc-view h2 {
    grid-column: 1 / -1;
  }
  .sc-view .sc-words[open] summary,
  .sc-view .sc-words summary {
    margin-top: 4px;
  }
}

/* ---------------------------------------------------------------- the colour theme switch (Light, Dark, System) */
.theme-switch {
  display: inline-flex;
  align-self: center;
  border: 1px solid rgba(246, 231, 193, 0.3);
  border-radius: 999px;
  overflow: hidden;
}
.theme-switch[hidden] {
  display: none;
}
.theme-switch button {
  margin: 0;
  padding: 4px 10px;
  border: 0;
  background: none;
  color: var(--head-ink);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.theme-switch button + button {
  border-left: 1px solid rgba(246, 231, 193, 0.3);
}
.theme-switch button[aria-pressed='true'] {
  background: rgba(233, 196, 106, 0.2);
  color: var(--head-gold);
  font-weight: 700;
}

/* Latest (the X watch picks) */
.watch-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.watch-list li { padding: 1rem 0; border-top: 1px solid var(--line); }
.watch-list h2 { margin: 0.2rem 0 0.4rem; font-size: 1.15rem; }
.watch-list p { margin: 0 0 0.4rem; }
.watch-kind { font-size: 0.8rem; font-weight: 600; }

/* Counting visits: the once-only question about counting returns (site/ask/count.ts) */
.count-ask {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  max-width: 34rem;
  margin: 0 auto;
  padding: 0.8rem 1rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 4px 18px rgb(0 0 0 / 25%);
  font-size: 0.95rem;
}
.count-ask p {
  margin: 0 0 0.6rem;
}
.count-ask button {
  min-width: 4.5rem;
  min-height: 2.5rem;
  margin-right: 0.4rem;
  font: inherit;
  cursor: pointer;
}

/* ---------------------------------------------------------------- the way into the app */
a.to-app {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  background: #e9c46a;
  color: #14100a;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
a.to-app:hover {
  background: #f4d98f;
  color: #14100a;
  text-decoration: none;
}
.on-globe {
  margin: 12px 0 0;
}
.where {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin: 18px 0 6px;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
}
.where p {
  margin: 0;
  max-width: 62ch;
}

/* ---------------------------------------------------------------- stories */
.story-list {
  list-style: none;
  margin: 18px 0;
  padding: 0;
}
.story-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line, rgba(128, 128, 128, 0.35));
}
.story-list h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}
.story-list p {
  margin: 0 0 4px;
  max-width: 70ch;
}
.story > p {
  max-width: 70ch;
}

/* ---------------------------------------------------------------- what's missing on this page */
.note {
  max-width: 70ch;
  margin: 32px 0 8px;
  padding: 4px 14px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.note summary {
  min-height: 44px;
  line-height: 32px;
}
.note label {
  display: block;
  margin: 8px 0 4px;
  font-weight: 600;
}
.note select,
.note textarea {
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.note button {
  min-height: 44px;
  padding: 8px 20px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--link);
  border-radius: 4px;
  cursor: pointer;
}

/* The saucer mark (web/src/shared/ufoThinker.ts) */
.ufo{--_light:var(--ufo-light,#e9c46a);--_hull:var(--ufo-hull,#8d8f9a);--_glass:var(--ufo-glass,#bfe6ff);--_bad:var(--ufo-bad,#ff6b5e);
  position:relative;display:inline-block;width:var(--ufo-size,32px);height:calc(var(--ufo-size,32px)*1.25);vertical-align:middle;flex:none;perspective:calc(var(--ufo-size,32px)*6)}
.ufo svg{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}
.ufo-beam{transform-origin:50% 42%;opacity:0}
.ufo-craft{transform-origin:50% 36%;will-change:transform}
.ufo-lamp{fill:var(--_light);opacity:.28}
.ufo-dome-glow{opacity:.25}

.ufo[data-state=thinking] .ufo-craft{animation:ufo-hover 2.6s ease-in-out infinite}
.ufo[data-state=thinking] .ufo-lamp{animation:ufo-chase 1.1s linear infinite;animation-delay:calc(var(--i)*-.22s)}
.ufo[data-state=thinking] .ufo-beam{opacity:.34;animation:ufo-sweep 1.9s ease-in-out infinite}
.ufo[data-state=thinking] .ufo-dome-glow{animation:ufo-breathe 2.6s ease-in-out infinite}

.ufo[data-state=done] .ufo-craft{animation:ufo-flip 1.25s cubic-bezier(.3,.7,.2,1) 1 both}
.ufo[data-state=done] .ufo-beam{animation:ufo-fire 1.25s ease-out 1 both}
.ufo[data-state=done] .ufo-lamp{opacity:1;animation:ufo-lamps-on .5s ease-out .85s 1 backwards;animation-delay:calc(.85s + var(--i)*.06s)}
.ufo[data-state=done] .ufo-dome-glow{opacity:.8;animation:ufo-glow-on .9s ease-out .85s 1 backwards}

.ufo[data-state=error] .ufo-lamp{fill:var(--_bad);opacity:.9}
.ufo[data-state=error] .ufo-craft{animation:ufo-shudder .5s ease-in-out 1}
.ufo[data-state=error] .ufo-dome-glow{opacity:.1}

@keyframes ufo-hover{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-7%) rotate(3deg)}}
@keyframes ufo-chase{0%,60%,100%{opacity:.22}20%{opacity:1}}
@keyframes ufo-sweep{0%,100%{transform:skewX(-16deg) scaleX(.55)}50%{transform:skewX(16deg) scaleX(.55)}}
@keyframes ufo-breathe{0%,100%{opacity:.25}50%{opacity:.6}}
@keyframes ufo-fire{0%{opacity:0;transform:scaleY(.05) scaleX(.3)}14%{opacity:1;transform:scaleY(1) scaleX(1.15)}34%{opacity:.95;transform:scaleY(1) scaleX(1)}62%{opacity:0;transform:scaleY(1) scaleX(.2)}100%{opacity:0;transform:scaleY(1) scaleX(.2)}}
@keyframes ufo-flip{0%{transform:translateY(0) rotateX(0)}14%{transform:translateY(5%) rotateX(0)}34%{transform:translateY(-12%) rotateX(0)}78%{transform:translateY(-12%) rotateX(360deg)}100%{transform:translateY(0) rotateX(360deg)}}
@keyframes ufo-lamps-on{0%{opacity:.1}45%{opacity:1;filter:brightness(1.8)}100%{opacity:1}}
@keyframes ufo-glow-on{0%{opacity:.1}40%{opacity:1}100%{opacity:.8}}
@keyframes ufo-shudder{0%,100%{transform:rotate(0)}20%{transform:rotate(-8deg)}40%{transform:rotate(7deg)}60%{transform:rotate(-5deg)}80%{transform:rotate(3deg)}}

@media (prefers-reduced-motion:reduce){
  .ufo:not(.ufo--always)[data-state] .ufo-craft,.ufo:not(.ufo--always)[data-state] .ufo-beam{animation:none}
  .ufo:not(.ufo--always)[data-state=thinking] .ufo-lamp{animation:ufo-breathe 2s ease-in-out infinite;animation-delay:0s}
  .ufo:not(.ufo--always)[data-state=thinking] .ufo-beam{opacity:.25;transform:scaleX(.55)}
  .ufo:not(.ufo--always)[data-state=done] .ufo-lamp,.ufo:not(.ufo--always)[data-state=done] .ufo-dome-glow{animation:none}
}
