/* ============================================================
   CAPSLOCK site stylesheet
   Shared chrome + home + post styles.
   ============================================================ */

:root {
  /* color */
  --bg: #f5f4f0;
  --white: #ffffff;
  --ink: #0a0a0a;
  --blue: #0055cc;
  --blue-rgb: 0, 85, 204;        /* same hue as --blue, for rgba() tints */
  --gray: #666666;
  --gray-light: #999999;
  --border: #c0c0c0;

  /* type */
  --font: "IBM Plex Mono", monospace;

  /* radius scale */
  --radius-lg: 32px;             /* page frame */
  --radius-md: 25px;             /* sections, hero, footer, ticker */
  --radius-sm: 10px;             /* cards */

  /* text emphasis — three steps only */
  --o-mute: 0.7;
  --o-faint: 0.5;

  /* type scale — minimal: one display, one body, one label (+ micro) */
  --fs-title: clamp(26px, 3vw, 34px);
  --fs-body: 15px;
  --fs-label: 12px;
  --fs-micro: 11px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  padding: 10px;
  min-height: 100vh;
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }

/* keyboard focus — visible ring (a11y) */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.key-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; }

/* Respect users who ask for reduced motion: stop the ticker, drop transitions. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.page-frame {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: clip;
  margin-bottom: 55px;
}

.blue { color: var(--blue); }
.gray { color: var(--gray); }
.muted75 { opacity: var(--o-mute); }

.type {
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0;
  margin: 0;
}

body.caps-on,
body.caps-on .caps { text-transform: uppercase; }

.link {
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 180ms ease;
}

.link:hover { color: var(--blue); }

/* Section backgrounds */
body.is-home #news {
  padding-top: 72px;
}

@media (min-width: 768px) {
  body.is-home #news { padding-top: 128px; }
}

/* ============================================================
   NAV
   ============================================================ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  padding: 0;
}

.nav-grid {
  margin: 0 auto;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  gap: 16px;
}

/* Alignment is per-page: the nav tracks whatever "cover" sits below it.
   Fieldnotes index → the featured card (.section 48px gutter + .grid 1400 cap + 12% inset).
   Post page → the full-bleed hero, so the nav goes edge-to-edge with the page frame. */
body.is-fieldnotes .site-nav { padding: 0 48px; }
body.is-fieldnotes .nav-grid { max-width: 1400px; }
body.is-fieldnotes .nav-inner { margin: 0 24px; }
@media (min-width: 768px) {
  body.is-fieldnotes .nav-inner { margin: 0 12%; }
}

/* Post nav: keep it near the full-bleed hero, but not jammed into the frame
   corners — a comfortable gutter so the compact logo can breathe. */
body.is-post .site-nav { padding: 0 clamp(16px, 3vw, 44px); }
body.is-post .nav-inner { margin: 0; }

/* Wordmark logo — bold blue CAPSLOCK; clicking it toggles ALL CAPS site-wide. */
.nav-logo {
  appearance: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  text-decoration: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  padding: 0;
  border: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--gray);
  text-decoration: none;
  transition: color 150ms ease;
}

.nav-link:hover { color: var(--ink); }
.nav-link.is-active { color: var(--blue); }

/* Mobile menu toggle */
.nav-menu-btn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--gray);
  border-radius: 4px;
  padding: 6px 10px;
  color: var(--gray);
  font-family: inherit;
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  display: none;
  flex-shrink: 0;
}

.nav-menu-btn:hover { color: var(--ink); border-color: var(--ink); }

.mobile-menu {
  display: none;
  background: var(--white);
  border-top: 1px dotted var(--border);
  padding: 8px 16px 16px;
  flex-direction: column;
  gap: 10px;
}

.mobile-menu.is-open { display: flex; }

.mobile-menu .nav-link {
  padding: 10px 4px;
  font-size: var(--fs-label);
  border-bottom: 1px dotted var(--border);
}

.mobile-menu .nav-link:last-child { border-bottom: 0; }

@media (max-width: 767px) {
  body.is-fieldnotes .site-nav { padding: 0 12px; }
  body.is-fieldnotes .nav-inner { margin: 0 12px; } /* matches .fieldnotes-feature mobile margin */
  .nav-links { display: none; }
  .nav-menu-btn { display: inline-flex; }
}

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */

.section {
  padding: 96px 16px;
}

.section-center {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
}

/* the fieldnotes list, when merged into the centered home section, fills the
   column and stays left-aligned (the kicker/intro above remain centered) */
.section-center .fieldnotes-list { width: 100%; padding: 0; text-align: left; }

/* home sections sit closer together than the big default .section rhythm */
body.is-home .section { padding-top: 72px; padding-bottom: 72px; }
@media (max-width: 767px) {
  body.is-home .section { padding-top: 48px; padding-bottom: 48px; }
}

.grid {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.section-slab {
  padding: 56px 24px 72px;
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.section-rail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.circled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--blue);
  border-radius: 50%;
  font-size: var(--fs-body);
  font-weight: 400;
  color: var(--blue);
  flex-shrink: 0;
}

.section-kicker {
  text-align: left;
  margin: 0;
}

.arrow {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

@media (min-width: 768px) {
  .section { padding: 192px 48px; }
  .grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 32px;
    align-items: start;
  }
  .col-2 { grid-column: span 2; }
  .col-10 { grid-column: span 10; }
  .col-12 { grid-column: 1 / -1; }
  .section-slab {
    padding: 88px 12% 104px;
    gap: 96px;
  }
}

@media (max-width: 767px) {
  body { padding: 6px; }
  .page-frame { border-radius: 20px; }
  .section { padding: 72px 12px; }
  .section-slab { padding: 40px 8px 56px; gap: 48px; }
}

/* ============================================================
   HOME HERO (interactive CAPSLOCK key)
   ============================================================ */

.home-hero {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--bg);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.hero-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 64px;
}

.key-wrap { position: relative; }

.key-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  user-select: none;
  touch-action: manipulation;
  transform: translateY(0px) scale(1);
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
  outline: none;
}

.key-btn.is-pressed {
  transform: translateY(2px) scale(0.99);
  transition: transform 80ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.key-img-box {
  position: relative;
  width: 160px;
  height: auto;
  --mx: 50%;
  --my: 50%;
  --cap-mask: url('off.png');
}

.key-img-box img {
  width: 100%;
  height: auto;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.key-shadow { position: absolute; inset: 0; z-index: 0; }

.key-cap {
  position: relative;
  z-index: 1;
  transition: filter 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.key-glow {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 60%);
  mix-blend-mode: overlay;
  -webkit-mask-image: var(--cap-mask);
  mask-image: var(--cap-mask);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

@media (hover: hover) and (pointer: fine) {
  .key-btn:hover .key-glow { opacity: 1; }
}

.key-btn.is-pressed .key-glow { opacity: 0; }

.text-block {
  text-align: center;
  max-width: 720px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-kicker {
  font-family: var(--font);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  opacity: 0.85;
}

.hero-title {
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  font-size: var(--fs-title);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 16ch;
}

.hero-sub {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-label);
  line-height: 1.7;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--gray);
  opacity: var(--o-mute);
  max-width: 50ch;
}

.hero-meta {
  font-family: var(--font);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  opacity: var(--o-faint);
  text-align: center;
  margin: 0;
  word-break: break-word;
}

@media (min-width: 768px) {
  .home-hero { padding: 0 48px; border-radius: var(--radius-md) var(--radius-md) 0 0; }
  .key-img-box { width: 244px; }
}

@media (max-width: 767px) {
  .home-hero { min-height: auto; padding: 64px 12px 48px; }
  .hero-stack { gap: 40px; }
  .text-block { gap: 22px; padding: 0 4px; }
  .text-block .type { font-size: var(--fs-label); line-height: 1.7; }
  .hero-meta { font-size: var(--fs-micro); letter-spacing: 0.1em; }
}

/* ============================================================
   FIELDNOTES CARDS
   ============================================================ */

/* News/fieldnotes browser-window cards */
.news-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--blue);
  font-family: var(--font);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

.news-date {
  font-family: var(--font);
  font-size: var(--fs-label);
  letter-spacing: 0;
  color: var(--blue);
  opacity: var(--o-faint);
  text-transform: uppercase;
}

.news-date::before {
  content: "•";
  margin-right: 8px;
  opacity: 0.6;
}

.news-headline {
  color: var(--blue);
  font-weight: 600;
  transition: opacity 200ms ease;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  min-width: 0;
}

.news-bw-card {
  border: 1px solid var(--blue);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--white);
  transition: transform 150ms ease;
  width: 100%;
  min-width: 0;
  position: relative;
}

.news-bw-card:hover { transform: translateY(-3px); }
.news-bw-card:hover .news-headline { opacity: var(--o-mute); }

.news-card-full-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.news-bw-chrome {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--blue);
  flex-shrink: 0;
  min-width: 0;
}

.news-bw-dots { display: flex; gap: 5px; flex-shrink: 0; }

.news-bw-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0.35;
}

.news-bw-url {
  font-family: var(--font);
  font-size: var(--fs-micro);
  letter-spacing: 0;
  color: var(--blue);
  opacity: var(--o-faint);
  display: block;
  text-align: left;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}

.news-bw-image {
  aspect-ratio: 2 / 1;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--blue);
  flex-shrink: 0;
}

.news-bw-image.is-contained {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.news-bw-body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 10px;
  min-width: 0;
}

.news-bw-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.news-bw-body .type { color: var(--blue) !important; }

.news-summary {
  line-height: 1.65;
  letter-spacing: 0;
  opacity: var(--o-mute);
  max-width: 44ch;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-intro {
  margin: 0;
  max-width: 48ch;
  line-height: 1.65;
  letter-spacing: 0;
  color: var(--blue);
  opacity: var(--o-mute);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-read {
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  opacity: 0.72;
}

.news-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px dotted var(--border);
  opacity: var(--o-faint);
  transition: opacity 180ms ease;
  width: 100%;
}

.news-footer:hover { opacity: 1; }

.news-shell { row-gap: 20px; align-items: start; }

.news-center {
  padding: 56px 24px 72px;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 768px) {
  .news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: stretch;
  }
  .news-shell { row-gap: 24px; }
  .news-center { padding: 88px 7% 104px; gap: 28px; }
}

@media (max-width: 767px) {
  .news-grid { gap: 16px; }
  .news-center { padding: 24px 0 32px; gap: 18px; }
  .news-bw-card { border-radius: 14px; }
  .news-bw-chrome { padding: 8px 10px; gap: 8px; align-items: flex-start; }
  .news-bw-url {
    font-size: var(--fs-micro);
    line-height: 1.5;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }
  .news-bw-body { padding: 16px 14px 18px; gap: 8px; }
  .news-bw-meta { gap: 8px; margin-bottom: 0; }
  .news-headline { line-height: 1.5; letter-spacing: 0; }
  .news-summary { font-size: var(--fs-label); line-height: 1.65; letter-spacing: 0; max-width: none; }
  .news-intro { font-size: var(--fs-label); line-height: 1.65; letter-spacing: 0; }
}

/* ============================================================
   POST PAGE
   ============================================================ */

.post-hero {
  min-height: 58vh;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  border-radius: var(--radius-md); /* footer-style rounded corners on the hero */
}

.hero-figure {
  margin: 0;
  width: min(86vw, 560px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ASCII covers — live mono text on the blue hero (no image, no gen tokens) */
.ascii-cover {
  margin: 0;
  font-family: var(--font);
  color: var(--white);
  font-size: clamp(6px, 1.35vw, 13px);   /* small cells → smooth, high-res glyphs */
  line-height: 1;        /* rows fuse into a continuous shaded solid */
  letter-spacing: 0;
  white-space: pre;
  text-align: left;
}

/* card-sized ASCII (index featured + related cards) */
.fieldnotes-feature-media.is-ascii,
.news-bw-image.is-ascii {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ascii-cover--card {
  font-size: clamp(4px, 0.62vw, 8px);
}

/* "keep reading" related cards — smaller than the index featured panel */
.news-bw-image.is-ascii .ascii-cover--card {
  font-size: clamp(3px, 0.45vw, 6px);
}

.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.article-kicker {
  margin: 0 0 10px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--fs-label);
}

.article-title {
  margin: 0 0 28px;
  font-size: var(--fs-title);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.article-body p,
.article-body li {
  margin: 0 0 14px;
  font-size: var(--fs-body);
  line-height: 1.8;
  letter-spacing: 0;
}

.article-body ul,
.article-body ol {
  margin: 0 0 16px 18px;
  padding: 0;
}

.article-body a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body strong { font-weight: 600; }

.article-body code {
  background: rgba(var(--blue-rgb), 0.08);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.92em;
}

.article-body pre {
  background: rgba(var(--blue-rgb), 0.06);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: var(--fs-label);
}

.article-body pre code {
  background: transparent;
  padding: 0;
}

.article-body hr {
  border: 0;
  border-top: 1px dotted var(--border);
  margin: 32px 0;
}

.article-body h2,
.article-body h3 {
  margin: 32px 0 12px;
  line-height: 1.3;
}

.article-body h2 { font-size: var(--fs-body); font-weight: 600; }
.article-body h3 { font-size: var(--fs-body); font-weight: 600; }

.article-pullquote {
  margin: 40px 0;
  padding: 22px 28px;
  background: rgba(var(--blue-rgb), 0.07);
  border-left: 3px solid rgba(var(--blue-rgb), 0.5);
  font-size: var(--fs-body);
  line-height: 1.8;
  letter-spacing: 0;
  color: var(--ink);
}

.article-body blockquote {
  margin: 40px 0;
  padding: 22px 28px;
  background: rgba(var(--blue-rgb), 0.07);
  border-left: 3px solid rgba(var(--blue-rgb), 0.5);
  font-size: var(--fs-body);
  line-height: 1.8;
  letter-spacing: 0;
  color: var(--ink);
}

.article-body blockquote p { margin: 0 0 10px; }
.article-body blockquote p:last-child { margin-bottom: 0; }

.article-nav {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px dotted var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.article-nav a {
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
}

.article-nav a:hover { color: var(--blue); }

@media (max-width: 767px) {
  .post-hero { min-height: 40vh; padding: 0 12px; }
  .hero-figure { width: min(90vw, 360px); }
  .article-title { margin: 0 0 20px; }
  .article-body p, .article-body li { font-size: var(--fs-label); line-height: 1.7; }
  .article-pullquote,
  .article-body blockquote { margin: 28px 0; padding: 16px 18px; font-size: var(--fs-label); line-height: 1.7; }
}

/* ============================================================
   FIELDNOTES INDEX PAGE
   ============================================================ */

/* index masthead sits close to the nav — no giant section top padding */
body.is-fieldnotes .section { padding-top: 0; }

.fieldnotes-header {
  padding: 48px 24px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.fieldnotes-kicker {
  font-family: var(--font);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  opacity: var(--o-mute);
}

.fieldnotes-title {
  font-size: var(--fs-title);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
  font-weight: 500;
}

.fieldnotes-sub {
  max-width: 52ch;
  color: var(--gray);
  font-size: var(--fs-label);
  line-height: 1.7;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: var(--o-mute);
}

/* Intro lede — frames what the fieldnotes are before the posts start */
.fieldnotes-intro {
  max-width: 58ch;
  margin: 6px 0 0;
  color: var(--ink);
  font-size: var(--fs-body);
  line-height: 1.7;
  letter-spacing: 0;
  opacity: 0.82;
}

.fieldnotes-list {
  padding: 24px 24px 72px;
  display: flex;
  flex-direction: column;
}

.fieldnotes-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px dotted var(--border);
  align-items: baseline;
  text-decoration: none;
  color: inherit;
  transition: opacity 160ms ease;
}

.fieldnotes-row:hover { opacity: var(--o-mute); }
.fieldnotes-row:last-child { border-bottom: 0; }

.fieldnotes-row-num {
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  opacity: var(--o-faint);
}

.fieldnotes-row-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.fieldnotes-row-title {
  margin: 0;
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.fieldnotes-row-excerpt {
  margin: 0;
  font-size: var(--fs-label);
  line-height: 1.65;
  letter-spacing: 0;
  color: var(--gray);
  text-transform: uppercase;
  opacity: var(--o-mute);
  max-width: 60ch;
}

.fieldnotes-row-date {
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  opacity: var(--o-faint);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .fieldnotes-header { padding: 64px 24px 56px; gap: 18px; }
  .fieldnotes-list { padding: 32px 12% 120px; }
}

@media (max-width: 767px) {
  .fieldnotes-header { padding: 36px 16px 28px; }
  .fieldnotes-list { padding: 16px 12px 48px; }
  .fieldnotes-row {
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    gap: 6px 12px;
    padding: 18px 0;
  }
  .fieldnotes-row-date {
    grid-column: 2;
    grid-row: 2;
    opacity: var(--o-faint);
  }
  .fieldnotes-row-excerpt { font-size: var(--fs-label); }
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  padding: 0 16px 55px;
  background: transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.footer-body {
  background: var(--bg);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  padding: 64px 24px 40px;
}

.footer-wordmark {
  font-family: var(--font);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 20px;
  display: block;
}

.footer-brand-sub,
.footer-brand-loc,
.footer-nav-label,
.footer-info-line,
.footer-info-link,
.footer-legal {
  font-family: var(--font);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-brand-sub,
.footer-nav-label,
.footer-info-line,
.footer-info-link,
.footer-legal,
.footer-brand-loc {
  color: var(--gray);
}

.footer-brand-sub { opacity: 0.8; display: block; margin-bottom: 8px; }
.footer-brand-loc { opacity: 0.65; display: block; }

.footer-nav { display: flex; flex-direction: column; gap: 14px; }

.footer-nav-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.footer-nav-num {
  font-family: var(--font);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  color: var(--blue);
  opacity: 0.65;
  flex-shrink: 0;
}

.footer-nav-label {
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  transition: color 0.15s ease;
}

.footer-nav-item:hover .footer-nav-label { color: var(--blue); }

.footer-info { display: flex; flex-direction: column; gap: 14px; }
.footer-info-line { opacity: 0.8; }
.footer-info-link {
  opacity: 0.9;
  text-decoration: none;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.footer-info-link:hover { opacity: 1; color: var(--blue); }

.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 18px 24px 34px;
  border-top: 1px dotted var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

.footer-legal {
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  opacity: 0.6;
  margin: 0;
}

@media (min-width: 768px) {
  footer { padding: 0 48px 55px; }
  .footer-body {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0;
    align-items: start;
    padding: 72px 64px 44px;
  }
  .footer-nav,
  .footer-info { align-items: flex-end; text-align: right; }
  .footer-bar { padding: 18px 64px 40px; }
}

@media (max-width: 767px) {
  footer { padding: 0 8px 32px; }
  .footer-body { gap: 32px; padding: 40px 20px 28px; }
  .footer-bar { padding: 14px 20px 24px; }
}

/* ============================================================
   404
   ============================================================ */

.nf-wrap {
  padding: 120px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.nf-kicker {
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  opacity: 0.7;
}

.nf-title {
  margin: 0;
  font-size: var(--fs-title);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nf-body {
  margin: 0;
  color: var(--gray);
  max-width: 42ch;
  line-height: 1.7;
}

.nf-back {
  margin-top: 24px;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================
   NEWSROOM ADDITIONS (dek, read-more, filters, featured)
   ============================================================ */

.is-hidden { display: none !important; }

/* ============================================================
   MICRO-ANIMATIONS (tasteful; reduced-motion safe)
   ============================================================ */


/* 02 — arrow nudge */
.nudge-arrow { display: inline-block; transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1); }
a:hover .nudge-arrow { transform: translateX(4px); }
a:hover .nudge-arrow.is-back { transform: translateX(-4px); }

/* 03 — card lift: brighten the browser-window dots (lift itself already defined) */
.news-bw-dots span { transition: opacity 200ms ease; }
.news-bw-card:hover .news-bw-dots span { opacity: 0.7; }

/* 04 — rise-in on scroll (html.anim set in <head> when motion is allowed) */
html.anim .rise {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
html.anim .rise.is-in { opacity: 1; transform: none; }

/* 05 — chip press */
.fn-chip:active { transform: scale(0.94); }

/* 06 — terminal cursor */
.caps-cursor {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  background: var(--blue);
  margin-left: 0.18em;
  vertical-align: -0.08em;
  animation: caps-blink 1.1s steps(1) infinite;
}
@keyframes caps-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* 09 — reading progress bar (post pages) */
.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--blue); z-index: 200; transition: width 80ms linear;
}

/* braille signal wave — quiet footer detail */
.footer-wave {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--white);
  opacity: 1;
  white-space: pre;
  user-select: none;
}
@media (max-width: 767px) { .footer-wave { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html.anim .rise { opacity: 1 !important; transform: none !important; }
  .caps-cursor { animation: none; }
}

/* Image placeholder — replace with a real image. Suggestion shown via data-suggest. */
.img-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  aspect-ratio: 16 / 9;
  margin: 36px 0;
  padding: 24px;
  border: 2px dashed rgba(var(--blue-rgb), 0.4);
  border-radius: var(--radius-sm);
  background:
    repeating-linear-gradient(45deg, rgba(var(--blue-rgb), 0.035) 0 12px, transparent 12px 24px),
    rgba(var(--blue-rgb), 0.04);
}

.img-ph::before {
  content: "▢ image — " attr(data-suggest);
  max-width: 42ch;
  font-family: var(--font);
  font-size: var(--fs-label);
  line-height: 1.7;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--blue);
  opacity: 0.75;
}

.img-ph.is-portrait { aspect-ratio: 4 / 5; }
.img-ph.is-wide { aspect-ratio: 21 / 9; }

/* In-article ASCII figures — bold white-on-blue panels (the brand's loud mode) */
.ascii-figure {
  margin: 44px 0;
  padding: 48px 16px; /* trimmed sides so the art has more room to grow */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  border-radius: var(--radius-md);
  background: var(--blue);
}

/* Responsive ASCII: scales with the viewport (clamped). The cap + the column's
   own max-width keep the widest figure (34 cols) from ever overflowing. */
.ascii-art {
  margin: 0;
  font-family: var(--font);
  color: var(--white);
  font-size: clamp(10px, 2.4vw, 24px);   /* fits the widest figure (~40 cols) */
  font-weight: 500;
  line-height: 1.05;     /* near-1 so box borders stay connected */
  letter-spacing: 0;
  white-space: pre;
  text-align: left;
}

.ascii-figcaption {
  font-family: var(--font);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.7;
}

/* Post dek — one-line summary under the title */
.article-credit {
  margin: -22px 0 32px;
  color: var(--gray);
  font-size: var(--fs-micro);
  letter-spacing: 0.04em;
}

.article-dek {
  margin: 0 0 32px;
  font-size: var(--fs-body);
  line-height: 1.65;
  letter-spacing: 0;
  color: var(--gray);
  max-width: 58ch;
}

/* "keep reading" related cards under a post */
/* post: the article column manages its own rhythm via element margins — drop the
   big shared flex-gap (it compounded with margins and floated everything apart),
   and let the foot of the article sit close to "keep reading". */
body.is-post .section-slab { gap: 0; padding-top: 24px; padding-bottom: 0; }
.article-section { padding-top: 40px; padding-bottom: 0; }

.article-related-section { padding-top: 64px; padding-bottom: 104px; }
@media (max-width: 767px) { .article-related-section { padding-top: 40px; padding-bottom: 56px; } }

.article-related-label {
  font-family: var(--font);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  opacity: var(--o-mute);
  margin: 0 0 24px;
}

@media (min-width: 768px) {
  .article-related-section .news-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Filter chips on the index */
.fieldnotes-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  margin-bottom: 32px;
}

.fn-chip {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--font);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.fn-chip:hover { color: var(--ink); border-color: var(--ink); }
.fn-chip.is-active { color: var(--white); background: var(--blue); border-color: var(--blue); }

/* Featured (newest) post on the index */
.fieldnotes-feature {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--blue);
  border-radius: var(--radius-md); /* footer-style rounded corners on the cover */
  overflow: hidden;
  background: var(--white);
  text-decoration: none;
  color: inherit;
  margin: 0 24px 8px;
  transition: transform 150ms ease;
}

.fieldnotes-feature:hover { transform: translateY(-3px); }

.fieldnotes-feature-media {
  aspect-ratio: 2 / 1;
  background-size: cover;
  background-position: center;
  background-color: var(--blue);
  border-bottom: 1px solid var(--blue);
}

.fieldnotes-feature-media.is-contained {
  background-size: contain;
  background-repeat: no-repeat;
}

.fieldnotes-feature-body {
  padding: 26px 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.fieldnotes-feature-title {
  margin: 0;
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--blue);
  overflow-wrap: anywhere;
}

.fieldnotes-feature-dek {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.65;
  letter-spacing: 0;
  color: var(--blue);
  opacity: var(--o-mute);
  max-width: 60ch;
}

@media (min-width: 768px) {
  .fieldnotes-filters { padding: 0 12%; }
  .fieldnotes-feature {
    grid-template-columns: 1.1fr 1fr;
    align-items: stretch;
    margin: 0 12% 8px;
  }
  .fieldnotes-feature-media {
    aspect-ratio: auto;
    min-height: 320px;
    border-bottom: none;
    border-right: 1px solid var(--blue);
  }
  .fieldnotes-feature-body { padding: 40px 40px 44px; gap: 18px; }
}

@media (max-width: 767px) {
  .fieldnotes-filters { padding: 0 12px; margin-bottom: 20px; }
  .fieldnotes-feature { margin: 0 12px 8px; }
}

/* ── before/after wipe slider (structure-as-control) ───────────────── */
.wipe { margin: 32px 0; }
.wipe-stage {
  --pos: 50%;
  position: relative;
  aspect-ratio: 1600 / 678;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--ink);
  user-select: none;
}
.wipe-render,
.wipe-blocking {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* blocking sits on top, clipped to the left of the divider */
.wipe-blocking-layer {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.wipe-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(var(--blue-rgb), 0.35);
  pointer-events: none;
}
.wipe-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  color: var(--blue);
  font-size: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.wipe-tag {
  position: absolute;
  bottom: 10px;
  font-size: var(--fs-micro);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--white);
  background: rgba(10, 10, 10, 0.55);
  padding: 3px 8px;
  border-radius: 6px;
  pointer-events: none;
}
.wipe-tag-l { left: 10px; }
.wipe-tag-r { right: 10px; }
/* the range input is an invisible full-stage drag/keyboard control */
.wipe-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.wipe-range::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 100%; }
.wipe-range::-moz-range-thumb { width: 44px; height: 100%; border: 0; background: transparent; }
.wipe-range:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.wipe-treatments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.wipe-treatments button {
  font: 500 var(--fs-micro)/1 var(--font);
  letter-spacing: 0.03em;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.wipe-treatments button:hover { border-color: var(--blue); color: var(--blue); }
.wipe-treatments button.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}
.wipe figcaption {
  margin-top: 10px;
  font-size: var(--fs-micro);
  color: var(--gray);
}

/* ── language switch (en / es) ─────────────────────────────────────── */
.nav-lang {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 10px;
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
}
.nav-lang-opt {
  color: var(--gray-light);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-lang-opt.is-active { color: var(--ink); }
.nav-lang-opt:hover { color: var(--blue); }
.nav-lang-sep { color: var(--border); }
.nav-lang--mobile { margin-left: 0; margin-top: 10px; }
.footer-lang { margin-left: 0; margin-top: 6px; }

/* ── takeaways — the portable lessons, stated outright ─────────────── */
.takeaways {
  margin: 40px 0 8px;
  padding: 24px 26px 22px;
  background: rgba(var(--blue-rgb), 0.05);
  border: 1px solid rgba(var(--blue-rgb), 0.22);
  border-radius: var(--radius-md);
}
.takeaways-label {
  margin: 0 0 14px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--fs-label);
}
.takeaways ul { list-style: none; margin: 0; padding: 0; }
.takeaways li {
  position: relative;
  padding-left: 24px;
  margin: 0 0 11px;
  font-size: var(--fs-body);
  line-height: 1.55;
}
.takeaways li:last-child { margin-bottom: 0; }
.takeaways li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--blue);
  font-weight: 600;
}
