/* ==========================================================================
   EastMachias.com — shared design system
   Independent community guide to East Machias, Maine.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  color-scheme: light;
  --ink: #14312f;
  --ink-soft: #2b4744;
  --muted: #5d7370;
  --paper: #f6f7f3;
  --paper-2: #eef1ea;
  --card: #ffffff;
  --accent: #146b60;
  --accent-dark: #0d5049;
  --accent-soft: #dcefe6;
  --amber: #b56430;
  --amber-soft: #f6e6d7;
  --line: #dde5da;
  --line-strong: #c4d1c2;
  --deep: #173b3a;
  --deep-2: #0f2c2b;
  --shadow-sm: 0 1px 2px rgba(20, 49, 47, .06), 0 6px 18px rgba(20, 49, 47, .05);
  --shadow-md: 0 2px 4px rgba(20, 49, 47, .05), 0 14px 38px rgba(20, 49, 47, .09);
  --shadow-lg: 0 24px 70px rgba(11, 38, 37, .16);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --header-h: 74px;
  --ease: cubic-bezier(.22, .68, .3, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8f1ec;
  --ink-soft: #c6d8d2;
  --muted: #93aaa5;
  --paper: #0d1c1b;
  --paper-2: #122423;
  --card: #142927;
  --accent: #62c9b4;
  --accent-dark: #8fdccb;
  --accent-soft: #16332f;
  --amber: #e0a06a;
  --amber-soft: #2e221a;
  --line: #24413e;
  --line-strong: #31534f;
  --deep: #071413;
  --deep-2: #04100f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, .3), 0 14px 38px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .5);
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 18px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
/* The hidden attribute must beat component display values (e.g. .listing { display: grid }),
   otherwise filtered-out items stay visible. */
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.02em; line-height: 1.18; margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
li { margin: .3em 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.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;
}
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  background: var(--card); color: var(--ink); padding: 12px 18px;
  border-radius: var(--r-sm); font-weight: 700; box-shadow: var(--shadow-md);
}
.skip:focus { left: 12px; }

.wrap { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.wrap-narrow { width: min(820px, calc(100% - 40px)); margin-inline: auto; }

/* --- Top notice bar ----------------------------------------------------- */
.notice {
  background: var(--deep);
  color: #d8ece1;
  text-align: center;
  font-size: .755rem;
  letter-spacing: .045em;
  padding: 8px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.notice strong { color: #fff; font-weight: 650; }

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 24px rgba(20, 49, 47, .07);
}
.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: var(--header-h);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; font-weight: 750; letter-spacing: -.03em; color: var(--ink);
  flex-shrink: 0;
}
.brand .mark {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  color: #fff; font-size: .8rem; letter-spacing: .08em; font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.brand .mark svg { width: 22px; height: 22px; }
.brand .wordmark { display: flex; flex-direction: column; line-height: 1.15; }
.brand .wordmark small {
  color: var(--muted); font-size: .66rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; margin-top: 2px;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--muted); font-size: .9rem; font-weight: 550;
  padding: 9px 13px; border-radius: 999px; white-space: nowrap;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav a:hover { color: var(--accent); background: var(--accent-soft); }
.nav a[aria-current="page"] { color: var(--accent-dark); font-weight: 700; }
.nav .official,
.nav .cta {
  background: var(--accent); color: #fff; font-weight: 650; padding: 10px 16px;
  box-shadow: var(--shadow-sm);
}
.nav .official:hover,
.nav .cta:hover { background: var(--accent-dark); color: #fff; }
.nav .official .dot,
.nav .cta .dot { opacity: .65; margin-left: 5px; font-size: .85em; }

.header-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: transparent; border: 1px solid var(--line);
  color: var(--ink-soft); cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.icon-btn:hover { background: var(--accent-soft); border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-toggle { display: none; }

.mobile-nav {
  display: none; border-top: 1px solid var(--line);
  background: var(--paper); padding: 10px 0 18px;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 4px; text-decoration: none; font-weight: 600;
  border-bottom: 1px solid var(--line); color: var(--ink);
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav a span { color: var(--muted); font-weight: 450; font-size: .86rem; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border: 1px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: #fff;
  text-decoration: none; font-weight: 700; font-size: .95rem;
  box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); color: var(--accent-dark); }
.btn.light { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .55); color: #fff; backdrop-filter: blur(4px); }
.btn.light:hover { background: rgba(255, 255, 255, .26); }
.btn.sm { min-height: 38px; padding: 0 15px; font-size: .84rem; }
.btn.block { width: 100%; }

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(640px, 78vh);
  display: flex; align-items: center;
  background: var(--deep); color: #fff;
}
.hero-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 55%; z-index: -2;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(9, 30, 29, .93) 0%, rgba(11, 37, 36, .78) 44%, rgba(11, 37, 36, .3) 100%),
    linear-gradient(0deg, rgba(9, 30, 29, .55), transparent 45%);
}
.hero > .wrap { padding: clamp(56px, 9vw, 96px) 0; position: relative; z-index: 1; }
.hero .eyebrow { color: #9fe0c4; }
.hero h1 {
  max-width: 15ch;
  font: 700 clamp(2.75rem, 7.4vw, 5.25rem)/1.0 var(--serif);
  letter-spacing: -.045em; margin: 0;
  text-wrap: balance;
}
.hero .lede {
  max-width: 56ch; margin: 22px 0 30px;
  color: #e2ede7; font-size: clamp(1rem, 1.4vw, 1.16rem);
}
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(28px, 5vw, 64px); align-items: end;
}
.hero-panel {
  background: rgba(9, 30, 29, .5);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r-lg);
  padding: 22px; backdrop-filter: blur(10px);
}
.hero-panel h2 {
  font: 600 1.05rem/1.3 var(--sans); letter-spacing: 0;
  color: #fff; margin: 0 0 14px;
}
.hero-panel ul { list-style: none; padding: 0; margin: 0; }
.hero-panel li { border-top: 1px solid rgba(255, 255, 255, .12); }
.hero-panel li:first-child { border-top: 0; }
.hero-panel a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 11px 0; color: #e8f3ee; text-decoration: none; font-size: .93rem;
}
.hero-panel a:hover { color: #fff; }
.hero-panel a span { color: #93b7ab; font-size: .78rem; white-space: nowrap; }
.photo-credit {
  position: absolute; right: 0; bottom: -26px; z-index: 2;
  margin: 0; padding: 4px 9px; border-radius: 7px;
  background: rgba(9, 30, 29, .72); color: rgba(255, 255, 255, .8);
  font-size: .64rem; line-height: 1.45;
}
.photo-credit a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

/* --- Eyebrow / section heads -------------------------------------------- */
.eyebrow {
  margin: 0 0 12px; color: var(--accent);
  font-size: .73rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
}
.section { padding: clamp(52px, 7vw, 84px) 0; }
.section.tint { background: var(--paper-2); }
.section.deep { background: var(--deep); color: #eaf3ee; }
.section.deep .eyebrow { color: #9fe0c4; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 26px; margin-bottom: 34px;
}
.section-head h2 {
  font: 700 clamp(1.8rem, 3.6vw, 2.7rem)/1.1 var(--serif);
  letter-spacing: -.035em; max-width: 20ch; text-wrap: balance;
}
.section-head p { max-width: 46ch; margin: 0; color: var(--muted); }
.section.deep .section-head p { color: #b9d3c9; }
.head-link {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  color: var(--accent); font-weight: 700; font-size: .9rem; text-decoration: none;
  border-bottom: 1.5px solid var(--line-strong); padding-bottom: 3px;
}
.head-link:hover { border-color: var(--accent); }

/* --- Stat strip --------------------------------------------------------- */
.statbar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat {
  background: var(--card); padding: 22px 20px;
}
.stat .k {
  display: block; color: var(--muted);
  font-size: .68rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase;
  margin-bottom: 7px;
}
.stat .v { font: 700 1.45rem/1.1 var(--serif); letter-spacing: -.03em; display: block; }
.stat .s { display: block; color: var(--muted); font-size: .8rem; margin-top: 5px; }

/* --- Cards -------------------------------------------------------------- */
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card .media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .media img { transform: scale(1.045); }
.card .media .badge {
  position: absolute; left: 12px; top: 12px;
  background: rgba(9, 30, 29, .8); color: #fff;
  padding: 5px 10px; border-radius: 999px;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.card .body { padding: 20px 21px 22px; display: flex; flex-direction: column; flex: 1; }
.card .kicker {
  color: var(--accent); font-size: .7rem; font-weight: 800;
  letter-spacing: .13em; text-transform: uppercase; margin-bottom: 7px;
}
.card h3 { font-size: 1.12rem; letter-spacing: -.02em; margin-bottom: 7px; }
.card p { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.card .meta {
  margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: .8rem; color: var(--muted);
}
.card .meta a { color: var(--accent); font-weight: 700; text-decoration: none; }
.card .meta a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --- Do-list (top things to do) ------------------------------------------ */
.do-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.do {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.do:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.do .n {
  flex: none; width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  color: #fff; font: 700 1.15rem/1 var(--serif); letter-spacing: -.02em;
}
.do h3 { font-size: 1.04rem; margin-bottom: 6px; }
.do p { color: var(--muted); font-size: .88rem; margin: 0 0 10px; }
.do a { color: var(--accent); font-weight: 700; font-size: .85rem; text-decoration: none; }
.do a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --- Feature split ------------------------------------------------------ */
.split {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 54px); align-items: center;
}
.split.reverse > :first-child { order: 2; }
.split .media {
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg);
  position: relative; aspect-ratio: 4 / 3; background: var(--paper-2);
}
.split .media img { width: 100%; height: 100%; object-fit: cover; }
.split .copy h2 {
  font: 700 clamp(1.75rem, 3.2vw, 2.45rem)/1.12 var(--serif);
  letter-spacing: -.035em; margin-bottom: 16px; text-wrap: balance;
}
.split .copy p { color: var(--muted); max-width: 54ch; }
.split .copy ul { color: var(--muted); }
.split .copy li strong { color: var(--ink); }
.section.deep .split .copy p, .section.deep .split .copy li { color: #b9d3c9; }
.section.deep .split .copy li strong { color: #fff; }

/* --- Pill / tag --------------------------------------------------------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: .72rem; font-weight: 700; letter-spacing: .03em;
}
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag .mi { width: 13px; height: 13px; flex: none; }

/* --- Icon list ---------------------------------------------------------- */
.iconlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.iconlist li { display: flex; gap: 13px; align-items: flex-start; margin: 0; }
.iconlist .ico {
  flex: none; width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-dark);
}
.iconlist .ico svg { width: 18px; height: 18px; }
.iconlist strong { display: block; font-size: .95rem; }
.iconlist span { color: var(--muted); font-size: .88rem; }

/* --- Listings (directory) ----------------------------------------------- */
.listing {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 22px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.listing:last-child { border-bottom: 0; }
.listing h3 { font-size: 1.04rem; margin-bottom: 4px; }
.listing h3 .mi { width: 15px; height: 15px; color: var(--accent); vertical-align: -2px; margin-right: 5px; }
.listing .desc { color: var(--muted); font-size: .9rem; margin: 0; }
.listing .addr { color: var(--muted); font-size: .84rem; margin: 6px 0 0; }
.listing .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.listing .actions a {
  font-size: .84rem; font-weight: 700; color: var(--accent); text-decoration: none;
  border-bottom: 1px solid var(--line-strong); padding-bottom: 1px;
}
.listing .actions a:hover { border-color: var(--accent); }
.listing .right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.dist {
  display: inline-flex; align-items: baseline; gap: 4px;
  font-size: .78rem; font-weight: 750; color: var(--accent-dark);
  background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.dist small { font-weight: 600; opacity: .75; }

/* --- Filter bar --------------------------------------------------------- */
.filterbar {
  position: sticky; top: var(--header-h); z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.filterbar .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search {
  flex: 1 1 240px; min-width: 200px; position: relative; display: flex; align-items: center;
}
.search svg { position: absolute; left: 13px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; min-height: 42px; padding: 0 14px 0 38px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink); font: inherit; font-size: .92rem;
}
.search input:focus { border-color: var(--accent); }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  font-size: .84rem; font-weight: 650;
  transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.no-results { padding: 40px 0; text-align: center; color: var(--muted); }

/* --- Table (facts, contacts) -------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table caption { text-align: left; color: var(--muted); font-size: .85rem; padding-bottom: 12px; }
.table th, .table td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th {
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 750; border-bottom: 1px solid var(--line-strong);
}
.table tbody tr:hover { background: var(--paper-2); }
.table td a { color: var(--accent); font-weight: 650; text-decoration: none; }
.table td a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --- Panel / callout ---------------------------------------------------- */
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-sm);
}
.panel.tint { background: var(--accent-soft); border-color: transparent; }
.panel.amber { background: var(--amber-soft); border-color: transparent; }
.panel h3 { font-size: 1.2rem; margin-bottom: 10px; }
.panel h4 { font-size: .95rem; margin-bottom: 6px; }
.panel p, .panel li { color: var(--muted); font-size: .93rem; }
.section.deep .panel { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .13); }
.section.deep .panel p, .section.deep .panel li { color: #b9d3c9; }

.note {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--r);
  background: var(--amber-soft); border-left: 3px solid var(--amber);
  font-size: .88rem; color: var(--ink-soft);
}
.note svg { width: 17px; height: 17px; color: var(--amber); flex: none; margin-top: 2px; }
.note strong { color: var(--ink); }

/* --- Distance grid (nearby towns) ---------------------------------------- */
.town {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: start;
  padding: 22px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.town:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.town .badge {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-dark); text-align: center; line-height: 1.05;
}
.town .badge b { display: block; font: 700 1.05rem/1 var(--serif); }
.town .badge span { font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 750; }
.town h3 { font-size: 1.08rem; margin-bottom: 5px; }
.town p { color: var(--muted); font-size: .89rem; margin: 0 0 9px; }
.town .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.town .go {
  align-self: center; color: var(--accent); text-decoration: none; font-weight: 700;
  font-size: .84rem; white-space: nowrap;
}

/* --- Timeline (events) --------------------------------------------------- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.event { position: relative; padding-bottom: 30px; }
.event:last-child { padding-bottom: 0; }
.event::before {
  content: ""; position: absolute; left: -34px; top: 5px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--accent);
}
.event .when {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 6px;
}
.event h3 { font-size: 1.12rem; margin-bottom: 6px; }
.event p { color: var(--muted); font-size: .92rem; margin-bottom: 8px; max-width: 62ch; }
.event .where { font-size: .84rem; color: var(--muted); }
.event .where b { color: var(--ink); font-weight: 650; }

/* --- Accordion ----------------------------------------------------------- */
.acc { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--card); }
.acc details { border-bottom: 1px solid var(--line); }
.acc details:last-child { border-bottom: 0; }
.acc summary {
  cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 1rem;
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "+"; font-size: 1.3rem; font-weight: 400; color: var(--accent);
  line-height: 1; transition: transform .2s var(--ease);
}
.acc details[open] summary::after { content: "\2212"; }
.acc .answer { padding: 0 22px 20px; color: var(--muted); font-size: .94rem; }
.acc .answer a { color: var(--accent); font-weight: 650; }

/* --- Map ----------------------------------------------------------------- */
.map-embed {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow-md); background: var(--paper-2);
}
.map-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.map-embed .ratio { aspect-ratio: 16 / 9; }
.map-embed .ratio-tall { aspect-ratio: 4 / 3; }

/* --- Weather ------------------------------------------------------------- */
.weather {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm);
}
.weather .current { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.weather .now-icon { width: 54px; height: 54px; flex: none; color: var(--amber); }
.weather .temp { font: 700 2.6rem/1 var(--serif); letter-spacing: -.04em; }
.weather .cond { color: var(--muted); font-size: .9rem; }
.weather .place { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 750; }
.weather .days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; border-top: 1px solid var(--line); padding-top: 16px; }
.weather .day { text-align: center; }
.weather .day .d { font-size: .7rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.weather .day svg { width: 24px; height: 24px; color: var(--amber); margin: 5px 0; }
.weather .day .hi { font-weight: 700; font-size: .88rem; }
.weather .day .lo { color: var(--muted); font-size: .8rem; }
.weather .day .pop { font-size: .66rem; color: var(--muted); }
.weather-loading { color: var(--muted); font-size: .9rem; }

/* --- Sponsor ------------------------------------------------------------- */
.sponsor-band {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px;
  padding: clamp(22px, 3vw, 32px); border-radius: var(--r-lg);
  background: linear-gradient(120deg, var(--card), var(--accent-soft));
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.sponsor-band h2 { font: 700 1.5rem/1.15 var(--serif); letter-spacing: -.03em; margin: 7px 0 6px; }
.sponsor-band p { color: var(--muted); font-size: .93rem; margin: 0; max-width: 56ch; }
.ad-label {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--accent); font-size: .68rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
}
.ad-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.ad-label::after {
  content: "Advertisement"; margin-left: 4px; padding: 2px 7px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--muted); letter-spacing: .1em;
}
.sponsor-email { color: var(--accent); font-weight: 700; text-underline-offset: 3px; }

/* --- Breadcrumbs --------------------------------------------------------- */
.crumbs {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  font-size: .82rem; color: var(--muted); padding: 18px 0 0;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.crumbs .sep { opacity: .5; }
.crumbs [aria-current] { color: var(--ink); font-weight: 650; }

/* --- Page hero (subpages) ------------------------------------------------ */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(40px, 6vw, 72px) 0 clamp(36px, 5vw, 56px);
  background: var(--deep); color: #fff;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 82% 18%, rgba(120, 200, 170, .22), transparent 55%),
    linear-gradient(140deg, #1b4442, #0e2b2a 70%);
}
.page-hero h1 {
  font: 700 clamp(2.1rem, 5vw, 3.4rem)/1.06 var(--serif);
  letter-spacing: -.04em; margin: 10px 0 0; max-width: 22ch; text-wrap: balance;
}
.page-hero p { color: #cfe2d9; max-width: 62ch; margin: 16px 0 0; font-size: 1.03rem; }
.page-hero .crumbs { color: #9ec0b4; padding-top: 0; }
.page-hero .crumbs a { color: #9ec0b4; }
.page-hero .crumbs a:hover { color: #fff; }
.page-hero .crumbs [aria-current] { color: #fff; }

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  background: var(--deep-2); color: #a9c4bb;
  padding: clamp(44px, 6vw, 68px) 0 30px; margin-top: 0;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 36px;
  padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.site-footer .brand { color: #fff; }
.site-footer .brand .mark { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); }
.site-footer .brand .wordmark small { color: #8faea3; }
.site-footer p { font-size: .89rem; line-height: 1.7; color: #9db8ae; }
.site-footer h3 {
  color: #fff; font-size: .73rem; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 14px; font-weight: 750;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 9px; }
.site-footer a { color: #c4dcd3; text-decoration: none; font-size: .89rem; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  padding-top: 22px; display: flex; flex-wrap: wrap; gap: 12px 26px;
  align-items: center; justify-content: space-between;
  font-size: .82rem; color: #7f9f95;
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-bottom a { font-size: .82rem; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1000px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 880px) {
  .nav { display: none; }
  .nav-toggle { display: inline-grid; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-panel { display: none; }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .do-list { grid-template-columns: 1fr; }
  .statbar { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .section-head { display: block; }
  .section-head .head-link { margin-top: 14px; }
  .listing { grid-template-columns: 1fr; }
  .listing .right { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .sponsor-band { grid-template-columns: 1fr; }
  .sponsor-band .btn { justify-self: start; }
  .photo-credit { position: static; display: inline-block; margin-top: 22px; }
}
@media (max-width: 560px) {
  .wrap, .wrap-narrow { width: calc(100% - 32px); }
  .grid.cols-4 { grid-template-columns: 1fr; }
  .statbar { grid-template-columns: 1fr; }
  .weather .days { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .weather .day .d { font-size: .62rem; }
  .town { grid-template-columns: auto 1fr; }
  .town .go { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero .actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .site-footer, .notice, .sponsor-band, .filterbar, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .panel, .card, .acc { box-shadow: none; border-color: #ccc; }
  a { text-decoration: underline; }
}
