/* El Niño monitor (page-elnino.php), old theme.
   Ported from the debesmscat-2027 theme. The 2027 theme's tokens and shared
   classes (eyebrow, link-arrow) are redefined here, scoped to .en,
   using this theme's palette: #194a40, #4d774e, #9dc88d, #f1b24a. */
.en {
  --eden: #194a40;
  --surface: #fff;
  --band: #f4f9f1;
  --ink: #191919;
  --muted: #4f5f58;
  --line: #d5e6cd;
  --heading: #194a40;
  --link: #194a40;
  --on-chrome: #fff;
  --shadow: 0 1px 2px rgb(25 74 64 / .06), 0 8px 24px rgb(25 74 64 / .08);
  --focus: #f1b24a;
  --f-display: Georgia, "Times New Roman", Times, serif;
  --f-body: Verdana, Geneva, Tahoma, sans-serif;
  --f-mono: Consolas, ui-monospace, monospace;
  --radius: 14px;
  --radius-sm: 8px;

  float: none;
  width: 1400px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 16px 64px;
  font: 400 15px/1.5 var(--f-body);
  color: var(--ink);
}
.en *, .en *::before, .en *::after { box-sizing: border-box; }
.en [hidden] { display: none !important; }
.en h2, .en h3, .en p { margin: 0; }
.en h2 { font-family: var(--f-display); font-weight: 400; color: var(--heading); line-height: 1.2; }
.en a { color: var(--link); }
.en :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.en ul, .en ol { margin: 0; }
.en-lede { font-size: 17px; color: var(--muted); max-width: 70ch; }
.en .eyebrow { font: 700 11px/1.2 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--eden); }
.en .link-arrow { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.en .link-arrow::after { content: "\2192"; }
.en .link-arrow:hover { text-decoration: underline; }
.en .edit-link { font-size: .85rem; }

.en {
  --en-rain: #2a78d6;
  --en-up: #e34948;
  --en-down: #2a78d6;
  --en-ref: #1d2a25;
  --en-grid: #e1ebdc;
  --en-ok: #0ca30c;
  --en-warn: #fab219;
  --en-serious: #ec835a;
  --en-critical: #d03b3b;
  display: grid;
  gap: 1.5rem;
  padding-block: 2rem 3.5rem;
}
.en h2 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }

.en-errors { margin: 0; padding: .8rem 1rem .8rem 2rem; background: #fff1e6; border: 1px solid var(--en-serious); border-radius: var(--radius-sm); font-size: .92rem; }

/* Status */
.en-status { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.en-state { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--muted); border-radius: var(--radius); padding: 1.1rem 1.3rem; display: grid; gap: .45rem; }
.en-state p:last-child { color: var(--muted); font-size: .92rem; }
.en-big { font: 400 clamp(1.5rem, 3vw, 2rem)/1.2 var(--f-display); color: var(--heading); display: flex; align-items: center; gap: .55rem; }
.en-icon { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; font: 700 .85rem/1 var(--f-body); color: #fff; background: var(--muted); flex: none; }
.en-state.is-elnino, .en-state.is-drought { border-left-color: var(--en-critical); }
.en-state.is-elnino .en-icon, .en-state.is-drought .en-icon { background: var(--en-critical); }
.en-state.is-dryspell { border-left-color: var(--en-serious); }
.en-state.is-dryspell .en-icon { background: var(--en-serious); }
.en-state.is-dry { border-left-color: var(--en-warn); }
.en-state.is-dry .en-icon { background: var(--en-warn); color: var(--ink); }
.en-state.is-lanina { border-left-color: var(--en-down); }
.en-state.is-lanina .en-icon { background: var(--en-down); }
.en-state.is-none, .en-state.is-neutral { border-left-color: var(--en-ok); }
.en-state.is-none .en-icon, .en-state.is-neutral .en-icon { background: var(--en-ok); }

/* KPI tiles */
.en-kpis { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.en-kpis li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; display: grid; gap: .2rem; align-content: start; }
.en-k { font-size: .85rem; color: var(--muted); font-weight: 600; }
.en-v { font: 400 2.1rem/1.15 var(--f-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.en-v small { font: 500 .95rem var(--f-body); color: var(--muted); }
.en-d { font-size: .85rem; color: var(--muted); }

/* Cards */
.en-two { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.en-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem 1.1rem; display: grid; gap: .9rem; min-width: 0; }
.en-head { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: baseline; justify-content: space-between; }
.en-note { font-size: .85rem; color: var(--muted); }
.en-about { gap: .75rem; }
.en-about > p:not(.en-note) { max-width: 75ch; }
.en-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

/* Legend */
.en-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .82rem; color: var(--muted); }
.en-legend li { display: inline-flex; align-items: center; gap: .4rem; }
.en-key { display: inline-block; width: 10px; height: 12px; border-radius: 3px 3px 0 0; background: var(--en-rain); }
.en-key.is-ref { width: 16px; height: 0; border-top: 2px solid var(--en-ref); border-radius: 0; }
.en-key.is-part { background: repeating-linear-gradient(135deg, var(--en-rain) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--en-rain); }
.en-key.is-up { background: var(--en-up); }
.en-key.is-down { background: var(--en-down); border-radius: 0 0 3px 3px; }

/* Bar chart */
.en-chart { margin: 0; display: grid; gap: .6rem; }
.en-plot { position: relative; height: 220px; margin: .4rem 0 1.6rem 2.6rem; }
.en-grid { position: absolute; inset: 0; pointer-events: none; }
.en-tick { position: absolute; left: 0; right: 0; border-top: 1px solid var(--en-grid); }
.en-tick b { position: absolute; right: calc(100% + .45rem); top: -.55em; font: 500 .72rem/1 var(--f-mono); color: var(--muted); white-space: nowrap; }
.en-tick.is-zero { border-top: 1px solid #8a8a84; }
.en-line { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--muted); }
.en-line i { position: absolute; left: 2px; bottom: 2px; font: 500 .7rem/1 var(--f-body); font-style: normal; color: var(--muted); background: var(--surface); padding: 0 .2rem; }
.en-line.is-below i { bottom: auto; top: 2px; }
.en-bars { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; }
.en-col { position: relative; outline-offset: 0; cursor: default; }
.en-col:hover, .en-col:focus-visible { background: rgb(2 97 77 / .06); }
.en-bar { position: absolute; left: 12%; right: 12%; min-height: 1px; background: var(--en-rain); border-radius: 4px 4px 0 0; }
.en-bar.is-down { border-radius: 0 0 4px 4px; }
.en-bar.is-part { background: repeating-linear-gradient(135deg, var(--en-rain) 0 2px, rgb(42 120 214 / .35) 2px 5px); }
.is-div .en-bar.is-up { background: var(--en-up); }
.is-div .en-bar.is-down { background: var(--en-down); }
.en-ref { position: absolute; left: 2%; right: 2%; border-top: 2px solid var(--en-ref); box-shadow: 0 0 0 1px var(--surface); }
.en-val { position: absolute; left: 50%; transform: translate(-50%, -125%); font: 600 .75rem/1 var(--f-body); color: var(--ink); white-space: nowrap; }
.en-val[data-dir="down"] { transform: translate(-50%, 25%); }
.en-x { position: absolute; top: calc(100% + .4rem); left: 50%; transform: translateX(-50%); font-size: .72rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 560px) {
  .en-plot { height: 180px; }
  .en-x { font-size: .62rem; }
  .en-x.is-alt { display: none; }
  .en-bar { left: 6%; right: 6%; }
}

/* Table view */
.en-table summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--link); }
.en-table table { margin-top: .6rem; border-collapse: collapse; font-size: .85rem; width: 100%; max-width: 480px; }
.en-table th, .en-table td { text-align: left; padding: .3rem .6rem; border-bottom: 1px solid var(--line); }
.en-table td { font-variant-numeric: tabular-nums; }


/* Plain-language sections (English with Filipino under it) */
.en h3 { font-family: var(--f-display); font-weight: 400; color: var(--heading); line-height: 1.25; font-size: 1.12rem; margin: 0; }
.en-say { display: grid; gap: .1rem; margin: 0; }
.en-say .en-fil { color: var(--muted); font-size: .9em; }
.en-sec { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin-bottom: .9rem; }
.en-sec .en-fil, .en-ask .en-fil { font-family: var(--f-body); font-size: .62em; }
.en-hint { font-size: .88rem; color: var(--muted); margin-top: .8rem; max-width: 80ch; }

/* "What is happening now?" */
.en-hero { --hero: var(--muted); --hero-bg: var(--band); background: var(--hero-bg); border: 2px solid var(--hero); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.8rem); display: grid; gap: 1rem; }
.en-hero.is-red { --hero: var(--en-critical); --hero-bg: #fdeeee; }
.en-hero.is-orange { --hero: var(--en-serious); --hero-bg: #fff2ea; }
.en-hero.is-green { --hero: var(--en-ok); --hero-bg: #edf8ed; }
.en-hero.is-blue { --hero: var(--en-down); --hero-bg: #ebf3fd; }
.en-ask { font-size: 1rem; }
.en-ask .en-en { font: 700 .8rem/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--hero); }
.en-ask .en-fil { font-size: .8rem; }
.en-headline .en-en { font: 400 clamp(1.6rem, 4.2vw, 2.4rem)/1.15 var(--f-display); color: var(--ink); }
.en-headline .en-fil { font-size: clamp(1.05rem, 2.4vw, 1.3rem); }
.en-points { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; font-size: 1.08rem; }
.en-points li { display: grid; grid-template-columns: 2.2rem 1fr; gap: .6rem; align-items: start; }
.en-pt-icon { font-size: 1.6rem; line-height: 1.2; text-align: center; }
.en-hero-cta { margin: 0; }
.en-hero-cta a { display: inline-block; padding: .6rem 1.1rem; border-radius: 999px; background: var(--hero); color: #fff; font-weight: 700; text-decoration: none; }
.en-hero.is-orange .en-hero-cta a, .en-hero.is-green .en-hero-cta a { color: #fff; background: var(--ink); }
.en-hero-cta a:hover { text-decoration: underline; }

/* Rain and heat tiles */
.en-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.en-tile { --lvl: var(--muted); background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--lvl); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; gap: .55rem; align-content: start; }
.en-tile.is-ok { --lvl: var(--en-ok); }
.en-tile.is-wet { --lvl: var(--en-down); }
.en-tile.is-low { --lvl: var(--en-warn); }
.en-tile.is-verylow, .en-tile.is-hot { --lvl: var(--en-serious); }
.en-tile.is-dry { --lvl: var(--en-critical); }
.en-tile-q { font-size: .92rem; font-weight: 700; }
.en-tile-q .en-fil { font-weight: 400; }
.en-tile-a .en-en { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.en-tile-n { font-size: .82rem; color: var(--muted); }
.en-tile-big { font: 400 2.6rem/1 var(--f-display); color: var(--ink); }
.en-tile-big small { font: 500 1.1rem var(--f-body); color: var(--muted); }

/* Rain drops: filled = part of the usual rain */
.en-drops { display: inline-flex; gap: 4px; }
.en-drop svg { display: block; width: 22px; height: 28px; fill: #dfe3e8; }
.en-drop.is-on svg { fill: var(--en-rain); }

/* Coming months */
.en-months { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.en-month { --lvl: var(--muted); background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--lvl); border-radius: var(--radius-sm); padding: .8rem .9rem; display: grid; gap: .45rem; align-content: start; }
.en-month.is-ok { --lvl: var(--en-ok); }
.en-month.is-wet { --lvl: var(--en-down); }
.en-month.is-low { --lvl: var(--en-warn); }
.en-month.is-verylow { --lvl: var(--en-serious); }
.en-month.is-dry { --lvl: var(--en-critical); }
.en-month-name { display: grid; margin: 0; }
.en-month-name .en-en { font-weight: 700; font-size: 1.05rem; }
.en-month-name .en-fil { color: var(--muted); font-size: .85rem; }
.en-month .en-tile-a .en-en { font-size: .95rem; }
.en-month .en-drop svg { width: 18px; height: 23px; }

/* El Niño meter */
.en-meter { display: grid; gap: .9rem; padding-top: 2.4rem; }
.en-meter-bar { position: relative; display: flex; height: 22px; border-radius: 999px; overflow: visible; }
.en-seg { height: 100%; border-right: 2px solid var(--surface); }
.en-seg:first-child { border-radius: 999px 0 0 999px; }
.en-seg:last-of-type { border-radius: 0 999px 999px 0; border-right: 0; }
.en-seg.is-lanina, .en-meter-keys .is-lanina i { background: var(--en-down); }
.en-seg.is-normal, .en-meter-keys .is-normal i { background: #cfd3cf; }
.en-seg.is-weak, .en-meter-keys .is-weak i { background: var(--en-warn); }
.en-seg.is-moderate, .en-meter-keys .is-moderate i { background: var(--en-serious); }
.en-seg.is-strong, .en-meter-keys .is-strong i { background: var(--en-up); }
.en-seg.is-verystrong, .en-meter-keys .is-verystrong i { background: #9f2226; }
.en-meter-pin { position: absolute; top: -8px; bottom: -8px; width: 4px; margin-left: -2px; background: var(--ink); border-radius: 2px; box-shadow: 0 0 0 2px var(--surface); }
.en-meter-pin b { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); white-space: nowrap; font: 700 .8rem/1 var(--f-body); background: var(--ink); color: #fff; padding: .3rem .5rem; border-radius: 6px; }
.en-meter-keys { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .85rem; color: var(--muted); }
.en-meter-keys li { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .45rem; border-radius: 6px; }
.en-meter-keys i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.en-meter-keys .is-here { background: var(--ink); color: #fff; font-weight: 700; }
.en-meter-keys span[lang]::before { content: "· "; }

/* What can we do */
.en-tips { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); font-size: 1.02rem; }
.en-tips li { display: grid; grid-template-columns: 2.4rem 1fr; gap: .6rem; align-items: start; }
.en-tip-icon { font-size: 1.7rem; line-height: 1.1; text-align: center; }
.en-what .en-say { max-width: 80ch; font-size: 1.02rem; gap: .5rem; }

/* More details (charts) */
.en-more { border: 1px solid var(--line); border-radius: var(--radius); background: var(--band); }
.en-more > summary { cursor: pointer; padding: 1rem 1.2rem; font-weight: 700; color: var(--link); list-style-position: inside; }
.en-more > summary .en-en, .en-more > summary .en-fil { display: inline; }
.en-more > summary .en-fil { font-weight: 400; }
.en-more > summary .en-fil::before { content: " · "; }
.en-more-body { display: grid; gap: 1.5rem; padding: 0 1rem 1rem; }
.en-meter-pin.is-end b { left: auto; right: -4px; transform: none; }
.en-meter-pin.is-start b { left: -4px; transform: none; }


/* SDG badges (same markup as the homepage band, light version) */
.en-sdg-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; display: grid; gap: .8rem; }
.en .en-sdg-h { font-size: 1.05rem; font-family: var(--f-body); font-weight: 700; color: var(--ink); }
.en .en-sdg-h .en-fil { font-size: .85rem; font-weight: 400; }
.en-sdgs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.en-sdgs a { display: inline-flex; align-items: center; gap: .55rem; padding: .3rem .8rem .3rem .3rem; border-radius: 10px; text-decoration: none; font-size: .82rem; line-height: 1.25; background: var(--band); color: var(--ink); border: 1px solid var(--line); }
.en-sdgs a:hover { border-color: var(--sdg); }
.en-sdg-num { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 8px; background: var(--sdg); color: #fff; font: 800 1.35rem/1 var(--f-body); flex: none; text-shadow: 0 1px 2px rgb(0 0 0 / .35); }
.en-sdg-num small { display: block; font-size: .5rem; letter-spacing: .08em; font-weight: 700; margin-bottom: -.35rem; }
.en-sdg-txt { display: grid; }
.en-sdg-txt span { color: var(--muted); }

/* Tooltip */
.en-tip { position: fixed; z-index: 50; max-width: 260px; padding: .5rem .7rem; background: var(--ink); color: var(--on-chrome); border-radius: var(--radius-sm); font-size: .8rem; line-height: 1.4; pointer-events: none; box-shadow: var(--shadow); }
.en-tip b { display: block; font-size: .9rem; }

@media (forced-colors: active) {
  .en-bar, .en-key { background: CanvasText; forced-color-adjust: none; }
}
