:root {
  --bg: #edf4f8;
  --panel: #ffffff;
  --panel-soft: #f7fafc;
  --line: #d9e5ee;
  --text: #1f2d3d;
  --muted: #607284;
  --brand: #1f6aa5;
  --brand-dark: #0f4d7a;
  --shadow: 0 10px 30px rgba(18, 45, 74, 0.08);
  --radius: 20px;
}

body {
  background: linear-gradient(180deg, #f4f8fb 0%, #e8f0f6 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
  min-height: 100vh;
}

.page-wrap {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

.surface-card {
  background: var(--panel);
  border: 1px solid rgba(217, 229, 238, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.surface-subcard {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.hero-card {
  background: linear-gradient(135deg, #0f4d7a 0%, #1f6aa5 55%, #5aa0ce 100%);
  border: none;
  color: white;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  opacity: 0.9;
  margin-bottom: 0.4rem;
}

.hero-title {
  font-size: clamp(1.8rem, 2.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1rem;
  opacity: 0.92;
  max-width: 850px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  align-items: center;
}

.hero-badge {
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  font-weight: 600;
}

.panel-title {
  font-weight: 750;
  color: var(--text);
}

.panel-kicker {
  color: var(--muted);
  font-size: 0.92rem;
}

.section-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.small-label {
  margin-bottom: 0.75rem;
}

.control-input,
.control-dropdown .Select-control,
.control-dropdown .css-13cymwt-control,
.control-dropdown .css-t3ipsp-control {
  border-radius: 14px !important;
}

.control-button {
  border-radius: 12px;
  font-weight: 700;
  padding: 0.55rem 0.95rem;
}

.info-banner,
.app-alert {
  border-radius: 14px;
  border: none;
}

.map-shell {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #dde9f1;
  margin-top: 0.9rem;
}

.map-graph,
.map-graph .js-plotly-plot,
.map-graph .plot-container,
.map-graph .svg-container {
  border-radius: 18px;
}

.slider-wrap {
  margin-top: 1rem;
  padding: 0.9rem 0.25rem 0.1rem;
}

.subcard-header {
  background: transparent;
  border-bottom: 1px solid var(--line);
  font-weight: 750;
}

.summary-body {
  color: var(--text);
  line-height: 1.55;
}

.table-card .dash-table-container .dash-spreadsheet-container {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.js-plotly-plot .plotly .modebar {
  background: rgba(255, 255, 255, 0.75) !important;
  border-radius: 10px;
}

.ask-atlas-drawer .offcanvas-header {
  background: linear-gradient(135deg, #123b4d 0%, #175a6b 58%, #2b7b7f 100%);
  color: white;
  border-bottom: none;
  box-shadow: 0 14px 30px rgba(11, 46, 61, 0.18);
}

.ask-atlas-drawer .offcanvas-title {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.ask-atlas-drawer .btn-close {
  filter: invert(1) grayscale(100%);
  opacity: 0.92;
}

.ask-atlas-drawer .offcanvas-body {
  background: linear-gradient(180deg, #edf4f8 0%, #f7fafc 35%, #eef3f7 100%);
}

.ask-atlas-shell {
  padding-bottom: 0.35rem;
}

.ask-atlas-intro-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(18, 59, 77, 0.06) 0%, rgba(90, 160, 206, 0.12) 54%, rgba(43, 123, 127, 0.12) 100%);
  border: 1px solid rgba(18, 59, 77, 0.1);
  box-shadow: 0 10px 26px rgba(15, 43, 62, 0.07);
}

.ask-atlas-intro-card::after {
  content: "";
  position: absolute;
  top: -72px;
  right: -58px;
  width: 190px;
  height: 190px;
  background: radial-gradient(circle at center, rgba(31, 106, 165, 0.2), rgba(31, 106, 165, 0) 70%);
  pointer-events: none;
}

.ask-atlas-intro-card .card-body {
  position: relative;
  z-index: 1;
}

.ask-atlas-intro-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: #5f8091;
  margin-bottom: 0.38rem;
}

.ask-atlas-intro-title {
  font-size: 1rem;
  font-weight: 800;
  color: #10384d;
  margin-bottom: 0.45rem;
}

.ask-atlas-intro-card .card-body > div:last-child {
  color: #516879;
  line-height: 1.6;
}

.ask-atlas-textarea {
  padding: 0.92rem 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcfe 100%);
  box-shadow: inset 0 1px 2px rgba(15, 43, 62, 0.05), 0 8px 24px rgba(15, 43, 62, 0.05);
}

.ask-atlas-textarea:focus {
  outline: none;
  border-color: #7fb9cf !important;
  box-shadow: 0 0 0 0.2rem rgba(31, 106, 165, 0.12), 0 12px 30px rgba(15, 43, 62, 0.08);
}

.ask-atlas-actions {
  align-items: center;
}

.ask-atlas-output-shell {
  min-height: 220px;
  padding: 0.45rem;
  background: linear-gradient(180deg, #f8fbfd 0%, #edf5fa 100%);
  border: 1px solid #dbe7ef;
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.ask-atlas-empty-state {
  min-height: 188px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.15rem 1.2rem;
  border-radius: 16px;
  border: 1px dashed #c0d7e3;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(235, 244, 249, 0.96));
}

.ask-atlas-empty-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: #638093;
}

.ask-atlas-empty-title {
  font-size: 1.06rem;
  font-weight: 800;
  color: #10384d;
}

.ask-atlas-empty-note {
  color: #607284;
  line-height: 1.55;
  max-width: 42rem;
}

.ask-atlas-result {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  animation: atlas-rise 0.22s ease-out;
}

.ask-atlas-hero {
  position: relative;
  overflow: hidden;
  padding: 1rem 1.08rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f4d7a 0%, #1d6d87 56%, #2f8f83 100%);
  color: white;
  box-shadow: 0 18px 36px rgba(14, 63, 88, 0.22);
}

.ask-atlas-hero::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -76px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.18), transparent 72%);
  pointer-events: none;
}

.ask-atlas-hero--warning {
  background: linear-gradient(135deg, #7f3b19 0%, #a85a1d 54%, #c2792d 100%);
}

.ask-atlas-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.74);
  margin-bottom: 0.32rem;
}

.ask-atlas-hero-title {
  font-size: 1.14rem;
  font-weight: 800;
  line-height: 1.2;
  max-width: 34rem;
}

.ask-atlas-hero-note {
  margin-top: 0.28rem;
  font-size: 0.93rem;
  color: rgba(255, 255, 255, 0.86);
  max-width: 38rem;
}

.ask-atlas-metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.82rem;
}

.ask-atlas-metric {
  min-width: 112px;
  padding: 0.54rem 0.72rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.ask-atlas-metric-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.72);
}

.ask-atlas-metric-value {
  margin-top: 0.14rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
}

.ask-atlas-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f9fcfe 100%);
  border: 1px solid #dbe7ef;
  border-radius: 18px;
  padding: 1rem 1.05rem;
  box-shadow: 0 10px 24px rgba(15, 43, 62, 0.06);
}

.ask-atlas-section-header {
  margin-bottom: 0.8rem;
}

.ask-atlas-section-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 800;
  color: #618094;
  margin-bottom: 0.26rem;
}

.ask-atlas-section-title {
  font-size: 1rem;
  font-weight: 800;
  color: #10384d;
}

.ask-atlas-section-note {
  margin-top: 0.24rem;
  font-size: 0.9rem;
  color: #607284;
  line-height: 1.55;
  max-width: 46rem;
}

.ask-atlas-markdown {
  color: var(--text);
}

.ask-atlas-markdown p,
.ask-atlas-markdown li {
  line-height: 1.72;
}

.ask-atlas-markdown p:last-child {
  margin-bottom: 0;
}

.ask-atlas-markdown ul,
.ask-atlas-markdown ol {
  margin-bottom: 0.8rem;
  padding-left: 1.2rem;
}

.ask-atlas-markdown code {
  background: #edf5fa;
  padding: 0.12rem 0.35rem;
  border-radius: 0.48rem;
}

.ask-atlas-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ask-atlas-chip {
  min-width: 140px;
  padding: 0.72rem 0.82rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #f1f8fb 0%, #e5f1f7 100%);
  border: 1px solid #cfe1eb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ask-atlas-chip-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 800;
  color: #678095;
  margin-bottom: 0.18rem;
}

.ask-atlas-chip-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #10384d;
  word-break: break-word;
}

.ask-atlas-preview-panel .dash-table-container .dash-spreadsheet-container {
  border: 1px solid #dbe7ef;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

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

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

@media (max-width: 991px) {
  .page-wrap {
    padding: 14px;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .ask-atlas-drawer {
    height: 72vh !important;
  }

  .ask-atlas-metric {
    min-width: 0;
    flex: 1 1 120px;
  }
}
