/* Stories on the map — house-styled rebuild. Map inks ride the site theme
   the same way Nina's floor plans do. */
:root {
  --som-street: color-mix(in srgb, var(--un-text) 38%, transparent);
  --som-street-major: color-mix(in srgb, var(--un-text) 62%, transparent);
  --som-label: color-mix(in srgb, var(--un-text) 62%, transparent);
  --som-area: color-mix(in srgb, var(--un-text) 30%, transparent);
  --som-grid: color-mix(in srgb, var(--un-text) 6%, transparent);
  --som-water: color-mix(in srgb, var(--un-teal) 40%, transparent);
  --som-hwy: color-mix(in srgb, var(--un-chili) 62%, transparent);
}

.som-header { padding: clamp(56px, 7vw, 96px) 24px clamp(20px, 3vw, 36px); }
.som-wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.som-header h1 {
  margin: 0;
  max-width: 640px;
  font-family: var(--f-disp);
  font-size: clamp(34px, 4.6vw, 68px);
  font-weight: 600;
  line-height: 1.02;
  text-wrap: balance;
}
.som-dek {
  margin: 0.45em 0 26px;
  max-width: 52ch;
  font-family: var(--f-body);
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.5;
  color: var(--un-grey);
  text-wrap: pretty;
}
.som-intro { max-width: 1200px; margin: 0 auto; padding: 0 28px 8px; }
.som-intro p {
  max-width: 64ch;
  margin: 0 0 1.35em;
  font-family: var(--f-body);
  font-size: 17.5px;
  line-height: 1.65;
}
/* the three street voices stand as a cluster, not body grafs */
.som-voices {
  margin: 1.8em 0;
  padding-left: 22px;
  border-left: 3px solid var(--un-chili);
}
.som-voices p {
  margin: 0 0 0.7em;
  font-family: var(--f-disp);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 600;
  line-height: 1.25;
}
.som-voices p:last-child { margin-bottom: 0; }
/* full-bleed rotating portraits before the copy */
.som-slides { position: relative; height: min(74vh, 720px); margin: 0 0 clamp(28px, 4vw, 48px); overflow: hidden; }
.som-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1000ms ease; }
.som-slide.is-on { opacity: 1; }
.som-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.som-slide figcaption {
  position: absolute;
  left: 18px;
  bottom: 14px;
  padding: 4px 10px;
  background: rgba(8, 8, 8, 0.6);
  color: #eee;
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 600;
}
/* the map's call to action stands alone — square marker, UI voice */
.som-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1400px;
  margin: 30px auto 0;
  padding: 0 16px;
  font-family: var(--f-ui);
  font-size: 15px;
  font-weight: 700;
}
.som-cta i { flex: none; width: 8px; height: 8px; background: var(--un-chili); }
/* one byline line under the rule; clear air between the dek and the rule */
.som-header .header-credit { margin-top: 0; margin-bottom: 0; }
.som-photocredit { margin-top: 7px; padding-top: 0; border-top: 0; }
.som-header { padding-bottom: clamp(26px, 3.5vw, 46px); }

/* ── workspace: map + panel ─────────────────────────────────────────── */
/* one card: the map and the person panel share a single frame; the map
   extends its empty grid to whatever height the panel needs */
.som-workspace-outer { max-width: 1400px; margin: 26px auto 0; padding: 0 16px 40px; }
.som-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr);
  align-items: stretch;
  border: 1px solid var(--cardline);
  background: var(--surface);
}
.som-mapcol { display: flex; flex-direction: column; min-width: 0; }
.som-map {
  position: relative;
  flex: 1;
  min-height: 480px;
  overflow: hidden;
  background:
    linear-gradient(var(--som-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--som-grid) 1px, transparent 1px),
    transparent;
  background-size: 26px 26px;
}
.som-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.som-map .st { stroke: var(--som-street); stroke-width: 1; vector-effect: non-scaling-stroke; }
.som-map .st-major { stroke: var(--som-street-major); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.som-map .st-hwy { stroke: var(--som-hwy); stroke-width: 2.4; vector-effect: non-scaling-stroke; fill: none; }
.som-map .st-water { stroke: var(--som-water); stroke-width: 7; vector-effect: non-scaling-stroke; fill: none; opacity: 0.7; }
.som-map text {
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 600;
  fill: var(--som-label);
}
.som-map .lbl-area {
  font-size: 15px;
  font-weight: 700;
  fill: var(--som-area);
}
.som-map .lbl-v { writing-mode: vertical-rl; }
.som-map .lbl-call { font-size: 13px; font-weight: 700; }

.som-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--un-background);
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.som-marker img { width: 100%; height: 100%; object-fit: cover; display: block; }
.som-marker:hover { transform: translate(-50%, -50%) scale(1.12); }
.som-marker.is-on { border-color: var(--un-yellow); transform: translate(-50%, -50%) scale(1.12); z-index: 2; }
.som-marker:focus-visible { outline: 2px solid var(--un-yellow); outline-offset: 2px; }

/* ── panel ──────────────────────────────────────────────────────────── */
.som-panel {
  border-left: 1px solid var(--cardline);
  background: var(--surface);
  padding: 18px 20px 22px;
}
.som-eyebrow {
  margin: 0 0 8px;
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--un-grey);
}
.som-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
/* the heat stamp rides the portrait's corner */
.som-temp {
  position: absolute;
  top: 10px;
  right: 10px;
  display: block;
  text-align: center;
  padding: 8px 13px 7px;
  background: var(--surface);
  border: 1px solid var(--cardline);
  font-family: var(--f-disp);
  font-size: 34px;
  font-weight: 700;
  color: var(--un-chili);
  line-height: 1;
  white-space: nowrap;
}
.som-temp i { font-style: normal; font-size: 15px; vertical-align: super; }
.som-temp em {
  display: block;
  margin-top: 3px;
  font-family: var(--f-ui);
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  color: var(--un-grey);
}
.som-cred {
  margin-top: 7px;
  font-family: var(--f-ui);
  font-size: 13px;
  color: var(--un-grey);
}
/* the portrait runs edge-to-edge in the panel, uncropped */
.som-photo { margin: 6px -20px 14px; }
.som-photo .som-cred { padding: 0 20px; }
.som-photo--auth .som-cred { padding: 0; }
.som-photo-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.som-photo img { width: 100%; display: block; }
.som-photo--auth { margin: 0 0 14px; }
.som-photo--auth img { max-height: 260px; object-fit: cover; }
.som-photo-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 9px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.som-photo-btn:hover .som-photo-hint,
.som-photo-btn:focus-visible .som-photo-hint { opacity: 1; }

.som-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 8, 0.92);
  cursor: zoom-out;
}
.som-lightbox[hidden] { display: none; }
.som-lightbox figure { margin: 0; max-width: 94vw; max-height: 92vh; cursor: default; }
.som-lightbox img {
  display: block;
  max-width: 94vw;
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.som-lightbox figcaption {
  margin-top: 10px;
  font-family: var(--f-ui);
  font-size: 13px;
  color: #ddd;
  text-align: center;
}
.som-lb-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: none;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.som-name {
  margin: 0 0 12px;
  font-family: var(--f-disp);
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 600;
  line-height: 1.05;
}
.som-meta { margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.som-meta > div { margin: 0; }
.som-meta dt {
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--un-grey);
}
.som-meta dd { margin: 2px 0 0; font-family: var(--f-body); font-size: 16px; }
.som-meta-wide { flex-basis: 100%; }
.som-words { margin: 14px 0 4px; }
.som-words blockquote {
  margin: 0 0 10px;
  padding-left: 14px;
  border-left: 3px solid var(--un-yellow);
  font-family: var(--f-body);
  font-size: 15.5px;
  line-height: 1.5;
}
.som-dl {
  display: inline-block;
  margin: 10px 0 16px;
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--un-text);
}
.som-tabs { display: flex; gap: 18px; }
.som-tab {
  padding: 0 0 5px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  cursor: pointer;
  font-family: var(--f-ui);
  font-size: 14px;
  font-weight: 700;
  color: var(--un-grey);
}
.som-tab.is-on { color: var(--un-text); border-bottom-color: var(--un-yellow); }
.som-view--auth { padding-top: 4px; }
.som-verified {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--un-palm);
  background: color-mix(in srgb, var(--un-palm) 9%, transparent);
  font-family: var(--f-ui);
  font-size: 13px;
  line-height: 1.5;
}
.som-hash { margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.som-hash code {
  flex: 1;
  font-size: 13px;
  word-break: break-all;
  line-height: 1.45;
  color: var(--un-grey);
}
.som-copy {
  flex: none;
  padding: 3px 10px;
  border: 1px solid var(--cardline);
  background: none;
  cursor: pointer;
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--un-text);
}
.som-proofmeta { margin: 0 0 14px; }
.som-proofmeta > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 5px 0;
}
.som-proofmeta dt {
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--un-grey);
}
.som-proofmeta dd {
  margin: 0;
  font-family: var(--f-ui);
  font-size: 13px;
  text-align: right;
}
.som-artifacts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.som-artifacts a { font-family: var(--f-ui); font-size: 13px; }

@media (max-width: 960px) {
  .som-workspace { grid-template-columns: 1fr; }
  .som-map { flex: none; aspect-ratio: 1060 / 640; min-height: 0; }
  .som-panel { border-left: 0; border-top: 1px solid var(--cardline); }
  .som-map .lbl-call { display: none; }
}
@media (max-width: 700px) {
  .som-wrap, .som-intro { padding-inline: 20px; }
  .som-workspace { padding-inline: 8px; }
  .som-marker { width: 34px; height: 34px; }
}
