/*
 * Zeroes Ones and You — site stylesheet.
 *
 * Palette is sampled from the channel logo: #08606a is the exact disc fill and
 * #f2f1ed the exact mark fill. Everything else is derived from those two so the
 * site cannot drift away from the avatar people already recognise on YouTube.
 *
 * No web fonts. Local stacks only, which keeps the CSP free of a font origin,
 * removes a third-party request from every page load, and avoids a layout shift.
 */

:root {
  /* Brand, straight from the logo. */
  --teal: #08606a;
  --teal-deep: #04434a;
  --teal-bright: #0b7d8b;
  --teal-wash: #e4eef0;
  --teal-mist: #f0f5f5;

  /* Surfaces. Warm, to match the logo's off-white rather than fight it. */
  --canvas: #f7f5f0;
  --paper: #fffdf9;
  --paper-strong: #ffffff;

  /* Text. Teal-tinted neutrals read as one family with the brand. */
  --ink: #0f2126;
  --ink-soft: #445357;
  --ink-faint: #6b797d;

  --line: #ddd8cd;
  --line-soft: #e9e5db;
  --line-strong: #c7c1b4;

  /* Semantic accents, deliberately outside the brand family so a warning never
     reads as decoration. */
  --amber: #9a6612;
  --amber-soft: #f9edd6;
  --rose: #a4392c;
  --rose-soft: #f7e0dc;

  --shadow-sm: 0 8px 24px rgba(15, 33, 38, 0.06);
  --shadow-md: 0 18px 48px rgba(15, 33, 38, 0.09);
  --shadow-lg: 0 32px 84px rgba(15, 33, 38, 0.13);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 26px;

  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --shell: 72rem;
  --prose: 44rem;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(8, 96, 106, 0.07), transparent 26rem),
    radial-gradient(circle at 98% 14%, rgba(11, 125, 139, 0.06), transparent 30rem),
    var(--canvas);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--teal-deep);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--teal-bright);
}

:where(a, button, summary, input, textarea, select):focus-visible {
  outline: 3px solid var(--teal-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--paper-strong);
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

.shell {
  width: min(var(--shell), 100% - 2.5rem);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(247, 245, 240, 0.88);
  backdrop-filter: saturate(1.4) blur(8px);
}

.site-header > .shell {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.brand img {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
}

.brand-name {
  display: block;
  font-size: 1.02rem;
}

.brand small {
  display: block;
  font-size: 0.73rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-faint);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 0.3rem 0;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--teal);
}

.site-nav a[aria-current="page"] {
  color: var(--teal-deep);
  font-weight: 650;
  border-bottom-color: var(--teal);
}

/*
 * Navigation is always visible — no disclosure widget and no JavaScript.
 *
 * An earlier version wrapped the nav in a <details> mobile menu. That is a
 * common pattern and it was the wrong call here: with five short links there is
 * nothing to collapse, and hiding them behind a control costs a tap on the
 * smallest screens while risking the nav vanishing entirely if the show/hide
 * rules and the <details> content-hiding behaviour disagree. On narrow screens
 * the list simply wraps onto its own row.
 */
@media (max-width: 54rem) {
  .site-header > .shell {
    padding-bottom: 0.35rem;
  }

  .site-nav {
    flex-basis: 100%;
    margin-top: -0.2rem;
  }

  .site-nav ul {
    gap: 0.15rem 1.1rem;
  }

  .site-nav a {
    font-size: 0.9rem;
  }
}

/* -------------------------------------------------------------------- hero */

.hero {
  padding: 3.5rem 0 1.5rem;
}

.hero-wide {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
}

@media (max-width: 58rem) {
  .hero-wide {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-art {
    display: none;
  }
}

.hero-art img {
  width: min(19rem, 100%);
  margin-inline: auto;
  display: block;
  filter: drop-shadow(0 24px 60px rgba(8, 96, 106, 0.24));
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
  padding: 0.35rem 0.85rem;
  background: var(--teal-wash);
  color: var(--teal-deep);
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-bright);
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5.4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--teal);
}

.lede {
  margin: 0;
  max-width: 56ch;
  font-size: 1.14rem;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* ----------------------------------------------------------------- buttons */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 620;
  font-size: 0.97rem;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--teal);
  color: #fff;
}

.button-primary:hover {
  background: var(--teal-deep);
  color: #fff;
}

.button-secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--teal);
  color: var(--teal-deep);
}

/* ---------------------------------------------------------------- sections */

.section {
  padding: 3rem 0 1rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -0.025em;
}

.section-head a {
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
}

.section-head a:hover {
  text-decoration: underline;
}

.section-note {
  margin: -0.7rem 0 1.5rem;
  max-width: 62ch;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------- cards */

.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-grid-tight {
  grid-template-columns: repeat(auto-fit, minmax(min(15.5rem, 100%), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  border-color: var(--teal-bright);
  box-shadow: var(--shadow-md);
}

.card h3 {
  margin: 0;
  font-size: 1.16rem;
  letter-spacing: -0.015em;
}

.card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--teal-deep);
}

.card .tagline {
  margin: 0;
  font-weight: 550;
}

.card .summary {
  margin: 0;
  flex: 1;
  font-size: 0.94rem;
  color: var(--ink-soft);
}

.card-link {
  align-self: flex-start;
  font-weight: 620;
  font-size: 0.94rem;
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--teal-wash);
  color: var(--teal-deep);
  font-size: 0.73rem;
  font-weight: 650;
}

.chip-offsite {
  background: var(--amber-soft);
  color: var(--amber);
}

/* -------------------------------------------------------------- post cards */

.post-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.post-item:first-child {
  padding-top: 0;
}

.post-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.32rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.post-item h3 a {
  color: var(--ink);
  text-decoration: none;
}

.post-item h3 a:hover {
  color: var(--teal-deep);
}

.post-item p {
  margin: 0 0 0.5rem;
  max-width: 68ch;
  color: var(--ink-soft);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  align-items: center;
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
  color: var(--ink-faint);
}

.post-meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.post-meta li + li::before {
  content: "·";
  color: var(--line-strong);
}

/* ------------------------------------------------------------------ videos */

.video-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.video-card:hover {
  border-color: var(--teal-bright);
  box-shadow: var(--shadow-md);
}

.video-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  background: var(--teal-wash);
  border-bottom: 1px solid var(--line-soft);
}

.video-card > div {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0 1.15rem 1.25rem;
}

.video-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.video-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.video-card h3 a:hover {
  color: var(--teal-deep);
}

/* ------------------------------------------------------------------- prose */

.prose {
  max-width: var(--prose);
  font-size: 1.06rem;
}

.prose-wide {
  max-width: 58rem;
}

.prose > * + * {
  margin-top: 1.15rem;
}

.prose h2 {
  margin-top: 2.6rem;
  margin-bottom: 0.2rem;
  font-size: 1.55rem;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.prose h3 {
  margin-top: 2rem;
  margin-bottom: 0.1rem;
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}

.prose h4 {
  margin-top: 1.6rem;
  margin-bottom: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-faint);
}

.prose p {
  color: var(--ink-soft);
}

.prose strong {
  color: var(--ink);
  font-weight: 660;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
  color: var(--ink-soft);
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose blockquote {
  margin-inline: 0;
  padding: 0.4rem 0 0.4rem 1.25rem;
  border-left: 3px solid var(--teal-bright);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink);
}

.prose blockquote p {
  color: inherit;
}

.prose code {
  padding: 0.12em 0.38em;
  background: var(--teal-mist);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 0.88em;
}

.prose pre {
  overflow-x: auto;
  padding: 1rem 1.15rem;
  background: var(--ink);
  border-radius: var(--radius-sm);
  color: #e6eff0;
  font-size: 0.88rem;
  line-height: 1.55;
}

.prose pre code {
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font-size: inherit;
}

.prose hr {
  margin-block: 2.4rem;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose img {
  border-radius: var(--radius-sm);
}

.prose a {
  font-weight: 550;
}

/* Wide content must scroll inside itself; the page body never scrolls sideways. */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.table-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.table-scroll th,
.table-scroll td {
  padding: 0.6rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

.table-scroll th {
  background: var(--teal-mist);
  font-weight: 650;
  white-space: nowrap;
}

.table-scroll tr:last-child td {
  border-bottom: 0;
}

/* -------------------------------------------------------------- article page */

.article-header {
  padding: 3rem 0 1.5rem;
}

.article-header h1 {
  max-width: 24ch;
}

.article-lede {
  margin: 0.75rem 0 0;
  max-width: 60ch;
  font-size: 1.16rem;
  color: var(--ink-soft);
}

.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  align-items: center;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--ink-faint);
}

.byline li + li::before {
  content: "·";
  margin-right: 0.55rem;
  color: var(--line-strong);
}

.article-body {
  padding-bottom: 2rem;
}

/* ------------------------------------------------------------------ panels */

.panel {
  padding: 1.75rem;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.panel-teal {
  background: linear-gradient(140deg, var(--teal) 0%, var(--teal-deep) 100%);
  border-color: transparent;
  color: #fff;
}

.panel-teal h2,
.panel-teal h3 {
  color: #fff;
}

.panel-teal p {
  color: rgba(255, 255, 255, 0.86);
}

.panel-teal a:not(.button) {
  color: #fff;
}

.panel-teal .button-primary {
  background: #fff;
  color: var(--teal-deep);
}

.panel-teal .button-primary:hover {
  background: var(--teal-wash);
  color: var(--teal-deep);
}

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.split > div {
  flex: 1 1 22rem;
}

.split h2 {
  margin: 0.2rem 0 0.5rem;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
  max-width: 26ch;
}

.split p {
  margin: 0;
  max-width: 48ch;
}

.feature-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-grid h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.feature-grid p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------- disclosure */

.disclosure {
  margin: 0 0 1.5rem;
  padding: 0.85rem 1.1rem;
  background: var(--amber-soft);
  border: 1px solid rgba(154, 102, 18, 0.28);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: #6f4a0d;
}

.disclosure strong {
  color: #5c3d0a;
}

/* --------------------------------------------------------------- legal nav */

.legal-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  align-items: start;
  padding: 1rem 0 2rem;
}

.legal-nav {
  position: sticky;
  top: 1.5rem;
  padding: 1.15rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.legal-nav ol {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.91rem;
}

.legal-nav a:hover {
  color: var(--teal-deep);
}

@media (max-width: 54rem) {
  .legal-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-nav {
    position: static;
  }

  .legal-nav ol {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }
}

/* ------------------------------------------------------------ consent banner */

.consent {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: none;
  padding: 1rem;
  background: var(--paper-strong);
  border-top: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
}

.consent[data-open="true"] {
  display: block;
}

.consent-inner {
  width: min(var(--shell), 100% - 1rem);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.consent-copy {
  flex: 1 1 26rem;
}

.consent-copy h2 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

.consent-copy p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.consent-actions .button {
  padding: 0.6rem 1.1rem;
  font-size: 0.92rem;
}

.consent-options {
  width: min(var(--shell), 100% - 1rem);
  margin: 0.9rem auto 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line-soft);
}

.consent-option {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.5rem 0;
}

.consent-option input {
  margin-top: 0.3rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--teal);
  flex: none;
}

.consent-option label {
  font-weight: 620;
  font-size: 0.93rem;
}

.consent-option p {
  margin: 0.1rem 0 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
}

.footer-grid h2 {
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.footer-grid ul {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-grid a:hover {
  color: var(--teal-deep);
}

.footer-about p {
  margin: 0.8rem 0 0;
  max-width: 34ch;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.footer-legal {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.footer-legal p {
  margin: 0 0 0.4rem;
  max-width: 78ch;
}

.footer-legal button {
  padding: 0;
  background: none;
  border: 0;
  color: var(--teal-deep);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------------------------------------------------------------- utilities */

.stack-lg > * + * {
  margin-top: 2.5rem;
}

.empty-note {
  padding: 2rem;
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--ink-soft);
  text-align: center;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .consent,
  .skip-link {
    display: none !important;
  }
}
