/* Immersive board layer. Loaded after the base stylesheet. */
:root {
  --black: #080908;
  --black-2: #111310;
  --chalk: #f3efe3;
  --quiet: #aaa99f;
  --acid: #c8ef55;
  color-scheme: dark;
  background: var(--black);
}

html {
  background: var(--black);
}

body {
  color: var(--chalk);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 91, 68, 0.09), transparent 28rem),
    radial-gradient(circle at 92% 24%, rgba(109, 91, 255, 0.08), transparent 34rem),
    var(--black);
}

.site-header {
  position: relative;
  z-index: 20;
  color: var(--chalk);
  background: rgba(8, 9, 8, 0.88);
  border-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.brand-mark { color: var(--chalk); }
.brand-name,
.lede,
.legend-copy,
.service-lede,
.contact-section p { color: var(--quiet); }

.nav-cta {
  color: #10120d;
  background: var(--acid);
}

.map-intro {
  min-height: 52vh;
  padding-top: clamp(4rem, 9vw, 9rem);
}

.map-intro h1 {
  max-width: 13ch;
  color: var(--chalk);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(3.2rem, 7vw, 7.5rem);
  font-weight: 620;
  letter-spacing: -0.075em;
}

.lede strong { color: var(--chalk); }

.control-deck {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.control-deck .map-controls { margin: 0; }

.filter,
.theme-option {
  color: #b8b8ae;
  border-color: rgba(255, 255, 255, 0.16);
}

.filter:hover,
.filter.is-active,
.theme-option:hover,
.theme-option.is-active {
  color: #090a08;
  background: var(--chalk);
  border-color: var(--chalk);
}

.theme-switcher {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.theme-switcher > span {
  margin-right: 0.25rem;
  color: #75766f;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.theme-option {
  padding: 0.55rem 0.72rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 750;
}

.map-shell {
  isolation: isolate;
  padding: clamp(0.65rem, 1.4vw, 1.2rem);
  overflow: visible;
  background:
    linear-gradient(135deg, #181a17, #050605 54%, #1b1c18),
    #080908;
  border: 1px solid #2a2c26;
  border-radius: 0.35rem;
  box-shadow: 0 2rem 7rem rgba(0, 0, 0, 0.62), inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.map-shell::before,
.map-shell::after {
  position: absolute;
  z-index: -1;
  width: 0.66rem;
  height: 0.66rem;
  content: "";
  background: radial-gradient(circle at 35% 30%, #ddd, #555 42%, #161713 65%);
  border-radius: 50%;
  box-shadow: 0 0 0 1px #000, 0 2px 5px #000;
}

.map-shell::before { top: 0.32rem; left: 0.32rem; }
.map-shell::after { right: 0.32rem; bottom: 0.32rem; }

.board-plaque {
  position: absolute;
  z-index: 9;
  right: 1.55rem;
  bottom: 1.55rem;
  padding: 0.45rem 0.65rem;
  color: #c6c2b5;
  background: #121310;
  border: 1px solid #373931;
  font-family: ui-monospace, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
}

.map-status { top: 2rem; left: 2rem; }
.map-viewport { border: 1px solid rgba(0, 0, 0, 0.78); }
.map-stage { transition: background 280ms ease; }

.map-shell[data-board-theme="cork"] .map-stage {
  background:
    radial-gradient(circle at 18% 22%, rgba(77, 40, 18, 0.17) 0 1px, transparent 2px),
    radial-gradient(circle at 73% 65%, rgba(255, 229, 178, 0.17) 0 1px, transparent 2.4px),
    repeating-radial-gradient(ellipse at 30% 40%, rgba(78, 42, 21, 0.08) 0 1px, transparent 1px 7px),
    linear-gradient(115deg, rgba(255, 221, 165, 0.12), transparent 30%, rgba(75, 36, 17, 0.1)),
    #98633d;
  background-size: 17px 19px, 23px 21px, 31px 27px, auto, auto;
  box-shadow: inset 0 0 4rem rgba(55, 24, 9, 0.6);
}

.map-shell[data-board-theme="carbon"] .map-stage {
  background:
    linear-gradient(45deg, rgba(255,255,255,0.018) 25%, transparent 25% 75%, rgba(255,255,255,0.018) 75%),
    linear-gradient(-45deg, rgba(255,255,255,0.018) 25%, transparent 25% 75%, rgba(255,255,255,0.018) 75%),
    radial-gradient(circle at 50% 46%, rgba(202, 239, 85, 0.065), transparent 28rem),
    #0c0e0d;
  background-size: 14px 14px, 14px 14px, auto, auto;
}

.map-shell[data-board-theme="blueprint"] .map-stage {
  background:
    linear-gradient(rgba(142, 192, 255, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(142, 192, 255, 0.065) 1px, transparent 1px),
    linear-gradient(rgba(142, 192, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(142, 192, 255, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 48% 50%, #142d48, #071728 70%);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px, auto;
}

.map-shell[data-board-theme="cork"] .thread { stroke: rgba(60, 24, 14, 0.55); }
.map-shell[data-board-theme="cork"] .thread-label { fill: #fff4dd; stroke: #63381e; }
.map-shell[data-board-theme="blueprint"] .thread { stroke: rgba(148, 200, 255, 0.38); }

.pin {
  grid-template-columns: 2.25rem auto;
  max-width: 12rem;
  min-height: 2.75rem;
  padding: 0.28rem 0.7rem 0.28rem 0.28rem;
  background: rgba(10, 11, 10, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0.45rem 1rem rgba(0, 0, 0, 0.24);
}

.pin::after {
  left: 1.42rem;
  height: 1.7rem;
  transform: translateY(0.95rem);
}

.pin-head {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  color: #111;
  border-width: 2px;
  border-radius: 50% !important;
  transform: none !important;
  clip-path: none !important;
}

.pin-icon {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.pin-label { font-size: 0.71rem; }

.inspector {
  --origin-x: 50%;
  --origin-y: 50%;
  position: absolute;
  z-index: 30;
  inset: 7%;
  width: auto;
  max-height: none;
  padding: 0;
  overflow: auto;
  color: #151510;
  background: transparent;
  border: 0;
  border-radius: 0.3rem;
  box-shadow: 0 2.5rem 8rem rgba(0, 0, 0, 0.72);
  transform-origin: var(--origin-x) var(--origin-y);
  animation: pin-expand 360ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

.inspector[hidden] { display: none; }

.inspector-sheet {
  position: relative;
  min-height: 100%;
  padding: clamp(1.25rem, 3.5vw, 3.8rem);
  background:
    linear-gradient(90deg, transparent 0 2.1rem, rgba(232, 87, 66, 0.16) 2.1rem 2.15rem, transparent 2.15rem),
    repeating-linear-gradient(#f4eedc 0 31px, #d8d1bc 32px),
    #f4eedc;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.inspector-sheet::after {
  position: absolute;
  top: -0.45rem;
  left: 50%;
  width: 1.1rem;
  height: 1.1rem;
  content: "";
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent) 36%, #50130c 72%);
  border-radius: 50%;
  box-shadow: 0 0.35rem 0.55rem rgba(0,0,0,.4);
}

@keyframes pin-expand {
  from { opacity: 0; transform: scale(0.08) rotate(-3deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

.inspector-close {
  position: sticky;
  z-index: 4;
  top: 0;
  float: right;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  color: #191914;
  background: rgba(245, 240, 222, 0.88);
  border: 1px solid rgba(20, 20, 16, 0.22);
  backdrop-filter: blur(8px);
}

.inspector-detail {
  display: grid;
  grid-template-columns: minmax(7rem, 0.3fr) minmax(17rem, 1fr) minmax(15rem, 0.8fr);
  gap: clamp(1.2rem, 3vw, 3rem);
  align-items: start;
}

.inspector-symbol {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: clamp(7rem, 13vw, 11rem);
  aspect-ratio: 1;
  margin-top: 1rem;
  color: #171711;
  background: var(--accent);
  border: 0.45rem solid rgba(255,255,255,.82);
  border-radius: 50%;
  box-shadow: 0 0 0 0.22rem #1a1a16, 0 1.2rem 2rem rgba(0,0,0,.28);
  cursor: pointer;
  padding: 0;
  transform: rotate(-4deg);
}

.inspector-symbol .pin-icon { width: 52%; height: 52%; stroke-width: 1.35; }
.inspector-heading { padding-top: 0.5rem; }
.inspector-category { color: #8b3023; }

.inspector h2 {
  margin: 0;
  max-width: 11ch;
  color: #151510;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2.6rem, 5vw, 5.8rem);
  font-weight: 650;
  letter-spacing: -0.065em;
  line-height: 0.9;
}

.inspector-copy {
  max-width: 46rem;
  color: #3b392f;
  font-size: clamp(1rem, 1.55vw, 1.25rem);
  line-height: 1.55;
}

.inspector-block {
  padding-top: 0.75rem;
  border-top: 2px solid rgba(23, 23, 17, 0.72);
}

.inspector-block h3 {
  margin: 0 0 0.8rem;
  color: #777062;
  font-family: ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.inspector-points,
.framework-list,
.inspector-tasks ul {
  margin: 0;
  padding-left: 1.05rem;
  color: #24231d;
  font-size: 0.8rem;
  line-height: 1.55;
}

.relations { gap: 0.35rem; }
.relation-chip {
  color: #29271e;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(23, 23, 17, 0.18);
}

.inspector-tasks { grid-column: 2 / 3; }
.inspector-action {
  grid-column: 3;
  padding: 1.1rem;
  color: #f4f1e7;
  background: #171813;
  transform: rotate(0.6deg);
}

.inspector-action p {
  margin: 0 0 1.1rem;
  color: #c5c2b7;
  font-size: 0.77rem;
  line-height: 1.55;
}

.inspector-cta,
.form-submit button {
  width: 100%;
  color: #11120e;
  background: var(--acid);
  border: 0;
  border-radius: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 850;
}

.contact-flow { max-width: 66rem; margin: 0 auto; padding-top: 1rem; }
.contact-flow[hidden], .inspector-detail[hidden] { display: none; }
.contact-back {
  margin-bottom: 2rem;
  padding: 0;
  color: #343127;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
}
.contact-flow h2 { max-width: 14ch; }
.contact-lede { max-width: 47rem; color: #4b483d; line-height: 1.55; }
.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.contact-form label { display: grid; gap: 0.4rem; color: #4d493e; font-size: 0.7rem; font-weight: 800; }
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem;
  color: #171712;
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(20,20,15,.28);
  border-radius: 0;
  font: inherit;
}
.contact-form textarea { resize: vertical; }
.field-wide, .form-submit, .form-status { grid-column: 1 / -1; }
.form-submit { display: grid; grid-template-columns: minmax(12rem, .5fr) 1fr; gap: 1rem; align-items: center; }
.form-submit button { padding: 1rem; }
.form-submit p, .form-status { margin: 0; color: #6d685a; font-size: 0.67rem; line-height: 1.45; }
.form-status:not(:empty) { padding: 0.8rem; color: #26310c; background: rgba(169, 209, 81, 0.33); }

.legend-section,
.closing,
footer,
.services-hero,
.service-list,
.sources,
.contact-section { color: var(--chalk); background: transparent; }

.legend-section { border-color: rgba(255,255,255,.11); }
.legend-section h2,
.closing h2,
.services-hero h1,
.service h2,
.sources h2,
.contact-section h2 { color: var(--chalk); }
.legend-grid > div { border-color: rgba(255,255,255,.14); }
.closing {
  background: #0f100e;
  border-top: 1px solid rgba(255,255,255,.1);
}
.closing .kicker { color: #f2553d; }
.closing-link { border-color: rgba(255,255,255,.35); }
footer { border-color: rgba(255,255,255,.1); }

.services-page .service { border-color: rgba(255,255,255,.12); }
.services-page .service-columns ul,
.services-page .sources { color: #aaa99f; }
.services-page .partner-band { background: #111310; }
.services-page .contact-placeholder { border-color: rgba(255,255,255,.2); }

@media (max-width: 980px) {
  .inspector { inset: 4%; }
  .inspector-detail { grid-template-columns: 7rem 1fr; }
  .inspector-symbol { grid-column: 1; grid-row: 1; }
  .inspector-heading { grid-column: 2; }
  .inspector-block { grid-column: auto; }
  .inspector-tasks { grid-column: 1 / 2; }
  .inspector-action { grid-column: 2; }
}

@media (max-width: 780px) {
  .control-deck { display: grid; }
  .theme-switcher { flex-wrap: wrap; }
  .map-shell { padding: 0.45rem; }
  .map-shell .map-viewport { overflow: auto; }
  .inspector {
    position: absolute;
    inset: 1.25rem;
    width: auto;
    max-height: calc(100% - 2.5rem);
    border-radius: 0;
  }
  .inspector-sheet { min-width: 0; }
  .inspector-detail { display: grid; grid-template-columns: 1fr; }
  .inspector-symbol,
  .inspector-heading,
  .inspector-block,
  .inspector-tasks,
  .inspector-action { grid-column: 1; grid-row: auto; }
  .inspector-symbol { width: 5.5rem; }
  .contact-form { grid-template-columns: 1fr; }
  .field-wide, .form-submit, .form-status { grid-column: 1; }
  .form-submit { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .inspector { animation: none; }
}

/* H27-36 — full-screen causal map */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.map-page {
  display: grid;
  grid-template-rows: 4rem minmax(0, 1fr) 1.8rem;
  width: 100%;
  height: 100svh;
  min-height: 38rem;
  overflow: hidden;
  background: #080908;
}

.map-page .site-header {
  min-height: 4rem;
  padding: 0 clamp(1rem, 2vw, 2rem);
}

.map-page .brand-mark {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.map-page nav button,
.map-page nav a {
  color: inherit;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.map-page .nav-link { background: transparent; }
.map-page .nav-cta { padding: 0.65rem 1rem; color: #10120d; background: var(--acid); }

.map-main {
  min-width: 0;
  min-height: 0;
}

.map-page .map-shell {
  width: auto;
  height: calc(100% - 1rem);
  min-height: 0;
  margin: 0.5rem 0.85rem;
  padding: 0.65rem;
  overflow: hidden;
  border-radius: 0.55rem;
}

.map-page .map-viewport,
.map-page .map-stage {
  height: 100%;
  min-height: 0;
}

.map-page .map-stage {
  min-width: 67.5rem;
  border-radius: 0.18rem;
}

.board-label {
  position: absolute;
  z-index: 8;
  top: 3.15rem;
  left: 3.25rem;
  color: #ff6b55;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.map-page .map-status {
  top: 1.15rem;
  right: 1.15rem;
  left: auto;
  margin: 0;
  opacity: 0.78;
}

.map-page .board-plaque { right: 1.35rem; bottom: 3.55rem; }

.board-toolbar {
  position: absolute;
  z-index: 12;
  right: 1.2rem;
  bottom: 1.2rem;
  left: 1.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.55rem;
  background: rgba(8, 9, 8, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.board-toolbar .map-controls {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.15rem;
  margin: 0;
}

.board-toolbar .filter,
.board-toolbar .theme-option,
.project-trigger {
  min-height: 1.65rem;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  font-size: 0.54rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-trigger {
  color: var(--acid);
  background: rgba(200, 239, 85, 0.09);
  border: 1px solid rgba(200, 239, 85, 0.18);
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
}

.board-toolbar .theme-switcher { justify-self: end; }
.board-toolbar .theme-switcher > span { font-size: 0.5rem; }

.map-page .pin {
  z-index: 2;
  grid-template-columns: 2.35rem auto;
  gap: 0.45rem;
  min-height: 2.45rem;
  max-width: 12.5rem;
  padding: 0.16rem 0.72rem 0.16rem 0.16rem;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0.48rem 1rem rgba(0, 0, 0, 0.27);
  transition: opacity 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease, filter 180ms ease;
}

.map-page .pin::after {
  left: 1.42rem;
  height: 1.4rem;
  transform: translateY(0.95rem);
}

.map-page .pin-head {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  color: #11130e;
  border: 2px solid rgba(255, 255, 255, 0.64);
  border-radius: 50% !important;
  box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--pin-color) 16%, transparent), 0 0.3rem 0.75rem rgba(0, 0, 0, 0.42);
  transform: none !important;
  clip-path: none !important;
}

.pin-monogram {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.pin-monogram-company { font-size: 0.48rem; }

.map-page .pin-label { font-size: 0.68rem; }

.map-page .pin:hover,
.map-page .pin:focus-visible,
.map-page .pin.is-preview,
.map-page .pin.is-active {
  z-index: 8;
  background: rgba(11, 12, 10, 0.98);
  border-color: color-mix(in srgb, var(--pin-color) 75%, white);
  filter: drop-shadow(0 0 0.7rem color-mix(in srgb, var(--pin-color) 48%, transparent));
  transform: translate(-50%, -50%) scale(1.075);
}

.map-page .pin.is-preview-related {
  filter: drop-shadow(0 0 0.35rem color-mix(in srgb, var(--pin-color) 32%, transparent));
}

.map-page .pin.is-preview-muted,
.map-page .pin.is-muted { opacity: 0.18; }

.map-page .pin[data-node-id="ty"] {
  z-index: 7;
  grid-template-columns: 3.9rem auto;
  min-height: 4.35rem;
  max-width: 12.75rem;
  padding: 0.35rem 1.25rem 0.35rem 0.35rem;
  border-color: rgba(200, 239, 85, 0.15);
}

.map-page .pin[data-node-id="ty"] .pin-head {
  width: 3.45rem;
  height: 3.45rem;
  background: var(--acid);
  border: 0.42rem solid #f4f0e5;
  box-shadow: 0 0 0 0.46rem rgba(200, 239, 85, 0.19), 0 0.65rem 1.2rem rgba(0, 0, 0, 0.42);
  animation: ty-tremor 4.8s ease-in-out infinite;
}

.map-page .pin[data-node-id="ty"] .pin-label {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
}

.map-page .pin[data-node-id="ty"]::after { display: none; }

.map-page .pin[data-node-id="ty"]:hover .pin-head,
.map-page .pin[data-node-id="ty"]:focus-visible .pin-head,
.map-page .pin[data-node-id="ty"].is-active .pin-head { animation-play-state: paused; }

.map-page .pin[data-node-id="my"] { z-index: 6; }
.map-page .pin[data-node-id="my"] .pin-head { background: #ff6b55; }

@keyframes ty-tremor {
  0%, 78%, 100% { translate: 0 0; rotate: 0deg; }
  80% { translate: 1px -0.5px; rotate: 0.6deg; }
  82% { translate: -1.4px 0.5px; rotate: -0.8deg; }
  84% { translate: 1.1px 0.8px; rotate: 0.55deg; }
  86% { translate: -0.6px -0.7px; rotate: -0.35deg; }
  88% { translate: 0.4px 0; rotate: 0.2deg; }
}

.map-page #threads g[data-from] {
  opacity: 0.78;
  transition: opacity 180ms ease, filter 180ms ease;
}

.map-page .thread {
  stroke: var(--thread-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: url(#wool-filter);
}

.map-page .thread-bed { stroke-width: 6; opacity: 0.16; }
.map-page .thread-core { stroke-width: 2.15; opacity: 0.88; }
.map-page .thread-fiber { stroke: #fff7e8; stroke-width: 0.55; stroke-dasharray: 2 6; opacity: 0.25; }
.map-page #threads g.is-preview-muted,
.map-page #threads g.is-muted { opacity: 0.055; }
.map-page #threads g.is-preview,
.map-page #threads g.is-active { opacity: 1; filter: drop-shadow(0 0 0.23rem var(--thread-color)); }
.map-page #threads g.is-preview .thread-core,
.map-page #threads g.is-active .thread-core { stroke-width: 3.2; }
.map-page #threads g.is-preview .thread-bed,
.map-page #threads g.is-active .thread-bed { opacity: 0.3; }

.chat-teaser {
  position: absolute;
  z-index: 8;
  right: 2.5rem;
  bottom: 4.55rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 15.5rem;
  padding: 0.75rem;
  color: var(--chalk);
  text-align: left;
  background: #0c0d0b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.3rem;
  opacity: 1;
}

.chat-dot {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.45rem;
  height: 2.45rem;
  color: #15170f;
  background: var(--acid);
  border-radius: 50%;
  font-weight: 900;
}

.chat-teaser span:last-child { display: grid; gap: 0.12rem; }
.chat-teaser small { color: var(--acid); font-family: ui-monospace, monospace; font-size: 0.5rem; font-style: normal; font-weight: 800; text-transform: uppercase; }
.chat-teaser strong { font-size: 0.72rem; }
.chat-teaser em { color: #77796f; font-size: 0.52rem; font-style: normal; }

.map-page .inspector {
  inset: 4.5%;
  max-height: none;
}

.map-page .inspector-sheet { min-height: 100%; }
.map-page .inspector-category { color: color-mix(in srgb, var(--accent) 75%, #7b241a); }

.consent {
  display: grid !important;
  grid-template-columns: 1.1rem 1fr !important;
  align-items: start;
  gap: 0.65rem !important;
  padding: 0.75rem;
  color: #5e5a4e !important;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(20, 20, 15, 0.16);
  line-height: 1.45;
}

.consent input { width: 1rem !important; margin: 0.15rem 0 0 !important; }

.project-drawer {
  position: absolute;
  z-index: 35;
  inset: 8%;
  display: grid;
  grid-template-columns: minmax(14rem, 0.8fr) minmax(17rem, 1fr) minmax(14rem, 0.8fr);
  gap: clamp(1.4rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 4rem);
  color: var(--chalk);
  background: #0b0d0c;
  border: 1px solid #3a3d35;
  box-shadow: 0 2.5rem 8rem rgba(0, 0, 0, 0.75);
  animation: pin-expand 320ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

.project-drawer[hidden] { display: none; }
.project-close { position: absolute; top: 1rem; right: 1rem; color: #aaa99f; background: transparent; border: 0; cursor: pointer; font: inherit; font-size: 0.68rem; font-weight: 800; }
.project-copy h2 { margin: 0; font-size: clamp(2.4rem, 5vw, 5rem); letter-spacing: -0.06em; line-height: 0.9; }
.project-copy > p:not(.kicker) { color: #9b9d93; font-size: 0.85rem; line-height: 1.55; }
.visibility-key { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 1.25rem; }
.visibility-key span { padding: 0.35rem 0.52rem; color: #aaa99f; border: 1px solid #3c4038; border-radius: 999px; font-family: ui-monospace, monospace; font-size: 0.48rem; text-transform: uppercase; }
.project-list { position: relative; display: grid; gap: 0.65rem; padding-left: 1.4rem; }
.project-list::before { position: absolute; top: 0.9rem; bottom: 0.9rem; left: 0.45rem; width: 2px; content: ""; background: #44483e; }
.project-card { position: relative; display: grid; gap: 0.25rem; padding: 0.75rem 0.9rem; color: var(--chalk); text-align: left; background: #181a16; border: 1px solid #363a32; border-radius: 0.35rem; cursor: pointer; }
.project-card::before { position: absolute; top: 50%; left: -1.5rem; width: 0.85rem; height: 0.85rem; content: ""; background: #7a7e73; border: 2px solid #11130f; border-radius: 50%; transform: translateY(-50%); }
.project-card b { font-size: 0.82rem; }
.project-card small { color: #94978c; font-family: ui-monospace, monospace; font-size: 0.52rem; text-transform: uppercase; }
.project-card.is-selected { border-color: #ff6b55; filter: drop-shadow(0 0 0.55rem rgba(255, 107, 85, 0.25)); }
.project-card.is-selected::before { background: #ff6b55; box-shadow: 0 0 0.6rem #ff6b55; }
.project-child { margin-left: 1rem; }
.project-capabilities { display: grid; gap: 0.65rem; }
.project-capabilities span { position: relative; padding: 0.68rem 0.9rem 0.68rem 2.8rem; background: #11130f; border: 1px solid #34382f; border-radius: 999px; font-size: 0.7rem; font-weight: 800; }
.project-capabilities span::before { position: absolute; top: 50%; left: 0.55rem; width: 1.55rem; height: 1.55rem; content: ""; background: var(--acid); border-radius: 50%; transform: translateY(-50%); box-shadow: 0 0 0 0.18rem rgba(200, 239, 85, 0.12); }

.map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 1.8rem;
  padding: 0 1rem;
  color: #686a63;
  border: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.49rem;
  letter-spacing: 0.04em;
}

@media (max-width: 900px) {
  .map-page { grid-template-rows: 3.6rem minmax(0, 1fr) 1.8rem; }
  .map-page .site-header { min-height: 3.6rem; }
  .map-page .map-shell { margin-inline: 0.35rem; }
  .board-toolbar { grid-template-columns: auto auto; overflow-x: auto; border-radius: 0.5rem; }
  .board-toolbar .map-controls { display: none; }
  .board-toolbar .theme-switcher { justify-self: stretch; }
  .project-drawer { inset: 2.5%; grid-template-columns: 1fr; align-content: start; overflow: auto; }
  .project-capabilities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-footer span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .map-page .pin[data-node-id="ty"] .pin-head { animation: none; }
  .project-drawer { animation: none; }
}
