:root {
  color-scheme: light;
  --bg: #eef3e6;
  --bg-deep: #10281f;
  --panel: rgba(245, 248, 241, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --panel-border: rgba(16, 40, 31, 0.12);
  --text: #10281f;
  --text-soft: rgba(16, 40, 31, 0.72);
  --accent: #1d7c57;
  --accent-strong: #116140;
  --accent-warm: #d98d2b;
  --accent-cool: #0f6b7d;
  --danger: #a23d2d;
  --shadow: 0 24px 64px rgba(16, 40, 31, 0.14);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --spectral-contrast: 1.12;
  --spectral-saturation: 1.18;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Sora", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(217, 141, 43, 0.2), transparent 30%),
    radial-gradient(circle at top right, rgba(29, 124, 87, 0.16), transparent 28%),
    linear-gradient(180deg, #f7f5ed 0%, #e3ebdb 55%, #d9e3d2 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(16, 40, 31, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 40, 31, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 85%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

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

.landing-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 410px);
  gap: 14px;
  min-height: 100vh;
  padding: 14px;
  align-items: center;
}

.landing-copy,
.auth-card,
.session-card {
  backdrop-filter: blur(12px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.landing-copy {
  border-radius: 36px;
  padding: clamp(28px, 4vw, 48px);
  display: grid;
  align-content: center;
  gap: 22px;
  position: relative;
  overflow: hidden;
}

.landing-copy::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(29, 124, 87, 0.18), transparent 70%);
  pointer-events: none;
}

.landing-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-badge {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(16, 40, 31, 0.08);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  color: var(--text-soft);
  letter-spacing: 0.04em;
}

.landing-hero {
  display: grid;
  gap: 12px;
}

.landing-copy h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.92;
  max-width: 9ch;
}

.landing-subtitle {
  margin: 0;
  max-width: 760px;
  color: var(--text-soft);
  font-size: 1.06rem;
  line-height: 1.7;
}

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

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

.landing-stat,
.trust-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(16, 40, 31, 0.08);
}

.landing-stat strong,
.trust-card strong,
.workflow-step strong {
  display: block;
  margin-top: 8px;
  line-height: 1.4;
}

.landing-card,
.auth-card {
  border-radius: 28px;
}

.landing-card {
  padding: 18px 18px 20px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(16, 40, 31, 0.08);
}

.landing-card h2 {
  margin: 6px 0 10px;
  font-size: 1.08rem;
}

.landing-card p:last-child {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.auth-shell {
  display: grid;
}

.auth-card {
  padding: 26px;
  display: grid;
  gap: 18px;
  align-content: center;
}

.auth-heading h2 {
  margin: 8px 0 10px;
  font-size: 2rem;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 6px;
  border-radius: 999px;
  background: rgba(16, 40, 31, 0.08);
}

.auth-tab {
  border: 0;
  border-radius: 999px;
  padding: 12px 14px;
  background: transparent;
  color: var(--text-soft);
}

.auth-tab.active {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(16, 40, 31, 0.08);
}

.auth-form,
.auth-form label {
  display: grid;
  gap: 8px;
}

.auth-form input {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 40, 31, 0.12);
  background: rgba(255, 255, 255, 0.86);
}

.auth-form textarea,
.auth-config-panel textarea,
.auth-config-panel input {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 40, 31, 0.12);
  background: rgba(255, 255, 255, 0.86);
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.auth-feedback,
.setup-note {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  line-height: 1.55;
}

.auth-feedback {
  background: rgba(16, 40, 31, 0.06);
  color: var(--text-soft);
}

.auth-feedback.is-error {
  background: rgba(162, 61, 45, 0.1);
  color: var(--danger);
}

.auth-feedback.is-success {
  background: rgba(17, 97, 64, 0.12);
  color: var(--accent-strong);
}

.setup-note {
  background: rgba(217, 141, 43, 0.12);
  border: 1px solid rgba(217, 141, 43, 0.2);
}

.subtle-note {
  background: rgba(16, 40, 31, 0.06);
  border: 1px solid rgba(16, 40, 31, 0.08);
}

.setup-note strong,
.session-card strong {
  display: block;
}

.setup-note p {
  margin: 8px 0 0;
  color: var(--text-soft);
}

.auth-config-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(16, 40, 31, 0.16);
}

.auth-config-panel label {
  display: grid;
  gap: 6px;
}

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

.workflow-step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58));
  border: 1px solid rgba(16, 40, 31, 0.08);
}

.workflow-step p {
  margin: 6px 0 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.workflow-index {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(17, 97, 64, 0.14), rgba(217, 141, 43, 0.16));
  color: var(--accent-strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86rem;
  font-weight: 500;
}

.app-shell {
  height: 100vh;
  padding: 26px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 20px;
  overflow: hidden;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr minmax(420px, 1.1fr);
  gap: 20px;
  align-items: start;
}

.topbar-actions {
  display: grid;
  gap: 14px;
}

.eyebrow,
.section-kicker,
.metric-label {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.topbar h1 {
  margin: 8px 0 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.95;
}

.subtitle {
  margin: 0;
  max-width: 780px;
  color: var(--text-soft);
  line-height: 1.55;
}

.topbar-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metric-card,
.panel,
.timeline-card,
.hud-card {
  backdrop-filter: blur(12px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.metric-card {
  border-radius: var(--radius-md);
  padding: 16px;
  min-height: 92px;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  line-height: 1.35;
}

.session-card {
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.ghost-button {
  border: 1px solid rgba(16, 40, 31, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  border-radius: 999px;
  padding: 12px 16px;
}

.workspace {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr) 340px;
  gap: 18px;
  min-height: 0;
}

.panel {
  border-radius: var(--radius-xl);
  padding: 20px;
  min-height: 0;
  overflow: auto;
}

.panel-section + .panel-section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(16, 40, 31, 0.1);
}

.section-heading {
  margin-bottom: 14px;
}

.compact-heading {
  margin-bottom: 10px;
}

.section-heading h2,
.section-heading h3,
.timeline-card h3 {
  margin: 6px 0 0;
  font-size: 1.06rem;
}

.stack-list {
  display: grid;
  gap: 12px;
}

.stack-list.compact {
  gap: 10px;
}

.card-button {
  width: 100%;
  padding: 14px 14px 16px;
  border: 1px solid rgba(16, 40, 31, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.68);
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.card-button:hover,
.card-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(17, 97, 64, 0.4);
  background: rgba(255, 255, 255, 0.92);
}

.card-button.active {
  border-color: rgba(17, 97, 64, 0.5);
  background:
    linear-gradient(135deg, rgba(29, 124, 87, 0.18), rgba(255, 255, 255, 0.9)),
    rgba(255, 255, 255, 0.9);
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 600;
}

.card-title small {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--text-soft);
}

.swatch-bar {
  height: 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.card-button p,
.microcopy,
.detail-card p,
.activity-log p,
.summary-list p,
.legend-row span:last-child {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.45;
}

.coord-form,
.export-group,
.plugin-form {
  display: grid;
  gap: 10px;
}

.plugin-pack-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.56);
  border: 1px dashed rgba(16, 40, 31, 0.16);
}

.plugin-form textarea,
.coord-form textarea,
.export-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 40, 31, 0.12);
  background: rgba(255, 255, 255, 0.84);
  resize: vertical;
  min-height: 88px;
}

.inline-grid {
  display: grid;
  gap: 10px;
}

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

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

.filter-field,
.range-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.filter-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 40, 31, 0.12);
  background: rgba(255, 255, 255, 0.84);
}

.display-tools {
  display: grid;
  gap: 12px;
}

.range-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.range-inline input[type="range"] {
  width: 100%;
}

.display-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.coord-form label,
.export-group label,
.plugin-form label {
  display: grid;
  gap: 6px;
}

.coord-form input,
.coord-form select,
.export-group select,
.plugin-form input,
.plugin-form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 40, 31, 0.12);
  background: rgba(255, 255, 255, 0.84);
}

.primary-button,
.secondary-button,
.toolbar-group button {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  transition:
    background 180ms ease,
    transform 180ms ease,
    opacity 180ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: white;
}

.secondary-button,
.toolbar-group button {
  background: rgba(16, 40, 31, 0.08);
  color: var(--text);
}

.primary-button:hover,
.secondary-button:hover,
.toolbar-group button:hover {
  transform: translateY(-1px);
}

.toolbar-group button.active {
  background: rgba(17, 97, 64, 0.16);
  color: var(--accent-strong);
}

.tool-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.tool-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.tool-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px dashed rgba(16, 40, 31, 0.24);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
}

.upload-card input {
  display: none;
}

.upload-card span {
  font-weight: 600;
}

.compact-upload {
  padding: 14px;
}

.upload-card small {
  color: var(--text-soft);
  line-height: 1.4;
}

.export-group + .export-group {
  margin-top: 12px;
}

.map-stage {
  position: relative;
  min-height: 0;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(12, 29, 22, 0.15), rgba(12, 29, 22, 0.05));
  border: 1px solid rgba(16, 40, 31, 0.12);
  box-shadow: var(--shadow);
}

.map-stage.legend-focused {
  box-shadow:
    0 0 0 2px var(--legend-focus-color, rgba(29, 124, 87, 0.28)),
    var(--shadow);
}

.map-canvas {
  position: absolute;
  inset: 0;
}

.spectral-overlay canvas,
.spectral-overlay img {
  filter:
    contrast(var(--spectral-contrast))
    saturate(var(--spectral-saturation));
  mix-blend-mode: multiply;
}

.map-toolbar,
.timeline-card,
.hud-card {
  position: absolute;
  z-index: 2;
}

.map-toolbar {
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(247, 249, 243, 0.74);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(16, 40, 31, 0.12);
}

.toolbar-menu-group {
  position: relative;
  z-index: 3;
}

.toolbar-flyout {
  position: absolute;
  top: 82px;
  right: 16px;
  width: min(360px, calc(100% - 32px));
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(247, 249, 243, 0.9);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(16, 40, 31, 0.12);
  box-shadow: var(--shadow);
  z-index: 4;
}

#edit-flyout {
  top: 148px;
}

.flyout-heading {
  display: grid;
  gap: 4px;
}

.flyout-heading strong {
  font-size: 1rem;
}

.icon-grid,
.edit-tools-grid {
  display: grid;
  gap: 10px;
}

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

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

.edit-tools-grid .tool-button {
  justify-content: flex-start;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(16, 40, 31, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
}

.edit-tools-grid .tool-button:hover,
.edit-tools-grid .tool-button:focus-visible {
  border-color: rgba(17, 97, 64, 0.34);
  background: rgba(255, 255, 255, 0.94);
}

.icon-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 40, 31, 0.12);
  background: rgba(255, 255, 255, 0.84);
  text-align: left;
}

.icon-card.active {
  border-color: rgba(17, 97, 64, 0.45);
  background: linear-gradient(135deg, rgba(29, 124, 87, 0.14), rgba(255, 255, 255, 0.94));
}

.icon-card .icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(16, 40, 31, 0.08);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
}

.icon-card small {
  color: var(--text-soft);
}

.map-popup,
.context-menu {
  position: absolute;
  z-index: 5;
}

.map-popup {
  min-width: 220px;
  max-width: min(320px, calc(100% - 24px));
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(247, 249, 243, 0.96);
  border: 1px solid rgba(16, 40, 31, 0.12);
  box-shadow: 0 18px 42px rgba(16, 40, 31, 0.18);
  display: grid;
  gap: 8px;
}

.secondary-popup {
  min-width: 260px;
}

.map-popup strong {
  font-size: 0.94rem;
}

.popup-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--text-soft);
}

.context-menu {
  display: grid;
  gap: 8px;
  min-width: 210px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(247, 249, 243, 0.98);
  border: 1px solid rgba(16, 40, 31, 0.12);
  box-shadow: 0 18px 42px rgba(16, 40, 31, 0.18);
}

.context-menu button {
  border: 0;
  border-radius: 14px;
  padding: 10px 12px;
  text-align: left;
  background: rgba(16, 40, 31, 0.07);
}

.context-menu button:hover {
  background: rgba(17, 97, 64, 0.12);
}

.timeline-card {
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 22px;
}

.timeline-card input[type="range"] {
  width: 100%;
}

.timeline-mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.timeline-mode-switch button {
  border: 0;
  border-radius: 999px;
  padding: 10px 12px;
  background: rgba(16, 40, 31, 0.08);
  color: var(--text-soft);
}

.timeline-mode-switch button.active {
  background: rgba(17, 97, 64, 0.14);
  color: var(--accent-strong);
}

.timeline-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.timeline-meta strong {
  font-size: 0.96rem;
}

.timeline-meta span {
  color: var(--text-soft);
  font-size: 0.93rem;
}

.hud-card {
  top: 92px;
  right: 16px;
  width: min(320px, calc(100% - 32px));
  padding: 16px 18px;
  border-radius: 20px;
}

.hud-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
}

.detail-card,
.summary-list,
.activity-log,
.legend-list {
  display: grid;
  gap: 12px;
}

.asset-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 40, 31, 0.08);
  background: rgba(255, 255, 255, 0.66);
}

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

.asset-card-head strong {
  display: block;
  margin-bottom: 4px;
}

.asset-badge {
  flex: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17, 97, 64, 0.12);
  color: var(--accent-strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
}

.asset-meta {
  display: grid;
  gap: 4px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.asset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.asset-actions button {
  border: 1px solid rgba(16, 40, 31, 0.12);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(247, 249, 243, 0.92);
  color: var(--text);
}

.asset-actions button:hover,
.asset-actions button:focus-visible {
  border-color: rgba(17, 97, 64, 0.3);
  transform: translateY(-1px);
}

.empty-state {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(16, 40, 31, 0.18);
  background: rgba(255, 255, 255, 0.52);
  color: var(--text-soft);
  line-height: 1.45;
}

.detail-card strong {
  display: block;
  margin-bottom: 6px;
}

.legend-row,
.summary-row,
.log-row {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(16, 40, 31, 0.08);
}

.legend-row {
  grid-template-columns: 18px 1fr;
  align-items: center;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.legend-row:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 97, 64, 0.24);
}

.legend-row.active {
  border-color: var(--legend-focus-color, rgba(29, 124, 87, 0.28));
  background: linear-gradient(135deg, rgba(29, 124, 87, 0.12), rgba(255, 255, 255, 0.9));
}

.legend-chip {
  width: 18px;
  height: 18px;
  border-radius: 6px;
}

.summary-row strong,
.log-row strong {
  font-size: 0.94rem;
}

.ol-zoomslider {
  left: auto;
  right: 16px;
  top: 248px;
  background: rgba(247, 249, 243, 0.82);
  border-radius: 999px;
  border: 1px solid rgba(16, 40, 31, 0.12);
}

.ol-scale-line {
  left: 18px;
  bottom: 134px;
  background: rgba(16, 40, 31, 0.72);
}

/* CartaMaroc redesign */

.landing-shell {
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 420px);
  gap: 18px;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(220, 170, 101, 0.18), transparent 26%),
    linear-gradient(180deg, #f8f2e8 0%, #f0ebe2 100%);
}

.landing-showcase {
  min-height: clamp(540px, 68vh, 660px);
  padding: 22px 22px 16px;
  gap: 14px;
  align-content: start;
  grid-template-rows: auto auto auto auto;
  background:
    radial-gradient(circle at 82% 88%, rgba(76, 201, 176, 0.32), transparent 18%),
    linear-gradient(155deg, #183f4b 0%, #206469 52%, #2aa58d 100%);
  color: #ffffff;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.landing-showcase::after {
  display: none;
}

.landing-showcase .eyebrow {
  color: #ffb066;
}

.landing-showcase .landing-subtitle,
.landing-showcase .metric-label,
.landing-showcase .microcopy {
  color: rgba(255, 255, 255, 0.82);
}

.landing-showcase h1 {
  max-width: 9.5ch;
  color: #ffffff;
  font-size: clamp(2.1rem, 3.2vw, 3.15rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.landing-showcase .landing-subtitle {
  max-width: 540px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.landing-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.landing-visual,
.overview-visual {
  position: relative;
  min-height: 150px;
  padding: 18px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 12%, rgba(255, 212, 142, 0.92), transparent 34%),
    linear-gradient(135deg, rgba(255, 243, 225, 0.95), rgba(219, 242, 233, 0.92));
}

.landing-visual {
  margin-top: 4px;
}

.overview-visual {
  min-height: 128px;
  padding: 18px;
  border-radius: 20px;
}

.landing-visual-main,
.overview-visual-main {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 44%;
  min-height: 98px;
  border-radius: 22px;
  background:
    linear-gradient(155deg, #145059 0%, #1e8a85 100%);
  box-shadow: 0 22px 52px rgba(18, 57, 67, 0.2);
  padding: 18px;
}

.overview-visual-main {
  left: 18px;
  top: 18px;
  width: 46%;
  min-height: 92px;
  border-radius: 16px;
  padding: 12px;
}

.landing-visual-side,
.overview-visual-side {
  position: absolute;
  right: 18px;
  top: 36px;
  width: 32%;
  min-height: 78px;
  border-radius: 22px;
  background: rgba(255, 250, 244, 0.84);
  box-shadow: 0 14px 34px rgba(181, 137, 94, 0.14);
  padding: 18px;
}

.overview-visual-side {
  right: 18px;
  top: 28px;
  width: 34%;
  min-height: 84px;
  border-radius: 16px;
  padding: 12px;
}

.visual-metric {
  width: 74px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  margin-bottom: 10px;
}

.visual-metric.short {
  width: 42px;
  opacity: 0.72;
}

.visual-curve {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 8px;
  height: 46px;
}

.visual-curve::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 90'%3E%3Cpath d='M12 74 C50 36 78 68 106 32 S160 22 208 54' fill='none' stroke='rgba(255,255,255,0.88)' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E")
      center/contain no-repeat;
}

.curve-point {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
}

.curve-point.p1 {
  left: 18%;
  bottom: 20%;
  background: #ff7a1a;
}

.curve-point.p2 {
  left: 38%;
  bottom: 52%;
  background: #f6be00;
}

.curve-point.p3 {
  left: 59%;
  bottom: 69%;
  background: #ff7a1a;
}

.curve-point.p4 {
  right: 8%;
  bottom: 28%;
  background: #fff7ed;
}

.mini-line {
  height: 8px;
  width: 82%;
  border-radius: 999px;
  background: rgba(16, 40, 31, 0.18);
  margin-bottom: 10px;
}

.mini-line.long {
  width: 64%;
}

.mini-line.short {
  width: 52%;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.mini-grid span {
  display: block;
  min-height: 28px;
  border-radius: 10px;
}

.mini-grid span:nth-child(1) {
  background: #cdeae2;
}

.mini-grid span:nth-child(2) {
  background: #f3ddc5;
}

.mini-grid span:nth-child(3) {
  background: #d8dff1;
}

.landing-visual-orbit {
  position: absolute;
  border-radius: 999px;
  background: rgba(32, 153, 129, 0.18);
  border: 8px solid rgba(32, 153, 129, 0.14);
}

.orbit-one {
  width: 44px;
  height: 44px;
  right: 58px;
  bottom: 14px;
}

.orbit-two {
  width: 16px;
  height: 16px;
  right: 72px;
  bottom: 28px;
  background: #169d8c;
  border: 0;
}

.landing-pill-row {
  display: none;
}

.landing-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
}

.auth-card {
  gap: 10px;
  padding: 18px 18px 16px;
  background: rgba(252, 248, 241, 0.96);
  border-radius: 30px;
  box-shadow: 0 30px 60px rgba(95, 71, 39, 0.12);
  position: relative;
  z-index: 1;
  align-content: start;
}

.auth-heading h2 {
  font-size: clamp(1.65rem, 2.2vw, 2.15rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
  margin: 2px 0 6px;
}

.auth-heading .microcopy {
  font-size: 0.88rem;
  line-height: 1.4;
}

.auth-switch {
  background: #ffffff;
  border: 1px solid rgba(16, 40, 31, 0.1);
}

.auth-tab.active {
  background: #162c38;
  color: #ffffff;
}

.auth-form input,
.auth-form textarea,
.auth-config-panel textarea,
.auth-config-panel input,
.auth-form select {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(22, 44, 56, 0.14);
  position: relative;
  z-index: 2;
  pointer-events: auto;
  touch-action: manipulation;
  min-height: 52px;
}

.auth-form,
.auth-actions,
.auth-feedback,
.setup-note,
.auth-trust {
  position: relative;
  z-index: 2;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
  outline: none;
  border-color: rgba(214, 118, 56, 0.72);
  box-shadow: 0 0 0 4px rgba(214, 118, 56, 0.12);
}

.auth-card .primary-button {
  width: 100%;
  background: linear-gradient(135deg, #d67638, #e58a3b);
}

.auth-card .secondary-button {
  background: rgba(22, 44, 56, 0.08);
}

.auth-card .ghost-button {
  background: rgba(255, 255, 255, 0.88);
}

.auth-optional {
  margin-top: 2px;
}

.auth-config-disclosure summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
}

.auth-config-disclosure summary::-webkit-details-marker {
  display: none;
}

.auth-config-disclosure summary::after {
  content: "+";
  float: right;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--accent-warm);
}

.auth-config-disclosure[open] summary::after {
  content: "-";
}

.auth-config-disclosure .auth-config-panel {
  display: none;
}

.auth-config-disclosure[open] .auth-config-panel {
  display: grid;
}

.auth-trust .trust-card {
  padding: 12px;
}

.auth-trust {
  display: none;
}

.auth-feedback,
.setup-note {
  padding: 12px 14px;
  font-size: 0.92rem;
}

.setup-note.subtle-note {
  display: none;
}

.auth-actions {
  gap: 8px;
}

.auth-actions .secondary-button,
.auth-actions .ghost-button {
  padding: 10px 14px;
}

.auth-config-disclosure summary {
  padding: 2px 0;
}

.topbar-compact {
  display: none;
}

.landing-shell {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 380px);
  gap: 12px;
  padding: 12px;
}

.landing-copy {
  padding: clamp(24px, 3vw, 34px);
  gap: 18px;
  border-radius: 30px;
}

.landing-copy h1 {
  font-size: clamp(2.7rem, 5.3vw, 4.75rem);
  max-width: 8ch;
}

.landing-subtitle {
  font-size: 0.98rem;
  line-height: 1.58;
}

.app-shell {
  max-width: 1880px;
  margin: 0 auto;
  padding: 10px 12px;
  gap: 12px;
  background:
    radial-gradient(circle at top left, rgba(225, 184, 126, 0.15), transparent 22%),
    linear-gradient(180deg, #f8f2e8 0%, #efe8dd 100%);
}

.workspace {
  grid-template-columns: 268px minmax(0, 1fr) 286px;
  gap: 10px;
}

.panel {
  padding: 15px;
  border-radius: 22px;
  background: rgba(252, 248, 241, 0.96);
  box-shadow: 0 22px 46px rgba(95, 71, 39, 0.1);
}

.panel-left,
.panel-right {
  background: rgba(252, 248, 241, 0.94);
}

.panel-left .panel-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.panel-section-drawer {
  margin-top: 18px;
  padding-top: 0;
  border-top: 0;
}

.atlas-overview-card {
  display: grid;
  gap: 10px;
}

.atlas-overview-card h2 {
  margin: 0;
  font-size: 1.72rem;
  letter-spacing: -0.05em;
}

.overview-copy {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.93rem;
  line-height: 1.58;
}

.overview-session-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(16, 40, 31, 0.08);
}

.overview-session-card small {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
}

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

.overview-metric {
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(16, 40, 31, 0.08);
}

.overview-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 0.94rem;
  line-height: 1.3;
}

.panel-left .section-heading h2,
.panel-right .section-heading h2 {
  font-size: 0.96rem;
}

.panel-left .card-button,
.panel-right .summary-row,
.legend-row,
.asset-card {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.theme-family-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 2px;
}

.theme-family-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(16, 40, 31, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  text-align: left;
}

.theme-family-card span:last-of-type {
  display: grid;
  gap: 3px;
}

.theme-family-card strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

.theme-family-card small,
.workspace-drawer summary small {
  color: var(--text-soft);
}

.theme-family-card em {
  font-style: normal;
  color: var(--text-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
}

.theme-family-card.active {
  border-color: rgba(214, 118, 56, 0.34);
  box-shadow: 0 12px 24px rgba(214, 118, 56, 0.08);
}

.theme-family-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(22, 44, 56, 0.94), rgba(29, 124, 87, 0.82));
  color: #fff;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
}

.workspace-drawer {
  border: 1px solid rgba(16, 40, 31, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.workspace-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.workspace-drawer summary::-webkit-details-marker {
  display: none;
}

.workspace-drawer summary span:first-child {
  display: grid;
  gap: 3px;
}

.workspace-drawer summary strong {
  font-size: 0.92rem;
}

.workspace-drawer .drawer-marker {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(214, 118, 56, 0.12);
  color: var(--accent-warm);
  font-weight: 700;
}

.workspace-drawer[open] .drawer-marker {
  transform: rotate(45deg);
}

.workspace-drawer-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.map-stage {
  border-radius: 26px;
  background: #123241;
  border: 1px solid rgba(16, 40, 31, 0.08);
}

.map-stage [data-tooltip] {
  position: relative;
}

.map-stage [data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  z-index: 7;
  padding: 6px 9px;
  border-radius: 10px;
  background: rgba(9, 22, 30, 0.96);
  border: 1px solid rgba(118, 160, 154, 0.26);
  color: #eff8f4;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 14px 28px rgba(9, 22, 30, 0.22);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 160ms ease;
}

.map-theme-strip [data-tooltip]::after {
  top: calc(100% + 8px);
  transform: translate(-50%, -4px);
}

.map-toolbar [data-tooltip]::after,
.map-side-rail [data-tooltip]::after,
.toolbar-flyout [data-tooltip]::after {
  bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
}

.map-stage [data-tooltip]:hover::after,
.map-stage [data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.map-theme-strip [data-tooltip]:hover::after,
.map-theme-strip [data-tooltip]:focus-visible::after {
  transform: translate(-50%, 0);
}

.map-toolbar [data-tooltip]:hover::after,
.map-toolbar [data-tooltip]:focus-visible::after,
.map-side-rail [data-tooltip]:hover::after,
.map-side-rail [data-tooltip]:focus-visible::after,
.toolbar-flyout [data-tooltip]:hover::after,
.toolbar-flyout [data-tooltip]:focus-visible::after {
  transform: translate(-50%, 0);
}

.map-theme-strip {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(220px, 350px) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 16px;
  background: rgba(9, 22, 30, 0.82);
  border: 1px solid rgba(118, 160, 154, 0.24);
  box-shadow: 0 20px 44px rgba(9, 22, 30, 0.24);
  backdrop-filter: blur(18px);
}

.map-command-bar {
  width: min(620px, calc(100% - 32px));
}

.map-search-shell {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(118, 160, 154, 0.16);
}

.map-search-shell input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #eff8f4;
  font-size: 0.84rem;
}

.map-search-shell input::placeholder {
  color: rgba(239, 248, 244, 0.54);
}

.map-command-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map-theme-label,
.toolbar-chip-label,
.rail-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-theme-label,
.toolbar-chip-label {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(233, 242, 239, 0.08);
  border: 1px solid rgba(118, 160, 154, 0.22);
  color: #f3f8f6;
}

.theme-toggle-chip {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(118, 160, 154, 0.18);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(243, 248, 246, 0.76);
  font-family: "IBM Plex Mono", monospace;
  display: inline-grid;
  place-items: center;
}

.theme-toggle-chip.active {
  border-color: rgba(121, 205, 182, 0.3);
  background: rgba(121, 205, 182, 0.14);
  color: #eff8f4;
  box-shadow: inset 0 0 0 1px rgba(121, 205, 182, 0.08);
}

.map-command-icons .tool-icon {
  width: 14px;
  height: 14px;
}

.map-toolbar {
  top: 84px;
  right: 14px;
  left: auto;
  justify-content: flex-end;
  pointer-events: auto;
}

.map-toolbar > .toolbar-group:first-child {
  position: static;
  flex-direction: column;
  align-items: center;
  width: 52px;
  border-radius: 16px;
  padding: 6px;
}

.map-toolbar .toolbar-group {
  pointer-events: auto;
  background: rgba(9, 22, 30, 0.82);
  border: 1px solid rgba(118, 160, 154, 0.24);
  color: #eff8f4;
  backdrop-filter: blur(18px);
}

.map-toolbar > .toolbar-group:first-child button {
  justify-content: center;
  min-width: 40px;
  width: 40px;
  min-height: 40px;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #f4faf7;
  font-size: 0.82rem;
}

.map-icon-button {
  display: inline-grid;
  place-items: center;
  border-radius: 12px !important;
}

.map-icon-button .tool-icon {
  width: 16px;
  height: 16px;
}

.map-side-rail {
  position: absolute;
  z-index: 4;
  left: 12px;
  bottom: 18px;
  top: auto;
  display: flex;
  gap: 6px;
  width: auto;
}

.map-utility-button.active,
.theme-toggle-chip.active {
  border-color: rgba(121, 205, 182, 0.34);
  background: linear-gradient(135deg, rgba(16, 70, 65, 0.72), rgba(9, 22, 30, 0.88));
  color: #f6fffb;
}

.map-utility-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(118, 160, 154, 0.24);
  border-radius: 11px;
  background: rgba(9, 22, 30, 0.84);
  color: #edf7f3;
  box-shadow: 0 18px 34px rgba(9, 22, 30, 0.22);
  backdrop-filter: blur(16px);
}

.map-utility-button .tool-icon {
  width: 14px;
  height: 14px;
}

.basemap-dock .flyout-heading {
  gap: 2px;
}

.basemap-dock .icon-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.basemap-dock .icon-card {
  justify-items: center;
  gap: 7px;
  min-height: 88px;
  padding: 10px 8px;
  text-align: center;
}

.basemap-dock .icon-card strong {
  font-size: 0.66rem;
  line-height: 1.2;
  color: #eff8f4;
}

.basemap-dock .icon-card small {
  display: none;
}

.basemap-dock .icon-card .icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(20, 59, 62, 0.98), rgba(29, 124, 87, 0.78));
  color: #f7fffb;
}

.basemap-dock .icon-card .icon-badge svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.edit-ribbon .flyout-heading {
  display: none;
}

.edit-ribbon .edit-tools-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.edit-ribbon .tool-button {
  min-height: 56px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  padding: 8px 7px;
  border: 1px solid rgba(118, 160, 154, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #eff8f4;
  text-align: center;
}

.edit-ribbon .tool-button span:last-child {
  font-size: 0.72rem;
  line-height: 1.2;
}

.toolbar-flyout {
  top: 58px;
  left: 50%;
  right: auto;
  width: min(360px, calc(100% - 28px));
  transform: translateX(-50%);
  border-radius: 20px;
  background: rgba(9, 22, 30, 0.84);
  border: 1px solid rgba(118, 160, 154, 0.24);
  color: #eff8f4;
  backdrop-filter: blur(18px);
}

#basemap-flyout.basemap-dock {
  top: 58px;
  left: 50%;
  right: auto;
  width: 320px;
  padding: 10px;
  gap: 8px;
  border-radius: 20px;
  transform: translateX(-50%);
}

#edit-flyout.edit-ribbon {
  top: 58px;
  left: 50%;
  right: auto;
  width: min(440px, calc(100% - 28px));
  padding: 10px;
  transform: translateX(-50%);
  border-radius: 20px;
}

.timeline-card {
  left: 50%;
  right: auto;
  width: min(620px, calc(100% - 28px));
  transform: translateX(-50%);
  bottom: 14px;
  border-radius: 20px;
  background: rgba(9, 22, 30, 0.88);
  border: 1px solid rgba(118, 160, 154, 0.24);
  color: #eff8f4;
  backdrop-filter: blur(18px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 180ms ease;
}

.timeline-card.is-collapsed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
}

.timeline-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.timeline-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.timeline-stepper button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #eff8f4;
  font-size: 1.05rem;
  line-height: 1;
}

.timeline-stepper strong {
  min-width: 112px;
  text-align: center;
  font-size: 0.88rem;
}

.hud-card {
  top: auto;
  right: 14px;
  bottom: 14px;
  width: auto;
  max-width: calc(100% - 28px);
  padding: 10px 12px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(9, 22, 30, 0.84);
  border: 1px solid rgba(118, 160, 154, 0.24);
  color: #eff8f4;
  backdrop-filter: blur(18px);
}

.hud-card .section-kicker,
.timeline-card .section-kicker,
.toolbar-flyout .section-kicker {
  color: rgba(226, 243, 236, 0.68);
}

.hud-card .section-kicker {
  margin: 0;
  min-width: 94px;
}

.hud-readouts {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.hud-line,
.timeline-meta span,
.timeline-meta strong {
  color: #eff8f4;
}

.hud-line {
  display: grid;
  gap: 3px;
  min-width: 150px;
  margin: 0;
  padding-left: 10px;
  border-left: 1px solid rgba(118, 160, 154, 0.24);
}

.hud-line span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 243, 236, 0.68);
}

.hud-line strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.timeline-mode-switch button {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(239, 248, 244, 0.72);
}

.timeline-mode-switch button.active {
  background: rgba(121, 205, 182, 0.18);
  color: #f7fffb;
}

.detail-card {
  gap: 10px;
}

.layer-hero {
  overflow: hidden;
  border-radius: 18px;
  min-height: 140px;
  background: linear-gradient(135deg, #193f4a, #2a7f7b);
}

.layer-hero img {
  display: block;
  width: 100%;
  height: 156px;
  object-fit: cover;
}

.layer-summary-row {
  gap: 10px;
}

.layer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.layer-badges span {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(124, 179, 149, 0.16);
  color: var(--accent-strong);
  font-size: 0.8rem;
}

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

.layer-fact-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(16, 40, 31, 0.08);
}

.layer-fact-card strong {
  display: block;
  margin-top: 8px;
  line-height: 1.35;
}

.layer-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.layer-action-row button {
  flex: 1 1 130px;
  padding: 12px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(22, 44, 56, 0.08);
  color: var(--text);
}

.layer-action-row button:last-child {
  background: #162c38;
  color: #ffffff;
}

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

.layer-step-thumb {
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(16, 40, 31, 0.1);
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
}

.layer-step-thumb img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
}

.layer-step-thumb span {
  color: var(--text);
  font-size: 0.82rem;
}

.layer-step-thumb.active {
  border-color: rgba(214, 118, 56, 0.42);
  box-shadow: 0 0 0 2px rgba(214, 118, 56, 0.16);
}

.ol-zoomslider {
  left: 18px;
  right: auto;
  top: auto;
  bottom: 86px;
  border-radius: 20px;
}

.ol-zoom {
  left: 18px;
  bottom: 18px;
  top: auto;
}

/* GeoMatrix compact refinement */
.landing-shell {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  gap: 10px;
}

.landing-copy {
  padding: clamp(22px, 2.8vw, 30px);
  gap: 16px;
  border-radius: 28px;
}

.landing-copy h1 {
  font-size: clamp(2.25rem, 4.8vw, 4.3rem);
  max-width: 7ch;
}

.landing-subtitle {
  font-size: 0.92rem;
  line-height: 1.5;
}

.workspace {
  grid-template-columns: 232px minmax(0, 1fr) 248px;
  gap: 8px;
}

.panel {
  padding: 12px;
  border-radius: 20px;
  overflow-x: hidden;
}

.atlas-overview-card {
  gap: 8px;
}

.atlas-overview-card h2 {
  font-size: 1.34rem;
}

.overview-copy {
  font-size: 0.84rem;
  line-height: 1.5;
}

.overview-session-card {
  gap: 8px;
  padding: 10px 11px;
  border-radius: 14px;
}

.overview-metrics-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

.overview-metric {
  padding: 9px 10px;
  border-radius: 12px;
}

.overview-metric strong {
  margin-top: 5px;
  font-size: 0.84rem;
}

.theme-family-list {
  display: none;
}

.map-stage [data-tooltip]::after {
  padding: 7px 10px;
  background: rgba(5, 13, 18, 0.98);
  border: 1px solid rgba(185, 212, 206, 0.36);
  color: #f8fffd;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.map-toolbar [data-tooltip]::after {
  left: auto;
  right: calc(100% + 10px);
  bottom: 50%;
  transform: translate(6px, 50%);
}

.map-toolbar [data-tooltip]:hover::after,
.map-toolbar [data-tooltip]:focus-visible::after {
  transform: translate(0, 50%);
}

.map-theme-strip {
  top: 12px;
  gap: 6px;
  padding: 6px 7px;
}

.map-command-bar {
  width: min(560px, calc(100% - 24px));
}

.map-search-shell {
  min-height: 34px;
  padding: 0 9px;
}

.map-search-shell input {
  font-size: 0.78rem;
}

.map-toolbar {
  top: 74px;
}

.map-toolbar > .toolbar-group:first-child {
  width: 46px;
  padding: 4px;
}

.map-toolbar > .toolbar-group:first-child button {
  min-width: 36px;
  width: 36px;
  min-height: 36px;
}

.map-utility-button {
  width: 36px;
  height: 36px;
}

#basemap-flyout.basemap-dock {
  min-width: 230px;
  max-width: 260px;
  padding: 9px;
  gap: 6px;
}

.basemap-dock .icon-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.basemap-dock .icon-card {
  gap: 4px;
  min-height: 56px;
  padding: 8px 6px;
}

.basemap-dock .icon-card strong,
.basemap-dock .icon-card small {
  display: none;
}

.basemap-dock .icon-card .icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.edit-ribbon .edit-tools-grid {
  gap: 5px;
}

.edit-ribbon .tool-button {
  min-height: 50px;
  gap: 4px;
  padding: 7px 6px;
}

.edit-ribbon .tool-button span:last-child {
  font-size: 0.68rem;
}

.timeline-card {
  top: 72px;
  bottom: auto;
  width: min(560px, calc(100% - 110px));
  border-radius: 18px;
}

.timeline-card.is-collapsed {
  transform: translateX(-50%) translateY(-10px);
}

.timeline-headline {
  align-items: center;
  gap: 10px;
}

.timeline-stepper strong {
  min-width: 84px;
}

.timeline-card .section-kicker,
.timeline-meta {
  display: none;
}

.timeline-card h3 {
  margin: 0;
  font-size: 1rem;
}

.timeline-mode-switch {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.timeline-mode-switch button {
  padding: 8px 10px;
  font-size: 0.8rem;
}

.hud-card {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 8px 10px;
  gap: 10px;
}

.hud-card .section-kicker {
  display: none;
}

.hud-readouts {
  gap: 0;
}

.hud-line {
  gap: 2px;
  min-width: 182px;
  padding-left: 0;
  border-left: 0;
}

.hud-line + .hud-line {
  padding-left: 10px;
  margin-left: 10px;
  border-left: 1px solid rgba(118, 160, 154, 0.24);
}

.hud-line strong {
  font-size: 0.92rem;
}

.measurement-panel {
  position: absolute;
  z-index: 5;
  top: 128px;
  right: 14px;
  min-width: 210px;
  max-width: 260px;
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(9, 22, 30, 0.92);
  border: 1px solid rgba(118, 160, 154, 0.24);
  color: #eff8f4;
  box-shadow: 0 18px 34px rgba(9, 22, 30, 0.24);
  display: grid;
  gap: 6px;
}

.measurement-panel .section-kicker {
  margin: 0;
  color: rgba(226, 243, 236, 0.68);
}

.measurement-panel strong {
  font-size: 0.95rem;
}

.measurement-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(239, 248, 244, 0.8);
  font-size: 0.83rem;
}

.measurement-line b {
  color: #f8fffd;
  font-weight: 600;
  text-align: right;
}

.detail-card {
  gap: 8px;
}

.layer-hero {
  border-radius: 16px;
  min-height: 104px;
}

.layer-hero-abstract {
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 14px;
  color: #f8fffd;
}

.layer-hero-abstract strong {
  font-size: 1.2rem;
  line-height: 1;
}

.layer-hero-badge {
  display: inline-flex;
  width: fit-content;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(8, 17, 22, 0.24);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.layer-hero img {
  height: 118px;
}

.layer-facts-grid {
  gap: 8px;
}

.layer-fact-card {
  padding: 10px;
  border-radius: 14px;
}

.layer-action-row button {
  padding: 10px 12px;
  font-size: 0.8rem;
}

.layer-steps,
.panel-section-log,
.ol-zoomslider,
.ol-zoom,
.ol-scale-line {
  display: none !important;
}

.map-stage [data-tooltip]::after {
  display: none !important;
}

.landing-showcase {
  background:
    radial-gradient(circle at 78% 76%, rgba(33, 198, 173, 0.42), transparent 22%),
    linear-gradient(135deg, #123a46 0%, #1e6b72 54%, #2aa19a 100%);
}

.landing-showcase::after {
  display: none;
}

.landing-showcase h1 {
  max-width: 6.7ch;
  font-size: clamp(1.95rem, 2.9vw, 2.72rem);
}

.landing-showcase .landing-subtitle {
  max-width: 500px;
  font-size: 0.86rem;
  line-height: 1.42;
}

.landing-visual {
  min-height: 172px;
  padding: 0;
  border-radius: 24px;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.14), transparent 1.5%),
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.12), transparent 1.2%),
    radial-gradient(circle at 58% 16%, rgba(255, 255, 255, 0.1), transparent 1.4%),
    radial-gradient(circle at 74% 34%, rgba(255, 255, 255, 0.12), transparent 1.2%),
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.1), transparent 1%),
    linear-gradient(180deg, #05080d 0%, #0b1018 100%);
  overflow: hidden;
}

.landing-visual-main {
  left: auto;
  right: 72px;
  top: 18px;
  width: 170px;
  min-height: 170px;
  padding: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at 36% 34%, rgba(244, 250, 255, 0.95), transparent 0 20%),
    radial-gradient(circle at 44% 44%, rgba(126, 186, 255, 0.95), transparent 0 47%),
    radial-gradient(circle at 56% 52%, rgba(58, 107, 182, 0.9), transparent 0 62%),
    linear-gradient(135deg, #83b3ff 0%, #4b7cc8 45%, #233c6b 100%);
  box-shadow:
    inset -28px -18px 52px rgba(6, 15, 29, 0.58),
    inset 18px 12px 34px rgba(255, 255, 255, 0.26),
    0 18px 44px rgba(6, 15, 29, 0.44);
  animation: geomatrix-globe-float 7s ease-in-out infinite;
}

.landing-visual-side {
  display: none;
}

.landing-visual-main .visual-metric,
.landing-visual-main .visual-curve,
.landing-visual-main .curve-point {
  display: none;
}

.landing-visual::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 260px;
  top: 26px;
  bottom: 24px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    radial-gradient(circle at 18% 20%, rgba(82, 129, 204, 0.24), transparent 28%);
  border: 1px solid rgba(208, 225, 255, 0.12);
  backdrop-filter: blur(10px);
}

.landing-visual::after {
  content: "";
  position: absolute;
  left: 42px;
  bottom: 34px;
  width: 280px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(90,184,255,0.6), rgba(255,255,255,0.08));
  box-shadow:
    52px -26px 0 0 rgba(255,255,255,0.14),
    116px -12px 0 0 rgba(255,255,255,0.12),
    176px -30px 0 0 rgba(255,255,255,0.16);
}

@keyframes geomatrix-globe-float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

.landing-pill-row {
  gap: 8px;
}

.landing-pill {
  padding: 8px 12px;
  font-size: 0.82rem;
}

.auth-card {
  padding: 22px 18px 18px;
  gap: 14px;
}

.auth-heading h2 {
  font-size: 1.72rem;
  line-height: 1;
}

.auth-switch {
  padding: 4px;
}

.auth-tab {
  padding: 10px 12px;
}

.auth-form input,
.auth-form select {
  padding: 10px 12px;
  font-size: 0.94rem;
}

.timeline-card {
  top: 86px;
  width: min(620px, calc(100% - 280px));
  padding: 12px 14px;
  background: rgba(9, 22, 30, 0.72);
  border-color: rgba(180, 210, 204, 0.14);
}

.timeline-stepper {
  gap: 14px;
}

.timeline-mode-switch {
  grid-template-columns: 1fr;
}

.timeline-stepper button:last-child {
  margin-left: 2px;
}

.timeline-range,
.timeline-card input[type="range"] {
  margin-top: 2px;
}

.hud-card {
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(12, 26, 35, 0.58);
  border-color: rgba(160, 185, 180, 0.08);
}

.hud-readouts {
  flex-wrap: nowrap;
  align-items: center;
}

.hud-line {
  display: inline-flex;
  align-items: center;
  min-width: auto;
  gap: 7px;
}

.hud-line span {
  font-size: 0.58rem;
  color: rgba(226, 243, 236, 0.62);
}

.hud-line strong {
  font-size: 0.7rem;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
}

#basemap-flyout.basemap-dock {
  min-width: 286px;
  max-width: 312px;
  padding: 8px 10px 10px;
  background: rgba(9, 22, 30, 0.76);
  border-color: rgba(180, 210, 204, 0.14);
}

.basemap-dock .flyout-heading {
  gap: 0;
}

.basemap-dock .flyout-heading strong {
  font-size: 0.82rem;
}

.basemap-dock .icon-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.basemap-dock .icon-card {
  min-height: 52px;
  padding: 6px 4px;
  border-radius: 14px;
  background-size: cover !important;
  background-position: center !important;
  border-color: rgba(180, 210, 204, 0.12);
  position: relative;
  overflow: hidden;
}

.basemap-dock .icon-card.active {
  background: linear-gradient(135deg, rgba(29, 124, 87, 0.2), rgba(255, 255, 255, 0.08));
  box-shadow: 0 0 0 1px rgba(121, 205, 182, 0.12);
}

.basemap-dock .icon-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 18, 24, 0.22), rgba(8, 18, 24, 0.44));
}

.basemap-dock .icon-card .icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  position: relative;
  z-index: 1;
}

@media (max-width: 1380px) {
  .workspace {
    grid-template-columns: 220px minmax(0, 1fr) 236px;
  }
}

@media (max-width: 1160px) {
  .landing-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

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

  .inline-grid.two-columns,
  .extent-grid,
  .icon-grid,
  .edit-tools-grid {
    grid-template-columns: 1fr;
  }

  .map-stage {
    min-height: 76vh;
    order: -1;
  }

  .landing-showcase {
    min-height: auto;
  }

  .landing-visual-main,
  .landing-visual-side,
  .overview-visual-main,
  .overview-visual-side {
    position: static;
    width: 100%;
    min-height: 110px;
    margin-top: 12px;
  }

  .landing-visual,
  .overview-visual {
    display: grid;
    gap: 12px;
  }

  .map-toolbar > .toolbar-group:first-child {
    position: static;
    flex-direction: row;
    order: 2;
    width: auto;
  }

  .map-theme-strip {
    position: static;
    transform: none;
    margin: 14px auto 0;
    width: min(100%, calc(100% - 28px));
    grid-template-columns: 1fr;
  }

  .map-command-bar {
    width: 100%;
  }

  .map-command-icons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .map-side-rail {
    position: static;
    display: flex;
    width: auto;
    margin: 0 14px 10px;
  }

  .toolbar-flyout,
  #edit-flyout,
  #basemap-flyout {
    left: 12px;
    right: 12px;
    width: auto;
    transform: none;
  }

  #basemap-flyout.basemap-dock {
    position: static;
    width: auto;
    top: auto;
    left: auto;
    transform: none;
  }

  #edit-flyout.edit-ribbon {
    left: 12px;
    right: 12px;
    width: auto;
    transform: none;
  }

  .edit-ribbon .edit-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-card {
    width: auto;
    left: 12px;
    right: 12px;
    transform: none;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 14px;
  }

  .landing-shell {
    padding: 14px;
  }

  .auth-trust,
  .overview-metrics-grid,
  .layer-facts-grid,
  .layer-steps {
    grid-template-columns: 1fr;
  }

  .auth-card,
  .landing-copy {
    border-radius: 24px;
  }

  .overview-session-card {
    align-items: stretch;
    flex-direction: column;
  }

  .map-toolbar {
    position: static;
    padding: 14px;
  }

  .timeline-headline {
    flex-direction: column;
  }

  .timeline-stepper {
    width: 100%;
    justify-content: space-between;
  }

  .toolbar-group {
    border-radius: 22px;
  }

  .hud-card {
    top: auto;
    right: 12px;
    bottom: 148px;
    left: 12px;
    width: auto;
  }

  .timeline-card {
    left: 12px;
    right: 12px;
    bottom: 12px;
    transform: none;
  }
}

/* Land management mode */
.topbar-brand-copy strong {
  max-width: 260px;
  line-height: 1.2;
}

.panel-left .atlas-overview-card h2 {
  font-size: 1.34rem;
  line-height: 1.1;
}

.panel-left .overview-copy {
  font-size: 0.88rem;
}

.domain-controls {
  display: grid;
  gap: 14px;
}

.domain-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(16, 40, 31, 0.08);
}

.domain-group strong {
  font-size: 0.92rem;
}

.domain-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--text-soft);
}

.domain-check input {
  accent-color: var(--accent);
}

.domain-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.domain-chip {
  padding: 8px 10px;
  border: 1px solid rgba(16, 40, 31, 0.12);
  border-radius: 999px;
  background: rgba(16, 40, 31, 0.06);
  color: var(--text);
  font-size: 0.8rem;
}

.domain-chip.active {
  background: linear-gradient(135deg, rgba(22, 102, 85, 0.18), rgba(22, 44, 56, 0.16));
  border-color: rgba(16, 97, 76, 0.28);
  color: var(--accent-strong);
}

.domain-field {
  display: grid;
  gap: 6px;
}

.domain-field span {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.domain-field small {
  font-size: 0.72rem;
  color: var(--text-soft);
}

.domain-field input,
.domain-field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(16, 40, 31, 0.12);
  background: rgba(255, 255, 255, 0.94);
}

.domain-export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.domain-export-row button {
  flex: 1 1 120px;
}

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

.summary-list {
  display: grid;
  gap: 10px;
}

.summary-row {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(16, 40, 31, 0.08);
}

.summary-row strong {
  display: block;
  margin-bottom: 4px;
}

.summary-row p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.45;
}

.layer-summary-row p:last-child {
  margin-bottom: 0;
}

@media (max-width: 1380px) {
  .legend-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar-brand-copy strong {
    max-width: none;
  }

  .domain-export-row {
    grid-template-columns: 1fr;
  }
}

/* Final refinement pass */
.topbar-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 16px;
  border-radius: 18px;
  background: rgba(8, 14, 19, 0.94);
  border: 1px solid rgba(125, 159, 155, 0.16);
  box-shadow: 0 18px 40px rgba(8, 14, 19, 0.24);
}

.topbar-brandline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(85, 126, 137, 0.92), rgba(50, 86, 98, 0.92));
  color: #f7fbfa;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.topbar-brand-copy {
  display: grid;
  gap: 2px;
}

.topbar-brand-copy .eyebrow {
  color: rgba(224, 238, 235, 0.62);
}

.topbar-brand-copy strong {
  color: #f7fbfa;
  font-size: 0.95rem;
  font-weight: 600;
}

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

.topbar-menu button {
  padding: 9px 13px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(242, 248, 247, 0.86);
  font-size: 0.84rem;
  font-weight: 500;
}

.topbar-menu button:hover,
.topbar-menu button:focus-visible {
  background: rgba(58, 118, 113, 0.34);
  color: #ffffff;
  outline: none;
}

.map-command-bar {
  width: min(780px, calc(100% - 40px));
}

.map-theme-strip {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 10px;
}

.map-search-shell {
  min-height: 42px;
  padding: 0 14px;
}

.map-search-shell input {
  font-size: 0.92rem;
}

.theme-toggle-chip {
  width: 38px;
  height: 38px;
  border-radius: 13px;
}

.map-stage [data-tooltip]::after {
  display: block !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  background: rgba(102, 113, 121, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f7fbfa !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.04em !important;
  box-shadow: 0 12px 28px rgba(8, 14, 19, 0.22) !important;
}

.map-theme-strip [data-tooltip]::after {
  top: calc(100% + 10px) !important;
  transform: translate(-50%, -2px) !important;
}

.map-toolbar [data-tooltip]::after,
.toolbar-flyout [data-tooltip]::after {
  left: auto !important;
  right: calc(100% + 10px) !important;
  bottom: 50% !important;
  transform: translate(4px, 50%) !important;
}

.map-theme-strip [data-tooltip]:hover::after,
.map-theme-strip [data-tooltip]:focus-visible::after {
  transform: translate(-50%, 0) !important;
}

.map-toolbar [data-tooltip]:hover::after,
.map-toolbar [data-tooltip]:focus-visible::after,
.toolbar-flyout [data-tooltip]:hover::after,
.toolbar-flyout [data-tooltip]:focus-visible::after {
  transform: translate(0, 50%) !important;
}

.secondary-popup {
  min-width: 340px;
  max-width: min(460px, calc(100% - 24px));
  padding: 12px 14px;
  border-radius: 22px;
  background: rgba(250, 252, 249, 0.82);
  backdrop-filter: blur(18px);
}

.popup-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #133125;
}

.popup-line-compact {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.popup-line-compact span {
  white-space: nowrap;
}

.popup-line-compact strong {
  font-size: 0.85rem;
  line-height: 1.25;
  text-align: left;
}

.popup-line-address strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-card {
  width: min(700px, calc(100% - 250px));
  background: rgba(11, 22, 29, 0.8);
}

.hud-card {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  bottom: 10px;
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(11, 22, 29, 0.56);
  border-color: rgba(190, 213, 207, 0.08);
}

.hud-readouts {
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}

.hud-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: auto;
}

.hud-line span {
  font-size: 0.58rem;
}

.hud-line strong {
  font-size: 0.74rem;
}

.landing-showcase {
  background:
    radial-gradient(circle at 82% 72%, rgba(52, 206, 183, 0.34), transparent 18%),
    linear-gradient(160deg, #0c1821 0%, #132f3a 36%, #1a5964 72%, #2f9990 100%);
}

.landing-showcase h1 {
  max-width: 6.4ch;
  font-size: clamp(2rem, 3.1vw, 3.2rem);
}

.landing-visual {
  min-height: 228px;
  border: 1px solid rgba(195, 216, 255, 0.08);
  background:
    radial-gradient(circle at 16% 16%, rgba(255, 255, 255, 0.16), transparent 1.4%),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12), transparent 1.1%),
    radial-gradient(circle at 52% 14%, rgba(255, 255, 255, 0.12), transparent 1.2%),
    radial-gradient(circle at 70% 28%, rgba(255, 255, 255, 0.14), transparent 1.1%),
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.1), transparent 1%),
    linear-gradient(180deg, #03060b 0%, #0b1018 100%);
}

.landing-visual-main {
  right: 48px;
  top: 12px;
  width: 228px;
  min-height: 228px;
  overflow: hidden;
}

.landing-visual-main::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 36% 46%, rgba(226, 205, 166, 0.86), transparent 0 14%),
    radial-gradient(circle at 44% 58%, rgba(159, 196, 167, 0.88), transparent 0 20%),
    radial-gradient(circle at 58% 38%, rgba(182, 168, 210, 0.78), transparent 0 14%),
    radial-gradient(circle at 62% 62%, rgba(110, 171, 227, 0.76), transparent 0 18%);
  opacity: 0.88;
}

.landing-visual-main::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  border: 2px solid rgba(168, 208, 255, 0.16);
  filter: blur(4px);
}

.landing-visual::before {
  right: 312px;
  top: 26px;
  bottom: 28px;
  border-radius: 20px;
}

.landing-visual::after {
  width: 340px;
}

.atlas-overview-card h2 {
  font-size: 1.2rem;
}

.overview-copy {
  font-size: 0.8rem;
  line-height: 1.45;
}

.overview-session-card {
  padding: 10px;
}

.overview-metrics-grid {
  gap: 6px;
}

.overview-metric {
  padding: 8px 10px;
}

@media (max-width: 1160px) {
  .topbar-compact {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-menu {
    justify-content: center;
  }

  .map-command-bar {
    width: min(100%, calc(100% - 28px));
  }

  .timeline-card {
    width: auto;
  }
}

@media (max-width: 720px) {
  .topbar-menu {
    gap: 6px;
  }

  .topbar-menu button {
    flex: 1 1 calc(50% - 6px);
    text-align: center;
  }

  .secondary-popup {
    min-width: 0;
    width: calc(100% - 24px);
  }

  .popup-line-compact {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .hud-card {
    left: 12px;
    right: 12px;
    transform: none;
  }

  .hud-readouts {
    flex-wrap: wrap;
  }
}
