/* batsy site styles: a chrome creature in a dark, smoky, nocturnal room.
   Layers, back to front:
     CSS fallback background  (shows only if WebGL smoke can't run)
     smoke + light            (gl/smoke.js)
     distant and mid bats     (ascii/sky.js, back canvas)
     content
     foreground bats          (ascii/sky.js, front canvas)
     navigation
     night-vision texture     (grain, scanlines, vignette, rare interference)
   Palette: obsidian, midnight royal blue, chrome, iridescent violet, deep cherry.
   Motion is transform/opacity only and stops under prefers-reduced-motion. */

@font-face {
  font-family: 'Bodoni Moda';
  src: url('../fonts/bodoni-moda-normal.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Bodoni Moda';
  src: url('../fonts/bodoni-moda-italic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --obsidian: #07080d;
  --charcoal: #0b0c12;
  --midnight: #101a36;
  --cobalt: #253e83;
  --silver: #c5cbd8;
  --chrome: #e8ebf3;
  --violet: #7564bc;
  --cherry: #8e1736;
  --cherry-hi: #c42e50;

  --text: #c5cbd8;
  --text-strong: #eef0f6;
  --text-dim: #9aa1b6;
  --text-faint: #8f96ac;
  --line: rgba(197, 203, 216, 0.1);
  --line-strong: rgba(197, 203, 216, 0.26);

  --serif: 'Bodoni Moda', 'Didot', 'Bodoni 72', 'Iowan Old Style', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  /* Chrome text (used sparingly: the text fallback bat, step numbers). */
  --chrome-fill: linear-gradient(100deg, #b4bacb 0%, #f3f5fa 14%, #c5cbd8 26%, #ffffff 36%, #a9b0c2 47%, #e5e8f0 60%, #ffffff 69%, #b8bfcf 84%, #eef0f6 100%);
  --chrome-light: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 44%, rgba(40, 50, 80, 0.32) 56%, rgba(255, 255, 255, 0.08));

  --gutter: clamp(18px, 5vw, 64px);
  --page: min(1160px, 100% - 2 * var(--gutter));
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  min-height: 100vh;
  font: 400 1rem/1.7 var(--sans);
  color: var(--text);
  /* Fallback room if WebGL smoke can't run: charcoal into navy, cherry low. */
  background:
    radial-gradient(70rem 40rem at 15% 0%, rgba(37, 62, 131, 0.35), transparent 65%),
    radial-gradient(60rem 30rem at 90% 100%, rgba(142, 23, 54, 0.22), transparent 70%),
    linear-gradient(180deg, #0a0d18, var(--obsidian) 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--chrome);
  text-decoration-color: rgba(196, 46, 80, 0.75);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #fff;
  text-decoration-color: var(--cherry-hi);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  font: 600 0.9rem var(--sans);
  color: var(--obsidian);
  background: var(--chrome);
  border-radius: 3px;
}

.skip:focus {
  top: 12px;
}

.chrome {
  background-image: var(--chrome-light), var(--chrome-fill);
  background-size: 100% 100%, 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ---------- The room ---------- */

.smoke {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 2.4s var(--ease);
  pointer-events: none;
}

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

.sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sky-back {
  z-index: 0;
}

.sky-front {
  z-index: 40;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ---------- Night-vision texture (over everything, very quiet) ---------- */

.nv {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  pointer-events: none;
}

/* Sensor grain: an oversized noise tile that jumps position a few times a
   second (transform only, so it's cheap). */
.nv-grain {
  position: absolute;
  inset: -50%;
  opacity: 0.075;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  17% { transform: translate(-6%, 4%); }
  33% { transform: translate(5%, -7%); }
  50% { transform: translate(-3%, 8%); }
  67% { transform: translate(7%, 2%); }
  83% { transform: translate(-8%, -4%); }
  100% { transform: translate(0, 0); }
}

.nv-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgba(220, 228, 255, 0.022) 0 1px, transparent 1px 3px);
}

.nv-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 95% at 50% 45%, transparent 55%, rgba(3, 4, 8, 0.72) 100%);
}

/* A rare band of signal interference rolling down the screen. */
.nv-glitch {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 70px;
  background: linear-gradient(180deg, transparent, rgba(170, 185, 235, 0.045) 45%, rgba(196, 46, 80, 0.03) 55%, transparent);
  transform: translateY(-120px);
  animation: glitch 17s linear infinite;
}

@keyframes glitch {
  0%,
  88% {
    transform: translateY(-120px);
  }
  96%,
  100% {
    transform: translateY(110vh);
  }
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background-color 0.5s var(--ease);
}

.nav.is-scrolled {
  background: rgba(7, 8, 13, 0.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--page);
  height: 72px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  color: var(--text-strong);
  text-decoration: none;
}

.brand-word {
  font: 500 1.35rem/1 var(--serif);
  letter-spacing: 0.04em;
}

.brand-bat {
  font: 600 11px/1 var(--mono);
  color: var(--cherry-hi);
  white-space: pre;
  min-width: 6ch;
}

.nav-links {
  display: flex;
  gap: clamp(18px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
  font: 500 0.82rem/1 var(--sans);
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(232, 235, 243, 0.9), var(--cherry-hi));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text-strong);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

@media (max-width: 560px) {
  .nav-links .nav-optional {
    display: none;
  }
}

/* ---------- The chrome button ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 30px 16px 24px;
  overflow: hidden;
  font: 600 0.95rem/1 var(--sans);
  letter-spacing: 0.02em;
  color: var(--chrome);
  text-decoration: none;
  background: linear-gradient(180deg, #2a3452 0%, #141a2c 47%, #0a0e1a 53%, #19213a 100%);
  border: 1px solid rgba(232, 235, 243, 0.42);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(7, 8, 13, 0.8),
    0 16px 40px -14px rgba(37, 62, 131, 0.85);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), color 0.3s var(--ease);
}

.btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(105deg, transparent 32%, rgba(196, 46, 80, 0.35) 42%, rgba(255, 255, 255, 0.55) 48%, rgba(255, 255, 255, 0.12) 54%, transparent 62%);
  transform: translateX(-130%);
  transition: transform 0.9s var(--ease);
}

.btn:hover,
.btn:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(7, 8, 13, 0.8),
    0 18px 50px -12px rgba(196, 46, 80, 0.45);
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: translateX(130%);
}

.btn-glyph {
  font: 600 0.95rem/1 var(--mono);
  color: var(--cherry-hi);
}

/* ---------- Sections ---------- */

.section {
  width: var(--page);
  margin: 0 auto;
  padding: clamp(110px, 16vw, 200px) 0 0;
}

.label {
  margin: 0 0 22px;
  font: 500 0.74rem/1 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.label .index {
  margin-right: 14px;
  color: var(--cherry-hi);
}

.h2 {
  margin: 0;
  max-width: 22ch;
  font: 400 clamp(2.1rem, 4.6vw, 3.8rem) / 1.06 var(--serif);
  letter-spacing: -0.01em;
  color: var(--text-strong);
  text-wrap: balance;
}

.h2 em {
  font-style: italic;
  color: #b9c4ea;
}

.lede {
  max-width: 60ch;
  margin: 22px 0 0;
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  color: var(--text-dim);
}

/* Emerging from darkness: content brightens and rises as it scrolls in. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.meta {
  font: 500 0.7rem/1.5 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---------- Live demo ---------- */

.demo-grid {
  display: grid;
  gap: 24px;
  margin-top: 36px;
}

.demo-grid > * {
  min-width: 0;
}

@media (min-width: 1000px) {
  .demo-grid {
    grid-template-columns: 15rem 1fr;
    align-items: start;
    gap: 40px;
  }
}

.switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (min-width: 1000px) {
  .switcher {
    flex-direction: column;
    flex-wrap: nowrap;
  }
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  overflow-wrap: anywhere;
  font: 500 0.86rem/1.2 var(--mono);
  color: var(--text-dim);
  text-align: left;
  background: rgba(16, 26, 54, 0.35);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.switch:hover {
  color: var(--text-strong);
  border-color: var(--line-strong);
}

.switch[aria-selected='true'] {
  color: #fff;
  background: linear-gradient(180deg, rgba(37, 62, 131, 0.55), rgba(16, 26, 54, 0.75));
  border-color: rgba(229, 232, 240, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 3px 0 0 var(--cherry-hi);
}

.switch-glyph {
  min-width: 1ch;
  color: var(--silver);
}

.switch[aria-selected='true'] .switch-glyph {
  color: var(--cherry-hi);
}

/* The mock GitHub page uses GitHub's own dark colours so it reads instantly. */
.mock {
  --gh-bg: #0d1117;
  --gh-subtle: #151b23;
  --gh-border: #3d444d;
  --gh-fg: #f0f6fc;
  --gh-muted: #9198a1;
  --gh-accent: #4493f8;
  --gh-success: #3fb950;
  --gh-attention: #d29922;
  --gh-danger: #f85149;
  overflow: hidden;
  font: 400 14px/1.5 var(--sans);
  color: var(--gh-fg);
  background: var(--gh-bg);
  border: 1px solid var(--gh-border);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(229, 232, 240, 0.06), 0 40px 90px -40px rgba(37, 62, 131, 0.75), 0 20px 50px -30px rgba(196, 46, 80, 0.35);
}

.mock-noscript {
  margin: 0;
  padding: 18px;
}

.mock-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: #0a0d13;
  border-bottom: 1px solid var(--gh-border);
}

.mock-chrome i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2b3240;
}

.mock-url {
  flex: 1;
  min-width: 0;
  margin-left: 10px;
  padding: 4px 10px;
  overflow: hidden;
  font: 400 12px/1.4 var(--mono);
  color: var(--gh-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  background: #151b23;
  border-radius: 999px;
}

.mock-head {
  padding: 16px 18px 0;
  border-bottom: 1px solid var(--gh-border);
}

.mock-repo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}

.mock-repo .owner,
.mock-repo .name {
  color: var(--gh-accent);
}

.mock-repo .name {
  font-weight: 600;
}

.mock-pill {
  padding: 0 8px;
  font-size: 12px;
  line-height: 20px;
  color: var(--gh-muted);
  border: 1px solid var(--gh-border);
  border-radius: 999px;
}

.mock-tabs {
  display: flex;
  gap: 4px;
  margin: 14px 0 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

.mock-tabs li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 10px;
  color: var(--gh-muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.mock-tabs li.is-current {
  color: var(--gh-fg);
  border-bottom-color: #f78166;
}

.mock-count {
  padding: 0 6px;
  font-size: 12px;
  line-height: 18px;
  color: var(--gh-fg);
  background: rgba(101, 108, 118, 0.3);
  border-radius: 999px;
}

.mock-body {
  min-height: 300px;
  padding: 16px 18px 22px;
}

.mock-issue-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
}

.mock-issue-title span {
  color: var(--gh-muted);
}

.mock-issue-state {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #238636;
  border-radius: 999px;
}

/* batsy's line, matching the extension's look on GitHub dark. */
.b-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  font: 12px/20px var(--sans);
  color: var(--gh-muted);
}

.b-mark {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.b-summary {
  min-height: 28px;
  padding: 3px 8px;
  font: inherit;
  color: inherit;
  text-align: left;
  background: none;
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  cursor: pointer;
}

.b-summary:hover {
  background: var(--gh-subtle);
}

.b-headline {
  font-weight: 600;
  color: var(--gh-fg);
}

.b-tip {
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.b-glyph {
  display: inline-block;
  width: 1em;
  margin-right: 4px;
  font-weight: 600;
  text-align: center;
}

[data-state='open'] .b-glyph,
[data-level='7'] .b-glyph {
  color: var(--gh-success);
}

[data-state='selective'] .b-glyph,
[data-state='slow'] .b-glyph,
[data-level='2'] .b-glyph,
[data-level='3'] .b-glyph,
[data-level='4'] .b-glyph,
[data-level='5'] .b-glyph,
[data-level='6'] .b-glyph {
  color: var(--gh-attention);
}

[data-state='hard'] .b-glyph,
[data-state='locked'] .b-glyph,
[data-state='archived'] .b-glyph {
  color: var(--gh-danger);
}

[data-state='quiet'] .b-glyph,
[data-state='notEnough'] .b-glyph,
[data-level='1'] .b-glyph,
[data-level='own'] .b-glyph {
  color: var(--gh-muted);
}

.b-panel {
  margin: 6px 0 0;
  padding: 8px 12px;
  font: 13px/1.5 var(--sans);
  color: var(--gh-fg);
  background: var(--gh-subtle);
  border: 1px solid var(--gh-border);
  border-radius: 6px;
}

.b-panel[hidden] {
  display: none;
}

.b-panel ul {
  margin: 0 0 6px;
  padding-left: 18px;
}

.b-panel p {
  margin: 0;
}

.b-definition {
  margin-bottom: 6px !important;
  color: var(--gh-muted);
}

.b-unit {
  padding: 4px 8px;
  border: 1px solid var(--gh-border);
  border-radius: 6px;
}

.b-unit .b-summary {
  padding-left: 0;
  padding-right: 0;
  border: 0;
}

.b-issue {
  font-size: 14px;
  font-weight: 600;
  color: var(--gh-fg);
}

.b-issue a {
  color: var(--gh-accent);
}

.b-small {
  padding-left: 24px;
  font-size: 11px;
}

.mock-ghost {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  opacity: 0.55;
}

.mock-ghost span {
  display: block;
  height: 10px;
  background: #1c2230;
  border-radius: 3px;
}

.mini-mock {
  padding: 10px 12px;
  box-shadow: none;
}

.demo-caption {
  margin: 14px 0 0;
}

.demo-hint {
  margin: 12px 0 0;
  font-size: 0.92rem;
  color: var(--text-dim);
}

/* ---------- How batsy reads a repo ---------- */

.reads {
  display: grid;
  gap: 48px;
  margin-top: 40px;
}

@media (min-width: 900px) {
  .reads {
    grid-template-columns: 1.15fr 1fr;
    gap: 72px;
  }
}

.reads h3 {
  margin: 0 0 6px;
  font: 400 1.55rem/1.2 var(--serif);
}

.reads .meta {
  margin: 0 0 20px;
}

.states {
  margin: 0;
}

.states > div {
  position: relative;
  padding: 14px 0 14px 2.4rem;
  border-top: 1px solid var(--line);
}

.states dt {
  font-weight: 600;
  color: var(--text-strong);
}

.states dd {
  margin: 2px 0 0;
  color: var(--text-dim);
}

.states .glyph {
  position: absolute;
  left: 0.2rem;
  top: 14px;
  font: 600 1rem/1.65 var(--mono);
}

.glyph-good {
  color: #57c785;
}

.glyph-warn {
  color: #e0b252;
}

.glyph-bad {
  color: #f2777a;
}

.glyph-quiet {
  color: var(--text-dim);
}

.levels {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: level;
}

.levels li {
  position: relative;
  padding: 14px 0 14px 3.2ch;
  border-top: 1px solid var(--line);
  counter-increment: level;
}

.levels li::before {
  content: counter(level, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 15px;
  font: 500 0.78rem/1.6 var(--mono);
  color: var(--cherry-hi);
}

.levels strong {
  font-weight: 600;
  color: var(--text-strong);
}

/* ---------- Install ---------- */

.steps {
  display: grid;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  display: grid;
  gap: 14px 28px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  counter-increment: step;
}

@media (min-width: 820px) {
  .step {
    grid-template-columns: 4.5rem 1fr minmax(16rem, 22rem);
    align-items: start;
  }
}

.step::before {
  content: counter(step, decimal-leading-zero);
  font: 400 2.2rem/1 var(--serif);
  background-image: var(--chrome-light), var(--chrome-fill);
  background-size: 100% 100%, 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* "On Microsoft Edge" / "On Chrome" above each list of steps. */
.install-for {
  margin: 64px 0 0;
  font: 400 1.55rem/1.2 var(--serif);
}

.install-note {
  max-width: 62ch;
  margin: 8px 0 0;
  color: var(--text-dim);
}

.install-for + .steps,
.install-note + .steps {
  margin-top: 20px;
}

.step h3 {
  margin: 0 0 6px;
  font: 600 1.12rem/1.35 var(--sans);
  color: var(--text-strong);
}

.step p {
  margin: 0 0 8px;
  color: var(--text-dim);
}

.step p:last-child {
  margin-bottom: 0;
}

.ui {
  padding: 1px 6px;
  font: 600 0.9em/1.4 var(--sans);
  color: var(--text-strong);
  white-space: nowrap;
  background: rgba(197, 203, 216, 0.08);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}

.step-visual {
  padding: 16px;
  font-size: 13px;
  color: #e6e8ee;
  background: #1f2023;
  border: 1px solid #3c3d41;
  border-radius: 8px;
}

.copybox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  background: #2a2b2f;
  border-radius: 999px;
}

.copybox code {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font: 500 13px/1.4 var(--mono);
}

.copy-btn {
  min-height: 34px;
  padding: 6px 12px;
  font: 600 12px/1 var(--sans);
  color: #e6e8ee;
  background: #3a3b40;
  border: 1px solid #55565c;
  border-radius: 999px;
  cursor: pointer;
}

.copy-btn:hover {
  background: #45464c;
}

.copy-status {
  display: block;
  min-height: 1.4em;
  margin-top: 6px;
  font-size: 12px;
  color: #b9bcc5;
}

.dev-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
}

.toggle {
  position: relative;
  width: 34px;
  height: 18px;
  background: #8ab4f8;
  border-radius: 999px;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
}

.chrome-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chrome-btn {
  padding: 7px 14px;
  font: 500 13px/1 var(--sans);
  color: #a8c7fa;
  border: 1px solid #5e5f63;
  border-radius: 999px;
}

.chrome-btn.is-target {
  color: #062e6f;
  background: #a8c7fa;
  border-color: #a8c7fa;
  box-shadow: 0 0 0 3px rgba(168, 199, 250, 0.25);
}

.folder {
  display: grid;
  gap: 4px;
  font: 500 12.5px/1.5 var(--mono);
  color: #cfd2da;
}

.folder .is-pick {
  color: #a8c7fa;
}

.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  margin: 28px 0 0;
  padding: 16px 18px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(142, 23, 54, 0.16), rgba(16, 26, 54, 0.3));
  border: 1px solid rgba(196, 46, 80, 0.4);
  border-radius: 4px;
}

.callout-glyph {
  font: 600 1rem/1.6 var(--mono);
  color: var(--cherry-hi);
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 6px;
}

/* ---------- Privacy ---------- */

.privacy-list {
  display: grid;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .privacy-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 56px;
  }
}

.privacy-list li {
  display: grid;
  grid-template-columns: 2.6ch 1fr;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.privacy-list .glyph {
  font: 600 0.95rem/1.65 var(--mono);
  color: var(--cherry-hi);
}

.privacy-list p {
  margin: 0;
}

.privacy-list strong {
  display: block;
  font-weight: 600;
  color: var(--text-strong);
}

.privacy-list span {
  color: var(--text-dim);
}

/* ---------- Footer ---------- */

.site-footer {
  width: var(--page);
  margin: clamp(80px, 12vw, 140px) auto 0;
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  gap: 24px;
}

@media (min-width: 760px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

.footer-bat {
  margin: 0 0 10px;
  font: 600 13px/1.2 var(--mono);
  color: var(--cherry-hi);
  white-space: pre;
}

.footer-note {
  margin: 0;
  max-width: 46ch;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  font: 500 0.8rem/2 var(--mono);
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text-strong);
  text-decoration: underline;
  text-decoration-color: var(--cherry-hi);
}

/* ---------- Stats page ---------- */

.stats-page {
  width: var(--page);
  margin: 0 auto;
  padding: 130px 0 0;
}

.stats-page .h2 {
  margin-bottom: 14px;
}

.stats-page .batsy-stats {
  margin-top: 36px;
  margin-left: 0;
}

/* ---------- Not-found page ---------- */

.lost {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 22px;
  width: var(--page);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0;
  text-align: center;
}

.lost .h2,
.lost .lede {
  margin: 0;
}

.lost pre {
  margin: 0;
  font: 500 14px/1.2 var(--mono);
  color: var(--cherry-hi);
}

/* ---------- Reduced motion: everything still, nothing hidden ---------- */

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .sky,
  .nv-glitch {
    display: none;
  }
}

/* Slow devices (set by site.js): keep the look, drop the costly extras. */
.low-power .nv-grain {
  animation: none;
}
