:root {
  color-scheme: dark;
  --bg: #050708;
  --surface: #0f1619;
  --surface-2: #172126;
  --border: #283941;
  --text: #edf2f4;
  --muted: #a7b4ba;
  --teal: #1f8794;
  --green: #3b8a64;
  --rust: #b06038;
  --red: #c75858;
  --yellow: #d9c178;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.app-main {
  min-width: 0;
  overflow-x: auto;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  background: #080d0f;
  color: #ffffff;
  box-shadow: 4px 0 22px rgba(0, 0, 0, .34);
  z-index: 20;
}

.sidebar-brand {
  padding: 4px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.sidebar-title {
  font-size: 18px;
  font-weight: 750;
}

.sidebar-subtitle {
  margin-top: 4px;
  color: #b8c5cc;
  font-size: 12px;
}

.sidebar-nav {
  display: grid;
  gap: 4px;
  padding-top: 12px;
}

.sidebar-nav a {
  min-height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 9px 10px;
  color: #dbe3e8;
  font-size: 14px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button,
input,
select,
textarea,
.button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  padding: 7px 10px;
}

button,
.button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

button:disabled {
  cursor: not-allowed;
  opacity: .72;
}

textarea {
  width: 100%;
  resize: vertical;
}

.topbar {
  min-height: 72px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logout-form {
  margin: 0;
}

.user-label {
  color: var(--muted);
  font-size: 12px;
}

.title-group {
  min-width: 0;
}

h1,
h2 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-size: 21px;
}

h2 {
  font-size: 16px;
}

.subtle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.primary {
  color: #ffffff;
  border-color: var(--teal);
  background: var(--teal);
}

.secondary {
  color: #ffffff;
  border-color: var(--muted);
  background: var(--muted);
}

button.active {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px #050708, 0 0 0 2px rgba(31, 135, 148, .42);
}

button.secondary.active {
  border-color: var(--green);
  background: var(--green);
}

.ghost {
  background: var(--surface-2);
}

.disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.messages {
  display: grid;
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 12%, rgba(217, 193, 120, .16), transparent 28%),
    linear-gradient(145deg, #050505 0%, #101619 48%, #050505 100%);
  color: #edf2f4;
}

.login-shell {
  width: min(360px, calc(100vw - 32px));
}

.login-form {
  position: relative;
  overflow: hidden;
  background: rgba(12, 18, 21, .94);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .42);
  display: grid;
  gap: 14px;
  padding: 20px;
}

.login-form::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, .07) 42%, transparent 55%);
  transform: translateX(-70%);
}

.easter-active .login-form::before {
  animation: flashlight-sweep 1.3s ease-out;
}

.login-kicker {
  margin: 0;
  color: #d9c178;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.login-form input {
  background: #050505;
  border-color: rgba(255, 255, 255, .22);
  color: #ffffff;
}

.login-form .primary {
  border-color: #d9c178;
  background: #d9c178;
  color: #172026;
  font-weight: 800;
}

.loose-brick {
  --knock: 0;
  width: 58px;
  min-height: 24px;
  margin: -2px auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  border-color: rgba(217, 193, 120, .28);
  background: transparent;
  opacity: .38;
  transform: translateY(calc(var(--knock) * -1px));
  transition: opacity .16s ease, transform .16s ease, border-color .16s ease;
}

.loose-brick span {
  display: block;
  min-height: 12px;
  background: linear-gradient(180deg, #7b4129, #4d281e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.loose-brick:hover,
.loose-brick:focus-visible {
  opacity: .9;
  border-color: rgba(217, 193, 120, .72);
}

.urbex-easter-egg {
  padding: 10px;
  display: grid;
  gap: 3px;
  border: 1px dashed rgba(217, 193, 120, .65);
  border-radius: 6px;
  background: #050505;
  color: #d9c178;
  font-size: 12px;
  line-height: 1.35;
}

.urbex-easter-egg[hidden] {
  display: none;
}

.urbex-easter-egg strong {
  color: #ffffff;
}

@keyframes flashlight-sweep {
  from {
    transform: translateX(-70%);
  }
  to {
    transform: translateX(85%);
  }
}

.message {
  padding: 10px 18px;
  background: var(--surface);
  font-size: 13px;
}

.message.success {
  color: var(--green);
}

.message.error {
  color: var(--red);
}

.public-site {
  min-height: 100vh;
  background: #000000;
  color: #eef2ef;
}

.public-hero {
  position: relative;
  min-height: 195px;
  padding: 28px 24px 24px;
  background: #050505;
  display: flex;
  align-items: end;
}

.public-hero::before {
  content: none;
}

.public-hero-content {
  position: relative;
  z-index: 1;
  width: min(780px, 100%);
  color: #ffffff;
}

.public-kicker {
  margin: 0 0 10px;
  color: #d9c178;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.public-hero h1 {
  max-width: 760px;
  font-size: 36px;
  line-height: 1;
}

.public-lede {
  max-width: 880px;
  margin: 10px 0 0;
  color: #eef2ef;
  font-size: 15px;
  line-height: 1.45;
}

.public-hero-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.public-button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 6px;
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 750;
}

.public-button.primary {
  border-color: #a43d2f;
  background: #a43d2f;
}

.public-account-note {
  margin: 9px 0 0;
  color: #aeb8b1;
  font-size: 13px;
  line-height: 1.4;
}

.public-account-note a {
  color: #d9c178;
  font-weight: 750;
}

.public-intro,
.public-ethos,
.public-crawler-note {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 780px);
  gap: 32px;
  align-items: start;
  justify-content: center;
}

.public-intro h2,
.public-ethos h2,
.public-methods h2,
.public-crawler-note h2 {
  margin: 0;
  color: #ffffff;
  font-size: 26px;
  line-height: 1.15;
}

.public-intro p,
.public-ethos p,
.public-methods p,
.public-crawler-note p {
  margin: 0;
  color: #b9c2bc;
  font-size: 15px;
  line-height: 1.65;
}

.public-story {
  max-width: 780px;
  display: grid;
  gap: 14px;
}

.public-methods {
  padding: 44px 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: #070a0b;
}

.public-section-heading {
  width: min(1160px, 100%);
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 780px);
  gap: 32px;
  align-items: start;
  justify-content: center;
}

.public-story.compact {
  padding-top: 1px;
}

.public-method-grid {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.public-method-card {
  position: relative;
  min-width: 0;
  min-height: 170px;
  border: 1px solid rgba(217, 193, 120, .28);
  border-radius: 8px;
  padding: 18px 16px 16px;
  background: #142024;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
}

.public-method-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: #d9c178;
}

.public-method-card h3 {
  margin: 0 0 9px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.25;
}

.public-method-card p {
  font-size: 14px;
  line-height: 1.55;
}

.public-gallery {
  padding: 10px 24px 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.public-gallery-item {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: #050505;
  overflow: hidden;
}

.public-gallery-item figure {
  margin: 0;
}

.public-gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.public-ethos {
  width: 100%;
  max-width: none;
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: #030303;
  color: #ffffff;
}

.public-ethos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.public-ethos-grid p {
  min-height: 92px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, .06);
  color: #dfe7e1;
  font-weight: 650;
}

.public-crawler-note {
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: #070a0b;
}

.public-crawler-note a {
  color: #d9c178;
  font-weight: 750;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}

.metric {
  min-height: 70px;
  padding: 13px 16px;
  background: var(--surface);
}

.metric-label,
.eyebrow {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.metric-value {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
  white-space: nowrap;
}

.filter-band {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.filter-form {
  display: grid;
  gap: 8px;
}

.filter-form {
  grid-template-columns: minmax(110px, .75fr) minmax(120px, .8fr) minmax(135px, .9fr) minmax(120px, .8fr) minmax(170px, 1.3fr) 92px auto auto;
}

.workspace {
  height: calc(100vh - 208px);
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(360px, 43vw) minmax(280px, 24vw) minmax(380px, 1fr);
  gap: 12px;
  padding: 12px;
}

.image-pane,
.list-pane,
.detail-pane {
  min-width: 0;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.pane-head {
  min-height: 58px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pane-head.stacked {
  align-items: stretch;
  flex-direction: column;
}

.image-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #101820;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  image-rendering: auto;
  object-fit: contain;
}

.empty {
  padding: 18px;
  color: #dbe3e8;
  font-size: 14px;
  text-align: center;
}

.coord-row {
  min-height: 40px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.page-info {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.result-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.result-row {
  display: block;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.result-row:hover,
.result-row.selected {
  background: #18262b;
}

.row-main,
.row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.row-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
}

.row-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.row-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-reason {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1;
  color: #ffffff;
  background: var(--muted);
}

.badge.found {
  background: var(--teal);
}

.badge.urbex {
  background: var(--rust);
}

.badge.advanced {
  background: #245c8f;
}

.badge.no-urbex {
  background: var(--muted);
}

.badge.error {
  background: var(--red);
}

.badge.queued {
  color: var(--text);
  background: #203039;
  border: 1px solid var(--border);
}

.badge.clear {
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.badge.manual {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .4);
}

.empty-list,
.empty-detail {
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
}

.annotation-form {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 8px;
}

.annotation-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(132px, .62fr) minmax(0, 1.38fr);
  border-bottom: 1px solid var(--border);
}

.field-label,
.field-value {
  min-width: 0;
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.35;
}

.field-label {
  color: var(--muted);
  background: var(--surface-2);
  font-weight: 650;
}

.field-value {
  overflow-wrap: anywhere;
}

.raw-json {
  flex: 1;
  min-height: 180px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  color: #dce6ea;
  background: #101820;
  font-size: 12px;
  line-height: 1.4;
}

.map-shell {
  height: calc(100vh - 72px);
  min-height: 560px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.map-toolbar {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  display: grid;
  grid-template-columns: minmax(130px, 180px) minmax(180px, 260px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.map-count {
  color: var(--muted);
  font-size: 13px;
}

.map-stage {
  min-height: 0;
  position: relative;
}

#urbexMap {
  height: 100%;
  min-height: 520px;
}

.map-legend {
  position: absolute;
  right: 12px;
  bottom: 18px;
  z-index: 500;
  max-width: min(520px, calc(100% - 24px));
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(15, 22, 25, .96);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--text);
  font-size: 12px;
  box-shadow: var(--shadow);
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.map-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.help-shell {
  width: min(1100px, calc(100vw - 32px));
  margin: 18px auto 32px;
  display: grid;
  gap: 12px;
}

.help-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.help-section h2 {
  margin-bottom: 12px;
}

.help-list {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(180px, .36fr) minmax(0, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.help-list dt,
.help-list dd {
  margin: 0;
  padding: 9px 11px;
  background: var(--surface);
  font-size: 13px;
  line-height: 1.35;
}

.help-list dt {
  color: var(--text);
  font-weight: 700;
}

.help-list dd {
  color: var(--muted);
}

.guide-shell {
  gap: 16px;
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .34fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(135deg, #172026 0%, #233239 58%, #172026 100%);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.guide-hero h2 {
  max-width: 780px;
  margin: 0;
  font-size: 26px;
  line-height: 1.12;
}

.guide-hero p {
  max-width: 820px;
  margin: 12px 0 0;
  color: #dbe3e8;
  font-size: 15px;
  line-height: 1.55;
}

.guide-kicker {
  margin: 0 0 8px;
  color: #8b3f1f;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.guide-hero .guide-kicker {
  color: #d9c178;
}

.guide-note {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(217, 193, 120, .45);
  border-radius: 8px;
  background: rgba(0, 0, 0, .22);
}

.guide-note strong {
  color: #ffffff;
  font-size: 14px;
}

.guide-note span {
  color: #dbe3e8;
  font-size: 13px;
  line-height: 1.4;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.guide-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.guide-number {
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #172026;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.guide-card h2,
.guide-section h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.guide-card p,
.guide-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.guide-section {
  display: grid;
  gap: 14px;
}

.section-heading {
  display: grid;
  gap: 2px;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.decision-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}

.decision-card.positive {
  border-color: rgba(45, 106, 79, .34);
}

.decision-card.negative {
  border-color: rgba(139, 63, 31, .34);
}

.decision-card h3,
.notes-grid h3 {
  margin: 0;
  font-size: 15px;
}

.decision-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.guide-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.48;
}

.guide-list li + li {
  margin-top: 6px;
}

.review-steps {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  counter-reset: review-step;
  list-style: none;
}

.review-steps li {
  position: relative;
  min-width: 0;
  padding: 40px 12px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.review-steps li::before {
  counter-increment: review-step;
  content: counter(review-step);
  position: absolute;
  top: 12px;
  left: 12px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.review-steps strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.leaflet-bar a,
.leaflet-bar a:hover {
  background: var(--surface);
  border-bottom-color: var(--border);
  color: var(--text);
}

.leaflet-control-attribution {
  background: rgba(15, 22, 25, .88) !important;
  color: var(--muted);
}

.leaflet-control-attribution a {
  color: var(--yellow);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.leaflet-popup-content a {
  color: var(--yellow);
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.notes-grid > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}

.notes-grid p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.story-shell {
  gap: 16px;
}

.story-hero {
  background: linear-gradient(135deg, #111718 0%, #223235 48%, #111718 100%);
}

.story-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.story-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.story-timeline {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  counter-reset: story-step;
  list-style: none;
}

.story-timeline li {
  position: relative;
  min-width: 0;
  padding: 44px 14px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}

.story-timeline li::before {
  counter-increment: story-step;
  content: counter(story-step);
  position: absolute;
  top: 14px;
  left: 14px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #172026;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.story-timeline strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.story-timeline span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .public-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-ethos-grid {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }

  .guide-grid,
  .guide-grid.compact,
  .review-steps,
  .story-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    height: auto;
    grid-template-columns: 1fr;
  }

  .map-shell {
    height: auto;
  }

  .image-pane {
    min-height: 460px;
  }

  .list-pane,
  .detail-pane {
    min-height: 520px;
  }
}

@media (max-width: 720px) {
  .public-hero {
    min-height: 245px;
    padding: 28px 16px 24px;
  }

  .public-hero h1 {
    font-size: 32px;
  }

  .public-lede {
    font-size: 15px;
  }

  .public-intro,
  .public-ethos,
  .public-methods,
  .public-crawler-note,
  .public-gallery {
    padding-left: 16px;
    padding-right: 16px;
    grid-template-columns: 1fr;
  }

  .public-section-heading {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .public-intro,
  .public-ethos,
  .public-crawler-note {
    gap: 18px;
  }

  .public-method-grid {
    grid-template-columns: 1fr;
  }

  .public-method-card {
    min-height: 0;
    padding: 14px;
  }

  .public-method-card::before {
    left: 14px;
    right: 14px;
  }

  .public-gallery {
    gap: 12px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .filter-form,
  .annotation-fields,
  .map-toolbar {
    grid-template-columns: 1fr;
  }

  .workspace {
    padding: 8px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .help-list {
    grid-template-columns: 1fr;
  }

  .guide-hero,
  .decision-grid,
  .notes-grid,
  .story-copy,
  .guide-grid,
  .guide-grid.compact,
  .review-steps,
  .story-timeline {
    grid-template-columns: 1fr;
  }
}
