:root {
  --page-bg: #f2ece2;
  --panel-bg: rgba(255, 251, 245, 0.82);
  --panel-border: rgba(77, 67, 54, 0.16);
  --text-main: #1f1c18;
  --text-muted: #5f564a;
  --accent: #7a5c43;
  --accent-soft: #d8c4ae;
  --accent-deep: #3e3428;
  --ocean: #ded9cf;
  --shadow: 0 18px 45px rgba(58, 46, 32, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(163, 134, 108, 0.16), transparent 28%),
    linear-gradient(180deg, #f7f2ea 0%, var(--page-bg) 46%, #ebe1d3 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.hero {
  padding: 2rem 0 1.5rem;
}

.hero__eyebrow,
.panel__kicker,
.metric-card__label,
.detail-stats__label,
.detail-block__label,
.summary-hint {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.hero h1,
.panel h2 {
  margin: 0;
  font-family: "Baskerville Old Face", "Garamond", "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.95;
  margin-top: 0.5rem;
}

.hero__subtitle {
  max-width: 46rem;
  margin: 1rem 0 0;
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero__supporting {
  max-width: 42rem;
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.dashboard {
  display: grid;
  gap: 1.25rem;
}

.dashboard__grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 1.25rem;
}

.panel {
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.35rem;
}

.panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.panel__header--stack {
  align-items: flex-end;
}

.panel__note {
  margin: 0;
  max-width: 20rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: right;
}

.button {
  border: 1px solid rgba(79, 61, 44, 0.25);
  background: linear-gradient(180deg, #f8f1e8 0%, #ecdfd0 100%);
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 0.72rem 1.05rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(72, 54, 36, 0.12);
  outline: none;
}

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

.metric-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(83, 68, 50, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem;
  min-height: 9.5rem;
}

.metric-card__value {
  margin: 0.35rem 0;
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  font-weight: 600;
  line-height: 1;
}

.metric-card__value--risk,
.metric-card__value--small {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1.1;
}

.metric-card__meta,
.detail-note,
.methodology-copy p,
.footer p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.metric-card--advisory {
  background: linear-gradient(180deg, rgba(243, 234, 223, 0.92) 0%, rgba(236, 225, 210, 0.88) 100%);
}

.metric-card__statement {
  margin: 0.55rem 0 0;
  font-size: 1.02rem;
  line-height: 1.7;
}

.map-and-list {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.map-wrap {
  overflow: hidden;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 30% 20%, rgba(122, 92, 67, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(242, 236, 226, 0.78) 0%, rgba(225, 216, 202, 0.62) 100%);
  border: 1px solid rgba(73, 61, 48, 0.08);
}

.globe-stage {
  display: block;
  width: 100%;
  height: 500px;
  min-height: 300px;
  position: relative;
  background-color: #050505;
  border-radius: 8px;
  overflow: hidden;
}

.globe-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.globe-stage::after {
  content: "Rotatable monitoring instrument. Scroll or pinch to inspect hemispheric conditions.";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.72);
  border: 1px solid rgba(73, 61, 48, 0.08);
  color: var(--text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
  text-align: center;
  pointer-events: none;
}

.region-legend {
  display: grid;
  gap: 0.65rem;
}

.legend-item {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.72rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(72, 61, 48, 0.08);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.legend-item.is-active {
  background: rgba(236, 225, 211, 0.95);
  border-color: rgba(82, 64, 45, 0.2);
}

.legend-swatch {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
}

.legend-name,
.legend-value {
  margin: 0;
  font-size: 0.92rem;
}

.legend-name small {
  display: block;
  margin-top: 0.15rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.detail-card {
  display: grid;
  gap: 1rem;
}

.detail-card__region {
  margin: 0;
  font-family: "Baskerville Old Face", "Garamond", "Times New Roman", serif;
  font-size: 2.2rem;
  line-height: 1;
}

.detail-card__hotspot {
  margin: -0.4rem 0 0;
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

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

.detail-stats__value {
  margin: 0.3rem 0 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.detail-block {
  padding-top: 0.2rem;
  border-top: 1px solid rgba(79, 65, 50, 0.1);
}

.detail-list {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.8;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: end;
  min-height: 18rem;
}

.timeline-bar {
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  gap: 0.45rem;
  min-height: 100%;
}

.timeline-bar__column {
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, rgba(122, 92, 67, 0.95) 0%, rgba(170, 141, 117, 0.72) 100%);
  min-height: 1.2rem;
  transition: transform var(--transition), opacity var(--transition);
}

.timeline-bar__column.is-peak {
  background: linear-gradient(180deg, rgba(80, 54, 32, 0.98) 0%, rgba(134, 99, 71, 0.8) 100%);
}

.timeline-bar:hover .timeline-bar__column {
  transform: translateY(-2px);
}

.timeline-bar__value,
.timeline-bar__label {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

details {
  width: 100%;
}

summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

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

.methodology-copy {
  margin-top: 1rem;
  display: grid;
  gap: 0.85rem;
}

.footer {
  padding: 1.2rem 0 0.25rem;
}

@media (max-width: 1024px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard__grid,
  .map-and-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 1rem, 1200px);
    padding-top: 1rem;
  }

  .hero {
    padding-top: 1rem;
  }

  .panel {
    padding: 1rem;
  }

  .panel__header,
  .panel__header--stack {
    flex-direction: column;
    align-items: stretch;
  }

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

  .timeline {
    gap: 0.3rem;
    min-height: 14rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .timeline-bar {
    min-width: 2rem;
  }

  .globe-stage {
    height: 420px;
  }
}
