/* Colorado Tort Law: site styles
   Palette from the logo: slate ink #1F2A2E and red-rock #A8442B. Everything else is a derived shade.
   Type: Newsreader (display, reading), IBM Plex Sans (interface), IBM Plex Mono (citations, numbers). */

@font-face { font-family: "Newsreader"; src: url(/assets/fonts/newsreader-var.woff2) format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(/assets/fonts/newsreader-italic-var.woff2) format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/assets/fonts/plexsans-var.woff2) format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/assets/fonts/plexmono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/assets/fonts/plexmono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ink: #1F2A2E;          /* logo slate */
  --ink-2: #2B383D;
  --ink-deep: #141B1E;
  --rock: #A8442B;         /* logo red-rock */
  --rock-deep: #8F3722;    /* text-safe on paper (6.7:1) */
  --rock-light: #D9876F;   /* text-safe on ink (5.35:1) */
  --paper: #F4EFE6;
  --paper-2: #EAE3D6;
  --paper-3: #DFD6C5;
  --line: #CFC4B1;
  --muted: #5A6366;        /* 5.37:1 on paper */
  --mist: #B7C0C2;         /* 7.9:1 on ink */
  --white: #FFFFFF;

  --f-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --f-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --wrap: 1240px;
  --mast-h: 76px;
  --dock-h: 0px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--mast-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--f-ui);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  padding-bottom: var(--dock-h);
  top: 0 !important; /* Google Translate pushes body down; keep it put */
}
img, video, svg { display: block; max-width: 100%; }
picture { display: block; }
a { color: var(--rock-deep); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--rock); outline-offset: 3px; border-radius: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 16px; }
.skip:focus { top: 12px; }
main { display: block; }
main:focus { outline: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

.eyebrow {
  font: 500 .75rem/1.3 var(--f-mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--rock-deep); margin: 0 0 .9rem; display: flex; align-items: center; gap: .7rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.on-dark .eyebrow, .eyebrow--light { color: var(--rock-light); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: 0 1.4rem; border: 1px solid transparent; border-radius: 2px;
  font: 500 .95rem/1 var(--f-ui); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn--rock { background: var(--rock); color: var(--white); }
.btn--rock:hover { background: var(--rock-deep); color: var(--white); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--ink-deep); color: var(--paper); }
.btn--ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.on-dark .btn--ghost { color: var(--paper); }
.on-dark .btn--ghost:hover { background: var(--paper); color: var(--ink); }
.link-arrow { font: 500 .92rem/1.4 var(--f-ui); text-decoration: none; color: var(--rock-deep); display: inline-flex; gap: .5rem; align-items: center; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link-arrow::after { content: "\2192"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }
.on-dark .link-arrow { color: var(--rock-light); }

/* ---------- Masthead ---------- */
.mast { position: sticky; top: 0; z-index: 60; background: rgba(244, 239, 230, .96); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line); }
.mast__in { max-width: 1400px; margin: 0 auto; padding: 0 var(--gutter); height: var(--mast-h); display: flex; align-items: center; gap: clamp(12px, 2vw, 32px); }
.mast__logo { flex: 0 0 auto; display: block; }
.mast__logo img { height: 34px; width: auto; }
.nav { margin-left: auto; }
.nav__list { list-style: none; display: flex; align-items: center; gap: clamp(4px, 1.2vw, 18px); }
.nav__a, .nav__btn {
  display: inline-flex; align-items: center; gap: .35rem; height: 44px; padding: 0 .6rem; background: none; border: 0; cursor: pointer;
  font: 500 .94rem/1 var(--f-ui); color: var(--ink); text-decoration: none; position: relative;
}
.nav__a::after, .nav__btn::after { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: 8px; height: 1px; background: var(--rock); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav__a:hover::after, .nav__a[aria-current]::after, .nav__btn[aria-expanded="true"]::after, .nav__btn:hover::after { transform: scaleX(1); }
.nav__btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .25s var(--ease); }
.nav__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.mast__cta { flex: 0 0 auto; }

/* Mega menu */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 30px 60px -40px rgba(20, 27, 30, .45); }
.mega:not([hidden]) { animation: megaIn .28s var(--ease) both; }
@keyframes megaIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.mega__in { max-width: 1400px; margin: 0 auto; padding: 32px var(--gutter) 36px; display: grid; grid-template-columns: 16rem minmax(0, 1fr) 15rem; gap: 40px; align-items: stretch; }
.mega__lede { font: 400 1.35rem/1.3 var(--f-display); margin-bottom: 1.2rem; }
.mega__list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.mega__list li { border-bottom: 1px solid var(--line); }
.mega__list li:nth-child(odd) { border-right: 1px solid var(--line); }
.mega__list a { display: grid; grid-template-columns: 2.2rem 1fr; grid-template-rows: auto auto; column-gap: .4rem; padding: 14px 16px; min-height: 88px; text-decoration: none; color: var(--ink); transition: background .2s; }
.mega__list a:hover, .mega__list a[aria-current] { background: var(--paper-2); }
.mega__n { grid-row: 1 / 3; font: 500 .78rem/1.6 var(--f-mono); color: var(--rock-deep); }
.mega__t { font: 500 1.02rem/1.3 var(--f-ui); }
.mega__d { font-size: .86rem; line-height: 1.4; color: var(--muted); }
.mega__fig { margin: 0; overflow: hidden; }
.mega__fig img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8); }

/* Language control (styled; Google's widget stays hidden) */
.lang { position: relative; flex: 0 0 auto; }
.lang__btn { display: inline-flex; align-items: center; gap: .45rem; height: 44px; padding: 0 .8rem; border: 1px solid var(--line); background: transparent; border-radius: 2px; cursor: pointer; font: 500 .86rem/1 var(--f-ui); }
.lang__btn:hover { border-color: var(--ink); }
.lang__btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.lang__menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 12rem; list-style: none; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 20px 40px -24px rgba(20, 27, 30, .5); padding: 6px; z-index: 70; }
.lang__menu button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; cursor: pointer; font-size: .95rem; border-radius: 2px; }
.lang__menu button:hover, .lang__menu button[aria-current="true"] { background: var(--paper-2); }
.lang__menu button[aria-current="true"]::after { content: " \2713"; color: var(--rock-deep); }
.gt-host { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
/* Google Translate overrides */
.goog-te-banner-frame, iframe.skiptranslate, .skiptranslate > iframe, #goog-gt-tt, .goog-te-balloon-frame, .goog-tooltip, .VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; visibility: hidden !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
font[style] { background: transparent !important; box-shadow: none !important; }
html.translated-ltr body, html.translated-rtl body { top: 0 !important; }
html.translated-rtl .mast__in { direction: ltr; }

/* Mobile menu sheet */
.menu-btn { display: none; width: 48px; height: 48px; border: 1px solid var(--line); background: transparent; border-radius: 2px; cursor: pointer; position: relative; }
.menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after { position: absolute; left: 13px; width: 20px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s; }
.menu-btn__bars { top: 23px; }
.menu-btn__bars::before { content: ""; left: 0; top: -6px; }
.menu-btn__bars::after { content: ""; left: 0; top: 6px; }
.menu-btn[aria-expanded="true"] .menu-btn__bars { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars::after { transform: translateY(-6px) rotate(-45deg); }
.sheet { position: fixed; inset: var(--mast-h) 0 0 0; z-index: 55; background: var(--paper); overflow-y: auto; padding: 24px var(--gutter) calc(110px + env(safe-area-inset-bottom)); }
.sheet:not([hidden]) { animation: sheetIn .3s var(--ease) both; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.sheet__list { list-style: none; counter-reset: s; }
.sheet__list a { display: flex; align-items: baseline; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font: 400 1.5rem/1.2 var(--f-display); }
.sheet__list a::before { counter-increment: s; content: counter(s, decimal-leading-zero); font: 500 .75rem/1 var(--f-mono); color: var(--rock-deep); }

/* Disclaimer strip (section 11) */
.notice { background: var(--ink); color: #E9E4DA; }
.notice p { max-width: 1400px; margin: 0 auto; padding: 10px var(--gutter); font-size: .8rem; line-height: 1.5; }
.notice strong { color: var(--white); font-weight: 600; }

/* Mobile dock */
.dock { display: none; }

/* ---------- Home: pinned hero zoom handover ---------- */
.run { position: relative; isolation: isolate; background: var(--ink-deep); color: var(--paper); }
.run__track { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.run__photo { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--ink-deep); }
.run__frame { position: absolute; inset: 0; overflow: hidden; background: #2a2a26 url(/assets/img/colorado-law-library-reading-room-640.jpg) center / cover; transform-origin: 56% 50%; }
.run__rig { position: absolute; inset: 0; animation: sway 9s ease-in-out infinite; transform-origin: 62% 52%; }
@keyframes sway { 0%, 100% { transform: scale(1.002) rotate(0deg); } 50% { transform: scale(1.006) rotate(.08deg); } }
.run__media, .run__media img, .run__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.run__media { transform: scale(1.04); will-change: transform; }
.run__vignette { position: absolute; inset: 0; background: linear-gradient(95deg, rgba(20, 27, 30, .92) 0%, rgba(20, 27, 30, .76) 34%, rgba(20, 27, 30, .34) 64%, rgba(20, 27, 30, .16) 100%); }
.run__shade { position: absolute; inset: 0; background: var(--ink-deep); opacity: 0; }

.hero { position: relative; z-index: 1; min-height: calc(100svh - var(--mast-h) - 54px); display: flex; align-items: center; padding-block: clamp(56px, 8vw, 112px); }
.hero__in { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.hero__copy { max-width: 40rem; }
.hero__slogan { font: italic 400 clamp(1.15rem, 1rem + .6vw, 1.5rem)/1.3 var(--f-display); color: var(--rock-light); margin: 0 0 1rem; animation: rise .9s var(--ease) .05s both; }
.hero h1 { font-size: clamp(2.9rem, 1.6rem + 5.4vw, 6.4rem); line-height: .95; letter-spacing: -.025em; font-weight: 350; animation: rise 1s var(--ease) .12s both; }
.hero__lede { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: #E4E0D7; max-width: 34rem; margin: 1.4rem 0 2rem; animation: rise 1s var(--ease) .24s both; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; animation: rise 1s var(--ease) .34s both; }
.hero__actions .btn--ghost { color: var(--paper); }
.hero__actions .btn--ghost:hover { background: var(--paper); color: var(--ink); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.handover { position: relative; z-index: 1; padding: clamp(80px, 14vw, 200px) 0 clamp(80px, 12vw, 160px); }
.handover__in { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.handover h2 { font-size: clamp(2.2rem, 1.4rem + 3vw, 4.2rem); font-weight: 350; }
.handover h2 em { color: var(--rock-light); }
.handover p { color: #E4E0D7; font-size: 1.1rem; }
.handover__def { border-top: 1px solid rgba(244, 239, 230, .25); padding-top: 1.2rem; font: 400 .9rem/1.55 var(--f-mono); color: var(--mist); }
.no-motion .handover, html:not(.js) .handover { background: linear-gradient(to bottom, rgba(20, 27, 30, 0) 0%, rgba(20, 27, 30, .74) 20%, rgba(20, 27, 30, .92) 100%); }

/* ---------- Giant words that fill on scroll ---------- */
.words { position: relative; overflow: hidden; background: var(--ink-deep); color: var(--paper); padding-block: clamp(96px, 12vw, 160px); }
.words::before { content: ""; position: absolute; inset: auto 0 0 0; height: 58%; background: repeating-linear-gradient(to bottom, rgba(244, 239, 230, .045) 0 1px, transparent 1px 34px); pointer-events: none; }
.words__head { max-width: var(--wrap); margin: 0 auto 3.5rem; padding-inline: var(--gutter); text-align: center; position: relative; }
.words__head .eyebrow { justify-content: center; }
.words__head h2 { font-size: clamp(2.4rem, 1rem + 6vw, 6.5rem); font-weight: 350; line-height: .92; letter-spacing: -.035em; }
.words__head p { max-width: 38rem; margin: 1.4rem auto 0; color: #D8D4CB; }
.words__list { list-style: none; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); border-top: 1px solid rgba(244, 239, 230, .18); position: relative; }
.words__row { display: grid; grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 21rem); gap: clamp(1rem, 3vw, 3rem); align-items: center; padding-block: clamp(1.6rem, 3vw, 3rem); border-bottom: 1px solid rgba(244, 239, 230, .12); }
.words__n { font: 500 1.1rem/1 var(--f-mono); color: var(--rock-light); }
.words__w { position: relative; font: 400 clamp(2.6rem, 6.4vw, 6.6rem)/.9 var(--f-display); letter-spacing: -.04em; white-space: nowrap; margin: 0; }
.words__w .w-base { display: block; color: var(--paper); }
.words__w .w-fill { position: absolute; inset: 0; color: var(--paper); clip-path: inset(0 100% 0 0); display: none; }
.motion .words__w .w-base { color: transparent; -webkit-text-stroke: 1px rgba(183, 192, 194, .45); }
.motion .words__w .w-fill { display: block; }
.words__w em { font-style: italic; color: var(--rock-light); }
.motion .words__w .w-base em { color: transparent; }
.words__p { font-size: .95rem; color: var(--mist); max-width: 42ch; justify-self: end; margin: 0; }
.words__p .cite { color: var(--rock-light); }

/* ---------- Backdrop topic list ---------- */
.topics { position: relative; isolation: isolate; color: var(--paper); background: var(--ink); padding-block: clamp(80px, 10vw, 140px); overflow: hidden; }
.topics__bg { position: absolute; inset: 0; z-index: -2; }
.topics__bg picture { position: absolute; inset: 0; opacity: 0; transition: opacity .9s var(--ease); }
.topics__bg picture.is-on { opacity: 1; }
.topics__bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75); }
.topics::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20, 27, 30, .94) 0%, rgba(20, 27, 30, .86) 55%, rgba(20, 27, 30, .7) 100%); }
.topics__head { max-width: var(--wrap); margin: 0 auto clamp(40px, 5vw, 64px); padding-inline: var(--gutter); text-align: center; }
.topics__head .eyebrow { justify-content: center; }
.topics__head h2 { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.8rem); font-weight: 350; }
.topics__head p { color: #D8D4CB; max-width: 36rem; margin: 1rem auto 0; }
.topics__list { list-style: none; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); border-top: 1px solid rgba(244, 239, 230, .2); }
.topics__item { border-bottom: 1px solid rgba(244, 239, 230, .2); position: relative; }
.topics__item::before { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: var(--rock); transform: scaleY(0); transform-origin: top; transition: transform .5s var(--ease); }
.topics__item.is-on::before { transform: scaleY(1); }
.topics__btn { width: 100%; display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) 2.5rem; align-items: center; gap: 1rem; padding: 1.4rem 0 1.4rem 1.2rem; background: none; border: 0; cursor: pointer; text-align: left; color: var(--paper); transition: transform .4s var(--ease); }
.topics__item.is-on .topics__btn { transform: translateX(8px); }
.topics__n { font: 500 .9rem/1 var(--f-mono); color: var(--rock-light); }
.topics__t { font: 400 clamp(1.7rem, 1.1rem + 2.4vw, 3.2rem)/1.05 var(--f-display); text-transform: none; letter-spacing: -.015em; }
.topics__arrow { width: 28px; height: 28px; fill: none; stroke: var(--paper); stroke-width: 1.4; transition: transform .4s var(--ease); }
.topics__item.is-on .topics__arrow { transform: rotate(45deg); stroke: var(--rock-light); }
.topics__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.topics__item.is-on .topics__panel { grid-template-rows: 1fr; }
.topics__panel > div { overflow: hidden; }
.topics__body { display: grid; grid-template-columns: minmax(0, 36rem) auto; gap: 2rem; align-items: end; padding: 0 0 1.8rem calc(1.2rem + 4.5rem); }
.topics__body p { margin: 0; color: #E4E0D7; }
.topics__body .cite { color: var(--mist); }
.topics__ghost { position: absolute; right: var(--gutter); bottom: -2rem; font: 300 clamp(10rem, 22vw, 20rem)/1 var(--f-display); color: transparent; -webkit-text-stroke: 1px rgba(217, 135, 111, .4); pointer-events: none; z-index: -1; transition: opacity .5s; }
html:not(.js) .topics__panel { grid-template-rows: 1fr; }

/* ---------- Technical drawing sheet ---------- */
.drawing { padding-block: clamp(80px, 10vw, 140px); background:
  linear-gradient(rgba(31, 42, 46, .05) 1px, transparent 1px) 0 0 / 24px 24px,
  linear-gradient(90deg, rgba(31, 42, 46, .05) 1px, transparent 1px) 0 0 / 24px 24px,
  linear-gradient(rgba(31, 42, 46, .07) 1px, transparent 1px) 0 0 / 120px 120px,
  linear-gradient(90deg, rgba(31, 42, 46, .07) 1px, transparent 1px) 0 0 / 120px 120px,
  var(--paper); }
.drawing__sheet { position: relative; max-width: var(--wrap); margin: 0 auto; border: 1px solid var(--ink); background: rgba(244, 239, 230, .9); }
.drawing__sheet::before, .drawing__sheet::after, .drawing__ticks::before, .drawing__ticks::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--rock); }
.drawing__sheet::before { left: -7px; top: -7px; border-right: 0; border-bottom: 0; }
.drawing__sheet::after { right: -7px; top: -7px; border-left: 0; border-bottom: 0; }
.drawing__ticks::before { left: -7px; bottom: -7px; border-right: 0; border-top: 0; }
.drawing__ticks::after { right: -7px; bottom: -7px; border-left: 0; border-top: 0; }
.drawing__title { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; border-bottom: 1px solid var(--ink); }
.drawing__display { display: grid; position: relative; min-height: 22rem; overflow: hidden; }
.drawing__panel { grid-area: 1 / 1; padding: clamp(24px, 4vw, 48px); position: relative; opacity: 0; visibility: hidden; transition: opacity .15s linear, visibility 0s .15s; }
.drawing__panel.is-on { opacity: 1; visibility: visible; transition: opacity .34s linear .12s, visibility 0s; }
.drawing__panel > * { position: relative; max-width: 34rem; }
.drawing__panel picture { position: absolute; inset: 0; max-width: none; z-index: 0; }
.drawing__panel picture img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.drawing__panel picture::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(244, 239, 230, .97) 0%, rgba(244, 239, 230, .93) 45%, rgba(244, 239, 230, .5) 75%, rgba(244, 239, 230, .2) 100%); }
.drawing__panel h2, .drawing__panel h3 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); font-weight: 350; margin-bottom: 1rem; }
.drawing__panel ul { list-style: none; border-top: 1px solid var(--line); }
.drawing__panel li { padding: .55rem 0 .55rem 1.6rem; border-bottom: 1px solid var(--line); position: relative; font-size: .98rem; }
.drawing__panel li::before { content: "?"; position: absolute; left: 0; font: 500 .85rem/1.8 var(--f-mono); color: var(--rock-deep); }
.drawing__meta { border-left: 1px solid var(--ink); margin: 0; display: grid; align-content: start; }
.drawing__meta div { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.drawing__meta dt { font: 500 .66rem/1.2 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.drawing__meta dd { margin: 4px 0 0; font: 500 .95rem/1.3 var(--f-mono); font-variant-numeric: tabular-nums; }
.drawing__wire { height: 1px; background: var(--ink); position: relative; overflow: hidden; }
.drawing__wire::after { content: ""; position: absolute; top: -1px; height: 3px; width: 80px; background: linear-gradient(90deg, transparent, var(--rock), transparent); animation: charge 3.2s linear infinite; }
@keyframes charge { from { left: -80px; } to { left: 100%; } }
.drawing__cells { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.drawing__cell { background: var(--paper); }
.drawing__cell button { width: 100%; height: 100%; min-height: 9.5rem; display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; padding: 18px 20px; background: transparent; border: 0; text-align: left; cursor: pointer; position: relative; transition: background .25s; }
.drawing__cell button::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: var(--rock); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.drawing__num { font: 300 3.6rem/1 var(--f-display); color: transparent; -webkit-text-stroke: 1px var(--ink); transition: -webkit-text-stroke-color .25s; }
.drawing__name { font: 500 1rem/1.3 var(--f-ui); }
.drawing__cell button:hover, .drawing__cell button:focus-visible, .drawing__cell button[aria-pressed="true"] { background: var(--white); }
.drawing__cell button:hover::before, .drawing__cell button:focus-visible::before, .drawing__cell button[aria-pressed="true"]::before { transform: scaleX(1); }
.drawing__cell button:hover .drawing__num, .drawing__cell button:focus-visible .drawing__num, .drawing__cell button[aria-pressed="true"] .drawing__num { -webkit-text-stroke-color: var(--rock); }
.drawing__index { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--ink); font: 500 .7rem/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
html:not(.js) .drawing__display { display: block; }
html:not(.js) .drawing__panel { opacity: 1; visibility: visible; border-bottom: 1px solid var(--line); }
html:not(.js) .drawing__panel picture { display: none; }

/* ---------- Comparative fault ledger ---------- */
.ledger { padding-block: clamp(72px, 9vw, 120px); background: var(--paper-2); }
.ledger__in { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.ledger h2 { font-size: clamp(2rem, 1.3rem + 2.5vw, 3.4rem); font-weight: 350; margin-bottom: 1rem; }
.ledger__tool { background: var(--paper); border: 1px solid var(--ink); padding: clamp(20px, 3vw, 36px); }
.ledger__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: baseline; padding: .8rem 0; border-bottom: 1px dashed var(--line); font-family: var(--f-mono); font-size: .95rem; }
.ledger__row strong { font-weight: 500; font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.ledger__row--total { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: .4rem; }
.ledger__row--total strong { font: 400 2.2rem/1 var(--f-display); color: var(--rock-deep); }
.ledger label { display: block; font: 500 .8rem/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.ledger__field { margin-bottom: 1.2rem; }
.ledger input[type="range"] { width: 100%; accent-color: var(--rock); height: 32px; }
.ledger input[type="text"] { width: 100%; height: 48px; border: 1px solid var(--line); background: var(--white); padding: 0 12px; font: 500 1.1rem/1 var(--f-mono); border-radius: 2px; }
.ledger__bar { height: 14px; background: var(--paper-3); position: relative; margin: .8rem 0 0; }
.ledger__bar span { position: absolute; inset: 0 auto 0 0; background: var(--rock); transition: width .3s var(--ease); }
.ledger__bar::after { content: ""; position: absolute; left: 50%; top: -6px; bottom: -6px; width: 2px; background: var(--ink); }
.ledger__barlabel { display: flex; justify-content: space-between; font: 400 .72rem/1.4 var(--f-mono); color: var(--muted); margin-top: .4rem; }
.ledger__msg { margin: 1rem 0 0; font-size: .92rem; min-height: 3em; }
.ledger__msg.is-barred { color: var(--rock-deep); font-weight: 500; }
.ledger__fine { font-size: .82rem; color: var(--muted); margin-top: 1rem; }

/* ---------- Sticky stacking process cards ---------- */
.stack { padding-block: clamp(80px, 10vw, 140px); background: var(--paper); }
.stack__head { max-width: 46rem; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; padding-inline: var(--gutter); }
.stack__head .eyebrow { justify-content: center; }
.stack__head h2 { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.8rem); font-weight: 350; }
.stack__head p { color: var(--muted); margin-top: 1rem; }
.stack__rule { width: 4.5rem; height: 4px; background: var(--rock); border-radius: 2px; margin: 1.4rem auto 0; }
.stack__list { list-style: none; max-width: 56rem; margin: 0 auto; padding-inline: var(--gutter); position: relative; }
.stack__list::after { content: ""; display: block; height: 4vh; }
.stack__card { position: sticky; top: calc(var(--mast-h) + 1.4rem + (var(--i, 0) * 14px)); z-index: 2; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(16px, 3vw, 32px); align-items: start; background: var(--white); border-radius: 4px; padding: clamp(1.4rem, 3vw, 2.3rem); box-shadow: inset 0 0 0 1.5px var(--line), 0 22px 48px -30px rgba(20, 27, 30, .55); margin-bottom: 1.1rem; }
.stack__badge { width: clamp(52px, 6vw, 66px); height: clamp(52px, 6vw, 66px); display: grid; place-items: center; background: var(--ink); color: var(--white); border-radius: 3px; font: 500 1.15rem/1 var(--f-mono); font-variant-numeric: tabular-nums; }
.stack__card h3 { font: 500 clamp(1.2rem, 1rem + .7vw, 1.55rem)/1.25 var(--f-ui); letter-spacing: -.01em; margin-bottom: .5rem; }
.stack__card p { margin: 0; color: #3A4549; }
.stack__card .cite { margin-top: .7rem; }
.stack__chev { position: relative; z-index: 1; height: 2.6rem; display: grid; place-items: center; margin: -.2rem 0 .9rem; opacity: 0; transition: opacity .6s; }
.stack__chev.is-in { opacity: 1; }
.stack__chev svg { width: 22px; height: 22px; fill: none; stroke: var(--rock); stroke-width: 2; animation: bob 1.9s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(-22%); } 50% { transform: translateY(22%); } }
.no-motion .stack__card { position: relative; top: auto; }
.no-motion .stack__chev svg { animation: none; }
.no-motion .stack__chev { opacity: 1; }

/* ---------- Scroll-drawn journey path (deadlines) ---------- */
.journey { position: relative; isolation: isolate; background: var(--ink-deep); color: var(--paper); }
.journey__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.journey__bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.26) saturate(.7); }
.journey__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, var(--ink-deep) 0%, transparent 22%, transparent 70%, var(--ink-deep) 100%), radial-gradient(70% 60% at 50% 60%, transparent 30%, rgba(20, 27, 30, .6) 100%); }
.journey__frame { padding-block: clamp(72px, 9vw, 120px); }
.journey__head { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: end; }
.journey__head h2 { font-size: clamp(2.4rem, 1rem + 4.2vw, 5.4rem); font-weight: 300; line-height: .95; letter-spacing: -.035em; max-width: 14ch; }
.journey__head h2 em { color: var(--rock-light); }
.journey__head p { color: rgba(244, 239, 230, .82); max-width: 40ch; }
.journey__canvas { position: relative; max-width: var(--wrap); margin: clamp(32px, 5vw, 64px) auto 0; padding-inline: var(--gutter); }
.journey__svgwrap { position: relative; height: clamp(320px, 38vw, 440px); }
.journey svg.journey__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: none; }
.journey__ghost { fill: none; stroke: rgba(244, 239, 230, .14); stroke-width: 1; stroke-dasharray: 3 7; vector-effect: non-scaling-stroke; }
.journey__line { fill: none; stroke: var(--rock-light); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(217, 135, 111, .45)); }
.journey__marker { position: absolute; left: 0; top: 0; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: #F2C4B3; box-shadow: 0 0 0 5px rgba(217, 135, 111, .22), 0 0 24px 6px rgba(217, 135, 111, .55); opacity: 0; display: none; pointer-events: none; }
.journey__stops { list-style: none; }
.journey__stop h3 { font: 300 clamp(1.4rem, 1rem + 1.3vw, 2.3rem)/1.05 var(--f-display); margin: .25rem 0 .35rem; }
.journey__idx { font: 600 .7rem/1 var(--f-mono); letter-spacing: .18em; color: var(--rock-light); }
.journey__stop p { font-size: .86rem; line-height: 1.45; color: rgba(244, 239, 230, .78); margin: 0; }
.journey__stop .cite { color: var(--mist); }
/* static (no JS / reduced motion / mobile): vertical list */
.journey__stops { display: grid; gap: 2rem; position: relative; padding-left: 2.2rem; }
.journey__stops::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: rgba(244, 239, 230, .16); }
.journey__stops::after { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--rock-light); transform-origin: top; transform: scaleY(var(--p, 1)); }
.journey__stop { position: relative; }
.journey__node { position: absolute; left: -2.2rem; top: .2rem; width: 16px; height: 16px; border-radius: 50%; background: var(--rock-light); border: 2px solid var(--rock-light); box-shadow: 0 0 0 6px rgba(217, 135, 111, .18); }
.journey__svgwrap { height: auto; }
/* live desktop path */
.journey[data-live] .journey__svgwrap { height: clamp(320px, 38vw, 440px); }
.journey[data-live] svg.journey__svg, .journey[data-live] .journey__marker { display: block; }
.journey[data-live] .journey__stops { display: block; padding: 0; position: absolute; inset: 0; }
.journey[data-live] .journey__stops::before, .journey[data-live] .journey__stops::after { display: none; }
.journey[data-live] .journey__stop { position: absolute; width: 0; height: 0; }
.journey[data-live] .journey__node { left: 0; top: 0; margin: -9px; background: var(--ink-deep); border-color: rgba(244, 239, 230, .3); box-shadow: none; transform: scale(.7); transition: transform .4s; }
.journey[data-live] .journey__card { position: absolute; width: clamp(10.5rem, 15.5vw, 15rem); transform: translateX(-50%); opacity: 0; transition: opacity .65s var(--ease), translate .65s var(--ease); }
.journey[data-live] .journey__stop.is-high .journey__card { bottom: 1.9rem; translate: 0 18px; }
.journey[data-live] .journey__stop.is-low .journey__card { top: 1.9rem; translate: 0 -18px; }
.journey[data-live] .journey__stop:first-child .journey__card { transform: translateX(-18%); }
.journey[data-live] .journey__stop:last-child .journey__card { transform: translateX(-82%); text-align: right; }
.journey[data-live] .journey__stop[data-reached] .journey__node { background: var(--rock-light); border-color: var(--rock-light); transform: scale(1); animation: nodePulse .9s var(--ease); }
.journey[data-live] .journey__stop[data-reached] .journey__card { opacity: 1; translate: 0 0; }
@keyframes nodePulse { 0% { transform: scale(1.35); box-shadow: 0 0 0 0 rgba(217, 135, 111, .6); } 100% { transform: scale(1); box-shadow: 0 0 0 16px rgba(217, 135, 111, 0); } }
.journey[data-pin] { height: 270vh; }
.journey[data-pin] .journey__frame { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-block: calc(var(--mast-h) + 24px) 32px; }

/* ---------- Inner page hero ---------- */
.phero { background: var(--paper); border-bottom: 1px solid var(--line); padding-block: clamp(56px, 7vw, 104px); }
.phero__in { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.phero__crumbs { list-style: none; display: flex; gap: .5rem; font: 500 .74rem/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1.2rem; color: var(--muted); }
.phero__crumbs a { color: var(--muted); }
.phero__crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--line); }
.phero__slogan { font: italic 400 1.2rem/1.3 var(--f-display); color: var(--rock-deep); margin-bottom: .8rem; }
.phero h1 { font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4.8rem); font-weight: 350; line-height: .98; letter-spacing: -.025em; }
.phero__lede { font-size: 1.12rem; margin: 1.3rem 0 1.6rem; max-width: 36rem; color: #34403F; }
.phero__facts { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 1rem; border-top: 1px solid var(--line); font: 400 .82rem/1.5 var(--f-mono); color: var(--muted); }
.phero__facts b { color: var(--ink); font-weight: 500; }
.phero__fig { margin: 0; position: relative; }
.phero__fig::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid var(--rock); z-index: 0; }
.phero__fig picture { position: relative; z-index: 1; aspect-ratio: 4 / 3; overflow: hidden; }
.phero__fig img { width: 100%; height: 100%; object-fit: cover; }
.phero__fig figcaption { position: relative; z-index: 1; font: 400 .74rem/1.4 var(--f-mono); color: var(--muted); margin-top: .6rem; }

/* ---------- Article (guide) layout ---------- */
.doc { max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 6vw, 88px) var(--gutter) clamp(64px, 8vw, 112px); display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); align-items: start; }
.toc { position: sticky; top: calc(var(--mast-h) + 24px); font-size: .88rem; }
.toc p { font: 500 .7rem/1.3 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.toc ol { list-style: none; border-left: 1px solid var(--line); }
.toc a { display: block; padding: .4rem 0 .4rem 1rem; color: var(--muted); text-decoration: none; margin-left: -1px; border-left: 2px solid transparent; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--rock); }
.doc__body { max-width: 44rem; padding-right: 0; position: relative; }
.doc__body > section { margin-bottom: clamp(48px, 5vw, 72px); }
.doc__body h2 { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.7rem); font-weight: 400; margin-bottom: 1.1rem; scroll-margin-top: calc(var(--mast-h) + 20px); }
.doc__body h2 .sect { display: block; font: 500 .74rem/1 var(--f-mono); letter-spacing: .16em; color: var(--rock-deep); margin-bottom: .7rem; }
.doc__body h3 { font: 500 1.2rem/1.3 var(--f-ui); margin: 1.8rem 0 .6rem; }
.doc__body p, .doc__body li { font-family: var(--f-display); font-size: 1.2rem; line-height: 1.6; }
.doc__body ul, .doc__body ol.plain { padding-left: 1.3rem; margin: 0 0 1.2em; }
.doc__body li { margin-bottom: .4rem; }
.doc__body li::marker { color: var(--rock); }
.cite { display: inline-block; font: 500 .74rem/1.4 var(--f-mono); letter-spacing: .04em; color: var(--rock-deep); background: rgba(168, 68, 43, .08); padding: 2px 7px; border-radius: 2px; white-space: nowrap; vertical-align: .1em; }
.on-dark .cite, .words .cite, .topics .cite, .journey .cite { background: rgba(244, 239, 230, .08); }

/* sidenotes: float into the right margin on wide screens */
.margin { font: 400 .86rem/1.5 var(--f-ui) !important; color: var(--muted); border-top: 2px solid var(--rock); padding-top: .6rem; margin: 0 0 1.4rem; }
.margin b { color: var(--ink); font-weight: 600; display: block; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .3rem; }
@media (min-width: 1360px) {
  .doc { grid-template-columns: 13.5rem minmax(0, 44rem) 1fr; }
  .doc__body { grid-column: 2; }
  .margin { float: right; clear: right; width: 15rem; margin: .3rem -18.5rem 1rem 0; }
}

.callout { border-left: 3px solid var(--rock); background: var(--paper-2); padding: 1.3rem 1.5rem; margin: 1.8rem 0; }
.callout p:last-child { margin-bottom: 0; }
.callout__k { font: 500 .72rem/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--rock-deep); display: block; margin-bottom: .5rem; }
.callout p { font-size: 1.08rem !important; }
.messy { border: 1px solid var(--ink); padding: 1.4rem 1.5rem 1.2rem; margin: 2rem 0; position: relative; }
.messy::before { content: "The messy middle"; position: absolute; top: -.7em; left: 1rem; padding: 0 .5rem; background: var(--paper); font: 500 .72rem/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--rock-deep); }
.messy p { font-size: 1.08rem !important; }
.messy p:last-child { margin-bottom: 0; }
.decide { list-style: none; padding: 0 !important; border-top: 1px solid var(--ink); margin: 1.6rem 0 !important; }
.decide li { display: grid; grid-template-columns: minmax(0, 1fr) 2rem minmax(0, 1fr); gap: .8rem; padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem !important; align-items: start; }
.decide li::before { display: none; }
.decide .if { font-family: var(--f-ui); font-size: .95rem; }
.decide .if::before { content: "IF "; font: 500 .72rem/1 var(--f-mono); color: var(--rock-deep); letter-spacing: .1em; }
.decide .arrow { color: var(--rock); font-family: var(--f-mono); text-align: center; }
.decide .then { font-family: var(--f-ui); font-size: .95rem; }

.tbl-wrap { margin: 1.6rem 0 2rem; overflow-x: auto; }
table.cmp { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.cmp caption { text-align: left; font: 500 .74rem/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-bottom: .7rem; }
table.cmp th, table.cmp td { text-align: left; vertical-align: top; padding: .8rem .9rem; border-bottom: 1px solid var(--line); line-height: 1.45; }
table.cmp thead th { font: 500 .78rem/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; border-bottom: 2px solid var(--ink); background: var(--paper-2); }
table.cmp tbody th { font-weight: 600; width: 26%; }

.bottomline { background: var(--ink); color: var(--paper); padding: 1.6rem 1.8rem; margin: 2rem 0; }
.bottomline h3 { color: var(--paper); margin-top: 0 !important; font: 500 .78rem/1.3 var(--f-mono) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--rock-light) !important; }
.bottomline p, .bottomline li { color: #E4E0D7; font-size: 1.08rem !important; }
.bottomline p:last-child { margin-bottom: 0; }

/* Tools inside guides */
.tool { border: 1px solid var(--ink); background: var(--white); margin: 2rem 0; }
.tool__head { padding: 1rem 1.3rem; border-bottom: 1px solid var(--ink); display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; background: var(--paper-2); }
.tool__head h3 { margin: 0 !important; font: 500 1.05rem/1.3 var(--f-ui) !important; }
.tool__head span { font: 500 .7rem/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tool__body { padding: 1.3rem; }
.tool fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; }
.tool legend { font: 500 .98rem/1.4 var(--f-ui); margin-bottom: .6rem; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { position: relative; }
.choices input { position: absolute; opacity: 0; inset: 0; }
.choices span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border: 1px solid var(--line); border-radius: 2px; cursor: pointer; font-size: .93rem; background: var(--paper); transition: background .2s, border-color .2s, color .2s; }
.choices input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.choices input:focus-visible + span { outline: 3px solid var(--rock); outline-offset: 2px; }
.tool__out { border-top: 1px dashed var(--line); margin-top: .4rem; padding-top: 1rem; font-size: .98rem; }
.tool__out strong { font-family: var(--f-display); font-size: 1.5rem; font-weight: 400; display: block; margin-bottom: .3rem; color: var(--rock-deep); }
.tool__out p { font-family: var(--f-ui) !important; font-size: .95rem !important; margin-bottom: .5rem; }
.tool__fine { font-size: .8rem !important; color: var(--muted); font-family: var(--f-ui) !important; margin: .8rem 0 0; }
.tool select, .tool input[type="date"] { height: 48px; border: 1px solid var(--line); background: var(--paper); padding: 0 .8rem; font: 400 1rem/1 var(--f-ui); border-radius: 2px; min-width: 14rem; max-width: 100%; }
.tool .row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; margin-bottom: 1rem; }
.tool .row label { display: grid; gap: .35rem; font: 500 .8rem/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Lawyer question checklist */
.checklist { list-style: none; padding: 0 !important; margin: 1.4rem 0 !important; border-top: 1px solid var(--ink); }
.checklist li { border-bottom: 1px solid var(--line); margin: 0 !important; }
.checklist li::before { display: none; }
.checklist label { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); gap: .8rem; padding: .8rem 0; cursor: pointer; font-family: var(--f-ui); font-size: 1rem; line-height: 1.45; }
.checklist input { width: 1.2rem; height: 1.2rem; accent-color: var(--rock); margin-top: .15rem; }
.checklist__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.checklist__status { font: 400 .85rem/1.4 var(--f-mono); color: var(--muted); }

/* FAQ */
.faq { margin-top: clamp(40px, 5vw, 64px); }
.faq__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.faq__head h2 { margin: 0 !important; }
.faq__filter input { height: 44px; width: min(18rem, 100%); border: 1px solid var(--line); background: var(--white); padding: 0 .9rem; font: 400 .95rem/1 var(--f-ui); border-radius: 2px; }
.faq__list { border-top: 1px solid var(--ink); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 1.5rem; gap: 1rem; align-items: center; padding: 1.1rem 0; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font: 300 1.6rem/1 var(--f-display); color: var(--rock); transition: transform .3s var(--ease); text-align: center; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item h3 { margin: 0 !important; font: 500 1.08rem/1.4 var(--f-ui) !important; }
.faq__a { padding: 0 2.5rem 1.2rem 0; }
.faq__a p { font-size: 1.1rem !important; }
.faq__none { padding: 1rem 0; color: var(--muted); font-family: var(--f-ui) !important; font-size: .95rem !important; }

/* Related guides */
.related { border-top: 1px solid var(--ink); padding-top: 1.6rem; margin-top: clamp(48px, 6vw, 80px); }
.related__h { font: 500 .74rem/1.3 var(--f-mono) !important; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem !important; }
.related__list { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.related__list li { border-bottom: 1px solid var(--line); margin: 0 !important; }
.related__list li:nth-child(odd) { border-right: 1px solid var(--line); }
.related__list li::before { display: none; }
.related__list a { display: grid; grid-template-columns: 2rem minmax(0, 1fr); padding: 1rem 1rem 1rem 0; min-height: 6.2rem; text-decoration: none; color: var(--ink); align-content: start; }
.related__list li:nth-child(even) a { padding-left: 1rem; }
.related__list a:hover .related__t { color: var(--rock-deep); }
.related__n { grid-row: 1 / 3; font: 500 .74rem/1.9 var(--f-mono); color: var(--rock-deep); }
.related__t { font: 500 1rem/1.35 var(--f-ui); }
.related__d { font: 400 .85rem/1.45 var(--f-ui); color: var(--muted); }

/* Inline CTA band at the end of guides */
.askband { background: var(--paper-2); border-top: 1px solid var(--line); }
.askband__in { max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 6vw, 80px) var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; }
.askband h2 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.6rem); font-weight: 350; }
.askband p { margin: .6rem 0 0; color: var(--muted); max-width: 40rem; }
.crossref { border: 1px dashed var(--rock); padding: 1rem 1.2rem; margin: 1.8rem 0; font-family: var(--f-ui) !important; }
.crossref p { font-family: var(--f-ui) !important; font-size: .98rem !important; margin: 0; }

/* Home: FAQ + closing */
.homefaq { max-width: 52rem; margin: 0 auto; padding: clamp(72px, 9vw, 120px) var(--gutter); }
.homefaq .faq__a p { font-family: var(--f-display); }
.close { background: var(--ink); color: var(--paper); }
.close__in { max-width: var(--wrap); margin: 0 auto; padding: clamp(64px, 8vw, 112px) var(--gutter); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.close h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.6rem); font-weight: 350; }
.close p { color: #D8D4CB; }
.close .crossref { border-color: var(--rock-light); }
.close .crossref a { color: var(--rock-light); }

/* ---------- Contact form ---------- */
.contact { max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 6vw, 88px) var(--gutter) clamp(72px, 9vw, 120px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact__aside h2 { font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.4rem); font-weight: 400; margin-bottom: 1rem; }
.contact__aside p, .contact__aside li { font-family: var(--f-display); font-size: 1.15rem; }
.contact__aside ul { padding-left: 1.2rem; margin-bottom: 1.4rem; }
.contact__aside .warn { border-left: 3px solid var(--rock); padding: 1rem 1.2rem; background: var(--paper-2); font-family: var(--f-ui); font-size: .98rem; }
.form { background: var(--white); border: 1px solid var(--ink); padding: clamp(20px, 3vw, 40px); }
.field { margin-bottom: 1.2rem; }
.field label, .field .label { display: block; font: 500 .82rem/1.3 var(--f-ui); margin-bottom: .4rem; }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); font: 400 1rem/1.4 var(--f-ui); padding: .75rem .85rem; min-height: 48px; color: var(--ink); }
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: 3px solid rgba(168, 68, 43, .35); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: var(--rock); }
.field__err { display: block; color: var(--rock-deep); font-size: .86rem; margin-top: .35rem; }
.field__hint { font-size: .82rem; color: var(--muted); margin-top: .35rem; display: block; }
.field--check label { display: grid; grid-template-columns: 1.3rem minmax(0, 1fr); gap: .7rem; font-weight: 400; font-size: .92rem; line-height: 1.45; }
.field--check input { width: 1.2rem; height: 1.2rem; min-height: 0; accent-color: var(--rock); margin-top: .1rem; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.submit { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.2rem; align-items: center; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.submit p { margin: 0; font-size: .78rem; line-height: 1.45; color: var(--muted); }
.fstatus { padding: 1rem 1.2rem; margin-bottom: 1.4rem; border-left: 3px solid; font-size: .95rem; }
.fstatus--ok { border-color: #3D6B4F; background: #E6EFE8; }
.fstatus--err { border-color: var(--rock); background: #F6E4DE; }

/* ---------- Legal pages ---------- */
.legal { max-width: 46rem; margin: 0 auto; padding: clamp(48px, 6vw, 88px) var(--gutter) clamp(72px, 9vw, 120px); }
.legal h1 { font-size: clamp(2.4rem, 1.6rem + 2.4vw, 3.6rem); font-weight: 350; margin-bottom: .6rem; }
.legal .updated { font: 400 .82rem/1.4 var(--f-mono); color: var(--muted); margin-bottom: 2rem; }
.legal h2 { font-size: 1.6rem; margin: 2.2rem 0 .8rem; }
.legal p, .legal li { font-family: var(--f-display); font-size: 1.15rem; }
.legal ul { padding-left: 1.3rem; margin-bottom: 1.2rem; }

/* 404 */
.nf { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: clamp(56px, 8vw, 112px) var(--gutter); }
.nf h1 { font-size: clamp(2.4rem, 1.6rem + 3vw, 4.4rem); font-weight: 350; }
.nf p { max-width: 34rem; margin: 1rem auto 1.6rem; }
.nf__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Footer ---------- */
.foot { background: var(--ink-deep); color: #D8D4CB; }
.foot a { color: #E9E4DA; text-decoration: none; }
.foot a:hover { color: var(--rock-light); text-decoration: underline; }
.foot__top { max-width: var(--wrap); margin: 0 auto; padding: clamp(56px, 7vw, 88px) var(--gutter) 40px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
.foot__brand img { height: 30px; width: auto; margin-bottom: 1.2rem; }
.foot__brand p { font: 400 1.1rem/1.5 var(--f-display); max-width: 26rem; }
.foot h2 { font: 500 .72rem/1.3 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--rock-light); margin-bottom: 1rem; }
.foot ul { list-style: none; }
.foot li { padding: .3rem 0; }
.foot__small { font-size: .85rem; color: var(--mist); margin-top: 1rem; }
.foot__legal { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter) 28px; }
.foot__disc { border-top: 1px solid rgba(244, 239, 230, .14); padding-top: 24px; font-size: .84rem; line-height: 1.6; color: var(--mist); margin: 0; }
.foot__disc strong { color: var(--paper); font-weight: 600; }
.foot__base { max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter) 28px; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; border-top: 1px solid rgba(244, 239, 230, .08); }
.foot__base p { margin: 0; }
.foot__base ul { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.foot__base li { padding: 0; }

/* scroll reveal */
.motion [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.motion [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav__a[href="/civil-claim-process/"] { display: none; }
  .mega__in { grid-template-columns: 14rem minmax(0, 1fr); }
  .mega__fig { display: none; }
}
@media (max-width: 1023px) {
  :root { --mast-h: 64px; --dock-h: calc(64px + env(safe-area-inset-bottom)); }
  .nav, .mast__cta { display: none; }
  .lang { margin-left: auto; }
  .lang__btn span { display: none; }
  .lang__btn { width: 48px; justify-content: center; padding: 0; height: 48px; }
  .menu-btn { display: block; }
  .mast__logo img { height: 28px; }
  .dock { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 58; background: var(--ink); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px -12px rgba(20, 27, 30, .5); }
  .dock a, .dock button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; color: #E9E4DA; text-decoration: none; background: none; border: 0; font: 500 .72rem/1 var(--f-ui); cursor: pointer; border-radius: 3px; }
  .dock svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
  .dock [aria-current="page"] { color: var(--rock-light); }
  .dock__primary { background: var(--rock) !important; color: var(--white) !important; }
  .handover__in, .ledger__in, .close__in, .journey__head, .contact, .phero__in { grid-template-columns: 1fr; }
  .doc { grid-template-columns: 1fr; }
  .toc { position: static; border: 1px solid var(--line); padding: 1rem 1.2rem; background: var(--paper-2); }
  .toc ol { columns: 2; column-gap: 1.5rem; border: 0; }
  .toc a { border: 0; padding-left: 0; }
  .drawing__title { grid-template-columns: 1fr; }
  .drawing__meta { border-left: 0; border-top: 1px solid var(--ink); grid-template-columns: repeat(2, 1fr); }
  .drawing__cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phero__fig { max-width: 40rem; }
  .askband__in { grid-template-columns: 1fr; }
}
@media (max-width: 859px) {
  .words__row { grid-template-columns: 1fr; gap: .7rem; }
  .words__w { white-space: normal; }
  .words__p { justify-self: start; }
  .topics__body { grid-template-columns: 1fr; padding-left: 1.2rem; gap: 1rem; }
  .topics::before { background: rgba(20, 27, 30, .88); }
  .topics__btn { grid-template-columns: 2.5rem minmax(0, 1fr) 2rem; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .notice p { font-size: .74rem; padding-block: 8px; }
  .mast__logo img { height: 22px; }
  .hero h1 { font-size: clamp(2.6rem, 11vw, 3.4rem); }
  .hero__actions .btn { flex: 1 1 100%; }
  .mega__list { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  .doc__body p, .doc__body li { font-size: 1.1rem; }
  .decide li { grid-template-columns: 1fr; gap: .3rem; }
  .decide .arrow { text-align: left; }
  table.cmp thead { display: none; }
  table.cmp, table.cmp tbody, table.cmp tr, table.cmp th, table.cmp td { display: block; width: 100% !important; }
  table.cmp tr { border-bottom: 2px solid var(--ink); padding: .4rem 0; }
  table.cmp td, table.cmp tbody th { border: 0; padding: .35rem 0; }
  table.cmp td::before { content: attr(data-label); display: block; font: 500 .7rem/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .related__list { grid-template-columns: 1fr; }
  .related__list li:nth-child(odd) { border-right: 0; }
  .related__list li:nth-child(even) a { padding-left: 0; }
  .drawing__cell button { min-height: 7.5rem; padding: 14px; }
  .drawing__num { font-size: 2.6rem; }
  .submit { grid-template-columns: 1fr; }
  .submit .btn { width: 100%; }
  .phero__fig::before { inset: 10px -10px -10px 10px; }
  .phero__in { gap: 36px; }
  .foot__top { grid-template-columns: 1fr; }
  .stack__card { grid-template-columns: 1fr; }
  .ledger__row--total strong { font-size: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .run__rig { animation: none; }
  .stack__card { position: relative; top: auto; }
  .stack__chev { opacity: 1; }
  .drawing__wire::after { display: none; }
}

@media print {
  .mast, .notice, .dock, .foot, .toc, .askband, .related, .sheet, .lang { display: none !important; }
  body { background: #fff; padding: 0; }
  .doc { display: block; padding: 0; }
  .margin { float: none; width: auto; margin: 1rem 0; }
}

.reviewed { font: 400 .86rem/1.5 var(--f-ui) !important; color: var(--muted); border-top: 2px solid var(--rock); padding-top: .6rem; margin: 2rem 0 0; }
.reviewed b { color: var(--ink); font: 600 .74rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; margin-right: .4rem; }
.doc__body .stack__list--inline { padding: 0; margin: 1.6rem 0 0; }
.doc__body .stack__card, .doc__body .stack__card p { font-family: var(--f-ui); font-size: 1rem; line-height: 1.6; }
.doc__body .stack__card { margin-bottom: 1.1rem; }
.doc__body .stack__card h3 { margin: 0 0 .5rem; }
.doc__body .checklist li, .doc__body .related__list li, .doc__body .faq li { font-family: var(--f-ui); font-size: 1rem; }
.doc__body .ledger__tool { margin: 1.6rem 0; }
.nf__eyebrow { justify-content: center; }
.journey__canvas, .journey__head { width: 100%; }
.journey[data-pin] .journey__svgwrap { height: clamp(240px, 30vh, 340px); }
.journey[data-pin] .journey__canvas { margin-top: clamp(56px, 9vh, 96px); margin-bottom: clamp(80px, 12vh, 120px); }
.journey[data-pin] .journey__head h2 { font-size: clamp(2.2rem, 1rem + 3.4vw, 4.4rem); }
@media (max-width: 640px) { .drawing__display { min-height: 0; } }
@media (max-width: 640px) {
  table.cmp caption { display: block; width: 100%; }
  .choices span { padding-block: .55rem; line-height: 1.35; }
}

/* Layout QA (playbook 18): no overlap, no blank halves, nothing past its column */
.hero__copy { max-width: none; }
.hero__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem clamp(2rem, 5vw, 4.5rem); margin-top: 1.4rem; }
.hero__foot .hero__lede { flex: 0 1 34rem; margin: 0; }
.handover__in { align-items: center; }
@media (min-width: 1024px) {
  .phero__in { align-items: stretch; }
  .phero__copy { align-self: center; }
  .phero__fig { display: flex; flex-direction: column; }
  .phero__fig picture { display: block; flex: 1 1 auto; aspect-ratio: auto; min-height: 20rem; }
}
@media (min-width: 1360px) {
  .doc { grid-template-columns: 13.5rem minmax(0, 1fr); }
  .doc__body { max-width: 50rem; }
  .margin { float: right; clear: right; width: 15rem; margin: .4rem 0 1rem 1.8rem; }
}
.hero__foot .hero__lede { flex: 1 1 20rem; max-width: 34rem; }
.messy .messy__h { font: 600 1.08rem/1.35 var(--f-ui) !important; color: var(--ink); margin: 0 0 .35rem; }
.hero h1 { text-shadow: 0 2px 28px rgba(20, 27, 30, .55); }
@media (min-width: 1360px) { .doc__body > section { display: flow-root; } }
