/* HuntingPrime.com — field reference stylesheet. See /DESIGN.md. */

:root {
  color-scheme: light;
  --paper: #F5F4EE;
  --paper-2: #ECEBE3;
  --white: #FFFFFF;
  --ink: #1A1D1A;
  --ink-2: #3A403B;
  --muted: #5B655E;
  --rule: #D6D5CC;
  --rule-strong: #B9B8AE;
  --spruce: #1F3D2B;
  --spruce-2: #2A5039;
  --spruce-tint: #E4EBE6;
  --orange: #E8590C;
  --orange-ink: #B94407;
  --orange-tint: #FBE9DE;
  --ok: #2F6B45;
  --caution-ink: #8A5A00;
  --caution-bg: #FBF1D6;
  --error-ink: #9B2C1E;
  --error-bg: #F9E4DF;

  --font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-label: "Archivo Narrow", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --container: 1160px;
  --prose: 720px;
  --aside: 300px;
  --gutter: 24px;
  --t: 150ms ease-out;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

a { color: var(--spruce); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; transition: color var(--t); }
a:hover { color: var(--spruce-2); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
img, svg, video { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }
li > ul, li > ol { margin-top: 6px; margin-bottom: 0; }
strong { font-weight: 600; }
small, .small { font-size: 15px; }
code, kbd { font-family: var(--font-mono); font-size: 0.92em; background: var(--paper-2); padding: 0.05em 0.35em; border-radius: 2px; }
pre { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px; padding: 12px 16px; overflow-x: auto; font-family: var(--font-mono); font-size: 0.9rem; }
pre code { background: none; padding: 0; }
blockquote { margin: 0 0 16px; padding: 12px 16px; border-left: 3px solid var(--spruce); background: var(--white); color: var(--ink-2); }
mark { background: var(--caution-bg); color: var(--ink); padding: 0 0.15em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; margin: 0 0 12px; text-wrap: balance; }
h1 { font-size: clamp(30px, 3.2vw, 42px); font-weight: 700; letter-spacing: -0.012em; }
h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.008em; }
h3 { font-size: 20px; font-weight: 600; }
h4 { font-size: 17px; font-weight: 600; }
h5, h6 { font-size: 15px; font-weight: 600; font-family: var(--font-label); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }

.eyebrow, .label {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Layout primitives */
.container { width: min(var(--container), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.section { padding-block: 48px; }
.section--tight { padding-block: 32px; }
.section--rule { border-top: 1px solid var(--rule); }
.grid { display: grid; gap: 24px; }
@media (min-width: 720px) { .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1;
  border: 1px solid var(--spruce); border-radius: 2px;
  background: var(--spruce); color: var(--white);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.btn:hover { background: var(--spruce-2); border-color: var(--spruce-2); color: var(--white); }
.btn--accent { background: var(--orange); border-color: var(--orange); color: var(--white); }
.btn--accent:hover { background: #D14F08; border-color: #D14F08; color: var(--white); }
.btn--ghost { background: transparent; color: var(--spruce); }
.btn--ghost:hover { background: var(--spruce-tint); color: var(--spruce); }
.btn--small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn--block { width: 100%; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 50; }
.site-header__bar { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__mark { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -0.02em; color: var(--ink); }
.brand__mark span { color: var(--spruce); }
.brand__tag { font-family: var(--font-label); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--rule); padding-left: 10px; }
.site-nav { display: none; list-style: none; margin: 0 0 0 auto; padding: 0; gap: 4px; }
.site-nav a { display: block; padding: 8px 10px; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--spruce); }
.site-nav .active a { color: var(--spruce); border-bottom-color: var(--orange); }
.site-header__cta { display: none; }
.menu-toggle { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; background: none; border: 1px solid var(--rule); border-radius: 2px; font: inherit; font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink); cursor: pointer; }
.menu-toggle__icon { width: 18px; height: 2px; background: currentColor; position: relative; }
.menu-toggle__icon::before, .menu-toggle__icon::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.menu-toggle__icon::before { top: -6px; } .menu-toggle__icon::after { top: 6px; }
.mobile-nav { display: none; border-top: 1px solid var(--rule); background: var(--white); }
.mobile-nav[data-open="true"] { display: block; }
.mobile-nav .site-nav { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 8px 0; }
.mobile-nav .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 17px; }
.mobile-nav .site-nav li:last-child a { border-bottom: 0; }
.mobile-nav__cta { padding: 12px 0 16px; }
@media (min-width: 960px) {
  .site-nav { display: flex; }
  .site-header__cta { display: inline-flex; }
  .menu-toggle, .mobile-nav { display: none !important; }
  .brand__tag { display: inline; }
}
@media (max-width: 959px) { .brand__tag { display: none; } }

/* Breadcrumbs */
.breadcrumbs { font-family: var(--font-label); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--spruce); text-decoration: underline; }
.breadcrumbs li + li::before { content: "/"; color: var(--rule-strong); margin-right: 6px; }
.breadcrumbs [aria-current] { color: var(--ink-2); }

/* Page header */
.page-head { padding: 32px 0 24px; border-bottom: 1px solid var(--rule); }
.page-head h1 { margin: 10px 0 10px; max-width: 22ch; }
.page-head__sub { font-size: 19px; color: var(--ink-2); max-width: 60ch; margin: 0 0 12px; }
.page-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); align-items: center; }
.page-meta a { color: var(--ink-2); }
.page-meta .mono { font-size: 13px; }

/* Article layout */
.page-body { padding: 32px 0 64px; }
.layout { display: grid; gap: 40px; align-items: start; }
.layout--aside { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) {
  .layout--aside { grid-template-columns: minmax(0, 1fr) var(--aside); gap: 56px; }
  .layout__aside { position: sticky; top: 84px; display: grid; gap: 24px; }
}
.article { max-width: var(--prose); }
.layout--aside .article { max-width: none; }
.layout--aside .article > p, .layout--aside .article > ul, .layout--aside .article > ol, .layout--aside .article > blockquote, .layout--aside .article > h2, .layout--aside .article > h3, .layout--aside .article > h4 { max-width: var(--prose); }

.article > h2 { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule); }
.article > h2:first-child, .article > hr + h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.article > hr { margin: 40px 0 24px; }
.article > h3 { margin-top: 32px; }
.article > h4 { margin-top: 24px; }
.article p:first-of-type { font-size: 18px; color: var(--ink-2); }
.article img { max-width: 640px; width: 100%; border: 1px solid var(--rule); border-radius: 4px; margin: 20px 0 24px; background: var(--white); }
.article > p > img:only-child { margin-top: 8px; }
.article table + p > img { margin-top: 8px; }
.article ul li::marker { color: var(--spruce); }

/* Tables */
.article table, table.table {
  width: 100%; border-collapse: collapse; margin: 16px 0 12px;
  background: var(--white); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden;
  font-size: 15px; line-height: 1.45;
}
.article th, table.table th {
  text-align: left; padding: 10px 12px;
  font-family: var(--font-label); font-weight: 600; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-2); background: var(--paper-2); border-bottom: 1px solid var(--rule-strong);
}
.article td, table.table td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.article tbody tr:last-child td, table.table tbody tr:last-child td { border-bottom: 0; }
.article tbody tr:nth-child(even) td, table.table tbody tr:nth-child(even) td { background: #FAF9F4; }
table.table td:nth-child(2), table.table td:nth-child(3) { font-family: var(--font-mono); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.article table caption { text-align: left; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0 12px; }
.table-wrap > table { margin: 0; }
table.table td:nth-child(4) { min-width: 260px; }
@media (max-width: 720px) {
  .table-wrap > table.table { min-width: 720px; }
  table.table td:nth-child(4) { min-width: 380px; }
  .article table, table.table { font-size: 14px; }
  .table-wrap { position: relative; }
  .table-wrap::after { content: "scroll for notes →"; display: block; font-family: var(--font-label); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 6px 0 0; }
}

/* Stamp / provenance */
.stamp, .data-provenance {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  margin: 0 0 28px; padding: 10px 0 0;
  border-top: 2px solid var(--orange);
  font-size: 14px; color: var(--muted);
}
.data-provenance a { color: var(--ink-2); word-break: break-all; }
.tc-badge {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 2px;
  font-family: var(--font-label); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--orange-tint); color: var(--orange-ink); border: 1px solid #F2C4A8;
}
.tc-badge--green { background: var(--spruce-tint); color: var(--spruce); border-color: #BFD1C5; }
.data-source-link { font-family: var(--font-label); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); text-decoration: none; margin-left: 4px; }
.data-source-link:hover { color: var(--spruce); text-decoration: underline; }
.text-gray { color: var(--muted); }

/* Fact panel */
.facts { background: var(--white); border: 1px solid var(--rule); border-top: 3px solid var(--spruce); border-radius: 4px; padding: 16px 18px 18px; }
.facts__title { font-family: var(--font-display); font-weight: 700; font-size: 17px; margin: 0 0 2px; }
.facts__sub { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; }
.facts dt { font-family: var(--font-label); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.facts dd { margin: 0; color: var(--ink); }
.facts dd .mono { font-size: 13px; }
.facts dd.est::after { content: " est."; font-family: var(--font-label); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--orange-ink); }
.facts__stamp { margin: 14px 0 0; padding-top: 10px; border-top: 2px solid var(--orange); font-size: 13px; color: var(--muted); }
.facts__stamp a { color: var(--ink-2); }
.facts__links { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--rule); display: grid; gap: 6px; font-size: 14px; }
.facts__links a { text-decoration: none; }
.facts__links a:hover { text-decoration: underline; }
.facts__links li[aria-current] { color: var(--muted); }

/* TOC */
.toc { border: 1px solid var(--rule); border-radius: 4px; padding: 14px 16px; background: var(--paper-2); font-size: 14px; }
.toc__title { font-family: var(--font-label); font-weight: 600; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.toc nav ul { list-style: none; margin: 0; padding: 0; }
.toc nav ul ul { padding-left: 12px; margin-top: 4px; border-left: 1px solid var(--rule); }
.toc nav li { margin: 0 0 5px; line-height: 1.35; }
.toc nav a { color: var(--ink-2); text-decoration: none; }
.toc nav a:hover { color: var(--spruce); text-decoration: underline; }
@media (min-width: 1024px) { .toc { max-height: calc(100vh - 140px); overflow: auto; } }
details.toc summary { cursor: pointer; font-family: var(--font-label); font-weight: 600; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
details.toc[open] summary { margin-bottom: 8px; }

/* Footnotes → Sources */
.footnotes { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); }
.footnotes hr { display: none; }
.footnotes::before { content: "Sources"; display: block; font-family: var(--font-label); font-weight: 600; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.footnotes ol { padding-left: 20px; }
.footnotes li { margin-bottom: 8px; }
.footnotes a { word-break: break-word; }
.footnote-ref, sup[id^="fnref"] a { font-family: var(--font-mono); font-size: 0.72em; text-decoration: none; color: var(--orange-ink); padding: 0 1px; }
.footnote-backref { text-decoration: none; }

/* Inline shortcode blocks */
.state-quick-links { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px; padding: 12px 16px; margin: 0 0 20px; font-size: 15px; }
.state-quick-links strong { font-family: var(--font-label); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 6px; }
.state-quick-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.state-quick-links li { margin: 0; }
.gear-species-link { font-size: 15px; color: var(--muted); }

/* Related + notices */
.related { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); }
.related h2 { font-size: 15px; font-family: var(--font-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; border: 0; padding: 0; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.related a { text-decoration: none; }
.related a:hover { text-decoration: underline; }
.notice { margin-top: 24px; padding: 12px 16px; border: 1px solid var(--rule); border-radius: 4px; background: var(--white); font-size: 14px; color: var(--ink-2); }
.notice--caution { background: var(--caution-bg); border-color: #E7D4A2; color: var(--caution-ink); }
.disclosure { font-size: 14px; color: var(--muted); border-left: 3px solid var(--rule-strong); padding: 6px 12px; margin: 0 0 20px; }

/* Cards / lists used on hubs and home */
.card { background: var(--white); border: 1px solid var(--rule); border-radius: 4px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; font-size: 18px; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.card .more { margin-top: auto; padding-top: 6px; font-family: var(--font-display); font-weight: 600; font-size: 14px; text-decoration: none; }
.card .more:hover { text-decoration: underline; }
.linklist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.linklist li { margin: 0; border-bottom: 1px solid var(--rule); }
.linklist a { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 12px 0; text-decoration: none; color: var(--ink); }
.linklist a:hover { color: var(--spruce); }
.linklist .meta { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Home */
.home-intro { padding: 48px 0 40px; border-bottom: 1px solid var(--rule); background: var(--white); }
.home-intro h1 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 800; letter-spacing: -0.02em; max-width: 18ch; margin: 8px 0 14px; }
.home-intro p.lede { font-size: 19px; color: var(--ink-2); max-width: 58ch; margin: 0 0 24px; }
.finder { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.finder select { font: inherit; font-family: var(--font-display); font-weight: 600; min-height: 44px; padding: 0 40px 0 12px; border: 1px solid var(--rule-strong); border-radius: 2px; background: var(--white) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><path d='M2 5l5 5 5-5' fill='none' stroke='%231A1D1A' stroke-width='1.6'/></svg>") no-repeat right 12px center; appearance: none; min-width: 240px; color: var(--ink); }
.finder__note { font-size: 14px; color: var(--muted); }
.states { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .states { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .states { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.states li { margin: 0; background: var(--white); }
.states a { display: block; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.states a:hover { background: var(--spruce-tint); }
.states .name { font-family: var(--font-display); font-weight: 600; display: block; }
.states .meta { display: block; font-size: 12px; color: var(--muted); font-family: var(--font-mono); margin-top: 2px; }
.pillars { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 720px) { .pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pillars > div { background: var(--white); padding: 20px 22px; }
.pillars h3 { margin: 4px 0 8px; font-size: 18px; }
.pillars p { margin: 0; font-size: 15px; color: var(--ink-2); }
.pillars a.more { display: inline-block; margin-top: 10px; font-family: var(--font-display); font-weight: 600; font-size: 14px; text-decoration: none; }
.method { display: grid; gap: 24px; }
@media (min-width: 900px) { .method { grid-template-columns: 1.1fr 1fr; gap: 56px; } }
.method ol { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.method ol li { counter-increment: step; position: relative; padding: 0 0 14px 40px; margin: 0; }
.method ol li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 2px; font-family: var(--font-mono); font-size: 13px; color: var(--orange-ink); }
.method ol li strong { display: block; font-family: var(--font-display); }

/* Forms (contact) */
.contact-card { background: var(--white); border: 1px solid var(--rule); border-radius: 4px; padding: 18px 20px; margin: 16px 0 20px; }
.contact-card p { margin: 0 0 8px; }

/* Footer */
.site-footer { margin-top: 48px; border-top: 1px solid var(--rule); background: var(--white); color: var(--ink-2); font-size: 14px; }
.site-footer .footer-top { padding: 32px 0 24px; display: grid; gap: 24px; }
@media (min-width: 960px) { .site-footer .footer-top { grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; } }
.site-footer h2, .site-footer h3 { font-family: var(--font-label); font-weight: 600; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 6px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--spruce); text-decoration: underline; }
.footer-about p { margin: 0 0 10px; max-width: 46ch; }
.footer-bottom { border-top: 1px solid var(--rule); padding: 16px 0 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--muted); font-size: 13px; }
.footer-bottom a { color: var(--muted); }

/* Utilities */
.mt-0 { margin-top: 0 !important; }
.text-center { text-align: center; }
.stack > * + * { margin-top: 16px; }
