:root {
  color-scheme: light;
  --ink: #10231f;
  --ink-2: #172f29;
  --muted: #66746d;
  --paper: #f4f7ef;
  --paper-warm: #fff8eb;
  --band: #e4ece0;
  --panel: #fffdf5;
  --panel-strong: #ffffff;
  --line: #cbd8cc;
  --line-strong: #9fb3a4;
  --green: #168447;
  --green-deep: #0d5d37;
  --green-soft: #dff4e6;
  --clay: #e05f2f;
  --clay-deep: #9b321c;
  --amber: #d9961a;
  --amber-soft: #f7e5bd;
  --blue: #24778b;
  --charcoal: #0f1f1b;
  --moss: #2fb86f;
  --shadow: 0 28px 80px rgba(11, 31, 24, 0.18);
  --shadow-soft: 0 16px 40px rgba(11, 31, 24, 0.1);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --header-height: 82px;
  --display-font: "Avenir Next Condensed", "DIN Condensed", "Bahnschrift Condensed", "Trebuchet MS", sans-serif;
  --body-font: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 8%, rgba(224, 95, 47, 0.16), transparent 28rem),
    radial-gradient(circle at 86% 4%, rgba(47, 184, 111, 0.18), transparent 25rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--body-font);
  text-rendering: optimizeLegibility;
}

body.dialog-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(224, 95, 47, 0.42);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  min-height: var(--header-height);
  padding: 10px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(16, 35, 31, 0.12);
  background:
    linear-gradient(90deg, rgba(255, 253, 245, 0.94), rgba(244, 247, 239, 0.9)),
    rgba(255, 253, 245, 0.82);
  box-shadow: 0 14px 34px rgba(16, 35, 31, 0.08);
  backdrop-filter: blur(18px) saturate(150%);
}

.logo-section {
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: min(42vw, 360px);
  padding: 4px 0;
}

.brand-logo {
  display: block;
  width: auto;
  height: clamp(58px, 6vw, 72px);
  max-width: min(42vw, 360px);
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 10px 16px rgba(15, 31, 27, 0.14));
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.top-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 16px;
  overflow: hidden;
  border: 1px solid rgba(16, 35, 31, 0.11);
  border-radius: 999px;
  background: rgba(255, 253, 245, 0.72);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.top-nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translateX(-101%);
  background: linear-gradient(90deg, var(--green), var(--moss));
  transition: transform 220ms ease;
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  border-color: rgba(22, 132, 71, 0.48);
  color: #fff;
  transform: translateY(-1px);
}

.top-nav a:hover::before,
.top-nav a[aria-current="page"]::before {
  transform: translateX(0);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  align-items: center;
  gap: clamp(26px, 5vw, 72px);
  min-height: min(860px, calc(100vh - var(--header-height)));
  padding: clamp(48px, 8vw, 110px) clamp(18px, 4vw, 56px);
  overflow: hidden;
  background: #0b1714;
  color: #fff;
  isolation: isolate;
}

.hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto clamp(18px, 4vw, 56px) 20px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--clay), var(--amber), var(--green));
  opacity: 0.86;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(112deg, rgba(7, 18, 15, 0.98), rgba(10, 32, 24, 0.66) 48%, rgba(7, 18, 15, 0.96)),
    radial-gradient(circle at 76% 18%, rgba(47, 184, 111, 0.4), transparent 28%),
    radial-gradient(circle at 18% 82%, rgba(224, 95, 47, 0.26), transparent 26%),
    repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 34px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: auto, auto, auto, auto, 70px 70px, 70px 70px;
}

.ridge {
  position: absolute;
  left: -7%;
  right: -7%;
  bottom: -1%;
  height: 45%;
  clip-path: polygon(0 64%, 10% 49%, 22% 61%, 34% 28%, 47% 57%, 61% 25%, 75% 51%, 88% 34%, 100% 59%, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(223, 238, 229, 0.18), rgba(223, 238, 229, 0.07));
}

.ridge-two {
  bottom: -10%;
  height: 36%;
  background: linear-gradient(180deg, rgba(224, 95, 47, 0.24), rgba(13, 93, 55, 0.12));
  transform: scaleX(1.14);
}

.trail-line {
  position: absolute;
  right: 10%;
  bottom: -5%;
  width: 32%;
  height: 88%;
  transform: skewX(-12deg) rotate(2deg);
  border-left: 9px solid rgba(255, 255, 255, 0.18);
  border-right: 2px dashed rgba(255, 255, 255, 0.18);
  filter: drop-shadow(0 0 22px rgba(47, 184, 111, 0.22));
}

.hero-content,
.today-panel {
  position: relative;
  z-index: 1;
}

.hero-content {
  align-self: center;
  max-width: 900px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--clay);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero .eyebrow,
.page-hero .eyebrow {
  color: #f7d383;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--display-font);
  font-weight: 900;
  letter-spacing: -0.035em;
}

h1 {
  margin-bottom: 18px;
  max-width: 960px;
  font-size: clamp(64px, 12vw, 154px);
  line-height: 0.78;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 10px 0 rgba(47, 184, 111, 0.2), 0 22px 42px rgba(0, 0, 0, 0.42);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.92;
  text-transform: uppercase;
}

h3 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1;
}

.lede {
  max-width: 740px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(19px, 2.3vw, 29px);
  font-weight: 700;
  line-height: 1.24;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button,
.segment,
.text-button,
.icon-button,
.small-button {
  cursor: pointer;
}

.button,
.small-button,
.segment {
  position: relative;
  overflow: hidden;
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease, background 170ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid rgba(16, 35, 31, 0.14);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(11, 31, 24, 0.1);
}

.button:hover,
.small-button:hover,
.segment:hover {
  transform: translateY(-2px);
}

.button.primary {
  border-color: rgba(224, 95, 47, 0.88);
  background: linear-gradient(135deg, var(--clay), var(--clay-deep));
  color: #fff;
  box-shadow: 0 16px 34px rgba(224, 95, 47, 0.25);
}

.button.full {
  width: 100%;
}

.today-panel {
  align-self: center;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06)),
    rgba(13, 18, 17, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(150%);
}

.today-panel h2 {
  margin-bottom: 16px;
  font-size: 34px;
}

.today-list {
  display: grid;
  gap: 10px;
}

.today-item {
  position: relative;
  padding: 14px 14px 14px 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.11);
}

.today-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--clay), var(--amber));
}

.today-item strong,
.today-item span {
  display: block;
}

.today-item span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(90deg, rgba(224, 95, 47, 0.09), transparent 28%, rgba(47, 184, 111, 0.12)),
    var(--charcoal);
  color: #fff;
}

.stats div {
  position: relative;
  padding: 26px clamp(18px, 4vw, 56px);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.stats div:last-child {
  border-right: 0;
}

.stats strong {
  display: block;
  font-family: var(--display-font);
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.85;
}

.stats span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.workspace {
  padding: clamp(44px, 7vw, 88px) clamp(18px, 4vw, 56px);
  scroll-margin-top: 104px;
}

.workspace.muted {
  background:
    radial-gradient(circle at 18% 4%, rgba(224, 95, 47, 0.12), transparent 24rem),
    radial-gradient(circle at 92% 24%, rgba(22, 132, 71, 0.15), transparent 28rem),
    var(--band);
}

.bulletin-board {
  display: none;
  gap: 10px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(16, 35, 31, 0.12);
  background: var(--panel);
}

.bulletin-board.has-bulletins {
  display: grid;
}

.bulletin-item {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(36, 119, 139, 0.2);
  border-left: 7px solid var(--blue);
  border-radius: var(--radius-sm);
  background: #edf5f5;
  font-weight: 900;
}

.bulletin-item.warning {
  border-color: rgba(217, 150, 26, 0.28);
  border-left-color: var(--amber);
  background: #fff1d3;
}

.bulletin-item.success {
  border-color: rgba(22, 132, 71, 0.24);
  border-left-color: var(--green);
  background: var(--green-soft);
}

.bulletin-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.refresh-marker {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.today-panel .refresh-marker {
  margin: -8px 0 14px;
  color: rgba(255, 255, 255, 0.66);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-head > div:first-child {
  max-width: 780px;
}

.section-copy {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
}

.result-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -8px 0 18px;
  padding: 13px 16px;
  border: 1px solid rgba(16, 35, 31, 0.1);
  border-radius: 18px;
  background: rgba(255, 253, 245, 0.72);
  box-shadow: 0 10px 24px rgba(11, 31, 24, 0.07);
}

.result-strip strong {
  font-weight: 900;
}

.toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.field {
  display: grid;
  gap: 7px;
  min-width: min(420px, 100%);
}

.field.compact {
  min-width: 172px;
}

.field span,
.toggle span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(16, 35, 31, 0.15);
  border-radius: 14px;
  background: rgba(255, 253, 245, 0.9);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.field input,
.field select {
  min-height: 46px;
  padding: 0 14px;
}

.field textarea {
  min-height: 112px;
  padding: 12px 14px;
  resize: vertical;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(16, 35, 31, 0.15);
  border-radius: 999px;
  background: rgba(255, 253, 245, 0.9);
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.segmented {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.segment {
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid rgba(16, 35, 31, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 245, 0.84);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.segment.active {
  border-color: var(--clay);
  background: var(--clay);
  color: #fff;
  box-shadow: 0 12px 28px rgba(224, 95, 47, 0.2);
}

.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 20px;
}

.results-panel,
.operations-panel,
.card,
.venue-card,
.source-card,
.admin-shell,
.admin-panel {
  border: 1px solid rgba(16, 35, 31, 0.12);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.18)),
    var(--panel);
  box-shadow: var(--shadow-soft);
}

.results-panel {
  overflow: hidden;
}

.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background:
    linear-gradient(90deg, rgba(224, 95, 47, 0.16), transparent 44%),
    var(--charcoal);
  color: #fff;
}

.text-button {
  border: 0;
  background: transparent;
  color: #f4c06e;
  font-weight: 900;
}

.event-list {
  display: grid;
}

.event-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid rgba(16, 35, 31, 0.1);
  background:
    linear-gradient(90deg, rgba(224, 95, 47, 0.08), transparent 35%),
    rgba(255, 253, 245, 0.88);
  transition: transform 180ms ease, background 180ms ease;
}

.event-card:hover {
  transform: translateX(4px);
  background: #fffdf7;
}

.event-card:last-child {
  border-bottom: 0;
}

.event-date {
  display: grid;
  place-items: center;
  min-height: 82px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 22% 16%, rgba(47, 184, 111, 0.36), transparent 32%),
    var(--charcoal);
  color: #fff;
  text-align: center;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.event-date span {
  display: block;
  color: #f4c06e;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.event-date strong {
  display: block;
  font-family: var(--display-font);
  font-size: 38px;
  line-height: 0.86;
}

.event-main p,
.venue-card p,
.source-card p,
.trail-card p,
.helper {
  color: var(--muted);
  line-height: 1.48;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 5px 10px;
  border: 1px solid rgba(16, 35, 31, 0.08);
  border-radius: 999px;
  background: #edf2ec;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.tag.warning {
  background: var(--amber-soft);
  color: #76510e;
}

.tag.danger {
  background: #f5ddd8;
  color: var(--clay-deep);
}

.operations-panel {
  align-self: start;
  padding: 22px;
}

.check-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.check-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: start;
}

.check-item span:first-child {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
}

.check-item strong,
.check-item small {
  display: block;
}

.check-item small {
  color: var(--muted);
  line-height: 1.35;
}

.trail-grid,
.venue-grid,
.source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

#trailGrid.trail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.trail-card,
.venue-card,
.source-card {
  position: relative;
  padding: 20px;
  overflow: hidden;
}

.trail-card {
  display: grid;
  gap: 11px;
  min-height: 100%;
  border-top: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 244, 0.96)),
    var(--panel);
  isolation: isolate;
}

.compact-trail-card {
  align-content: start;
  gap: 12px;
  padding: 18px;
}

.compact-trail-card h3 {
  max-width: 78%;
  font-size: 23px;
  line-height: 0.98;
}

.compact-trail-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.compact-trail-meta span {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(16, 35, 31, 0.06);
}

.compact-access {
  padding: 12px;
  border: 1px solid rgba(16, 35, 31, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.compact-access span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.compact-access strong {
  display: block;
  line-height: 1.22;
}

.compact-cues {
  margin-top: 0;
}

.compact-trail-card .trail-actions {
  margin-top: 2px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.load-more-wrap [hidden] {
  display: none;
}

.trail-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(22, 132, 71, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), transparent);
}

.trail-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: var(--green);
}

.trail-card:has(.status-pill.partial)::after {
  background: var(--amber);
}

.trail-card:has(.status-pill.closed)::after {
  background: var(--clay);
}

.trail-updated {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-pill {
  color: #fff;
}

.status-pill.open {
  border-color: rgba(22, 132, 71, 0.28);
  background: linear-gradient(135deg, var(--green), var(--green-deep));
}

.status-pill.partial {
  border-color: rgba(217, 150, 26, 0.34);
  background: linear-gradient(135deg, var(--amber), #94610b);
}

.status-pill.closed {
  border-color: rgba(224, 95, 47, 0.34);
  background: linear-gradient(135deg, var(--clay), var(--clay-deep));
}

.trail-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.trail-card h3,
.venue-card h3,
.source-card h3 {
  margin-bottom: 8px;
}

.trail-brief {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.trail-brief div {
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(16, 35, 31, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.trail-brief span,
.requirement-list span::before {
  color: var(--muted);
}

.trail-brief span {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.trail-brief strong {
  display: block;
  font-size: 13px;
  line-height: 1.22;
}

.requirement-list {
  display: grid;
  gap: 7px;
}

.requirement-list span {
  position: relative;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.requirement-list span::before {
  content: "•";
  position: absolute;
  left: 2px;
  top: 0;
  color: var(--clay);
  font-weight: 900;
}

.trail-actions,
.venue-actions,
.source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 13px;
}

.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(16, 35, 31, 0.14);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.small-button:hover {
  border-color: var(--green);
  box-shadow: 0 10px 22px rgba(11, 31, 24, 0.1);
}

.small-button.primary-link {
  border-color: var(--clay);
  background: var(--clay);
  color: #fff;
}

.small-button.disabled,
.button.disabled {
  border-color: #c7cfc3;
  background: #e5e9df;
  color: #7f887f;
  cursor: not-allowed;
  box-shadow: none;
}

.source-card::before,
.venue-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--blue);
}

.source-card.stale::before {
  background: var(--amber);
}

.source-card.error::before {
  background: var(--clay);
}

.source-editor {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(16, 35, 31, 0.12);
  border-radius: var(--radius-md);
  background: #f8faf5;
}

.detail-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(16, 35, 31, 0.16);
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.detail-dialog::backdrop {
  background: rgba(16, 32, 25, 0.68);
  backdrop-filter: blur(4px);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(16, 35, 31, 0.12);
  background: var(--charcoal);
  color: #fff;
}

.dialog-head h2 {
  font-size: 30px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

#dialogBody {
  max-height: calc(min(760px, calc(100vh - 28px)) - 78px);
  overflow: auto;
  padding: 22px;
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(16, 35, 31, 0.08);
}

.detail-list dt {
  color: var(--muted);
  font-weight: 900;
}

.detail-list dd {
  margin: 0;
}

.inline-requirements {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(16, 35, 31, 0.1);
}

.related-events {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(16, 35, 31, 0.1);
}

.related-event-list {
  display: grid;
  gap: 10px;
}

.related-event {
  padding: 14px;
  border-left: 6px solid var(--clay);
  border-radius: 14px;
  background: #f2f5ee;
}

.related-event strong,
.related-event span {
  display: block;
}

.related-event span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.page-hero {
  position: relative;
  padding: clamp(54px, 9vw, 112px) clamp(18px, 4vw, 56px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(8, 17, 15, 0.98), rgba(12, 50, 37, 0.94) 58%, rgba(15, 31, 27, 0.98)),
    var(--charcoal);
  color: #fff;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(52px, 10vw, 128px);
}

.compact-hero {
  padding-bottom: clamp(38px, 6vw, 64px);
}

.admin-shell {
  display: grid;
  gap: 14px;
  max-width: 720px;
  padding: 24px;
}

.admin-shell.narrow {
  max-width: 540px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.7fr) minmax(0, 1.3fr);
  gap: 18px;
}

.admin-monitoring {
  margin-top: 18px;
}

.admin-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 22px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.field.wide {
  grid-column: 1 / -1;
}

.admin-list {
  display: grid;
  gap: 9px;
}

.admin-list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(16, 35, 31, 0.1);
  border-radius: var(--radius-sm);
  background: #f8faf5;
}

.admin-list-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-list-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  max-width: min(380px, calc(100vw - 36px));
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 26px clamp(18px, 4vw, 56px);
  border-top: 1px solid rgba(16, 35, 31, 0.1);
  background: var(--panel);
  color: var(--muted);
  font-weight: 900;
}

.site-footer a:hover {
  color: var(--green);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-content,
  .today-panel,
  .stats div,
  .trail-card,
  .event-card {
    animation: lift-in 640ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .today-panel {
    animation-delay: 120ms;
  }

  .trail-card:nth-child(3n + 2),
  .event-card:nth-child(3n + 2),
  .stats div:nth-child(2) {
    animation-delay: 80ms;
  }

  .trail-card:nth-child(3n),
  .event-card:nth-child(3n),
  .stats div:nth-child(3) {
    animation-delay: 150ms;
  }
}

@keyframes lift-in {
  from {
    transform: translateY(18px);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .hero,
  .board {
    grid-template-columns: 1fr;
  }

  .today-panel {
    align-self: stretch;
  }

  .trail-grid,
  .venue-grid,
  .source-grid,
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #trailGrid.trail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --header-height: auto;
  }

  .site-header,
  .section-head,
  .toolbar {
    align-items: stretch;
  }

  .site-header,
  .section-head {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .site-header {
    display: flex;
    padding-top: 8px;
    padding-bottom: 10px;
  }

  .brand {
    max-width: 100%;
  }

  .brand-logo {
    width: min(300px, 78vw);
    height: auto;
    max-height: 58px;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .top-nav a {
    min-height: 38px;
    padding: 8px 13px;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: clamp(56px, 18vw, 92px);
  }

  .stats,
  .trail-grid,
  .venue-grid,
  .source-grid,
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  #trailGrid.trail-grid {
    grid-template-columns: 1fr;
  }

  .result-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .stats div {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .event-card {
    grid-template-columns: 1fr;
  }

  .event-date {
    min-height: 68px;
  }

  .detail-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
