:root {
  color-scheme: light;
  --bg: #f4f7f3;
  --panel: #ffffff;
  --ink: #162018;
  --muted: #5d695f;
  --line: #d7ded7;
  --accent: #1f7a4d;
  --accent-strong: #125a37;
  --warn: #a65f00;
  --shadow: 0 1px 0 rgba(22, 32, 24, 0.04);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-header {
  align-items: center;
  background: #17251b;
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 220px;
  padding: 42px clamp(18px, 5vw, 64px);
}

.eyebrow {
  color: #a9d8bd;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 0.96;
  margin: 0;
  max-width: 720px;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  max-width: 420px;
}

.site-header nav a,
.segments button {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  min-height: 40px;
  padding: 10px 14px;
  text-decoration: none;
}

main {
  margin: 0 auto;
  max-width: 1260px;
  padding: 26px clamp(16px, 4vw, 36px) 48px;
}

.controls {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  margin-bottom: 28px;
}

.search-wrap {
  display: grid;
  gap: 8px;
}

.search-wrap label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.search-wrap input {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 0 14px;
}

.segments {
  background: #e8eee8;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 4px;
  padding: 4px;
}

.segments button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  min-height: 38px;
}

.segments button.active {
  background: var(--accent);
  color: #fff;
}

.city-section {
  margin-top: 34px;
}

.city-section h2 {
  font-size: 1.3rem;
  margin: 0 0 14px;
}

.trail-table {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.trail-heading span:last-child {
  text-align: center;
}

.trail-heading span:nth-last-child(2) {
  padding-left: 12px;
}

.trail-heading {
  align-items: center;
  background: #1f7a4d;
  color: #fff;
  display: grid;
  font-size: 0.8rem;
  font-weight: 800;
  gap: 8px;
  grid-template-columns: minmax(80px, 0.3fr) 100px minmax(50px, 0.15fr) minmax(50px, 0.15fr) auto;
  min-width: 580px;
  padding: 10px 12px 10px 16px;
  text-transform: uppercase;
}

.trail-list {
  display: grid;
}

.trail-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(80px, 0.3fr) 100px minmax(50px, 0.15fr) minmax(50px, 0.15fr) auto;
  min-width: 580px;
  min-height: 44px;
  padding: 6px 12px 6px 16px;
}

.trail-row + .trail-row {
  border-top: 1px solid var(--line);
}

.trail-name {
  font-weight: 800;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trail-city {
  color: var(--muted);
  font-size: 0.9rem;
  overflow: hidden;
  padding-left: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-updated {
  color: var(--muted);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 9px;
  text-align: center;
  white-space: nowrap;
}

.status-open {
  background: #e7f4ec;
  color: var(--accent-strong);
}

.status-closed {
  background: #fde8e8;
  color: #9b1c1c;
}

.status-caution {
  background: #fff4df;
  color: var(--warn);
}

.status-manual {
  background: #fff4df;
  color: var(--warn);
}

.status-unknown {
  background: #edf1f5;
  color: #4d5963;
}

.status-link {
  border-color: var(--line);
  border-radius: 6px;
  border-style: solid;
  border-width: 1px;
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 800;
  min-height: 34px;
  padding: 7px 10px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.manual-checks {
  display: grid;
  gap: 12px;
  margin-top: 38px;
}

.manual-checks h2 {
  font-size: 1.2rem;
  margin: 0;
}

.manual-checks a {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 16px;
  text-decoration: none;
}

.manual-checks a span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
}

.hidden {
  display: none;
}

@media (max-width: 760px) {
  .site-header,
  .controls,
  .manual-checks a {
    align-items: stretch;
    display: grid;
  }

  .site-header nav,
  .segments {
    justify-content: start;
  }

  .segments {
    overflow-x: auto;
  }

}
