/* Missoula Stump Guide — shared styles. Mobile-first, fast, no external assets. */
:root {
  --bg: #ffffff;
  --fg: #1c2624;
  --muted: #55635f;
  --brand: #2f6b4f;
  --brand-dark: #234f3b;
  --accent: #b5842f;
  --line: #dde3e0;
  --card: #f4f7f5;
  --focus: #1a73e8;
  --maxw: 68rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101512;
    --fg: #e7ede9;
    --muted: #9fb0a9;
    --brand: #6fbf95;
    --brand-dark: #4f9e77;
    --accent: #d8ad5e;
    --line: #263230;
    --card: #17201d;
    --focus: #7db1ff;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
h1, h2, h3 { line-height: 1.25; color: var(--fg); }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.3rem, 3.2vw, 1.7rem); margin: 2rem 0 .6rem; }
h3 { font-size: 1.15rem; margin: 1.4rem 0 .4rem; }
p, ul, ol { margin: 0 0 1rem; }
a { color: var(--brand-dark); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a { color: var(--brand); } }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
img { max-width: 100%; height: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--brand-dark); color: #fff;
  padding: .6rem 1rem; z-index: 10; border-radius: 0 0 .4rem 0;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem; padding-top: .8rem; padding-bottom: .8rem; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--brand-dark); text-decoration: none; letter-spacing: -.01em; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand { color: var(--brand); } }
.brand span { color: var(--accent); }
nav.primary { margin-left: auto; }
nav.primary ul { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: 0; padding: 0; }
nav.primary a { text-decoration: none; color: var(--muted); font-size: .96rem; padding: .2rem 0; }
nav.primary a:hover, nav.primary a[aria-current="page"] { color: var(--brand-dark); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) nav.primary a:hover, :root:not([data-theme="light"]) nav.primary a[aria-current="page"] { color: var(--brand); } }

.notice {
  background: #fff8e8; border: 1px solid var(--accent); color: #4a3a13;
  padding: .9rem 1rem; border-radius: .5rem; margin: 1.2rem 0; font-size: .98rem;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .notice { background: #241d10; color: #ecd9ab; } }
.notice strong { color: inherit; }

.hero { padding: 2.2rem 0 1rem; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }

main { padding-bottom: 2rem; }
main .wrap > section { max-width: 46rem; }

.cta {
  display: inline-block; background: var(--brand); color: #fff; text-decoration: none;
  padding: .7rem 1.2rem; border-radius: .5rem; font-weight: 600; border: 0; cursor: pointer;
}
.cta:hover { background: var(--brand-dark); }
.cta.secondary { background: transparent; color: var(--brand-dark); border: 2px solid var(--brand); padding: .55rem 1.05rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta.secondary { color: var(--brand); } }

.cards { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 1.4rem 0; }
@media (min-width: 40rem) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: .6rem; padding: 1rem 1.1rem; }
.card h3 { margin-top: 0; }
.card a { font-weight: 600; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .97rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }

form .field { margin: 0 0 1rem; }
label { display: block; font-weight: 600; margin-bottom: .3rem; }
label .opt { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: .6rem .7rem; font: inherit; color: var(--fg);
  background: var(--bg); border: 1px solid var(--line); border-radius: .45rem;
}
textarea { min-height: 7rem; resize: vertical; }
.form-status { margin: 1rem 0; padding: .8rem 1rem; border-radius: .5rem; display: none; }
.form-status.show { display: block; }
.form-status.info { background: var(--card); border: 1px solid var(--line); }
.form-status.ok { background: #e6f4ec; border: 1px solid var(--brand); }
.form-status.err { background: #fdeceb; border: 1px solid #c0392b; color: #7a241c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-status.ok { background: #14251c; }
  :root:not([data-theme="light"]) .form-status.err { background: #2a1614; color: #f3b3ab; }
}

footer.site { border-top: 1px solid var(--line); margin-top: 2rem; padding: 1.6rem 0; color: var(--muted); font-size: .9rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
footer.site a { color: var(--muted); }
footer.site .disclaim { flex-basis: 100%; margin-top: .6rem; max-width: 52rem; }
.small { font-size: .88rem; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
