:root {
  --ground: #111314;
  --ink: #f5efe9;
  --ink-2: #b9b3ad;
  --ink-3: #8d8882;
  --rule: #24272a;
  --accent: #fd5c36;
  --measure: 36rem;
  --sans: "Avenir Next", "Avenir", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--ground);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Faint ledger grid, as on the channel banner */
.grid {
  background-image:
    linear-gradient(rgba(245, 239, 233, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 239, 233, 0.022) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 24px; }

/* ---------- Home ---------- */
.hero {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(120px, 22vh, 220px) 24px 72px;
  overflow: hidden;
}
.bars {
  position: absolute;
  top: 0;
  right: 3%;
  width: min(300px, 24vw);
  height: auto;
  color: rgba(245, 239, 233, 0.03);
  pointer-events: none;
}
@media (max-width: 640px) { .bars { display: none; } }
.hero-inner { position: relative; text-align: center; width: 100%; max-width: 760px; }
.hero h1 { margin: 0; }
.hero h1 img { display: block; width: 100%; height: auto; }
.tagline {
  margin: clamp(14px, 2.4vw, 22px) 0 0;
  font-size: clamp(1.02rem, 2.6vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.005em;
  color: var(--ink);
}
.cta-row { margin-top: clamp(36px, 6vw, 56px); display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.cta-row a { font-weight: 600; font-size: 1rem; padding: 10px 2px; }

.note { border-top: 1px solid var(--rule); padding: 48px 0 56px; }
.note h2 {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.note p { margin: 0 0 14px; color: var(--ink-2); text-wrap: pretty; }
.note p:last-child { margin-bottom: 0; }

/* ---------- Pages ---------- */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.site-header .logo { display: block; width: 168px; line-height: 0; }
.site-header .logo img { width: 100%; height: auto; }
.site-header .logo:hover { opacity: 0.85; }
.site-header nav a { font-size: 0.95rem; font-weight: 600; padding: 12px 0 12px 20px; text-decoration-color: transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { text-decoration-color: var(--accent); color: var(--ink); }

.doc { padding: 64px 0 88px; flex: 1; }
.doc h1 { margin: 0 0 6px; font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; }
.doc .updated { margin: 0 0 40px; color: var(--ink-3); font-size: 0.92rem; }
.doc h2 { margin: 40px 0 10px; font-size: 1.1rem; font-weight: 700; }
.doc p, .doc li { color: var(--ink-2); text-wrap: pretty; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--accent); }
.doc strong { color: var(--ink); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 0.88rem; }
.site-footer .wrap { padding-top: 22px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--ink-2); text-decoration-color: transparent; }
.site-footer a:hover { color: var(--ink); text-decoration-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  a { transition: none; }
}

/* YouTube attribution (YouTube Branding Guidelines: icon unaltered, red on dark) */
.yt { width: 28px; height: 20px; flex: none; }
.yt-sm { width: 18px; height: 13px; }
.yt-link { display: inline-flex; align-items: center; gap: 10px; }
.yt-link span { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.cta-row .yt-link { text-decoration: none; }
.yt-note { display: inline-flex; align-items: center; gap: 8px; }
