/* ============================================================
   ma-cc-styles.css — eesur.com/ma-cc
   How does friction amplify interpolation?
   ============================================================ */

/* FONTS
   ------------------------------------------------------------ */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/ma-cc/fonts/JetBrainsMono-Medium.woff2') format('woff2'),
       url('/ma-cc/fonts/JetBrainsMono-Medium.woff') format('woff');
  font-weight: 500;
  font-display: optional;
  size-adjust: 100%;
  ascent-override: 95%;
  descent-override: 25%;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/ma-cc/fonts/JetBrainsMono-Thin.woff2') format('woff2'),
       url('/ma-cc/fonts/JetBrainsMono-Thin.woff') format('woff');
  font-weight: 100;
  font-display: optional;
  size-adjust: 100%;
  ascent-override: 95%;
  descent-override: 25%;
}

/* TOKENS
   ------------------------------------------------------------ */
:root {
  --col-width:   680px;
  --image-width: 900px;

  --bg:     #fafaf8;
  --ink:    #121415;
  --lime:   #aeff00;   /* structural — formula, toggle active */
  --yellow: #ffff00;   /* secondary — quotes, code blocks */

  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Consolas', 'Menlo', 'Monaco', 'Courier New', monospace;

  --text-sm:   12px;
  --text-base: 16px;
  --lh-base:   1.6;

  --section-gap: 80px;
}

/* RESET
   ------------------------------------------------------------ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BASE
   ------------------------------------------------------------ */

body {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  font-weight: 100;
  background: var(--bg);
  color: var(--ink);
  padding: 120px 40px 60px;
  overflow-x: hidden;
}

.container {
  max-width: var(--col-width);
  margin: 0 auto;
}

/* TYPOGRAPHY
   ------------------------------------------------------------ */
p {
  margin-bottom: 20px;
}

em { font-style: italic; }

a {
  color: var(--ink);
  font-weight: 100;
  text-decoration: none;
  border-bottom: 1px dotted var(--ink);
  transition: border-color 0.2s;
}

a:hover { border-color: transparent; }

/* SECTION HEADERS
   ------------------------------------------------------------ */
.section {
  margin-bottom: var(--section-gap);
  position: relative;
}

.section-header {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 24px;
  position: relative;
}

/* full-bleed rule bleeds left to viewport edge from centred column */
.section-header::before {
  content: '';
  position: absolute;
  right: 100%;
  margin-right: 20px;
  top: 50%;
  width: 100vw;
  height: 0;
  border-top: 1px dotted var(--ink);
}

/* FORMULA — lime structural moment
   ------------------------------------------------------------ */
.formula {
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--ink);
  background: var(--lime);
  display: inline-block;
  padding: 12px 20px;
  margin: 0px 0 20px 0;
}

.formula a {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.formula a:hover {
  color: var(--ink);
  border-bottom-color: transparent;
}

/* QUOTE BLOCK — yellow secondary
   ------------------------------------------------------------ */
.quote-wrapper {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: var(--image-width);
  max-width: calc(100vw - 80px);
  margin: 30px 0;
  font-size: var(--text-base);
  line-height: var(--lh-base);
}

.quote-text {
  background: var(--lime);
  padding: 24px 28px;
  display: block;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  hanging-punctuation: first last;
  text-indent: -0.45em;
  padding-left: calc(28px + 0.45em);
}

.quote-attribution {
  font-size: var(--text-sm);
  display: block;
  margin-top: 10px;
  padding-left: 2px;
  opacity: 0.6;
}

/* IMAGES — centred on page, bleeds symmetrically beyond text column
   ------------------------------------------------------------ */
.image-full {
  position: relative;
  /* pull left by half the overhang so it centres on the page */
  left: 50%;
  transform: translateX(-50%);
  width: var(--image-width);
  max-width: calc(100vw - 80px);
  margin: 40px 0;
}

.image-full img {
  width: 100%;
  display: block;
}

.image-caption {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 8px;
  color: var(--ink);
  opacity: 0.5;
}

/* dot pattern fills both bleed zones (beyond image edges) */
.image-full::before,
.image-full::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc((100vw - var(--image-width)) / 2);
  background-image: radial-gradient(circle, var(--ink) 1px, transparent 1px);
  background-size: 8px 8px;
  opacity: 0.12;
  pointer-events: none;
}

.image-full::before {
  right: 100%;
}

.image-full::after {
  left: 100%;
}

/* IMAGE PLACEHOLDER (until real images drop in)
   ------------------------------------------------------------ */
.image-placeholder {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: var(--image-width);
  max-width: calc(100vw - 80px);
  height: 300px;
  background: var(--ink);
  opacity: 0.06;
  margin: 40px 0;
}

/* NAV BAR — yellow, fixed top
   ------------------------------------------------------------ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--yellow);
  /* match body horizontal padding so inner aligns with .container */
  padding: 0 40px;
}

.site-nav-inner {
  max-width: var(--col-width);
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
}

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

.nav-link {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: none;
}

.nav-link:hover {
  border-bottom: none;
  opacity: 1;
}

/* current page — strikethrough, pulled back */
.nav-link.nav-current {
  text-decoration: line-through;
  text-decoration-color: #121415;
  text-decoration-thickness: 1px;
  color: #121415;
  pointer-events: none;
  cursor: default;
}

/* toggle — pinned to far right of viewport with small margin */
.nav-toggle {
  position: fixed;
  top: 0;
  right: 40px;
  height: 48px;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--ink);
  user-select: none;
}

.nav-toggle svg {
  display: block;
}

/* dot transition via CSS (cx not always animatable, use transform fallback) */
.toggle-dot {
  transition: cx 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* detail layer — rendered by JS from ma-cc-copy.js */

/* NAVIGATION (sub-pages)
   ------------------------------------------------------------ */
.sub-nav {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--ink);
}

.sub-nav-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.4;
}

.sub-nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-nav-links a {
  font-size: var(--text-base);
  border-bottom: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.sub-nav-links a::before {
  content: '→';
  font-weight: 500;
}

.sub-nav-links a:hover { opacity: 0.5; }

/* INLINE SUB-PAGE LINK (within landing prose)
   ------------------------------------------------------------ */
.prose-link {
  font-weight: 100;
  border-bottom: 1px dotted var(--ink);
  color: var(--ink);
}

.prose-link:hover {
  border-color: transparent;
}

/* EXIT LINKS — Fibonacci layout (inherited from eesur.com)
   ------------------------------------------------------------ */
.exit-links {
  margin-top: 60px;
  /* bleed full width from centred container */
  position: relative;
  left: calc(50% - 50vw + 40px);
  width: calc(100vw - 80px);
}

.exit-row {
  position: relative;
  margin-bottom: calc(var(--fib) * 8px);
  height: 40px;
}

.exit-row::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 0;
  border-top: 1px dotted var(--ink);
  z-index: 0;
}

.exit-link {
  position: absolute;
  left: var(--offset);
  top: 50%;
  transform: translate(0, -50%);
  z-index: 1;
  padding: 8px 16px;
  color: var(--ink);
  background: var(--bg);
  text-decoration: none;
  border-bottom: none;
  font-size: var(--text-base);
  line-height: 1;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.exit-link:hover {
  background: var(--ink);
  color: var(--bg);
  border-bottom: none;
}

/* 5×5 SQUARE DEVICE (section divider / structural)
   ------------------------------------------------------------ */
.squares {
  display: grid;
  grid-template-columns: repeat(5, 12px);
  grid-template-rows: repeat(5, 12px);
  gap: 3px;
  margin: 40px 0;
}

.sq {
  width: 12px;
  height: 12px;
  background: var(--ink);
  opacity: 0.15;
}

.sq.filled { opacity: 1; }

/* ============================================================
   MOBILE
   ============================================================ */


/* LIME HIGHLIGHT — inline, used for the research question
   ------------------------------------------------------------ */
.highlight-lime {
  background: var(--lime);
  padding: 0 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* FOOTNOTES
   ------------------------------------------------------------ */
.notes-section {
  margin-top: var(--section-gap);
}

.notes-list {
  list-style: none;
  margin: 0;
  margin-left: -22px;
  padding: 0;
}

.note-item {
  margin-bottom: 20px;
  font-size: var(--text-sm);
  line-height: 1.7;
  max-width: var(--col-width);
  padding-left: 0;
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0;
}

.note-item .note-num {
  font-weight: 500;
  color: #c0392b;
  font-size: 9px;
  line-height: 1.9;
  text-align: right;
  padding-right: 8px;
}

.note-num {
  color: #c0392b;
  border-bottom: none;
  font-weight: 500;
  font-size: 9px;
  transition: transform 0.2s ease, color 0.15s;
  display: inline-block;
}

.note-num:hover {
  color: var(--ink);
  border-bottom: none;
  transform: translateY(-4px);
}

.note-item {
  overflow: visible;
}

/* superscript footnote refs in prose */
sup {
  font-size: 9px;
  line-height: 0;
  vertical-align: super;
  margin-left: 1px;
}

sup a {
  border-bottom: none;
  font-weight: 500;
  color: #c0392b;
  padding: 8px 4px;
  margin: -8px -4px;
}

sup a:hover {
  color: var(--ink);
  border-bottom: none;
}

/* smooth scroll for footnote jumps */
html { scroll-behavior: smooth; }

/* breathing room when scrolling to a note or back to a ref */
.note-item  { scroll-margin-top: 180px; }
sup a       { scroll-margin-top: 200px; }

/* COLOUR RAMP — single animated d3 bar
   ------------------------------------------------------------ */


/* utility — image-width block, centred, used on ramp and images */
.u-image-width {
  width: var(--image-width);
  max-width: calc(100vw - 80px);
  margin-left: auto;
  margin-right: auto;
}

.ramp-outer canvas {
  display: block;
  width: 100%;
  height: 56px;
  image-rendering: auto;
}

.ramp-caption {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.4;
  margin-top: 0;
  margin-bottom: 24px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: var(--image-width);
  max-width: calc(100vw - 80px);
  display: block;
}

.ramp-outer {
  margin-top: 18px;
  width: 1180px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.ramp-outer svg {
  display: block;
  width: 100%;
  height: 56px;
}



/* DATA PAGE UTILITIES
   ------------------------------------------------------------ */
.image-placeholder--tall { height: 400px; }

.session-start { margin-top: 60px; }

.formula--data { margin: 30px 0; }

.note-empty {
  opacity: 0.4;
  font-size: 12px;
  letter-spacing: 1px;
}

.tacit-note { margin-top: 30px; }
.image-placeholder--short { height: 120px; }

/* PARALLEL COORDINATES CHART
   ------------------------------------------------------------ */
.parallel-wrap {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 1180px;
  max-width: calc(100vw - 80px);
  margin: 40px 0 0;
  overflow: visible;
}

.parallel-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* CHART TOGGLES
   ------------------------------------------------------------ */
.chart-toggles {
  display: flex;
  gap: 8px;
  margin-top: 40px;
  margin-bottom: 10px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: var(--image-width);
  max-width: calc(100vw - 80px);
}

.chart-toggle {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: none;
  border: 1px dotted var(--ink);
  color: var(--ink);
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.chart-toggle.active {
  background: var(--yellow);
}

/* GAP GRID ANIMATION
   ------------------------------------------------------------ */
.gap-grid-wrap {
  margin: 30px 0 0;
  width: 420px;
  max-width: 100%;
  line-height: 0;
}

.gap-grid-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

/* PARTICIPANT GRID — 5×5
   ------------------------------------------------------------ */
.participant-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 30px 0 0;
  max-width: var(--col-width);
}

.pgrid-cell {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--ink);
}

.pgrid-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.2s;
}

.pgrid-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 8px;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bg);
  background: linear-gradient(to bottom, transparent, var(--ink));
  opacity: 0;
  transition: opacity 0.2s;
}

.pgrid-cell:hover .pgrid-label {
  opacity: 1;
}

.pgrid-id {
  display: block;
  opacity: 0.5;
  margin-bottom: 2px;
}

.pgrid-name {
  display: block;
}

/* LINEAGE GRID
   ------------------------------------------------------------ */
.lineage-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin: 40px 0;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: var(--image-width);
  max-width: calc(100vw - 80px);
}

.lgrid-cell {
  opacity: 1;
  transition: opacity 0.4s ease;
}

.lgrid-img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: 8px;
  background: var(--ink);
}

.lgrid-name {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1px;
  line-height: 1.4;
  margin-bottom: 6px;
  color: var(--ink);
}

.lgrid-line {
  width: 1px;
  height: 20px;
  background: var(--ink);
  opacity: 0.3;
  margin: 4px 0;
}

.lgrid-concept {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: var(--ink);
}

.lgrid-not {
  font-size: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.4;
  color: var(--ink);
}

.lgrid-not-label {
  font-weight: 500;
}

/* AXES DIAGRAM
   ------------------------------------------------------------ */
.axes-diagram {
  width: 100%;
  max-width: var(--col-width);
  margin: 32px auto;
}

#axes-diagram-vertical {
  width: 1180px;
  max-width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 16px;
  margin-bottom: 16px;
}

/* ============================================================
   MOBILE — max-width: 768px
   All mobile overrides in one place, at the bottom.
   ============================================================ */
@media (max-width: 768px) {

  /* BASE */
  body {
    padding: 100px 20px 40px;
    font-size: 10px;
  }

  .container {
    overflow-x: hidden;
  }

  /* FOOTNOTES */
  .note-item {
    font-size: 9px;
  }

  .note-item .note-num {
    font-size: 8px;
  }

  sup {
    font-size: 8px;
  }

  /* FORMULA */
  .formula {
    font-size: 9px;
    word-break: break-word;
    white-space: normal;
    display: block;
  }

  /* NAV */
  .site-nav { padding: 0 20px; }
  .site-nav-inner { height: 44px; }
  .site-nav-links { gap: 20px; }

  /* FULL-BLEED IMAGES */
  .image-full,
  .image-placeholder,
  .u-image-width {
    width: 100vw;
    max-width: 100vw;
    margin-left: -20px;
    margin-right: -20px;
    left: 0;
    transform: none;
    position: relative;
  }

  .image-full::before,
  .image-full::after { display: none; }

  /* RAMP */
  .ramp-outer {
    width: 100%;
    margin-left: 0;
  }

  /* PARALLEL CHART */
  .parallel-wrap {
    width: 100%;
    max-width: 100%;
    left: 0;
    transform: none;
    overflow: hidden;
    margin: 20px 0 0 -20px;
  }

  .parallel-wrap svg {
    width: 100%;
    height: auto;
    min-width: unset;
    display: block;
    overflow: hidden;
  }

  /* CHART TOGGLES */
  .chart-toggles {
    width: 100vw;
    max-width: 100vw;
    margin-left: -20px;
    margin-right: -20px;
    left: 0;
    transform: none;
    padding: 0 20px;
    box-sizing: border-box;
  }

  /* LINEAGE GRID */
  .lineage-grid {
    width: 100vw;
    max-width: 100vw;
    margin-left: -20px;
    margin-right: -20px;
    left: 0;
    transform: none;
    position: relative;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 20px;
    box-sizing: border-box;
  }

  .lineage-grid .lgrid-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center top;
  }

  .lgrid-name    { font-size: 10px; }
  .lgrid-concept { font-size: 9px; letter-spacing: 1px; }
  .lgrid-not     { font-size: 9px; }

  /* QUOTES */
  .quote-wrapper {
    width: 100vw;
    max-width: 100vw;
    margin-left: -20px;
    margin-right: -20px;
    left: 0;
    transform: none;
  }

  .quote-text {
    padding: 20px;
    font-size: 10px;
  }

  .quote-attribution {
    padding-left: 20px;
    font-size: 9px;
  }

  .protocol-quote {
    font-size: 10px;
  }

  /* FOOTNOTES */
  .notes-list {
    margin-left: 0;
  }

  /* EXIT LINKS */
  .exit-links {
    left: calc(50% - 50vw + 20px);
    width: calc(100vw - 40px);
  }

  .exit-link {
    font-size: 10px;
  }

  .exit-row {
    height: auto;
    min-height: 32px;
    display: flex;
    align-items: center;
    margin-bottom: calc(var(--fib) * 6px);
  }

  .exit-row::before {
    flex: 1;
    height: 0;
    top: auto;
    border-top: 1px dotted var(--ink);
    margin-right: 12px;
  }

  .exit-link {
    position: static;
    flex-shrink: 0;
    padding: 6px 20px 6px 0;
  }

  .exit-row.blank::before {
    flex: none;
    width: 100%;
    margin-right: 0;
  }

}

/* LEGACY PAGE
   ------------------------------------------------------------ */
.legacy-item {
  max-width: var(--col-width);
  margin-bottom: 40px;
  padding-top: 20px;
  border-top: 1px dotted var(--ink);
}

.legacy-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--ink);
}

/* PLAY PAGE
   ------------------------------------------------------------ */
.play-item {
  max-width: var(--col-width);
  margin: 40px 0 0;
  padding-top: 20px;
  border-top: 1px dotted var(--ink);
}

.play-item-meta {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 8px;
}

.play-item-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.4;
  flex-shrink: 0;
}

.play-item-link {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.play-item-desc {
  font-size: var(--text-sm);
  opacity: 0.7;
  margin-bottom: 16px;
}

/* LINK-OUT — yellow pill, used for Observable and external links
   ------------------------------------------------------------ */
.link-out {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  padding: 10px 16px;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: none;
  transition: background 0.2s, color 0.2s;
}

.link-out:hover {
  background: var(--ink);
  color: #fafaf8;
  border-bottom: none;
}

/* PLAY PAGE — image grid (ported from macc-gcd)
   ------------------------------------------------------------ */
.img-row {
  display: flex;
  gap: 20px;
  margin: 20px 0 0;
  width: var(--image-width);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.img-figure {
  flex: 1;
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.img-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.img-caption {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #aaa;
  margin: 6px 0 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.img-figure .img-caption {
  width: 100%;
  text-align: right;
}

/* three image widths — text / 900 / 1180 */
.img-text {
  display: block;
  width: 100%;
  max-width: var(--col-width);
  height: auto;
  margin: 20px 0 0;
}

.img-text + .img-caption {
  max-width: var(--col-width);
}

.img-900 {
  display: block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: var(--image-width);
  max-width: var(--image-width);
  height: auto;
  margin: 20px 0 0;
}

.img-900 + .img-caption {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: var(--image-width);
  text-align: right;
}

.img-1180 {
  display: block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 1180px;
  max-width: 1180px;
  height: auto;
  margin: 20px 0 0;
}

.img-1180 + .img-caption {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 1180px;
  text-align: right;
}



.img-caption--hero {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: var(--image-width);
  text-align: right;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #aaa;
  margin: 6px 0 20px;
}



/* PROTOCOL PAGE
   ------------------------------------------------------------ */
.protocol-quote {
  font-size: var(--text-base);
  font-weight: 100;
  line-height: 1.8;
  border-left: 3px solid var(--lime);
  margin: 20px 0;
  padding: 4px 0 4px 20px;
  max-width: var(--col-width);
  hanging-punctuation: first last;
  text-indent: -0.45em;
  padding-left: calc(20px + 0.45em);
}

/* UTILITY
   ------------------------------------------------------------ */
.hidden { display: none; }

.section--footer { padding-top: 80px; }

.axes-svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Consolas', 'Menlo', 'Monaco', 'Courier New', monospace;
  overflow: visible;
}

.axes-diagram text {
  font-family: var(--font-mono);
  font-weight: 100;
  font-size: var(--text-base);
  fill: #6608ff;
}

#axes-diagram text {
  font-size: 7.6px;
}

/* SCANS GRID
   ------------------------------------------------------------ */
.scans-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px 20px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 1180px;
  max-width: calc(100vw - 80px);
  margin: 32px 0;
}

.scans-item {
  margin: 0;
  padding: 0;
}

.scans-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px dotted var(--ink);
}

.scans-caption {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 100;
  line-height: 1.6;
  color: var(--ink);
  margin-top: 8px;
  text-align: right;
}



/* 
   ------------------------------------------------------------ */
.nb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 20px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 1180px;
  max-width: calc(100vw - 80px);
  margin: 32px 0;
}

.nb-item {
  margin: 0;
  padding: 0;
}

.nb-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px dotted var(--ink);
}

.nb-caption {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 100;
  line-height: 1.6;
  margin-top: 8px;
  text-align: right;
}

.nb-caption a {
  color: var(--ink);
  text-decoration: none;
}

.nb-caption a:hover {
  color: #6608ff;
}


/* ============================================================
   MOBILE — consolidated overrides (max-width: 768px)
   All mobile rules in one place.
   ============================================================ */
@media (max-width: 768px) {

  /* IMAGES */
  .img-row {
    flex-direction: column;
    width: 100%;
    left: 0;
    transform: none;
  }

  .img-900,
  .img-1180 {
    width: 100vw;
    max-width: 100vw;
    left: -20px;
    transform: none;
  }

  /* poem image — scale up so text is readable on mobile */
  .img-900[alt="Interpolation — a concrete poem by Sundar Singh Liddar"] {
    width: 130vw;
    max-width: 130vw;
    left: -8%;
    transform: translateX(-10%);
    overflow: hidden;
  }

  .img-900[alt="Interpolation — a concrete poem by Sundar Singh Liddar"] + * {
    clear: both;
  }

  .img-900 + .img-caption,
  .img-1180 + .img-caption {
    width: 100%;
    left: 0;
    transform: none;
    text-align: left;
  }

  .img-caption--hero {
    width: 100%;
    left: 0;
    transform: none;
    text-align: left;
  }

  /* PROTOCOL QUOTE */
  .protocol-quote {
    font-size: 10px;
    padding-left: calc(16px + 0.45em);
  }

  /* SCANS CAPTION */
  .scans-caption {
    font-size: 9px;
  }

  /* SCANS GRID */
  .scans-grid {
    grid-template-columns: repeat(2, 1fr);
    width: 100vw;
    margin-left: -20px;
    margin-right: -20px;
    left: auto;
    transform: none;
    max-width: 100vw;
    gap: 16px 12px;
    padding: 0 20px;
    box-sizing: border-box;
  }

  /* NB GRID */
  .nb-grid {
    grid-template-columns: repeat(2, 1fr);
    width: calc(100vw - 40px);
    left: 0;
    transform: none;
    max-width: calc(100vw - 40px);
    gap: 16px 12px;
    padding: 0;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
  }

  .nb-caption {
    font-size: 9px;
  }

  /* PLAY PAGE */
  .play-item-link {
    font-size: 10px;
  }

  .play-item-desc {
    font-size: 10px;
  }

  .link-out {
    font-size: 10px;
    padding: 8px 12px;
  }

}