/* Trail and listing pages.
   The palette and type scale are lifted from the landing page so a visitor arriving from search
   lands somewhere that looks like the same product. Kept as its own stylesheet rather than shared
   with index.html: that page's CSS is inline and layout-specific, and splitting it would be a
   refactor of a page that is working. */

:root {
  --papir: #ECEFEA;
  --blekk: #16241D;
  --fjord: #1F5A78;
  --skog: #2F6B4A;
  --skog-2: #37805A;
  --kart-t: #E0362A;
  --kote: #C39A6B;
  --lys-dim: #6B7C77;
  --linje: #D3DAD5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--papir);
  color: var(--blekk);
  font-family: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--fjord); }

/* Header */

.bar { border-bottom: 1px solid var(--linje); background: #fff; }

.bar-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  color: var(--blekk);
  display: flex;
  align-items: center;
  gap: 9px;
}

.mark {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: linear-gradient(150deg, var(--fjord), var(--skog-2));
}

.bar-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 15px; }
.bar-nav a { text-decoration: none; }

.bar-cta {
  background: var(--skog);
  color: #fff !important;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
}

/* Breadcrumbs */

.crumb { max-width: 980px; margin: 0 auto; padding: 14px 20px 0; }
.crumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; font-size: 14px; }
.crumb li + li::before { content: "/"; color: var(--lys-dim); margin-right: 8px; }

/* Page */

.page { max-width: 980px; margin: 0 auto; padding: 8px 20px 64px; }

h1 {
  font-family: "Archivo", sans-serif;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 20px 0 12px;
}

h2 {
  font-family: "Archivo", sans-serif;
  font-size: 22px;
  margin: 40px 0 14px;
}

.lede { font-size: 19px; color: #2C3A34; max-width: 68ch; }

/* Sits between the heading and the lede, so it reads as part of the title rather than as the
   first sentence of the description. */
.alias { margin: -6px 0 12px; font-size: 16px; color: #4A5A52; }
.alias strong { color: #1B2A24; }

.hero-shot { position: relative; margin-top: 20px; border-radius: 14px; overflow: hidden; background: #DDE3DE; }
.hero-shot img { display: block; width: 100%; height: clamp(200px, 38vw, 420px); object-fit: cover; }

.credit {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  color: #fff;
  background: rgba(10, 24, 32, 0.62);
  padding: 3px 8px;
  border-radius: 5px;
}

/* Stats */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--linje);
  border: 1px solid var(--linje);
  border-radius: 12px;
  overflow: hidden;
  margin: 28px 0 0;
}

.stat { background: #fff; padding: 14px 16px; }

.stat dt {
  font-family: "Space Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lys-dim);
}

.stat dd { margin: 4px 0 0; font-size: 19px; font-weight: 600; }

/* Elevation profile */

.profile { margin: 32px 0 0; }
.profile svg { width: 100%; height: 220px; display: block; background: #fff; border: 1px solid var(--linje); border-radius: 12px; }
.profile-fill { fill: rgba(47, 107, 74, 0.14); }
.profile-line { fill: none; stroke: var(--skog); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.profile-tick { font-family: "Space Mono", monospace; font-size: 11px; fill: var(--lys-dim); }
.profile figcaption { font-size: 14px; color: var(--lys-dim); margin-top: 8px; }

/* Map */

.map { height: 420px; border-radius: 12px; border: 1px solid var(--linje); background: #E6EAE6; }
.leaflet-container { border-radius: 12px; font: inherit; }

/* Notes */

.notes ul { margin: 0; padding-left: 20px; max-width: 68ch; }
.notes li { margin-bottom: 8px; }

/* Cards */

.cards { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.cards a {
  display: block;
  background: #fff;
  border: 1px solid var(--linje);
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--blekk);
  height: 100%;
}

.cards a:hover { border-color: var(--skog-2); }
.cards strong { display: block; font-size: 17px; margin-bottom: 4px; }
.cards span { display: block; font-size: 14px; color: var(--lys-dim); }
.cards .where { font-family: "Space Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 6px; }

.more { font-size: 15px; color: var(--lys-dim); margin-top: 18px; }

/* Search */

.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;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0;
  max-width: 620px;
  background: #fff;
  border: 1px solid var(--linje);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
}

.search:focus-within { border-color: var(--skog-2); box-shadow: 0 0 0 3px rgba(47, 107, 74, 0.14); }
.search-icon { width: 19px; height: 19px; color: var(--lys-dim); flex: none; }

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  color: inherit;
  padding: 8px 0;
}

/* Safari draws its own clear button on type=search and it collides with the pill. */
.search input::-webkit-search-decoration,
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search button {
  flex: none;
  border: 0;
  background: var(--skog);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
}

.search button:hover { background: var(--skog-2); }

/* The dropdown is absolutely positioned so opening it cannot push the page around — a list that
   shoves the content down on every keystroke is worse than no list. */
.search-drop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--linje);
  border-radius: 14px;
  box-shadow: 0 18px 40px -18px rgba(16, 36, 44, 0.45);
  max-height: 60vh;
  overflow-y: auto;
}

.search-drop a { display: block; padding: 9px 12px; border-radius: 9px; text-decoration: none; color: var(--blekk); }
.search-drop li.on a, .search-drop a:hover { background: #EEF3EF; }
.search-drop strong { display: block; font-size: 16px; font-weight: 600; }
.search-drop span { display: block; font-size: 13px; color: var(--lys-dim); }

/* Explore directory */

.explore { margin: 52px 0 0; border-top: 1px solid var(--linje); padding-top: 8px; }
.explore-cols { display: grid; gap: 28px 32px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.explore-col h3 {
  font-family: "Space Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lys-dim);
  margin: 0 0 10px;
  font-weight: 400;
}

.explore-col ul { list-style: none; margin: 0; padding: 0; }

.explore-col li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
}

.explore-col a { text-decoration: none; color: var(--blekk); }
.explore-col a:hover { color: var(--fjord); text-decoration: underline; }
.explore-col li span { font-family: "Space Mono", monospace; font-size: 11px; color: var(--lys-dim); flex: none; }
.explore-more { display: inline-block; margin-top: 10px; font-size: 14px; text-decoration: none; }
.explore-more:hover { text-decoration: underline; }

/* Hub chips */

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

.chips a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--linje);
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
  color: var(--blekk);
  font-size: 15px;
}

.chips a:hover { border-color: var(--skog-2); }
.chips span { font-family: "Space Mono", monospace; font-size: 11px; color: var(--lys-dim); }

/* Call to action */

.cta-card {
  margin: 40px 0 0;
  background: #10242C;
  color: #EDF1EF;
  border-radius: 14px;
  padding: 24px;
}

.cta-card p { margin: 0 0 16px; max-width: 56ch; }

.cta {
  display: inline-block;
  background: #18A05A;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 999px;
}

.cta-note { display: block; margin-top: 10px; font-family: "Space Mono", monospace; font-size: 12px; color: #9DB0AB; }

/* Footer */

.foot { border-top: 1px solid var(--linje); background: #fff; }
.foot-inner { max-width: 980px; margin: 0 auto; padding: 24px 20px 40px; font-size: 14px; color: var(--lys-dim); }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; }
.source { margin: 0 0 12px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
