:root {
  --paper: #f3eee2;
  --paper-2: #e8dfcd;
  --paper-3: #fbf8f0;
  --ink: #171a17;
  --ink-2: #252a25;
  --muted: #5f655b;
  --line: #d6cbb6;
  --line-dark: #b4a88d;
  --orange: #e4570f;
  --orange-2: #f16a22;
  --orange-dark: #b64009;
  --orange-soft: #f9dfce;
  --blue: #1f5361;
  --blue-soft: #e4eef0;
  --amber-soft: #f8ecd2;
  --radius: 2px;
  --shadow: 0 18px 40px rgba(23, 26, 23, 0.12);
  --hard-shadow: 6px 6px 0 rgba(23, 26, 23, 0.12);
  --max: 1240px;
  --measure: 760px;
  --display: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--orange);
  color: #fff;
}

img, svg { max-width: 100%; }

a {
  color: var(--orange-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
a:hover { color: var(--orange); }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
h1 { font-size: clamp(2.7rem, 5.5vw, 5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.65rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.02em; line-height: 1.12; }
h4 { font-size: 1.08rem; letter-spacing: -0.01em; }

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin: 0.35rem 0; }

code {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper-2);
  padding: 0.08em 0.35em;
  font-family: var(--mono);
  font-size: 0.88em;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.4rem 0;
}

[hidden] { display: none !important; }

button, input, select, textarea {
  font: inherit;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 200;
  background: var(--orange);
  color: #fff;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.skip:focus { left: 8px; color: #fff; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.narrow { max-width: var(--measure); }

.article {
  max-width: var(--measure);
  margin: 0;
}
.article.narrow { max-width: var(--measure); }

/* Standalone prose wrappers keep one reading measure and line up with the
   .wrap gutter at every viewport width. */
.wrap.article,
.wrap.article.narrow,
.wrap.narrow {
  width: min(var(--measure), calc(100% - 56px));
  max-width: none;
  margin-right: auto;
  margin-left: max(28px, calc((100% - var(--max)) / 2 + 28px));
  padding-right: 0;
  padding-left: 0;
}
.article h2 {
  margin-top: 2.6rem;
  padding-top: 20px;
  border-top: 1px solid var(--line-dark);
}
.article h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.article h3 { margin-top: 1.8rem; }
.article .callout { margin: 1.7rem 0; }
.article .callout h3 { margin-top: 0; }
.article .table-wrap { max-width: 100%; }
.article .data-table { table-layout: fixed; }
.article .data-table th { white-space: normal; }
.article .data-table th,
.article .data-table td { overflow-wrap: anywhere; }
.article .data-table code { word-break: break-word; }

.article-body {
  max-width: 760px;
  font-size: 1.06rem;
  line-height: 1.75;
}
.article-body > p:first-of-type::first-letter {
  float: left;
  padding: 8px 10px 0 0;
  color: var(--orange);
  font-family: var(--display);
  font-size: 4.4rem;
  font-weight: 900;
  line-height: 0.78;
}
.article-body > p:first-of-type { margin-top: 0; }

.byline {
  margin: 16px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.035em;
  line-height: 1.6;
  text-transform: uppercase;
}
.byline a { color: var(--ink); }

.page-head {
  position: relative;
  padding-top: 56px;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--ink);
}
.page-head h1 { max-width: 24ch; margin-bottom: 0.3em; }
.page-head .lede { max-width: var(--measure); margin-bottom: 1.3rem; }
.page-head + .section { padding-top: 42px; }

.lede {
  max-width: 72ch;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0.85rem;
  color: var(--orange-dark);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: currentColor;
}

.section { padding: 78px 0; }
.section > .wrap > h2 { max-width: var(--measure); }
.section > .wrap > p,
.section > .wrap > .callout,
.section > .wrap > .list-foot { max-width: var(--measure); }
.section > .wrap > .faq { max-width: var(--measure); }
.section > .wrap > .source-box { max-width: var(--measure); }
.section > .wrap > .model-note { max-width: var(--measure); }
.section-alt {
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  background-color: var(--paper-2);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 11px,
    rgba(23, 26, 23, 0.022) 11px,
    rgba(23, 26, 23, 0.022) 12px
  );
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 34px;
  margin-bottom: 34px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-dark);
}
.section-head h2 { margin: 0; }
.section-head h2::before {
  content: "";
  display: block;
  width: 52px;
  height: 4px;
  margin-bottom: 14px;
  background: var(--orange);
}
.section-note {
  max-width: 56ch;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.95rem;
}
.small { color: var(--muted); font-size: 0.86rem; }
.nowrap { white-space: nowrap; }
.text-link {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.meta-row strong { color: var(--ink); font-size: 0.82rem; }

/* Header */
.topline {
  background: var(--orange);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.topline-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 30px;
}
.topline-inner span:last-child { opacity: 0.88; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid #000;
  background: var(--ink);
  color: var(--paper);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
}
.brand:hover { color: var(--paper); }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid #000;
  background: var(--orange);
  box-shadow: 3px 3px 0 #000;
  color: #fff;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}
.brand-text {
  display: flex;
  flex-direction: column;
  color: var(--paper);
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
}
.brand-text strong { color: var(--orange-2); }
.brand-sub {
  margin-top: 7px;
  color: #a6ada1;
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 400;
  letter-spacing: 0.15em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 25px;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.site-nav a {
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  color: #c8cec3;
  text-decoration: none;
}
.site-nav a:hover {
  border-bottom-color: var(--orange);
  color: var(--paper);
}
.site-nav .nav-cta {
  padding: 11px 16px;
  border: 1px solid #000;
  background: var(--orange);
  box-shadow: 3px 3px 0 #000;
  color: #fff;
}
.site-nav .nav-cta:hover {
  border-color: #000;
  background: var(--orange-2);
  color: #fff;
}
.nav-toggle {
  display: none;
  padding: 8px 12px;
  border: 1px solid #6d746a;
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* Breadcrumbs */
.breadcrumbs {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 28px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.45rem;
  color: var(--orange);
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--orange-dark); }

/* Buttons and forms */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 19px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--orange);
  box-shadow: 4px 4px 0 var(--ink);
  color: #fff;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover {
  background: var(--orange-2);
  box-shadow: 5px 5px 0 var(--ink);
  color: #fff;
  transform: translate(-1px, -1px);
}
.btn:active {
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(2px, 2px);
}
.btn-ghost {
  background: transparent;
  box-shadow: none;
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--paper-3);
  box-shadow: none;
  color: var(--ink);
  transform: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.field label,
.filter-bar label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.field input,
.field select,
.filter-bar input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  background: var(--paper-3);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.94rem;
}
.field input:focus,
.field select:focus,
.filter-bar input:focus,
.example:focus-visible,
.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
.field input:focus,
.field select:focus,
.filter-bar input:focus { border-color: var(--ink); }
.grow { flex: 1 1 auto; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 92px;
  border-bottom: 6px solid var(--orange);
  background: var(--ink);
  color: var(--paper);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(243, 238, 226, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 238, 226, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.9), transparent 88%);
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.9), transparent 88%);
}
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 10px;
  background: var(--orange);
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.7fr);
  gap: 58px;
  align-items: center;
}
.hero .eyebrow { color: var(--orange-2); }
.hero h1 {
  max-width: 15ch;
  margin-bottom: 24px;
  color: var(--paper);
  font-size: clamp(3.1rem, 7vw, 6.2rem);
  letter-spacing: -0.05em;
  line-height: 0.9;
}
.hero h1 span {
  display: block;
  color: var(--orange-2);
}
.hero .lede {
  max-width: 58ch;
  color: #c8cec3;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
}
.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr) auto;
  align-items: end;
  gap: 10px;
  margin: 30px 0 16px;
  padding: 16px;
  border: 1px solid #000;
  background: var(--paper);
  box-shadow: 8px 8px 0 var(--orange);
}
.hero-search .field { margin: 0; }
.hero-search label { color: var(--muted); }
.hero-search input,
.hero-search select {
  border-color: var(--line-dark);
  background: var(--paper-3);
  color: var(--ink);
}
.hero-search .btn { box-shadow: 3px 3px 0 var(--ink); }
.hero-micro {
  margin: 0;
  color: #a8afa2;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.055em;
  line-height: 1.6;
  text-transform: uppercase;
}
.hero-stamp {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(243, 238, 226, 0.16);
  color: #a8afa2;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero-stamp span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  background: var(--orange);
}
.hero-brands {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.hero-brands .btn {
  padding: 9px 13px;
  border-color: rgba(243, 238, 226, 0.45);
  background: transparent;
  color: var(--paper);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-brands .btn:hover {
  border-color: var(--orange);
  background: rgba(243, 238, 226, 0.1);
  color: #fff;
  transform: none;
}
.hero-card {
  position: relative;
  padding: 25px;
  border: 1px solid #000;
  background: var(--paper-2);
  box-shadow: 10px 10px 0 rgba(228, 87, 15, 0.95);
  color: var(--ink);
}
.hero-card::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  left: -1px;
  height: 6px;
  background: var(--orange);
}
.ledger-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}
.hero-card-label {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.ledger-year {
  padding: 3px 7px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
}
.ledger-total {
  display: flex;
  flex-direction: column;
  margin: 0 0 18px;
}
.ledger-total strong {
  font-family: var(--display);
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.82;
}
.ledger-total span {
  margin-top: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.stat-list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.stat-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.35;
}
.stat-list li:last-child { border-bottom: 0; }
.stat-list strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  white-space: nowrap;
}
.ledger-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
}
.ledger-foot .hero-micro { color: var(--muted); }
.hero-card .text-link { color: var(--orange-dark); font-size: 0.82rem; }

/* Cards */
.model-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line-dark);
  background: var(--paper);
}
.model-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 20px 20px 18px;
  border: 0;
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.model-card:hover {
  background: var(--paper-3);
  box-shadow: inset 4px 0 0 var(--orange);
  color: var(--ink);
  transform: none;
}
.model-card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.model-year {
  padding: 3px 7px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.model-card-tag {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}
.model-card h3 {
  margin: 2px 0 0;
  font-size: 1.35rem;
}
.model-card p {
  margin: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.5;
}
.card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.045em;
  line-height: 1.4;
  text-transform: uppercase;
}
.card-foot strong { color: var(--ink); font-size: 0.74rem; }
.card-arrow {
  margin-left: auto;
  color: var(--orange);
  font-family: var(--sans);
  font-size: 1.15rem;
  line-height: 1;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 30px;
}
.step {
  padding: 20px 0 0;
  border: 0;
  border-top: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
}
.step-num {
  color: var(--orange-dark);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.step h3 { margin: 10px 0 8px; font-size: 1.35rem; }
.step p {
  margin: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.94rem;
}

/* Two-column blocks */
.two-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
  gap: 48px;
}
.panel,
.fact-panel {
  padding: 26px;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  background: var(--paper-3);
}
.fact-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  border-top: 6px solid var(--orange);
}
.fact { display: flex; flex-direction: column; margin: 0; }
.fact strong {
  font-family: var(--display);
  font-size: 2.65rem;
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.88;
}
.fact span {
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  line-height: 1.4;
  text-transform: uppercase;
}
.fact-note {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.84rem;
}

/* Callouts */
.callout {
  margin: 18px 0;
  padding: 18px 20px;
  border: 1px solid var(--line-dark);
  border-left: 6px solid var(--ink);
  border-radius: 0;
  background: var(--paper-3);
}
.callout h3 {
  margin: 0 0 6px;
  font-family: var(--sans);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.callout p:last-child { margin-bottom: 0; }
.callout-warn {
  border-color: #dfc08b;
  border-left-color: var(--orange);
  background: var(--amber-soft);
}
.callout-info {
  border-color: #bdd0d5;
  border-left-color: var(--blue);
  background: var(--blue-soft);
}

/* FAQ */
.faq, .faq-list { border-top: 2px solid var(--ink); }
.faq details, .faq-list details { border-bottom: 1px solid var(--line-dark); }
.faq summary, .faq-list summary {
  position: relative;
  padding: 18px 36px 18px 0;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 750;
  list-style: none;
}
.faq summary::-webkit-details-marker,
.faq-list summary::-webkit-details-marker { display: none; }
.faq summary::after,
.faq-list summary::after {
  content: "+";
  position: absolute;
  top: 15px;
  right: 4px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}
.faq details[open] summary::after,
.faq-list details[open] summary::after { content: "−"; }
.faq-body {
  padding: 0 0 18px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.95rem;
}
.faq-body p:last-child { margin-bottom: 0; }

/* Code cards */
.code-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--line-dark);
  background: var(--paper);
}
.code-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 0;
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.code-card:hover {
  background: var(--paper-3);
  box-shadow: inset 3px 0 0 var(--orange);
  color: var(--ink);
  transform: none;
}
.code-card-code {
  color: var(--orange-dark);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.code-card-name {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.25;
}
.code-card-link {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

/* Manual tabs */
.manual-tabs {
  position: sticky;
  top: 72px;
  z-index: 40;
  display: flex;
  width: calc(100% - 56px);
  max-width: calc(var(--max) - 56px);
  overflow-x: auto;
  margin: 0 auto;
  border: 1px solid var(--ink);
  border-bottom: 0;
  background: var(--paper-3);
  scrollbar-width: thin;
}
.manual-tabs a {
  flex: 0 0 auto;
  padding: 12px 16px;
  border-right: 1px solid var(--line-dark);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}
.manual-tabs a:last-child { border-right: 0; }
.manual-tabs a span { color: var(--orange-dark); }
.manual-tabs a:hover { background: var(--orange); color: #fff; }
.manual-tabs a:hover span { color: #fff; }

/* Filter and tables */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 22px;
  padding: 12px 14px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper-3);
  box-shadow: 4px 4px 0 rgba(23, 26, 23, 0.1);
}
.filter-bar input { flex: 1 1 260px; width: auto; }
.filter-count {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.no-match { color: var(--muted); font-style: italic; }
.code-group { margin: 0 0 28px; }
.code-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.count {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  height: 22px;
  padding: 0 7px;
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper-3);
}
.code-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.86rem;
  line-height: 1.5;
}
.code-table th,
.data-table th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.code-table td,
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #e7dfd0;
  vertical-align: top;
}
.code-table tr:last-child td,
.data-table tr:last-child td { border-bottom: 0; }
.code-table tbody tr:nth-child(even),
.data-table tbody tr:nth-child(even) { background: #f7f2e7; }
.code-table tbody tr:hover,
.data-table tbody tr:hover { background: var(--orange-soft); }
.code-table tr:target,
.data-table tr:target {
  background: var(--orange-soft);
  box-shadow: inset 4px 0 0 var(--orange);
}
.code-cell { min-width: 150px; white-space: nowrap; }
.code-pill {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid var(--orange-dark);
  border-radius: 0;
  background: var(--orange);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
}
.code-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}
.pcode-table td:nth-child(2) { color: var(--muted); font-size: 0.8rem; }
.pcode-table .code-cell { min-width: 0; }
.data-table caption {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
  text-align: left;
  caption-side: top;
}
.data-table.compact td { padding: 8px 14px; }
.list-foot {
  margin-top: 16px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.8rem;
}

/* Check lists */
.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li { position: relative; margin: 0.72rem 0; padding-left: 24px; }
.check-list li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 0;
  background: var(--orange);
}
.steps-list { padding-left: 1.4rem; }
.steps-list li { margin: 0.8rem 0; }

/* Source */
.source-box {
  padding: 26px;
  border: 1px solid var(--ink);
  border-top: 6px solid var(--orange);
  border-radius: 0;
  background: var(--paper-3);
}
.source-box h2 { font-size: 1.7rem; }
.source-box p {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.9rem;
}
.source-box p:last-child { margin-bottom: 0; }
.source-box .check-list { font-family: var(--sans); font-size: 0.9rem; }

/* Link grid */
.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--line-dark);
  background: var(--paper);
  counter-reset: linkcard;
}
.link-grid a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border: 0;
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  counter-increment: linkcard;
  text-decoration: none;
}
.link-grid a::before {
  content: counter(linkcard, decimal-leading-zero);
  display: block;
  margin-bottom: 6px;
  color: var(--orange-dark);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.link-grid a:hover {
  background: var(--paper-3);
  box-shadow: inset 4px 0 0 var(--orange);
  color: var(--ink);
}
.link-grid strong {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.25;
}
.link-grid span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* CTA band */
.cta-band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  padding: 38px 40px;
  border-left: 10px solid var(--orange);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 14px,
    rgba(243, 238, 226, 0.045) 14px,
    rgba(243, 238, 226, 0.045) 15px
  );
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { margin-bottom: 6px; color: var(--paper); }
.cta-band p { margin: 0; color: #c8cec3; font-family: var(--sans); }
.cta-band .eyebrow { color: var(--orange-2); }
.cta-band .btn { box-shadow: 4px 4px 0 var(--orange); }

/* Decoder */
.decoder-panel {
  margin-bottom: 32px;
  border: 1px solid var(--ink);
  background: var(--paper-3);
  box-shadow: 8px 8px 0 rgba(228, 87, 15, 0.9);
}
.decoder-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 14px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.decoder-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.decoder-form .field { min-width: 220px; margin: 0; }
.decoder-form .btn { padding: 12px 24px; }
.form-hint {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 2;
}
.example {
  display: inline-block;
  margin: 0 3px;
  padding: 3px 8px;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  background: var(--paper-2);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.68rem;
}
.example:hover { border-color: var(--orange); background: var(--orange); color: #fff; }
.decoder-results { min-height: 120px; margin-top: 30px; }
.empty-state {
  padding: 28px;
  border: 1px dashed var(--line-dark);
  border-radius: 0;
  background: var(--paper-3);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.95rem;
}
.empty-state p:last-child { margin-bottom: 0; }
.result-summary {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line-dark);
  background: var(--paper);
}
.result-card {
  padding: 20px;
  border: 0;
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  border-radius: 0;
  background: var(--paper);
}
.result-model {
  margin: 0 0 8px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.result-code {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}
.result-card h3 {
  margin: 4px 0 2px;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 800;
}
.result-failure {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.9rem;
}
.result-card a { font-family: var(--sans); font-size: 0.82rem; font-weight: 800; text-decoration: none; }
.result-more { margin-top: 14px; color: var(--muted); font-family: var(--sans); font-size: 0.84rem; }
.big-mail {
  font-family: var(--display);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

/* Articles */
.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 760px);
  align-items: start;
  justify-content: center;
  gap: 56px;
}
.article-layout-solo {
  grid-template-columns: minmax(0, 820px);
  justify-content: start;
}
.article-rail {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.rail-label {
  margin: 0 0 10px;
  color: var(--orange-dark);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.toc {
  padding-top: 14px;
  border-top: 3px solid var(--ink);
}
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc li { margin: 0; border-bottom: 1px solid var(--line); }
.toc a {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.35;
  text-decoration: none;
}
.toc a span {
  flex: 0 0 auto;
  padding-top: 2px;
  color: var(--orange-dark);
  font-family: var(--mono);
  font-size: 0.6rem;
}
.toc a:hover { color: var(--orange-dark); }
.rail-note {
  padding: 14px;
  border-left: 4px solid var(--orange);
  background: var(--paper-2);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.5;
}
.rail-note p { margin: 0 0 8px; }
.rail-note a { font-size: 0.76rem; font-weight: 700; }
.article figure,
.guide-figure {
  margin: 2.4rem 0;
  padding: 18px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper-3);
  box-shadow: 6px 6px 0 rgba(23, 26, 23, 0.08);
  counter-increment: figure;
}
.article { counter-reset: figure; }
.article figure img { display: block; width: 100%; height: auto; }
.article figcaption,
.guide-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.5;
}
.article figcaption::before,
.guide-figure figcaption::before {
  content: "FIG. " counter(figure, decimal-leading-zero) " / ";
  color: var(--orange-dark);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.model-note {
  margin: 18px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--orange);
  background: var(--paper-3);
}
.model-note h3 { margin-top: 0; }
.model-note p:last-child { margin-bottom: 0; }
.anchor-target {
  display: block;
  position: relative;
  top: -145px;
  visibility: hidden;
}

/* Footer */
.site-footer {
  margin-top: 0;
  padding: 0 0 22px;
  border-top: 8px solid var(--orange);
  background: var(--ink);
  color: #c8cec3;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-top: 48px;
}
.footer-brand {
  margin-bottom: 10px;
  color: var(--paper);
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
}
.footer-brand strong { color: var(--orange-2); }
.footer-note {
  max-width: 48ch;
  color: #9ba297;
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1.6;
}
.footer-head {
  margin-bottom: 10px;
  color: var(--orange-2);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-footer a {
  display: block;
  margin: 6px 0;
  color: #c8cec3;
  font-family: var(--sans);
  font-size: 0.85rem;
  text-decoration: none;
}
.site-footer a:hover { color: var(--paper); text-decoration: underline; }
.footer-note a {
  display: inline;
  margin: 0;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(243, 238, 226, 0.14);
  color: #8b9288;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  line-height: 1.6;
  text-transform: uppercase;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { display: inline; font-size: 0.6rem; }

/* Field photography and guide cards */
.field-strip {
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  background: var(--paper-2);
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.field-card {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
}
.field-card-media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--ink);
  box-shadow: 5px 5px 0 rgba(23, 26, 23, 0.12);
}
.field-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06) sepia(0.12);
  opacity: 0.95;
  transition: filter 180ms ease, transform 280ms ease, opacity 180ms ease;
}
.field-card:hover .field-card-media img,
.field-card:focus-visible .field-card-media img {
  filter: grayscale(0.15) contrast(1.02) sepia(0.03);
  opacity: 1;
  transform: scale(1.018);
}
.field-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 7px 10px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.field-card-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 2px 0;
}
.field-card-body strong {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}
.field-card-body span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.84rem;
  line-height: 1.45;
}
.field-card:hover strong { color: var(--orange-dark); }

.photo-credit {
  max-width: var(--measure);
  margin: 16px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  line-height: 1.55;
}
.photo-credit a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 22px;
}
.guide-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-dark);
  border-top: 5px solid var(--ink);
  background: var(--paper-3);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.guide-card:hover,
.guide-card:focus-visible {
  border-top-color: var(--orange);
  box-shadow: var(--hard-shadow);
  transform: translateY(-2px);
}
.guide-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
}
.guide-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05) sepia(0.1);
  opacity: 0.94;
  transition: filter 180ms ease, transform 280ms ease, opacity 180ms ease;
}
.guide-card:hover .guide-card-media img,
.guide-card:focus-visible .guide-card-media img {
  filter: grayscale(0.15) contrast(1.02) sepia(0.03);
  opacity: 1;
  transform: scale(1.018);
}
.guide-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 52%, rgba(23, 26, 23, 0.68));
}
.guide-card-index {
  position: absolute;
  bottom: 11px;
  left: 14px;
  z-index: 1;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.guide-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  padding: 20px 20px 22px;
}
.guide-card-body strong {
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.28;
}
.guide-card-desc {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.84rem;
  line-height: 1.5;
}
.guide-card-more {
  margin-top: auto;
  color: var(--orange-dark);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article .article-photo { margin-top: 0; }
.article .article-photo img {
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
}
.article .article-photo figcaption::before { content: "PHOTO / "; }
.article .article-photo figcaption a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Responsive */
@media (min-width: 1101px) {
  .model-grid > .model-card:last-child:nth-child(3n+1) { grid-column: span 3; }
  .model-grid > .model-card:last-child:nth-child(3n+2) { grid-column: span 2; }
}

@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); gap: 38px; }
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-grid > .model-card:last-child:nth-child(2n+1) { grid-column: span 2; }
  .code-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 40px; }
}

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { max-width: 13ch; }
  .hero-search { max-width: 760px; }
  .hero-card { max-width: 560px; }
  .two-col { grid-template-columns: 1fr; gap: 30px; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .result-grid { grid-template-columns: 1fr; }
  .result-card { border-right: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; gap: 34px; }
  .article-rail {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
  }
  .article-layout-solo { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .wrap.article,
  .wrap.article.narrow,
  .wrap.narrow {
    width: calc(100% - 40px);
    margin-left: 20px;
  }
  .topline { font-size: 0.56rem; }
  .topline-inner span:last-child { display: none; }
  .header-inner { min-height: 64px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-text { font-size: 1.05rem; }
  .brand-sub { font-size: 0.48rem; }
  .nav-toggle { display: inline-block; }
  .site-nav {
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 20px 20px;
    border-bottom: 1px solid #000;
    background: var(--ink);
  }
  .site-nav[data-open="true"] { display: flex; }
  .site-nav a {
    padding: 10px 0;
    border-bottom: 1px solid rgba(243, 238, 226, 0.1);
  }
  .site-nav .nav-cta {
    margin-top: 10px;
    padding: 12px;
    border-bottom: 0;
    text-align: center;
  }
  .breadcrumbs { padding: 14px 20px 0; font-size: 0.56rem; }
  .page-head { padding-top: 40px; padding-bottom: 22px; }
  .page-head h1 { max-width: 18ch; }
  .hero { padding: 62px 0 68px; }
  .hero::after { width: 7px; }
  .hero h1 { max-width: 11ch; font-size: clamp(2.8rem, 13vw, 4.4rem); }
  .hero-search { grid-template-columns: 1fr; box-shadow: 6px 6px 0 var(--orange); }
  .hero-search .btn { width: 100%; }
  .hero-card { padding: 20px; box-shadow: 7px 7px 0 rgba(228, 87, 15, 0.95); }
  .ledger-total strong { font-size: 3rem; }
  .section { padding: 56px 0; }
  .section-head { flex-direction: column; align-items: start; gap: 10px; }
  .model-grid,
  .code-card-grid,
  .link-grid,
  .field-grid,
  .guide-grid { grid-template-columns: 1fr; }
  .field-grid { gap: 28px; }
  .field-card-media { aspect-ratio: 16 / 9; }
  .model-grid > .model-card:last-child:nth-child(2n+1) { grid-column: auto; }
  .model-card,
  .code-card,
  .link-grid a { border-right: 0; }
  .fact-panel { grid-template-columns: 1fr 1fr; }
  .cta-band { flex-direction: column; align-items: start; padding: 28px 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; padding-top: 36px; }
  .filter-bar { align-items: stretch; }
  .filter-count { align-self: center; }
  .code-cell { min-width: 130px; }
  .decoder-form { flex-direction: column; align-items: stretch; }
  .decoder-form .field { min-width: 0; }
  .manual-tabs {
    top: 64px;
    width: calc(100% - 40px);
  }
  .manual-tabs a { padding: 11px 13px; }
  .article-rail { grid-template-columns: 1fr; }
  .article-body { font-size: 1rem; }
  .article-body > p:first-of-type::first-letter { font-size: 3.6rem; }
  .guide-figure {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .article .guide-figure img {
    width: max(100%, 720px);
    max-width: none;
  }
  .guide-figure figcaption {
    position: sticky;
    left: 0;
    width: calc(100vw - 80px);
    padding-right: 4px;
    background: var(--paper-3);
  }
  .guide-figure figcaption::after {
    content: " Swipe to see the full diagram.";
    color: var(--orange-dark);
    font-family: var(--mono);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
  }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

@media (max-width: 460px) {
  .wrap { padding: 0 16px; }
  .wrap.article,
  .wrap.article.narrow,
  .wrap.narrow {
    width: calc(100% - 32px);
    margin-left: 16px;
  }
  .manual-tabs { width: calc(100% - 32px); }
  .manual-tabs a { padding: 11px 8px; font-size: 0.55rem; letter-spacing: 0.04em; }
  .manual-tabs a span { display: none; }
  .breadcrumbs { padding: 12px 16px 0; }
  .hero h1 { max-width: 10ch; }
  .hero-stamp { flex-direction: column; gap: 7px; }
  .page-head h1 { max-width: 15ch; font-size: 2.3rem; }
  .fact strong { font-size: 2.3rem; }
  .decoder-panel-head { font-size: 0.55rem; }
}

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

@media print {
  .site-header,
  .topline,
  .site-footer,
  .filter-bar,
  .breadcrumbs,
  .cta-band,
  .link-grid,
  .hero-search,
  .hero-stamp,
  .manual-tabs,
  .article-rail { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding: 18px 0; }
  .table-wrap { overflow: visible; border: 1px solid #999; }
  .code-table { font-size: 9pt; }
  a { color: #000; text-decoration: none; }
  .hero { padding: 20px 0; border: 0; background: #fff; color: #000; }
  .hero h1, .hero .lede { color: #000; }
  .hero-card { box-shadow: none; }
}
