: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;
}

.landing-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 460px);
  gap: 24px;
  min-height: 100vh;
  padding: 26px;
  align-items: start;
}

.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(720px, 86vh, 880px);
  padding: 34px 34px 24px;
  gap: 24px;
  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: 7.5ch;
  color: #ffffff;
  font-size: clamp(3rem, 5.4vw, 4.5rem);
  letter-spacing: -0.06em;
}

.landing-showcase .landing-subtitle {
  max-width: 680px;
}

.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: 250px;
  padding: 28px;
  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: 38px;
  top: 36px;
  width: 48%;
  min-height: 150px;
  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: 38px;
  top: 52px;
  width: 34%;
  min-height: 120px;
  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: 18px;
  height: 86px;
}

.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: 54px;
  height: 54px;
  right: 64px;
  bottom: 18px;
}

.orbit-two {
  width: 20px;
  height: 20px;
  right: 82px;
  bottom: 36px;
  background: #169d8c;
  border: 0;
}

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

.landing-pill {
  padding: 10px 14px;
  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.9rem;
}

.auth-card {
  gap: 16px;
  padding: 28px 28px 24px;
  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;
}

.auth-heading h2 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.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;
}

.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: 14px;
}

.topbar-compact {
  display: none;
}

.app-shell {
  padding: 14px;
  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: 292px minmax(0, 1fr) 314px;
  gap: 12px;
}

.panel {
  padding: 18px;
  border-radius: 26px;
  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: 14px;
}

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

.overview-copy {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.overview-session-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  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: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(16, 40, 31, 0.08);
}

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

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

.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: 10px;
  margin: 14px 0 2px;
}

.theme-family-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(16, 40, 31, 0.08);
  border-radius: 18px;
  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.98rem;
  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: 40px;
  height: 40px;
  border-radius: 14px;
  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: 16px 18px;
  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: 1rem;
}

.workspace-drawer .drawer-marker {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  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: 16px;
  padding: 0 18px 18px;
}

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

.map-theme-strip {
  position: absolute;
  z-index: 4;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 22px;
  background: rgba(252, 248, 241, 0.94);
  box-shadow: 0 20px 44px rgba(95, 71, 39, 0.12);
}

.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: 8px 10px;
  border-radius: 999px;
  background: #253c46;
  color: #fff;
}

.theme-toggle-chip {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(16, 40, 31, 0.08);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text-soft);
  font-family: "IBM Plex Mono", monospace;
}

.theme-toggle-chip.active {
  border-color: rgba(17, 97, 64, 0.18);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(17, 97, 64, 0.08);
}

.map-toolbar {
  top: 76px;
  left: 14px;
  right: 14px;
  justify-content: center;
}

.map-toolbar > .toolbar-group:first-child {
  position: absolute;
  right: 0;
  top: 0;
  flex-direction: column;
  align-items: stretch;
  border-radius: 18px;
  padding: 8px;
}

.map-toolbar > .toolbar-group:first-child button {
  justify-content: center;
  min-width: 116px;
}

.toolbar-menu-group {
  padding: 6px 10px;
  border-radius: 18px;
}

.toolbar-menu-group .tool-button {
  padding: 10px 14px;
}

.map-side-rail {
  position: absolute;
  z-index: 4;
  left: 16px;
  top: 148px;
  display: grid;
  gap: 8px;
}

.rail-label {
  justify-self: start;
  padding: 4px 10px;
  border-radius: 999px;
  background: #253c46;
  color: #fff;
}

.map-utility-button {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(16, 40, 31, 0.08);
  border-radius: 16px;
  background: rgba(252, 248, 241, 0.94);
  color: var(--text);
  box-shadow: 0 18px 34px rgba(95, 71, 39, 0.1);
}

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

.toolbar-flyout {
  top: 132px;
  left: 16px;
  right: auto;
  width: min(320px, calc(100% - 32px));
  border-radius: 20px;
  background: rgba(252, 248, 241, 0.94);
}

#edit-flyout {
  top: 132px;
  right: 16px;
  left: auto;
}

.timeline-card {
  left: 18px;
  right: auto;
  width: min(760px, calc(100% - 36px));
  bottom: 18px;
  border-radius: 20px;
  background: rgba(252, 248, 241, 0.94);
}

.hud-card {
  top: 120px;
  right: 18px;
  width: 220px;
  border-radius: 18px;
  background: rgba(252, 248, 241, 0.92);
}

.detail-card {
  gap: 14px;
}

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

.layer-hero img {
  display: block;
  width: 100%;
  height: 180px;
  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;
}

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

@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;
  }

  .map-theme-strip {
    position: static;
    transform: none;
    margin: 14px auto 0;
    width: fit-content;
  }

  .map-side-rail {
    position: static;
    grid-auto-flow: column;
    align-items: center;
    margin: 0 14px 10px;
  }

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

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

@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;
  }

  .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;
  }
}
