:root {
  color-scheme: light;
  --paper: #f5f4ed;
  --ink: #202923;
  --muted: #566157;
  --light: #d8dad1;
  --orange: #bd5027;
  --signal: #ff975e;
  --stage: #202b28;
  --mono: "IBM Plex Mono", Consolas, monospace;
  font-family: "Inter", "Microsoft YaHei", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
button,
a {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #ed824a;
  outline-offset: 3px;
}
button {
  color: inherit;
}
svg:not(.symbols) {
  display: block;
}
.symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
button svg,
.back svg,
.section-heading svg,
.package svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
[hidden] {
  display: none !important;
}
.masthead {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 30px;
  background: #1b241f;
  color: #f5f4eb;
  border-bottom: 1px solid #69766b55;
}
.brand,
.back {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.brand {
  gap: 8px;
}
.brand b {
  font:
    750 19px/1 "Inter",
    Arial,
    sans-serif;
  letter-spacing: -0.05em;
}
.brand img {
  display: block;
}
.collection {
  border-left: 1px solid #7a867a75;
  padding-left: 18px;
  color: #d6dbd1;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}
.back {
  margin-left: auto;
  gap: 8px;
  min-height: 44px;
  font-size: 0.9rem;
}
.back:hover {
  text-decoration: underline;
}
.workspace {
  display: grid;
  grid-template-columns: clamp(300px, 24.6vw, 364px) minmax(0, 1fr);
  height: calc(100vh - 60px);
  height: calc(100dvh - 60px);
  min-height: 450px;
}
.rail {
  overflow: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: #b5baaf transparent;
  z-index: 1;
}
.project-intro,
.section-readout,
.negatives,
.delivery {
  margin: 0 clamp(20px, 2.15vw, 33px);
}
.project-intro {
  padding-top: clamp(20px, 3.4vh, 38px);
}
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.13em;
  font-weight: 650;
  color: var(--orange);
  margin: 0 0 11px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.eyebrow > span {
  height: 2px;
  width: 22px;
  background: var(--orange);
}
h1,
h2,
p,
figure,
dl,
dd {
  margin: 0;
}
.project-intro h1 {
  font-size: clamp(2.15rem, 3vw, 3.3rem);
  line-height: 1.1;
  font-weight: 650;
  letter-spacing: -0.065em;
}
.place {
  font:
    italic clamp(1.55rem, 2.3vw, 2.45rem) / 1.15 Georgia,
    serif;
  letter-spacing: -0.035em;
  color: #647061;
  margin-top: 4px;
}
.intro-copy {
  margin: 15px 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}
.survey-stats,
.readings {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.survey-stats {
  margin: 14px 0 18px;
}
.survey-stats > div + div,
.readings > div + div {
  border-left: 1px solid var(--light);
  padding-left: 17px;
}
dt {
  font-size: 0.82rem;
  color: var(--muted);
}
.survey-stats dd,
.readings dd {
  font: 500 1.32rem/1.35 var(--mono);
  letter-spacing: -0.04em;
  margin-top: 2px;
}
dd small {
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0;
}
.section-readout,
.negatives,
.delivery {
  border-top: 1px solid #cdd2c8;
  padding: 17px 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.section-heading h2 {
  font-size: 1.04rem;
  font-weight: 650;
  letter-spacing: 0.025em;
}
.section-heading > svg,
.section-heading > span {
  color: var(--muted);
}
.section-heading > span {
  font: 0.77rem var(--mono);
}
.transects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 6px;
}
.transects button {
  background: transparent;
  color: #485449;
  border: 1px solid #bec5b8;
  border-radius: 20px;
  font-size: 0.86rem;
  min-height: 34px;
  padding: 4px 12px;
}
.transects button[aria-pressed="true"] {
  background: #25342a;
  color: white;
  border-color: #25342a;
}
.chart {
  margin: 4px 0 10px;
}
.chart svg {
  width: 100%;
  height: clamp(65px, 9vh, 94px);
  overflow: visible;
}
.chart figcaption {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--muted);
}
.readings dt small {
  font: 0.7rem var(--mono);
}
.readings dd {
  font-size: 1.2rem;
}
.draw-button {
  background: transparent;
  border: 1px solid #9ca697;
  border-radius: 3px;
  min-height: 40px;
  width: 100%;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.draw-button:hover,
.draw-button[aria-pressed="true"] {
  background: #e4e8dc;
}
.thumbs {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}
.thumbs button {
  flex: 1;
  position: relative;
  min-width: 0;
  aspect-ratio: 1.48;
  background: #d9dfd4;
  border: 0;
  padding: 0;
  overflow: hidden;
}
.thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.thumbs button:hover img {
  transform: scale(1.08);
}
.delivery {
  margin-top: auto;
  padding-bottom: 16px;
}
.package {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.package > svg {
  color: var(--orange);
  width: 22px;
  height: 22px;
}
.package > span {
  font-size: 0.96rem;
  font-weight: 600;
}
.package small {
  display: block;
  font-size: 0.77rem;
  color: var(--muted);
  font-weight: 400;
  margin: 3px 0 0;
}
.package b {
  margin-left: auto;
  font: 0.75rem var(--mono);
  letter-spacing: 0.05em;
  border: 1px solid var(--light);
  padding: 3px 6px;
}
.package:hover > span {
  text-decoration: underline;
}
.credits-button {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 0.81rem;
  padding: 0;
  min-height: 37px;
  margin-top: 5px;
}
.credits-button svg {
  width: 15px;
  height: 15px;
}
.stage {
  isolation: isolate;
  overflow: hidden;
  position: relative;
  min-width: 0;
  color: #edf3e9;
  background-color: var(--stage);
  background-image:
    linear-gradient(#b5ccc30b 1px, transparent 1px), linear-gradient(90deg, #b5ccc30b 1px, transparent 1px),
    radial-gradient(ellipse at 48% 45%, #3d5045 0, #28372f 48%, #1c2823 95%);
  background-size:
    48px 48px,
    48px 48px,
    100% 100%;
}
.stage-canvas,
.stage-canvas canvas,
.map-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.stage-canvas {
  cursor: grab;
  touch-action: none;
  user-select: none;
  outline-offset: -4px !important;
}
.stage-canvas:active {
  cursor: grabbing;
}
.stage-canvas.is-drawing {
  cursor: crosshair;
}
.map-overlay {
  pointer-events: none;
  overflow: visible;
}
.modes {
  position: absolute;
  top: 23px;
  left: 24px;
  display: flex;
  padding: 4px;
  gap: 2px;
  border: 1px solid #87968a65;
  background: #16231eee;
  border-radius: 5px;
  box-shadow: 0 3px 14px #08100d33;
}
.modes button,
.map-tools button,
.credits-button {
  transition:
    background 0.16s,
    color 0.16s;
}
.modes button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 530;
  color: #e0e8dd;
  background: transparent;
  border: 0;
  border-radius: 2px;
  padding: 0 13px;
  min-height: 36px;
}
.modes button:hover,
.map-tools button:hover {
  background: #425447;
}
.modes button[aria-pressed="true"] {
  color: #242b20;
  background: #eef0df;
}
.modes button svg {
  width: 16px;
  height: 16px;
}
.north {
  position: absolute;
  top: 22px;
  right: 24px;
  text-align: center;
  pointer-events: none;
  font: 0.78rem var(--mono);
}
.north svg {
  width: 24px;
  height: 28px;
  transform-origin: 50% 60%;
  margin: 3px auto;
}
.map-tools {
  position: absolute;
  right: 22px;
  bottom: 62px;
  display: flex;
  flex-direction: column;
  background: #1b2a23f5;
  border: 1px solid #85948570;
  border-radius: 3px;
  overflow: hidden;
}
.map-tools button {
  width: 42px;
  height: 40px;
  color: #eff4e8;
  background: none;
  border: 0;
  display: grid;
  place-items: center;
}
.map-tools button + button {
  border-top: 1px solid #788d7f60;
}
.map-tools svg {
  width: 19px;
  height: 19px;
}
.map-caption {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 39px;
  border-top: 1px solid #8b9d8d44;
  padding: 0 23px;
  background: #1a261fde;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #d5dfd1;
  pointer-events: none;
}
.map-caption span + span {
  font: 0.75rem var(--mono);
  letter-spacing: 0.04em;
}
.map-legend {
  position: absolute;
  bottom: 58px;
  left: 24px;
  pointer-events: none;
}
.scale {
  width: 64px;
  text-align: center;
  text-shadow: 0 1px 4px #000;
  font: 0.78rem var(--mono);
}
.scale i {
  height: 6px;
  border: 1px solid #e3ecdc;
  border-top: 0;
  display: block;
  margin-top: 2px;
}
#ramp {
  width: 128px;
  border: 1px solid #73867988;
  background: #1b2922ed;
  border-radius: 3px;
  padding: 7px 8px;
  margin-bottom: 10px;
  font: 0.72rem var(--mono);
}
#ramp span {
  display: flex;
  justify-content: space-between;
}
#ramp b {
  font-weight: 500;
}
#ramp i {
  display: block;
  height: 5px;
  margin-top: 5px;
  background: linear-gradient(to right, #234857, #63928b, #bdc391, #c58c5c, #efdbb1);
}
.mode-notice {
  position: absolute;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 158px);
  padding: 9px 14px;
  background: #0e1c16ec;
  color: #f4f4e7;
  text-align: center;
  font-size: 0.88rem;
  border: 1px solid #8e9d8766;
  border-radius: 3px;
  pointer-events: none;
}
.loading {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  background: #24332bea;
  font-size: 1rem;
}
.loading a {
  color: var(--signal);
}
dialog {
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  border: none;
  border-radius: 4px;
  width: min(780px, calc(100vw - 28px));
  max-height: 92dvh;
  box-shadow: 0 24px 80px #07100e65;
}
dialog::backdrop {
  background: #0c1914c9;
  backdrop-filter: blur(3px);
}
.dialog-title {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--light);
}
.dialog-title h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.dialog-title .eyebrow {
  margin-bottom: 4px;
}
.dialog-close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid #bec4b8;
  border-radius: 50%;
}
.full-photo {
  display: block;
  width: 100%;
  max-height: 64dvh;
  object-fit: contain;
  background: #18251e;
}
.photo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 9px 22px;
}
.photo-footer button {
  background: transparent;
  min-height: 40px;
  border: 0;
  color: var(--orange);
  font-size: 0.93rem;
}
.photo-footer span {
  font: 0.85rem var(--mono);
}
.source-dialog {
  width: min(570px, calc(100vw - 28px));
}
.source-list {
  padding: 0 24px 18px;
}
.source-list > div {
  padding: 16px 0;
  border-bottom: 1px solid var(--light);
}
.source-list > div:last-child {
  border: 0;
}
.source-list dt {
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 6px;
}
.source-list dd {
  color: #49554a;
  font-size: 1rem;
  line-height: 1.65;
}
.source-list a {
  color: #90502c;
  text-underline-offset: 3px;
}
.source-list p {
  margin-top: 5px;
}
@media (min-width: 741px) and (max-height: 770px) {
  .project-intro {
    padding-top: 18px;
  }
  .project-intro h1 {
    font-size: 2.35rem;
  }
  .place {
    font-size: 1.75rem;
  }
  .intro-copy {
    margin: 10px 0;
  }
  .survey-stats {
    margin: 9px 0 12px;
  }
  .section-readout,
  .negatives,
  .delivery {
    padding-block: 12px;
  }
  .chart svg {
    height: 62px;
  }
  .rail {
    scrollbar-gutter: stable;
  }
}
@media (max-width: 740px) {
  .masthead {
    height: 52px;
    padding: 0 17px;
    gap: 12px;
  }
  .brand img {
    width: 24px;
    height: 24px;
  }
  .brand b {
    font-size: 16px;
  }
  .collection {
    font-size: 0.82rem;
    padding-left: 12px;
  }
  .back {
    font-size: 0.85rem;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: auto;
  }
  .rail {
    display: contents;
  }
  .project-intro {
    order: 0;
    margin: 0;
    padding: 18px 19px 15px;
    position: relative;
  }
  .project-intro .eyebrow {
    font-size: 0.76rem;
    margin: 0 0 7px;
  }
  .project-intro h1 {
    font-size: 1.95rem;
    display: inline;
  }
  .place {
    font-size: 1.3rem;
    display: inline;
    margin-left: 9px;
  }
  .intro-copy {
    font-size: 1rem;
    line-height: 1.5;
    margin: 8px 0 0;
    max-width: 36em;
  }
  .survey-stats {
    display: none;
  }
  .stage {
    order: 1;
    flex: none;
    height: clamp(335px, 50svh, 520px);
  }
  .section-readout {
    order: 2;
  }
  .negatives {
    order: 3;
  }
  .delivery {
    order: 4;
    margin-top: 0;
    padding-bottom: 20px;
  }
  .section-readout,
  .negatives,
  .delivery {
    margin-inline: 19px;
  }
  .section-readout {
    border-top: 0;
  }
  .modes {
    left: 12px;
    top: 12px;
    padding: 3px;
    gap: 1px;
  }
  .modes button {
    font-size: 0.82rem;
    gap: 4px;
    padding: 0 9px;
    min-height: 36px;
  }
  .modes button svg {
    width: 14px;
    height: 14px;
  }
  .north {
    right: 13px;
    top: 13px;
  }
  .north svg {
    width: 17px;
    height: 22px;
  }
  .map-tools {
    right: 11px;
    bottom: 43px;
  }
  .map-tools button {
    width: 36px;
    height: 35px;
  }
  .map-legend {
    left: 13px;
    bottom: 45px;
  }
  .map-caption {
    height: 31px;
    padding: 0 12px;
    font-size: 0.72rem;
  }
  .map-caption span + span {
    font-size: 0.66rem;
  }
  .mode-notice {
    bottom: 44px;
    max-width: calc(100% - 140px);
    font-size: 0.8rem;
    padding: 6px 9px;
  }
  .chart svg {
    height: 88px;
  }
  .transects button {
    min-height: 38px;
  }
  .thumbs button {
    max-width: 150px;
  }
  .draw-button {
    min-height: 44px;
  }
  .dialog-title {
    padding: 14px 16px;
  }
  .source-list {
    padding: 0 16px 12px;
  }
}
#ramp small {
  display: block;
  font-size: 0.75rem;
  margin-top: 5px;
  color: #e0e7d7;
}
.photo-caption {
  padding: 12px 24px 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
