@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Public Sans";
  src: url("assets/fonts/public-sans-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f5f2ea;
  --paper-soft: #ebe7dc;
  --ink: #101a1f;
  --text: #17242b;
  --muted: #4f5f66;
  --rule: #d3ccbc;
  --rule-strong: #a8a394;
  --rust: #9a3b22;
  --rust-tint: #f0e2d8;
  --deep: #101a1f;
  --deep-fg: #eef0e9;
  --deep-muted: #a9b6b4;
  --deep-rule: #35474c;
  --deep-accent: #e0a184;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1160px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(3.4rem, 7vw, 6.2rem);

  --t-hero: clamp(2.4rem, 6.4vw, 4.6rem);
  --t-h2: clamp(1.9rem, 3.6vw, 3rem);
  --t-h3: 1.0625rem;
  --t-lede: clamp(1.0625rem, 1.4vw, 1.3125rem);
  --t-body: 1rem;
  --t-small: 0.875rem;
  --t-micro: 0.75rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

[data-theme="ink"] {
  --paper: #101a1f;
  --paper-soft: #16232a;
  --ink: #eef0e9;
  --text: #e8eae4;
  --muted: #9dafae;
  --rule: #2c3b41;
  --rule-strong: #47605f;
  --rust: #e0a184;
  --rust-tint: #2b201a;
  --deep: #eef0e9;
  --deep-fg: #101a1f;
  --deep-muted: #43555c;
  --deep-rule: #b5b3a6;
  --deep-accent: #8c3520;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.62;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  transition: background-color 240ms var(--ease), color 240ms var(--ease);
}

h1, h2, h3, p, figure, dl, dd, ul, ol { margin: 0; }

a { color: var(--rust); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 60;
  background: var(--deep);
  color: var(--deep-fg);
  padding: 0.7rem 1.1rem;
  font-size: var(--t-small);
  text-decoration: none;
}
.skip:focus { top: 0.75rem; }

/* ---------- masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 0.9rem var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.wordmark-name {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.wordmark-labs {
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.primary ul {
  display: flex;
  gap: clamp(1rem, 2.2vw, 2rem);
  list-style: none;
  padding: 0;
}
.primary a {
  color: var(--muted);
  font-size: var(--t-small);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.primary a:hover { color: var(--text); border-bottom-color: var(--rust); }

.masthead-tools { display: flex; align-items: center; gap: 0.6rem; }

.theme-toggle,
.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: inherit;
  font-size: var(--t-micro);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.5rem 0.7rem;
  min-height: 44px;
  cursor: pointer;
  transition: color 160ms var(--ease), border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.theme-toggle:hover,
.menu-toggle:hover { color: var(--text); border-color: var(--rule-strong); }
.theme-toggle:active,
.menu-toggle:active { background: var(--paper-soft); }
.theme-toggle .theme-icon { width: 13px; height: 13px; flex: none; }
@media (max-width: 400px) {
  .theme-label, .menu-label {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .theme-toggle, .menu-toggle { padding: 0.5rem; min-width: 44px; justify-content: center; }
}

.menu-toggle { display: none; align-items: center; gap: 0.45rem; }
.menu-toggle .menu-icon { width: 13px; height: 13px; }
.menu-toggle[aria-expanded="true"] { color: var(--text); border-color: var(--rule-strong); }

/* ---------- hero ---------- */

main { display: block; }

.hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) var(--gutter) clamp(2.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.hero h1 {
  font-family: var(--serif);
  font-size: var(--t-hero);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
  max-width: 15ch;
}

.lede {
  margin-top: 1.4rem;
  font-size: var(--t-lede);
  line-height: 1.5;
  color: var(--text);
  max-width: 44ch;
  text-wrap: pretty;
}

.hero-body {
  margin-top: 1.1rem;
  color: var(--muted);
  max-width: 50ch;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1.35rem;
  font-family: var(--sans);
  font-size: var(--t-small);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--deep-fg);
  background: var(--deep);
  border: 1px solid var(--deep);
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 170ms var(--ease), color 170ms var(--ease), border-color 170ms var(--ease);
}
.btn:hover { background: var(--rust); border-color: var(--rust); color: var(--paper); }
.btn:active { background: var(--deep); border-color: var(--deep); color: var(--deep-fg); }

.btn-quiet {
  color: var(--text);
  background: transparent;
  border-color: var(--rule-strong);
}
.btn-quiet:hover {
  color: var(--paper);
  background: var(--text);
  border-color: var(--text);
}

/* hero plate */

.hero-plate { margin: 0; align-self: center; }

.plate-art {
  display: block;
  height: min(84vh, 46rem);
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}

/* below the hero break the figure out to the full viewport width so the column
   reads at full size on a phone instead of shrinking to a thumbnail */
@media (max-width: 1000px) {
  .hero-plate {
    width: 100vw;
    max-width: 100vw;
    margin-inline: calc(50% - 50vw);
  }
  .plate-art { height: auto; width: min(100%, 30rem); }
}

/* the engraving is ink on transparency, so flip it for the dark ground: black
   becomes warm off-white and the rust accent stays rust */
[data-theme="ink"] .plate-art {
  filter: invert(1) hue-rotate(180deg);
}

/* ---------- spec strip ---------- */

.spec-strip {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-soft);
}
.spec-strip ul {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.spec-strip li {
  padding: 0.95rem 1rem 0.95rem 0;
  font-size: var(--t-micro);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}
.spec-strip li + li {
  border-left: 1px solid var(--rule);
  padding-left: clamp(0.9rem, 2vw, 1.5rem);
}

/* ---------- shared section shell ---------- */

.section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.26fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-bottom: 2.2rem;
  border-bottom: 1px solid var(--rule);
}

.clause {
  font-size: var(--t-micro);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding-top: 0.55rem;
}
.clause span {
  display: block;
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--rust);
  margin-bottom: 0.15rem;
}

h2 {
  font-family: var(--serif);
  font-size: var(--t-h2);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 24ch;
}

.section-lede {
  margin-top: 1rem;
  font-size: var(--t-lede);
  line-height: 1.52;
  color: var(--muted);
  max-width: 58ch;
  text-wrap: pretty;
}

/* ---------- failure table ---------- */

.table-scroll { margin-top: 2.4rem; }

.failure-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-small);
}
.failure-table thead th {
  text-align: left;
  font-size: var(--t-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding: 0 1.2rem 0.7rem 0;
  border-bottom: 1px solid var(--rule-strong);
}
.failure-table thead th:first-child { width: 22%; }
.failure-table tbody th {
  text-align: left;
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  padding: 1.15rem 1.2rem 1.15rem 0;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}
.failure-table td {
  padding: 1.15rem 1.2rem 1.15rem 0;
  vertical-align: top;
  color: var(--muted);
  line-height: 1.55;
  border-bottom: 1px solid var(--rule);
}
.failure-table td:last-child { color: var(--text); padding-right: 0; }
.failure-table tbody tr:hover th { color: var(--rust); }
.failure-table tbody tr { transition: background-color 160ms var(--ease); }

.caveat {
  margin-top: 2rem;
  max-width: 74ch;
  padding: 1.1rem 1.2rem;
  border-left: 2px solid var(--rust);
  background: var(--rust-tint);
  font-size: var(--t-small);
  line-height: 1.6;
  color: var(--text);
}
.caveat strong { font-weight: 600; }

/* ---------- thesis ---------- */

.thesis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  margin-top: 2.4rem;
  align-items: start;
}

.steps { list-style: none; padding: 0; }
.steps li {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr);
  gap: 0.6rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--rule);
}
.steps li:first-child { padding-top: 0; }
.steps li:last-child { border-bottom: none; padding-bottom: 0; }
.step-num {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--rust);
  letter-spacing: 0.04em;
  padding-top: 0.18rem;
}
.steps h3 {
  font-family: var(--sans);
  font-size: var(--t-h3);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--text);
  max-width: 34ch;
}
.steps p {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: var(--t-small);
  line-height: 1.6;
  max-width: 52ch;
}

.guarantee {
  background: var(--deep);
  color: var(--deep-fg);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  border-radius: 2px;
  position: sticky;
  top: 6rem;
}
.guarantee-label {
  font-size: var(--t-micro);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--deep-muted);
}
.guarantee-line {
  margin-top: 0.9rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.guarantee-body {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--deep-rule);
  font-size: var(--t-small);
  line-height: 1.6;
  color: var(--deep-muted);
}

/* ---------- roles + sub-head ---------- */

.sub-head {
  margin-top: clamp(2.6rem, 5vw, 3.6rem);
  padding-top: 2rem;
  border-top: 1px solid var(--rule-strong);
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: baseline;
}
.sub-head h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}
.sub-head p {
  font-size: var(--t-small);
  line-height: 1.6;
  color: var(--muted);
  max-width: 62ch;
  text-wrap: pretty;
}

.roles-table { margin-top: 1.6rem; }
.roles-table thead th:first-child { width: 24%; }
.roles-table thead th:nth-child(2) { width: 26%; }
.roles-table tbody th { font-size: 1rem; }

/* ---------- mission ---------- */

.mandate-grid {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--rule);
}
.mandate-block {
  padding: 1.6rem 1.8rem 2rem 0;
  border-top: 2px solid var(--text);
}
.mandate-block + .mandate-block {
  padding-left: clamp(1.2rem, 3vw, 2.6rem);
  padding-right: 0;
  border-left: 1px solid var(--rule);
}
.mandate-block h3 {
  font-size: var(--t-micro);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.mandate-claim {
  margin-top: 0.8rem;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--text);
  text-wrap: balance;
  max-width: 20ch;
}
.mandate-body {
  margin-top: 1rem;
  font-size: var(--t-small);
  line-height: 1.65;
  color: var(--muted);
  max-width: 44ch;
  text-wrap: pretty;
}
.mandate-note {
  margin-top: 1.8rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--rust);
  font-size: var(--t-small);
  line-height: 1.65;
  color: var(--text);
  max-width: 68ch;
}

/* ---------- covenium panel ---------- */

.panel {
  background: var(--deep);
  color: var(--deep-fg);
  margin-top: clamp(1rem, 3vw, 2rem);
}
.panel-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}
.clause-panel { color: var(--deep-muted); }
.clause-panel span { color: var(--deep-accent); }

.panel-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid var(--deep-rule);
  margin-top: 0.5rem;
}
.panel h2 {
  font-size: clamp(2.6rem, 5vw, 4rem);
  color: var(--deep-fg);
}
.panel-lede {
  margin-top: 0.6rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--deep-accent);
  letter-spacing: 0.01em;
}
.panel-body {
  font-size: var(--t-lede);
  line-height: 1.5;
  color: var(--deep-muted);
  max-width: 46ch;
  text-wrap: pretty;
}

.components {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 0.5rem;
}
.components > div {
  padding: 1.5rem 1.5rem 1.5rem 0;
  border-bottom: 1px solid var(--deep-rule);
}
.components > div:nth-child(even) {
  padding-left: clamp(1rem, 3vw, 2.5rem);
  padding-right: 0;
  border-left: 1px solid var(--deep-rule);
}
.components > div:nth-last-child(-n+2) { border-bottom: none; }
.components dt {
  font-size: var(--t-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--deep-accent);
  font-weight: 500;
}
.components dd {
  margin: 0.55rem 0 0;
  font-size: var(--t-small);
  line-height: 1.6;
  color: var(--deep-muted);
  max-width: 42ch;
}

.panel-foot {
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--deep-rule);
  font-size: var(--t-small);
  color: var(--deep-muted);
}
.panel-foot a { color: var(--deep-fg); }
.nojs-contact {
  display: none;
  align-self: start;
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--text);
  max-width: 46ch;
}
.nojs-contact a { color: var(--rust); text-underline-offset: 3px; }

/* ---------- lab ---------- */

.practice { margin-top: 0.5rem; }
.practice-row {
  display: grid;
  grid-template-columns: minmax(0, 0.3fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--rule);
}
.practice-row:last-child { border-bottom: none; }
.practice-row h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}
.practice-row p {
  color: var(--muted);
  font-size: var(--t-body);
  line-height: 1.62;
  max-width: 66ch;
  text-wrap: pretty;
}

/* ---------- principles ---------- */

.principles {
  border-top: 1px solid var(--rule);
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.principles .clause {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.principle-list {
  list-style: none;
  counter-reset: principle;
  max-width: var(--wrap);
  margin: 1.4rem auto 0;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  display: grid;
  gap: 0;
}
.principle-list li {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.2vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--text);
  text-wrap: balance;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 0.26fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: baseline;
}
.principle-list li:last-child { border-bottom: none; }
.principle-list li::before {
  counter-increment: principle;
  content: counter(principle, decimal-leading-zero);
  font-family: var(--sans);
  font-size: var(--t-micro);
  letter-spacing: 0.1em;
  color: var(--rust);
  padding-top: 0.5em;
}

/* ---------- contact ---------- */

.contact {
  border-top: 1px solid var(--rule);
  background: var(--paper-soft);
  max-width: none;
}
.contact-grid {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.contact-copy h2 {
  margin-top: 0.8rem;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  max-width: 22ch;
}
.contact-direct {
  margin-top: 1.6rem;
  font-size: var(--t-small);
  color: var(--muted);
}

.inquiry {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.3rem, 3vw, 2rem);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field { display: grid; gap: 0.35rem; margin: 0; }
.field label {
  font-size: var(--t-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.field input,
.field textarea {
  font: inherit;
  font-size: var(--t-small);
  color: var(--text);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 0.6rem 0.7rem;
  min-height: 44px;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 104px; }
.field input:hover,
.field textarea:hover { border-color: var(--muted); }
.field input:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--rust); outline-offset: 1px; border-color: var(--rust); }
.field-error {
  font-size: var(--t-micro);
  color: var(--rust);
  min-height: 0;
}
.field-error:empty { display: none; }
.field [aria-invalid="true"] { border-color: var(--rust); border-width: 2px; }

.inquiry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}
.inquiry-status {
  font-size: var(--t-small);
  color: var(--muted);
  max-width: 32ch;
}
.inquiry-status.is-error { color: var(--rust); font-weight: 500; }
.field-note {
  font-size: var(--t-micro);
  color: var(--muted);
  line-height: 1.5;
}

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

.footer {
  border-top: 1px solid var(--rule);
  padding: clamp(2rem, 4vw, 3rem) var(--gutter) 1.5rem;
  max-width: var(--wrap);
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 0.3fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-bottom: 1.8rem;
  border-bottom: 1px solid var(--rule);
}
.footer-mark {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--text);
}
.footer-mark span {
  font-family: var(--sans);
  font-size: var(--t-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: 0.4rem;
}
.footer-line {
  font-size: var(--t-small);
  color: var(--muted);
  max-width: 58ch;
  line-height: 1.6;
}
.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding-top: 1.2rem;
  font-size: var(--t-micro);
  color: var(--muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  list-style: none;
  padding: 0;
}
.footer-links a {
  display: inline-block;
  padding: 0.3rem 0;
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--text); text-decoration: underline; }

/* ---------- motion ---------- */

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

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .thesis-grid { grid-template-columns: 1fr; }
  .guarantee { position: static; }
  .components { grid-template-columns: 1fr; }
  .components > div:nth-child(even) {
    padding-left: 0;
    border-left: none;
  }
  .components > div:nth-last-child(2) { border-bottom: 1px solid var(--deep-rule); }
  .mandate-grid { grid-template-columns: 1fr; }
  .mandate-block { padding-right: 0; }
  .mandate-block + .mandate-block {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--rule);
  }
  .contact-grid { grid-template-columns: 1fr; }
  .panel-head { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 860px) {
  .masthead { gap: 0.75rem; }
  .menu-toggle { display: inline-flex; }

  .primary {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 0.4rem var(--gutter) 1rem;
  }
  .primary.is-open { display: block; }
  .primary ul { flex-direction: column; gap: 0; }
  .primary li { border-bottom: 1px solid var(--rule); }
  .primary li:last-child { border-bottom: none; }
  .primary a {
    display: block;
    padding: 0.85rem 0;
    font-size: var(--t-body);
    min-height: 44px;
  }

  .section-head { grid-template-columns: 1fr; gap: 0.8rem; }
  .clause { padding-top: 0; }
  .clause span { display: inline; margin-right: 0.5rem; }
  .spec-strip ul { grid-template-columns: repeat(2, 1fr); }
  .spec-strip li { padding: 0.8rem 0.8rem 0.8rem 0; }
  .spec-strip li:nth-child(3) { border-left: none; padding-left: 0; }
  .spec-strip li:nth-child(3),
  .spec-strip li:nth-child(4) { border-top: 1px solid var(--rule); }
  .spec-strip li:nth-child(4) { padding-left: 0.8rem; }
}

@media (max-width: 700px) {
  .failure-table thead { display: none; }
  .failure-table,
  .failure-table tbody,
  .failure-table tr,
  .failure-table th,
  .failure-table td { display: block; width: 100%; }
  .failure-table tr {
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--rule);
  }
  .failure-table tbody th {
    padding: 0 0 0.7rem;
    border-bottom: none;
    font-size: 1.15rem;
  }
  .failure-table td {
    position: relative;
    padding: 0.35rem 0 0.35rem 0;
    border-bottom: none;
  }
  .failure-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.2rem;
  }
  .steps li { grid-template-columns: 2.2rem minmax(0, 1fr); }
  .sub-head { grid-template-columns: 1fr; gap: 0.5rem; }
  .field-row { grid-template-columns: 1fr; }
  .practice-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .footer-top { grid-template-columns: 1fr; gap: 0.6rem; }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .principle-list li { font-size: clamp(1.25rem, 5.4vw, 1.7rem); }
}

@media (max-width: 420px) {
  .wordmark-name { font-size: 1.0625rem; }
  .wordmark-labs { letter-spacing: 0.1em; }
  .cta-row .btn { width: 100%; }
}
