:root {
  --paper-field: #f6f0e3;
  --ink-pine: #1e2925;
  --deep-grove: #17463d;
  --sun-clay: #9a432f;
  --soft-sedge: #dfe7d3;
  --cream-panel: #fffaf0;
  --quiet-line: #a8ae9b;
  --open-sky: #d8e8e5;
  --shadow-earth: rgba(43, 48, 39, .14);
}

* { box-sizing: border-box; }
html { background: var(--paper-field); color: var(--ink-pine); font-size: 18px; scroll-behavior: smooth; }
body { margin: 0; min-width: 0; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.6; overflow-wrap: break-word; }
a { color: var(--deep-grove); text-decoration-thickness: .09em; text-underline-offset: .18em; }
a:hover { color: var(--sun-clay); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--sun-clay); outline-offset: 4px; border-radius: .15rem; }
.skip-to-notes { position: fixed; inset: .5rem auto auto .5rem; z-index: 20; padding: .7rem 1rem; background: var(--ink-pine); color: white; transform: translateY(-160%); }
.skip-to-notes:focus { transform: none; }

.ranch-mast { border-bottom: 1px solid var(--quiet-line); background: var(--cream-panel); }
.mast-inner { width: min(94vw, 82rem); margin-inline: auto; padding: 1.2rem 0 .7rem; }
.site-name { display: inline-flex; min-height: 44px; align-items: center; color: var(--ink-pine); font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 700; text-decoration: none; letter-spacing: -.025em; }
.place-line { margin: -.2rem 0 .65rem; font-size: .9rem; color: #4b554d; }
.rangeland-links { display: flex; flex-wrap: wrap; gap: .1rem .35rem; border-top: 1px solid #d1d1c2; padding-top: .45rem; }
.rangeland-links a { min-height: 44px; display: inline-flex; align-items: center; padding: .35rem .65rem; color: var(--ink-pine); font-size: .86rem; font-weight: 600; text-decoration: none; border-radius: 999px; }
.rangeland-links a[aria-current="page"] { background: var(--deep-grove); color: #fff; }

main { width: min(94vw, 82rem); margin-inline: auto; padding: clamp(2rem, 5vw, 4.5rem) 0; }
.trail { margin: 0 0 .9rem; font-size: .85rem; color: #505b52; }
.trail a { min-height: 44px; display: inline-flex; align-items: center; }
.page-frame { width: min(100%, 74rem); margin-inline: auto; }
article { min-width: 0; }
h1, h2, h3 { font-family: Charter, Georgia, Cambria, "Times New Roman", serif; line-height: 1.12; text-wrap: balance; color: #183b34; }
h1 { margin: 0 0 1rem; max-width: 18ch; font-size: clamp(2.25rem, 7vw, 4.35rem); letter-spacing: -.045em; }
h2 { margin: 2.8rem 0 .8rem; font-size: clamp(1.55rem, 4vw, 2.25rem); letter-spacing: -.02em; }
h3 { margin: 1.8rem 0 .55rem; font-size: 1.18rem; }
p, li { max-width: 68ch; }
.direct-answer { margin: 0 0 1.4rem; font-size: clamp(1.13rem, 2.3vw, 1.35rem); line-height: 1.5; }
.review-stamp { display: inline-block; margin: .3rem 0 1.6rem; font-size: .85rem; color: #505b52; }

.urgent-fork { margin: 1.8rem 0 2.5rem; padding: 1.1rem; background: var(--deep-grove); color: #fff; border-radius: 1.1rem; box-shadow: 0 .7rem 1.8rem var(--shadow-earth); }
.urgent-fork h2 { color: #fff; margin: .1rem 0 .85rem; font-size: 1.55rem; }
.urgent-fork div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.urgent-fork a { min-height: 88px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: .8rem .9rem; background: var(--cream-panel); color: var(--deep-grove); border-radius: 12px; font-weight: 700; text-decoration: none; }
.urgent-fork small { display: block; margin-top: .18rem; color: #4b554d; font-size: .89rem; font-weight: 500; line-height: 1.45; }
.urgent-fork a:hover { background: var(--soft-sedge); }

.topic-directory { margin-top: 2rem; }
.topic-directory h2 { margin-bottom: 1rem; }
.topic-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.topic-groups section { padding: 1rem; background: transparent; border: 1px solid #b9bdad; border-radius: 12px; }
.topic-groups h3 { margin: 0 0 .35rem; }
.topic-groups ul { margin: .25rem 0 0; padding: 0; list-style: none; }
.topic-groups a { display: block; min-height: 44px; padding: .45rem 0; font-weight: 700; }
.topic-groups small { display: block; font-size: .89rem; line-height: 1.5; color: #4b554d; }

.first-route { margin: 1.5rem 0 2rem; padding: 1.15rem; background: var(--open-sky); border: 1px solid #9db8b2; border-radius: .9rem; }
.first-route strong { display: block; margin-bottom: .35rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.official-door { min-height: 48px; display: inline-flex; align-items: center; margin-top: .7rem; padding: .65rem .9rem; border: 1px solid var(--deep-grove); border-radius: 12px; background: var(--cream-panel); color: var(--deep-grove); font-weight: 700; text-decoration: none; }
.official-door:hover { color: #fff; background: var(--sun-clay); border-color: var(--sun-clay); }

.step-run { counter-reset: ranchstep; list-style: none; padding: 0; }
.step-run > li { counter-increment: ranchstep; position: relative; margin: 1rem 0; padding: 1.1rem 1rem 1.1rem 3.8rem; background: var(--cream-panel); border: 1px solid #cbcbbb; border-radius: .85rem; }
.step-run > li::after { content: counter(ranchstep); position: absolute; top: 1rem; left: 1rem; width: 2rem; height: 2rem; display: grid; place-items: center; background: var(--sun-clay); color: #fff; border-radius: 50%; font-family: Arial, sans-serif; font-weight: 700; }
.step-run strong { display: block; margin-bottom: .2rem; }

.record-caution, .phase-note, .storm-margin { margin: 1.5rem 0; padding: 1rem 1.1rem; border: 1px solid var(--quiet-line); border-radius: .8rem; background: #f1ecdc; }
.record-caution strong, .phase-note strong, .storm-margin strong { color: var(--sun-clay); }
.weather-sill { margin: 2rem 0; padding: 1.15rem; background: var(--open-sky); color: var(--ink-pine); border: 1px solid #9db8b2; border-radius: 16px; }
.weather-sill h2 { color: #183b34; margin: 0 0 .4rem; font-size: 1.45rem; }
.weather-sill p { margin: .4rem 0; }
.weather-sill a { color: var(--deep-grove); font-weight: 700; }
.weather-sill [aria-live] { font-size: .89rem; }

.covering-ledger { width: 100%; border-collapse: collapse; margin: 1.4rem 0 2rem; background: var(--cream-panel); }
.covering-ledger th, .covering-ledger td { padding: .75rem; border: 1px solid #b8b9a8; text-align: left; vertical-align: top; }
.covering-ledger th { background: var(--deep-grove); color: #fff; }
.covering-ledger caption { text-align: left; font-weight: 700; margin-bottom: .55rem; }

.source-shelf { margin-top: 3.5rem; padding-top: 1.2rem; border-top: 1px solid var(--quiet-line); }
.source-shelf h2 { margin-top: 0; font-size: 1.45rem; }
.source-shelf li { margin: .6rem 0; }
.source-shelf a { overflow-wrap: anywhere; }
.law-check { font-size: .85rem; color: #4d574f; }

.place-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1.4rem 0 2rem; }
.place-facts div { padding: 1rem; border: 1px solid #b9bdad; border-radius: 12px; background: transparent; }
.place-facts dt { margin: 0 0 .25rem; color: #4b554d; font-size: .84rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.place-facts dd { margin: 0; font-weight: 700; }

.closing-ground { margin-top: 1.5rem; border-top: 1px solid var(--quiet-line); background: #263a33; color: #eef3e8; }
.closing-inner { width: min(94vw, 82rem); margin-inline: auto; padding: 1.4rem 0 1.7rem; display: flex; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.closing-inner p { margin: .3rem 0; max-width: 30rem; }
.closing-map { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .1rem .65rem; max-width: 38rem; }
.closing-map a { min-height: 44px; display: inline-flex; align-items: center; color: #fff; font-family: Arial, sans-serif; font-size: .9rem; }

.not-found-shell { min-height: 100svh; display: flex; flex-direction: column; }
.not-found-shell main { flex: 1; display: grid; align-content: center; }
.not-found-shell h1 { max-width: 13ch; }

@media (max-width: 48rem) {
  html { font-size: 17px; }
  .mast-inner, main, .closing-inner { width: min(92vw, 42rem); }
  .mast-inner { padding-top: .85rem; }
  .rangeland-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; padding-top: .25rem; }
  .rangeland-links a { justify-content: flex-start; padding-inline: .55rem; border-radius: 0; border-bottom: 1px solid #dedecf; font-size: 15px; text-align: left; }
  .rangeland-links a:nth-last-child(-n+2) { border-bottom: 0; }
  .rangeland-links a[aria-current="page"] { border-radius: 8px; }
  h1 { font-size: clamp(2rem, 10vw, 2.4rem); }
  .urgent-fork div { grid-template-columns: 1fr; }
  .urgent-fork a { min-height: 52px; }
  .topic-groups { grid-template-columns: 1fr 1fr; }
  .place-facts { grid-template-columns: 1fr; }
  .closing-inner { display: block; }
  .closing-map { justify-content: flex-start; margin-top: 1rem; }
  .covering-ledger, .covering-ledger tbody, .covering-ledger tr, .covering-ledger td { display: block; width: 100%; }
  .covering-ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .covering-ledger tr { margin: .75rem 0; border: 1px solid #b8b9a8; border-radius: .7rem; overflow: hidden; }
  .covering-ledger td { display: grid; grid-template-columns: minmax(7.5rem, 40%) 1fr; gap: .65rem; border: 0; border-bottom: 1px solid #d1d1c5; padding: .65rem; }
  .covering-ledger td:last-child { border-bottom: 0; }
  .covering-ledger td::before { content: attr(data-ranch-col); font-family: Arial, sans-serif; font-weight: 700; }
}

@media (max-width: 25rem) {
  .rangeland-links { grid-template-columns: repeat(2, 1fr); }
  .topic-groups { grid-template-columns: 1fr; }
  .step-run > li { padding-left: 3.45rem; }
}

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