/* El Niño outlook (el-nino.njk). Matches the resort pages: faded sky gradient
   behind white cards (1px gray-200 border, 8px radius, shadow-md, sky glow on
   hover), Brandon Grotesque headings, sky→blue gradient for the active pill.
   Diverging scale: blue = snowier, red = drier, gray midpoint; steps validated
   as ordinal ramps against the light surface. */

/* generic-page.njk paints the body a solid blue gradient; this page uses the
   resort pages' faded sky background instead. The site sets html/body to
   height: 100%, which sizes the gradient to one viewport and repeats it down a
   long page; release the height (as resort-chart.css does for resort pages)
   so the gradient spans the whole document once. */
html:has(#el-nino),
body:has(#el-nino) {
  height: auto !important;
  min-height: 100%;
}
body:has(#el-nino) {
  background-color: #fff;
  background-image: linear-gradient(to bottom right, #bae6fd, #f0f9ff, transparent);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.enso {
  --surface: #fff;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --rule: #e5e7eb;
  --grid: #f0f1f3;
  --sky-500: #0ea5e9;
  --sky-700: #0369a1;
  --blue-500: #3b82f6;
  --card-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --card-shadow-hover: 0 20px 25px -5px rgba(186,230,253,.9), 0 8px 10px -6px rgba(186,230,253,.9);
  --neutral: #f0efec;
  --wet-1: #86b6ef;
  --wet-2: #5598e7;
  --wet-3: #256abf;
  --wet-4: #104281;
  --dry-1: #f09a8f;
  --dry-2: #e8695f;
  --dry-3: #c93b37;
  --dry-4: #8f2422;
  --series-oni: #2a78d6;
  --series-roni: #eb6834;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px 48px;
  color: #444;
  font-family: "Brandon Grotesque", Mulish, Arial, sans-serif;
}

/* Cards */
.enso-hero,
.enso-panel,
.enso-tile {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  transition: box-shadow .3s, transform .3s;
}
.enso-panel:hover,
.enso-tile:hover { box-shadow: var(--card-shadow-hover); }
.enso-tile:hover { transform: scale(1.01); }
.enso-panel:hover h2,
.enso-tile:hover .enso-tile-label { color: var(--sky-700); }

.enso-hero { padding: 24px 32px; margin: 0 0 24px; text-align: center; }
.enso h1 { font-family: inherit; font-size: clamp(30px, 4vw, 48px); line-height: 1.1; margin: 6px 0 12px; font-weight: 700; color: var(--text-primary); }
.enso h2 { font-family: inherit; font-size: 20px; margin: 0 0 6px; font-weight: 700; color: var(--text-primary); transition: color .2s; }
.enso-kicker { color: var(--sky-700); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 14px; margin: 0; }
.enso-dek { color: var(--text-secondary); font-family: Mulish, Arial, sans-serif; font-size: 17px; line-height: 1.55; max-width: 820px; margin: 0 auto; }
.enso-panel-dek a { color: var(--wet-3); font-weight: 600; }
.enso-panel-dek { color: var(--text-secondary); font-family: Mulish, Arial, sans-serif; font-size: 14px; line-height: 1.5; margin: 0 0 14px; max-width: 820px; }
.enso-fine { color: var(--text-muted); font-family: Mulish, Arial, sans-serif; font-size: 12px; margin: 10px 0 0; }

.enso-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 0 0 24px; }
.enso-tile { padding: 20px 24px; display: flex; flex-direction: column; gap: 4px; }
.enso-tile-label { color: var(--text-primary); font-size: 17px; font-weight: 700; transition: color .2s; }
.enso-tile-value { font-size: 36px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.enso-tile-note { color: var(--text-secondary); font-family: Mulish, Arial, sans-serif; font-size: 13px; line-height: 1.5; }

.enso-filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
/* Pills: same as the resort pages' state chips. */
.enso-filter { border: 1px solid var(--rule); background: #fff; color: #374151; border-radius: 6px; padding: 5px 12px; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: background-color .2s, color .2s; }
.enso-filter:hover { background: #e0f2fe; }
.enso-filter[aria-checked="true"] { background: linear-gradient(to bottom right, var(--sky-500), var(--blue-500)); border-color: transparent; color: #fff; }
.enso-filter-n { opacity: .7; font-weight: 400; font-variant-numeric: tabular-nums; margin-left: 2px; }
.enso-filter-rule { color: var(--text-muted); font-family: Mulish, Arial, sans-serif; font-size: 13px; }

.enso-panel { padding: 24px; margin: 0 0 24px; }

.enso-legend { display: flex; gap: 16px; font-size: 13px; color: var(--text-secondary); margin: 0 0 4px; }
.enso-swatch { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.enso-swatch-oni { background: var(--series-oni); }
.enso-swatch-roni { background: var(--series-roni); }
.enso-chart svg { display: block; width: 100%; height: auto; }
.enso-chart text { font-family: Mulish, system-ui, sans-serif; }

/* State picker: a quieter, smaller version of the area pills. One line that
   scrolls sideways on narrow screens. */
.enso-states { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.enso-states-label { flex: none; color: var(--text-muted); font-family: Mulish, Arial, sans-serif; font-size: 13px; }
.enso-states-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.enso-states-chips::-webkit-scrollbar { display: none; }
.enso-state-chip { flex: none; min-width: 40px; height: 30px; padding: 0 10px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; color: #374151; font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .03em; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: background-color .2s, color .2s; }
.enso-state-chip:hover { background: #e0f2fe; }
.enso-state-chip[aria-pressed="true"] { background: linear-gradient(to bottom right, var(--sky-500), var(--blue-500)); border-color: transparent; color: #fff; }
.enso-state-chip small { font-weight: 400; opacity: .7; margin-left: 3px; font-size: 12px; }

.enso-map-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.enso-map-hint { color: var(--text-muted); font-family: Mulish, Arial, sans-serif; font-size: 13px; }
.enso-map-hint b { color: var(--text-primary); }
.enso-reset { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; color: var(--sky-700); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: background-color .2s; }
.enso-reset:hover { background: #e0f2fe; }

.enso-map-wrap { position: relative; }
.enso-map { height: 720px; border-radius: 8px; overflow: hidden; }
.enso-scale { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.92); border-radius: 6px; padding: 6px 10px; font-size: 12px; color: var(--text-secondary); }
.enso-scale i { display: block; width: 160px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--dry-4), var(--dry-3), var(--dry-2), var(--dry-1), var(--neutral), var(--wet-1), var(--wet-2), var(--wet-3), var(--wet-4)); }

.enso-table-wrap { overflow-x: auto; }
.enso-table { width: 100%; border-collapse: collapse; font-family: Mulish, Arial, sans-serif; font-size: 14px; }
.enso-table tbody tr:hover { background: #f0f9ff; }
.enso-table th { text-align: left; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); font-size: 12px; border-bottom: 1px solid var(--rule); padding: 6px 8px; vertical-align: bottom; }
.enso-table td { border-bottom: 1px solid var(--grid); padding: 6px 8px; vertical-align: middle; }
.enso-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.enso-table a { color: var(--text-primary); font-weight: 700; text-decoration: none; }
.enso-table a:hover { color: var(--sky-700); text-decoration: underline; }
.enso-state { color: var(--text-muted); font-size: 12px; }
.enso-pct { font-weight: 800; }
.enso-source { color: var(--text-muted); font-size: 12px; max-width: 280px; }
.enso-axis-key { display: block; font-weight: 400; color: var(--text-muted); }
.enso-lean { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.enso-lean b { font-weight: 700; }
.enso-lean small { color: var(--text-muted); font-size: 12px; }
.enso-table td small { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.enso-strip { display: block; }

.enso-table-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 12px; }
.enso-search { position: relative; flex: 0 1 340px; }
.enso-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.enso-search input { width: 100%; box-sizing: border-box; height: 38px; padding: 0 12px 0 34px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; color: var(--text-primary); font-family: Mulish, Arial, sans-serif; font-size: 15px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.enso-search input:focus { outline: none; border-color: var(--sky-500); box-shadow: 0 0 0 3px rgba(14,165,233,.2); }
.enso-search-hint { color: var(--text-muted); font-family: Mulish, Arial, sans-serif; font-size: 13px; }
.enso-empty td { text-align: center; color: var(--text-muted); padding: 28px 8px; }

.enso-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 12px 0 0; }
.enso-page { min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--rule); background: #fff; color: #374151; border-radius: 6px; font: inherit; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.enso-page:hover:not(:disabled) { background: #e0f2fe; }
.enso-page.is-current { background: linear-gradient(to bottom right, var(--sky-500), var(--blue-500)); border-color: transparent; color: #fff; }
.enso-page:disabled { color: var(--text-muted); cursor: default; opacity: .6; }
.enso-page-gap { color: var(--text-muted); padding: 0 4px; }
.enso-pager-status { margin-left: auto; color: var(--text-muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.enso-method ul { margin: 8px 0 0; padding-left: 18px; }
.enso-method li { margin: 0 0 8px; line-height: 1.55; color: var(--text-secondary); font-family: Mulish, Arial, sans-serif; font-size: 15px; }
.enso-method strong { color: var(--text-primary); }

.enso-tip { position: fixed; z-index: 50; pointer-events: none; background: #fff; border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12); padding: 8px 10px; font-size: 13px; color: var(--text-primary); max-width: 260px; }
.enso-tip .t { font-weight: 700; margin-bottom: 2px; }
.enso-tip .m { color: var(--text-secondary); }

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

@media (max-width: 760px) {
  .enso { padding: 16px 16px 40px; }
  .enso-hero { padding: 20px; }
  .enso-panel { padding: 16px; }
  .enso-map { height: 660px; } /* 1.5× the old 440px phone height */
  .enso-states-chips { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); padding-right: 24px; }
  .enso-source { display: none; }
}
