/*
 * BendTrails — full theme CSS
 * Based on original BendTrails.org WP theme (Bend Trails v2 / Delicious Design)
 * Responsive rebuild: mobile-first, no WooCommerce/shop/CF7/calendar rules.
 * Self-hosted fonts via @font-face below.
 */

/* =========================================================================
   FONTS — self-hosted woff2
   ========================================================================= */

@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/anton-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/source-sans-3-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =========================================================================
   CUSTOM PROPERTIES
   ========================================================================= */

:root {
  /* Clean palette */
  --clr-bg:           #f5f5f3;
  --clr-bg-light:     #ffffff;
  --clr-bg-nav:       #ffffff;
  --clr-dark:         #1e2a1e;
  --clr-dark-deeper:  #141e14;
  --clr-text:         #374035;
  --clr-link:         #2d6a3f;
  --clr-link-hover:   #1a8c4e;
  --clr-btn:          #2d6a3f;
  --clr-border:       #9ca89c;
  --clr-border-light: #dde2dd;

  /* Status colours */
  --clr-open:         #1a8c4e;
  --clr-closed:       #c43030;
  --clr-unknown:      #8a8a8a;

  /* Trail condition colours */
  --clr-riding-well:  #1a8c4e;
  --clr-sandy:        #8a7340;
  --clr-muddy:        #a03030;
  --clr-snow:         #2a6a9e;
  --clr-report-needed:#8a8a8a;

  /* Map green/red for trail lines */
  --clr-trail-open:   #2d8a4a;
  --clr-trail-closed: #c43030;
  --clr-trail-unknown:#888888;

  /* Layout */
  --header-height:    56px;
  --nav-width:        320px;
  --content-max:      1200px;
  --spacing:          1rem;
  --font-body:        'Source Sans 3', -apple-system, BlinkMacSystemFont, "Segoe UI",
                      Roboto, Helvetica, Arial, sans-serif;
  --font-display:     'Anton', sans-serif;
}

/* =========================================================================
   RESET
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  -webkit-text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--clr-link); text-decoration: none; transition: color .3s; }
a:hover { color: var(--clr-link-hover); cursor: pointer; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--clr-dark);
  font-weight: 400; /* Anton is display weight */
  line-height: 1.1;
}
h1 { font-size: 2.2em; margin-bottom: .4em; }
h2 { font-size: 1.5em; margin-bottom: .4em; }
h3 { font-size: 1.2em; margin-bottom: .4em; }
h4 { font-size: .85em; letter-spacing: 1px; text-transform: uppercase; margin-bottom: .4em; }
h5 { font-size: .7em; text-transform: uppercase; margin-bottom: .4em; }
p { font-size: 1em; line-height: 1.5em; margin-bottom: .65em; }
ul { display: block; margin-left: 30px; margin-bottom: .85em; }
ol { display: block; margin-left: 33px; margin-bottom: .85em; }
ul li, ol li { line-height: 1.4; margin-bottom: 4px; }
em, i { font-style: italic; }
strong, b { font-weight: bold; }
hr {
  clear: both;
  border: 0;
  border-top: 1px solid var(--clr-border);
  margin: 10px 0;
  height: 0;
}
hr.dots { border-top: 1px dotted var(--clr-border); }
hr.heavy { border-top: 3px solid var(--clr-border); }
hr.spacious { margin: 30px 0; }

input[type=text], input[type=email], textarea, select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: .95em;
  border: 1px solid var(--clr-border);
  border-radius: 3px;
  padding: 6px 8px;
  width: 100%;
  background: #fff;
}
input[type=text]:focus, input[type=email]:focus, textarea:focus, select:focus {
  outline: 2px solid var(--clr-link);
  outline-offset: 1px;
}

/* =========================================================================
   BUTTONS
   ========================================================================= */

button, input[type=submit], .btn, a.a_button {
  font-family: var(--font-body);
  display: inline-block;
  padding: 8px 18px;
  text-align: center;
  border-radius: 4px;
  font-size: .80em;
  line-height: 1em;
  letter-spacing: .5px;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
  background: var(--clr-btn);
  border: none;
  transition: background .2s, transform .15s;
  cursor: pointer;
  text-decoration: none;
}
button:hover, input[type=submit]:hover, .btn:hover, a.a_button:hover {
  color: #fff;
  background: var(--clr-link-hover);
  transform: translateY(-1px);
}
.btn--primary { background: var(--clr-link); }
.btn--primary:hover { background: var(--clr-link-hover); }

/* =========================================================================
   STATUS COLOURS & BADGES
   ========================================================================= */

.riding_well   { color: var(--clr-riding-well); font-weight: bold; }
.sandy_loose   { color: var(--clr-sandy);        font-weight: bold; }
.muddy         { color: var(--clr-muddy);         font-weight: bold; }
.rideable_snow,
.deep_snow,
.winter_mix,
.ice           { color: var(--clr-snow);          font-weight: bold; }
.closed        { color: var(--clr-closed);        font-weight: bold; }
.report_needed { color: var(--clr-report-needed); font-weight: bold; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .7em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1.4;
}
.status-badge::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-badge--open   { color: var(--clr-open);    background: #e6f4e7; }
.status-badge--open::before   { background: var(--clr-open); }
.status-badge--closed { color: var(--clr-closed);  background: #fdecea; }
.status-badge--closed::before { background: var(--clr-closed); }
.status-badge--snow { color: var(--clr-snow); background: #e8f1f9; }
.status-badge--snow::before { background: var(--clr-snow); }
.status-badge--unknown { color: var(--clr-unknown); background: #f0f0f0; }
.status-badge--unknown::before { background: var(--clr-unknown); }

/* =========================================================================
   LAYOUT — header is fixed, content flows below it
   ========================================================================= */

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--clr-dark);
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  display: flex;
  align-items: center;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 20px;
}

.site-wordmark {
  font-family: var(--font-display);
  font-size: 1.5em;
  color: #fff;
  text-decoration: none;
  letter-spacing: 2px;
  white-space: nowrap;
}
.site-wordmark:hover { color: #8cc99e; }

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.nav-link {
  font-family: var(--font-body);
  font-size: .82em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.75);
  padding: 6px 14px;
  border-radius: 3px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: color .2s, background .2s;
}
.nav-link:hover, .nav-link--active {
  color: #fff;
  background: rgba(255,255,255,.1);
}

/* Header search box */
.header-search {
  display: flex;
  align-items: center;
  margin-left: 8px;
}
.header-search__input {
  font-family: var(--font-body);
  font-size: .8em;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 4px;
  background: rgba(255,255,255,.1);
  color: #fff;
  width: 160px;
  transition: width .3s, background .2s, border-color .2s;
}
.header-search__input::placeholder { color: rgba(255,255,255,.5); }
.header-search__input:focus {
  outline: none;
  width: 220px;
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.4);
}

.site-main {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height) - 80px);
}

/* =========================================================================
   CONTAINER / INSET
   ========================================================================= */

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 20px;
}

.inset-content {
  width: 100%;
  max-width: calc(var(--content-max) - 80px);
  margin: 0 auto;
  /* Keep horizontal padding: .container sets it earlier in the sheet, and the
     shorthand here would otherwise zero it out (text flush to viewport edge) */
  padding: 30px 20px;
}

/* =========================================================================
   DARK BAND (dark_band equivalent)
   ========================================================================= */

.dark-band {
  background: var(--clr-dark);
  color: rgba(255,255,255,.9);
  padding: 40px 0;
}
.dark-band h1, .dark-band h2, .dark-band h3,
.dark-band h4, .dark-band h5, .dark-band h6 { color: #fff; }
.dark-band a { color: #8cc99e; border-bottom: 1px dotted rgba(140,201,158,.5); }
.dark-band a:hover { color: #fff; }

/* =========================================================================
   HOMEPAGE LAYOUT
   ========================================================================= */

.home-wrap {
  background: var(--clr-bg);
  padding: 30px 20px 60px;
}

.home-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 30px;
  max-width: var(--content-max);
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 860px) {
  .home-layout {
    grid-template-columns: 1fr;
  }
  .home-sidebar { order: -1; } /* sidebar above on mobile */
}

/* =========================================================================
   HOME HERO / INTRO BAND
   ========================================================================= */

.home-intro {
  background: var(--clr-dark);
  color: rgba(255,255,255,.9);
  padding: 36px 0;
}
.home-intro .container { max-width: var(--content-max); padding: 0 30px; }
.home-intro h1 { color: #fff; font-size: 2em; margin-bottom: .3em; }
.home-intro p { color: rgba(255,255,255,.8); font-size: .95em; line-height: 1.6; margin-bottom: 0; }
.home-intro a { color: #8cc99e; border-bottom: 1px dotted rgba(140,201,158,.5); }
.home-intro a:hover { color: #fff; }

/* =========================================================================
   REPORT GROUPS — homepage feed cards (c4 parent / child w_button)
   ========================================================================= */

.home-reports-band {
  background: var(--clr-bg);
  padding: 30px 0 50px;
}
.home-reports-band .container { max-width: var(--content-max); padding: 0 30px; }
.home-reports-band h2 { margin-bottom: 20px; font-size: 1.6em; }

.report-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.report-card-trail {
  position: relative;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  border: 1px solid var(--clr-border-light);
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.report-card-trail:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  transform: translateY(-2px);
}
.report-card-trail__thumb {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--clr-dark);
}
.report-card-trail__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 1s, transform 2s;
}
.report-card-trail:hover .report-card-trail__thumb img {
  transform: scale(1.15);
  filter: grayscale(30%);
}
.report-card-trail__body {
  padding: 12px 14px 0;
  flex: 1;
}
.report-card-trail__body h3 {
  font-size: 1.1em;
  margin-bottom: 6px;
  color: var(--clr-dark);
}
.report-card-trail__body h3 a { color: inherit; border: none; }
.report-card-trail__body h3 a:hover { color: var(--clr-link-hover); }

.trail-status-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: .8em;
  line-height: 1.2;
  margin: 6px 0;
}
.trail-status-inline .status { font-weight: bold; }
.trail-status-inline .trail_length { color: var(--clr-text); opacity: .75; }
.trail-status-inline .trail_elevation { font-size: .85em; opacity: .65; }

.decent-comments { font-size: .8em; margin: 8px 0; }
.decent-comments ul { margin: 0; list-style: none; }
.decent-comments li { padding: 4px 0; border-bottom: 1px dotted var(--clr-border-light); }
.decent-comments .comment-avatar img { display: inline-block; vertical-align: middle; border-radius: 50%; margin-right: 4px; }
.decent-comments .comment-author { font-weight: 700; }
.decent-comments .comment-date { color: var(--clr-border); font-size: .85em; }
.decent-comments .comment-excerpt { color: var(--clr-text); }
.decent-comments .comment-excerpt.faded { opacity: .8; }

.report-card-trail__footer {
  padding: 10px 14px 14px;
}
.report-card-trail__footer .a_button {
  display: block;
  width: 100%;
  text-align: center;
}

/* =========================================================================
   SIDEBAR TRAIL LIST (nav sidebar)
   ========================================================================= */

.home-sidebar {
  background: var(--clr-bg-nav);
  border-radius: 6px;
  padding: 16px;
  font-size: .88em;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  border: 1px solid var(--clr-border-light);
}
.sidebar-heading {
  font-size: 1.1em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--clr-link);
}

.sidebar-region { margin-bottom: 16px; }
.sidebar-region__name {
  font-size: .95em;
  color: var(--clr-dark);
  margin-bottom: 6px;
  padding: 4px 0;
  border-bottom: 1px solid var(--clr-border);
}

/* Nav trail list — matching original .trail_row + .trail_list */
.sidebar-trail-list {
  list-style: none;
  margin: 0;
}
.sidebar-trail-list__item {
  border-bottom: 1px dotted var(--clr-border);
  padding: 0 0 6px 0;
  margin: 0 0 6px 0;
}
.trail-row {
  border-bottom: 1px dotted var(--clr-border);
  padding: 0 0 8px 0;
  margin: 0 0 8px 0;
}
.trail-row a, .sidebar-trail-list__item a {
  display: block;
  color: var(--clr-text);
  text-decoration: none;
}
.trail-row a .trail_name,
.sidebar-trail-list__item .trail-link-name {
  color: var(--clr-link);
  font-weight: 700;
  padding: 0 0 2px 0;
  display: block;
}
.trail-row a:hover .trail_name,
.sidebar-trail-list__item a:hover .trail-link-name { color: var(--clr-link-hover); }

.trail-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--clr-text);
}
.trail-link:hover { color: var(--clr-link-hover); }
.trail-link--closed { opacity: .6; text-decoration: line-through; }

/* =========================================================================
   TRAIL SINGLE PAGE
   ========================================================================= */

.trail-page {
  background: var(--clr-bg);
  padding: 30px 20px 60px;
}

.trail-layout {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* Trail snapshot box — mirrors #trail_snapshot + .trail_conditions.snapshot */
#trail_snapshot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

#trail_synopsis {
  flex: 1 1 400px;
}

#trail_synopsis h1.entry_title {
  width: 100%;
  font-size: 2.2em;
  margin-bottom: .3em;
}
#trail_synopsis h1.entry_title .trail_map { font-style: normal; }

.trail_synopsis_inset {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.trail_conditions {
  box-sizing: border-box;
  border: 1px solid var(--clr-border-light);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--clr-bg-light);
}

.trail_conditions.snapshot {
  flex: 0 1 auto;
  min-width: 260px;
}

.trail_conditions h4 {
  width: 100%;
  margin-bottom: 12px;
  font-size: .85em;
}

.trail_conditions_inset {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  align-items: flex-start;
  overflow-x: auto;
}

#trail_status, #trail_length, #trail_elevation, #trail_rating, #trail_forecast, #user_rating {
  margin-right: 10px;
  padding-right: 10px;
  border-right: 1px dotted var(--clr-border);
}
#user_rating { border-right: none; margin-right: 0; padding-right: 0; }

.status_label_single {
  font-size: .6em;
  text-transform: uppercase;
  color: var(--clr-border);
}

#trail_status .current_status {
  padding-top: 3px;
  font-weight: bold;
}

span#deadfall_icon { color: #455608; font-size: .9em; }

/* Stats DL (our rebuilt version) */
.trail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--clr-border-light);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: var(--clr-bg-light);
}
.trail-stats__item {
  margin-right: 14px;
  padding-right: 14px;
  border-right: 1px dotted var(--clr-border);
}
.trail-stats__item:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.trail-stats__item dt {
  font-size: .6em;
  text-transform: uppercase;
  color: var(--clr-border);
  margin-bottom: 2px;
}
.trail-stats__item dd {
  font-size: .9em;
  font-weight: bold;
  color: var(--clr-text);
}

/* Minimap container */
.trail-minimap {
  width: 100%;
  max-width: 420px;
  height: 220px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--clr-border-light);
  background: #eee;
}
.trail-minimap__link {
  display: block;
  font-size: .85em;
  text-align: right;
  margin-top: 4px;
  margin-bottom: 8px;
}

/* Trail content 2-col layout — matching .parent.c1_2.trail_page_units */
.trail_page_units {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
  align-items: flex-start;
  margin-top: 20px;
}

.trail_page_units .trail_desc {
  flex: 1 1 340px;
  min-width: 0;
}

.trail_page_units .trail_pix {
  flex: 0 1 280px;
  min-width: 220px;
}

@media (max-width: 680px) {
  .trail_page_units { flex-direction: column; }
  .trail_page_units .trail_pix { flex: none; width: 100%; }
}

/* Section heading style — matching h3 > span */
.trail_desc h3, .trail_pix h3, .trail_reports h3,
.trail-section-heading {
  border-bottom: 2px solid var(--clr-link);
  color: #fff;
  margin-bottom: 14px;
  background: var(--clr-dark);
  padding: 6px 10px;
  border-radius: 4px 4px 0 0;
}
.trail_desc h3 span, .trail_pix h3 span,
.trail_reports h3 span, .trail-section-heading span {
  display: inline-block;
  background: rgba(255,255,255,.1);
  padding: 4px 8px;
  margin-bottom: -1px;
  border-radius: 3px;
  color: rgba(255,255,255,.9);
  border: none;
}
/* When heading is just text without span */
.trail_desc > h3, .trail_pix > h3, .trail_reports h3 {
  font-family: var(--font-display);
}

/* Trail description text area */
.trail_desc, div.trail_desc {
  font-size: 1em;
  line-height: 1.6;
}
.trail_desc a, div.trail_desc a {
  border-bottom: 1px dotted var(--clr-link);
  font-weight: bold;
  color: var(--clr-link);
}
.trail_desc a:hover, div.trail_desc a:hover {
  color: var(--clr-link-hover);
  border-bottom-color: var(--clr-link-hover);
}

.trail-synopsis {
  font-size: 1em;
  line-height: 1.6;
  margin-bottom: 20px;
}
.trail-synopsis a { border-bottom: 1px dotted var(--clr-link); font-weight: bold; }
.trail-synopsis a:hover { color: var(--clr-link-hover); }

/* =========================================================================
   PHOTO GALLERY
   ========================================================================= */

.gallery, .photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}
.gallery a, .photo-gallery__item {
  display: block;
  overflow: hidden;
  border-radius: 2px;
  cursor: pointer;
}
.gallery a img, .photo-gallery__item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform .4s;
}
.gallery a:hover img, .photo-gallery__item:hover img { transform: scale(1.07); }
.photo-gallery__item figcaption {
  font-size: .7em;
  color: var(--clr-border);
  padding: 2px 0;
  text-align: center;
}

/* Lightbox overlay */
#lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,.9);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#lb-overlay.lb-open { display: flex; }
#lb-img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 0 30px rgba(0,0,0,.8);
}
#lb-caption {
  color: rgba(255,255,255,.8);
  font-size: .85em;
  margin-top: 10px;
  text-align: center;
  max-width: 80vw;
}
.lb-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  color: #fff;
  border: none;
  font-size: 2em;
  width: 48px;
  height: 72px;
  cursor: pointer;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 9001;
}
.lb-btn:hover { background: rgba(255,255,255,.3); }
#lb-prev { left: 8px; }
#lb-next { right: 8px; }
#lb-close {
  position: fixed;
  top: 12px;
  right: 16px;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: none;
  font-size: 1.5em;
  width: 40px;
  height: 40px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9001;
  transition: background .2s;
}
#lb-close:hover { background: rgba(255,255,255,.3); }

/* =========================================================================
   CONDITION REPORTS THREAD — mirrors .comment-list + .comment-body
   ========================================================================= */

.trail-reports {
  width: 100%;
  flex: 1 1 100%;
  margin-top: 8px;
}

#comment_block, .trail_comment {
  background: var(--clr-bg-light);
  border-radius: 6px;
  padding: 16px;
  border: 1px solid var(--clr-border-light);
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comment, li.comment {
  padding: 12px 0;
  border-bottom: 1px dotted var(--clr-border);
}
.comment:last-child { border-bottom: none; }
.comment-body { padding: 0; }

.comment-author.vcard {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.comment-author.vcard img {
  border-radius: 50%;
  flex-shrink: 0;
}
.comment-author cite.fn {
  font-weight: 700;
  font-style: normal;
  color: var(--clr-dark);
}
.comment-author .says { display: none; }

.comment-meta.commentmetadata {
  font-size: .75em;
  color: var(--clr-border);
  margin-bottom: 6px;
}
.comment-meta a { color: var(--clr-border); border: none; }
.comment-meta a:hover { color: var(--clr-link-hover); }

.comment p { font-size: .9em; line-height: 1.5; margin-bottom: .4em; }
.comment p:last-of-type { margin-bottom: 0; }

/* Long URLs in user-submitted reports must not overflow on narrow screens */
.comment-text, .comment-excerpt, .trail_desc { overflow-wrap: break-word; }

/* Threaded reply indentation */
.comment.depth-2, .comment--reply, .report--reply {
  margin-left: 32px;
  padding-left: 12px;
  border-left: 2px solid var(--clr-border-light);
}

/* Our rebuilt report thread */
.report {
  padding: 12px 0;
  border-bottom: 1px dotted var(--clr-border);
}
.report:last-child { border-bottom: none; }
.report--reply {
  margin-left: 28px;
  padding-left: 12px;
  border-left: 2px solid var(--clr-border-light);
}
.report__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.report__avatar { border-radius: 50%; flex-shrink: 0; }
.report__author { font-weight: 700; color: var(--clr-dark); }
.report__time { font-size: .75em; color: var(--clr-border); margin-left: auto; }
.report__body { font-size: .9em; line-height: 1.5; }

.trail-reports__heading {
  font-size: 1.2em;
  margin-bottom: 12px;
}
.no-reports { color: var(--clr-border); font-style: italic; }
.report-submitted-banner {
  background: #e6f4e7;
  color: var(--clr-open);
  border: 1px solid #b8debb;
  border-radius: 3px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: .9em;
}

/* =========================================================================
   REPORT FORM
   ========================================================================= */

.report-form-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--clr-border);
}
.report-form__heading { font-size: 1.2em; margin-bottom: 16px; }

.report-form {
  max-width: 560px;
}
.form-field {
  margin-bottom: 14px;
}
.form-field label {
  display: block;
  font-size: .85em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
  color: var(--clr-dark);
}
.form-field input, .form-field textarea {
  width: 100%;
}
.form-field textarea { resize: vertical; min-height: 100px; }

/* Honeypot — visually hidden from humans */
.form-field--honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cf-turnstile { margin: 12px 0; }

/* =========================================================================
   MAP PAGE
   ========================================================================= */

.map-page .site-main { padding: 0; }

#map {
  width: 100%;
  height: calc(100vh - var(--header-height));
  /* dvh tracks the visible viewport on mobile (URL bar show/hide) */
  height: calc(100dvh - var(--header-height));
}

.noscript-trail-list {
  list-style: none;
  margin: 0;
  padding: 20px;
  max-width: 600px;
}
.noscript-trail-list li {
  padding: 6px 0;
  border-bottom: 1px dotted var(--clr-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* MapLibre popup theme override */
.maplibregl-popup-content {
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: .88em;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.map-popup__name {
  font-weight: 700;
  font-size: 1em;
  display: block;
  margin-bottom: 4px;
}
.map-popup__name a { color: var(--clr-link); }
.map-popup__name a:hover { color: var(--clr-link-hover); }
.map-popup__status { font-size: .8em; }

/* =========================================================================
   ABOUT PAGE
   ========================================================================= */

.about-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}
.about-page h1 { font-size: 2em; margin-bottom: .5em; }
.about-page h2 { font-size: 1.3em; margin: 1.5em 0 .5em; padding-bottom: .3em; border-bottom: 2px solid var(--clr-link); }
.about-page p { font-size: 1em; line-height: 1.6; margin-bottom: .8em; }
.about-page a { color: var(--clr-link); border-bottom: 1px dotted var(--clr-link); }
.about-page a:hover { color: var(--clr-link-hover); }
.about-page ul { margin: 0 0 1em 24px; }
.about-page ul li { line-height: 1.5; margin-bottom: 4px; }

/* =========================================================================
   FOOTER
   ========================================================================= */

.site-footer {
  background: var(--clr-dark-deeper);
  color: rgba(255,255,255,.8);
  padding: 24px 20px;
}
.site-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  font-size: .8em;
  line-height: 1.6;
}
.site-footer p { font-size: 1em; color: rgba(255,255,255,.8); margin-bottom: 4px; }
.site-footer a { color: rgba(255,255,255,.7); }
.site-footer a:hover { color: #8cc99e; }

/* =========================================================================
   ERROR PAGE
   ========================================================================= */

.error-page {
  text-align: center;
  padding: 60px 20px;
}
.error-page h1 { font-size: 3em; margin-bottom: .3em; }
.error-page p { color: var(--clr-border); margin-bottom: .5em; }
.error { color: var(--clr-closed); padding: 20px; }

/* =========================================================================
   THUMBNAIL / THUMB
   ========================================================================= */

div.thumb {
  box-sizing: border-box;
  width: 100%;
  height: 200px;
  margin-bottom: 10px;
  overflow: hidden;
}
div.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s;
}
a:hover div.thumb img { transform: scale(1.05); }
div.thumb.map_thumb img {
  filter: grayscale(100%);
  transition: filter 1s, transform 2s;
}
a:hover div.thumb.map_thumb img {
  transform: scale(1.2);
  filter: grayscale(30%);
}

/* =========================================================================
   TRAIL ALERT BOX
   ========================================================================= */

.trail_alert {
  box-sizing: border-box;
  padding: 16px 20px 10px;
  background: var(--clr-bg-light);
  border-radius: 6px;
  margin: 0 0 16px 0;
  border: 1px solid var(--clr-border-light);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* =========================================================================
   RESPONSIVE OVERRIDES
   ========================================================================= */

@media (max-width: 600px) {
  html { font-size: 16px; }
  .site-header__inner { padding: 0 12px; }
  .site-wordmark { font-size: 1.3em; }
  .nav-link { font-size: .75em; padding: 5px 8px; }
  .header-search__input { width: 110px; font-size: .75em; padding: 4px 8px; }
  .header-search__input:focus { width: 140px; }
  .home-wrap { padding: 16px 10px 40px; }
  .trail-page { padding: 16px 10px 40px; }
  .trail-stats { flex-direction: column; gap: 8px; }
  .trail-stats__item { border-right: none; margin-right: 0; padding-right: 0; border-bottom: 1px dotted var(--clr-border); padding-bottom: 6px; }
  .trail-stats__item:last-child { border-bottom: none; }
  #trail_snapshot { flex-direction: column; }
  .trail_conditions_inset { flex-wrap: wrap; gap: 10px; }
  #trail_status, #trail_length, #trail_elevation, #trail_rating { border-right: none; }
  .report-group { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .report-group { grid-template-columns: 1fr; }
}

/* =========================================================================
   SEARCH PAGE
   ========================================================================= */

.search-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}
.search-page h1 { font-size: 1.8em; margin-bottom: 20px; }

.search-form {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.search-input--large {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1em;
  padding: 10px 14px;
  border: 1px solid var(--clr-border);
  border-radius: 6px;
  background: #fff;
  color: var(--clr-text);
}
.search-input--large:focus {
  outline: 2px solid var(--clr-link);
  outline-offset: 1px;
}

.search-hint {
  color: var(--clr-border);
  font-style: italic;
}
.search-count {
  font-size: .9em;
  color: var(--clr-border);
  margin-bottom: 12px;
}

.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
}
.search-result {
  border-bottom: 1px solid var(--clr-border-light);
  margin: 0;
}
.search-result__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 8px;
  color: var(--clr-text);
  border-radius: 4px;
  transition: background .15s;
}
.search-result__link:hover {
  background: rgba(45,106,63,.06);
  color: var(--clr-text);
}
.search-result__name {
  font-weight: 700;
  color: var(--clr-link);
  font-size: 1.05em;
}
.search-result__link:hover .search-result__name { color: var(--clr-link-hover); }
.search-result__meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: .8em;
  flex-shrink: 0;
}
.search-result__length { color: var(--clr-text); opacity: .7; }
.search-result__region { color: var(--clr-border); }

/* =========================================================================
   ADMIN DASHBOARD (unlisted, Basic-auth protected)
   ========================================================================= */

.admin-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}
.admin-section { margin-bottom: 40px; }
.admin-section h2 {
  border-bottom: 2px solid var(--clr-link);
  padding-bottom: 6px;
  margin-bottom: 14px;
}
.admin-filter { margin-bottom: 12px; }

.admin-report {
  background: var(--clr-bg-light);
  border: 1px solid var(--clr-border-light);
  border-radius: 3px;
  padding: 12px;
  margin-bottom: 12px;
}
.admin-report__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  font-size: .85em;
  margin-bottom: 6px;
}
.admin-report__meta time { color: var(--clr-border); }
.admin-report__body { font-size: .9em; overflow-wrap: break-word; }
.admin-report__actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.admin-trail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dotted var(--clr-border);
}
.admin-trail-row a { flex: 1 1 auto; min-width: 0; font-weight: 700; }
.admin-trail-row select { width: auto; flex: 0 0 auto; }

/* =========================================================================
   UTILITY
   ========================================================================= */

.clr { clear: both; }
.text-center { text-align: center; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* =========================================================================
   TRAIL GROUP TOGGLE (sidebar nav)
   ========================================================================= */

.trail_group { margin-bottom: 16px; }

h3.toggle {
  font-size: 1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .3s;
}
h3.toggle:hover { color: var(--clr-link-hover); }

div.trail_list { padding-left: 4px; }
div.trail_row a { display: block; }
div.trail_row .trail_status {
  display: flex;
  font-size: .8em;
  line-height: 1.2;
}
div.trail_row .trail_length { font-size: .85em; opacity: .75; }
div.trail_row .trail_elevation { font-size: .8em; opacity: .65; }
div.trail_row .report_date { font-size: .75em; text-transform: uppercase; opacity: .6; }
