/* AquaState country sheet — daylight survey. */
body.world-body.country-body { background: var(--sheet-ground); color: var(--sheet-ink); }
body.world-body.country-body .world-main { color: var(--sheet-ink); }
.country-body .world-main { padding-top: 30px; }
.country-body .world-footer { color: var(--sheet-muted); border-top-color: var(--sheet-rule); }
.country-head { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .55fr); gap: 30px; align-items: start; margin-bottom: 22px; }
.crumb { display: flex; gap: 8px; flex-wrap: wrap; color: var(--sheet-muted); font-size: 13px; margin: 0 0 12px; }
.crumb a { color: var(--sheet-accent); text-decoration: none; }
.crumb span { color: var(--t-faint); }
.country-head h1 { margin: 0; font-size: clamp(34px, 4vw, 54px); line-height: 1.02; letter-spacing: -.045em; font-weight: 500; }
.country-head h1 span { color: var(--sheet-muted); font-weight: 400; }
.country-question { margin: 12px 0 0; color: var(--sheet-muted); font-size: 15px; }
.country-meta { margin: 8px 0 0; color: var(--sheet-muted); font-size: 13px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.btn-light {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 34px; padding: 0 13px; border-radius: 6px;
  background: var(--t-solid-bg); color: var(--t-solid-ink); border: 1px solid var(--t-solid-bg);
  font-size: 12px; text-decoration: none; cursor: pointer;
}
.btn-light:hover { background: var(--t-solid-hover); }
.btn-light.ghost { background: transparent; color: var(--t-text); border-color: var(--t-border-strong); }
.btn-light.ghost:hover { background: var(--t-ov2); }
.country-score-card {
  background: var(--sheet-surface); border: 1px solid var(--sheet-rule); border-radius: 12px;
  padding: 18px 20px;
}
.card-caption { color: var(--sheet-muted); font-size: 12px; letter-spacing: normal; }
.country-score { font-size: 58px; line-height: 1; letter-spacing: -.05em; margin: 8px 0 8px; font-variant-numeric: tabular-nums; }
.country-score small { font-size: 14px; color: var(--sheet-muted); letter-spacing: 0; margin-left: 4px; }
.status-pill { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.status-pill.status-resilient { background: #dcfae5; color: #07502a; }
.status-pill.status-stable { background: #dff1f0; color: #0d4e4a; }
.status-pill.status-watch { background: #fffbeb; color: #713f12; }
.status-pill.status-stressed { background: #fff1e7; color: #83310b; }
.status-pill.status-critical { background: #ffedea; color: #831c1e; }
.status-pill.status-no_data { background: #ebedee; color: #353736; }
.score-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 18px 0 0; }
.score-facts div { border-top: 1px solid var(--sheet-rule); padding-top: 7px; }
.score-facts dt { color: var(--sheet-muted); font-size: 12px; letter-spacing: normal; }
.score-facts dd { margin: 2px 0 0; font-size: 13px; font-variant-numeric: tabular-nums; }

.country-hazards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.ch-card { background: var(--sheet-surface); border: 1px solid var(--sheet-rule); border-radius: 10px; padding: 14px; }
.ch-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ch-top > span:first-child { font-size: 12px; font-weight: 600; }
.arabic { color: var(--sheet-muted); font-size: 12px; }
.ch-value { font-size: 28px; letter-spacing: -.04em; margin: 9px 0 6px; font-variant-numeric: tabular-nums; }
.ch-value span { font-size: 12px; color: var(--sheet-muted); letter-spacing: 0; margin-left: 3px; }
.ch-bar { height: 5px; background: var(--t-track); border-radius: 3px; overflow: hidden; }
.ch-bar span { display: block; height: 100%; background: linear-gradient(90deg, #1e7b4f, #8a5a0a 55%, #c4242a); border-radius: 3px; }
.ch-card p { color: var(--sheet-muted); font-size: 12px; margin: 9px 0 10px; min-height: 28px; }
.ch-foot { display: flex; justify-content: space-between; gap: 8px; color: var(--sheet-muted); font-size: 12px; border-top: 1px solid var(--sheet-rule); padding-top: 7px; }
.ch-foot span:first-child { max-width: 66%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.country-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .7fr); gap: 18px; align-items: start; }
.country-main, .country-rail { display: flex; flex-direction: column; gap: 18px; }
.light-panel { background: var(--sheet-surface); border: 1px solid var(--sheet-rule); border-radius: 10px; padding: 18px; }
.light-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 12px; }
.light-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.light-head p { margin: 4px 0 0; color: var(--sheet-muted); font-size: 13px; max-width: 560px; }
.text-link { color: var(--sheet-accent); text-decoration: none; font-size: 13px; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.map-light-panel { padding-bottom: 12px; }
.light-legend { display: flex; flex-wrap: wrap; gap: 10px; color: var(--sheet-muted); font-size: 12px; align-items: center; }
.swatch { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 3px; }
.swatch-dam { background: #1b6c80; }
.swatch-inventory { background: #c98a2e; }
.swatch-event { background: #c4242a; }
.country-map { height: 340px; border-radius: 7px; background: var(--t-map-bg); border: 1px solid var(--t-border); }
.country-map .leaflet-container { background: var(--t-map-bg); }
.map-light-note { color: var(--sheet-muted); font-size: 12px; margin: 8px 0 0; }
.table-wrap-light { overflow-x: auto; }
.light-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.light-table th { text-align: left; font-weight: 500; color: var(--sheet-muted); font-size: 12px; letter-spacing: normal; padding: 0 8px 7px; border-bottom: 1px solid var(--sheet-rule); }
.light-table td { padding: 8px; border-bottom: 1px solid var(--t-rule); vertical-align: top; }
.light-table tr:last-child td { border-bottom: 0; }
.light-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dam-name { color: var(--sheet-ink); text-decoration: none; font-weight: 500; }
.dam-name:hover { color: var(--sheet-accent); }
.row-sub { display: block; color: var(--sheet-muted); font-size: 12px; margin-top: 2px; }
.pill-live, .pill-ref { display: inline-block; padding: 2px 6px; border-radius: 999px; font-size: 12px; }
.pill-live { background: #dcfae5; color: #07502a; }
.pill-ref { background: var(--t-ov2); color: var(--t-muted); }
.empty-light { color: var(--sheet-muted); font-size: 12px; padding: 12px 0; }
.climate-chart { height: 190px; width: 100%; }
.climate-chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-note { color: var(--sheet-muted); font-size: 12px; white-space: nowrap; }
.chart-foot { display: flex; justify-content: space-between; gap: 14px; border-top: 1px solid var(--sheet-rule); padding-top: 8px; color: var(--sheet-muted); font-size: 12px; }
.cascade-light-steps { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.cascade-light-steps > div { flex: 1; min-width: 0; border-left: 2px solid var(--t-border); padding-left: 9px; }
.cascade-light-steps > div span { display: block; color: var(--sheet-accent); font-size: 12px; margin-bottom: 5px; }
.cascade-light-steps strong { display: block; font-size: 13px; font-weight: 600; }
.cascade-light-steps small { display: block; color: var(--sheet-muted); font-size: 12px; margin-top: 2px; }
.cascade-light-steps > span { color: var(--t-faint); font-size: 14px; }
.pillar-list { display: flex; flex-direction: column; gap: 11px; }
.pillar-row { border-bottom: 1px solid var(--t-rule); padding-bottom: 9px; }
.pillar-row:last-child { border-bottom: 0; }
.pillar-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: baseline; }
.pillar-name { font-size: 13px; }
.pillar-value { font-size: 12px; font-variant-numeric: tabular-nums; }
.pillar-weight { color: var(--sheet-muted); font-size: 12px; }
.pillar-bar { height: 4px; background: var(--t-track); border-radius: 2px; overflow: hidden; margin-top: 5px; }
.pillar-bar span { display: block; height: 100%; border-radius: 2px; }
.pillar-foot { display: flex; justify-content: space-between; color: var(--sheet-muted); font-size: 12px; margin-top: 4px; }
.pillar-detail { margin-top: 5px; }
.pillar-detail summary { color: var(--sheet-accent); font-size: 12px; cursor: pointer; }
.pillar-detail p { color: var(--sheet-muted); font-size: 12px; margin: 4px 0 0; }
.formula-note { color: var(--sheet-muted); font-size: 12px; border-top: 1px solid var(--sheet-rule); padding-top: 9px; margin: 12px 0 0; }
.water-score { display: flex; align-items: baseline; gap: 7px; margin-top: 2px; }
.water-score strong { font-size: 38px; letter-spacing: -.04em; font-weight: 500; }
.water-score span { color: var(--sheet-muted); font-size: 12px; }
.water-verdict { margin: 0 0 10px; color: var(--t-link); font-size: 13px; font-weight: 600; }
.water-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.water-facts div { border-top: 1px solid var(--sheet-rule); padding-top: 6px; }
.water-facts dt { color: var(--sheet-muted); font-size: 12px; letter-spacing: normal; }
.water-facts dd { margin: 2px 0 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.confidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.confidence-grid div { border-top: 1px solid var(--sheet-rule); padding-top: 7px; }
.confidence-grid span { display: block; color: var(--sheet-muted); font-size: 12px; letter-spacing: normal; }
.confidence-grid strong { display: block; font-size: 13px; margin-top: 2px; }
.source-small { color: var(--sheet-muted); font-size: 12px; margin: 10px 0 0; }
.event-list-light { display: flex; flex-direction: column; }
.event-row-light { display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; gap: 7px; align-items: start; padding: 6px 0; border-bottom: 1px solid var(--t-rule); font-size: 12px; }
.event-row-light:last-child { border-bottom: 0; }
.event-row-light small { color: var(--sheet-muted); font-size: 12px; }
.event-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 4px; }
.event-drought { background: #e5a23b; }
.event-floods { background: #5ba7e8; }
.event-wildfires { background: #ef6f72; }
.event-dustHaze { background: #b18a5c; }
.event-tempExtremes { background: #c084fc; }

@media (max-width: 1120px) {
  .country-head { grid-template-columns: 1fr; }
  .country-grid { grid-template-columns: 1fr; }
  .country-rail { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .country-hazards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .country-hazards, .country-rail { grid-template-columns: 1fr; }
  .country-map { height: 280px; }
  .country-score { font-size: 48px; }
  .cascade-light-steps { flex-wrap: wrap; }
  .cascade-light-steps > div { flex-basis: 40%; }
  .cascade-light-steps > span { display: none; }
  .chart-foot { flex-direction: column; gap: 4px; }
}
