:root {
  color-scheme: light;
  --bg: #eef1ed;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --surface-muted: rgba(255, 250, 240, 0.9);
  --surface-soft: rgba(245, 249, 246, 0.92);
  --border: rgba(84, 73, 52, 0.14);
  --line: #d7ddd4;
  --line-strong: #b6c1b6;
  --text: #17211d;
  --muted: #64726b;
  --accent: #0c6661;
  --accent-strong: #0c5450;
  --accent-soft: #dbeae5;
  --warm: #dd9a2c;
  --warm-soft: #f6ead7;
  --danger: #a03d2f;
  --danger-soft: rgba(160, 61, 47, 0.12);
  --success: #2f6f39;
  --success-soft: rgba(47, 111, 57, 0.12);
  --shadow: 0 18px 40px rgba(22, 35, 32, 0.06);
  --radius-xl: 28px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --mono: "IBM Plex Mono", monospace;
  --sans: "Manrope", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--sans);
  background:
    radial-gradient(circle at top left, rgba(12, 102, 97, 0.09), transparent 28%),
    radial-gradient(circle at bottom right, rgba(160, 180, 150, 0.12), transparent 24%),
    linear-gradient(180deg, #f5f6f2 0%, #e8ece7 100%);
  color: var(--text);
  padding: clamp(0.85rem, 1.5vw, 1.25rem);
  overflow-x: clip;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 0 0 32px;
}

.brand-bar,
.panel,
.result-card,
.draft-card,
.intro-card,
.step-node,
.campaign-banner {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
}

.brand-bar {
  border-radius: 24px;
  padding: 1.2rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background:
    radial-gradient(circle at top left, rgba(126, 200, 196, 0.14), transparent 26%),
    linear-gradient(135deg, #103a39 0%, #0c5450 52%, #0c6661 100%);
  border-color: rgba(8, 53, 50, 0.62);
  box-shadow:
    0 22px 44px rgba(16, 43, 41, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}

.brand-bar::after {
  content: "";
  position: absolute;
  inset: auto -5% -35% auto;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(151, 223, 217, 0.18) 0%, rgba(151, 223, 217, 0) 68%);
  pointer-events: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.brand-copy {
  min-width: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem 0.9rem;
  flex-wrap: wrap;
}

.brand-mark {
  width: 30px;
  height: 38px;
  flex: 0 0 auto;
  background: linear-gradient(180deg, #b9f0f2 0%, #59b3b7 42%, #13857f 100%);
  border-radius: 55% 55% 60% 60% / 72% 72% 42% 42%;
  transform: rotate(45deg);
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    0 10px 20px rgba(6, 31, 31, 0.22);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px 10px auto auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.brand-kicker,
.eyebrow,
.step-circle,
.draft-stat-label {
  font: 800 0.74rem/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-kicker,
.eyebrow {
  margin: 0 0 8px;
}

.brand-kicker {
  color: rgba(230, 255, 250, 0.76);
}

.eyebrow {
  color: var(--muted);
}

.brand-bar h1,
.hero-panel h2,
.flow-head h2,
.step-panel h3,
.result-card h4,
.intro-card h4 {
  margin: 0;
  letter-spacing: -0.03em;
}

.brand-bar h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
  color: #f7fffd;
}

.brand-subtitle,
.section-copy,
.status-line,
.assumption-list,
.blocked-meta,
.ranking-meta,
.campaign-meta {
  color: var(--muted);
}

.brand-subtitle,
.section-copy {
  margin: 12px 0 0;
  line-height: 1.55;
}

.brand-subtitle {
  max-width: 760px;
  margin-top: 0.4rem;
  color: rgba(234, 252, 248, 0.82);
}

.brand-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.brand-nav {
  margin-left: auto;
}

.brand-nav-checkbox,
.brand-nav-toggle {
  display: none;
}

.brand-button,
.copy-button,
.primary-button,
.ghost-button {
  border-radius: 999px;
  text-decoration: none;
  padding: 0.82rem 1.08rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.brand-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid rgba(198, 241, 235, 0.32);
  border-radius: 14px;
  background: rgba(246, 253, 251, 0.12);
  color: #f1fcfa;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.brand-button-secondary {
  background: rgba(246, 253, 251, 0.08);
}

.brand-button-current {
  background: rgba(245, 255, 252, 0.95);
  color: #0d3f3d;
  border-color: rgba(198, 241, 235, 0.5);
}

.copy-button {
  background: rgba(245, 255, 252, 0.95);
  color: #0d3f3d;
  border: 1px solid rgba(198, 241, 235, 0.5);
}

.primary-button {
  background: linear-gradient(135deg, #0c6661 0%, #0c5450 100%);
  color: #f5fffd;
  border-color: rgba(10, 72, 68, 0.72);
  box-shadow: 0 14px 24px rgba(12, 84, 80, 0.18);
}

.primary-button-large {
  width: 100%;
  justify-content: center;
  min-height: 54px;
  font-size: 1rem;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  border-color: rgba(84, 73, 52, 0.18);
}

.brand-button:hover,
.copy-button:hover,
.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.brand-button:disabled,
.copy-button:disabled,
.primary-button:disabled,
.ghost-button:disabled,
.step-node:disabled {
  cursor: default;
  opacity: 0.56;
  transform: none;
}

.brand-button[data-emoji] {
  position: relative;
  overflow: hidden;
}

.brand-button[data-emoji]::after {
  content: attr(data-emoji);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  color: #f4fffc;
  font-size: 1.1rem;
  transition: opacity 120ms ease;
}

.brand-button-current[data-emoji]::after {
  color: #0d3f3d;
}

@media (hover: hover) {
  .brand-button[data-emoji]:hover {
    color: transparent;
  }

  .brand-button[data-emoji]:hover::after {
    opacity: 1;
  }
}

.hero-panel,
.flow-shell {
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  margin-bottom: 18px;
}

.hero-panel {
  display: block;
}

.hero-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-action {
  background: rgba(232, 244, 241, 0.9);
}

.draft-card-soft,
.planner-note {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.92), rgba(249, 244, 233, 0.86));
  padding: 18px 20px;
}

.planner-context-inline {
  margin-top: 14px;
}

.flow-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 20px;
}

.status-line {
  margin: 0;
  max-width: 540px;
  text-align: right;
}

.stepper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.step-line {
  height: 2px;
  background: linear-gradient(90deg, rgba(12, 102, 97, 0.16), rgba(12, 102, 97, 0.34));
  border-radius: 999px;
}

.step-node {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-align: left;
  border-color: rgba(84, 73, 52, 0.14);
}

.step-node.is-active {
  background: linear-gradient(180deg, rgba(219, 234, 229, 0.98), rgba(245, 252, 249, 0.98));
  border-color: rgba(12, 102, 97, 0.28);
}

.step-node.is-complete {
  border-color: rgba(47, 111, 57, 0.22);
  background: linear-gradient(180deg, rgba(241, 249, 242, 0.96), rgba(255, 255, 255, 0.96));
}

.step-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0;
  color: var(--accent-strong);
  background: rgba(12, 102, 97, 0.1);
  border: 1px solid rgba(12, 102, 97, 0.18);
  flex: 0 0 auto;
}

.step-node.is-active .step-circle {
  background: linear-gradient(135deg, #0c6661 0%, #0c5450 100%);
  color: #f4fffc;
}

.step-node.is-complete .step-circle {
  background: rgba(47, 111, 57, 0.1);
  border-color: rgba(47, 111, 57, 0.2);
  color: var(--success);
}

.step-copy {
  display: grid;
  gap: 3px;
}

.step-label {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.step-meta {
  font-size: 0.9rem;
  color: var(--muted);
}

.step-panel {
  animation: rise-in 220ms ease;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.intro-layout,
.wizard-layout {
  display: grid;
  gap: 18px;
}

.intro-layout {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

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

.intro-card,
.draft-card,
.campaign-banner {
  border-radius: var(--radius-md);
  border-color: rgba(84, 73, 52, 0.14);
}

.intro-card {
  padding: 18px;
  background: rgba(255, 251, 245, 0.96);
}

.intro-card h4 {
  font-size: 1.05rem;
  margin-top: 0;
}

.intro-card p:last-child,
.draft-card p:last-child {
  margin-bottom: 0;
}

.intro-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.draft-card {
  padding: 18px;
  background: var(--surface-strong);
}

.draft-card h3,
.campaign-banner h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

.draft-card-soft {
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.92), rgba(249, 244, 233, 0.86));
}

.wizard-layout {
  grid-template-columns: minmax(0, 1.22fr) minmax(280px, 0.78fr);
  align-items: start;
}

.wizard-main,
.wizard-side,
.result-stack {
  display: grid;
  gap: 16px;
}

.form-section,
.panel-subsection {
  display: grid;
  gap: 18px;
}

.form-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--surface-soft);
}

.block-head,
.result-card-head,
.section-head,
.campaign-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.compact-head {
  margin-bottom: 12px;
}

.block-head h4,
.result-card h4 {
  font-size: 1.15rem;
}

.block-head-actions {
  align-items: center;
}

.label-optional {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.field-hint {
  display: block;
  margin-top: 2px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted);
}

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

.scope-grid {
  align-items: start;
}

.scope-title {
  margin: 0 0 6px;
  font-weight: 800;
  color: var(--text);
}

.field-span {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

select,
input {
  width: 100%;
  border: 1px solid rgba(84, 73, 52, 0.18);
  border-radius: 14px;
  background: rgba(255, 252, 246, 0.98);
  padding: 12px 13px;
  color: var(--text);
}

.neighborhood-checklist {
  margin-top: 10px;
  max-height: 280px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(84, 73, 52, 0.12);
  border-radius: 16px;
  background: rgba(255, 252, 246, 0.98);
}

.neighborhood-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  cursor: pointer;
}

.neighborhood-option input {
  width: auto;
  margin: 0;
}

.neighborhood-option.is-checked {
  border-color: rgba(12, 102, 97, 0.28);
  background: rgba(219, 234, 229, 0.78);
}

.neighborhood-option.is-disabled {
  opacity: 0.48;
  cursor: default;
}

select:focus-visible,
input:focus-visible,
.ghost-button:focus-visible,
.primary-button:focus-visible,
.copy-button:focus-visible,
.step-node:focus-visible {
  outline: 2px solid rgba(12, 102, 97, 0.34);
  outline-offset: 3px;
}

.advanced-panel {
  margin-top: 16px;
  display: grid;
  gap: 20px;
}

.channel-section {
  display: grid;
  gap: 12px;
}

.channel-controls {
  display: grid;
  gap: 12px;
}

.channel-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  padding: 14px 15px;
}

.channel-card.is-disabled {
  opacity: 0.6;
}

.channel-card-head,
.channel-meta,
.toggle {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.channel-title,
.ranking-title,
.blocked-title,
.step-panel h3 {
  margin: 0;
  font-weight: 800;
}

.channel-description {
  margin: 6px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.toggle input {
  width: auto;
}

.action-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

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

.draft-stat {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 249, 241, 0.92);
}

.planner-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 22px;
}

.planner-modal.is-hidden {
  display: none;
}

.planner-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 26, 24, 0.56);
  backdrop-filter: blur(6px);
}

.planner-modal-dialog {
  position: relative;
  width: min(980px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 28px 70px rgba(15, 26, 24, 0.22);
}

.planner-modal-dialog-map {
  width: min(1160px, 100%);
}

.planner-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--line);
}

.planner-modal-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.2vw, 2rem);
}

.planner-modal-body {
  padding: 22px 26px 28px;
  display: grid;
  gap: 22px;
}

.metric-modal-section {
  display: grid;
  gap: 14px;
}

.spatial-modal-body {
  padding-top: 18px;
}

.spatial-modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.spatial-map {
  min-height: 500px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(84, 73, 52, 0.14);
  background: linear-gradient(180deg, rgba(241, 247, 244, 0.98), rgba(248, 251, 249, 0.98));
  position: relative;
}

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

.spatial-map-canvas {
  z-index: 1;
}

.spatial-map-fallback {
  z-index: 2;
}

.spatial-map-canvas.leaflet-container,
.spatial-map-canvas .leaflet-container {
  width: 100%;
  height: 100%;
  font: inherit;
  background: #dfe8e2;
}

.spatial-map-canvas .leaflet-tile,
.spatial-map-canvas .leaflet-marker-icon,
.spatial-map-canvas .leaflet-marker-shadow {
  max-width: none !important;
  max-height: none !important;
}

.spatial-map-canvas .leaflet-pane > svg,
.spatial-map-canvas .leaflet-pane > canvas {
  max-width: none !important;
  max-height: none !important;
}

.spatial-map-canvas .leaflet-control-attribution {
  border-radius: 10px 0 0 10px;
  border: 1px solid rgba(210, 220, 214, 0.9);
  background: rgba(250, 251, 248, 0.9) !important;
  box-shadow: 0 10px 24px rgba(15, 28, 24, 0.08);
  backdrop-filter: blur(10px);
}

.spatial-map-fallback.is-hidden {
  display: none;
}

.spatial-sketch,
.spatial-sketch-empty {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 100%;
  padding: 0;
}

.spatial-sketch-svg {
  width: 100%;
  height: 500px;
  display: block;
  border-radius: 20px;
}

.spatial-sketch-surface {
  fill: url(#spatial-sketch-gradient);
}

.spatial-sketch-grid-line {
  stroke: rgba(12, 102, 97, 0.1);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.spatial-sketch-context-shape {
  fill: rgba(101, 129, 120, 0.08);
  stroke: rgba(88, 112, 104, 0.46);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  fill-rule: evenodd;
}

.spatial-sketch-shape {
  fill: rgba(12, 102, 97, 0.14);
  stroke: #0c6661;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  fill-rule: evenodd;
}

.spatial-sketch-marker {
  stroke-width: 2.5;
  transition: transform 120ms ease, fill 120ms ease, stroke 120ms ease;
}

.spatial-sketch-marker-stop {
  fill: #ffffff;
  stroke: #0c6661;
}

.spatial-sketch-marker-zone {
  fill: #edf7e7;
  stroke: #2f6f39;
}

.spatial-sketch-marker-text {
  font: 800 0.82rem/1 var(--mono);
}

.spatial-sketch-marker-text-stop {
  fill: #0c6661;
}

.spatial-sketch-marker-text-zone {
  fill: #2f6f39;
}

.spatial-sketch-marker-group {
  cursor: pointer;
}

.spatial-sketch-marker-group.is-active .spatial-sketch-marker-stop {
  fill: #0c6661;
  stroke: #073c39;
}

.spatial-sketch-marker-group.is-active .spatial-sketch-marker-zone {
  fill: #2f6f39;
  stroke: #204c27;
}

.spatial-sketch-marker-group.is-active .spatial-sketch-marker-text-stop,
.spatial-sketch-marker-group.is-active .spatial-sketch-marker-text-zone {
  fill: #ffffff;
}

.spatial-sketch-marker-group:focus-visible .spatial-sketch-marker,
.spatial-sketch-marker-group:hover .spatial-sketch-marker {
  stroke-width: 3.2;
}

.spatial-sketch-caption {
  margin: 0;
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.spatial-side {
  display: grid;
  gap: 14px;
}

.spatial-location-list {
  display: grid;
  gap: 10px;
  max-height: 500px;
  overflow: auto;
  padding-right: 2px;
}

.spatial-location-item {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(246, 250, 248, 0.96);
  padding: 13px 14px;
  display: grid;
  gap: 6px;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.spatial-location-item:hover,
.spatial-location-item:focus-visible {
  border-color: rgba(12, 102, 97, 0.34);
  box-shadow: 0 10px 24px rgba(12, 102, 97, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.spatial-location-item.is-active {
  border-color: rgba(12, 102, 97, 0.42);
  background: rgba(233, 245, 240, 0.98);
  box-shadow: 0 14px 28px rgba(12, 102, 97, 0.08);
}

.spatial-location-title {
  margin: 0;
  font-weight: 800;
}

.spatial-location-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metric-modal-section + .metric-modal-section {
  padding-top: 18px;
  border-top: 1px solid rgba(84, 73, 52, 0.1);
}

.metric-modal-section h3 {
  margin: 0;
  font-size: 1.1rem;
}

.metric-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.metric-modal-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(246, 250, 248, 0.95);
  padding: 15px 16px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.metric-modal-card h4,
.metric-modal-list-title {
  margin: 0 0 8px;
  font-size: 1rem;
}

.metric-modal-list,
.metric-modal-source-list,
.metric-modal-preset-list {
  display: grid;
  gap: 10px;
}

.metric-modal-source-list,
.metric-modal-preset-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.metric-modal-source-item,
.metric-modal-preset-item,
.metric-modal-note {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(246, 250, 248, 0.96);
  padding: 13px 14px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.metric-modal-note {
  background: rgba(241, 247, 244, 0.98);
}

.metric-modal-source-item h4,
.metric-modal-preset-item h4 {
  margin: 0;
  font-size: 1rem;
}

.metric-modal-section .small-copy {
  max-width: none;
}

.metric-modal-section .section-copy {
  margin: 0;
}

.formula-list {
  display: grid;
  gap: 8px;
}

.formula-line {
  display: block;
  padding: 9px 10px;
  border-radius: 12px;
  background: #eff5f1;
  color: #0f2b28;
  font: 500 0.84rem/1.45 var(--mono);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: visible;
}

.draft-stat-label {
  color: var(--muted);
}

.draft-stat-value {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.campaign-banner {
  padding: 20px 22px;
  margin-bottom: 18px;
  background:
    radial-gradient(circle at top left, rgba(12, 102, 97, 0.09), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 245, 0.96));
}

.campaign-banner-copy {
  max-width: 820px;
}

.campaign-meta {
  margin: 8px 0 0;
  font: 700 0.82rem/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.panel-subsection {
  display: grid;
  gap: 18px;
}

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

.summary-card,
.result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.summary-card {
  padding: 16px;
}

.summary-value {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.summary-copy {
  margin: 8px 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

.results-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 16px;
}

.result-card {
  padding: 18px;
}

.result-card-head {
  margin-bottom: 14px;
}

.small-copy {
  max-width: 360px;
  margin-top: 6px;
}

.ranking-list,
.blocked-list,
.assumption-list,
.report-output {
  display: grid;
  gap: 12px;
}

.report-card {
  display: grid;
  gap: 14px;
}

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

.report-output {
  min-height: 180px;
}

.report-layout {
  display: grid;
  gap: 16px;
}

.report-summary {
  border-radius: 18px;
  border: 1px solid rgba(12, 102, 97, 0.12);
  background: linear-gradient(180deg, rgba(240, 248, 245, 0.98), rgba(255, 255, 255, 0.98));
  padding: 16px 18px;
}

.report-summary h5,
.report-block h5,
.report-list-title {
  margin: 0 0 10px;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.report-summary p,
.report-block p,
.report-list-item p {
  margin: 0;
  line-height: 1.6;
  color: var(--text);
}

.report-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 14px;
}

.report-column {
  display: grid;
  gap: 14px;
}

.report-block {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 252, 246, 0.96);
  padding: 15px 16px;
  display: grid;
  gap: 10px;
}

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

.report-list-item {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(246, 250, 248, 0.96);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.report-list-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.report-list-item-title {
  margin: 0;
  font-weight: 800;
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-bullet-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 8px;
}

.report-bullet-list li {
  color: var(--text);
  line-height: 1.55;
}

.ranking-item,
.blocked-item,
.assumption-item {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 248, 237, 0.92);
  padding: 14px;
}

.ranking-item {
  display: grid;
  gap: 10px;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 10px;
  font: 700 0.73rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pill-score {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.pill-blocked {
  background: var(--danger-soft);
  color: var(--danger);
}

.pill-penalized {
  background: var(--warm-soft);
  color: var(--warm);
}

.pill-ok {
  background: var(--success-soft);
  color: var(--success);
}

.metric-row,
.blocked-meta,
.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.88rem;
}

.ranking-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.action-map-button {
  padding: 0.62rem 0.9rem;
  font-size: 0.84rem;
}

.metric-chip {
  border-radius: 999px;
  background: rgba(14, 116, 107, 0.08);
  color: var(--accent-strong);
  padding: 6px 9px;
  font: 600 0.76rem/1 var(--mono);
}

.empty-state {
  margin: 0;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: rgba(247, 250, 247, 0.92);
  padding: 16px;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .intro-layout,
  .wizard-layout,
  .results-grid,
  .summary-grid,
  .intro-grid {
    grid-template-columns: 1fr;
  }

  .flow-head,
  .campaign-banner {
    align-items: stretch;
  }

  .status-line {
    text-align: left;
    max-width: none;
  }

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

  .step-line {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    padding: 0.6rem;
  }

  .brand-bar,
  .hero-panel,
  .flow-shell {
    padding: 0.95rem;
  }

  .hero-panel,
  .flow-shell {
    border-radius: 22px;
  }

  .brand-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .brand-lockup {
    width: 100%;
    gap: 0.7rem;
  }

  .brand-mark {
    width: 24px;
    height: 30px;
  }

  .brand-mark::after {
    inset: 6px 8px auto auto;
    width: 6px;
    height: 6px;
  }

  .brand-copy h1 {
    font-size: 1.65rem;
  }

  .brand-title-row {
    gap: 0.5rem 0.65rem;
  }

  .brand-nav {
    width: 100%;
    margin-left: 0;
  }

  .brand-nav-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .brand-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 42px;
    padding: 0.68rem 0.84rem;
    border: 1px solid rgba(198, 241, 235, 0.32);
    border-radius: 14px;
    background: rgba(239, 251, 248, 0.14);
    color: #f4fffc;
    font-weight: 800;
    cursor: pointer;
  }

  .brand-nav-toggle::after {
    content: "+";
    font-size: 1rem;
    line-height: 1;
  }

  .brand-actions {
    width: 100%;
    margin-left: 0;
    display: none;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin-top: 0.65rem;
  }

  .brand-nav-checkbox:checked + .brand-nav-toggle::after {
    content: "−";
  }

  .brand-nav-checkbox:checked + .brand-nav-toggle + .brand-actions {
    display: grid;
  }

  .field-grid,
  .metric-modal-grid,
  .metric-modal-source-list,
  .metric-modal-preset-list,
  .spatial-modal-layout,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .action-row,
  .campaign-banner-actions,
  .report-actions,
  .channel-card-head,
  .channel-meta,
  .result-card-head,
  .report-list-item-head,
  .ranking-head,
  .blocked-head,
  .planner-modal-head {
    flex-direction: column;
    align-items: stretch;
  }

  .step-node {
    padding: 14px;
  }

  .planner-modal {
    padding: 10px;
  }

  .planner-modal-head,
  .planner-modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .spatial-map {
    min-height: 360px;
  }
}
