/* ==========================================================================
   Hike list (expandable rows)
 
   Each row is a native <details> element: the compact row is the <summary>,
   and clicking it reveals the rest of the hike's information. No JavaScript.
 
   - One column on phones, two once there is room (no breakpoints).
   - Thumbnail size scales with each row's width (cqi = 1% of the row).
   - Icons come from one hidden SVG sprite at the top of <body>, so each row
     only needs <svg class="hike-icon"><use href="#hl-clock"/></svg>.
 
   Change --hl-accent to re-theme the list.
   ========================================================================== */
 
.hike-list,
.hike-list * {
  box-sizing: border-box;
}
 
.hike-list {
  --hl-accent: #1B5E45;
  --hl-accent-tint: color-mix(in srgb, var(--hl-accent) 9%, white);
  --hl-accent-strong: color-mix(in srgb, var(--hl-accent) 82%, black);
  --hl-ink: #14231C;
  --hl-muted: #4D5B54;
  --hl-line: #E3E9E5;
  --hl-chip-line: #C5D0CA;
  --hl-surface: #FFFFFF;
  --hl-radius: 16px;
  --hl-display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --hl-text: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
 
  display: grid;
  grid-template-columns: 1fr;
  grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
  align-items: start; /* an expanded row must not stretch its neighbour */
  gap: 10px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  color: var(--hl-ink);
  font-family: var(--hl-text);
}
 
.hike-icon {
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
 
/* ---- Row (details) ----------------------------------------------------- */
 
.hike-item {
  container-type: inline-size;
  background: var(--hl-surface);
  border: 1px solid var(--hl-line);
  border-radius: var(--hl-radius);
  box-shadow: 0 1px 2px rgba(20, 35, 28, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
 
.hike-item[open] {
  border-color: color-mix(in srgb, var(--hl-accent) 40%, white);
}
 
.hike-item__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: var(--hl-radius);
  cursor: pointer;
  list-style: none;
}
 
.hike-item__summary::-webkit-details-marker {
  display: none;
}
 
.hike-item__summary:focus-visible {
  outline: 3px solid var(--hl-accent);
  outline-offset: -3px;
}
 
.hike-item__image {
  flex: 0 0 auto;
  display: block;
  width: 56px;
  width: clamp(52px, 15cqi, 68px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background: var(--hl-accent);
}
 
.hike-item__main {
  flex: 1 1 auto;
  min-width: 0;
}
 
.hike-item__title {
  display: block;
  font-family: var(--hl-display);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
 
/* ---- Key facts (one line when there is room) --------------------------- */
 
.hike-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-top: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
}
 
.hike-item__place,
.hike-item__stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
 
.hike-item__place {
  color: var(--hl-accent);
  font-weight: 600;
}
 
.hike-item__stat .hike-icon {
  color: var(--hl-accent);
}
 
/* Five-bar difficulty meter. Set data-grade="1" to "5". */
.hike-grade {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
 
.hike-grade i {
  display: block;
  width: 3px;
  border-radius: 1px;
  background: #C3CEC8;
}
 
.hike-grade i:nth-child(1) { height: 4px; }
.hike-grade i:nth-child(2) { height: 7px; }
.hike-grade i:nth-child(3) { height: 9px; }
.hike-grade i:nth-child(4) { height: 12px; }
.hike-grade i:nth-child(5) { height: 14px; }
 
.hike-grade[data-grade="1"] i:nth-child(-n + 1),
.hike-grade[data-grade="2"] i:nth-child(-n + 2),
.hike-grade[data-grade="3"] i:nth-child(-n + 3),
.hike-grade[data-grade="4"] i:nth-child(-n + 4),
.hike-grade[data-grade="5"] i:nth-child(-n + 5) {
  background: var(--hl-accent);
}
 
/* ---- Chevron ----------------------------------------------------------- */
 
.hike-item__chevron {
  color: var(--hl-muted);
  transition: transform 0.2s ease;
}
 
.hike-item[open] .hike-item__chevron {
  transform: rotate(180deg);
}
 
/* ---- Expanded content -------------------------------------------------- */
 
.hike-item__more {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 14px;
  padding: 14px 0;
  border-top: 1px solid var(--hl-line);
}
 
.hike-item__desc {
  margin: 0;
  color: var(--hl-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}
 
.hike-detail {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 16px;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
}
 
.hike-detail dt {
  color: var(--hl-muted);
}
 
.hike-detail dd {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}
 
.hike-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
 
.hike-item__tags li {
  padding: 5px 11px;
  border: 1px solid var(--hl-chip-line);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
}
 
.hike-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
 
.hike-btn {
  flex: 1 1 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
 
.hike-btn:focus-visible {
  outline: 3px solid var(--hl-accent);
  outline-offset: 3px;
}
 
.hike-btn--primary {
  background: var(--hl-accent);
  color: #FFFFFF;
}
 
.hike-btn--secondary {
  border: 1px solid var(--hl-chip-line);
  color: var(--hl-ink);
}
 
@media (hover: hover) {
  .hike-item:not([open]):hover {
    border-color: color-mix(in srgb, var(--hl-accent) 40%, white);
    box-shadow: 0 6px 16px rgba(20, 35, 28, 0.08);
  }
 
  .hike-btn--primary:hover {
    background: var(--hl-accent-strong);
  }
 
  .hike-btn--secondary:hover {
    background: var(--hl-accent-tint);
  }
}
 
@media (prefers-reduced-motion: reduce) {
  .hike-item,
  .hike-item__chevron,
  .hike-btn {
    transition: none;
  }
}