/* Agentic Plumb Line
   Layout: one blaze line runs down the page, the same as plumblineholdings.com.
   The team hangs from it: a mobile in the hero, then a job that drops past each desk.
   One fixed look on purpose (field green and engineering-pad paper), matching the parent site. */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("../fonts/big-shoulders-display.woff2") format("woff2");
  font-weight: 100 900;
  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 {
  color-scheme: light;

  /* Color: the Plumb Line Holdings palette */
  --field: #143d2b;          /* rich field green: hero, build section */
  --field-deep: #0f3022;     /* footer, text on orange */
  --field-lift: #1a4a35;     /* panels on field green */
  --green: #1f6b46;          /* accent green on paper */
  --pad: #e4ecdd;            /* engineering-pad paper */
  --pad-minor: rgba(31, 107, 70, 0.07);
  --pad-major: rgba(31, 107, 70, 0.12);
  --surface: #f4f8f1;        /* cards on paper */
  --ink: #14251b;
  --ink-soft: #3d5547;
  --on-dark: #edf3e9;
  --on-dark-soft: #b3cbbb;
  --wire: #d9e6dc;           /* mobile beams */
  --string: rgba(179, 203, 187, 0.75);
  --blaze: #ff6a13;          /* the line, the bob */
  --blaze-hover: #ff8545;
  --blaze-deep: #c44b08;
  --blaze-ink: #a8420a;      /* orange text on paper */
  --blaze-light: #ff9a5c;    /* small orange text on field green (AA) */
  --rule-paper: rgba(20, 61, 43, 0.22);
  --rule-field: rgba(179, 203, 187, 0.22);
  --error: #9a3412;

  /* Type */
  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Layout */
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --rail: 30%;
  --gap: clamp(32px, 4.5vw, 64px);
  --line: 2px;
  --section-pad: clamp(52px, 6.5vw, 88px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--field-deep);
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
img { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--blaze);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--blaze);
  color: var(--field-deep);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.mono {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Grid: rail | line | body ---------- */

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.row {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
}

.rail {
  padding-right: var(--gap);
  text-align: right;
  min-width: 0;
}

.body {
  position: relative;
  padding-left: var(--gap);
  border-left: var(--line) solid var(--blaze);
  min-width: 0;
}

.section .rail,
.section .body { padding-block: var(--section-pad); }

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  color: var(--on-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--on-dark);
  min-width: 0;
}

.brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(179, 203, 187, 0.25);
}

.brand-words { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }

.brand-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: clamp(16px, 2.2vw, 30px);
}

.site-nav a {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  color: var(--on-dark-soft);
  text-decoration: none;
  padding-block: 6px;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--on-dark); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--blaze); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ---------- Buttons and links ---------- */

.button {
  display: inline-block;
  padding: 14px 24px 13px;
  border: 0;
  border-radius: 3px;
  background: var(--blaze);
  color: var(--field-deep);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { background: var(--blaze-hover); }
.button:active { transform: translateY(1px); }

.quiet-link {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-decoration-color: var(--blaze);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

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

/* ---------- Hero: the mobile ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--field);
  color: var(--on-dark);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding-top: 112px;
  padding-bottom: clamp(48px, 6vw, 80px);
}

.hero-copy { min-width: 0; max-width: 34rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--on-dark-soft);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--blaze);
}

.hero h1 {
  font-weight: 800;
  font-size: clamp(3rem, 6.2vw, 5.75rem);
  line-height: 0.9;
  margin-bottom: 0.32em;
  color: var(--on-dark);
}

.hero h1 em { font-style: normal; color: var(--blaze); }

.lede {
  font-size: clamp(1.1875rem, 1.5vw, 1.3125rem);
  line-height: 1.55;
  max-width: 31em;
  color: #cfe0d3;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 30px;
  margin-top: 32px;
}

.hero-actions .button:focus-visible { outline-color: var(--on-dark); }

.truth {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-field);
  font-size: 0.98rem;
  font-style: italic;
  color: var(--on-dark-soft);
}

.mobile-figure {
  margin: 0;
  min-width: 0;
  display: grid;
  gap: 14px;
}

.mobile-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.mobile-svg .hook-nail { fill: var(--on-dark-soft); }
.mobile-svg .hook-label { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; fill: var(--on-dark-soft); }
.mobile-svg .hook-label tspan.hook-name { fill: var(--on-dark); font-weight: 500; }
.mobile-svg .main-string { stroke: var(--blaze); stroke-width: 2.2; fill: none; }
.mobile-svg .string { stroke: var(--string); stroke-width: 1.3; fill: none; }
.mobile-svg .wire { stroke: var(--wire); stroke-width: 3; stroke-linecap: round; fill: none; }
.mobile-svg .knot { fill: var(--wire); }
.mobile-svg .beam-end { fill: var(--wire); }
.mobile-svg .ring { fill: none; stroke: var(--on-dark); stroke-width: 2.5; }
.mobile-svg .ring-larry { stroke: var(--blaze); stroke-width: 3; }
.mobile-svg .name { font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: 0.08em; fill: var(--on-dark-soft); text-anchor: middle; }
.mobile-svg .name-side { text-anchor: start; }

.member { cursor: grab; outline: none; }
.member:active { cursor: grabbing; }
.mobile-svg .hit { fill: transparent; }
.member .halo { fill: none; stroke: var(--blaze); stroke-width: 3; opacity: 0; }
.member:hover .ring, .member.is-active .ring { stroke: var(--blaze); }
.member:hover .name, .member.is-active .name { fill: var(--on-dark); }
.member:focus-visible .halo { opacity: 1; }
html:not(.js) .member { cursor: default; }

.mobile-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 20px;
  padding: 14px 16px;
  border: 1px solid var(--rule-field);
  border-radius: 4px;
  background: var(--field-lift);
  min-height: 128px;
}

.who-card { min-width: 0; }
.who-card .who-name { display: block; font-family: var(--display); font-weight: 700; font-size: 1.375rem; line-height: 1.1; color: var(--on-dark); }
.who-card .who-role { display: block; margin-top: 2px; color: var(--blaze-light); font-size: 0.72rem; }
.who-card .who-text { display: block; margin-top: 6px; font-size: 0.98rem; line-height: 1.45; color: var(--on-dark-soft); }

.readout { margin: 0; text-align: right; line-height: 1.1; white-space: nowrap; }
.readout-state, .readout-deg { font-family: var(--display); font-weight: 700; font-size: 1.375rem; letter-spacing: 0.02em; color: var(--on-dark-soft); }
.readout-deg { display: inline-block; min-width: 3.6ch; font-variant-numeric: tabular-nums; color: var(--on-dark); }
.hero.is-plumb .readout-state { color: var(--blaze); }
.readout-hint { display: block; margin-top: 6px; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-soft); }

/* ---------- Paper sections ---------- */

.paper-run {
  color: var(--ink);
  background-color: var(--pad);
  background-image:
    linear-gradient(var(--pad-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--pad-major) 1px, transparent 1px),
    linear-gradient(var(--pad-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--pad-minor) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-position: -1px -1px;
}

.paper-run :focus-visible { outline-color: var(--green); }

.paper-run > .section:first-child .rail,
.paper-run > .section:first-child .body { padding-top: calc(var(--section-pad) * 1.4); }

.paper-run > .section:last-child .rail,
.paper-run > .section:last-child .body { padding-bottom: calc(var(--section-pad) * 1.4); }

.section h2 {
  font-size: clamp(2.125rem, 3.4vw, 3rem);
  color: var(--field);
}

.paper-run .rail h2 { position: sticky; top: 32px; }

.rail-note {
  margin-top: 14px;
  color: var(--ink-soft);
}

.prose { max-width: 34em; }

.opening {
  font-size: clamp(1.375rem, 2vw, 1.625rem);
  line-height: 1.4;
  color: var(--field);
  font-weight: 500;
}

/* things that hang from the line get a short tie back to it */
.hung { position: relative; }

.hung::after {
  content: "";
  position: absolute;
  top: var(--tie-top, 0.8rem);
  left: calc(-1 * var(--gap));
  width: calc(var(--gap) - 14px);
  height: 2px;
  background: var(--blaze);
}

/* ---------- The relay ---------- */

.relay-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 32px 0 8px;
  padding: 5px;
  border: 1.5px solid var(--rule-paper);
  border-radius: 4px;
  background: rgba(244, 248, 241, 0.7);
}

.relay-tab {
  padding: 9px 14px 8px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.relay-tab:hover { color: var(--field); }
.relay-tab[aria-selected="true"] { background: var(--field); color: var(--on-dark); }

html:not(.js) .relay-tabs { display: none; }

.job { position: relative; max-width: 40rem; margin-top: 24px; }
.job + .job { margin-top: 56px; }
.js .job + .job { margin-top: 24px; }

.job-ticket {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  align-items: baseline;
  margin: 0 0 28px;
  padding: 14px 16px;
  border: 1.5px dashed var(--rule-paper);
  border-radius: 4px;
  background: rgba(244, 248, 241, 0.75);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.45;
}

.job-ticket .mono { color: var(--blaze-ink); }

.stations {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.station {
  --tie-top: 36px;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--rule-paper);
  border-radius: 4px;
  background: var(--surface);
  transition: border-color 0.4s ease;
}

.station-av {
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.station-body { min-width: 0; }

.station h3 {
  font-size: 1.5rem;
  line-height: 1.05;
  color: var(--field);
  margin-bottom: 6px;
}

.station h3 .who { color: var(--green); }
.station p { font-size: 1.0625rem; line-height: 1.5; }

.log {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dotted var(--rule-paper);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.log .log-who { color: var(--blaze-ink); font-weight: 500; margin-right: 0.6ch; }
.log .log-time { color: var(--green); margin-right: 0.6ch; font-variant-numeric: tabular-nums; }

.stamp {
  align-self: start;
  margin-top: 4px;
  padding: 3px 8px 2px;
  border: 1.5px solid var(--green);
  border-radius: 3px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-3deg);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.stamp-pass { border-color: var(--blaze-ink); color: var(--blaze-ink); }

.station-kyle { background: var(--field); border-color: var(--field); color: var(--on-dark); }
.station-kyle h3, .station-kyle h3 .who { color: var(--on-dark); }
.station-kyle p { color: #d6e4da; }
.station-kyle .log { border-top-color: var(--rule-field); color: var(--on-dark-soft); }
.station-kyle .log .log-who { color: var(--blaze-light); }
.station-kyle .stamp { border-color: var(--blaze); color: var(--blaze-light); }

/* While JavaScript runs, the ticket drops down the line and stamps each desk as it passes.
   Without it, every stamp shows. */
.js .station:not(.is-passed) .stamp { opacity: 0.25; transform: rotate(0deg) scale(0.92); }
.js .station.is-current { border-color: var(--blaze); }

.drop-tag {
  position: absolute;
  left: calc(-1 * var(--gap) - 7px);
  top: 0;
  width: 16px;
  height: 30px;
  pointer-events: none;
  transform: translateY(var(--drop, 0px));
  will-change: transform;
}

.drop-tag svg { display: block; width: 100%; height: 100%; }
html:not(.js) .drop-tag { display: none; }

/* ---------- Rules ---------- */

.rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 32px;
  max-width: 44rem;
}

.rules li { padding-top: 12px; border-top: 3px solid var(--blaze); min-width: 0; }
.rules strong { display: block; font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.1; color: var(--field); margin-bottom: 6px; }
.rules span { display: block; font-size: 1.0625rem; line-height: 1.5; color: var(--ink-soft); }

.plain-truth {
  margin-top: 40px;
  max-width: 44rem;
  padding: 16px 18px;
  border: 1.5px solid var(--rule-paper);
  border-radius: 4px;
  background: rgba(244, 248, 241, 0.75);
  font-size: 1.0625rem;
}

.plain-truth strong { font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.02em; color: var(--field); }

/* ---------- Build yours (field) ---------- */

.field { background: var(--field); color: var(--on-dark); }
.field h2 { color: var(--on-dark); }
.field .rail, .field .body { padding-block: calc(var(--section-pad) * 1.3); }
.field .rail-note { color: var(--on-dark-soft); }

.field .opening { color: var(--on-dark); }
.field .prose p { color: #d6e4da; }

.build-steps {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  counter-reset: step;
  max-width: 36em;
  display: grid;
  gap: 36px;
}

.build-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  column-gap: 14px;
  --tie-top: 1.05rem;
}

.build-steps li::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--display);
  font-weight: 800;
  font-size: 3rem;
  line-height: 0.85;
  color: var(--blaze);
}

.build-steps h3 { grid-column: 2; font-size: 1.875rem; line-height: 1.05; color: var(--on-dark); margin-bottom: 8px; }
.build-steps p { grid-column: 2; color: #d6e4da; }

.terms {
  margin-top: 48px;
  max-width: 36em;
  padding-top: 24px;
  border-top: 1px solid var(--rule-field);
  color: var(--on-dark-soft);
}

.terms strong { color: var(--on-dark); font-weight: 600; }

.build-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; margin-top: 28px; }
.field .quiet-link { color: var(--on-dark); }
.field .quiet-link:hover { color: var(--blaze); }
.field .button:focus-visible { outline-color: var(--on-dark); }

/* ---------- Contact form ---------- */

.contact-form {
  max-width: 34em;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.form-field label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: 0.02em;
  color: var(--field);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid rgba(20, 61, 43, 0.5);
  border-radius: 3px;
  background: #f7faf4;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.45;
}

.form-field textarea { min-height: 9.5em; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--green); }
.form-field [aria-invalid="true"] { border-color: var(--error); }

.field-error { margin: 0; font-size: 0.9375rem; color: var(--error); }
.field-error:empty { display: none; }

.field-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.form-actions .button:disabled { opacity: 0.6; cursor: progress; }
.form-note { margin: 0; font-size: 0.9375rem; font-style: italic; color: var(--ink-soft); }

.form-status {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.2;
  color: var(--field);
}

.form-status:empty { display: none; }
.form-status.is-error { color: var(--error); }

/* ---------- Team page ---------- */

.page-hero .hero-grid { grid-template-columns: minmax(0, 1fr); padding-bottom: clamp(44px, 5vw, 64px); }
.page-hero .hero-copy { max-width: 46rem; }
.page-hero h1 { font-size: clamp(2.75rem, 6vw, 5.25rem); }

.team-group .body { display: grid; gap: 20px; align-content: start; }
.team-group h2 { margin-bottom: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}

.card {
  --tie-top: 52px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--rule-paper);
  border-radius: 4px;
  min-width: 0;
}

.card > img { display: block; width: 88px; height: 88px; border-radius: 50%; }
.card-body { min-width: 0; }
.card h3 { font-size: 1.75rem; line-height: 1; color: var(--field); }
.card .role { display: block; margin-top: 4px; color: var(--green); }
.card p { margin: 8px 0 0; font-size: 1.0625rem; line-height: 1.5; }

.holds {
  margin-top: 10px !important;
  padding-top: 8px;
  border-top: 1px dotted var(--rule-paper);
  font-size: 0.98rem !important;
  color: var(--ink-soft);
}

.holds .mono { display: block; color: var(--blaze-ink); font-size: 0.66rem; margin-bottom: 2px; }

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 12px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--blaze-ink);
  color: var(--blaze-ink);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reports { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink-soft); }

/* ---------- Footer ---------- */

.site-footer { background: var(--field-deep); color: var(--on-dark-soft); font-size: 1rem; }

.footer-body { border-left: 0; padding-top: 64px; padding-bottom: 56px; }

.footer-body::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: calc(56px + 10px);
  width: var(--line);
  background: var(--blaze);
}

.footer-name { font-family: var(--display); font-weight: 700; font-size: 1.625rem; line-height: 1.1; color: var(--on-dark); margin-bottom: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; }
.footer-links a { color: var(--on-dark); text-decoration: underline; text-decoration-color: var(--blaze); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.footer-links a:hover { color: var(--blaze); }
.footer-small { font-size: 0.875rem; margin-top: 14px; }

.line-end {
  height: 20px;
  margin-top: 40px;
  line-height: 20px;
  font-size: 0.8125rem;
  font-style: italic;
  color: rgba(179, 203, 187, 0.7);
}

.line-end::before {
  content: "";
  position: absolute;
  left: calc(var(--line) / 2 - 7px);
  bottom: calc(56px + 3px);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--blaze);
  background: radial-gradient(circle, var(--blaze) 0 2.5px, transparent 3px);
}

/* ---------- 404 ---------- */

.not-found .hero-grid { grid-template-columns: minmax(0, 1fr); min-height: 70vh; }

/* ---------- Medium screens ---------- */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-top: 104px; }
  .hero-copy { max-width: 40rem; }
  .mobile-figure { max-width: 720px; }
}

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  :root {
    --rail: 24px;
    --gap: 22px;
    --section-pad: 48px;
  }

  body { font-size: 1.125rem; }

  .header-inner { height: 64px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 1.3rem; }
  .hero-grid { padding-top: 88px; }

  .section .rail {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
    padding-right: 0;
    padding-left: var(--gap);
    padding-bottom: 0;
    border-left: var(--line) solid var(--blaze);
  }

  .section .body { grid-column: 2; grid-row: 2; padding-top: 20px; }
  .paper-run > .section:first-child .body { padding-top: 20px; }
  .paper-run > .section:last-child .rail { padding-bottom: 0; }
  .field .body { padding-top: 24px; }
  .field .rail { padding-bottom: 0; }
  .paper-run .rail h2 { position: static; }

  .site-footer .rail { display: none; }
  .site-footer .body { grid-column: 2; }

  .hung::after { width: calc(var(--gap) - 6px); }

  .mobile-svg .name { font-size: 23px; }
  .mobile-svg .hook-label { font-size: 17px; }

  .station { grid-template-columns: 44px minmax(0, 1fr); }
  .station-av { width: 44px; height: 44px; }
  .station .stamp { grid-column: 2; justify-self: start; margin-top: 0; }
  .station { --tie-top: 28px; }

  .rules { grid-template-columns: minmax(0, 1fr); }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .build-steps li { grid-template-columns: 2rem minmax(0, 1fr); }
  .build-steps li::before { font-size: 2.5rem; }

  .card { grid-template-columns: 64px minmax(0, 1fr); --tie-top: 40px; }
  .card > img { width: 64px; height: 64px; }

  .mobile-panel { grid-template-columns: minmax(0, 1fr); }
  .readout { text-align: left; }
}

@media (max-width: 560px) {
  .site-nav a:not(.nav-keep) { display: none; }
  .brand-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .station, .stamp { transition: none; }
}
