/*
  russmg.com: "field notes" design.
  A working notebook for the trades: warm paper, ink rules, a signal-orange accent,
  condensed Archivo for headings, Source Serif 4 for reading, IBM Plex Mono for labels.
  Fonts are self-hosted (public/fonts, SIL Open Font License) so the CSP can stay 'self' only.
*/

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 62% 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f2eee4;
  --surface: #faf8f2;
  --surface-2: #e9e3d5;
  --text: #17181b;
  --muted: #55575d;
  --rule: #cdc6b6;
  --rule-strong: #17181b;
  --grid: rgba(23, 24, 27, 0.055);
  --accent: #e8551c;
  --accent-text: #a3330a;
  --accent-ink: #17181b;
  --tint: rgba(232, 85, 28, 0.07);
  --foot-bg: #17181b;
  --foot-text: #e9e4d8;
  --foot-muted: #a7a297;
  --foot-link: #ff9a70;
  --focus: #1f5fd1;
  --ruled: rgba(52, 92, 150, 0.22);
  --margin-rule: rgba(205, 62, 38, 0.5);
  --hole: #e0d9c6;
  --highlight: rgba(232, 85, 28, 0.13);

  --display: "Archivo", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, "Iowan Old Style", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --page: 76rem;
  --measure: 42rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131311;
    --surface: #1b1b18;
    --surface-2: #22211d;
    --text: #ece7db;
    --muted: #a9a397;
    --rule: #37352f;
    --rule-strong: #8d877b;
    --grid: rgba(236, 231, 219, 0.045);
    --accent: #ff6a33;
    --accent-text: #ff8f66;
    --accent-ink: #131311;
    --tint: rgba(255, 106, 51, 0.09);
    --foot-bg: #0b0b0a;
    --foot-text: #ece7db;
    --foot-muted: #a9a397;
    --foot-link: #ff8f66;
    --focus: #7fb0ff;
    --ruled: rgba(127, 176, 255, 0.11);
    --margin-rule: rgba(255, 106, 51, 0.4);
    --hole: #0b0b0a;
    --highlight: rgba(255, 106, 51, 0.16);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--accent-ink); }

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* Shared type */
.display,
h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 72%;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h1 { margin: 0; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin: 0 0 0.75rem; }
h3 { font-size: 1.4rem; margin: 0 0 0.35rem; }
p, ul, ol { margin: 0 0 1.1rem; }

.kicker,
.kicker-heading,
.tag-label,
.small,
.entry-no,
.entry-meta,
.spec dt,
.toc-title,
.pager-label,
.brand-sub,
.site-header nav a,
.more {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  color: var(--muted);
}
.kicker::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  background: var(--accent);
  flex: none;
}
.kicker a { color: inherit; }
.crumbs span { color: var(--rule-strong); }

.lede {
  font-size: clamp(1.2rem, 2.2vw, 1.4rem);
  line-height: 1.45;
  color: var(--text);
  max-width: 38rem;
}

.small { color: var(--muted); text-transform: none; letter-spacing: 0.02em; font-weight: 400; }

/* Header */
.site-header {
  border-bottom: 2px solid var(--rule-strong);
  background: var(--paper);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  min-height: 4.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
}
.brand-name {
  font-family: var(--display);
  font-stretch: 68%;
  font-weight: 900;
  font-size: 1.6rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.brand-sub { color: var(--muted); font-size: 0.7rem; }
.brand:hover .brand-name { color: var(--accent-text); }

.site-header nav { display: flex; gap: 1.75rem; }
.site-header nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 3px solid transparent;
}
.site-header nav a:hover { border-bottom-color: var(--rule-strong); }
.site-header nav a[aria-current="page"] { border-bottom-color: var(--accent); }

/* Graph-paper heads */
.page-head,
.note-head {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 1.5rem 1.5rem;
  background-position: -1px -1px;
  border-bottom: 2px solid var(--rule-strong);
}

/*
  Home hero: a notebook page. Ruled lines, a double red margin rule, punched holes on wide
  screens and a little paper grain, with a doodle sketch beside the headline.
*/
.hero {
  --margin-x: max(0.4rem, calc(max(var(--gutter), (100% - var(--page)) / 2) - 1.1rem));
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
  background-color: var(--paper);
  background-image:
    url("/paper-grain.svg"),
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(2.2rem - 1px), var(--ruled) calc(2.2rem - 1px), var(--ruled) 2.2rem);
  background-position: 0 0, 0 0.9rem;
  border-bottom: 2px solid var(--rule-strong);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
}
.hero::before {
  left: var(--margin-x);
  width: 4px;
  border-left: 1px solid var(--margin-rule);
  border-right: 1px solid var(--margin-rule);
}
.hero::after { display: none; }
.hero > .wrap { position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.hero-title {
  font-size: clamp(1.8rem, 3.9vw, 3rem);
  font-stretch: 68%;
  line-height: 1;
  text-transform: uppercase;
  max-width: 22ch;
  margin: 0;
}
.hero-art { width: 100%; max-width: 34rem; justify-self: end; }
.hero-sketch { display: block; width: 100%; height: auto; overflow: visible; }
.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 5vw, 4rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule-strong);
  align-items: start;
}
.hero-foot .lede { margin: 0; }
.hero-note {
  margin: 0;
  padding: 1rem 1.15rem;
  border: 1.5px dashed var(--rule-strong);
  background: var(--surface);
  font-size: 1rem;
  line-height: 1.5;
}

/* The sketch: strokes first, then fills, so a shape can carry both */
.hero-sketch * { stroke-linecap: round; stroke-linejoin: round; }
.art-ink { fill: none; stroke: var(--text); stroke-width: 2.4; }
.art-soft { fill: none; stroke: var(--muted); stroke-width: 2.2; }
.art-accent { fill: none; stroke: var(--accent); stroke-width: 2.4; }
.art-paper-stroke { fill: none; stroke: var(--accent-ink); stroke-width: 2.4; }
.art-line-thin { stroke-width: 1.8; }
.art-heavy { stroke-width: 5; }
.art-faint { opacity: 0.5; }
.art-dashed { stroke-dasharray: 2 7; stroke-width: 2.4; }
.art-dashed-tight { stroke-dasharray: 2 6; stroke-width: 2; }
.art-surface { fill: var(--surface); }
.art-surface-2 { fill: var(--surface-2); }
.art-fill-accent { fill: var(--accent); }
.art-fill-ink { fill: var(--text); }
.art-fill-tint { fill: var(--highlight); }
.art-tape { stroke: none; opacity: 0.45; }

/*
  The sketch loops: each stroke draws in, holds, wipes out in the direction it was drawn,
  rests briefly, and starts over. Every stroke shares one 6s cycle and keeps its own start
  delay, so the strokes stay staggered on every pass. Visitors who prefer reduced motion
  get the finished sketch and no motion at all.
*/
@media (prefers-reduced-motion: no-preference) {
  .art-draw {
    stroke-dasharray: 1 2;
    stroke-dashoffset: 1.05;
    animation: art-draw 6s ease-in-out 0.15s infinite;
  }
  .art-results .art-draw:nth-of-type(2) { animation-delay: 0.45s; }
  .art-results .art-draw:nth-of-type(3) { animation-delay: 0.6s; }
  .art-results .art-draw:nth-of-type(n+4) { animation-delay: 0.8s; }
}
@keyframes art-draw {
  0% { stroke-dashoffset: 1.05; }
  15% { stroke-dashoffset: 0; }
  68% { stroke-dashoffset: 0; }
  83% { stroke-dashoffset: -1.05; }
  100% { stroke-dashoffset: -1.05; }
}

@media (min-width: 88rem) {
  .hero::after {
    display: block;
    left: calc(var(--margin-x) - 3.1rem);
    width: 1.5rem;
    background-image: radial-gradient(circle at center, var(--hole) 0 0.5rem, var(--rule-strong) 0.5rem 0.56rem, transparent 0.62rem);
    background-size: 1.5rem 11rem;
    background-position: 0 3.5rem;
    background-repeat: repeat-y;
  }
}

.page-head { padding: clamp(2.75rem, 7vw, 4.5rem) 0 clamp(2rem, 4vw, 2.75rem); }
.page-head h1 {
  font-size: clamp(3rem, 10vw, 7rem);
  font-stretch: 66%;
  line-height: 0.9;
  text-transform: uppercase;
}
.page-head .lede { margin: 1.5rem 0 0; }

/* Sections */
.section { padding: clamp(2.75rem, 6vw, 4.5rem) 0; }
.section-flush { padding-top: clamp(2rem, 4vw, 3rem); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--rule-strong);
  padding-bottom: 0.75rem;
}
.section-head h2 { margin: 0; text-transform: uppercase; font-stretch: 66%; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.more { text-decoration: none; color: var(--text); white-space: nowrap; }
.more::after { content: " \2192"; color: var(--accent); }
.more:hover { color: var(--accent-text); }

/* Notes index */
.index { list-style: none; margin: 0; padding: 0; }
.entry {
  position: relative;
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr) 10.5rem;
  gap: 0.5rem 2rem;
  padding: 1.5rem 0.75rem;
  margin: 0 -0.75rem;
  border-bottom: 1px solid var(--rule);
}
.entry p { margin: 0; }
.entry-no { color: var(--accent-text); padding-top: 0.4rem; }
.entry-body h3 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-stretch: 78%; font-weight: 750; margin-bottom: 0.45rem; }
.entry-body h3 a { color: var(--text); text-decoration: none; }
.entry-body h3 a::after { content: ""; position: absolute; inset: 0; }
.entry-body p { color: var(--muted); font-size: 1.02rem; line-height: 1.5; max-width: 40rem; }
.entry-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  padding-top: 0.4rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
}
.entry:hover { background: var(--tint); }
.entry:hover h3 a { color: var(--accent-text); }
.entry:focus-within { outline: 3px solid var(--focus); outline-offset: -3px; }
.entry h3 a:focus-visible { outline: none; }

/* Ground rules band */
.ground { background: var(--surface-2); border-top: 2px solid var(--rule-strong); }
.kicker-heading { color: var(--muted); margin: 0 0 1.5rem; font-size: 0.78rem; line-height: 1.4; }
.rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
}
.rules li {
  border-top: 4px solid var(--accent);
  padding-top: 1rem;
  font-size: 1.08rem;
  line-height: 1.5;
}
.rules strong {
  display: block;
  font-family: var(--display);
  font-stretch: 72%;
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

/* A note */
.note-head { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.75rem, 4vw, 2.5rem); }
.note-title {
  font-size: clamp(2.3rem, 5.6vw, 4.4rem);
  font-stretch: 70%;
  line-height: 0.98;
  max-width: 54rem;
}
.note-head .lede { margin: 1.5rem 0 0; color: var(--muted); }

.spec {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem clamp(1.5rem, 4vw, 3rem);
  margin: 2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.spec div { min-width: 0; }
.spec dt { color: var(--muted); font-size: 0.68rem; margin-bottom: 0.2rem; }
.spec dd {
  margin: 0;
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 650;
  font-size: 1.05rem;
}
.spec-stack { flex-direction: column; margin: 0; padding: 0; border: 0; }

.note-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 15rem) minmax(0, var(--measure));
  gap: 2rem clamp(2.5rem, 6vw, 5rem);
  padding-top: clamp(2.25rem, 5vw, 3.5rem);
  padding-bottom: 2rem;
}
.note-layout.no-toc { grid-template-columns: minmax(0, var(--measure)); }

.rail { min-width: 0; }
.toc { position: sticky; top: 1.5rem; }
.toc-title {
  color: var(--muted);
  margin: 0 0 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--rule-strong);
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; border-bottom: 1px solid var(--rule); }
.toc a {
  display: grid;
  grid-template-columns: 1.9rem 1fr;
  gap: 0.25rem;
  padding: 0.55rem 0;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-stretch: 88%;
  font-weight: 550;
  font-size: 0.95rem;
  line-height: 1.3;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent-text);
  padding-top: 0.15rem;
}
.toc a:hover { color: var(--accent-text); }

/* Long-form reading */
.prose { min-width: 0; max-width: var(--measure); font-size: 1.2rem; line-height: 1.68; }
.prose h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-stretch: 74%;
  margin: 2.75rem 0 0.75rem;
  scroll-margin-top: 1.5rem;
}
.prose h3 { font-size: 1.35rem; font-stretch: 82%; font-weight: 750; margin: 2rem 0 0.5rem; scroll-margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.5rem; padding-left: 0.25rem; }
.prose ul li::marker { color: var(--accent); }
.prose ol li::marker { color: var(--accent-text); font-family: var(--mono); font-size: 0.85em; }
.prose strong { font-weight: 650; }
.prose blockquote {
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 5px solid var(--accent);
  font-style: italic;
  font-size: 1.32rem;
  line-height: 1.5;
}
.prose blockquote p { margin: 0; }
.note .prose > p:first-child::first-letter {
  float: left;
  font-family: var(--display);
  font-stretch: 66%;
  font-weight: 900;
  font-size: 4.4em;
  line-height: 0.8;
  margin: 0.08em 0.1em 0 0;
  color: var(--accent);
}

code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  padding: 0.08em 0.35em;
}

/* Disclosure tags: a hang tag, with a punched hole */
.tag,
.footer-tag {
  position: relative;
  border: 1.5px solid var(--rule-strong);
  background: var(--surface);
  padding: 1.75rem 1.5rem 0.5rem;
}
.tag::after,
.footer-tag::after {
  content: "";
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  border: 1.5px solid var(--rule-strong);
  background: var(--paper);
}
.tag-label {
  position: absolute;
  top: -0.8rem;
  left: 1.25rem;
  margin: 0;
  padding: 0.2rem 0.55rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.7rem;
  line-height: 1.4;
}
.note-box { margin-top: 3.5rem; font-size: 1.02rem; line-height: 1.55; }
.note-box h2 { font-size: 1.35rem; font-stretch: 80%; margin: 0 2rem 0.6rem 0; }

/* Older and newer notes */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 1.5rem;
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}
.pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem 1.35rem;
  border: 2px solid var(--rule-strong);
  color: var(--text);
  text-decoration: none;
}
.pager-link.older { text-align: right; grid-column: 2; }
.pager-label { color: var(--muted); font-size: 0.7rem; }
.pager-title { font-family: var(--display); font-stretch: 80%; font-weight: 750; font-size: 1.2rem; line-height: 1.2; }
.pager-link:hover { background: var(--text); color: var(--paper); }
.pager-link:hover .pager-label { color: inherit; }

/* About */
.about {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, var(--measure));
  gap: 2rem clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.about-card {
  position: sticky;
  top: 1.5rem;
  border: 2px solid var(--rule-strong);
  background: var(--surface);
  padding: 1.25rem 1.25rem 1.4rem;
}
.about .prose h2 { margin-top: 2.25rem; }
.prose .marks, .panel .marks { list-style: none; padding: 0; }
.prose .marks li, .panel .marks li { position: relative; padding-left: 2.25rem; margin-bottom: 0.75rem; }
.marks li::before {
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1;
}
.marks-yes li::before { content: "+"; background: var(--accent); color: var(--accent-ink); }
.marks-no li::before { content: "\00d7"; border: 1.5px solid var(--rule-strong); color: var(--text); }

/* Contact panel */
.panel {
  max-width: 46rem;
  border: 2px solid var(--rule-strong);
  background: var(--surface);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: 8px 8px 0 var(--accent);
}
.panel-lead { font-size: clamp(1.2rem, 2.4vw, 1.45rem); line-height: 1.45; margin-bottom: 1.75rem; }
.panel-title { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 0.75rem; }
.panel h3 { margin: 1.75rem 0 0.75rem; }
.panel-quiet { box-shadow: none; background: transparent; }
.contact-stack { display: grid; gap: 2.5rem; max-width: 46rem; }

/* About: the photo at the top of the card */
.about-photo {
  margin: 0 0 1.5rem;
  max-width: 20rem;
  border: 2px solid var(--rule-strong);
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--accent);
  line-height: 0;
}
.about-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }

/* Buttons */
.button {
  display: inline-block;
  background: var(--text);
  color: var(--paper);
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 750;
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.3rem;
  border: 2px solid var(--text);
  box-shadow: 4px 4px 0 var(--accent);
  margin: 0 0.75rem 0.75rem 0;
}
.button:hover { box-shadow: 6px 6px 0 var(--accent); transform: translate(-2px, -2px); }
.button:active { box-shadow: 1px 1px 0 var(--accent); transform: translate(3px, 3px); }
.button-big { font-size: 1.15rem; padding: 1.05rem 1.6rem; }
.button-quiet { background: transparent; color: var(--text); box-shadow: none; }
.button-quiet:hover { background: var(--text); color: var(--paper); box-shadow: none; transform: none; }
.button-mail { text-transform: none; letter-spacing: 0; font-stretch: 100%; font-weight: 700; }

/* Footer */
.site-footer {
  background: var(--foot-bg);
  color: var(--foot-text);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2.5rem;
  font-size: 1rem;
  line-height: 1.55;
}
.site-footer a { color: var(--foot-link); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.5rem clamp(2rem, 6vw, 5rem);
  align-items: end;
}
.footer-tag { background: transparent; border-color: var(--foot-muted); border-style: dashed; }
.footer-tag::after { border-color: var(--foot-muted); background: var(--foot-bg); }
.footer-tag p[data-disclosure] { margin-bottom: 1rem; padding-right: 1.5rem; }
.footer-side { text-align: right; }
.footer-mark {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.85;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--foot-muted);
}
.site-footer .small { color: var(--foot-muted); margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .button, .entry, .pager-link, .site-header nav a { transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
}

/* Tablet and phone */
@media (max-width: 60rem) {
  .note-layout,
  .about { grid-template-columns: minmax(0, 1fr); }
  .note-layout.no-toc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; border: 2px solid var(--rule-strong); background: var(--surface); padding: 1rem 1.15rem 0.5rem; }
  .toc li:last-child { border-bottom: 0; }
  .about-card { position: static; }
  .rules { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 44rem) {
  body { font-size: 1.0625rem; }
  .bar { flex-wrap: wrap; gap: 0.5rem 1.5rem; }
  .site-header nav { gap: 1.25rem; }
  .brand-sub { display: none; }
  .hero-grid,
  .hero-foot,
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { justify-self: start; max-width: 24rem; }
  .footer-side { text-align: left; }
  .entry {
    grid-template-columns: auto 1fr;
    grid-template-areas: "no meta" "body body";
    gap: 0.6rem 1rem;
    padding: 1.25rem 0.75rem;
  }
  .entry-no { grid-area: no; padding-top: 0; }
  .entry-meta { grid-area: meta; flex-direction: row; justify-content: flex-end; gap: 0.75rem; padding-top: 0; }
  .entry-body { grid-area: body; }
  .prose { font-size: 1.125rem; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager-link.older { grid-column: 1; }
  .pager > span { display: none; }
  .spec { gap: 0.9rem 1.75rem; }
}

@media print {
  .site-header nav, .skip, .pager, .rail, .footer-mark { display: none; }
  body { background: #fff; color: #000; }
  .hero, .page-head, .note-head { background: none; }
  .site-footer { background: none; color: #000; }
  .site-footer a, a { color: #000; }
}
