/* =========================================================================
   B4BuyingLand.com — "the surveyor's night table"
   Deep ground = the land and everything unverified.
   Pale paper  = the parts you have actually pinned down.
   ========================================================================= */

:root {
  --night: #08110f;
  --table: #0e1a17;
  --table-2: #14231e;
  --table-3: #1b2f28;
  --edge: rgba(226, 235, 226, 0.14);
  --edge-soft: rgba(226, 235, 226, 0.08);

  --paper: #f4f0e6;
  --paper-2: #e9e3d4;
  --paper-line: rgba(20, 35, 30, 0.13);
  --ink: #12201c;
  --ink-2: #4e6058;

  --bone: #e9efe7;
  --bone-2: rgba(233, 239, 231, 0.66);
  --bone-3: rgba(233, 239, 231, 0.55);

  --flag: #ff7a3d;
  --water: #4fa3c7;
  --soil: #c8a24a;
  --services: #7ec9a5;
  --rights: #d76b9b;

  --shell: min(1220px, calc(100% - 48px));
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Azeret Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  background: var(--night);
}

body {
  margin: 0;
  color: var(--bone);
  background: var(--table);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "SOFT" 0, "WONK" 1;
  letter-spacing: -0.022em;
  line-height: 1.03;
}
h1 em, h2 em { font-style: italic; }

p { margin: 0; }

.shell { width: var(--shell); margin-inline: auto; }

:focus-visible {
  outline: 3px solid var(--flag);
  outline-offset: 3px;
  border-radius: 2px;
}
/* On the pale paper surfaces the orange ring is too faint to be an indicator. */
.sheet :focus-visible,
.notebook :focus-visible,
.brief-dialog :focus-visible { outline-color: var(--ink); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 90;
  padding: 12px 18px;
  color: var(--ink);
  background: var(--flag);
  font-weight: 700;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 14px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--flag);
}

/* ---------------------------------------------------------------- masthead */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 17, 15, 0.82);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--edge-soft);
}
.masthead-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 74px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark { width: 26px; height: 26px; flex: 0 0 26px; }
.brand-mark circle, .brand-mark path { fill: none; stroke: var(--bone); stroke-width: 1.6; }
.brand-mark .brand-mark-dot { fill: var(--flag); stroke: none; }
.brand-name { font-weight: 700; letter-spacing: -0.03em; font-size: 1.02rem; }
.brand-name i { font-style: normal; color: var(--bone-3); font-weight: 500; }

.masthead-nav { display: flex; gap: 26px; font-size: 0.88rem; color: var(--bone-2); }
.masthead-nav a { padding-block: 6px; border-bottom: 1px solid transparent; transition: color .18s, border-color .18s; }
.masthead-nav a:hover { color: var(--bone); border-bottom-color: var(--flag); }

.masthead-cta {
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--flag);
  border: 1px solid rgba(255, 122, 61, 0.45);
  border-radius: 999px;
  transition: background .18s, color .18s;
}
.masthead-cta:hover { background: var(--flag); color: var(--night); }

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 8vw, 112px);
  background:
    radial-gradient(120% 90% at 78% 8%, rgba(79, 163, 199, 0.13), transparent 62%),
    radial-gradient(90% 70% at 4% 92%, rgba(255, 122, 61, 0.11), transparent 60%),
    var(--night);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 76px);
  align-items: center;
}
.hero h1 {
  margin: 22px 0 0;
  font-size: clamp(2.9rem, 6.1vw, 5.3rem);
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 120;
}
.hero h1 em { color: var(--flag); }
.hero-lede {
  max-width: 46ch;
  margin-top: 26px;
  color: var(--bone-2);
  font-size: clamp(1.02rem, 1.25vw, 1.16rem);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-foot {
  max-width: 46ch;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--edge-soft);
  color: var(--bone-3);
  font-size: 0.84rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn-flag { color: var(--night); background: var(--flag); }
.btn-flag:hover { transform: translateY(-2px); background: #ff9260; }
.btn-ghost { color: var(--bone); border-color: var(--edge); }
.btn-ghost:hover { border-color: var(--bone-2); transform: translateY(-2px); }
.btn-line { color: var(--ink); border-color: rgba(18, 32, 28, 0.28); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-plain { color: var(--ink-2); border-color: transparent; text-decoration: underline; text-underline-offset: 4px; }
.btn-plain:hover { color: var(--ink); }

/* hero plat ------------------------------------------------------------- */

.hero-plat { position: relative; margin: 0; }
.plat { width: 100%; height: auto; overflow: visible; }
.plat-grid path { fill: none; stroke: rgba(233, 239, 231, 0.06); stroke-width: 1; }
.plat-road { fill: none; stroke: #22332c; stroke-width: 20; stroke-linecap: round; }
.plat-road-centre { fill: none; stroke: rgba(200, 162, 74, 0.6); stroke-width: 1.6; stroke-dasharray: 12 12; }
.plat-creek { fill: none; stroke: var(--water); stroke-width: 2.2; opacity: 0.72; stroke-linecap: round; }
.plat-tract { fill: url(#tractFill); opacity: 0.85; }
.plat-line {
  fill: none;
  stroke: var(--bone);
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-dasharray: 1900;
  stroke-dashoffset: 0;
}
.plat-monuments circle { fill: var(--flag); stroke: var(--night); stroke-width: 2; }
.plat-bearings text {
  fill: var(--bone-3);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-anchor: middle;
}
.plat-notes text {
  fill: var(--bone-3);
  font-family: var(--sans);
  font-size: 13px;
  font-style: italic;
  letter-spacing: 0.08em;
}
.plat-compass path { fill: var(--bone-2); }
.plat-compass text { fill: var(--bone-3); font-family: var(--mono); font-size: 12px; text-anchor: middle; }
.plat-scale path { stroke: var(--bone-3); stroke-width: 1.4; fill: none; }
.plat-scale text { fill: var(--bone-3); font-family: var(--mono); font-size: 11px; text-anchor: middle; }

.hero-callout {
  position: absolute;
  max-width: 19ch;
  padding-left: 14px;
  border-left: 2px solid var(--flag);
  color: var(--bone);
  font-size: 0.8rem;
  line-height: 1.35;
  background: rgba(8, 17, 15, 0.72);
  backdrop-filter: blur(4px);
}
.hero-callout span {
  position: absolute;
  left: -5px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--flag);
}
/* Positioned from the top so the caption below the plat is never covered. */
.callout-a { left: 0; top: 4%; }
.callout-b { right: 0; top: 52%; border-left-color: var(--services); }
.callout-b span { background: var(--services); }
.callout-c { left: 6%; top: 70%; border-left-color: var(--water); }
.callout-c span { background: var(--water); }

.hero-plat figcaption {
  max-width: 52ch;
  margin-top: 26px;
  color: var(--bone-3);
  font-size: 0.82rem;
  font-style: italic;
  font-family: var(--serif);
  line-height: 1.5;
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  width: var(--shell);
  margin: clamp(30px, 4vw, 54px) auto 0;
  color: var(--bone-3);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.scroll-cue span {
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, var(--flag), transparent);
}

/* ------------------------------------------------------------------ ledes */

.lede-block { max-width: 62ch; padding-block: clamp(64px, 8vw, 104px) 0; }
.lede-block h2 {
  margin: 20px 0 20px;
  font-size: clamp(2rem, 3.7vw, 3.3rem);
  max-width: 20ch;
}
.lede-block > p:last-child { color: var(--bone-2); font-size: 1.02rem; max-width: 54ch; }

/* ------------------------------------------------------------------ layers */

.layers { background: var(--table); border-top: 1px solid var(--edge-soft); }

.layers-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 68px);
  padding-block: clamp(40px, 5vw, 64px) clamp(64px, 8vw, 112px);
  align-items: start;
}

.layer-figure { margin: 0; }
.layer-figure-sticky {
  position: sticky;
  top: 108px;
  padding: 22px 22px 14px;
  background: linear-gradient(160deg, var(--table-2), var(--night));
  border: 1px solid var(--edge-soft);
  border-radius: 6px;
}
.layer-plat { width: 100%; height: auto; }

.lp-fill { fill: rgba(126, 201, 165, 0.05); }
.lp-edge { fill: none; stroke: var(--bone); stroke-width: 2.2; stroke-linejoin: round; }
.lp-monuments circle { fill: var(--bone); stroke: var(--night); stroke-width: 2; }
.lp-compass path { fill: var(--bone-3); }
.lp-compass text { fill: var(--bone-3); font-family: var(--mono); font-size: 13px; text-anchor: middle; }

.lyr { transition: opacity .5s ease; }
.lyr-label {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.lyr-label-quiet {
  fill: var(--bone-3);
  font-weight: 400;
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.lyr[data-layer="access"] .lyr-road { fill: none; stroke: #22332c; stroke-width: 20; stroke-linecap: round; }
.lyr[data-layer="access"] .lyr-road-centre { fill: none; stroke: rgba(200, 162, 74, .55); stroke-width: 1.6; stroke-dasharray: 12 12; }
.lyr[data-layer="access"] .lyr-easement { fill: none; stroke: var(--flag); stroke-width: 12; stroke-dasharray: 10 9; opacity: .55; }
.lyr[data-layer="access"] .lyr-gate { stroke: var(--flag); stroke-width: 3; }
.lyr[data-layer="access"] .lyr-dot { fill: var(--flag); }
.lyr[data-layer="access"] .lyr-label { fill: var(--flag); }

.lyr-flood { fill: rgba(79, 163, 199, 0.2); }
.lyr-contour { fill: none; stroke: rgba(79, 163, 199, 0.32); stroke-width: 1.2; }
.lyr-creek { fill: none; stroke: var(--water); stroke-width: 3; stroke-linecap: round; }
.lyr-dot-water { fill: var(--water); }
.lyr-label-water { fill: var(--water); }

.lyr-soil { fill: url(#soilHatch); opacity: 0.5; }
.lyr-field { fill: rgba(200, 162, 74, 0.16); stroke: var(--soil); stroke-width: 2; stroke-dasharray: 7 6; }
.lyr-slope path { stroke: var(--soil); stroke-width: 2; fill: none; opacity: 0.6; }
.lyr-dot-ground { fill: var(--soil); }
.lyr-label-ground { fill: var(--soil); }

.lyr-power { fill: none; stroke: var(--services); stroke-width: 1.8; }
.lyr-poles path { stroke: var(--services); stroke-width: 2.4; fill: none; }
.lyr-dim { stroke: var(--services); stroke-width: 1.6; }
.lyr-dot-services { fill: var(--services); }
.lyr-label-services { fill: var(--services); }

.lyr-strip { fill: url(#rightsHatch); opacity: 0.55; }
.lyr-except { fill: rgba(215, 107, 155, 0.16); stroke: var(--rights); stroke-width: 1.6; stroke-dasharray: 6 5; }
.lyr-dot-rights { fill: var(--rights); }
.lyr-label-rights { fill: var(--rights); }

/* JS-enhanced focus behaviour: dim everything but the active layer */
.js .lyr { opacity: 0.12; }
.js .lyr.is-live { opacity: 1; }

.layer-figure-hint {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--edge-soft);
  color: var(--bone-3);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.layer-figure-hint b { color: var(--bone); font-weight: 500; }

/* layer cards ----------------------------------------------------------- */

.layer-flow { display: grid; gap: clamp(28px, 4vw, 54px); }

.layer-card {
  position: relative;
  padding: clamp(26px, 3vw, 38px) clamp(22px, 3vw, 38px) clamp(24px, 3vw, 34px);
  background: linear-gradient(180deg, var(--table-2), rgba(14, 26, 23, 0.55));
  border: 1px solid var(--edge-soft);
  border-left: 3px solid var(--layer-hue, var(--flag));
  border-radius: 4px;
}
.layer-card[data-layer-card="access"]   { --layer-hue: var(--flag); }
.layer-card[data-layer-card="water"]    { --layer-hue: var(--water); }
.layer-card[data-layer-card="ground"]   { --layer-hue: var(--soil); }
.layer-card[data-layer-card="services"] { --layer-hue: var(--services); }
.layer-card[data-layer-card="rights"]   { --layer-hue: var(--rights); }

.layer-index {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--layer-hue);
}
.layer-index b { font-size: 0.92rem; font-weight: 500; }

.layer-card h3 {
  margin: 16px 0 0;
  max-width: 18ch;
  font-size: clamp(1.6rem, 2.5vw, 2.3rem);
}
.layer-lead { margin-top: 16px; max-width: 50ch; color: var(--bone-2); }

.layer-facts { margin: 26px 0 0; display: grid; gap: 0; }
.layer-facts dt {
  padding-top: 16px;
  border-top: 1px solid var(--edge-soft);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-3);
}
.layer-facts dd {
  margin: 6px 0 16px;
  max-width: 54ch;
  color: var(--bone);
  font-size: 0.94rem;
}
.layer-facts dd em { color: var(--layer-hue); font-style: italic; }

.layer-track {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 8px;
  padding: 10px 18px 10px 12px;
  background: transparent;
  border: 1px solid var(--edge);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bone-2);
  transition: border-color .18s, color .18s, background .18s;
}
.layer-track:hover { color: var(--bone); border-color: var(--layer-hue); }
.layer-track-box {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 1.5px solid var(--bone-3);
  border-radius: 3px;
  position: relative;
  transition: background .18s, border-color .18s;
}
.layer-track[aria-pressed="true"] { color: var(--night); background: var(--layer-hue); border-color: var(--layer-hue); }
.layer-track[aria-pressed="true"] .layer-track-box { background: var(--night); border-color: var(--night); }
.layer-track[aria-pressed="true"] .layer-track-box::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.5px;
  width: 5px;
  height: 10px;
  border: solid var(--layer-hue);
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

/* ------------------------------------------------------------------ stages */

.stages {
  background:
    linear-gradient(180deg, var(--table) 0%, var(--night) 24%, var(--night) 100%);
  border-top: 1px solid var(--edge-soft);
  padding-bottom: clamp(64px, 8vw, 112px);
}
.lede-dark h2 { max-width: 22ch; }

.stage-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(30px, 4vw, 64px);
  padding-top: clamp(40px, 5vw, 64px);
  align-items: start;
}

.stage-rail { position: sticky; top: 116px; }
.stage-rail ol { margin: 0; padding: 0; list-style: none; }
.stage-rail li { position: relative; }
.stage-rail li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 18px;
  bottom: -6px;
  width: 1px;
  background: var(--edge);
}
.stage-rail li:last-child::before { display: none; }
.stage-rail a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0 22px;
  color: var(--bone-3);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color .2s ease;
}
.stage-rail i {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
  border: 1.5px solid var(--bone-3);
  background: var(--night);
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.stage-rail a:hover { color: var(--bone); }
.stage-rail a.is-here { color: var(--bone); }
.stage-rail a.is-here i {
  background: var(--flag);
  border-color: var(--flag);
  box-shadow: 0 0 0 4px rgba(255, 122, 61, 0.18);
}

.stage-stack { display: grid; gap: clamp(22px, 3vw, 36px); }

/* Paper sheets on the dark table */
.sheet {
  position: relative;
  padding: clamp(26px, 3vw, 42px);
  color: var(--ink);
  background: var(--paper);
  border-radius: 3px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.42);
}
.sheet::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--paper-line);
  border-radius: 2px;
  pointer-events: none;
}
.sheet-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--paper-line);
}
.sheet-num {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 0.82;
  color: var(--flag);
}
.sheet-head h3 { font-size: clamp(1.45rem, 2.2vw, 2rem); }
.sheet-head > div > p { margin-top: 8px; color: var(--ink-2); font-size: 0.95rem; max-width: 46ch; }

.asks { margin: 0; padding: 0; list-style: none; }
.asks li {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 6px 26px;
  padding: 20px 0;
  border-bottom: 1px solid var(--paper-line);
}
.asks li:last-child { border-bottom: 0; padding-bottom: 4px; }
.ask-tag {
  grid-row: span 2;
  align-self: start;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1.5;
  padding-left: 14px;
  border-left: 3px solid currentColor;
}
.tag-self   { color: #2c6f8d; }
.tag-source { color: #7d5d15; }
.tag-ask    { color: #3e6b4d; }
.tag-pro    { color: #a5432a; }
.tag-stop   { color: #8b2f4f; }
.tag-next   { color: #145243; }
.ask-q { font-size: 1.06rem; font-weight: 700; letter-spacing: -0.015em; }
.ask-d { color: var(--ink-2); font-size: 0.93rem; max-width: 60ch; }

/* -------------------------------------------------------------------- file */

.file {
  padding-block: clamp(64px, 8vw, 108px);
  background:
    radial-gradient(80% 60% at 88% 0%, rgba(255, 122, 61, 0.1), transparent 60%),
    var(--table);
  border-top: 1px solid var(--edge-soft);
}
.file-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
  gap: clamp(34px, 4vw, 72px);
  align-items: start;
}
.file h2 { margin: 20px 0 0; max-width: 15ch; font-size: clamp(2rem, 3.6vw, 3.1rem); }
.file-lede { margin-top: 20px; max-width: 42ch; color: var(--bone-2); font-size: 1.02rem; }
.file-privacy {
  margin-top: 20px;
  padding: 14px 16px;
  max-width: 48ch;
  color: var(--bone-2);
  background: rgba(79, 163, 199, 0.08);
  border-left: 2px solid rgba(79, 163, 199, 0.5);
  font-size: 0.84rem;
}
.file-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.file-actions .btn-line { color: var(--bone-2); border-color: var(--edge); }
.file-actions .btn-line:hover { background: var(--bone); color: var(--night); border-color: var(--bone); }
.file-actions .btn-plain { color: var(--bone-3); }
.file-actions .btn-plain:hover { color: var(--bone); }
.file-transfer { margin-top: 16px; max-width: 50ch; color: var(--bone-3); font-size: 0.8rem; }
.file-transfer b { color: var(--bone-2); font-family: var(--mono); font-size: 0.76rem; }
.file-status {
  margin-top: 18px;
  min-height: 22px;
  color: var(--services);
  font-size: 0.86rem;
}
.file-history { margin-top: 18px; color: var(--bone-3); font-size: 0.82rem; }
.file-history h3 {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-2);
  margin-bottom: 8px;
}
.file-history p { max-width: 46ch; }
.file-history ul { margin: 10px 0 0; padding-left: 16px; }
.file-history li + li { margin-top: 4px; }

/* Controls that only do something with scripting available. */
.layer-track, .file-actions, .file-transfer, .file-status, .file-history, .file-card { display: none; }
.js .layer-track { display: inline-flex; }
.js .file-actions { display: flex; }
.js .file-transfer, .js .file-status { display: block; }
.js .file-history { display: block; }
.js .file-card { display: block; }
.file-noscript {
  margin-top: 26px;
  padding: 20px 22px;
  color: var(--bone-2);
  border: 1px solid var(--edge);
  border-radius: 4px;
}
.file-noscript ol { margin: 14px 0 0; padding-left: 20px; }
.file-noscript li { margin-bottom: 8px; }

/* the notebook ---------------------------------------------------------- */

.file-card { position: relative; }
.file-card::before,
.file-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper-2);
  border-radius: 3px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.file-card::before { transform: rotate(-1.1deg) translate(-6px, 6px); opacity: .5; }
.file-card::after { transform: rotate(0.7deg) translate(5px, 3px); opacity: .32; }

.notebook {
  position: relative;
  z-index: 1;
  padding: clamp(24px, 3vw, 38px);
  color: var(--ink);
  background:
    repeating-linear-gradient(180deg, transparent 0 33px, var(--paper-line) 33px 34px),
    var(--paper);
  border-radius: 3px;
  box-shadow: 0 30px 66px rgba(0, 0, 0, 0.46);
}
.notebook-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}
.notebook-title { font-family: var(--serif); font-size: 1.5rem; letter-spacing: -0.02em; }
.notebook-stamp {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a5432a;
  border: 1px solid rgba(165, 67, 42, 0.5);
  border-radius: 2px;
  padding: 4px 8px;
  transform: rotate(-2deg);
}

.nb-field { display: block; margin-top: 22px; }
.nb-field > span {
  display: block;
  margin-bottom: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.nb-field input,
.nb-field select,
.nb-field textarea {
  display: block;
  width: 100%;
  padding: 11px 2px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid rgba(18, 32, 28, 0.32);
  border-radius: 0;
}
.nb-field textarea { resize: vertical; line-height: 1.6; }
.nb-field input::placeholder, .nb-field textarea::placeholder { color: rgba(18, 32, 28, 0.48); }
.nb-field input:focus-visible,
.nb-field select:focus-visible,
.nb-field textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.nb-row { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 20px; }
.nb-row .nb-field { min-width: 0; }

.nb-layers { margin: 26px 0 0; padding: 0; border: 0; }
.nb-layers legend {
  padding: 0;
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-2);
}
.nb-layers-grid { display: grid; grid-template-columns: minmax(0, 1fr) 138px; gap: 26px; align-items: center; }
.nb-checks { display: grid; gap: 2px; }
.nb-check {
  display: grid;
  grid-template-columns: 18px 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 7px 8px 7px 4px;
  border-radius: 3px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background .16s ease;
}
.nb-check:hover { background: rgba(18, 32, 28, 0.05); }
.nb-check input { width: 17px; height: 17px; margin: 3px 0 0; accent-color: #a5432a; }
.nb-check b {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: #56655d;
  padding-top: 3px;
}
.nb-check[data-check="parcel"]    { --zone-hue: #b4491f; }
.nb-check[data-check="flood"]     { --zone-hue: #1f6f8d; }
.nb-check[data-check="soil"]      { --zone-hue: #8a6a1c; }
.nb-check[data-check="utilities"] { --zone-hue: #2c7a5c; }
.nb-check[data-check="title"]     { --zone-hue: #a53d70; }
.nb-check:has(input:checked) b { color: var(--zone-hue); }
.nb-check:has(input:checked) span { font-weight: 600; }

.nb-plat { width: 100%; height: auto; }
.nb-plat-fill { fill: rgba(18, 32, 28, 0.05); }
.nb-plat-edge { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.nb-zone { opacity: 0.14; transition: opacity .25s ease; }
.nb-zone.is-on { opacity: 1; }
.nb-zone path, .nb-zone rect, .nb-zone polygon { fill: none; stroke-width: 2; }
.nb-zone circle { stroke: var(--paper); stroke-width: 1.5; }
.nb-zone[data-zone="parcel"] path { stroke: #b4491f; }
.nb-zone[data-zone="parcel"] circle { fill: #b4491f; }
.nb-zone[data-zone="flood"] path { stroke: #1f6f8d; }
.nb-zone[data-zone="flood"] circle { fill: #1f6f8d; }
.nb-zone[data-zone="soil"] rect { stroke: #8a6a1c; stroke-dasharray: 5 4; }
.nb-zone[data-zone="soil"] circle { fill: #8a6a1c; }
.nb-zone[data-zone="utilities"] path { stroke: #2c7a5c; }
.nb-zone[data-zone="utilities"] circle { fill: #2c7a5c; }
.nb-zone[data-zone="title"] polygon { stroke: #a53d70; stroke-dasharray: 5 4; }
.nb-zone[data-zone="title"] circle { fill: #a53d70; }

/* dialog ---------------------------------------------------------------- */

.print-summary { display: none; }

.brief-dialog {
  width: min(640px, calc(100% - 28px));
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 4px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5);
}
.brief-dialog::backdrop { background: rgba(8, 17, 15, 0.72); backdrop-filter: blur(3px); }
.dialog-card { padding: 26px; }
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--paper-line);
}
.dialog-head p { font-family: var(--serif); font-size: 1.3rem; }
.dialog-close { background: transparent; border: 0; font-size: 1.6rem; line-height: 1; color: var(--ink-2); padding: 0 4px; }
.dialog-copy { margin-top: 18px; color: var(--ink-2); display: grid; gap: 14px; }
.dialog-warning {
  padding: 12px 14px;
  color: #7a3324;
  background: rgba(165, 67, 42, 0.09);
  border-left: 3px solid #a5432a;
  font-size: 0.88rem;
}
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.dialog-actions button {
  padding: 11px 18px;
  border: 1px solid rgba(18, 32, 28, 0.28);
  border-radius: 999px;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 700;
}
.dialog-actions button[data-primary="true"] { color: var(--paper); background: var(--ink); border-color: var(--ink); }

/* ----------------------------------------------------------------- answers */

.answers {
  padding-bottom: clamp(64px, 8vw, 104px);
  background: var(--night);
  border-top: 1px solid var(--edge-soft);
  overflow-x: clip;
}
.register { margin: clamp(34px, 4vw, 52px) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--edge); }
.register li { border-bottom: 1px solid var(--edge); }
.register a {
  position: relative;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 40px;
  gap: 8px 32px;
  padding: 26px 0;
  transition: padding .25s ease, color .2s ease;
}
.register a::before {
  content: "";
  position: absolute;
  left: -100vw;
  right: -100vw;
  top: 0;
  bottom: 0;
  background: rgba(255, 122, 61, 0.06);
  opacity: 0;
  transition: opacity .25s ease;
}
.register a:hover::before, .register a:focus-visible::before { opacity: 1; }
.register a:hover, .register a:focus-visible { padding-inline: 18px; }
.reg-when {
  grid-column: 1;
  grid-row: 1 / span 3;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--flag);
  padding-top: 6px;
}
.reg-who { grid-column: 2; grid-row: 1; font-family: var(--serif); font-size: clamp(1.3rem, 2.1vw, 1.85rem); letter-spacing: -0.02em; }
.reg-what { grid-column: 2; grid-row: 2; color: var(--bone-2); font-size: 0.92rem; max-width: 56ch; }
.reg-kind {
  grid-column: 2;
  grid-row: 3;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-3);
  padding-top: 8px;
}
.reg-go { grid-column: 3; grid-row: 1 / span 3; align-self: center; justify-self: end; font-size: 1.3rem; color: var(--bone-3); }
.register a:hover .reg-go { color: var(--flag); }

/* ----------------------------------------------------------------- sources */

.sources { padding-block: clamp(56px, 7vw, 96px); background: var(--table); border-top: 1px solid var(--edge-soft); }
.sources-inner { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(30px, 4vw, 70px); }
.sources h2 { margin: 18px 0 0; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.sources-note { margin-top: 22px; max-width: 46ch; color: var(--bone-3); font-size: 0.84rem; }
.sources-note b { color: var(--bone-2); }
.source-list { margin: 0; padding: 0; list-style: none; counter-reset: src; border-top: 1px solid var(--edge-soft); }
.source-list li { counter-increment: src; border-bottom: 1px solid var(--edge-soft); }
.source-list a { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 4px 14px; padding: 16px 0; }
.source-list a::before {
  content: counter(src, decimal-leading-zero);
  grid-row: span 2;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--flag);
  padding-top: 4px;
}
.source-list b { font-size: 0.98rem; font-weight: 600; }
.source-list span { color: var(--bone-3); font-size: 0.86rem; }
.source-list a:hover b { color: var(--flag); }

/* ----------------------------------------------------------------- closing */

.closing { padding-block: 40px 56px; background: var(--night); border-top: 1px solid var(--edge-soft); }
.closing-inner { display: flex; justify-content: space-between; align-items: baseline; gap: 26px; flex-wrap: wrap; }
.closing-line { max-width: 66ch; color: var(--bone-3); font-size: 0.82rem; }
.closing-top { color: var(--bone-2); font-size: 0.84rem; font-weight: 600; border-bottom: 1px solid var(--edge); padding-bottom: 3px; }
.closing-top:hover { color: var(--flag); border-color: var(--flag); }

/* ================================================================ responsive */

@media (max-width: 1080px) {
  .masthead-nav { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-plat { max-width: 660px; }
  .hero-callout {
    position: static;
    max-width: none;
    margin-top: 10px;
    background: none;
    backdrop-filter: none;
  }
  .hero-callout span { display: none; }
  .callout-a { margin-top: 22px; }
  /* Single column: the plat itself becomes the sticky element so it can hold
     position while every layer card scrolls underneath it. */
  .layers-stage { display: block; }
  .layer-figure {
    position: sticky;
    top: 74px;
    z-index: 5;
    padding-bottom: 18px;
    background: linear-gradient(180deg, var(--table) 90%, rgba(14, 26, 23, 0));
  }
  .layer-figure-sticky { position: static; }
  .layer-plat { max-height: 42vh; }
  .layer-flow { margin-top: 26px; }
  .stage-shell { grid-template-columns: 1fr; }
  .stage-rail { position: static; }
  .stage-rail ol { display: flex; flex-wrap: wrap; gap: 6px 22px; }
  .stage-rail li::before { display: none; }
  .stage-rail a { padding-bottom: 8px; }
  .file-inner { grid-template-columns: 1fr; }
  .sources-inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --shell: min(1220px, calc(100% - 32px)); }
  html { scroll-padding-top: 78px; }
  .masthead-inner { min-height: 64px; gap: 14px; }
  .masthead-cta { padding: 8px 13px; font-size: 0.78rem; }
  .hero { padding-top: 40px; }
  .hero h1 { font-size: clamp(2.2rem, 9vw, 3.2rem); }
  .hero-plat figcaption { margin-top: 18px; }
  .scroll-cue { display: none; }
  .layer-plat { max-height: 34vh; }
  .layer-figure-sticky { padding: 14px 14px 10px; }
  .lyr-label { font-size: 17px; }
  .lyr-label-quiet { font-size: 16px; }
  .asks li { grid-template-columns: 1fr; gap: 4px; }
  .ask-tag { grid-row: auto; margin-bottom: 6px; }
  .nb-row { grid-template-columns: 1fr; gap: 0; }
  .nb-layers-grid { grid-template-columns: 1fr; }
  .nb-plat { max-width: 240px; margin-inline: auto; }
  .register a { grid-template-columns: minmax(0, 1fr) 32px; gap: 6px 16px; }
  .reg-when { grid-column: 1 / -1; grid-row: 1; padding-top: 0; }
  .reg-who { grid-column: 1; grid-row: 2; }
  .reg-what { grid-column: 1; grid-row: 3; }
  .reg-kind { grid-column: 1; grid-row: 4; padding-top: 4px; }
  .reg-go { grid-column: 2; grid-row: 2 / span 3; }
  .file-actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 420px) {
  .sheet { padding: 22px 18px; }
  .sheet::before { inset: 7px; }
  .notebook { padding: 20px 16px; }
}

/* =================================================================== motion */

.js .reveal { opacity: 0; transform: translateY(26px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .3, 1); }

.js .plat-line { stroke-dashoffset: 1900; }
.js .hero.is-drawn .plat-line { transition: stroke-dashoffset 2.2s cubic-bezier(.25, .8, .3, 1); stroke-dashoffset: 0; }
.js .plat-monuments circle, .js .plat-bearings text, .js .plat-notes text { opacity: 0; }
.js .hero.is-drawn .plat-monuments circle,
.js .hero.is-drawn .plat-bearings text,
.js .hero.is-drawn .plat-notes text { opacity: 1; transition: opacity .8s ease 1.4s; }
.js .hero-callout { opacity: 0; transform: translateY(8px); }
.js .hero.is-drawn .hero-callout { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s ease; }
.js .hero.is-drawn .callout-a { transition-delay: 1.9s; }
.js .hero.is-drawn .callout-b { transition-delay: 2.2s; }
.js .hero.is-drawn .callout-c { transition-delay: 2.5s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .js .plat-line { stroke-dashoffset: 0; }
  .js .plat-monuments circle, .js .plat-bearings text, .js .plat-notes text,
  .js .hero-callout { opacity: 1; transform: none; }
}

/* ==================================================================== print */

@media print {
  html, body { background: #fff; color: #000; }
  .masthead, .hero, .layers, .stages, .answers, .sources, .closing,
  .file-copy, .file-card, .brief-dialog, .scroll-cue, .skip-link { display: none !important; }
  .file { padding: 0; background: #fff; }
  .file-inner { display: block; }
  .print-summary { display: block; color: #000; font-family: var(--sans); font-size: 11pt; }
  .print-summary h2 { font-family: var(--serif); font-size: 22pt; margin-bottom: 4pt; }
  .print-summary h3 {
    font-family: var(--sans);
    font-size: 9pt;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 16pt 0 5pt;
    padding-bottom: 3pt;
    border-bottom: 1px solid #999;
  }
  .print-summary ul { margin: 0; padding-left: 14pt; }
  .print-summary li { margin-bottom: 7pt; }
  .print-summary li strong { display: block; }
  .print-summary li span { color: #333; font-size: 9.5pt; }
  .print-kicker { font-size: 8pt; letter-spacing: 0.18em; text-transform: uppercase; color: #555; }
  .print-meta { font-size: 9pt; color: #444; margin-top: 3pt; }
  .print-disclaimer { margin-top: 10pt; padding: 7pt 9pt; border: 1px solid #999; font-size: 9pt; }
  a[href]::after { content: ""; }
}
