/* Prairie Contractor (working name) — field-book look: survey green, hi-vis orange,
   system fonts only (no web-font download), mobile-first. */
:root {
  --green-900: #0f3a2e;
  --green-800: #15523f;
  --green-700: #1d6a52;
  --green-50: #e9f2ee;
  --orange: #f2600c;
  --orange-ink: #b2440a;     /* AA on white for text/links */
  --hivis: #ffd23f;
  --ink: #16191d;
  --ink-2: #3a4048;
  --muted: #5b636d;
  --paper: #f5f6f3;
  --card: #ffffff;
  --line: #d9ddd6;
  --grid: rgba(21, 82, 63, .06);
  --radius: 10px;
  --max: 1100px;
  --read: 70ch;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --focus: 0 0 0 3px #fff, 0 0 0 6px var(--orange);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; color: var(--ink);
  background: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--green-800); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange-ink); }
a, .btn, .card, .site-nav a, .jump a, .need-picker, .hero-preview { transition: color .15s ease, background-color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.card:hover, .hero-preview:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15, 58, 46, .1); }
@media (prefers-reduced-motion: reduce) { .card:hover, .hero-preview:hover { transform: none; } }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--hivis); color: var(--ink); padding: 8px 14px; font-weight: 700; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header with hi-vis tape strip */
.tape { height: 6px; background: repeating-linear-gradient(-45deg, var(--orange) 0 14px, var(--ink) 14px 28px); }
.site-chrome { position: sticky; top: 0; z-index: 40; }
.site-header { background: var(--green-900); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-text { min-width: 0; }
.brand-name { font-weight: 800; letter-spacing: -.01em; font-size: 1.15rem; line-height: 1.15; display: block; white-space: nowrap; }
.brand-tag { display: block; font-size: .75rem; color: #b9d4c8; line-height: 1.2; }
.menu-btn { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; padding: 8px 12px; font: inherit; font-size: .95rem; cursor: pointer; }
.menu-btn .bars { width: 18px; height: 2px; background: #fff; box-shadow: 0 6px 0 #fff, 0 -6px 0 #fff; }
.site-nav { display: none; padding: 0 0 14px; }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-nav a { display: block; color: #fff; text-decoration: none; padding: 10px 12px; border-radius: 8px; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: rgba(255,255,255,.1); color: var(--hivis); }
@media (min-width: 860px) {
  .menu-btn { display: none; }
  .header-inner { min-height: 72px; }
  .site-nav, .site-nav.open { display: block; padding: 0; }
  .site-nav ul { display: flex; gap: 4px; }
  .site-nav a { padding: 8px 12px; font-size: .95rem; }
  .nav-row { display: flex; align-items: center; justify-content: space-between; }
}

/* Layout */
main { display: block; padding: 28px 0 56px; }
.crumbs { font-size: .875rem; color: var(--muted); margin: 0 0 12px; }
.crumbs a { color: var(--muted); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #9aa1a8; }
article, .prose { max-width: var(--read); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.015em; color: var(--ink); }
h1 { font-size: clamp(1.85rem, 5.5vw, 2.75rem); font-weight: 850; margin: 0 0 12px; }
h2 { font-size: clamp(1.35rem, 3.6vw, 1.75rem); font-weight: 800; margin: 40px 0 10px; padding-top: 6px; }
h3 { font-size: 1.15rem; font-weight: 750; margin: 26px 0 6px; }
p, ul, ol { margin: 0 0 14px; }
li { margin-bottom: 6px; }
.lede { font-size: 1.15rem; color: var(--ink-2); }
.meta { font-size: .875rem; color: var(--muted); margin: 0 0 18px; }
.eyebrow { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-ink); font-weight: 700; margin: 0 0 8px; }
strong { font-weight: 700; }
small { font-size: .85rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* Boxes */
.answer { background: var(--green-50); border: 1px solid #c8ddd3; border-left: 6px solid var(--green-800); border-radius: var(--radius); padding: 16px 18px; margin: 18px 0 22px; }
.answer > :last-child { margin-bottom: 0; }
.answer .label { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--green-800); display: block; margin-bottom: 4px; }
.disclose { font-size: .9rem; color: var(--ink-2); background: #fff; border: 1px dashed #b9bfb6; border-radius: 8px; padding: 10px 14px; margin: 0 0 18px; }
.disclose strong { color: var(--ink); }
.review { font-size: .9rem; background: #fff7d6; border: 1px solid #ecd27a; border-radius: 8px; padding: 10px 14px; margin: 0 0 18px; }
.warn { background: #fff; border-left: 5px solid var(--orange); border-radius: 8px; padding: 12px 16px; margin: 18px 0; box-shadow: 0 1px 0 var(--line); }
.warn > :last-child, .review > :last-child { margin-bottom: 0; }
.src { font-size: .85rem; color: var(--muted); }
.src a { color: var(--muted); }
.sources { font-size: .9rem; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-top: 36px; }
.sources h2 { font-size: 1.05rem; margin: 0 0 8px; padding: 0; }
.sources ul { padding-left: 18px; margin: 0; }

/* Checklist steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 18px 0; }
.steps > li { counter-increment: step; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 12px 60px; margin-bottom: 12px; }
.steps > li::before { content: counter(step); position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--green-800); color: #fff; font-weight: 800; display: grid; place-items: center; font-family: var(--mono); }
.steps h3 { margin: 2px 0 6px; }
.steps p:last-child, .steps ul:last-child { margin-bottom: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 16px 0 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
table.wide { min-width: 640px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
thead th { background: var(--green-900); color: #fff; font-weight: 700; font-size: .875rem; }
tbody th { font-weight: 700; background: #fafbf9; }
tr:last-child td, tr:last-child th { border-bottom: 0; }
td.num, th.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .9rem; }
@media (min-width: 620px) { td.num, th.num { white-space: nowrap; } td.num.wrap { white-space: normal; } }
caption { caption-side: bottom; text-align: left; padding: 8px 12px; font-size: .82rem; color: var(--muted); }

/* Cards / hubs */
.hero { padding: 10px 0 8px; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr); gap: 36px; } }
.hero h1 { font-size: clamp(2rem, 6.2vw, 3.15rem); max-width: 16ch; }
.hero .lede { max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.hero-actions .btn { min-height: 44px; }
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 18px 0 8px; }
@media (min-width: 680px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--green-800); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; }
.card.alt { border-top-color: var(--orange); }
.card h2, .card h3 { margin: 4px 0 6px; font-size: 1.2rem; }
.card p { color: var(--ink-2); font-size: .98rem; }
.card ul { padding-left: 18px; font-size: .98rem; }
.card .go { margin-top: auto; font-weight: 700; }
.card .tag { align-self: flex-start; }
.card a.stretch { text-decoration: none; color: var(--ink); }
.card a.stretch:hover { color: var(--orange-ink); }
.tag { display: inline-block; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; background: var(--green-50); color: var(--green-800); border-radius: 4px; padding: 2px 6px; font-weight: 700; }
.tag.orange { background: #ffe9db; color: var(--orange-ink); }
.pagelist { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; }
.pagelist li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 0; }
.pagelist a { font-weight: 700; font-size: 1.05rem; }
.pagelist p { margin: 4px 0 0; color: var(--ink-2); font-size: .95rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; background: var(--orange); color: #111; font-weight: 800; text-decoration: none; padding: 12px 18px; border-radius: 8px; border: 0; font: inherit; font-weight: 800; cursor: pointer; min-height: 44px; }
.btn:hover { background: #ff7a2e; color: #111; }
.btn.ghost { background: transparent; color: var(--green-800); border: 2px solid var(--green-800); }
.btn.ghost:hover { background: var(--green-800); color: #fff; }
.vendor-link::after { content: " ↗"; font-size: .85em; }

/* Calculators */
.calc { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 20px 0; box-shadow: 0 2px 0 var(--line); }
.calc fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.calc legend { font-weight: 800; font-size: 1.05rem; margin-bottom: 8px; padding: 0; }
.fields { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .fields { grid-template-columns: repeat(2, 1fr); } }
.field label { display: block; font-weight: 650; font-size: .92rem; margin-bottom: 4px; }
.field .hint { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 1rem; padding: 10px 12px; border: 1px solid #b8bfb6; border-radius: 8px; background: #fff; color: var(--ink); }
.field input[type="checkbox"] { width: auto; transform: scale(1.3); margin-right: 8px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: var(--focus); border-color: var(--green-800); }
.input-unit { position: relative; }
.results { background: var(--green-900); color: #fff; border-radius: 12px; padding: 16px 18px; margin-top: 8px; }
.results h2, .results h3 { color: #fff; margin: 0 0 10px; padding: 0; font-size: 1.15rem; }
.results dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0; }
.results dt { color: #cfe3da; }
.results dd { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; font-weight: 700; }
.results dt.big { color: #fff; font-weight: 800; align-self: center; }
.results dd.big { color: var(--hivis); font-size: 1.35rem; }
.results .rule { border-top: 1px solid rgba(255,255,255,.25); padding-top: 8px; margin-top: 4px; }

/* Forms (lead) */
.lead { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--orange); border-radius: 14px; padding: 18px; margin: 20px 0; }
.lead .fields { margin-bottom: 14px; }
.lead .full { grid-column: 1 / -1; }
.form-status { font-size: .9rem; color: var(--green-800); margin: 10px 0 0; min-height: 1em; }

/* Footer */
.site-footer { background: var(--ink); color: #c9ced4; font-size: .92rem; padding: 32px 0 40px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h2 { color: #fff; font-size: 1rem; margin: 0 0 8px; padding: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-note { border-top: 1px solid #333a42; margin-top: 22px; padding-top: 16px; font-size: .85rem; color: #9aa3ad; }

@media print {
  .site-header, .site-footer, .tape, .menu-btn, .lead, .jump, .find-btn, .find-panel, .toc, .related, .hero-visual, .need-picker, .site-chrome, .result-actions { display: none !important; }
  body { background: #fff; padding: 0; }
  .results { break-inside: avoid; color: #111; background: #fff; border: 2px solid #111; }
  .results h2, .results h3, .results dt, .results dd, .results dt.big { color: #111; }
  .results dd.big { color: #15523f; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Calculators: inputs left, sticky results right on wide screens */
.field { display: flex; flex-direction: column; justify-content: flex-end; }
@media (min-width: 1040px) {
  .calc { width: min(1060px, calc(100vw - 40px)); display: grid; grid-template-columns: minmax(0, 1fr) 340px; column-gap: 24px; align-items: start; }
  .calc > fieldset, .calc > p, .calc > noscript { grid-column: 1; }
  .calc > .results { grid-column: 2; grid-row: 1 / span 6; position: sticky; top: 96px; margin-top: 0; }
}

/* ---- 2026-11-14 polish: header find, jump bar, TOC, related, hero visual ---- */
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.find-btn, .menu-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; padding: 8px 12px; font: inherit; font-size: .95rem; cursor: pointer; min-height: 44px; min-width: 44px; }
.find-btn:hover, .menu-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.find-panel { background: #0c2f25; border-top: 1px solid rgba(255,255,255,.12); padding: 14px 0 16px; }
.find-box label { display: block; color: #cfe3da; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.find-box input[type="search"] { width: 100%; font: inherit; font-size: 1.05rem; padding: 12px 14px; border-radius: 8px; border: 1px solid #2d5a4a; background: #fff; color: var(--ink); min-height: 44px; }
.find-box input[type="search"]:focus { outline: none; box-shadow: var(--focus); }
#find-results { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
#find-results a { display: block; background: #15523f; color: #fff; text-decoration: none; padding: 10px 12px; border-radius: 8px; min-height: 44px; }
#find-results a:hover, #find-results a:focus { background: #1d6a52; color: var(--hivis); }
.find-hub { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: #ffd23f; }
.find-title { display: block; font-weight: 700; }
.find-desc { display: block; font-size: .85rem; color: #cfe3da; }
.find-empty { color: #cfe3da; padding: 8px 0; }

/* Bottom quick-jump, mobile only */
.jump { display: none; }
@media (max-width: 859px) {
  body { padding-bottom: 72px; }
  .jump { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--green-900); border-top: 3px solid var(--orange); padding: 4px 2px calc(4px + env(safe-area-inset-bottom)); }
  .jump a { color: #cfe3da; text-decoration: none; font-size: .72rem; font-weight: 700; text-align: center; padding: 10px 2px; min-height: 52px; display: flex; align-items: flex-end; justify-content: center; line-height: 1.15; }
  .jump a[aria-current="page"], .jump a:hover { color: var(--hivis); }
}

/* On-page contents */
.toc { background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--green-800); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 22px; max-width: var(--read); }
.toc-h { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--green-800); margin: 0 0 6px; }
.toc ol { margin: 0; padding-left: 18px; }
.toc li { margin: 0 0 4px; }
.toc a { font-weight: 600; }

/* Related */
.related { margin: 40px 0 0; padding: 18px 0 0; border-top: 2px solid var(--line); max-width: var(--read); }
.related h2 { margin: 0 0 10px; padding: 0; font-size: 1.15rem; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.related a { display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-weight: 700; text-decoration: none; min-height: 44px; }
.related a:hover { border-color: var(--green-700); color: var(--green-800); }

/* Home picker + calculator preview */
.need-picker { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 20px 0 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.need-picker label { font-weight: 700; font-size: .92rem; display: block; margin-bottom: 4px; }
.need-picker .need-field { flex: 1 1 220px; }
.need-picker select { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #b8bfb6; border-radius: 8px; background: #fff; min-height: 44px; color: var(--ink); }
.need-picker .btn { flex: none; }
.need-links { margin: 8px 0 0; font-size: .9rem; }
.hero-visual { position: relative; }
.hero-art { width: 100%; height: auto; display: block; }
.hero-preview { position: absolute; right: 4%; bottom: 6%; left: auto; width: min(230px, 72%); background: var(--green-900); color: #fff; text-decoration: none; border-radius: 12px; padding: 14px 16px; box-shadow: 0 12px 30px rgba(15, 58, 46, .35); border: 1px solid rgba(255,255,255,.12); }
.hero-preview:hover { color: #fff; }
.hero-preview .eyebrow { color: var(--hivis); margin: 0 0 4px; }
.hero-preview strong { display: block; font-size: 1.85rem; line-height: 1.1; letter-spacing: -.02em; color: #fff; }
.hero-preview .sub { display: block; color: #cfe3da; font-size: .9rem; margin: 4px 0 8px; }
.hero-preview .go { color: var(--hivis); font-weight: 800; }

.result-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.2); }
.result-actions .btn.ghost { color: #fff; border-color: rgba(255,255,255,.55); min-height: 44px; }
.result-actions .btn.ghost:hover { background: #fff; color: var(--green-900); }
.copy-status { font-size: .85rem; color: var(--hivis); }

@media (min-width: 860px) {
  .jump { display: none !important; }
  body { padding-bottom: 0; }
}

@media (min-width: 860px) { .menu-btn { display: none; } }

.disclaimer { font-size: .95rem; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 0 0 18px; max-width: var(--read); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }


/* Narrow screens: keep the brand on one line */
@media (max-width: 419px) {
  .site-header .wrap { padding-left: 12px; padding-right: 12px; }
  .header-inner { gap: 8px; min-height: 56px; }
  .header-actions { gap: 6px; }
  .brand { gap: 8px; flex: 1 1 auto; min-width: 0; }
  .brand svg { width: 30px; height: 30px; }
  .brand-name { font-size: 1.02rem; }
  .brand-tag { display: none; }
  .find-btn, .menu-btn { padding: 8px; }
  .find-btn .btn-label {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
@media (max-width: 379px) {
  /* At 360px, Menu text plus the brand can still wrap; icon-only Menu too. */
  .menu-btn .btn-label {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
