:root {
  --bg: #eef1ed;
  --bg-strong: #f7f8f5;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --line: #d7ddd4;
  --line-strong: #b6c1b6;
  --ink: #17211d;
  --muted: #64726b;
  --accent: #0c6661;
  --accent-soft: #dbeae5;
  --warm: #dd9a2c;
  --critical: #b55239;
  --shadow: 0 18px 40px rgba(22, 35, 32, 0.06);
  --radius: 20px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  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(--ink);
  font-family: "Manrope", sans-serif;
}

body {
  overflow: hidden;
  padding: 1rem;
}

body.app-booting {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.88em;
  background: #eef5f3;
  border: 1px solid #d8e3e0;
  border-radius: 7px;
  padding: 0.1rem 0.35rem;
}

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

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.78rem 0.88rem;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

button {
  border: 0;
  background: none;
  color: inherit;
}

.shell {
  height: calc(100vh - 2rem);
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.9rem;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 600ms ease, transform 600ms ease;
}

body.app-booting .shell {
  opacity: 0;
  transform: translateY(20px);
}

.brand-bar,
.panel,
.stat-card,
.modal-dialog {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
}

.brand-bar {
  border-radius: calc(var(--radius) + 4px);
  padding: 1.1rem 1.3rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  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;
}

.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.7rem 0.9rem;
  flex-wrap: wrap;
}

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

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

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

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

.modal-kicker,
.brand-kicker,
.note-title,
.stat-label,
.detail-label,
.legend-label {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.modal-kicker {
  color: var(--accent);
}

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

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
  color: #f7fffd;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.brand-subtitle {
  max-width: 780px;
  margin: 0.45rem 0 0;
  color: rgba(234, 252, 248, 0.84);
  line-height: 1.5;
}

.brand-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.78rem 1rem;
  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;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
  text-decoration: none;
}

.brand-button:hover {
  transform: translateY(-1px);
}

.brand-button:focus-visible {
  outline: 2px solid rgba(213, 248, 244, 0.46);
  outline-offset: 2px;
}

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

.brand-nav-toggle:focus-visible {
  outline: 2px solid rgba(213, 248, 244, 0.46);
  outline-offset: 2px;
}

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

h2 {
  font-size: 0.96rem;
  letter-spacing: -0.02em;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.44rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge {
  color: var(--accent);
}

.badge-ok {
  color: var(--accent);
  background: rgba(216, 236, 233, 0.94);
  border-color: #b9d8d3;
}

.badge-warning {
  color: #915b16;
  background: rgba(247, 233, 209, 0.96);
  border-color: #e3cda8;
}

.badge-muted {
  color: var(--muted);
  background: rgba(244, 247, 246, 0.96);
}

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

.panel {
  min-height: 0;
  border-radius: var(--radius);
  padding: 1rem;
  overflow: hidden;
}

.controls {
  display: grid;
  align-content: start;
  gap: 0.88rem;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(252, 252, 249, 0.96) 0%, rgba(245, 248, 245, 0.92) 100%);
  border-color: rgba(255, 255, 255, 0.62);
  position: relative;
}

.controls-hero {
  display: grid;
  gap: 0.68rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(203, 214, 208, 0.92);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(124, 194, 191, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(250, 252, 251, 0.98) 0%, rgba(243, 247, 245, 0.94) 100%);
  box-shadow: 0 14px 26px rgba(22, 35, 32, 0.05);
}

.controls-hero-head {
  display: grid;
  gap: 0.55rem;
}

.controls-hero h2 {
  font-size: 1.28rem;
  letter-spacing: -0.04em;
}

.controls-intro {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.55;
}

.map-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background:
    linear-gradient(180deg, rgba(252, 253, 252, 0.96) 0%, rgba(245, 248, 246, 0.94) 100%);
  padding: 0.72rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.panel-subtitle,
.status,
.selection-summary,
.note-copy,
.popup-copy,
.chart-empty {
  color: var(--muted);
}

.panel-subtitle,
.status {
  margin: 0.22rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

label {
  display: grid;
  gap: 0.38rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 0.85rem;
  border: 1px solid rgba(206, 217, 210, 0.92);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(124, 194, 191, 0.11), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(247, 250, 248, 0.86) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

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

.note-stack {
  display: grid;
  gap: 0.75rem;
}

.note-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  background: linear-gradient(180deg, rgba(248, 250, 249, 0.96) 0%, rgba(241, 246, 244, 0.92) 100%);
}

.note-copy {
  margin: 0.5rem 0 0;
  line-height: 1.5;
}

.note-copy strong {
  color: var(--ink);
}

.map-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.map {
  height: 100%;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(214, 222, 216, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 24px 44px rgba(22, 35, 32, 0.07);
  background:
    radial-gradient(circle at top left, rgba(12, 102, 97, 0.16), transparent 26%),
    linear-gradient(180deg, #edf4f2 0%, #e6efeb 100%);
}

.legend {
  position: absolute;
  left: 0.95rem;
  right: 0.95rem;
  bottom: 0.95rem;
  display: grid;
  grid-template-columns: minmax(112px, auto) minmax(0, 1fr) minmax(96px, auto);
  align-items: center;
  gap: 0.62rem 0.9rem;
  padding: 0.75rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(250, 251, 248, 0.9);
  box-shadow: 0 18px 34px rgba(15, 28, 24, 0.1);
  backdrop-filter: blur(10px);
  z-index: 500;
}

.legend-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.28rem;
  flex: 1 1 auto;
}

.legend-chip {
  min-height: 14px;
  border-radius: 999px;
}

.legend-label {
  min-width: 86px;
  font-size: 0.76rem;
}

.legend-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.legend-values .legend-label {
  min-width: 0;
}

.legend-note {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--muted);
}

.summary-block {
  display: grid;
  gap: 0.9rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.stat-card {
  border-radius: var(--radius-sm);
  padding: 0.92rem 0.9rem 0.86rem;
  border: 1px solid rgba(211, 220, 214, 0.96);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99) 0%, rgba(245,248,246,0.97) 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 28px rgba(22, 35, 32, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #7cc2bf 0%, var(--accent) 100%);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(22, 35, 32, 0.08);
}

.stat-card-primary {
  border-color: rgba(164, 210, 205, 0.98);
  background:
    radial-gradient(circle at top right, rgba(124, 194, 191, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(243,249,247,0.98) 100%);
}

.stat-card-status .stat-value {
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.stat-value {
  margin: 0.38rem 0 0;
  font-size: 1.36rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.selection-summary {
  margin: 0;
  line-height: 1.55;
  font-size: 0.95rem;
}

.summary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.ghost-button,
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0.78rem 0.9rem;
  border: 1px solid rgba(207, 217, 211, 0.96);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 247, 245, 0.95) 100%);
  font-weight: 800;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 10px 20px rgba(21, 33, 31, 0.05);
}

.ghost-button:hover,
.modal-close:hover {
  border-color: #9dbab5;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(239, 246, 243, 0.98) 100%);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(21, 33, 31, 0.08);
}

.ghost-button::after {
  content: "›";
  font-size: 1.2rem;
  line-height: 1;
  color: var(--accent);
}

.modal-close::after {
  content: "×";
  font-size: 1rem;
  line-height: 1;
  color: var(--muted);
}

.ghost-button:focus-visible,
.modal-close:focus-visible,
.income-trend-btn:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(11, 107, 113, 0.28);
  outline-offset: 2px;
}

.detail-list {
  display: grid;
  gap: 0.7rem;
}

.audit-explainer {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem 0.95rem;
  background: rgba(248, 250, 249, 0.94);
  color: var(--muted);
  line-height: 1.55;
}

.audit-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.audit-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.9rem;
  background: linear-gradient(180deg, rgba(250, 252, 251, 0.98) 0%, rgba(245, 248, 246, 0.94) 100%);
}

.audit-card-value {
  margin: 0.35rem 0 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.audit-card-copy {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.audit-details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(251, 252, 251, 0.94);
  padding: 0.1rem 0.2rem;
}

.audit-details summary {
  cursor: pointer;
  list-style: none;
  padding: 0.9rem 0.95rem;
  font-weight: 800;
}

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

.audit-details[open] summary {
  border-bottom: 1px solid rgba(223, 228, 224, 0.9);
}

.audit-details .detail-list {
  padding: 0.85rem 0.75rem 0.75rem;
}

.detail-row {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.85rem;
  background: linear-gradient(180deg, rgba(250, 252, 251, 0.96) 0%, rgba(245, 248, 246, 0.92) 100%);
}

.detail-value {
  margin: 0.35rem 0 0;
  line-height: 1.5;
}

.chart-wrap {
  min-height: 240px;
}

.mobility-wrap {
  display: grid;
  gap: 1rem;
}

.income-wrap {
  display: grid;
  gap: 1rem;
}

.campaign-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(180px, 0.75fr);
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.campaign-wrap {
  display: grid;
  gap: 1rem;
}

.procurement-wrap {
  display: grid;
  gap: 1rem;
}

.procurement-note {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.9rem;
  background: rgba(248, 250, 249, 0.92);
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .audit-highlight-grid {
    grid-template-columns: 1fr;
  }
}

.procurement-summary-grid,
.procurement-focus-grid {
  display: grid;
  gap: 0.75rem;
}

.procurement-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.procurement-focus-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.procurement-card,
.procurement-stat,
.procurement-highlight-card,
.procurement-year-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(250, 252, 251, 0.97) 0%, rgba(244, 247, 245, 0.93) 100%);
}

.procurement-stat {
  padding: 0.9rem;
}

.procurement-stat-value {
  margin: 0.38rem 0 0;
  font-size: 1.24rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.procurement-stat-copy {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.9rem;
}

.procurement-card {
  padding: 0.95rem;
  display: grid;
  gap: 0.9rem;
}

.procurement-card-focus {
  background:
    radial-gradient(circle at top right, rgba(221, 154, 44, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(253, 251, 246, 0.98) 0%, rgba(247, 244, 235, 0.94) 100%);
  border-color: rgba(219, 194, 147, 0.92);
}

.procurement-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.procurement-section-copy {
  margin: 0.3rem 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.9rem;
}

.procurement-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.procurement-highlight-list {
  display: grid;
  gap: 0.75rem;
}

.procurement-highlight-card {
  padding: 0.9rem;
  box-shadow: 0 12px 22px rgba(22, 35, 32, 0.04);
}

.procurement-highlight-card.is-media {
  border-color: rgba(221, 154, 44, 0.55);
  box-shadow: 0 14px 28px rgba(134, 94, 18, 0.09);
}

.procurement-highlight-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.procurement-highlight-title {
  margin: 0.18rem 0 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.procurement-highlight-meta,
.procurement-highlight-copy,
.procurement-year-copy,
.procurement-table-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.9rem;
}

.procurement-highlight-copy {
  margin-top: 0.55rem;
}

.procurement-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.procurement-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 30px;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(204, 214, 208, 0.9);
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
}

.procurement-pill-source {
  color: var(--accent);
  background: rgba(216, 236, 233, 0.94);
  border-color: #b9d8d3;
}

.procurement-pill-media {
  color: #855611;
  background: rgba(248, 235, 211, 0.96);
  border-color: #e2c697;
}

.procurement-pill-strong {
  color: #7f4030;
  background: rgba(248, 223, 215, 0.96);
  border-color: #e3b9ab;
}

.procurement-history-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.procurement-year-card {
  padding: 0.8rem 0.85rem;
}

.procurement-year-value {
  margin: 0.28rem 0 0;
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.procurement-table-wrap {
  overflow: auto;
  border: 1px solid rgba(215, 221, 212, 0.92);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
}

.procurement-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
}

.procurement-table th,
.procurement-table td {
  padding: 0.75rem 0.8rem;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid rgba(223, 228, 224, 0.9);
}

.procurement-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-top: 0;
  background: rgba(243, 247, 245, 0.98);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.procurement-table tbody tr.is-media {
  background: rgba(252, 248, 239, 0.62);
}

.procurement-table tbody tr:hover {
  background: rgba(240, 246, 243, 0.86);
}

.procurement-code {
  margin: 0;
  font-weight: 800;
}

.procurement-subcopy {
  margin: 0.25rem 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.88rem;
}

.procurement-amount {
  font-weight: 800;
  white-space: nowrap;
}

.procurement-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.procurement-link:hover {
  text-decoration: underline;
}

.campaign-note {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.85rem;
  background: rgba(248, 250, 249, 0.92);
  color: var(--muted);
  line-height: 1.5;
}

.campaign-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 0.9rem;
}

.campaign-stack {
  display: grid;
  gap: 0.8rem;
}

.campaign-card,
.campaign-budget,
.campaign-summary-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem;
  background: linear-gradient(180deg, rgba(250, 252, 251, 0.97) 0%, rgba(244, 247, 245, 0.93) 100%);
}

.campaign-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.campaign-summary-value {
  margin: 0.38rem 0 0;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.campaign-list {
  display: grid;
  gap: 0.8rem;
}

.campaign-rank-card {
  border: 1px solid rgba(211, 220, 214, 0.96);
  border-radius: 16px;
  padding: 0.9rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(245,248,246,0.96) 100%);
  box-shadow: 0 12px 22px rgba(22, 35, 32, 0.04);
}

.campaign-rank-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.9rem;
}

.campaign-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  border-radius: 999px;
  background: rgba(12, 102, 97, 0.1);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.92rem;
}

.campaign-rank-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.campaign-rank-score {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.campaign-channel {
  display: inline-flex;
  align-items: center;
  margin-top: 0.4rem;
  padding: 0.35rem 0.62rem;
  border-radius: 999px;
  background: rgba(216, 236, 233, 0.92);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.campaign-reason {
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.52;
}

.campaign-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.campaign-budget-table {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.campaign-budget-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(215, 221, 212, 0.9);
}

.campaign-budget-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.campaign-budget-share,
.campaign-budget-amount {
  font-weight: 700;
}

.campaign-empty {
  margin: 0;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.income-note {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.85rem;
  background: rgba(248, 250, 249, 0.92);
  color: var(--muted);
  line-height: 1.5;
}

.income-tooltip-target {
  border-bottom: 1px dashed var(--line-strong);
  font-weight: 700;
  cursor: help;
}

.income-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.income-group {
  display: grid;
  gap: 0.55rem;
}

.income-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(248, 250, 249, 0.92);
  overflow: hidden;
}

.income-block[open] {
  background: rgba(248, 250, 249, 0.96);
}

.income-block-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.income-block-summary::-webkit-details-marker {
  display: none;
}

.income-block-summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.income-block[open] .income-block-summary::after {
  content: "−";
}

.income-block-copy {
  margin: 0.28rem 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.9rem;
}

.income-block .income-grid {
  padding: 0 0.85rem 0.85rem;
}

.income-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  background: rgba(248, 250, 249, 0.92);
  display: grid;
  gap: 0.4rem;
}

.income-trend-btn {
  margin-top: 0.2rem;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  font-weight: 700;
  cursor: pointer;
}

.income-trend-btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.96);
}

.income-trend-btn.is-active {
  border-color: #8fc2bb;
  background: rgba(216, 236, 233, 0.94);
  color: var(--accent);
}

.income-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.income-value {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.income-rank {
  margin: 0.12rem 0 0;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #6e7e77;
}

.income-meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.9rem;
}

.income-status {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.income-status-ok {
  color: var(--accent);
}

.income-status-warning {
  color: #915b16;
}

.income-status-muted {
  color: var(--muted);
}

.income-trend-section {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  background: rgba(248, 250, 249, 0.92);
}

.income-trend-title {
  margin: 0.35rem 0 0.5rem;
}

.income-trend-svg {
  height: 260px;
}

.income-trend-point {
  cursor: pointer;
}

.income-trend-point:focus-visible {
  outline: none;
  stroke: #ffd37a;
  stroke-width: 3;
}

.income-trend-tooltip {
  position: absolute;
  transform: translate(-50%, -100%);
  z-index: 5;
  max-width: min(340px, calc(100% - 1.2rem));
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  background: rgba(16, 43, 41, 0.95);
  color: #f3fbf9;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(16, 36, 33, 0.25);
  border: 1px solid rgba(188, 220, 214, 0.28);
}

.mobility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.mobility-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  background: linear-gradient(180deg, rgba(250, 252, 251, 0.96) 0%, rgba(245, 248, 246, 0.92) 100%);
}

.mobility-value {
  margin: 0.3rem 0 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.mobility-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.mobility-section {
  display: grid;
  gap: 0.55rem;
}

.mobility-list {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.85rem;
  background: rgba(248, 250, 249, 0.92);
}

.mobility-list p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.chart-svg {
  width: 100%;
  height: 240px;
  display: block;
}

.chart-axis,
.chart-gridline {
  stroke: #d9e3e0;
  stroke-width: 1;
}

.chart-gridline {
  stroke-dasharray: 3 5;
}

.chart-line-primary {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
}

.chart-point {
  stroke: white;
  stroke-width: 2;
}

.chart-caption {
  margin-top: 0.7rem;
  display: flex;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.chart-key {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.chart-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.chart-dot-primary {
  background: var(--accent);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 25, 24, 0.42);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: min(82vh, 760px);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.975);
  box-shadow: 0 34px 80px rgba(13, 26, 24, 0.26);
}

.modal-dialog-chart {
  width: min(820px, 100%);
}

.modal-dialog-campaign {
  width: min(980px, 100%);
}

.modal-dialog-procurement {
  width: min(1260px, 100%);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.05rem 1.05rem 0.95rem;
  border-bottom: 1px solid rgba(219, 226, 221, 0.95);
  background:
    radial-gradient(circle at top left, rgba(12, 102, 97, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(249, 251, 250, 0.97) 0%, rgba(244, 247, 245, 0.91) 100%);
}

.modal-body {
  padding: 1.05rem;
  overflow: auto;
}

.leaflet-container {
  font: inherit;
}

.leaflet-interactive {
  transition: fill-opacity 140ms ease, opacity 140ms ease, stroke 140ms ease, stroke-width 140ms ease;
}

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

.leaflet-control-attribution a {
  color: var(--accent);
}

.leaflet-popup-content-wrapper {
  border-radius: 18px;
  border: 1px solid rgba(215, 223, 217, 0.94);
  background:
    radial-gradient(circle at top left, rgba(124, 194, 191, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 248, 246, 0.96) 100%);
  box-shadow: 0 18px 32px rgba(22, 35, 32, 0.1);
}

.leaflet-popup-tip {
  background: rgba(248, 250, 248, 0.98);
}

.leaflet-popup-content {
  margin: 0.85rem 0.9rem;
  font-family: "Manrope", sans-serif;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.8rem;
  background:
    radial-gradient(circle at top left, rgba(151, 223, 217, 0.18), transparent 30%),
    linear-gradient(135deg, #103a39 0%, #0c5450 52%, #0c6661 100%);
  color: #f7fffd;
  text-align: center;
  padding: 1.5rem;
  transition: opacity 700ms ease, visibility 700ms ease, transform 700ms ease, filter 700ms ease;
}

body.app-ready .splash-screen {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.03);
  filter: blur(10px);
}

.splash-mark {
  width: 56px;
  height: 70px;
  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 18px 32px rgba(6, 31, 31, 0.22);
}

.splash-mark::after {
  content: "";
  position: absolute;
  inset: 13px 18px auto auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.46);
}

.splash-kicker,
.splash-title,
.splash-copy {
  margin: 0;
}

.splash-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(230, 255, 250, 0.82);
}

.splash-title {
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.splash-copy {
  max-width: 30rem;
  color: rgba(234, 252, 248, 0.84);
  line-height: 1.5;
}

.popup-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 800;
}

.popup-copy {
  margin: 0;
  line-height: 1.45;
}

.popup-metric {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.18rem 0 0.55rem;
  padding: 0.32rem 0.58rem;
  border-radius: 999px;
  background: rgba(216, 236, 233, 0.94);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.popup-list {
  display: grid;
  gap: 0.28rem;
}

.popup-status {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.86rem;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.app-ready .controls-hero {
  animation: riseIn 520ms ease both;
}

body.app-ready .field-grid {
  animation: riseIn 620ms ease both;
}

body.app-ready .note-stack {
  animation: riseIn 670ms ease both;
}

body.app-ready .summary-block {
  animation: riseIn 700ms ease both;
}

body.app-ready .map-panel {
  animation: riseIn 640ms ease both;
}

@media (max-width: 1180px) {
  body {
    overflow: auto;
  }

  .shell {
    height: auto;
    min-height: calc(100vh - 2rem);
  }

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

  .map-panel {
    order: 1;
    min-height: 620px;
  }

  .controls {
    order: 2;
    overflow: visible;
  }

  .controls-hero {
    grid-template-columns: 1fr;
  }

  .controls-intro {
    max-width: none;
  }
}

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

  .brand-bar,
  .panel,
  .modal-head,
  .modal-body {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .brand-bar,
  .modal-head {
    flex-direction: column;
  }

  .brand-bar {
    gap: 0.75rem;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
  }

  .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-kicker {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
  }

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

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

  .brand-subtitle {
    display: none;
  }

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

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

  .brand-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 0.72rem 0.9rem;
    border: 1px solid rgba(222, 245, 240, 0.36);
    border-radius: 15px;
    background:
      linear-gradient(180deg, rgba(246, 253, 251, 0.18) 0%, rgba(233, 249, 246, 0.12) 100%);
    color: #f4fffc;
    font-weight: 800;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

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

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

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

  .brand-button {
    width: 100%;
    min-height: 40px;
    padding: 0.62rem 0.82rem;
    font-size: 0.92rem;
  }

  .brand-copy,
  .brand-meta {
    width: 100%;
  }

  .field-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

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

  .controls-hero {
    padding: 0.88rem 0.92rem;
  }

  .controls-hero-head {
    grid-template-columns: 1fr;
  }

  .controls-hero h2 {
    font-size: 1.16rem;
  }

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

  .campaign-controls,
  .campaign-grid,
  .campaign-summary-grid,
  .procurement-summary-grid,
  .procurement-focus-grid,
  .procurement-history-grid,
  .procurement-mini-grid {
    grid-template-columns: 1fr;
  }

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

  .map-panel {
    min-height: 460px;
  }

  .legend {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .legend-label {
    min-width: 0;
  }

  .legend-values {
    width: 100%;
  }

  .legend-note {
    text-align: left;
  }

  .modal {
    padding: 0.75rem;
  }

  .modal-dialog {
    max-height: calc(100vh - 1.5rem);
  }
}
