/* Sherman Radio — shared styles for every page.
   Layout: a green station band at the top (logo + nav), one reading column below, a quiet footer. */
:root {
  --pine: #1f5c46;        /* station green, from the sign */
  --pine-deep: #00543f;
  --pine-soft: #e3efe9;
  --ground: #f6f8f6;
  --card: #ffffff;
  --ink: #17221d;
  --ink-muted: #5b6b63;
  --rule: #d6e0db;
  --onair: #c8452c;
  --cream: #f9faf2;
  --display: "Zilla Slab", Georgia, "Times New Roman", serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --pine: #5fbf97; --pine-deep: #0f3a2e; --pine-soft: #17302a; --ground: #0f1714; --card: #16211d;
    --ink: #e8efeb; --ink-muted: #9db0a7; --rule: #26362f; --onair: #f07a5f;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font: 16px/1.6 var(--body); }
img { max-width: 100%; }
a { color: var(--pine); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--pine); outline-offset: 2px; }
.wrap {
  max-width: 64rem; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Station band + nav */
.band { background: var(--pine-deep); color: var(--cream); }
.band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: max(14px, env(safe-area-inset-top, 0px)) 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; }
.brand img { width: 84px; height: auto; display: block; }
.brand span { font: 700 1.35rem/1.1 var(--display); }
.brand small { display: block; font: 500 .78rem/1.3 var(--body); opacity: .85; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
nav a { display: block; padding: 6px 12px; border-radius: 999px; color: var(--cream); text-decoration: none; font-weight: 600; font-size: .95rem; }
nav a:hover { background: rgba(255,255,255,.12); }
nav a[aria-current="page"] { background: var(--cream); color: #00543f; }

/* Page text */
main .wrap { padding-block: 32px 56px; display: grid; gap: 40px; }
h1 { font: 700 clamp(1.9rem, 5vw, 2.6rem)/1.1 var(--display); margin: 0 0 .4rem; text-wrap: balance; }
h2 { font: 700 1.45rem/1.25 var(--display); margin: 0 0 .6rem; text-wrap: balance; }
h3 { font: 700 1.15rem/1.25 var(--display); margin: 0; }
p { margin: 0 0 .8rem; max-width: 65ch; }
.lede { font-size: 1.12rem; color: var(--ink-muted); }
.eyebrow { font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--pine); margin: 0 0 .3rem; }

/* Buttons */
.btn { display: inline-block; background: var(--pine); color: var(--card); padding: 10px 18px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; }

/* Cards and grids */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 20px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.card.lead { border: 2px solid var(--pine); }
.card p { margin: 0; color: var(--ink-muted); }
.card a.more { font-weight: 600; text-decoration: none; }
.card a.more::after { content: " →"; }

/* Footer */
footer.site { border-top: 1px solid var(--rule); color: var(--ink-muted); font-size: .88rem; }
footer.site .wrap { padding-block: 20px max(24px, env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer.site a { color: inherit; }

@media (max-width: 560px) {
  .brand img { width: 64px; }
  nav a { padding: 6px 10px; font-size: .9rem; }
}

/* Sherman weather (weather.js): home page card, alert banner, calendar forecasts */
.wx-icon { flex: none; color: var(--ink-muted); }
.wx-icon .wx-warm { color: #d98a1c; stroke: #d98a1c; }
.wx-icon .wx-wet { stroke: #3a7fc1; }
.wx-icon .wx-snow { stroke: #7aa7d6; stroke-width: 2.6; }
.wx-icon .wx-front { fill: var(--card); }
@media (prefers-color-scheme: dark) {
  .wx-icon .wx-warm { color: #f2b45a; stroke: #f2b45a; }
  .wx-icon .wx-wet { stroke: #7fb6e6; }
}
.wx { background: var(--card); border: 1px solid var(--rule); border-radius: 18px; padding: 18px; display: grid; gap: 14px; }
.wx[hidden] { display: none; }
.wx-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.wx-head h2 { margin: 0; }
.wx-sponsor { font-size: .82rem; color: var(--ink-muted); }
a.wx-sponsor { color: var(--pine); font-weight: 600; }
.wx-now { display: flex; align-items: center; gap: 14px; }
.wx-temp { font: 700 3rem/1 var(--display); color: var(--ink); }
.wx-desc { display: grid; gap: 2px; min-width: 0; }
.wx-desc strong { font-size: 1.05rem; }
.wx-desc span { color: var(--ink-muted); font-size: .92rem; }
.wx-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.wx-days li { display: grid; justify-items: center; gap: 4px; padding: 8px 2px; border-radius: 12px; background: var(--ground); text-align: center; }
.wx-dow { font-size: .78rem; font-weight: 600; letter-spacing: .04em; color: var(--ink-muted); text-transform: uppercase; }
.wx-hl { font-size: .9rem; font-variant-numeric: tabular-nums; color: var(--ink-muted); white-space: nowrap; }
.wx-hl b { color: var(--ink); }
.wx-pop { font-size: .75rem; color: #3a7fc1; font-weight: 600; }
.wx-src { margin: 0; font-size: .8rem; color: var(--ink-muted); }
.wx-src a { color: inherit; }
#wx-alerts { display: grid; gap: 8px; }
#wx-alerts[hidden] { display: none; }
.wx-alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; background: #fff4d6; color: #4a3600; border: 1px solid #f0d58a; }
.wx-alert.is-warning { background: #fde4dd; color: #5c1a0b; border-color: #f1b1a0; }
.wx-alert svg { flex: none; margin-top: 2px; }
.wx-alert div { display: grid; gap: 2px; flex: 1; min-width: 0; }
.wx-alert span { font-size: .92rem; }
.wx-alert a { color: inherit; font-weight: 600; white-space: nowrap; }
@media (prefers-color-scheme: dark) {
  .wx-alert { background: #3b3010; color: #fbe7a8; border-color: #6b5718; }
  .wx-alert.is-warning { background: #3d1a12; color: #ffd2c4; border-color: #7a3424; }
}
@media (max-width: 420px) { .wx-days { gap: 4px; } .wx-temp { font-size: 2.5rem; } }

/* "The app is here" strip under the station band on inner pages (the home page has the full block).
   To retire it later, delete the <aside class="appnews"> lines from each page. */
.appnews { background: var(--pine-soft); border-bottom: 1px solid var(--rule); }
.appnews .wrap { display: flex; align-items: center; gap: 12px; padding-block: 10px; }
.appnews img { width: 32px; height: 32px; border-radius: 8px; flex: none; display: block; }
.appnews p { margin: 0; flex: 1; min-width: 0; max-width: none; font-size: .95rem; }
.appnews a { flex: none; font-weight: 700; white-space: nowrap; text-decoration: none; background: var(--pine); color: var(--card); padding: 6px 14px; border-radius: 999px; }
.appnews a:hover { filter: brightness(1.1); }
@media (max-width: 520px) { .appnews p { font-size: .9rem; line-height: 1.35; } }
