:root {
  --paper: #f3eee3;
  --paper-bright: #fbf8f1;
  --paper-deep: #e7ddcd;
  --ink: #24211e;
  --ink-soft: #6f675e;
  --ink-faint: #948b80;
  --red: #9f321f;
  --red-deep: #741f14;
  --red-pale: #ead3c9;
  --brass: #b17a43;
  --night: #211e1a;
  --night-soft: #302a24;
  --line: rgba(66, 55, 46, 0.22);
  --line-strong: rgba(66, 55, 46, 0.42);
  --shadow: 0 20px 60px rgba(42, 30, 20, 0.12);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --sans: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shell: min(1280px, calc(100vw - 64px));
  --header-h: 84px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(88, 68, 50, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 68, 50, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 36px 36px;
  font-family: var(--sans);
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

body.is-menu-open,
body.is-dialog-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(159, 50, 31, 0.36);
  outline-offset: 4px;
}

img {
  max-width: 100%;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 16px;
  padding: 10px 16px;
  color: #fff;
  background: var(--red-deep);
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.scroll-progress {
  position: fixed;
  z-index: 120;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--brass), var(--red));
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 242, 232, 0.92);
  backdrop-filter: blur(18px) saturate(110%);
  transition: box-shadow 280ms ease, background 280ms ease;
}

.site-header.is-scrolled {
  background: rgba(247, 242, 232, 0.965);
  box-shadow: 0 8px 32px rgba(40, 28, 18, 0.09);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(330px, 1.1fr) auto auto;
  align-items: center;
  min-height: var(--header-h);
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.brand-mark {
  display: grid;
  position: relative;
  width: 63px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--red);
  color: var(--red-deep);
  background: rgba(255, 255, 255, 0.38);
  font: 28px/1 var(--serif);
  letter-spacing: -2px;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: "";
  inset: 3px -4px -4px 3px;
  border-right: 1px solid rgba(159, 50, 31, 0.25);
  border-bottom: 1px solid rgba(159, 50, 31, 0.25);
  pointer-events: none;
}

.brand-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.brand-copy strong {
  overflow: hidden;
  font: 700 16px/1.25 var(--serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  color: var(--ink-soft);
  font: 11px/1.3 var(--mono);
  letter-spacing: 0.05em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  position: relative;
  padding-block: 29px 25px;
  color: var(--ink-soft);
  font-size: 14px;
  white-space: nowrap;
  transition: color 180ms ease;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 19px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 280ms var(--ease);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--red-deep);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-status {
  display: flex;
  gap: 8px;
}

.header-status span,
.header-status strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(159, 50, 31, 0.44);
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

.header-status span {
  color: var(--red-deep);
}

.header-status strong {
  border-color: var(--red-deep);
  color: #fff7ef;
  background: var(--red-deep);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 11px 9px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: transparent;
}

.menu-toggle > span:not(.sr-only) {
  display: block;
  height: 1px;
  margin: 5px 0;
  background: currentColor;
  transition: transform 240ms ease, opacity 240ms ease;
}

.hero {
  position: relative;
  overflow: clip;
  border-bottom: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 22% 16%, rgba(255, 255, 255, 0.74), transparent 27%),
    linear-gradient(112deg, rgba(251, 248, 241, 0.93), rgba(232, 220, 201, 0.72));
}

.hero::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(88, 68, 50, 0.06) 50%, transparent 50.1%),
    linear-gradient(transparent 49.9%, rgba(88, 68, 50, 0.05) 50%, transparent 50.1%);
  background-size: 180px 180px;
}

.hero-grid {
  display: grid;
  position: relative;
  z-index: 2;
  grid-template-columns: minmax(420px, 0.86fr) minmax(540px, 1.14fr);
  min-height: min(750px, calc(100vh - var(--header-h)));
  align-items: stretch;
}

.hero-copy {
  display: flex;
  position: relative;
  z-index: 3;
  flex-direction: column;
  justify-content: center;
  padding: 80px 50px 70px 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--red);
  font: 700 11px/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow-gold {
  color: #d5a16d;
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  font: 700 clamp(48px, 5.7vw, 86px)/0.98 var(--serif);
  letter-spacing: -0.055em;
}

.hero h1 span {
  display: block;
  margin-bottom: 18px;
  font-size: 0.71em;
  font-weight: 400;
  letter-spacing: -0.05em;
}

.hero-lead {
  max-width: 590px;
  margin: 30px 0 16px;
  color: var(--ink-soft);
  font: 17px/1.9 var(--serif);
}

.independent-label {
  width: max-content;
  margin: 0 0 32px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  background: rgba(251, 248, 241, 0.58);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 13px 20px;
  border: 1px solid var(--line-strong);
  font-family: var(--serif);
  font-weight: 700;
  transition: color 240ms ease, border-color 240ms ease, background 240ms ease, transform 240ms var(--ease);
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  min-width: 204px;
  border-color: var(--red);
  color: #fffaf2;
  background: var(--red);
}

.button-primary:hover {
  border-color: var(--red-deep);
  background: var(--red-deep);
}

.button-ghost {
  min-width: 190px;
  background: rgba(251, 248, 241, 0.44);
}

.button-ghost:hover {
  border-color: var(--red);
  color: var(--red-deep);
}

.hero-meta {
  display: flex;
  margin: 34px 0 0;
  gap: 26px;
}

.hero-meta div {
  display: grid;
  gap: 2px;
}

.hero-meta dt {
  color: var(--ink-faint);
  font: 10px/1.3 var(--mono);
  letter-spacing: 0.12em;
}

.hero-meta dd {
  margin: 0;
  color: var(--ink-soft);
  font: 12px/1.4 var(--mono);
}

.hero-visual {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: #cdbda7;
  box-shadow: -30px 0 80px rgba(69, 49, 33, 0.11);
  isolation: isolate;
}

.hero-image-layer {
  position: absolute;
  inset: -2%;
  background-image: url("assets/hero-inspection-bench-v1.png");
  background-repeat: no-repeat;
  background-position: 58% center;
  background-size: cover;
  will-change: transform;
}

.hero-image-base {
  z-index: 0;
  filter: saturate(0.82) contrast(1.04);
}

.hero-image-focus {
  z-index: 1;
  clip-path: polygon(54% 0, 100% 0, 100% 100%, 31% 100%);
  filter: saturate(1.04) contrast(1.05);
  transform: scale(1.018);
}

.hero-visual::before {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(243, 238, 227, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(46, 33, 24, 0.02), rgba(46, 33, 24, 0.14));
  mix-blend-mode: multiply;
}

.hero-visual::after {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 52%;
  width: 1px;
  content: "";
  background: rgba(159, 50, 31, 0.48);
  box-shadow: 0 0 0 5px rgba(159, 50, 31, 0.045);
  transform: skewX(-8deg);
}

.hero-drawing-layer {
  position: absolute;
  z-index: 3;
  inset: 0;
  color: rgba(92, 51, 33, 0.6);
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(82, 62, 46, 0.16) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(transparent calc(50% - 0.5px), rgba(82, 62, 46, 0.14) 50%, transparent calc(50% + 0.5px));
  background-size: 140px 140px;
  mix-blend-mode: multiply;
  opacity: 0.68;
}

.drawing-circle {
  position: absolute;
  top: 12%;
  left: 11%;
  width: 132px;
  aspect-ratio: 1;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.drawing-circle::before,
.drawing-circle::after {
  position: absolute;
  content: "";
  border-radius: inherit;
  border: 1px dashed currentColor;
  inset: 11px;
}

.drawing-circle::after {
  inset: 30px;
}

.drawing-cross {
  position: absolute;
  width: 24px;
  height: 24px;
}

.drawing-cross::before,
.drawing-cross::after {
  position: absolute;
  content: "";
  background: currentColor;
}

.drawing-cross::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
}

.drawing-cross::after {
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
}

.drawing-cross-a {
  top: 24%;
  right: 10%;
}

.drawing-cross-b {
  bottom: 17%;
  left: 8%;
}

.drawing-label {
  position: absolute;
  top: 49%;
  left: 5%;
  writing-mode: vertical-rl;
  font: 9px/1 var(--mono);
  letter-spacing: 0.13em;
}

.hero-mask-card {
  position: absolute;
  z-index: 5;
  top: 9%;
  right: 8%;
  display: grid;
  width: 126px;
  aspect-ratio: 1;
  place-content: center;
  border: 1px solid rgba(159, 50, 31, 0.55);
  color: var(--red-deep);
  background: rgba(244, 235, 219, 0.74);
  box-shadow: 0 18px 38px rgba(66, 40, 24, 0.17);
  text-align: center;
  transform: rotate(2deg);
  backdrop-filter: blur(8px);
}

.hero-mask-card::before,
.hero-mask-card::after {
  position: absolute;
  content: "";
  pointer-events: none;
  border: 1px dashed rgba(159, 50, 31, 0.45);
  inset: 7px;
}

.hero-mask-card::after {
  inset: 14px;
}

.hero-mask-card span {
  font: 38px/1 var(--serif);
}

.hero-mask-card small {
  margin-top: 7px;
  font: 10px/1.3 var(--sans);
  letter-spacing: 0.12em;
}

.hero-caption {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid rgba(72, 51, 38, 0.24);
  color: var(--ink-soft);
  background: rgba(249, 244, 235, 0.76);
  backdrop-filter: blur(10px);
  font: 10px/1.3 var(--mono);
  letter-spacing: 0.05em;
}

.revision-track {
  display: grid;
  position: relative;
  z-index: 3;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 34px;
  padding-block: 29px 32px;
}

.revision-year {
  display: grid;
  gap: 2px;
}

.revision-year strong {
  color: var(--red);
  font: 700 24px/1.2 var(--serif);
}

.revision-year span {
  color: var(--ink-faint);
  font-size: 10px;
}

.revision-year-new {
  text-align: right;
}

.revision-line {
  position: relative;
  height: 24px;
}

.revision-line::before,
.revision-line::after {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  content: "";
  border: 2px solid var(--red);
  border-radius: 50%;
  background: var(--paper);
  transform: translateY(-50%);
}

.revision-line::before {
  left: 0;
}

.revision-line::after {
  right: 0;
  border-color: var(--red);
  background: var(--red);
}

.revision-line span {
  position: absolute;
  top: 50%;
  right: 7px;
  left: 7px;
  height: 1px;
  background-image: linear-gradient(90deg, var(--red) 50%, transparent 50%);
  background-size: 8px 1px;
  transform: translateY(-50%);
}

.revision-line span::after {
  position: absolute;
  top: -4px;
  right: -2px;
  content: "";
  border-width: 4.5px 0 4.5px 8px;
  border-style: solid;
  border-color: transparent transparent transparent var(--red);
}

.revision-line em {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  padding: 0 12px;
  color: var(--ink-faint);
  background: var(--paper);
  font: normal 10px/1.4 var(--sans);
  transform: translate(-50%, -50%);
}

.boundary-band {
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--red);
  border-bottom: 1px solid #4a4036;
  color: #f4eadc;
  background:
    radial-gradient(circle at 12% 18%, rgba(177, 122, 67, 0.16), transparent 28%),
    linear-gradient(120deg, #24201c, #2d2822 54%, #201d19);
}

.boundary-blueprint {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background:
    linear-gradient(rgba(230, 194, 145, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 194, 145, 0.2) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, black, transparent 70%);
}

.boundary-grid {
  display: grid;
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(270px, 0.95fr) minmax(570px, 1.55fr) auto;
  align-items: center;
  gap: 42px;
  padding-block: 72px;
}

.boundary-intro h2 {
  margin: 0;
  font: 700 clamp(32px, 3.2vw, 48px)/1.25 var(--serif);
  letter-spacing: -0.04em;
}

.boundary-intro > p:last-child {
  max-width: 440px;
  margin: 20px 0 0;
  color: #bfb3a3;
  font-size: 13px;
}

.boundary-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-left: 1px solid rgba(233, 204, 163, 0.18);
}

.boundary-point {
  min-height: 180px;
  padding: 16px 24px;
  border-right: 1px solid rgba(233, 204, 163, 0.18);
}

.boundary-point > span {
  color: #c99661;
  font: 10px/1.4 var(--mono);
}

.boundary-point h3 {
  margin: 22px 0 8px;
  color: #eed9bd;
  font: 700 16px/1.45 var(--serif);
}

.boundary-point p {
  margin: 0;
  color: #aca093;
  font-size: 12px;
  line-height: 1.8;
}

.button-outline-light {
  min-width: 160px;
  border-color: rgba(225, 192, 146, 0.45);
  color: #f1ddc2;
}

.button-outline-light:hover {
  border-color: #d6a069;
  background: rgba(177, 122, 67, 0.1);
}

.section {
  position: relative;
  padding-block: 105px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.65fr);
  align-items: end;
  gap: 60px;
  margin-bottom: 42px;
}

.section-heading h2,
.method-copy h2,
.checklist-intro h2 {
  margin: 0;
  font: 700 clamp(34px, 4vw, 54px)/1.18 var(--serif);
  letter-spacing: -0.045em;
}

.section-heading > p,
.method-copy > p,
.checklist-intro > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.9;
}

.chains-section {
  background: rgba(251, 248, 241, 0.48);
}

.chain-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.chain-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.52), transparent 58%),
    rgba(246, 240, 230, 0.72);
  cursor: pointer;
  text-align: left;
  transition: border-color 260ms ease, transform 320ms var(--ease), box-shadow 320ms var(--ease);
}

.chain-card::before {
  position: absolute;
  top: 0;
  right: 100%;
  width: 100%;
  height: 3px;
  content: "";
  background: var(--red);
  transition: transform 460ms var(--ease);
}

.chain-card::after {
  position: absolute;
  right: -42px;
  bottom: -56px;
  width: 150px;
  aspect-ratio: 1;
  content: "";
  border: 1px solid rgba(159, 50, 31, 0.13);
  border-radius: 50%;
  box-shadow: inset 0 0 0 20px rgba(159, 50, 31, 0.025), inset 0 0 0 40px rgba(159, 50, 31, 0.022);
  transition: transform 480ms var(--ease);
}

.chain-card:hover {
  z-index: 1;
  border-color: rgba(159, 50, 31, 0.55);
  box-shadow: var(--shadow);
  transform: translateY(-7px);
}

.chain-card:hover::before {
  transform: translateX(100%);
}

.chain-card:hover::after {
  transform: scale(1.14) rotate(8deg);
}

.chain-card-no {
  color: var(--red);
  font: 12px/1.3 var(--mono);
}

.chain-card h3 {
  margin: 62px 0 10px;
  font: 700 26px/1.25 var(--serif);
}

.chain-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.chain-card footer {
  display: flex;
  position: absolute;
  right: 22px;
  bottom: 18px;
  left: 22px;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font: 11px/1.3 var(--mono);
}

.chain-card footer strong {
  color: var(--red-deep);
}

.changes-section {
  border-top: 1px solid var(--line);
}

.change-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 20px;
  align-items: center;
  padding: 18px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 241, 0.52);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-row-secondary {
  grid-column: 1;
}

.filter-chip {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  font-size: 12px;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.filter-chip:hover {
  border-color: var(--red);
  color: var(--red-deep);
}

.filter-chip.is-active {
  border-color: var(--red);
  color: #fff9f0;
  background: var(--red);
}

.change-search {
  display: flex;
  grid-column: 2;
  grid-row: 1 / span 2;
  width: min(360px, 30vw);
  align-items: center;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.24);
}

.change-search input {
  width: 100%;
  min-width: 0;
  padding: 13px 4px 12px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
}

.change-search input::placeholder {
  color: var(--ink-faint);
}

.change-search > span {
  padding: 0 10px;
  color: var(--red);
  font-size: 22px;
}

.change-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 12px;
  color: var(--ink-faint);
  font-size: 12px;
}

.change-summary > span {
  color: var(--red);
  font: 700 18px/1 var(--serif);
}

.change-summary button,
.text-button {
  margin-left: auto;
  padding: 2px;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--red-deep);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.change-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line);
}

.change-card {
  display: flex;
  position: relative;
  min-height: 292px;
  flex-direction: column;
  padding: 18px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: rgba(250, 246, 238, 0.48);
  cursor: pointer;
  text-align: left;
  transition: background 220ms ease;
}

.change-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  content: "";
  border-bottom: 34px solid rgba(159, 50, 31, 0.12);
  border-left: 34px solid transparent;
  transition: border-width 280ms var(--ease);
}

.change-card:hover {
  background: rgba(255, 252, 246, 0.95);
}

.change-card:hover::after {
  border-bottom-width: 48px;
  border-left-width: 48px;
}

.change-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.change-no {
  color: var(--ink-faint);
  font: 11px/1.3 var(--mono);
}

.change-type {
  padding: 3px 7px;
  border: 1px solid var(--line);
  color: var(--red-deep);
  font-size: 10px;
  line-height: 1.3;
}

.change-type.type-added {
  border-color: rgba(177, 122, 67, 0.58);
  color: #7a4d20;
  background: rgba(177, 122, 67, 0.08);
}

.change-card h3 {
  margin: 34px 0 12px;
  font: 700 20px/1.4 var(--serif);
}

.change-card p {
  display: -webkit-box;
  margin: 0 0 18px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.82;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.change-card footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 10px;
}

.change-card footer strong {
  color: var(--red);
  font-weight: 500;
}

.empty-state {
  padding: 68px 20px;
  border: 1px solid var(--line);
  text-align: center;
}

.empty-state strong {
  font: 700 22px/1.4 var(--serif);
}

.empty-state p {
  color: var(--ink-soft);
  font-size: 13px;
}

.method-section {
  border-top: 1px solid var(--line);
  color: #eee2d3;
  background:
    linear-gradient(rgba(206, 158, 101, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(206, 158, 101, 0.055) 1px, transparent 1px),
    var(--night);
  background-size: 48px 48px;
}

.method-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.7fr) minmax(600px, 1.3fr);
  align-items: start;
  gap: 70px;
}

.method-copy {
  position: sticky;
  top: calc(var(--header-h) + 48px);
}

.method-copy > p {
  margin-top: 24px;
  color: #aaa094;
}

.method-note {
  display: grid;
  margin-top: 42px;
  padding: 18px 0;
  border-top: 1px solid rgba(221, 186, 139, 0.26);
  border-bottom: 1px solid rgba(221, 186, 139, 0.26);
  gap: 6px;
}

.method-note span {
  color: #cb9662;
  font: 10px/1.4 var(--mono);
  letter-spacing: 0.1em;
}

.method-note strong {
  color: #f1d9bc;
  font: 700 21px/1.5 var(--serif);
}

.method-stage {
  position: relative;
  padding: 28px;
  border: 1px solid rgba(221, 186, 139, 0.28);
  background: rgba(25, 23, 20, 0.66);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.2);
}

.method-stage::before {
  position: absolute;
  inset: 8px;
  content: "";
  pointer-events: none;
  border: 1px dashed rgba(221, 186, 139, 0.13);
}

.method-stage-head {
  display: flex;
  position: relative;
  z-index: 1;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(221, 186, 139, 0.2);
}

.method-stage-head span {
  color: #c88f56;
  font: 10px/1.3 var(--mono);
  letter-spacing: 0.12em;
}

.method-stage-head em {
  color: #8f867c;
  font-size: 11px;
  font-style: normal;
}

.method-question {
  display: grid;
  position: relative;
  z-index: 2;
  grid-template-columns: 40px minmax(190px, 0.88fr) minmax(170px, 0.72fr);
  align-items: center;
  margin: 28px 0 20px;
  padding: 18px 20px;
  border: 1px solid rgba(221, 186, 139, 0.28);
  background: linear-gradient(90deg, rgba(199, 145, 89, 0.12), rgba(42, 37, 31, 0.12));
  gap: 18px;
}

.method-question > span {
  color: #d5a06c;
  font: 12px/1.2 var(--mono);
}

.method-question small {
  display: block;
  margin-bottom: 3px;
  color: #bdb1a4;
  font-size: 10px;
}

.method-question strong {
  color: #f0d6b6;
  font: 700 19px/1.45 var(--serif);
}

.method-question p {
  margin: 0;
  padding-left: 18px;
  border-left: 1px solid rgba(221, 186, 139, 0.22);
  color: #a99d90;
  font-size: 11px;
  line-height: 1.8;
}

.method-node {
  position: relative;
  z-index: 2;
  margin: 38px auto 58px;
  width: min(390px, 86%);
  padding: 20px;
  border: 1px solid rgba(209, 163, 107, 0.55);
  background: #29251f;
  text-align: center;
}

.method-node small {
  display: block;
  margin-bottom: 4px;
  color: #bdb1a4;
  font-size: 11px;
}

.method-node strong {
  color: #f0d6b6;
  font: 700 17px/1.5 var(--serif);
}

.method-branches {
  display: grid;
  position: relative;
  z-index: 2;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.method-branches::before {
  position: absolute;
  z-index: -1;
  top: -20px;
  right: 25%;
  left: 25%;
  height: 20px;
  content: "";
  border-top: 1px solid rgba(221, 186, 139, 0.34);
  border-right: 1px solid rgba(221, 186, 139, 0.34);
  border-left: 1px solid rgba(221, 186, 139, 0.34);
}

.method-card {
  min-height: 234px;
  padding: 22px;
  border: 1px solid rgba(221, 186, 139, 0.25);
  background: rgba(53, 47, 40, 0.66);
}

.method-card > span {
  color: #c99a69;
  font: 10px/1.4 var(--mono);
}

.method-card h3 {
  margin: 28px 0 12px;
  color: #f1dfc8;
  font: 700 25px/1.3 var(--serif);
}

.method-card p {
  margin: 0;
  color: #c5b6a6;
  font-size: 13px;
}

.method-card ul {
  display: grid;
  margin: 22px 0 0;
  padding: 15px 0 0;
  border-top: 1px solid rgba(221, 186, 139, 0.18);
  color: #a69b8f;
  font-size: 11px;
  line-height: 1.7;
  gap: 8px;
  list-style: none;
}

.method-card li {
  position: relative;
  padding-left: 14px;
}

.method-card li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 5px;
  height: 5px;
  content: "";
  border-radius: 50%;
  background: #c99661;
}

.method-card-instrument {
  border-color: rgba(159, 50, 31, 0.68);
  background: linear-gradient(145deg, rgba(116, 31, 20, 0.34), rgba(53, 47, 40, 0.7));
}

.method-warning {
  display: flex;
  position: relative;
  z-index: 2;
  align-items: center;
  margin-top: 22px;
  padding: 16px;
  border-left: 3px solid var(--red);
  background: rgba(116, 31, 20, 0.2);
  gap: 14px;
}

.method-warning > span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #c97760;
  border-radius: 50%;
  color: #f0b39e;
  font-family: var(--serif);
}

.method-warning p {
  margin: 0;
  color: #ab9d91;
  font-size: 12px;
}

.method-warning strong {
  color: #e9c9bc;
}

.workflow-section {
  background: rgba(251, 248, 241, 0.56);
}

.workflow-layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.7fr) minmax(500px, 1.3fr);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.workflow-tabs {
  border-right: 1px solid var(--line-strong);
}

.workflow-tab {
  display: grid;
  position: relative;
  width: 100%;
  min-height: 72px;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  padding: 12px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color 180ms ease, background 180ms ease;
}

.workflow-tab::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  content: "";
  background: var(--red);
  transform: scaleY(0);
  transition: transform 240ms var(--ease);
}

.workflow-tab:hover,
.workflow-tab[aria-selected="true"] {
  color: var(--red-deep);
  background: rgba(159, 50, 31, 0.05);
}

.workflow-tab[aria-selected="true"]::before {
  transform: scaleY(1);
}

.workflow-tab span {
  color: var(--ink-faint);
  font: 10px/1.2 var(--mono);
}

.workflow-tab strong {
  font: 700 16px/1.4 var(--serif);
}

.workflow-tab em {
  font-style: normal;
}

.workflow-panel {
  min-height: 430px;
  padding: 44px 52px;
  background:
    radial-gradient(circle at 82% 20%, rgba(159, 50, 31, 0.06), transparent 28%),
    rgba(255, 255, 255, 0.22);
}

.workflow-panel-kicker {
  color: var(--red);
  font: 10px/1.4 var(--mono);
  letter-spacing: 0.12em;
}

.workflow-panel h3 {
  max-width: 650px;
  margin: 32px 0 28px;
  font: 700 clamp(26px, 3vw, 38px)/1.35 var(--serif);
}

.workflow-checks {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-checks li {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  min-height: 64px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

.workflow-checks li::before {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(159, 50, 31, 0.45);
  color: var(--red);
  content: "✓";
  font-size: 11px;
}

.workflow-panel-note {
  margin-top: 28px;
  padding: 12px 16px;
  border-left: 2px solid var(--brass);
  color: var(--ink-faint);
  background: rgba(177, 122, 67, 0.06);
  font-size: 11px;
}

.checklist-section {
  border-top: 1px solid var(--line);
}

.checklist-layout {
  display: grid;
  grid-template-columns: minmax(310px, 0.74fr) minmax(600px, 1.26fr);
  gap: 70px;
}

.checklist-intro {
  padding-right: 24px;
}

.checklist-intro > p {
  margin-top: 24px;
}

.checklist-meter {
  margin-top: 36px;
}

.checklist-meter > span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.checklist-meter strong {
  color: var(--red);
  font: 700 23px/1 var(--serif);
}

.checklist-meter > div {
  height: 4px;
  overflow: hidden;
  background: rgba(66, 55, 46, 0.12);
}

.checklist-meter i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--brass), var(--red));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 360ms var(--ease);
}

.checklist-intro .text-button {
  margin-top: 20px;
  margin-left: 0;
}

.checklist-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line);
}

.checklist-card {
  display: flex;
  min-height: 174px;
  flex-direction: column;
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(250, 246, 238, 0.55);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.checklist-card:hover {
  z-index: 1;
  background: rgba(255, 252, 246, 0.94);
  box-shadow: 0 14px 28px rgba(55, 37, 23, 0.07);
}

.checklist-card.is-complete {
  background: rgba(159, 50, 31, 0.055);
}

.checklist-card-no {
  color: var(--red);
  font: 10px/1.4 var(--mono);
}

.checklist-card h3 {
  margin: 17px 0 8px;
  font: 700 20px/1.4 var(--serif);
}

.checklist-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.75;
}

.checklist-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  gap: 12px;
}

.checklist-card footer > span {
  color: var(--ink-faint);
  font-size: 10px;
}

.checklist-card footer button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--red-deep);
  background: transparent;
  cursor: pointer;
  font: 700 11px/1.5 var(--serif);
}

.checklist-items label {
  display: grid;
  position: relative;
  min-height: 150px;
  grid-template-columns: 30px 1fr;
  align-items: start;
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(250, 246, 238, 0.55);
  cursor: pointer;
  gap: 14px;
  transition: background 180ms ease;
}

.checklist-items label:hover {
  background: rgba(255, 252, 246, 0.9);
}

.checklist-items input {
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  border: 1px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
}

.checklist-items input:checked {
  border-color: var(--red);
  background:
    linear-gradient(135deg, transparent 43%, #fff 43% 51%, transparent 51%) -2px 0 / 10px 16px no-repeat,
    linear-gradient(45deg, transparent 42%, #fff 42% 50%, transparent 50%) 8px 1px / 14px 16px no-repeat,
    var(--red);
}

.checklist-items label:has(input:checked) {
  background: rgba(159, 50, 31, 0.055);
}

.checklist-items span {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.85;
}

.checklist-items strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font: 700 18px/1.4 var(--serif);
}

.sources-section {
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.source-card {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  padding: 28px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: rgba(251, 248, 241, 0.34);
  transition: color 220ms ease, background 220ms ease;
}

a.source-card:hover {
  color: var(--red-deep);
  background: rgba(251, 248, 241, 0.75);
}

.source-card > span {
  color: var(--red);
  font: 10px/1.4 var(--mono);
}

.source-card h3 {
  margin: 52px 0 14px;
  font: 700 23px/1.4 var(--serif);
}

.source-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.8;
}

.source-card strong {
  margin-top: auto;
  padding-top: 28px;
  font-size: 12px;
}

.source-card-note {
  color: #eee2d2;
  background: var(--night-soft);
}

.source-card-note p {
  color: #aaa096;
}

.source-card-note > span,
.source-card-note strong {
  color: #d39b63;
}

.source-card-current {
  color: #f4e6d4;
  background: linear-gradient(145deg, #312821, #251f1a);
}

.source-card-current > span,
.source-card-current strong {
  color: #d39b63;
}

.source-card-current p {
  color: #b8aa9a;
}

.site-footer {
  padding-block: 38px;
  color: #c2b6a8;
  background: #1c1916;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(420px, 1.3fr) auto;
  align-items: end;
  gap: 42px;
}

.footer-grid strong {
  color: #eee0d1;
  font: 700 17px/1.4 var(--serif);
}

.footer-grid p {
  margin: 5px 0 0;
  color: #8e857c;
  font-size: 11px;
}

.footer-grid a {
  border-bottom: 1px solid #8c7763;
  color: #d4b18c;
  font-size: 12px;
}

.change-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  padding: 0;
  overflow: visible;
  border: 0;
  color: var(--ink);
  background: transparent;
}

.change-dialog::backdrop {
  background: rgba(27, 23, 19, 0.72);
  backdrop-filter: blur(8px);
}

.dialog-frame {
  position: relative;
  max-height: min(820px, calc(100vh - 32px));
  padding: 44px;
  overflow: auto;
  border-top: 3px solid var(--red);
  background:
    linear-gradient(rgba(88, 68, 50, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 68, 50, 0.035) 1px, transparent 1px),
    var(--paper-bright);
  background-size: 32px 32px;
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.32);
}

.dialog-close {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(251, 248, 241, 0.86);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.dialog-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--red);
  font: 10px/1.4 var(--mono);
  letter-spacing: 0.1em;
}

.dialog-type {
  padding: 3px 7px;
  border: 1px solid rgba(159, 50, 31, 0.4);
  font-family: var(--sans);
  letter-spacing: 0;
}

.change-dialog h2 {
  max-width: 600px;
  margin: 28px 0;
  font: 700 clamp(30px, 5vw, 45px)/1.22 var(--serif);
  letter-spacing: -0.035em;
}

.dialog-compare {
  display: grid;
  grid-template-columns: 1fr 36px 1fr;
  align-items: stretch;
  margin: 28px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.dialog-ref {
  padding: 18px 0;
}

.dialog-ref span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-faint);
  font-size: 10px;
}

.dialog-ref strong {
  font: 700 15px/1.5 var(--serif);
}

.dialog-arrow {
  display: grid;
  place-items: center;
  color: var(--red);
}

.dialog-summary {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 2;
}

.dialog-action {
  margin-top: 28px;
  padding: 20px;
  border-left: 3px solid var(--red);
  background: rgba(159, 50, 31, 0.055);
}

.dialog-action span {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font: 10px/1.4 var(--mono);
  letter-spacing: 0.1em;
}

.dialog-action p {
  margin: 0;
  font-size: 13px;
}

.dialog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 26px;
}

.dialog-tags span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10px;
}

.dialog-boundary {
  margin-top: 26px;
  color: var(--ink-faint);
  font-size: 10px;
}

.dialog-official-links {
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: rgba(177, 122, 67, 0.055);
}

.dialog-official-links > span,
.package-block > span {
  display: block;
  margin-bottom: 9px;
  color: var(--red);
  font: 10px/1.4 var(--mono);
  letter-spacing: 0.1em;
}

.dialog-official-links > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dialog-official-links a {
  padding: 8px 10px;
  border: 1px solid rgba(159, 50, 31, 0.42);
  color: var(--red-deep);
  font-size: 11px;
  transition: color 180ms ease, background 180ms ease;
}

.dialog-official-links a:hover {
  color: #fff;
  background: var(--red);
}

.dialog-change-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 24px;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line);
}

.dialog-change-nav button,
.dialog-nav-placeholder {
  display: grid;
  min-height: 76px;
  padding: 13px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 241, 0.58);
  text-align: left;
}

.dialog-change-nav button {
  cursor: pointer;
  transition: background 180ms ease;
}

.dialog-change-nav button:hover {
  background: rgba(159, 50, 31, 0.06);
}

.dialog-change-nav span {
  color: var(--ink-faint);
  font-size: 10px;
}

.dialog-change-nav strong {
  margin-top: 3px;
  color: var(--ink);
  font: 700 14px/1.35 var(--serif);
}

.dialog-nav-placeholder {
  align-content: center;
  color: var(--ink-faint);
  font-size: 11px;
}

.dialog-nav-placeholder-end {
  text-align: right;
}

.package-block {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  background: rgba(250, 246, 238, 0.62);
}

.package-block ul {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 10px;
  list-style: none;
}

.package-block li {
  position: relative;
  padding-left: 16px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.package-block li::before {
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 50%;
  background: var(--brass);
}

.package-checks {
  display: grid;
  gap: 0;
}

.package-checks label {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: start;
  min-height: 48px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
  gap: 10px;
}

.package-checks label:first-of-type {
  border-top: 0;
}

.package-checks input {
  position: absolute;
  opacity: 0;
}

.package-checks i {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--paper-bright);
}

.package-checks input:checked + i {
  border-color: var(--red);
  background: var(--red);
}

.package-checks input:checked + i::after {
  content: "✓";
  color: #fff;
  font-size: 11px;
}

.package-checks b {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.7;
}

.package-change-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.package-change-links button {
  padding: 7px 9px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--paper-bright);
  cursor: pointer;
  font-size: 11px;
  transition: border-color 180ms ease, color 180ms ease;
}

.package-change-links button:hover {
  border-color: var(--red);
  color: var(--red-deep);
}

.change-dialog[open] .dialog-frame {
  animation: dialog-in 420ms var(--ease) both;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(24px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.chain-card.reveal:nth-child(2),
.change-card.reveal:nth-child(4n + 2),
.source-card.reveal:nth-child(2) {
  transition-delay: 45ms;
}

.chain-card.reveal:nth-child(3),
.change-card.reveal:nth-child(4n + 3),
.source-card.reveal:nth-child(3) {
  transition-delay: 90ms;
}

.chain-card.reveal:nth-child(4),
.change-card.reveal:nth-child(4n + 4) {
  transition-delay: 135ms;
}

@media (max-width: 1220px) {
  :root {
    --shell: min(1120px, calc(100vw - 48px));
    --header-h: 104px;
  }

  .header-inner {
    grid-template-columns: minmax(250px, 1fr) auto;
  }

  .site-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: center;
    margin-top: -18px;
  }

  .site-nav a {
    padding-block: 9px 15px;
  }

  .site-nav a::after {
    bottom: 9px;
  }

  .header-status {
    justify-self: end;
  }

  .hero-grid {
    grid-template-columns: minmax(370px, 0.82fr) minmax(470px, 1.18fr);
    min-height: 680px;
  }

  .hero-copy {
    padding-right: 34px;
  }

  .boundary-grid {
    grid-template-columns: 0.9fr 1.6fr;
  }

  .button-outline-light {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .change-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .method-layout {
    grid-template-columns: minmax(290px, 0.66fr) minmax(520px, 1.34fr);
    gap: 44px;
  }
}

@media (max-width: 900px) {
  :root {
    --shell: calc(100vw - 40px);
    --header-h: 72px;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    min-height: var(--header-h);
    gap: 16px;
  }

  .brand-mark {
    width: 54px;
    height: 38px;
    font-size: 24px;
  }

  .menu-toggle {
    display: block;
  }

  .header-status {
    display: none;
  }

  .site-nav {
    position: fixed;
    z-index: -1;
    top: var(--header-h);
    right: 0;
    left: 0;
    display: grid;
    grid-column: auto;
    margin: 0;
    padding: 18px 20px 28px;
    border-bottom: 1px solid var(--line-strong);
    background: rgba(247, 242, 232, 0.98);
    box-shadow: 0 24px 40px rgba(44, 31, 21, 0.12);
    gap: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 220ms ease, transform 220ms var(--ease);
  }

  .site-nav a {
    padding: 14px 6px;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a::after {
    display: none;
  }

  .site-nav.is-open {
    z-index: 98;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .menu-toggle[aria-expanded="true"] > span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] > span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] > span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 28px;
  }

  .hero-copy {
    padding: 56px 0 44px;
  }

  .hero h1 {
    max-width: 730px;
  }

  .hero-visual {
    min-height: min(66vw, 590px);
    border: 1px solid var(--line-strong);
  }

  .revision-track {
    padding-inline: 4px;
  }

  .boundary-grid {
    grid-template-columns: 1fr;
    padding-block: 64px;
  }

  .boundary-points {
    border-top: 1px solid rgba(233, 204, 163, 0.18);
  }

  .button-outline-light {
    grid-column: auto;
    justify-self: start;
  }

  .section {
    padding-block: 84px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .section-heading > p {
    max-width: 620px;
  }

  .chain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .change-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-layout,
  .checklist-layout {
    grid-template-columns: 1fr;
  }

  .method-copy {
    position: static;
  }

  .workflow-layout {
    grid-template-columns: 1fr;
  }

  .workflow-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
    scrollbar-width: thin;
  }

  .workflow-tab {
    grid-template-columns: 28px 1fr;
    border-right: 1px solid var(--line);
  }

  .workflow-tab em {
    display: none;
  }

  .source-grid {
    grid-template-columns: 1fr;
  }

  .source-card {
    min-height: 230px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 20px;
  }

  .footer-grid a {
    width: max-content;
  }
}

@media (max-width: 620px) {
  :root {
    --shell: calc(100vw - 28px);
    --header-h: 66px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 48px;
    height: 34px;
    font-size: 21px;
  }

  .brand-copy strong {
    max-width: 210px;
    font-size: 13px;
  }

  .brand-copy small {
    font-size: 9px;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
  }

  .hero-grid {
    padding-top: 0;
  }

  .hero-copy {
    padding: 42px 0 30px;
  }

  .hero h1 {
    font-size: clamp(39px, 12vw, 54px);
    line-height: 1.06;
  }

  .hero h1 span {
    margin-bottom: 12px;
    font-size: 0.62em;
  }

  .hero-lead {
    margin-top: 22px;
    font-size: 14px;
    line-height: 1.85;
  }

  .independent-label {
    margin-bottom: 22px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .hero-meta div:last-child {
    grid-column: 1 / -1;
  }

  .hero-visual {
    min-height: 410px;
    margin-inline: -14px;
    border-right: 0;
    border-left: 0;
  }

  .hero-image-layer {
    background-position: 65% center;
  }

  .hero-image-focus {
    clip-path: polygon(51% 0, 100% 0, 100% 100%, 25% 100%);
  }

  .hero-mask-card {
    top: 16px;
    right: 14px;
    width: 92px;
  }

  .hero-mask-card span {
    font-size: 28px;
  }

  .drawing-circle {
    width: 90px;
  }

  .hero-caption {
    font-size: 8px;
  }

  .revision-track {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding-block: 21px;
  }

  .revision-year strong {
    font-size: 17px;
  }

  .revision-year span {
    display: none;
  }

  .revision-line em {
    display: none;
  }

  .boundary-grid {
    gap: 30px;
    padding-block: 52px;
  }

  .boundary-intro h2 {
    font-size: 31px;
  }

  .boundary-points {
    grid-template-columns: 1fr;
    border-left: 0;
  }

  .boundary-point {
    min-height: auto;
    padding: 18px 4px;
    border-right: 0;
    border-bottom: 1px solid rgba(233, 204, 163, 0.18);
  }

  .boundary-point h3 {
    margin-top: 10px;
  }

  .section {
    padding-block: 66px;
  }

  .section-heading h2,
  .method-copy h2,
  .checklist-intro h2 {
    font-size: 34px;
  }

  .chain-grid {
    grid-template-columns: 1fr;
  }

  .chain-card {
    min-height: 210px;
  }

  .chain-card h3 {
    margin-top: 38px;
  }

  .change-tools {
    grid-template-columns: 1fr;
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .filter-chip {
    flex: 0 0 auto;
  }

  .filter-row-secondary {
    grid-column: 1;
  }

  .change-search {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
  }

  .change-grid {
    grid-template-columns: 1fr;
  }

  .change-card {
    min-height: 244px;
  }

  .method-stage {
    margin-inline: -14px;
    padding: 20px 14px;
  }

  .method-node {
    margin-bottom: 40px;
    width: 94%;
  }

  .method-question {
    grid-template-columns: 30px 1fr;
    padding: 16px;
    gap: 12px;
  }

  .method-question p {
    grid-column: 2;
    padding: 10px 0 0;
    border-top: 1px solid rgba(221, 186, 139, 0.18);
    border-left: 0;
  }

  .method-branches::before {
    display: none;
  }

  .method-branches {
    grid-template-columns: 1fr;
  }

  .method-card {
    min-height: 0;
  }

  .workflow-layout {
    margin-inline: -14px;
  }

  .workflow-panel {
    min-height: 440px;
    padding: 32px 20px;
  }

  .checklist-layout {
    gap: 44px;
  }

  .checklist-intro {
    padding-right: 0;
  }

  .checklist-items {
    grid-template-columns: 1fr;
  }

  .checklist-items label {
    min-height: 126px;
    padding: 20px;
  }

  .checklist-card {
    min-height: 160px;
    padding: 20px;
  }

  .source-card {
    min-height: 245px;
    padding: 24px;
  }

  .source-card h3 {
    margin-top: 38px;
  }

  .dialog-frame {
    padding: 40px 22px 26px;
  }

  .dialog-compare {
    grid-template-columns: 1fr;
  }

  .dialog-change-nav {
    grid-template-columns: 1fr;
  }

  .dialog-nav-placeholder-end {
    text-align: left;
  }

  .dialog-arrow {
    justify-content: start;
    height: 28px;
    transform: rotate(90deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-image-layer {
    transform: none !important;
  }
}
