/* ==========================================================
   Field Journal — antjanus.com redesign 092 (field-notes)
   Explorer journal: graph-ruled pages, specimen labels,
   rubber stamps, station coordinates.
   ========================================================== */

:root {
  /* primitives */
  --kraft-200: #e9dcc0;
  --kraft-300: #d9c49b;
  --kraft-500: #b8965c;
  --paper-50: #fbf7ec;
  --paper-100: #f4ecd9;
  --ink-900: #1c2528;
  --ink-700: #3d4543;
  --ink-600: #5a5446;
  --slate-700: #364f6a;
  --slate-900: #243647;
  --slate-300: #8fb0d4;
  --red-700: #a3301c;
  --red-300: #e98a73;
  --moss-700: #466030;
  --moss-300: #a6c585;
  --ochre-700: #7f520f;
  --ochre-300: #e0ae55;
  --night-900: #121517;
  --night-800: #1a1f22;
  --night-700: #242b2f;
  --night-600: #343d42;
  --lamp-100: #efe6d0;
  --lamp-300: #bfb398;

  /* semantic */
  --ground: var(--kraft-200);
  --page: var(--paper-50);
  --page-2: var(--paper-100);
  --text: var(--ink-900);
  --text-2: var(--ink-700);
  --muted: var(--ink-600);
  --rule: rgba(54, 79, 106, 0.13);
  --rule-strong: rgba(28, 37, 40, 0.55);
  --line: #cbbd9c;
  --ink-blue: var(--slate-700);
  --ink-blue-deep: var(--slate-900);
  --stamp: var(--red-700);
  --moss: var(--moss-700);
  --ochre: var(--ochre-700);
  --cover: var(--kraft-300);
  --cover-text: var(--ink-900);
  --code-bg: #1f2629;
  --code-text: #e8e1cf;
  --code-dim: #a9a08a;
  --tape: rgba(233, 214, 160, 0.72);
  --shadow: 0 1px 0 rgba(28, 37, 40, 0.08), 0 10px 24px -14px rgba(28, 37, 40, 0.35);
  --focus: #b3470f;

  --f-display: "Young Serif", Georgia, serif;
  --f-body: "Source Serif 4", Georgia, serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --f-hand: "Caveat", "Bradley Hand", cursive;

  --maxw: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ground: var(--night-900);
  --page: var(--night-800);
  --page-2: var(--night-700);
  --text: var(--lamp-100);
  --text-2: #d8cfb8;
  --muted: var(--lamp-300);
  --rule: rgba(143, 176, 212, 0.09);
  --rule-strong: rgba(239, 230, 208, 0.5);
  --line: var(--night-600);
  --ink-blue: var(--slate-300);
  --ink-blue-deep: #b9cfe6;
  --stamp: var(--red-300);
  --moss: var(--moss-300);
  --ochre: var(--ochre-300);
  --cover: #2b2621;
  --cover-text: var(--lamp-100);
  --code-bg: #0d1011;
  --code-text: #e8e1cf;
  --code-dim: #a9a08a;
  --tape: rgba(191, 179, 152, 0.28);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 12px 28px -16px rgba(0, 0, 0, 0.8);
  --focus: #f0a060;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: var(--night-900);
    --page: var(--night-800);
    --page-2: var(--night-700);
    --text: var(--lamp-100);
    --text-2: #d8cfb8;
    --muted: var(--lamp-300);
    --rule: rgba(143, 176, 212, 0.09);
    --rule-strong: rgba(239, 230, 208, 0.5);
    --line: var(--night-600);
    --ink-blue: var(--slate-300);
    --ink-blue-deep: #b9cfe6;
    --stamp: var(--red-300);
    --moss: var(--moss-300);
    --ochre: var(--ochre-300);
    --cover: #2b2621;
    --cover-text: var(--lamp-100);
    --code-bg: #0d1011;
    --tape: rgba(191, 179, 152, 0.28);
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 12px 28px -16px rgba(0, 0, 0, 0.8);
    --focus: #f0a060;
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background-color: var(--ground);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--ink-blue); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; line-height: 1.15; margin: 0 0 0.5em; color: var(--text); letter-spacing: -0.005em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); }
h3 { font-size: 1.4rem; line-height: 1.25; }
p { margin: 0 0 1em; }
code { font-family: var(--f-mono); font-size: 0.88em; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--text); color: var(--page); padding: 0.6rem 1rem; z-index: 50; font-family: var(--f-mono); }
.skip:focus { top: 1rem; }

/* ---------- the notebook page ---------- */
.book {
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter) 3rem;
}
.sheet {
  position: relative;
  background-color: var(--page);
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 4vw, 3.5rem);
  padding-left: clamp(1.25rem, 6vw, 5rem);
}
/* red margin rule of a field book */
.sheet::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: clamp(0.6rem, 3vw, 2.6rem);
  width: 0;
  border-left: 1.5px solid color-mix(in srgb, var(--stamp) 45%, transparent);
}
.sheet + .sheet { margin-top: 1.5rem; }
.sheet.plain { background-image: none; }

/* ---------- cover / header ---------- */
.cover {
  background: var(--cover) url("assets/kraft-fibers.jpg") center / 640px repeat;
  background-blend-mode: multiply;
  color: var(--cover-text);
  border-bottom: 3px solid var(--text);
  position: relative;
}
.cover::after { /* staple stitching */
  content: "";
  position: absolute; left: 0; right: 0; bottom: 6px; height: 0;
  border-bottom: 1.5px dashed color-mix(in srgb, var(--cover-text) 35%, transparent);
}
.cover-inner {
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0.9rem var(--gutter) 1.1rem;
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.75rem; color: inherit; text-decoration: none; margin-right: auto; }
.brand svg { width: 46px; height: 46px; flex: none; }
.brand-words { display: flex; flex-direction: column; line-height: 1.05; }
.brand-kicker { font-family: var(--f-mono); font-size: 0.8125rem; letter-spacing: 0.16em; text-transform: uppercase; }
.brand-name { font-family: var(--f-display); font-size: 1.5rem; }
.nav { display: flex; align-items: center; gap: 0.75rem; }
.nav-list { list-style: none; display: flex; gap: 0.25rem; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-list a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0.35rem 0.85rem;
  font-family: var(--f-mono); font-size: 0.9375rem; letter-spacing: 0.04em;
  color: inherit; text-decoration: none;
  border: 1.5px solid transparent; border-radius: 3px;
}
.nav-list a:hover { border-color: currentColor; }
.nav-list a[aria-current="page"] {
  background: var(--page); color: var(--text);
  border-color: var(--text);
  box-shadow: 2px 2px 0 var(--text);
}
.nav-list a.nav-ai { border-color: currentColor; border-style: dashed; }
.nav-list a.nav-ai[aria-current="page"] { border-style: solid; }
.tool-btn {
  min-height: 44px; min-width: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  background: transparent; color: inherit;
  border: 1.5px solid currentColor; border-radius: 3px;
  font-family: var(--f-mono); font-size: 0.875rem; cursor: pointer; padding: 0 0.7rem;
}
.tool-btn:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.tool-btn svg { width: 20px; height: 20px; }
.menu-btn { display: none; }
.theme-btn .ico-sun { display: none; }
:root[data-theme="dark"] .theme-btn .ico-sun { display: block; }
:root[data-theme="dark"] .theme-btn .ico-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .ico-sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .ico-moon { display: none; }
}
.search-form { display: flex; gap: 0; }
.search-form input {
  min-height: 44px; width: 11rem;
  font: 1rem var(--f-mono);
  background: var(--page); color: var(--text);
  border: 1.5px solid var(--text); border-right: 0; border-radius: 3px 0 0 3px; padding: 0 0.7rem;
}
.search-form button { border-radius: 0 3px 3px 0; background: var(--text); color: var(--page); border-color: var(--text); }

@media (max-width: 1100px) {
  .search-form { display: none; }
}
@media (max-width: 820px) {
  .menu-btn { display: inline-flex; }
  html.js .nav-list { display: none; }
  html.js .nav.open .nav-list { display: flex; }
  .nav { flex-wrap: wrap; }
  .nav-list {
    order: 3; flex-basis: 100%; flex-direction: column; gap: 0.25rem;
    padding-top: 0.75rem;
  }
  .cover-inner { gap: 0.75rem; }
  .nav.open { flex-basis: 100%; justify-content: flex-end; }
  .nav.open .nav-list { order: 3; }
  .nav.open .search-form { display: flex; order: 4; flex-basis: 100%; padding-top: 0.5rem; }
  .nav.open .search-form input { flex: 1; width: auto; }
}

/* ---------- station strip (locality line) ---------- */
.station {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1.5rem;
  font-family: var(--f-mono); font-size: 0.875rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted);
  padding: 1rem 0 1.1rem;
}
.station b { color: var(--text); font-weight: 600; }
.station .sep { opacity: 0.6; }

/* ---------- type helpers ---------- */
.eyebrow {
  font-family: var(--f-mono); font-size: 0.875rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--stamp); font-weight: 600; margin: 0 0 0.6rem; display: block;
}
.lede { font-size: 1.35rem; line-height: 1.5; color: var(--text-2); max-width: 40ch; }
.hand { font-family: var(--f-hand); color: var(--ink-blue); font-size: 1.6rem; line-height: 1.15; font-weight: 600; }
.mono { font-family: var(--f-mono); }
.muted { color: var(--muted); }
.measure { max-width: 66ch; }

/* section heads styled as journal entry headers */
.entry-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0.35rem 1.25rem;
  border-bottom: 2px solid var(--text);
  padding-bottom: 0.6rem; margin: 0 0 1.75rem;
}
.entry-head .no { grid-column: 1 / -1; font-family: var(--f-mono); font-size: 0.9375rem; color: var(--stamp); font-weight: 600; letter-spacing: 0.08em; white-space: nowrap; }
.entry-head h2 { margin: 0; }
.entry-head p { margin: 0.2rem 0 0; color: var(--muted); font-size: 1.0625rem; }
.entry-head .more { font-family: var(--f-mono); font-size: 0.9375rem; white-space: nowrap; }
@media (max-width: 640px) {
  .entry-head { grid-template-columns: 1fr; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 48px;
  padding: 0.55rem 1.2rem;
  font-family: var(--f-mono); font-size: 1rem; font-weight: 600; letter-spacing: 0.02em;
  text-decoration: none; border-radius: 3px; cursor: pointer;
  border: 2px solid var(--text);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.btn-primary { background: var(--text); color: var(--page); box-shadow: 3px 3px 0 var(--stamp); }
.btn-primary:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--stamp); }
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--stamp); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.link-quiet { font-family: var(--f-mono); font-size: 1rem; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem 1.4rem; align-items: center; }

/* ---------- stamps ---------- */
.stamp {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--f-mono); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--stamp);
  border: 2.5px solid currentColor; border-radius: 4px;
  padding: 0.2rem 0.6rem; font-size: 0.8125rem; line-height: 1.2;
  transform: rotate(-4deg);
  opacity: 0.92;
  box-shadow: inset 0 0 0 2px var(--page), inset 0 0 0 3.5px currentColor;
  background: color-mix(in srgb, var(--page) 60%, transparent);
  white-space: nowrap;
}
.stamp.round {
  width: 7.4rem; height: 7.4rem; border-radius: 50%;
  flex-direction: column; font-size: 0.8125rem; padding: 0.5rem; white-space: normal;
  transform: rotate(-12deg);
}
.stamp.round big { font-family: var(--f-display); font-size: 1.85rem; letter-spacing: 0; line-height: 1; margin: 0.15rem 0; text-transform: none; font-weight: 400; }
.stamp.moss { color: var(--moss); }
.stamp.blue { color: var(--ink-blue); }
.stamp.ochre { color: var(--ochre); }
.stamp.flat { transform: none; }

/* ---------- specimen label ---------- */
.label {
  position: relative;
  background: var(--page);
  border: 1.5px solid var(--text);
  outline: 1px solid var(--text); outline-offset: -6px;
  padding: 1.1rem 1.2rem 1.1rem;
  font-family: var(--f-mono);
  font-size: 0.9375rem;
  color: var(--text);
}
.label-title { text-align: center; font-size: 0.8125rem; letter-spacing: 0.22em; text-transform: uppercase; border-bottom: 1px solid var(--text); padding-bottom: 0.45rem; margin: 0.15rem 0 0.6rem; }
.label dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 0.9rem; }
.label dt { color: var(--muted); text-transform: uppercase; font-size: 0.8125rem; letter-spacing: 0.08em; padding-top: 0.12em; }
.label dd { margin: 0; border-bottom: 1px dotted var(--rule-strong); min-width: 0; overflow-wrap: anywhere; }

/* ---------- tape + photo ---------- */
.photo {
  position: relative; background: var(--page); padding: 0.75rem 0.75rem 0.5rem;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  margin: 0;
}
.photo img { width: 100%; height: auto; background: var(--page-2); }
.photo figcaption { font-family: var(--f-hand); font-size: 1.45rem; color: var(--ink-blue); padding: 0.5rem 0.25rem 0.1rem; line-height: 1.2; font-weight: 600; }
.photo .tape, .tape {
  position: absolute; width: 110px; height: 30px; background: var(--tape);
  border-left: 2px dotted rgba(0,0,0,0.06); border-right: 2px dotted rgba(0,0,0,0.06);
  z-index: 2;
}
.tape.tl { top: -12px; left: 18px; transform: rotate(-7deg); }
.tape.tr { top: -12px; right: 18px; transform: rotate(6deg); }
.tilt-l { transform: rotate(-1.4deg); }
.tilt-r { transform: rotate(1.2deg); }

/* ---------- home hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem); align-items: start;
}
.hero h1 { max-width: 13ch; }
.hero .margin-note { margin: 0.4rem 0 1.4rem; transform: rotate(-1.5deg); display: inline-block; }
.hero-photo { position: relative; }
.hero-photo .photo img { aspect-ratio: 4 / 4.4; object-fit: cover; object-position: 30% 30%; }
.hero-photo .stamp.round { position: absolute; right: -0.8rem; bottom: 4.5rem; z-index: 3; }
.coords-svg { width: 100%; height: auto; color: var(--ink-blue); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { max-width: 460px; }
  .hero-photo .stamp.round { right: 0.5rem; width: 6.2rem; height: 6.2rem; }
}

/* measurement table (stats) */
.measures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1.5px solid var(--text); margin: 1.5rem 0 1.75rem; background: var(--page); }
.measures div { padding: 0.7rem 0.9rem; border-left: 1px solid var(--text); min-width: 0; }
.measures div:first-child { border-left: 0; }
.measures dt { font-family: var(--f-mono); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.measures dd { margin: 0; font-family: var(--f-display); font-size: clamp(1.6rem, 3.6vw, 2.3rem); line-height: 1.1; }
.measures { margin-left: 0; margin-right: 0; }

/* ---------- specimen cards (articles) ---------- */
.specimens { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.specimens.four { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.specimen {
  position: relative; display: flex; flex-direction: column;
  background: var(--page); border: 1.5px solid var(--text);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--text) 18%, transparent);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.specimen:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 color-mix(in srgb, var(--text) 25%, transparent); }
.specimen:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.specimen .plate { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1.5px solid var(--text); background: var(--page-2); }
.specimen .plate img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.82) contrast(1.02); }
.specimen .plate .plate-no { position: absolute; left: 0.6rem; top: 0.6rem; background: var(--page); border: 1px solid var(--text); font-family: var(--f-mono); font-size: 0.8125rem; padding: 0.1rem 0.45rem; color: var(--text); }
.specimen .plate.blank { display: grid; place-items: center; }
.specimen .plate.blank svg { width: 62%; height: auto; color: var(--ink-blue); opacity: 0.8; }
.specimen .body { padding: 1rem 1.15rem 1.15rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.specimen .catno { font-family: var(--f-mono); font-size: 0.8125rem; letter-spacing: 0.06em; color: var(--muted); display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; text-transform: uppercase; }
.specimen h3 { margin: 0; font-size: 1.35rem; }
.specimen h3 a { color: var(--text); text-decoration: none; }
.specimen h3 a::after { content: ""; position: absolute; inset: 0; }
.specimen h3 a:focus-visible { outline: none; }
.specimen p { margin: 0; color: var(--text-2); font-size: 1.0625rem; line-height: 1.5; }
.specimen .stamp { position: absolute; right: 0.8rem; top: -0.9rem; z-index: 2; }
.habitat { font-family: var(--f-mono); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.habitat.ai { color: var(--ink-blue); }
.habitat.dg { color: var(--moss); }
.habitat.dt { color: var(--ochre); }
.habitat.st { color: var(--stamp); }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0.2rem 0 0; padding: 0; }
.tags li, .tag {
  font-family: var(--f-mono); font-size: 0.8125rem; color: var(--text-2);
  border: 1px dashed var(--rule-strong); padding: 0.1rem 0.5rem; border-radius: 2px;
}
a.tag { text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
a.tag:hover { border-style: solid; color: var(--text); }

/* ---------- journal log rows ---------- */
.log { list-style: none; margin: 0; padding: 0; }
.log li {
  display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 0.5rem 1.75rem;
  padding: 1.15rem 0; border-top: 1px solid var(--rule-strong);
  position: relative;
}
.log li:last-child { border-bottom: 1px solid var(--rule-strong); }
.log .when { font-family: var(--f-mono); font-size: 0.9375rem; color: var(--muted); line-height: 1.4; }
.log .when b { display: block; color: var(--text); font-size: 1.05rem; font-weight: 600; }
.log h3 { margin: 0 0 0.3rem; font-size: 1.35rem; }
.log h3 a { color: var(--text); text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1.5px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 200ms ease; }
.log h3 a:hover { background-size: 100% 1.5px; }
.log p { margin: 0; color: var(--text-2); }
.log .with-thumb { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 1.25rem; align-items: start; }
.log .with-thumb img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 1.5px solid var(--text); background: var(--page-2); }
@media (max-width: 640px) {
  .log li { grid-template-columns: 1fr; gap: 0.35rem; }
  .log .when b { display: inline; margin-right: 0.5rem; }
  .log .with-thumb { grid-template-columns: minmax(0, 1fr) 96px; gap: 0.9rem; }
}

/* ---------- instrument cards (AI experiments) ---------- */
.instruments { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.instrument { position: relative; border: 1.5px solid var(--text); background: var(--page); padding: 1.1rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; }
.instrument svg { width: 44px; height: 44px; color: var(--ink-blue); }
.instrument h3 { margin: 0; font-size: 1.3rem; }
.instrument h3 a { color: var(--text); text-decoration: none; }
.instrument h3 a::after { content: ""; position: absolute; inset: 0; }
.instrument:hover { background: var(--page-2); }
.instrument:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.instrument p { margin: 0; color: var(--text-2); font-size: 1.0625rem; }
.instrument .kind { position: absolute; right: 0.9rem; top: 0.9rem; }

/* ---------- three column row ---------- */
.trio { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .trio { grid-template-columns: 1fr; } }
.card-note { border: 1.5px solid var(--text); background: var(--page); padding: 1.25rem; }
.card-note h3 { font-size: 1.3rem; }
.card-note ul { list-style: none; padding: 0; margin: 0; }
.card-note li { padding: 0.5rem 0; border-top: 1px dotted var(--rule-strong); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.card-note li:first-child { border-top: 0; }
.card-note li a { min-height: 32px; display: inline-flex; align-items: center; }
.card-note li span { font-family: var(--f-mono); font-size: 0.875rem; color: var(--muted); }
.card-note.dark { background: var(--text); color: var(--page); border-color: var(--text); }
.card-note.dark h3 { color: var(--page); }
.card-note.dark .btn { border-color: var(--page); background: var(--page); color: var(--text); box-shadow: 3px 3px 0 var(--stamp); }

/* ---------- page head (non-home) ---------- */
.page-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem 3rem; align-items: end; }
.page-head .label { max-width: 420px; justify-self: end; width: 100%; transform: rotate(0.8deg); }
@media (max-width: 860px) {
  .page-head { grid-template-columns: 1fr; }
  .page-head .label { justify-self: start; transform: none; }
}
.banner-img { position: relative; margin: 2rem 0 0; }
.banner-img img { width: 100%; aspect-ratio: 21 / 7; object-fit: cover; border: 1.5px solid var(--text); background: var(--page-2); }
.banner-img figcaption { font-family: var(--f-mono); font-size: 0.875rem; color: var(--muted); margin-top: 0.5rem; }

/* jump index (divider tabs) */
.jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }
.jump a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.3rem 0.9rem;
  font-family: var(--f-mono); font-size: 0.9375rem; text-decoration: none; color: var(--text);
  background: var(--page-2); border: 1.5px solid var(--text); border-bottom-width: 4px; border-radius: 6px 6px 2px 2px;
}
.jump a:hover { background: var(--page); }

/* ---------- ledger table ---------- */
.ledger { width: 100%; border-collapse: collapse; font-size: 1.0625rem; }
.ledger caption { text-align: left; font-family: var(--f-mono); font-size: 0.875rem; color: var(--muted); padding-bottom: 0.5rem; }
.ledger th { text-align: left; font-family: var(--f-mono); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--text); padding: 0.5rem 0.75rem 0.5rem 0; }
.ledger td { border-bottom: 1px solid var(--rule-strong); padding: 0.8rem 0.75rem 0.8rem 0; vertical-align: top; }
.ledger td.num, .ledger th.num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.ledger .cat { font-family: var(--f-mono); font-size: 0.875rem; color: var(--stamp); white-space: nowrap; }
.ledger a { font-weight: 600; }
.ledger td p { margin: 0.2rem 0 0; color: var(--text-2); }
@media (max-width: 700px) {
  .ledger thead { display: none; }
  .ledger tr { display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--rule-strong); }
  .ledger td { border: 0; padding: 0; }
  .ledger td.desc { grid-column: 1 / -1; }
  .ledger td.tech { grid-column: 1 / -1; font-family: var(--f-mono); font-size: 0.875rem; color: var(--muted); }
}

/* ---------- specimen tray (projects with images) ---------- */
.tray { display: grid; gap: 2rem; }
.tray-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 2.5rem; align-items: center; }
.tray-item:nth-child(even) .photo { order: 2; }
.tray-item .photo img { aspect-ratio: 16 / 10; object-fit: cover; }
.tray-item h3 { font-size: 1.7rem; margin-bottom: 0.3rem; }
.tray-item .facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; font-family: var(--f-mono); font-size: 0.9375rem; color: var(--muted); margin: 0.6rem 0 0.9rem; }
@media (max-width: 800px) {
  .tray-item { grid-template-columns: 1fr; }
  .tray-item:nth-child(even) .photo { order: 0; }
}
.gif-note { font-family: var(--f-mono); font-size: 0.8125rem; color: var(--muted); }

/* ---------- featured project ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem 3rem; align-items: center; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } }

/* ---------- callout strip ---------- */
.strip {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between;
  border: 2px dashed var(--text); padding: 1.1rem 1.4rem; background: var(--page-2);
}
.strip p { margin: 0; font-size: 1.2rem; max-width: 50ch; }

/* ---------- series (expedition legs) ---------- */
.legs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.legs::before { content: ""; position: absolute; left: 1.35rem; top: 1.5rem; bottom: 1.5rem; border-left: 2px dashed var(--rule-strong); }
.leg { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) 220px; gap: 1rem 1.5rem; padding: 1.25rem 0; align-items: start; position: relative; }
.leg .pin { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 2px solid var(--text); background: var(--page); display: grid; place-items: center; font-family: var(--f-mono); font-weight: 700; position: relative; z-index: 1; }
.leg.pending .pin { border-style: dashed; color: var(--muted); }
.leg h3 { margin: 0 0 0.3rem; }
.leg h3 a { color: var(--text); }
.leg img { border: 1.5px solid var(--text); aspect-ratio: 4 / 3; object-fit: cover; background: var(--page-2); }
.leg.pending h3 { color: var(--muted); }
@media (max-width: 760px) {
  .leg { grid-template-columns: 2.75rem minmax(0, 1fr); }
  .leg img { grid-column: 2; max-width: 280px; }
}
.notice { border-left: 4px solid var(--ochre); background: color-mix(in srgb, var(--ochre) 10%, var(--page)); padding: 0.9rem 1.1rem; }

/* ---------- about ---------- */
.about-hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 2rem 3.5rem; align-items: center; }
.about-hero .photo img { aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 860px) { .about-hero { grid-template-columns: 1fr; } .about-hero .photo { max-width: 420px; } }
.route { list-style: none; margin: 0; padding: 0; }
.route > li { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 0.5rem 2rem; padding: 1.5rem 0; border-top: 1px solid var(--rule-strong); }
.route .alt { font-family: var(--f-mono); color: var(--muted); font-size: 0.9375rem; }
.route .alt b { display: block; font-size: 1.1rem; color: var(--stamp); }
.route ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.route ul li { margin: 0.25rem 0; }
@media (max-width: 700px) { .route > li { grid-template-columns: 1fr; } }
.career-bar { display: flex; flex-wrap: wrap; gap: 0; border: 1.5px solid var(--text); margin: 0 0 1.5rem; }
.career-bar span { flex: 1 1 auto; padding: 0.45rem 0.7rem; border-right: 1px solid var(--text); font-family: var(--f-mono); font-size: 0.875rem; background: var(--page); }
.career-bar span:last-child { border-right: 0; }
.career-bar span b { display: block; font-weight: 600; color: var(--text); font-size: 0.9375rem; }
.proverbs { list-style: none; counter-reset: pv; padding: 0; margin: 0; display: grid; gap: 1rem; }
.proverbs li { counter-increment: pv; font-family: var(--f-hand); font-size: 1.85rem; line-height: 1.2; color: var(--ink-blue); padding-left: 3rem; position: relative; font-weight: 600; }
.proverbs li::before { content: "No." counter(pv); position: absolute; left: 0; top: 0.45rem; font-family: var(--f-mono); font-size: 0.875rem; color: var(--stamp); font-weight: 700; }
.kit { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.kit .label h3 { font-family: var(--f-display); font-size: 1.3rem; margin: 0.2rem 0 0.4rem; }
.kit .label p { font-family: var(--f-body); font-size: 1.0625rem; color: var(--text-2); }
.kit .label ul { margin: 0; padding: 0; list-style: none; }
.kit .label li { border-top: 1px dotted var(--rule-strong); padding: 0.3rem 0; }
.details-toggle summary { cursor: pointer; list-style: none; display: inline-flex; }
.details-toggle summary::-webkit-details-marker { display: none; }
.details-toggle[open] .show-label { display: none; }
.details-toggle:not([open]) .hide-label { display: none; }

/* ---------- article ---------- */
.progress { position: fixed; top: 0; left: 0; height: 4px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--stamp); z-index: 60; }
.progress-pct { position: fixed; right: 0.75rem; top: 0.6rem; z-index: 60; font-family: var(--f-mono); font-size: 0.8125rem; background: var(--page); border: 1px solid var(--text); padding: 0.05rem 0.4rem; color: var(--text); }
.article-head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem 3rem; align-items: start; }
.article-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.article-head .photo img { aspect-ratio: 16 / 10; object-fit: cover; }
@media (max-width: 900px) { .article-head { grid-template-columns: 1fr; } }
.article-layout { display: grid; grid-template-columns: 230px minmax(0, 720px); gap: 3rem; justify-content: center; margin-top: 2.5rem; }
@media (max-width: 1100px) { .article-layout { grid-template-columns: minmax(0, 720px); } }
.toc { position: sticky; top: 1.5rem; align-self: start; }
.toc h2 { font-family: var(--f-mono); font-size: 0.875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stamp); margin: 0 0 0.75rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px dashed var(--rule-strong); }
.toc li a { display: block; padding: 0.4rem 0 0.4rem 1rem; font-size: 1rem; line-height: 1.35; color: var(--text-2); text-decoration: none; position: relative; margin-left: -2px; border-left: 2px solid transparent; }
.toc li a:hover { color: var(--text); }
.toc li a.active { color: var(--text); border-left-color: var(--stamp); font-weight: 600; }
.toc li a.active::before { content: ""; position: absolute; left: -7px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--stamp); }
.toc .toc-coord { font-family: var(--f-mono); font-size: 0.8125rem; color: var(--muted); display: block; }
.toc-mobile { display: none; border: 1.5px solid var(--text); background: var(--page); padding: 0.6rem 1rem; margin-bottom: 2rem; }
.toc-mobile summary { font-family: var(--f-mono); font-size: 0.9375rem; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.toc-mobile ol { margin: 0.5rem 0 0.25rem; padding-left: 1.4rem; }
.toc-mobile li { padding: 0.2rem 0; }
@media (max-width: 1100px) { .toc { display: none; } .toc-mobile { display: block; } }

.prose { font-size: 1.1875rem; line-height: 1.7; }
.prose > * { max-width: 100%; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.1rem); margin: 2.6rem 0 0.9rem; position: relative; padding-top: 1rem; border-top: 2px solid var(--text); }
.prose h2 .h-no { display: block; font-family: var(--f-mono); font-size: 0.8125rem; letter-spacing: 0.12em; color: var(--stamp); margin-bottom: 0.35rem; }
.prose ol, .prose ul { padding-left: 1.4rem; margin: 0 0 1.2rem; }
.prose li { margin: 0.3rem 0; }
.prose code { background: var(--page-2); border: 1px solid var(--line); padding: 0.05em 0.3em; border-radius: 2px; }
.prose a { font-weight: 500; }
.code {
  position: relative; margin: 1.6rem 0 1.8rem; border: 1.5px solid var(--text); background: var(--code-bg);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--text) 18%, transparent);
}
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 0.3rem 0.4rem 0.3rem 0.9rem; border-bottom: 1px dashed #4a5357; font-family: var(--f-mono); font-size: 0.8125rem; color: var(--code-dim); letter-spacing: 0.1em; text-transform: uppercase; }
.code-bar button { font: inherit; background: transparent; color: var(--code-text); border: 1px solid #6b7478; border-radius: 2px; min-height: 36px; padding: 0 0.75rem; cursor: pointer; }
.code-bar button:hover { background: #2d3538; }
.code pre { margin: 0; padding: 1rem 1.1rem 1.2rem; overflow-x: auto; color: var(--code-text); font-family: var(--f-mono); font-size: 0.9375rem; line-height: 1.6; tab-size: 2; }
.code pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.tok-c { color: #a9a08a; font-style: italic; }
.tok-k { color: #f0a47a; }
.tok-s { color: #b9d48a; }
.tok-t { color: #9fc4e8; }
@media (min-width: 1101px) { .prose .code { margin-left: -60px; margin-right: -60px; } }

.callout { margin: 1.6rem 0; padding: 1rem 1.2rem 1rem 1.2rem; position: relative; }
.callout p { margin: 0; }
.callout.why { border-left: 3px solid var(--ink-blue); background: color-mix(in srgb, var(--ink-blue) 8%, var(--page)); }
.callout.why .tag-why { font-family: var(--f-hand); font-size: 1.7rem; color: var(--ink-blue); line-height: 1; display: block; margin-bottom: 0.35rem; font-weight: 700; }
.callout.query { border: 1.5px dashed var(--stamp); background: var(--page); padding-top: 1.4rem; }
.callout.query .stamp { position: absolute; top: -0.85rem; left: 1rem; background: var(--page); }
.callout.skill { border: 1.5px solid var(--text); background: var(--page-2); }
.callout.skill .stamp { margin-bottom: 0.6rem; }
.callout.note { border-left: 3px solid var(--moss); background: color-mix(in srgb, var(--moss) 9%, var(--page)); }

.filed { margin-top: 3rem; border-top: 2px solid var(--text); padding-top: 1.25rem; }
.share-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.75rem 0 0; }
.share-row .btn { min-height: 44px; font-size: 0.9375rem; padding: 0.4rem 0.9rem; }

/* newsletter postcard */
.postcard {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.5rem 2.5rem;
  background: var(--page); border: 1.5px solid var(--text); padding: clamp(1.25rem, 3vw, 2rem); position: relative;
}
.postcard .postage { position: absolute; top: 1rem; right: 1rem; width: 74px; height: 88px; border: 2px dotted var(--text); display: grid; place-items: center; font-family: var(--f-mono); font-size: 0.8125rem; text-align: center; line-height: 1.2; color: var(--stamp); padding: 0.3rem; }
.postcard .left { border-right: 1px solid var(--rule-strong); padding-right: 2rem; }
.postcard form { display: flex; flex-direction: column; gap: 0.75rem; padding-top: 5.5rem; }
.postcard label.field { font-family: var(--f-mono); font-size: 0.875rem; color: var(--muted); }
.postcard input[type="email"], .footer input[type="email"] {
  min-height: 48px; width: 100%; font: 1.0625rem var(--f-mono); color: var(--text);
  background: transparent; border: 0; border-bottom: 2px solid var(--text); padding: 0.3rem 0.1rem;
}
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 1rem; }
.check input { width: 22px; height: 22px; margin-top: 0.2rem; accent-color: var(--stamp); flex: none; }
.form-status { font-family: var(--f-mono); font-size: 0.9375rem; min-height: 1.4em; color: var(--moss); }
.form-status.error { color: var(--stamp); }
@media (max-width: 760px) {
  .postcard { grid-template-columns: 1fr; }
  .postcard .left { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--rule-strong); padding-bottom: 1.25rem; padding-top: 5rem; }
  .postcard form { padding-top: 0; }
}

/* ---------- patterns ---------- */
.three-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1.5px solid var(--text); background: var(--page); }
.three-ways > div { padding: 1.1rem 1.2rem; border-left: 1px solid var(--text); }
.three-ways > div:first-child { border-left: 0; }
.three-ways h3 { font-size: 1.25rem; margin: 0.2rem 0 0.35rem; }
.three-ways p { margin: 0; font-size: 1.0625rem; color: var(--text-2); }
@media (max-width: 800px) { .three-ways { grid-template-columns: 1fr; } .three-ways > div { border-left: 0; border-top: 1px solid var(--text); } .three-ways > div:first-child { border-top: 0; } }
.filters { display: grid; gap: 1rem; margin: 2rem 0 1.25rem; }
.search-wide { display: flex; align-items: center; gap: 0.6rem; border: 2px solid var(--text); background: var(--page); padding: 0 0.9rem; }
.search-wide svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.search-wide input { flex: 1; min-width: 0; min-height: 52px; border: 0; background: transparent; color: var(--text); font: 1.0625rem var(--f-body); }
.search-wide input:focus { outline: none; }
.search-wide:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill {
  min-height: 44px; padding: 0.3rem 0.95rem; font: 600 0.9375rem var(--f-mono);
  background: var(--page); color: var(--text); border: 1.5px solid var(--text); border-radius: 999px; cursor: pointer;
}
.pill[aria-pressed="true"] { background: var(--text); color: var(--page); }
.pill[aria-pressed="true"]::before { content: "✓ "; }
.result-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; font-family: var(--f-mono); font-size: 0.9375rem; color: var(--muted); }
.result-bar select { min-height: 44px; font: 0.9375rem var(--f-mono); background: var(--page); color: var(--text); border: 1.5px solid var(--text); padding: 0 0.5rem; }
.result-bar button { font: inherit; color: var(--ink-blue); background: none; border: 0; text-decoration: underline; cursor: pointer; min-height: 44px; }
.drawer { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); margin-top: 1rem; }
.pcard { position: relative; border: 1.5px solid var(--text); background: var(--page); display: flex; flex-direction: column; }
.pcard:hover { background: var(--page-2); }
.pcard:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.pcard .thumb { aspect-ratio: 16 / 9; border-bottom: 1.5px solid var(--text); display: grid; place-items: center; background-color: var(--page-2);
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px); background-size: 12px 12px; position: relative; }
.pcard .thumb svg { width: 58%; height: auto; color: var(--ink-blue); }
.pcard .thumb .plate-no { position: absolute; left: 0.5rem; top: 0.5rem; font-family: var(--f-mono); font-size: 0.8125rem; background: var(--page); border: 1px solid var(--text); padding: 0 0.4rem; color: var(--text); }
.pcard .body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.pcard .meta { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; font-family: var(--f-mono); font-size: 0.8125rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.pcard h2 { font-size: 1.3rem; margin: 0; }
.pcard h2 a { color: var(--text); text-decoration: none; }
.pcard h2 a::after { content: ""; position: absolute; inset: 0; }
.pcard p { margin: 0; font-size: 1.0625rem; color: var(--text-2); line-height: 1.5; }
.pcard .stamp { position: absolute; top: -0.8rem; right: 0.7rem; z-index: 2; }
.pcard[hidden] { display: none; }
.empty-state { border: 2px dashed var(--text); padding: 2rem; text-align: center; margin-top: 1rem; }
.empty-state svg { width: 90px; height: 90px; color: var(--muted); margin: 0 auto 0.75rem; }

/* pattern detail */
.uses { columns: 2; column-gap: 2.5rem; padding-left: 1.2rem; margin: 0.5rem 0 1.2rem; }
.uses li { break-inside: avoid; padding: 0.15rem 0; }
@media (max-width: 600px) { .uses { columns: 1; } }
.panes { border: 1.5px solid var(--text); background: var(--page); margin-top: 1.5rem; }
.panes-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; border-bottom: 1.5px solid var(--text); padding: 0.5rem; background: var(--page-2); }
.tablist { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.tablist button { min-height: 44px; padding: 0 0.9rem; font: 600 0.9375rem var(--f-mono); background: transparent; color: var(--text); border: 1.5px solid transparent; border-radius: 3px; cursor: pointer; }
.tablist button:hover { border-color: var(--rule-strong); }
.tablist button[aria-selected="true"] { background: var(--text); color: var(--page); }
.pane-actions { display: flex; gap: 0.5rem; }
.pane-actions .tool-btn { color: var(--text); }
.pane { padding: clamp(1rem, 3vw, 1.75rem); }
.pane[hidden] { display: none; }
.pane pre { margin: 0; background: var(--code-bg); color: var(--code-text); padding: 1rem; overflow-x: auto; font: 0.9375rem/1.6 var(--f-mono); }
.pane .prompt { max-width: 66ch; }
.pane-note { font-size: 1rem; color: var(--text-2); margin-bottom: 1rem; }

/* the demo pattern itself: hairline stat strip */
.hss-caption { color: var(--text-2); font-size: 1.0625rem; margin: 0 0 0.6rem; }
.hss-strip { display: grid; gap: 1px; background: var(--rule-strong); border: 1px solid var(--rule-strong); border-radius: 6px; overflow: hidden; grid-template-columns: 1fr; margin-bottom: 1.75rem; }
@media (min-width: 21rem) { .hss-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 52rem) { .hss-strip.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 60rem) { .hss-strip.five { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.hss-tile { background: var(--page); padding: 0.85rem 1rem; display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; text-align: left; font: inherit; color: var(--text); border: 0; }
.hss-label { font-family: var(--f-mono); text-transform: uppercase; font-size: 0.8125rem; letter-spacing: 0.08em; color: var(--muted); }
.hss-fig { font-family: var(--f-mono); font-weight: 700; font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.hss-fig.missing { color: var(--muted); font-weight: 400; }
.hss-sub { font-size: 1rem; color: var(--text-2); }
button.hss-tile { cursor: pointer; }
button.hss-tile:hover { background: var(--page-2); }
button.hss-tile[aria-pressed="true"] { background: color-mix(in srgb, var(--ink-blue) 16%, var(--page)); box-shadow: inset 0 -3px 0 var(--ink-blue); }
.hss-list { list-style: none; padding: 0; margin: 0 0 0.75rem; display: grid; gap: 0.4rem; }
.hss-list li { border: 1px solid var(--rule-strong); padding: 0.55rem 0.8rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: var(--page); }
.hss-list li span { font-family: var(--f-mono); font-size: 0.875rem; color: var(--muted); }
.hss-status { font-family: var(--f-mono); font-size: 0.9375rem; color: var(--text-2); }

/* ---------- footer ---------- */
.footer { background: var(--cover) url("assets/kraft-fibers.jpg") center / 640px repeat; background-blend-mode: multiply; color: var(--cover-text); border-top: 3px solid var(--text); margin-top: 3rem; }
.footer-inner { max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 2.5rem var(--gutter) 1.25rem; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: 2rem; }
.footer h2 { font-family: var(--f-mono); font-size: 0.875rem; letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 0.8rem; color: inherit; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li a { color: inherit; display: inline-flex; min-height: 36px; align-items: center; }
.footer p { font-size: 1.0625rem; }
.footer input[type="email"] { color: var(--cover-text); border-bottom-color: var(--cover-text); }
.footer input::placeholder { color: color-mix(in srgb, var(--cover-text) 70%, transparent); }
.footer .btn { margin-top: 0.75rem; border-color: var(--cover-text); background: var(--cover-text); color: var(--cover); box-shadow: none; }
.footer-bottom { max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 1rem var(--gutter) 1.75rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; font-family: var(--f-mono); font-size: 0.875rem; border-top: 1px dashed color-mix(in srgb, var(--cover-text) 40%, transparent); }
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-inner { grid-template-columns: 1fr; } }

/* ---------- misc layout ---------- */
.stack > * + * { margin-top: 1.5rem; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } }
.section { margin-top: 1.5rem; }
.sheet h2:first-child { margin-top: 0; }
.compass { width: 88px; height: 88px; color: var(--text); opacity: 0.85; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* gallery article */
.prose .prose-photo { margin: 2rem .5rem; }
.prose .prose-photo img { aspect-ratio: auto; object-fit: contain; }
.prose blockquote.callout { margin-inline: 0; }
.prose .callout p + p { margin-top: .75rem; }
.prose code { overflow-wrap: anywhere; }
