/* AME Labs — site stylesheet.
   Tokens and rules from BRAND SHEET - AME LABS Identity - 2026-08-26:
   Archivo headings/UI + Source Serif 4 body · warm greys · sharp corners (radius 0)
   · 16-unit rhythm · red #DF2A15 = the accent · amber demoted to support. */

:root {
  --ink: #201B15;
  --paper: #FAF6EF;
  --red: #DF2A15;

  --bg: var(--paper);
  --surface: #F3EDE3;
  --surface-hover: #EAE1D0;  /* hover tint: darker than surface on light */
  --photo-veil: color-mix(in srgb, var(--surface) 62%, transparent);  /* over card photos, keeps titles readable */
  --text: var(--ink);
  --strong2: #453C33;   /* grey-800 */
  --muted: #6E6357;     /* grey-600 — the floor for reading text */
  --border: #BDB3A6;    /* grey-300 */
  --hairline: #E5DED2;  /* grey-200 */
  --link: #DF2A15;
  --amber: #C2701F;
  --cta-bg: #DF2A15;
  --cta-label: #FAF6EF;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #201B15;
    --surface: #2A241E;
    --surface-hover: #383026;  /* hover tint: lighter than surface on dark */
    --photo-veil: color-mix(in srgb, var(--surface) 76%, transparent);
    --text: #F2ECE1;
    --strong2: #D8CFC0;
    --muted: #B5A99B;
    --border: #453C33;
    --hairline: #453C33;
    --link: #F0503A;   /* #DF2A15 is graphics-only on dark */
    --amber: #E8930C;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.65;
  /* short pages: footer rests at the bottom of the viewport */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
main { flex-grow: 1; }

h1, h2, h3, h4 {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  line-height: 1.25;
}
h1 { font-size: 30px; }
h2 { font-size: 20px; margin-top: 48px; margin-bottom: 16px; }
h3 { font-size: 17px; margin-top: 32px; margin-bottom: 8px; }

p { margin-bottom: 16px; }
ul, ol { margin: 0 0 16px 24px; }
li { margin-bottom: 8px; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

strong { color: var(--text); }
em { font-style: italic; }

hr {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 48px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0 24px;
  font-size: 15px;
}
th, td {
  border: 1px solid var(--border);
  padding: 8px 16px;
  text-align: left;
  vertical-align: top;
}
th {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 13px;
  background: var(--surface);
}
.table-scroll { overflow-x: auto; }

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--surface);
  padding: 1px 5px;
}

/* ---------- layout ---------- */

.container { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.prose { max-width: 928px; margin: 0 auto; padding: 0 24px; }
.page-head { max-width: none; }

main { padding-top: 48px; padding-bottom: 32px; }

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

.site-header {
  border-bottom: 1px solid var(--hairline);
}
@media (min-width: 761px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
  }
}
[id] { scroll-margin-top: 88px; }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand svg { height: 30px; width: auto; display: block; }
.brand-name {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.10em;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.site-nav a {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  color: var(--strong2);
}
.site-nav a:hover { color: var(--link); }
.site-nav a[aria-current="page"] { color: var(--link); }

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

.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 96px;
  padding: 24px 0 32px;
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--muted);
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer p { margin: 0; }
@media (max-width: 760px) {
  .site-footer .container { flex-direction: column; align-items: flex-start; gap: 8px; }
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--link); }
.site-footer .footer-lab {
  color: var(--strong2);
  font-weight: 600;
}
/* channel glyphs (Substack, LinkedIn) — monochrome; inside body links they
   stay ink (third-party marks: black/white only), footer keeps them muted */
.soc { height: 14px; width: auto; vertical-align: -2px; margin-right: 6px; }
main .soc { color: var(--strong2); }

/* ---------- shared components ---------- */

.eyebrow {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--link); text-decoration: underline; }

.box {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px 32px;
  margin: 32px 0;
}
.box > :last-child { margin-bottom: 0; }

.btn {
  display: inline-block;
  background: var(--cta-bg);
  color: var(--cta-label);
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 12px 24px;
  border: none;
}
.btn:hover { background: #C42412; text-decoration: none; }

/* a fact only Vincent can supply — visibly unfinished, on purpose */
.slot {
  background: color-mix(in srgb, var(--amber) 16%, transparent);
  outline: 1px dashed var(--amber);
  outline-offset: 1px;
  padding: 0 4px;
}

figure {
  background: #FAF6EF; /* figures are authored on paper; hold it in both themes */
  border: 1px solid var(--hairline);
  padding: 16px;
  margin: 32px 0;
}
figure img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
figcaption {
  margin-top: 16px;
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
}

.standfirst {
  font-size: 20px;
  line-height: 1.5;
  font-style: italic;
  color: var(--strong2);
  margin-bottom: 24px;
}

.byline {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}
.status-line {
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 32px;
}

.closing-note {
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- landing ---------- */

.hero {
  text-align: center;
  padding: 64px 0 32px;
}
.hero .mark { height: 112px; width: auto; }
.hero h1 {
  font-size: 38px;
  letter-spacing: 0.10em;
  margin-top: 32px;
}
.hero .descriptor {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
  margin-bottom: 32px;
}
.hero .tagline {
  max-width: 560px;
  margin: 0 auto;
  font-size: 19px;
  line-height: 1.6;
}

.one-number {
  text-align: center;
  max-width: 640px;
  margin: 64px auto 0;
  padding: 0 24px;
}
.one-number p { font-size: 19px; }
.one-number .read-how {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.one-number .read-how:hover { text-decoration: underline; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 64px;
}
@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
}
.card .glyph { height: 32px; margin-bottom: 16px; }
.card .glyph svg { height: 32px; width: auto; display: block; }
.card h3 { margin-top: 0; font-size: 18px; line-height: 1.4; }
.card p { font-size: 15px; line-height: 1.6; flex-grow: 1; }
.card .card-link {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}
.card .card-link:hover { text-decoration: underline; }

/* ---------- principle boxes (framework page) ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 32px 0;
}
@media (max-width: 760px) {
  .principles { grid-template-columns: 1fr; }
}

/* Each principle sits in a fixed-height slot; the card inside overlays
   downward on hover instead of pushing the rows below. */
.principle { position: relative; height: 208px; }
.principle .card {
  position: absolute;
  top: 0; left: 0; width: 100%;
  min-height: 100%;
  max-height: 208px;
  overflow: hidden;
  z-index: 1;
  transition: max-height 0.3s ease, background-color 0.3s ease,
              box-shadow 0.3s ease, z-index 0s linear 0.3s;
}
/* fade at the bottom hints there is more text */
.principle .card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 56px;
  background: linear-gradient(to bottom, transparent, var(--surface) 85%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.principle:hover .card,
.principle:focus-within .card {
  max-height: 720px;
  background: var(--surface-hover);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--ink) 25%, transparent);
  z-index: 5;
  transition: max-height 0.3s ease, background-color 0.3s ease,
              box-shadow 0.3s ease, z-index 0s;
}
.principle:hover .card::after,
.principle:focus-within .card::after { opacity: 0; }

/* touch devices have no hover: show everything at natural height */
@media (hover: none) {
  .principle { height: auto; }
  .principle .card { position: static; max-height: none; overflow: visible; }
  .principle .card::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .principle .card, .principle .card::after { transition: none; }
}

/* ---------- shape flip cards (framework page) ---------- */

.shapes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
}
@media (max-width: 900px) {
  .shapes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .shapes { grid-template-columns: 1fr; }
}

.shape { height: 224px; perspective: 1200px; }
.shape-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s ease;
}
.shape:hover .shape-inner,
.shape:focus .shape-inner,
.shape:focus-within .shape-inner { transform: rotateY(180deg); }
.shape-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  overflow: hidden;
}
.shape-front {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  text-align: center;
  background-size: cover;
  background-position: center;
}
.shape-front .glyph svg { height: 40px; width: auto; display: block; }
.shape-front h3 { position: relative; margin: 0; font-size: 18px; line-height: 1.4; }
/* duotoned photo behind each front, under a theme-aware veil */
.shape--daily-life .shape-front    { background-image: linear-gradient(var(--photo-veil), var(--photo-veil)), url("/assets/shapes/daily-life.jpg"); }
.shape--at-home .shape-front       { background-image: linear-gradient(var(--photo-veil), var(--photo-veil)), url("/assets/shapes/at-home.jpg"); }
.shape--relatives .shape-front     { background-image: linear-gradient(var(--photo-veil), var(--photo-veil)), url("/assets/shapes/relatives.jpg"); }
.shape--professional .shape-front  { background-image: linear-gradient(var(--photo-veil), var(--photo-veil)), url("/assets/shapes/professional.jpg"); }
.shape--organizations .shape-front { background-image: linear-gradient(var(--photo-veil), var(--photo-veil)), url("/assets/shapes/organizations.jpg"); }
.shape--devices .shape-front       { background-image: linear-gradient(var(--photo-veil), var(--photo-veil)), url("/assets/shapes/devices.jpg"); }
.shape-back {
  transform: rotateY(180deg);
  background: var(--surface-hover);
  padding: 20px;
  overflow-y: auto;
}
.shape-back h3 { margin: 0 0 8px; font-size: 15px; line-height: 1.4; }
.shape-back p { font-size: 14px; line-height: 1.55; margin: 0; }

/* touch devices have no hover: one flat card, front as header, text below */
@media (hover: none) {
  .shape { height: auto; perspective: none; }
  .shape-inner { transform: none !important; }
  .shape-face { position: static; backface-visibility: visible; }
  .shape-front { border-bottom: none; padding-bottom: 8px; }
  .shape-back { transform: none; border-top: none; padding-top: 0; background: var(--surface); }
  .shape-back h3 { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .shape-inner { transition: none; }
}

/* ---------- interactive module map (architecture page) ---------- */

.module-map {
  position: relative;
  border: 1px solid var(--hairline);
  background: var(--bg);
  padding: 16px;
  margin: 32px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.map-title {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--amber);
  margin: 4px 0 10px;
}
.map-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.map-row--full { grid-template-columns: 1fr; }
.map-arrow { display: flex; justify-content: center; }
.map-arrow svg { height: 8px; width: auto; display: block; }

.layer {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 12px;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.layer:hover, .layer:focus-within { background: var(--surface-hover); }
/* spotlight: while one layer is open, the rest of the map steps back */
.module-map:has(.layer:hover) .layer:not(:hover),
.module-map:has(.layer:focus-within) .layer:not(:focus-within) { opacity: 0.45; }
.layer-name {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 8px;
}
.layer-modules { display: grid; gap: 8px; }
.layer-modules.cols-2 { grid-template-columns: repeat(2, 1fr); }
.layer-modules.cols-3 { grid-template-columns: repeat(3, 1fr); }
.layer-modules.solo { justify-items: center; }
.layer-modules.solo .chip { width: min(100%, 320px); }
.chip {
  background: var(--bg);
  border: 1px solid var(--strong2);
  padding: 8px 10px;
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 13px;
  text-align: center;
}

/* the detail panel opens just below its row (above, for map-row--up),
   styled apart from the figure: paper ground, ink frame, red edge */
.layer-detail {
  position: absolute;
  left: 8px; right: 8px;
  top: calc(100% + 6px);
  transform: translateY(-6px) scale(0.98);
  opacity: 0;
  visibility: hidden;
  z-index: 5;
  pointer-events: none; /* the pointer sees the boxes beneath: sweeping the map switches panels */
  background: var(--bg);
  border: 2px solid var(--text);
  border-left: 4px solid var(--red);
  box-shadow: 0 20px 48px color-mix(in srgb, var(--ink) 38%, transparent);
  padding: 20px 24px;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}
.map-row--up .layer-detail {
  top: auto;
  bottom: calc(100% + 6px);
  transform: translateY(6px) scale(0.98);
}
.layer:hover .layer-detail,
.layer:focus-within .layer-detail {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s;
}
.layer-detail .layer-name { margin-bottom: 2px; }
.layer-purpose {
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  margin: 0 0 12px;
}
.layer-detail .mod { font-size: 14px; line-height: 1.55; margin: 0 0 8px; }
.layer-detail .mod:last-child { margin-bottom: 0; }
.layer-detail .stores {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--strong2);
}
.map-caption {
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 32px;
}

/* faculty-table cells (doctrine section): picto + name on one line, descriptor below */
.fac { height: 30px; width: auto; flex: none; }
.fac-head {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.fac-desc {
  display: block;
  margin-top: 4px;
  font-style: italic;
  color: var(--muted);
  font-size: 14px;
}

/* deployment header pictograms (stack grid) */
.glyph-sm svg { height: 28px; width: auto; display: block; margin: 0 auto 6px; }

/* nested-rings extensibility diagram: core inside adapters inside packages,
   panels appear in the column beside the diagram */
.rings-wrap {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
  border: 1px solid var(--hairline);
  background: var(--bg);
  padding: 16px;
  margin: 32px 0 16px;
}
.ring {
  border: 1.5px solid var(--strong2);
  background: var(--surface);
  padding: 12px 16px 16px;
  transition: background-color 0.2s ease;
}
.ring .ring { margin-top: 10px; }
.ring--core {
  border: 2px solid var(--text);
  background: var(--bg);
  text-align: center;
  padding: 16px;
}
.ring-label {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 2px;
}
.ring--core .ring-label { color: var(--red); }
.ring-sub {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.ring--core .ring-sub { color: var(--strong2); font-weight: 500; font-size: 13px; }
/* hover tints only the band actually under the pointer:
   an outer ring's tint is cancelled when an inner ring is hovered */
.ring:hover, .ring:focus-visible { background: var(--surface-hover); }
.ring--ext:hover:has(.ring:hover),
.ring--adapt:hover:has(.ring:hover) { background: var(--surface); }
.ring--core:hover { background: var(--surface-hover); }

.ring-panels { display: grid; align-content: start; }
.ring-panel {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.22s ease;
  background: var(--bg);
  border: 2px solid var(--text);
  border-left: 4px solid var(--red);
  padding: 20px 24px;
  pointer-events: none;
}
.ring-panel .mod { font-size: 14px; line-height: 1.55; margin: 0 0 8px; }
.ring-panel .mod:last-child { margin-bottom: 0; }
.panel--default {
  border: none;
  background: none;
  font-style: italic;
  color: var(--muted);
  font-size: 15px;
  opacity: 1;
}
/* each rule overrides the previous: the innermost hovered ring wins */
.rings-wrap:has(.ring--ext:hover) .panel--ext,
.rings-wrap:has(.ring--ext:focus-visible) .panel--ext { opacity: 1; }
.rings-wrap:has(.ring--adapt:hover) .panel--ext { opacity: 0; }
.rings-wrap:has(.ring--adapt:hover) .panel--adapt,
.rings-wrap:has(.ring--adapt:focus-visible) .panel--adapt { opacity: 1; }
.rings-wrap:has(.ring--core:hover) .panel--adapt { opacity: 0; }
.rings-wrap:has(.ring--core:hover) .panel--core,
.rings-wrap:has(.ring--core:focus-visible) .panel--core { opacity: 1; }
.rings-wrap:has(.ring:hover) .panel--default,
.rings-wrap:has(.ring:focus-visible) .panel--default { opacity: 0; }

@media (max-width: 760px) {
  .rings-wrap { grid-template-columns: 1fr; }
}
/* touch devices: all panels visible, stacked; no default hint */
@media (hover: none) {
  .ring-panels { gap: 8px; }
  .ring-panel { grid-area: auto; opacity: 1; pointer-events: auto; }
  .panel--default { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ring, .ring-panel { transition: none; }
}

/* deployment-stack grid: profile columns × stack-layer rows, reusing the
   .layer / .layer-detail machinery (hover panels, spotlight, up/down rows) */
.stack-row {
  position: relative;
  display: grid;
  grid-template-columns: 132px repeat(3, 1fr);
  gap: 8px;
}
.row-label {
  display: flex;
  align-items: center;
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.cell-main {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 13px;
  text-align: center;
  margin: 0;
}
.cell-sub {
  font-size: 11px;
  font-style: italic;
  color: var(--muted);
  text-align: center;
  margin: 4px 0 0;
}
.stack-map .layer { display: flex; flex-direction: column; justify-content: center; }
.stack-map .layer > .layer-name { text-align: center; margin-bottom: 2px; }

/* mini process topology: UI chip, the red conversation line, the machine frame */
.topo { display: flex; flex-direction: column; }
.topo .proc {
  background: var(--bg);
  border: 1px solid var(--strong2);
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 12px;
  text-align: center;
  padding: 5px 8px;
}
.topo-link { width: 2px; height: 12px; background: var(--red); margin: 0 auto; }
.proc-frame {
  border: 1.5px solid var(--text);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.frame-label {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 700px) {
  .map-row, .layer-modules.cols-2, .layer-modules.cols-3 { grid-template-columns: 1fr; }
  .stack-row { grid-template-columns: 1fr; }
  .row-label { padding-top: 8px; }
}
/* touch devices have no hover: show every layer's detail inline */
@media (hover: none) {
  .layer-detail {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    pointer-events: auto;
    box-shadow: none;
    margin-top: 8px;
    padding: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .layer, .layer-detail { transition: none; }
}

/* ---------- article / paper ---------- */

.article-header { margin-bottom: 32px; }
.article-header h1 { margin-bottom: 16px; }
.article-header .glyph { margin-bottom: 16px; }
/* the big brand mark beside "The mark" paragraph (about page) */
.mark-figure { display: flex; align-items: center; gap: 40px; margin: 16px 0 32px; }
.mark-figure svg { height: 170px; width: auto; flex: none; color: var(--text); }
.mark-figure p { margin: 0; }
@media (max-width: 600px) {
  .mark-figure { flex-direction: column; align-items: flex-start; gap: 24px; }
}
.article-header .glyph svg { height: 56px; width: auto; display: block; }
.article-header .glyph a { display: inline-block; color: var(--text); }
.article-header .glyph a:hover { color: var(--link); }

.paper-title {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 8px;
}
.abstract-label {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 24px 0 8px;
}
.abstract p { font-size: 16px; }

.page-nav {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- index pages (research, news) ---------- */

.index-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 16px;
  margin-top: 48px;
}
@media (max-width: 900px) {
  .index-cards { grid-template-columns: 1fr; }
}
.index-cards .card h3 { font-size: 18px; line-height: 1.4; }
.card h3 a { text-decoration: none; color: var(--text); }
.card h3 a:hover { color: var(--link); }
.index-date {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 8px;
}
