/* Mirrors aplite.dev's document pages so /data does not read as a different
   site. Self-hosted fonts only — the privacy policy states that browsing makes
   no third-party requests, and a webfont CDN would quietly make that false. */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('/data/fonts/outfit-v15-latin-200.woff2') format('woff2');
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/data/fonts/outfit-v15-latin-300.woff2') format('woff2');
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/data/fonts/outfit-v15-latin-regular.woff2') format('woff2');
}

:root {
  --bg: #0a0a0a;
  --fg: #f2f2f0;
  --accent: #6b7fd7;
  --danger: #c96a6a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--bg);
  height: auto;
}

body {
  font-family: Outfit, ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-y: auto;
}

.page {
  max-width: 660px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: rgba(242, 242, 240, 0.42);
  text-decoration: none;
  margin-bottom: 3rem;
  transition: color 0.25s ease;
}

.back:hover,
.back:focus-visible { color: rgba(242, 242, 240, 0.85); }

.back svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 200;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.updated {
  font-size: 13px;
  font-weight: 300;
  color: rgba(242, 242, 240, 0.32);
  margin-bottom: 3rem;
}

h2 {
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 2.75rem 0 0.75rem;
  color: rgba(242, 242, 240, 0.95);
}

p, li {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(242, 242, 240, 0.66);
}

p { margin-bottom: 1rem; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(107, 127, 215, 0.3);
}

a:hover { border-bottom-color: var(--accent); }

.muted { color: rgba(242, 242, 240, 0.42); }
.small { font-size: 13px; }

/* --- who --- */

.who {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(242, 242, 240, 0.08);
}

.who-name {
  font-size: 14px;
  font-weight: 300;
  color: rgba(242, 242, 240, 0.6);
}

.linklike {
  background: none;
  border: none;
  font: inherit;
  font-size: 13px;
  font-weight: 300;
  color: rgba(242, 242, 240, 0.38);
  cursor: pointer;
  padding: 0;
  transition: color 0.25s ease;
}

.linklike:hover,
.linklike:focus-visible { color: rgba(242, 242, 240, 0.8); }

/* --- sources --- */

.sources { list-style: none; margin: 0 0 1rem; }

.sources li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(242, 242, 240, 0.06);
}

.sources .count {
  font-size: 13px;
  color: rgba(242, 242, 240, 0.42);
  font-variant-numeric: tabular-nums;
  text-align: right;
  flex-shrink: 0;
}

/* A service we could not reach must look different from one holding nothing —
   "0 records" and "we could not ask" are not the same answer. */
.sources .count.unknown { color: var(--danger); }

/* --- buttons --- */

.btn {
  display: inline-block;
  font: inherit;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(242, 242, 240, 0.72);
  background: none;
  border: 1px solid rgba(242, 242, 240, 0.14);
  border-radius: 999px;
  padding: 9px 20px;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn:hover:not(:disabled),
.btn:focus-visible:not(:disabled) {
  color: var(--fg);
  border-color: rgba(242, 242, 240, 0.32);
}

.btn:disabled { opacity: 0.4; cursor: default; }

.btn.primary {
  color: var(--accent);
  border-color: rgba(107, 127, 215, 0.4);
}

.btn.primary:hover:not(:disabled),
.btn.primary:focus-visible:not(:disabled) {
  border-color: var(--accent);
  background: rgba(107, 127, 215, 0.08);
}

.btn.danger {
  color: var(--danger);
  border-color: rgba(201, 106, 106, 0.35);
}

.btn.danger:hover:not(:disabled),
.btn.danger:focus-visible:not(:disabled) {
  border-color: var(--danger);
  background: rgba(201, 106, 106, 0.08);
}

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }

/* --- notes --- */

.note {
  border: 1px solid rgba(107, 127, 215, 0.25);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(242, 242, 240, 0.55);
}

.note strong {
  display: block;
  font-weight: 400;
  color: rgba(242, 242, 240, 0.8);
  margin-bottom: 0.2rem;
}

.note.warn { border-color: rgba(201, 106, 106, 0.3); }

.note ul { list-style: none; margin: 0.5rem 0; }

.note li {
  font-size: 13px;
  line-height: 1.7;
  padding-left: 1rem;
  position: relative;
}

.note li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 4px;
  height: 1px;
  background: rgba(242, 242, 240, 0.3);
}

.footnote {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(242, 242, 240, 0.06);
  font-size: 12px;
  color: rgba(242, 242, 240, 0.3);
}

.footnote a { border-bottom-color: rgba(107, 127, 215, 0.2); }

/* --- progress --- */

.progress {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 13px;
  color: rgba(242, 242, 240, 0.5);
  margin-bottom: 1rem;
}

.spinner {
  width: 11px;
  height: 11px;
  border: 1px solid rgba(107, 127, 215, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  /* Without the animation the ring reads as decoration, so make it a static
     mark that still says "in progress". */
  .spinner { border-color: rgba(107, 127, 215, 0.5); border-top-color: var(--accent); }
}
