/*
 * Day 05 / Sight
 * An understated field-note layout, rather than a dashboard.
 * All fonts are native/system fonts. No font CDN, no additional UI library.
 */
:root {
  --paper: #f5f3ed;
  --white: #fffefa;
  --ink: #292e2b;
  --secondary: #666d67;
  --line: #d3d5cd;
  --hill: #38544b;
  --accent: #975f40;
  --shadow: rgba(27, 35, 30, .1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
button { font: inherit; cursor: pointer; }
a { color: var(--hill); text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, .panorama:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.page { max-width: 1580px; margin: auto; }
.masthead {
  background: var(--paper);
  padding: 24px clamp(18px, 4.1vw, 68px) 33px;
  border-bottom: 1px solid var(--line);
}
.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: #626861;
  font-size: .79rem;
  font-weight: 500;
  letter-spacing: 0;
}
.eyebrow {
  display: block;
  color: var(--secondary);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .01em;
  text-transform: none;
}
.masthead .eyebrow { margin: 28px 0 9px; }
.masthead h1 {
  margin: 0;
  max-width: 940px;
  color: #292e2b;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(2.45rem, 5.4vw, 5.25rem);
  font-weight: 650;
  letter-spacing: -.04em;
  line-height: 1.06;
}
.masthead h1 em {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: .96em;
  font-weight: 400;
  letter-spacing: -.055em;
  white-space: nowrap;
}
.intro {
  margin: 19px 0 0;
  max-width: 680px;
  color: #4f5752;
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  line-height: 1.62;
}
.experience { padding: 0 clamp(13px, 3.4vw, 54px) 28px; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 16px 28px;
  padding: 22px 0;
}
.toolbar-block { display: flex; flex-direction: column; gap: 7px; }
.control-label {
  color: var(--secondary);
  font-size: .79rem;
  letter-spacing: 0;
  font-weight: 600;
  text-transform: none;
}
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.buttons button {
  border: 1px solid #bfc5bd;
  border-radius: 2px;
  background: var(--white);
  color: #3f4d43;
  font-size: .82rem;
  font-weight: 500;
  padding: 9px 12px;
  white-space: nowrap;
  transition: background-color .14s ease, color .14s ease;
}
.buttons button:hover:not(:disabled) { background: #e8eae3; }
.buttons button.on,
.buttons button.on:hover:not(:disabled) {
  background: var(--hill);
  border-color: var(--hill);
  color: #fffefa;
}
.buttons button:disabled {
  opacity: .43;
  cursor: not-allowed;
  background: #e9e9e3;
  color: #68716b;
}
.scene {
  height: min(72vh, 730px);
  min-height: 480px;
  position: relative;
  overflow: hidden;
  border: 1px solid #c4cac0;
  border-radius: 3px;
  background: #cbd3c7;
}
.scene #map { width: 100%; height: 100%; background: #c5cfc0; }
.top-note {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(420px, calc(100% - 105px));
  padding: 9px 12px;
  border: 1px solid #d0d3c9;
  border-radius: 3px;
  background: rgba(255,254,250,.94);
  color: #435147;
  font-size: .75rem;
  line-height: 1.4;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: #66856e; flex: none; }
.compass {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: 1px solid #ccd0c7;
  background: rgba(255,254,250,.94);
  color: var(--ink);
}
.compass>span { font: 500 1.45rem Georgia,serif; }
.compass small { font-size: .57rem; font-weight: 500; letter-spacing: .01em; }
.scene-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 34px 18px 15px;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(19,35,30,.68));
  color: #fffefa;
}
.scene-bottom>div { display: flex; flex-direction: column; gap: 2px; }
.scene-bottom>div:last-child { text-align: right; }
.scene-bottom .small { font-size: .71rem; opacity: .92; font-weight: 500; }
.scene-bottom strong { font: 500 1.12rem "Trebuchet MS", Arial, sans-serif; }
.scene-bottom span:last-child { font-size: .7rem; opacity: .95; }
.maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { bottom: 76px; }
.maplibregl-ctrl-attrib { font-size: 10px !important; }
.viewshed-legend {
  position: absolute;
  z-index: 4;
  top: 93px;
  left: 14px;
  max-width: 274px;
  padding: 13px 15px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: rgba(255,254,250,.97);
  color: var(--ink);
  font-size: .8rem;
}
.viewshed-legend strong { display: block; font-weight: 650; margin-bottom: 10px; }
.viewshed-legend>div { display: flex; align-items: center; gap: 9px; margin: 6px 0; }
.viewshed-legend small { display: block; margin-top: 9px; color: var(--secondary); line-height: 1.4; }
.visible-swatch,.hidden-swatch { width: 12px; height: 12px; flex-shrink: 0; }
.visible-swatch { background: #2b8a63; }
.hidden-swatch { background: #657371; }

.peak-guide {
  display: grid;
  grid-template-columns: minmax(220px,.9fr) minmax(0,1.5fr);
  gap: 20px 38px;
  border-bottom: 1px solid var(--line);
  padding: 38px 0;
}
.peak-guide[hidden] { display: none; }
.peak-guide h2, .below h2, .below h3 {
  margin: 7px 0 12px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.15;
}
.peak-guide h2 { font-size: clamp(1.5rem, 2.7vw, 2.25rem); }
.peak-guide p, .below p { color: #565f59; line-height: 1.65; font-size: .92rem; }
.peak-guide p { max-width: 430px; }
.peak-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
  align-content: start;
}
.peak-button {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 3px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.peak-button:hover { background: #eceee7; }
.peak-button strong { display: block; font-weight: 600; font-size: .86rem; }
.peak-button small { display: block; color: #727a73; font-size: .72rem; margin-top: 2px; }
.peak-button .arrow { color: var(--accent); font-size: 1rem; flex: none; }
.peak-credit { grid-column: 1 / -1; margin: 0; max-width: none !important; font-size: .72rem !important; }
.peak-marker {
  appearance: none;
  padding: 4px 7px;
  border: 1px solid #819d8a;
  border-radius: 2px;
  background: rgba(255,254,250,.95);
  color: #284437;
  font: 600 11px Arial, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
.peak-marker:hover { background: white; }
.peak-marker:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.below {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(24px, 6vw, 95px);
  padding: 35px 0 38px;
}
.below h2 { font-size: clamp(1.65rem, 2.9vw, 2.5rem); }
.below h3 { font-size: clamp(1.35rem, 2.1vw, 1.8rem); }
.below p { margin: 0 0 14px; }
footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 24px 0 6px;
}
footer p { margin: 0; }
.footer-warning { color: #292e2b; font-size: 1.08rem; font-weight: 600; }
.source-credit { font-size: .75rem; color: var(--secondary); }

/* A measured panoramic profile, not a photorealistic image. */
.panorama {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  background: linear-gradient(#e3ede7,#f1ede0);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}
.panorama[hidden] { display: none; }
.panorama.dragging { cursor: grabbing; }
.panorama canvas { width: 100%; height: 100%; display: block; }
.panorama-labels { position: absolute; inset: 0; pointer-events: none; }
.panorama-peak {
  position: absolute;
  white-space: nowrap;
  border: 1px solid #899f8b;
  border-radius: 2px;
  padding: 4px 6px;
  transform: translate(-50%,-100%);
  background: rgba(255,254,250,.93);
  color: #284638;
  font: 600 11px Arial, sans-serif;
  pointer-events: auto;
  cursor: pointer;
}
.panorama-peak:after { content: ""; position: absolute; top: 100%; left: 50%; width: 1px; height: 10px; background: #497361; }
.panorama-peak:hover { background: white; }
.panorama-note {
  position: absolute;
  bottom: 88px;
  left: 14px;
  z-index: 3;
  max-width: calc(100% - 28px);
  padding: 7px 9px;
  border-radius: 2px;
  background: rgba(255,254,250,.9);
  color: #45594d;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: 0;
}
.panorama-note span { opacity: .65; padding: 0 3px; }

@media(max-width: 850px) {
  .peak-guide { grid-template-columns: 1fr; gap: 12px; }
  .peak-credit { grid-column: 1; }
  .peak-guide p { max-width: 700px; }
}
@media(max-width: 740px) {
  .masthead { padding: 17px 18px 25px; }
  .topline { font-size: .72rem; padding-bottom: 12px; }
  .masthead .eyebrow { margin-top: 21px; }
  .masthead h1 { font-size: clamp(2.35rem, 8.3vw, 3.65rem); line-height: 1.08; }
  .intro { font-size: .98rem; margin-top: 15px; }
  .toolbar { gap: 13px; padding: 16px 0 18px; }
  .toolbar-block { flex: 1 1 100%; }
  .buttons { width: 100%; }
  .buttons button { flex: 1; padding: 9px 7px; font-size: .78rem; }
  .scene { height: 61vh; min-height: 415px; }
  .top-note { top: 9px; left: 9px; padding: 7px 9px; max-width: calc(100% - 84px); font-size: .68rem; }
  .compass { top: 9px; right: 9px; width: 54px; height: 54px; }
  .compass>span { font-size: 1.17rem; }
  .scene-bottom { padding: 33px 11px 11px; }
  .scene-bottom strong { font-size: .98rem; }
  .scene-bottom span:last-child { font-size: .62rem; }
  .viewshed-legend { left: 9px; top: 78px; max-width: min(245px, calc(100% - 20px)); font-size: .73rem; }
  .below { grid-template-columns: 1fr; gap: 16px; padding: 28px 0 32px; }
  .peak-guide { padding: 30px 0; }
  .panorama-note { left: 9px; bottom: 78px; padding: 6px 7px; font-size: .63rem; }
  .panorama-peak { font-size: 10px; padding: 3px 5px; }
  footer { gap: 12px; padding-top: 20px; }
  .footer-warning { font-size: .98rem; }
}
@media(max-width: 510px) {
  .peak-list { grid-template-columns: 1fr; }
}
