/* CRUX DESIGN — Canonical interior-page design system v0.1
   Promoted from the mature Projects / Crux Mesh visual system.
   Projects, Relationships and future long-form pages load this file.
   Sensor-specific selectors remain included during the compatibility phase. */

/* ===== Shared semantic theme tokens ===== */
/*
 * CRUX Theme Core v0.1
 * Shared semantic colour system for cruxdesign.co.za.
 */

:root {
  color-scheme: dark;

  --crux-orange: #ff5a00;
  --crux-orange-soft: rgba(255, 90, 0, 0.14);
  --crux-orange-line: rgba(255, 90, 0, 0.48);

  --page-pad: clamp(20px, 4vw, 68px);
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Montserrat", "Inter", "Helvetica Neue", Arial, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;

  --page-bg: #111315;
  --page-grid: rgba(255, 255, 255, 0.025);
  --surface-1: #181b1e;
  --surface-2: #202428;
  --surface-3: #282d31;
  --surface-map: #171a1d;
  --surface-glass: rgba(17, 19, 21, 0.92);
  --surface-control: rgba(17, 19, 21, 0.88);

  --text-primary: #f2f3f3;
  --text-secondary: #c7cbcf;
  --text-muted: #949a9f;
  --text-faint: rgba(242, 239, 232, 0.24);

  --line: rgba(242, 239, 232, 0.16);
  --line-strong: rgba(242, 239, 232, 0.32);
  --map-line: rgba(242, 239, 232, 0.21);
  --map-line-faint: rgba(242, 239, 232, 0.09);
  --map-hatch: rgba(242, 239, 232, 0.045);
  --map-node-fill: #181b1e;

  --status-online: #ff5a00;
  --status-degraded: #e4b45c;
  --status-offline: #ff7043;
  --status-planned: #8f8d87;

  --selection-bg: rgba(255, 90, 0, 0.28);
  --selection-text: #ffffff;

  --shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.18);
}

:root[data-theme="light"] {
  color-scheme: light;

  --crux-orange-soft: rgba(255, 90, 0, 0.10);
  --crux-orange-line: rgba(214, 72, 0, 0.54);

  --page-bg: #f2f3f3;
  --page-grid: rgba(24, 26, 28, 0.035);
  --surface-1: #f9fafa;
  --surface-2: #eceeef;
  --surface-3: #e1e4e6;
  --surface-map: #e7e9ea;
  --surface-glass: rgba(242, 243, 243, 0.94);
  --surface-control: rgba(242, 243, 243, 0.92);

  --text-primary: #181a1c;
  --text-secondary: #42474c;
  --text-muted: #70767c;
  --text-faint: rgba(24, 26, 28, 0.34);

  --line: rgba(24, 26, 28, 0.15);
  --line-strong: rgba(24, 26, 28, 0.30);
  --map-line: rgba(24, 26, 28, 0.20);
  --map-line-faint: rgba(24, 26, 28, 0.09);
  --map-hatch: rgba(24, 26, 28, 0.045);
  --map-node-fill: #f2f3f3;

  --status-online: #d64800;
  --status-degraded: #9a6500;
  --status-offline: #bc3516;
  --status-planned: #77736b;

  --selection-bg: rgba(255, 90, 0, 0.18);
  --selection-text: #181a1c;

  --shadow-soft: 0 18px 60px rgba(74, 67, 55, 0.12);
}

::selection {
  color: var(--selection-text);
  background: var(--selection-bg);
}

html {
  background: var(--page-bg);
  color: var(--text-primary);
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

body {
  background-color: var(--page-bg);
}

.theme-toggle {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 10px;
  border: 1px solid var(--line);
  color: var(--text-muted);
  background: transparent;
  font: 9px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--text-primary);
  border-color: var(--crux-orange-line);
  outline: none;
}

.theme-toggle-track {
  position: relative;
  width: 30px;
  height: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--surface-2);
}

.theme-toggle-knob {
  position: absolute;
  width: 10px;
  height: 10px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: var(--text-primary);
  transition: transform 180ms ease, background-color 180ms ease;
}

:root[data-theme="light"] .theme-toggle-knob {
  transform: translateX(14px);
  background: var(--crux-orange);
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 680px) {
  .site-actions {
    gap: 10px;
  }

  .theme-toggle-label {
    display: none;
  }

  .theme-toggle {
    padding-left: 8px;
  }
}


/* ===== Canonical interior layouts and components ===== */
:root {
  /* Compatibility aliases while the rest of the site is migrated. */
  --crux-black: var(--page-bg);
  --crux-ink: var(--surface-1);
  --crux-paper: var(--text-primary);
  --crux-paper-2: var(--surface-2);
  --crux-grey: var(--text-muted);
  --crux-line: var(--line);
}

* { box-sizing: border-box; }

html {
  background: var(--page-bg);
  color: var(--text-primary);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  background:
    linear-gradient(var(--page-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--page-grid) 1px, transparent 1px),
    var(--page-bg);
  background-size: 48px 48px;
}

a { color: inherit; }

.site-bar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--page-pad);
  border-bottom: 1px solid var(--crux-line);
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  text-decoration: none;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand strong {
  font-size: 14px;
  font-weight: 600;
}

.brand span {
  color: var(--crux-grey);
  font: 11px/1 var(--mono);
}

.site-nav {
  display: flex;
  gap: 20px;
  font: 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.site-nav a {
  text-decoration: none;
  color: var(--crux-grey);
}

.site-nav a:hover { color: var(--text-primary); }

main { padding: 0 var(--page-pad) 80px; }

.hero {
  min-height: 380px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, .7fr);
  gap: 48px;
  align-items: end;
  padding: 64px 0 44px;
  border-bottom: 1px solid var(--crux-line);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--crux-orange);
  font: 12px/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 850px;
  margin-bottom: 18px;
  font-size: clamp(48px, 8vw, 118px);
  line-height: .86;
  letter-spacing: -.055em;
  font-weight: 300;
}

.hero-copy {
  max-width: 680px;
  color: var(--text-secondary);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.55;
}

.hero-meta {
  display: grid;
  gap: 14px;
  align-self: end;
}

.meta-line, .metric {
  border-top: 1px solid var(--crux-line);
  padding-top: 12px;
}

.meta-label, .metric-label {
  color: var(--crux-grey);
  font: 10px/1.3 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.meta-value {
  margin-top: 8px;
  font: 13px/1.4 var(--mono);
}

.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--crux-line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: baseline;
  margin-bottom: 28px;
}

.section-index {
  color: var(--crux-orange);
  font: 11px/1 var(--mono);
}

.section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 300;
  letter-spacing: -.035em;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--crux-line);
  border: 1px solid var(--crux-line);
}

.metric {
  min-height: 124px;
  padding: 18px;
  border: 0;
  background: var(--surface-1);
}

.metric-value {
  margin-top: 24px;
  font: 34px/1 var(--mono);
}

.metric-value.small { font-size: 19px; }

.map-workspace {
  display: grid;
  gap: 14px;
}

.map-shell {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 46% 42%, rgba(255, 90, 0, .065), transparent 28%),
    var(--surface-map);
  box-shadow: var(--shadow-soft);
}

.map-topbar {
  position: absolute;
  z-index: 8;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  pointer-events: none;
}

.map-context,
.map-controls,
.map-disclaimer,
.map-inspector {
  pointer-events: auto;
}

.map-context {
  display: grid;
  gap: 5px;
  min-width: 210px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
}

.map-context-kicker {
  color: var(--crux-orange);
  font: 9px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.map-context strong {
  color: var(--text-primary);
  font: 11px/1.35 var(--mono);
  font-weight: 400;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.map-controls {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.map-layer-controls,
.map-toolbar {
  display: flex;
  gap: 1px;
  padding: 1px;
  border: 1px solid var(--line);
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
}

.map-layer-button,
.map-toolbar button {
  min-width: 38px;
  height: 36px;
  border: 0;
  color: var(--text-muted);
  background: transparent;
  font: 9px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.map-toolbar button {
  width: 36px;
  min-width: 36px;
  font-size: 15px;
}

.map-layer-button {
  padding: 0 10px;
}

.map-layer-button:hover,
.map-layer-button:focus-visible,
.map-toolbar button:hover,
.map-toolbar button:focus-visible {
  color: var(--text-primary);
  background: var(--surface-2);
  outline: none;
}

.map-layer-button.is-active {
  color: var(--crux-orange);
  background: var(--crux-orange-soft);
}

#network-map {
  width: 100%;
  min-height: 680px;
  display: block;
  touch-action: none;
  cursor: grab;
  outline: none;
}

#network-map:active {
  cursor: grabbing;
}

.map-layer {
  transition: opacity 180ms ease;
}

.map-layer.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.geo-water-fill {
  fill: var(--surface-2);
  opacity: .62;
}

.geo-coast-line {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.4;
}

.geo-contour {
  fill: none;
  stroke: var(--map-line-faint);
  stroke-width: .85;
  stroke-dasharray: 1 8;
}

.geo-boundary {
  fill: none;
  stroke: var(--map-line-faint);
  stroke-width: 1;
  stroke-dasharray: 7 10;
}

.geo-route-primary {
  fill: none;
  stroke: var(--map-line);
  stroke-width: 1.35;
}

.geo-route-secondary {
  fill: none;
  stroke: var(--map-line-faint);
  stroke-width: 1;
  stroke-dasharray: 4 7;
}

.geo-route-node {
  fill: var(--surface-map);
  stroke: var(--map-line);
  stroke-width: 1;
}

.geo-place-label,
.geo-region-label {
  fill: var(--text-faint);
  font-family: var(--mono);
  text-transform: uppercase;
}

.geo-place-label {
  font-size: 9px;
  letter-spacing: .12em;
}

.geo-region-label {
  font-size: 10px;
  letter-spacing: .08em;
}

.network-link {
  fill: none;
  vector-effect: non-scaling-stroke;
  transition:
    opacity 180ms ease,
    stroke-width 180ms ease,
    stroke 180ms ease;
}

.network-link.primary {
  stroke: var(--map-line);
  stroke-width: 1.35;
}

.network-link.primary.active {
  stroke: var(--crux-orange-line);
  stroke-width: 1.7;
}

.network-link.primary.planned {
  stroke-dasharray: 8 9;
}

.network-link.primary.degraded {
  stroke: var(--status-degraded);
  stroke-dasharray: 10 6;
}

.network-link.primary.offline {
  stroke: var(--status-offline);
  stroke-dasharray: 3 6;
}

.network-link.fallback {
  stroke: var(--map-line-faint);
  stroke-width: 1;
  stroke-dasharray: 2 7;
}

.map-link-group {
  opacity: .72;
}

.map-link-group.is-selected {
  opacity: 1;
}

.map-link-group.is-selected .network-link {
  stroke-width: 2.2;
}

.map-node {
  cursor: pointer;
  outline: none;
}

.map-node .pulse {
  fill: transparent;
  stroke: transparent;
  stroke-width: 1.2;
  pointer-events: none;
}

.map-node .marker-body {
  fill: var(--map-node-fill);
  stroke: var(--line-strong);
  stroke-width: 1.45;
  vector-effect: non-scaling-stroke;
  filter: url(#node-shadow);
  transition:
    fill 180ms ease,
    stroke 180ms ease,
    stroke-width 180ms ease;
}

.map-node .marker-core-dot {
  fill: var(--status-planned);
  pointer-events: none;
}

.map-node.status-online .marker-body {
  stroke: var(--status-online);
}

.map-node.status-online .marker-core-dot {
  fill: var(--status-online);
}

.map-node.status-online .pulse {
  stroke: var(--crux-orange-line);
  animation: pulse 2.8s ease-out infinite;
}

.map-node.status-degraded .marker-body,
.map-node.status-degraded .marker-core-dot {
  stroke: var(--status-degraded);
  fill: var(--status-degraded);
}

.map-node.status-offline .marker-body,
.map-node.status-offline .marker-core-dot {
  stroke: var(--status-offline);
  fill: var(--status-offline);
}

.map-node.status-planned .marker-body {
  stroke-dasharray: 4 4;
}

.map-node:hover .marker-body,
.map-node:focus-visible .marker-body,
.map-node.is-selected .marker-body {
  stroke-width: 2.5;
  fill: var(--surface-2);
}

.map-node:focus-visible .marker-body {
  stroke: var(--crux-orange);
}

.map-node.is-selected .marker-body {
  stroke: var(--crux-orange);
}

.map-node-label {
  pointer-events: none;
  transition: opacity 180ms ease;
}

.map-node text.title {
  fill: var(--text-primary);
  font: 13px/1 var(--mono);
  font-weight: 400;
}

.map-node text.sub {
  fill: var(--text-muted);
  font: 9px/1 var(--mono);
  letter-spacing: .035em;
}

#network-map.hide-map-labels .map-node-label,
#network-map.hide-map-labels #qgis-labels {
  opacity: 0;
}

.map-inspector {
  position: absolute;
  z-index: 7;
  left: 14px;
  bottom: 38px;
  width: min(370px, calc(100% - 28px));
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.map-inspector-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.map-inspector-id {
  margin-bottom: 9px;
  color: var(--text-muted);
  font: 9px/1.35 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.map-inspector h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 300;
  letter-spacing: -.025em;
}

.map-inspector-role {
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.map-inspector-data {
  display: grid;
  margin: 16px 0 0;
}

.map-inspector-data div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.map-inspector-data dt,
.map-inspector-data dd {
  margin: 0;
  font: 9px/1.45 var(--mono);
}

.map-inspector-data dt {
  color: var(--text-muted);
  text-transform: uppercase;
}

.map-inspector-data dd {
  color: var(--text-primary);
  text-align: right;
}

.map-inspector-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--crux-orange);
  font: 10px/1 var(--mono);
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
}

.map-inspector-link:hover,
.map-inspector-link:focus-visible {
  color: var(--text-primary);
  outline: none;
}

.map-disclaimer {
  position: absolute;
  z-index: 6;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 14px;
  color: var(--text-muted);
  font: 8px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.map-key-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  gap: 18px 30px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--surface-1);
}

.map-status-legend,
.map-link-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.map-status-item,
.map-link-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font: 9px/1.3 var(--mono);
  letter-spacing: .035em;
  text-transform: uppercase;
}

.map-status-item strong {
  color: var(--text-primary);
  font-weight: 400;
}

.map-status-dot {
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.map-status-dot.online {
  color: var(--status-online);
  background: var(--status-online);
}

.map-status-dot.degraded {
  color: var(--status-degraded);
  background: var(--status-degraded);
}

.map-status-dot.offline {
  color: var(--status-offline);
  background: var(--status-offline);
}

.map-status-dot.maintenance {
  color: var(--text-muted);
  background: var(--surface-3);
}

.map-status-dot.planned {
  color: var(--status-planned);
  border-style: dashed;
}

.legend-line {
  display: inline-block;
  width: 26px;
  height: 0;
  border-top: 1px solid var(--map-line);
}

.legend-line.active {
  border-color: var(--status-online);
  border-top-width: 2px;
}

.legend-line.planned {
  border-top-style: dashed;
}

.legend-line.fallback {
  border-top-style: dotted;
}

.map-method-note {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font: 9px/1.55 var(--mono);
  letter-spacing: .025em;
}

@keyframes pulse {
  from { r: 18; opacity: .9; }
  to { r: 38; opacity: 0; }
}

.node-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--crux-line);
  background: var(--crux-line);
}

.node-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  text-decoration: none;
  background: var(--surface-1);
  transition: background .2s ease, transform .2s ease;
}

.node-card:hover {
  background: var(--surface-2);
}

.node-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.node-id {
  color: var(--crux-grey);
  font: 10px/1.4 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--crux-line);
  font: 9px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.status-chip.online { color: var(--crux-orange); border-color: rgba(255,90,0,.45); }
.status-chip.degraded { color: #e4b45c; }
.status-chip.offline { color: #ff7043; }
.status-chip.planned { color: var(--crux-grey); border-style: dashed; }

.node-card h3 {
  margin: 36px 0 10px;
  font-size: 29px;
  font-weight: 300;
  letter-spacing: -.03em;
}

.node-card .role {
  color: var(--text-secondary);
  line-height: 1.5;
}

.node-card-foot {
  margin-top: auto;
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--crux-grey);
  font: 10px/1.4 var(--mono);
  text-transform: uppercase;
}

.event-list {
  display: grid;
  border-top: 1px solid var(--crux-line);
}

.event-row {
  display: grid;
  grid-template-columns: 180px 130px minmax(0, 1fr) 110px;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--crux-line);
  align-items: baseline;
}

.event-time, .event-severity, .event-state {
  color: var(--crux-grey);
  font: 10px/1.4 var(--mono);
  text-transform: uppercase;
}

.event-title {
  margin-bottom: 5px;
  font-size: 15px;
}

.event-summary {
  color: var(--crux-grey);
  font-size: 13px;
  line-height: 1.5;
}

.empty-state {
  padding: 36px;
  border: 1px solid var(--crux-line);
  color: var(--crux-grey);
  font: 12px/1.6 var(--mono);
}

footer {
  padding: 36px var(--page-pad) 56px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--crux-grey);
  font: 10px/1.4 var(--mono);
  text-transform: uppercase;
}

/* Node detail */
.node-hero {
  padding: 70px 0 44px;
  border-bottom: 1px solid var(--crux-line);
}

.back-link {
  display: inline-flex;
  margin-bottom: 44px;
  color: var(--crux-grey);
  font: 11px/1 var(--mono);
  text-decoration: none;
  text-transform: uppercase;
}

.back-link:hover { color: var(--text-primary); }

.node-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.node-title-row h1 {
  font-size: clamp(48px, 7vw, 96px);
}

.node-lead {
  max-width: 760px;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.6;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 32px;
  border: 1px solid var(--crux-line);
  background: var(--crux-line);
}

.detail-panel {
  min-height: 240px;
  padding: 24px;
  background: var(--surface-1);
}

.detail-panel h2 {
  margin-bottom: 26px;
  color: var(--crux-grey);
  font: 11px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.data-list {
  display: grid;
}

.data-row {
  display: grid;
  grid-template-columns: minmax(130px, .7fr) minmax(0, 1fr);
  gap: 20px;
  padding: 13px 0;
  border-top: 1px solid var(--crux-line);
}

.data-key {
  color: var(--crux-grey);
  font: 10px/1.5 var(--mono);
  text-transform: uppercase;
}

.data-value {
  font: 13px/1.5 var(--mono);
  text-align: right;
}

.sensor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  align-items: stretch;
  background: transparent;
}

.sensor-card {
  position: relative;
  min-height: 190px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--crux-line);
  background: var(--surface-1);
}

.sensor-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: transparent;
}

.sensor-card.state-warning::after,
.sensor-card.state-critical::after,
.sensor-card.state-offline::after {
  background: var(--crux-orange);
}

.sensor-kind {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--crux-grey);
  font: 9px/1 var(--mono);
  text-transform: uppercase;
}

.sensor-state-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  border: 1px solid currentColor;
}

.sensor-card.state-normal .sensor-state-dot {
  border-color: var(--crux-orange);
  background: var(--crux-orange);
}

.sensor-card h3 {
  margin: 24px 0 12px;
  color: var(--text-secondary);
  font-size: 17px;
  font-weight: 400;
}

.sensor-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 9px;
  font: 23px/1.3 var(--mono);
  letter-spacing: .01em;
}

.sensor-unit {
  color: var(--crux-grey);
  font-size: .68em;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sensor-updated {
  margin-top: 24px;
  color: var(--crux-grey);
  font: 9px/1.4 var(--mono);
}

.notice {
  margin: 28px 0 0;
  padding: 16px;
  border-left: 2px solid var(--crux-orange);
  background: var(--crux-orange-soft);
  color: var(--text-secondary);
  font: 11px/1.6 var(--mono);
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
  .node-grid, .sensor-grid { grid-template-columns: repeat(2, 1fr); }
  .event-row { grid-template-columns: 120px 100px minmax(0, 1fr); }
  .event-state { display: none; }
}

@media (max-width: 680px) {
  .site-nav { display: none; }
  .hero { min-height: 310px; padding-top: 44px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .node-grid, .sensor-grid, .detail-grid { grid-template-columns: 1fr; }
  .map-shell, #network-map { min-height: 540px; }
  .event-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .node-title-row { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}
/* Theme Core integration */
body,
.site-bar,
.metric,
.node-card,
.detail-panel,
.sensor-card,
.map-shell,
.map-toolbar button,
.notice {
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.site-nav a:hover {
  color: var(--text-primary);
}

.map-node text.title {
  fill: var(--text-primary);
}

.map-node text.sub {
  fill: var(--text-muted);
}

.status-chip.online {
  color: var(--status-online);
  border-color: var(--crux-orange-line);
}

.status-chip.degraded {
  color: var(--status-degraded);
}

.status-chip.offline {
  color: var(--status-offline);
}

.status-chip.planned {
  color: var(--status-planned);
}

:root[data-theme="light"] .notice {
  background: rgba(255, 90, 0, .08);
}

@media (max-width: 980px) {
  .map-key-panel {
    grid-template-columns: 1fr;
  }

  .map-method-note {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .map-shell {
    min-height: auto;
    overflow: visible;
  }

  #network-map {
    min-height: 520px;
  }

  .map-topbar {
    left: 9px;
    right: 9px;
    top: 9px;
  }

  .map-context {
    display: none;
  }

  .map-controls {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .map-layer-button {
    padding: 0 8px;
  }

  .map-inspector {
    position: relative;
    left: auto;
    bottom: auto;
    width: auto;
    margin: -1px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: none;
  }

  .map-disclaimer {
    right: 10px;
    bottom: 532px;
  }
}

@media (max-width: 520px) {
  #network-map {
    min-height: 470px;
  }

  .map-layer-controls {
    display: none;
  }

  .map-disclaimer {
    bottom: 482px;
  }

  .map-key-panel {
    padding: 14px;
  }

  .map-status-legend,
  .map-link-legend {
    gap: 10px 14px;
  }
}



/* QGIS geographic base / GPS-aware viewer v0.4 */
.qgis-map path,
.qgis-map polyline,
.qgis-map line { vector-effect: non-scaling-stroke !important; }
.qgis-coast { opacity: .82; }
.qgis-coast [stroke] { stroke: var(--text-muted) !important; stroke-width: 1.1 !important; }
.qgis-water [fill] { fill: var(--surface-3) !important; opacity: .72; }
.qgis-water-lines { opacity: .24; }
.qgis-natural { opacity: .20; }
.qgis-natural [stroke] { stroke: var(--text-muted) !important; stroke-width: .38 !important; }
.qgis-boundary { opacity: .24; }
.qgis-boundary [stroke] { stroke: var(--text-muted) !important; stroke-width: .46 !important; stroke-dasharray: 4 4 !important; }
.qgis-road-major { stroke: var(--text-secondary) !important; stroke-width: 1.55 !important; stroke-linecap: round !important; stroke-linejoin: round !important; }
.qgis-road-primary { stroke: color-mix(in srgb, var(--text-secondary) 72%, var(--surface-map)) !important; stroke-width: 1.05 !important; stroke-linecap: round !important; stroke-linejoin: round !important; }
.qgis-road-secondary { stroke: color-mix(in srgb, var(--text-muted) 54%, var(--surface-map)) !important; stroke-width: .72 !important; stroke-linecap: round !important; stroke-linejoin: round !important; }
.qgis-road-tertiary { stroke: color-mix(in srgb, var(--text-muted) 38%, var(--surface-map)) !important; stroke-width: .48 !important; stroke-linecap: round !important; stroke-linejoin: round !important; }
.qgis-road-local { stroke: color-mix(in srgb, var(--text-muted) 27%, var(--surface-map)) !important; stroke-width: .32 !important; stroke-linecap: round !important; stroke-linejoin: round !important; }
.qgis-rail-casing { stroke: var(--surface-map) !important; stroke-width: 2.3 !important; }
.qgis-rail-line { stroke: var(--text-muted) !important; stroke-width: .72 !important; stroke-dasharray: 5 4 !important; opacity: .66; }
#network-map[data-zoom-band="overview"] .zoom-local { opacity: .38; }
#network-map[data-zoom-band="overview"] .zoom-detail { opacity: .44; }
#network-map[data-zoom-band="metro"] .zoom-local { opacity: .68; }
#network-map[data-zoom-band="metro"] .zoom-detail,
#network-map[data-zoom-band="local"] .zoom-local,
#network-map[data-zoom-band="local"] .zoom-detail { opacity: 1; }
.live-place-label { pointer-events: none; transition: opacity 160ms ease; }
.live-place-label.is-zoom-hidden { opacity: 0; }
.live-place-label text { paint-order: stroke fill; stroke: var(--surface-glass); stroke-width: 3px; stroke-linejoin: round; fill: var(--text-muted); font-family: var(--mono); font-size: 9px; font-weight: 400; letter-spacing: .09em; text-anchor: middle; }
.live-place-label.place-region text { fill: var(--text-secondary); font-family: var(--sans); font-size: 11px; letter-spacing: .12em; }
.live-place-label.place-technical text { font-size: 8px; letter-spacing: .06em; }
.map-attribution { position: absolute; z-index: 7; left: 14px; bottom: 13px; color: var(--text-muted); font: 7px/1.2 var(--mono); letter-spacing: .025em; pointer-events: none; }
.map-disclaimer { left: auto; right: 14px; }
.map-geographic-labels-layer.is-hidden { opacity: 0; pointer-events: none; }
@media (max-width: 760px) { .map-attribution { left: 10px; bottom: 9px; max-width: 52%; } }


/* External QGIS SVG image stack. Only the active theme is requested. */
.map-geo-image { pointer-events: none; transition: opacity 180ms ease; }
.map-geo-detail { opacity: .42; }
.map-geo-local { opacity: 0; }
#network-map[data-zoom-band="metro"] .map-geo-detail,
#network-map[data-zoom-band="local"] .map-geo-detail { opacity: 1; }
#network-map[data-zoom-band="local"] .map-geo-local { opacity: .56; }
:root[data-theme="dark"] #network-map[data-zoom-band="local"] .map-geo-local { opacity: .34; }


/* ===============================================================
   UI legibility and map interaction refinement v0.4.1
   =============================================================== */
body { font-size: 17px; }
.site-bar { min-height: 78px; }
.brand strong { font-size: 16px; }
.brand span, .site-nav { font-size: 12px; }
.eyebrow { font-size: 13px; }
.meta-label, .metric-label { font-size: 11px; }
.meta-value { font-size: 14px; }
.section-index { font-size: 12px; }
.metric-value.small { font-size: 21px; }
.node-id, .node-card-foot, .event-time, .event-severity, .event-state,
footer, .data-key { font-size: 11px; }
.status-chip, .sensor-kind, .sensor-updated { font-size: 10px; }
.node-card .role { font-size: 16px; }
.event-title { font-size: 17px; }
.event-summary, .data-value { font-size: 14px; }
.empty-state, .notice { font-size: 13px; }
.back-link, .detail-panel h2 { font-size: 12px; }
.sensor-card h3 { font-size: 18px; }

/* Give the interactive map a deliberate frame and a safe scroll corridor. */
.map-workspace {
  padding: clamp(18px, 2vw, 34px);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-1) 82%, transparent);
}

.map-shell { min-height: 650px; }
#network-map { min-height: 650px; }

.map-interaction-hint {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  padding: 8px 11px;
  border: 1px solid var(--line);
  color: var(--text-muted);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  font: 10px/1 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
}

.map-context-kicker, .map-layer-button { font-size: 10px; }
.map-context strong { font-size: 12px; }
.map-toolbar button { font-size: 17px; }
.map-inspector-id { font-size: 10px; }
.map-inspector h3 { font-size: 27px; }
.map-inspector-role { font-size: 14px; }
.map-inspector-data dt, .map-inspector-data dd,
.map-status-item, .map-link-legend span, .map-method-note { font-size: 10px; }
.map-inspector-link { font-size: 11px; }
.map-disclaimer { font-size: 9px; }
.map-attribution { font-size: 8px; }

/* Map labels remain constant-size but no longer dominate the website UI. */
.map-node text.title {
  fill: var(--text-primary);
  stroke: var(--surface-glass);
  stroke-width: 2.6px;
  paint-order: stroke fill;
  font-size: 10px;
  letter-spacing: .01em;
}
.map-node text.sub {
  fill: var(--text-muted);
  stroke: var(--surface-glass);
  stroke-width: 2.2px;
  paint-order: stroke fill;
  font-size: 7px;
  opacity: 0;
  transition: opacity 140ms ease;
}
.map-node.is-selected text.title,
.map-node:hover text.title,
.map-node:focus-visible text.title { font-size: 11px; }
.map-node.is-selected text.sub,
.map-node:hover text.sub,
.map-node:focus-visible text.sub { opacity: 1; }
.map-node:not(.is-selected):not(:hover):not(:focus-visible) .map-node-label { opacity: .72; }

.live-place-label text {
  stroke-width: 2.4px;
  fill: color-mix(in srgb, var(--text-muted) 72%, transparent);
  font-size: 7px;
  letter-spacing: .07em;
}
.live-place-label.place-region text { font-size: 9px; }
.live-place-label.place-technical text { font-size: 6.5px; }

/* Node detail map */
.node-location-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .65fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}
.node-location-map-shell {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: var(--surface-map);
}
#node-location-map {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
}
.node-map-detail { opacity: .88; }
.node-map-local { opacity: .30; }
.node-map-marker { pointer-events: none; }
.node-map-pulse {
  fill: transparent;
  stroke: var(--crux-orange-line);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}
.node-map-marker-body {
  fill: var(--surface-1);
  stroke: var(--crux-orange);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.node-map-marker-dot { fill: var(--crux-orange); }
.node-location-map-label {
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  padding: 9px 11px;
  border: 1px solid var(--line);
  color: var(--text-secondary);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  font: 10px/1.35 var(--mono);
  letter-spacing: .035em;
  text-transform: uppercase;
}
.node-location-note {
  padding: clamp(24px, 3vw, 42px);
  background: var(--surface-1);
}
.node-location-note h3 {
  margin: 0 0 18px;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -.025em;
}
.node-location-note p:not(.eyebrow) {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}

@media (max-width: 980px) {
  body { font-size: 16px; }
  .node-location-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .map-workspace { padding: 10px; }
  .map-interaction-hint {
    left: 10px;
    right: 10px;
    bottom: auto;
    top: 56px;
    transform: none;
    text-align: center;
    white-space: normal;
  }
  .node-location-map-shell, #node-location-map { min-height: 340px; }
}


/* ========================================================================== 
   CRUX SENSOR NET v0.5 — FOUR-COLUMN FRAME + PROGRAM PAGES
   Outer rail / main / main / outer rail
   ========================================================================== */
:root {
  --content-max: 1680px;
  --edge-rail: var(--page-pad);
  --receipt-paper: #e9e9e3;
  --receipt-ink: #202326;
  --receipt-muted: #666d72;
  --receipt-line: rgba(32, 35, 38, .19);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(to right,
      transparent calc(var(--edge-rail) - .5px),
      var(--line) calc(var(--edge-rail) - .5px),
      var(--line) calc(var(--edge-rail) + .5px),
      transparent calc(var(--edge-rail) + .5px)),
    linear-gradient(to right,
      transparent calc(50% - .5px),
      color-mix(in srgb, var(--line) 62%, transparent) calc(50% - .5px),
      color-mix(in srgb, var(--line) 62%, transparent) calc(50% + .5px),
      transparent calc(50% + .5px)),
    linear-gradient(to right,
      transparent calc(100% - var(--edge-rail) - .5px),
      var(--line) calc(100% - var(--edge-rail) - .5px),
      var(--line) calc(100% - var(--edge-rail) + .5px),
      transparent calc(100% - var(--edge-rail) + .5px));
}

body > * { position: relative; z-index: 1; }
main {
  width: min(100%, var(--content-max));
  margin-inline: auto;
}

.site-nav a[aria-current="page"] { color: var(--crux-orange); }

.program-index-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}
.program-index-card {
  min-height: 250px;
  padding: 24px;
  color: var(--text-primary);
  background: var(--surface-1);
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}
.program-index-card:hover,
.program-index-card:focus-visible {
  background: var(--surface-2);
  outline: none;
}
.program-index-card.accent { background: var(--crux-orange-soft); }
.program-index-card > span {
  color: var(--crux-orange);
  font: 10px/1 var(--mono);
}
.program-index-card h3 {
  margin: 56px 0 14px;
  font-size: 24px;
  font-weight: 300;
  letter-spacing: -.025em;
}
.program-index-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* Node receipt + map composition */
.node-summary-layout {
  display: grid;
  grid-template-columns: minmax(340px, .9fr) minmax(0, 1.1fr);
  gap: 12px;
  align-items: stretch;
}
.receipt-stack { display: grid; gap: 10px; }
.eink-receipt {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 14px;
  border: 1px solid rgba(32, 35, 38, .24);
  color: var(--receipt-ink);
  background:
    linear-gradient(rgba(32, 35, 38, .025) 1px, transparent 1px),
    var(--receipt-paper);
  background-size: 100% 5px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .34),
    inset 0 -20px 42px rgba(32, 35, 38, .035);
}
.eink-receipt::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image: radial-gradient(circle at 30% 20%, rgba(0,0,0,.10) 0 .45px, transparent .55px);
  background-size: 5px 5px;
}
.receipt-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  color: var(--receipt-muted);
  border-bottom: 1px solid var(--receipt-line);
  font: 9px/1.2 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.eink-receipt .data-list { position: relative; z-index: 1; }
.eink-receipt .data-row {
  grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr);
  padding: 8px 0;
  border-color: var(--receipt-line);
}
.eink-receipt .data-key {
  color: var(--receipt-muted);
  font-size: 8px;
}
.eink-receipt .data-value {
  color: var(--receipt-ink);
  font-size: 10px;
}
.node-summary-layout .node-location-map-shell {
  min-height: 560px;
  border: 1px solid var(--line);
}
.node-summary-layout #node-location-map { min-height: 560px; }
.node-map-policy {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 8px 10px;
  color: var(--crux-orange);
  background: var(--surface-glass);
  border: 1px solid var(--line);
  font: 8px/1.2 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.node-location-map-label { bottom: 52px; }

.node-story-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 32px;
  align-items: center;
  margin-top: 12px;
  padding: clamp(30px, 4vw, 58px);
  border: 1px solid var(--line);
  background: var(--surface-1);
}
.node-story-copy { max-width: 980px; }
.node-story {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 300;
  line-height: 1.48;
  letter-spacing: -.02em;
}
.node-invitation {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}
.node-story-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  color: var(--text-primary);
  background: transparent;
  font: 10px/1 var(--sans);
  letter-spacing: .07em;
  text-decoration: none;
  text-transform: uppercase;
}
.button-primary { border-color: var(--crux-orange); background: var(--crux-orange); color: #fff; }
.button-primary:hover, .button-secondary:hover { border-color: var(--crux-orange); }
.node-qr-card { margin: 0; text-align: right; }
.node-qr-paper {
  display: inline-flex;
  width: 154px;
  height: 154px;
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.18);
}
.node-qr-paper img { width: 100%; height: 100%; display: block; }
.node-qr-card figcaption { margin-top: 10px; }
.node-qr-card figcaption span,
.node-qr-card figcaption strong {
  display: block;
  font: 8px/1.35 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.node-qr-card figcaption span { color: var(--crux-orange); }
.node-qr-card figcaption strong { margin-top: 4px; color: var(--text-muted); font-weight: 400; }
.node-page .sensor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Long-form program pages */
.content-hero {
  min-height: 480px;
  padding: 70px 0 54px;
  border-bottom: 1px solid var(--line);
}
.content-hero h1 {
  max-width: 1080px;
  margin: 0 0 24px;
  font-size: clamp(54px, 8vw, 124px);
  font-weight: 300;
  line-height: .91;
  letter-spacing: -.06em;
}
.content-lead {
  max-width: 900px;
  color: var(--text-secondary);
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.55;
}
.editorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}
.editorial-card {
  min-height: 280px;
  padding: clamp(24px, 3vw, 42px);
  background: var(--surface-1);
}
.editorial-card.wide { grid-column: 1 / -1; min-height: auto; }
.editorial-card > span {
  color: var(--crux-orange);
  font: 10px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.editorial-card h3 {
  max-width: 520px;
  margin: 70px 0 18px;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 300;
  letter-spacing: -.035em;
}
.editorial-card p {
  max-width: 760px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}
.editorial-card.wide p {
  max-width: 1120px;
  color: var(--text-primary);
  font-size: clamp(21px, 2.5vw, 34px);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: -.02em;
}
.two-column-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}
.two-column-copy > div { min-height: 280px; padding: clamp(26px, 3.2vw, 48px); background: var(--surface-1); }
.two-column-copy h3 { margin: 0 0 50px; font-size: 30px; font-weight: 300; }
.two-column-copy p { color: var(--text-secondary); font-size: 16px; line-height: 1.75; }
.program-roadmap { padding: 0; margin: 0; list-style: none; border: 1px solid var(--line); }
.program-roadmap li { display: grid; grid-template-columns: 90px 1fr; gap: 26px; padding: 28px; border-bottom: 1px solid var(--line); background: var(--surface-1); }
.program-roadmap li:last-child { border-bottom: 0; }
.program-roadmap li > span { color: var(--crux-orange); font: 11px/1 var(--mono); }
.program-roadmap h3 { margin: 0 0 10px; font-size: 24px; font-weight: 300; }
.program-roadmap p { color: var(--text-secondary); font-size: 14px; line-height: 1.65; }
.cta-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  margin-top: 14px;
  padding: clamp(28px, 4vw, 58px);
  border: 1px solid var(--line);
  background: var(--crux-orange-soft);
}
.cta-band h3 { margin: 0; max-width: 820px; font-size: clamp(27px, 3vw, 44px); font-weight: 300; letter-spacing: -.03em; }
.resource-list { border: 1px solid var(--line); }
.resource-list a { display: grid; grid-template-columns: 1fr auto; gap: 22px; padding: 24px; border-bottom: 1px solid var(--line); background: var(--surface-1); text-decoration: none; }
.resource-list a:last-child { border-bottom: 0; }
.resource-list a:hover { background: var(--surface-2); }
.resource-list span { color: var(--text-muted); font: 10px/1.4 var(--mono); text-transform: uppercase; }
.resource-list strong { font-size: 17px; font-weight: 400; }
.source-note { margin: 18px 0 0; color: var(--text-muted); font: 10px/1.6 var(--mono); }
.design-principle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 30px; border: 1px solid var(--line); background: var(--surface-1); color: var(--text-secondary); font: 11px/1 var(--mono); text-transform: uppercase; }
.design-principle i { color: var(--crux-orange); font-style: normal; }
.large-copy { max-width: 1120px; margin: 36px 0 0; font-size: clamp(24px, 3vw, 46px); font-weight: 300; line-height: 1.45; letter-spacing: -.03em; }
.join-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.join-form label { display: grid; gap: 10px; padding: 22px; background: var(--surface-1); }
.join-form label > span { color: var(--text-muted); font: 10px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.join-form .full { grid-column: 1 / -1; }
.join-form input, .join-form select, .join-form textarea { width: 100%; border: 1px solid var(--line); padding: 13px; color: var(--text-primary); background: var(--surface-2); font: 15px/1.45 var(--sans); }
.join-form textarea { resize: vertical; }
.join-form input:focus, .join-form select:focus, .join-form textarea:focus { outline: 1px solid var(--crux-orange); border-color: var(--crux-orange); }
.join-form .consent { display: flex; grid-template-columns: auto 1fr; align-items: start; gap: 12px; }
.join-form .consent input { width: 18px; height: 18px; margin: 0; accent-color: var(--crux-orange); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 22px; background: var(--surface-1); }
.form-actions button { cursor: pointer; }
.form-status { margin: 0; padding: 0 22px 22px; color: var(--crux-orange); background: var(--surface-1); font: 11px/1.5 var(--mono); }

@media (max-width: 1120px) {
  .program-index-grid { grid-template-columns: repeat(2, 1fr); }
  .node-summary-layout { grid-template-columns: 1fr; }
  .node-summary-layout .node-location-map-shell,
  .node-summary-layout #node-location-map { min-height: 460px; }
}

@media (max-width: 760px) {
  body::after {
    background:
      linear-gradient(to right, transparent calc(var(--edge-rail) - .5px), var(--line) calc(var(--edge-rail) - .5px), var(--line) calc(var(--edge-rail) + .5px), transparent calc(var(--edge-rail) + .5px)),
      linear-gradient(to right, transparent calc(100% - var(--edge-rail) - .5px), var(--line) calc(100% - var(--edge-rail) - .5px), var(--line) calc(100% - var(--edge-rail) + .5px), transparent calc(100% - var(--edge-rail) + .5px));
  }
  .program-index-grid,
  .editorial-grid,
  .two-column-copy,
  .join-form,
  .node-page .sensor-grid { grid-template-columns: 1fr; }
  .node-story-panel { grid-template-columns: 1fr; }
  .node-qr-card { text-align: left; }
  .editorial-card.wide, .join-form .full { grid-column: auto; }
  .cta-band { align-items: flex-start; flex-direction: column; }
  .design-principle { align-items: flex-start; flex-direction: column; }
  .design-principle i { transform: rotate(90deg); }
  .content-hero h1 { font-size: clamp(46px, 15vw, 78px); }
}

@media (max-width: 1160px) {
  .site-bar { gap: 16px; }
  .site-nav { gap: 12px; font-size: 10px; }
  .brand span { display: none; }
}
