/* Ecological Footprint & Energy Audit: the Energy Audit Office inside the practice shell's stage (~1066 × 628 at 1366 × 768). */
.ea { position: absolute; inset: 0; overflow: auto; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 10px; padding: 10px 12px; align-items: start;
  font-size: 16px; line-height: 1.3; color: #1f2933; background: linear-gradient(#e8f1ee, #d7e6e1);
  --ea-ink: #1f2933; --ea-soft: #4a5866; --ea-line: #a3b4bf; --ea-card: #ffffff; --ea-head: #e2f0eb; --ea-accent: #17695a; --ea-in: #ffffff;
  --ea-ok: #1f7a44; --ea-ok-bg: #e3f6e8; --ea-bad: #b42318; --ea-bad-bg: #fde7e4; --ea-plot: #fbfdff; --ea-grid: #e1e7ed; }
html[data-theme="dark"] .ea { color: #eef2f6; background: linear-gradient(#18221f, #121a18);
  --ea-ink: #eef2f6; --ea-soft: #c3cfd9; --ea-line: #56677a; --ea-card: #1f2a33; --ea-head: #22383a; --ea-accent: #6fd3bd; --ea-in: #121a20;
  --ea-ok: #7fdca0; --ea-ok-bg: #173d27; --ea-bad: #ffb4a8; --ea-bad-bg: #4a1e1a; --ea-plot: #17212a; --ea-grid: #2d3a46; --ea-pylon: #c3cfd9; }
.ea *, .ea *::before, .ea *::after { box-sizing: border-box; }
.ea p { margin: 0; }
.ea figure { margin: 0; }
.ea-panel { background: var(--ea-card); border: 1.5px solid var(--ea-line); border-radius: 12px; padding: 10px 12px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ea-fig { min-height: auto; }
.ea-task { box-shadow: 0 6px 16px rgba(20, 50, 40, .12); }
.ea-k { font-weight: 800; color: var(--ea-accent); }
.ea-t { fill: var(--ea-ink); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }

/* coach + equation */
.ea-coachbar { display: flex; align-items: center; gap: 10px; background: var(--ea-head); border-left: 6px solid var(--ea-accent); border-radius: 8px; padding: 6px 10px; min-height: 44px; }
.ea-coach-k { flex: none; font-weight: 800; color: var(--ea-accent); text-transform: uppercase; letter-spacing: .06em; }
.ea-eq { padding: 6px 10px; border: 1.5px dashed var(--ea-line); border-radius: 8px; font-weight: 600; }
.ea-eq-k { display: block; font-size: 16px; font-weight: 800; color: var(--ea-soft); text-transform: uppercase; letter-spacing: .04em; }

/* appliance cards */
.ea-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ea-cards--1 { grid-template-columns: minmax(0, 260px); justify-content: center; }
.ea-cards--mini { grid-template-columns: minmax(0, 230px); }
.ea-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px; border-radius: 12px; border: 1.5px solid var(--ea-line);
  background: linear-gradient(var(--ea-card), var(--ea-head)); text-align: center; }
.ea-card-art { width: 100%; max-width: 150px; }
.ea-icon { display: block; width: 100%; height: auto; }
.ea-card-name { font-weight: 800; line-height: 1.15; }
.ea-plate { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 6px; background: #fff3b0; color: #3b2f00; border: 1.5px solid #c9a227; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.ea-bolt { font-size: 16px; }
.ea-hours { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.ea-clock { width: 24px; height: 24px; flex: none; }
.ea-note { color: var(--ea-soft); font-weight: 600; }
.ea-count { position: absolute; top: 6px; right: 6px; padding: 2px 8px; border-radius: 999px; background: var(--ea-accent); color: #fff; font-weight: 800; }
html[data-theme="dark"] .ea-count { color: #0d1f1b; }
.ea-card-letter { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #1f2933; color: #fff; font-weight: 800; flex: none; }
.ea-card > .ea-card-letter { position: absolute; top: 6px; left: 6px; }
html[data-theme="dark"] .ea-card-letter { background: #eef2f6; color: #1f2933; }
.ea-card-kwh { font-weight: 800; color: var(--ea-ok); }
.ea-banner { align-self: center; padding: 4px 12px; border-radius: 999px; background: var(--ea-head); font-weight: 700; text-align: center; }
.ea-banner--ok { color: var(--ea-ok); border: 1.5px solid var(--ea-ok); }

/* meters + rate card */
.ea-meters { display: flex; align-items: center; justify-content: center; gap: 8px; }
.ea-meterfig { flex: 1 1 0; max-width: 220px; text-align: center; }
.ea-meter { display: block; width: 100%; height: auto; }
.ea-meterfig figcaption { font-weight: 800; }
.ea-meters--mini .ea-meterfig { max-width: 150px; }
.ea-arrow { font-size: 28px; font-weight: 800; color: var(--ea-soft); }
.ea-ratecard { border: 1.5px solid var(--ea-line); border-radius: 10px; padding: 8px 10px; background: repeating-linear-gradient(var(--ea-card) 0 31px, var(--ea-grid) 31px 32px); }
.ea-ratecard-h { font-weight: 800; color: var(--ea-accent); }
.ea-ratecard table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ea-ratecard th { text-align: left; font-weight: 600; padding: 3px 6px 3px 0; }
.ea-ratecard td { text-align: right; font-weight: 800; padding: 3px 0; white-space: nowrap; }

/* emission bars */
.ea-bars { display: flex; flex-direction: column; gap: 6px; }
.ea-bar { display: grid; grid-template-columns: 52px minmax(96px, 9.5em) minmax(40px, 1fr) 5.4em 18px; align-items: center; gap: 8px; min-height: 52px; padding: 4px 8px; border-radius: 10px; border: 1.5px solid transparent; font: inherit; color: inherit; text-align: left; background: transparent; width: 100%; }
button.ea-bar { cursor: pointer; border-color: var(--ea-line); background: var(--ea-in); }
button.ea-bar:hover:not(:disabled) { border-color: var(--ea-accent); }
.ea-bar.is-hl { border-color: var(--ea-accent); background: var(--ea-head); }
.ea-bar-ic .ea-src { display: block; width: 52px; height: 42px; }
.ea-bar-name { font-weight: 700; line-height: 1.15; }
.ea-bar-track { position: relative; height: 22px; border-radius: 6px; background: var(--ea-grid); overflow: hidden; }
.ea-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 6px; background: #6b7682; }
.ea--motion .ea-bar-fill { animation: ea-grow .7s ease-out both; transform-origin: left center; }
@keyframes ea-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ea-bar-fill--coal { background: repeating-linear-gradient(45deg, #2a2e33 0 6px, #4a5058 6px 10px); }
.ea-bar-fill--oil { background: repeating-linear-gradient(-45deg, #1f3c5c 0 6px, #3d6690 6px 10px); }
.ea-bar-fill--gas { background: #3b82f6; }
.ea-bar-fill--grid { background: repeating-linear-gradient(90deg, #6b7682 0 8px, #8d99a5 8px 12px); }
.ea-bar-fill--wind, .ea-bar-fill--solar, .ea-bar-fill--hydro, .ea-bar-fill--nuclear { background: #3fbf6a; }
.ea-bar-val { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ea-mix { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.ea-donutwrap { width: 170px; }
.ea-donut { display: block; width: 100%; height: auto; }
.ea-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.ea-sw { display: inline-block; width: 18px; height: 14px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ea-legend-line { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ea-soft); font-weight: 600; }

/* sankey + payback graph (drawn at pixel size) */
.ea-sankeyhost, .ea-graphhost { width: 100%; min-height: 200px; }
.ea-sankeyhost svg, .ea-graphhost svg { display: block; max-width: 100%; }
.ea-sk-h { font-weight: 800; }
.ea-stage { cursor: default; }
.ea--efficiency-chain .ea-stage { cursor: pointer; }
.ea-stage-hit { fill: transparent; stroke: transparent; stroke-width: 3; }
.ea-stage.is-picked .ea-stage-hit { fill: var(--ea-head); stroke: var(--ea-accent); stroke-dasharray: 6 4; }
.ea-stage.is-ok .ea-stage-hit { fill: var(--ea-ok-bg); stroke: var(--ea-ok); stroke-dasharray: none; }
.ea-stage.is-bad .ea-stage-hit { fill: var(--ea-bad-bg); stroke: var(--ea-bad); stroke-dasharray: none; }
.ea-t-loss { fill: #b8430c; font-weight: 700; }
html[data-theme="dark"] .ea-t-loss { fill: #ffa070; }
.ea--motion .ea-flow { animation: ea-flow 1.6s linear infinite; }
@keyframes ea-flow { to { stroke-dashoffset: -44; } }
.ea--motion .ea-loss { animation: ea-fade .8s ease-out both; }
@keyframes ea-fade { from { opacity: 0; } to { opacity: 1; } }
.ea--motion .ea-line { stroke-dasharray: 2000; animation: ea-draw 1.2s ease-out both; }
.ea--motion .ea-line-old { animation: ea-draw-d 1.2s ease-out both; }
@keyframes ea-draw { from { stroke-dashoffset: 2000; } to { stroke-dashoffset: 0; } }
@keyframes ea-draw-d { from { opacity: 0; } to { opacity: 1; } }
.ea-chainmini { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; }
.ea-chainmini span { padding: 4px 8px; border-radius: 8px; background: var(--ea-head); }
.ea-chainmini i { font-style: normal; font-weight: 800; color: var(--ea-soft); }

/* payback spec */
.ea-spec-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.ea-spec-side { flex: 0 1 160px; text-align: center; }
.ea-spec-side .ea-icon { max-width: 120px; margin: 0 auto; }
.ea-spec-row--small .ea-spec-side .ea-icon { max-width: 84px; }
.ea-spec-l { font-weight: 800; color: var(--ea-soft); text-transform: uppercase; letter-spacing: .04em; }
.ea-spec-v { font-weight: 800; }
.ea-spec-use { text-align: center; }
.ea-spec2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.ea-spec2-card { border: 1.5px solid var(--ea-line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.ea-spec2-h { display: flex; align-items: center; gap: 8px; font-weight: 800; }

/* footprint */
.ea-earths { display: flex; flex-direction: column; gap: 10px; }
.ea-fbar { display: grid; grid-template-columns: minmax(100px, 11em) minmax(60px, 1fr) 5em; gap: 8px; align-items: center; }
.ea-fbar-l { font-weight: 700; line-height: 1.15; }
.ea-fbar-track { height: 30px; border-radius: 8px; background: var(--ea-grid); position: relative; overflow: hidden; }
.ea-fbar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 8px; display: flex; }
.ea-fbar-fill--fp { background: repeating-linear-gradient(45deg, #b4542a 0 8px, #d2703f 8px 14px); }
.ea-fbar-fill--bio { background: #3a9d5d; }
.ea-fbar-carbon { height: 100%; background: #3f4954; color: #fff; font-weight: 700; font-size: 16px; display: flex; align-items: center; padding-left: 6px; white-space: nowrap; overflow: hidden; }
.ea-fbar-v { font-weight: 800; text-align: right; white-space: nowrap; }
.ea-note2 { color: var(--ea-soft); }
.ea-globes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ea-globe { width: 56px; height: 56px; }
.ea-globes-n { font-weight: 800; font-size: 20px; margin-left: 6px; }
.ea--motion .ea-globes.is-new .ea-globe { animation: ea-pop .5s ease-out both; }
@keyframes ea-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ea-lands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ea-landtile { border: 1.5px solid var(--ea-line); border-radius: 10px; overflow: hidden; text-align: center; font-weight: 700; }
.ea-land { display: block; width: 100%; height: auto; }

/* choices */
.ea-parts { display: flex; flex-direction: column; gap: 10px; }
.ea-part { display: flex; flex-direction: column; gap: 4px; }
.ea-part-l { font-weight: 800; }
.ea-choices { display: flex; flex-direction: column; gap: 6px; }
.ea-choices--chips { flex-direction: row; flex-wrap: wrap; }
.ea-choices--land { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ea .ea-ch, .ea .ea-chip { position: relative; min-height: 48px; padding: 8px 34px 8px 12px; font: inherit; color: inherit; text-align: left; background: var(--ea-in); border: 2px solid var(--ea-line); border-radius: 12px; cursor: pointer; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.ea .ea-chip { flex-direction: row; align-items: center; gap: 4px; padding: 4px 12px; min-width: 64px; justify-content: center; font-weight: 700; font-size: 18px; }
.ea-choices--chips .ea-ch { flex-direction: row; align-items: center; font-weight: 700; }
.ea-choices--land .ea-ch { padding: 0 0 6px; align-items: stretch; text-align: center; overflow: hidden; }
.ea-choices--land .ea-ch-t { padding: 0 28px; font-weight: 700; }
.ea-landart .ea-land { border-bottom: 1.5px solid var(--ea-line); }
.ea-choices--steps .ea-ch { font-family: "Comic Neue", "Segoe Print", system-ui, sans-serif; background: repeating-linear-gradient(var(--ea-in) 0 27px, var(--ea-grid) 27px 28px); }
.ea-stepn { font-family: system-ui, sans-serif; font-weight: 800; color: var(--ea-accent); font-size: 16px; }
.ea-ch-t { font-weight: 600; }
.ea-ch-s { color: var(--ea-soft); }
.ea-ch-m { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--ea-accent); }
.ea .ea-chip .ea-ch-m { position: static; transform: none; }
.ea .ea-chip .ea-ch-m:empty, .ea-bar .ea-ch-m:empty { display: none; }
.ea-bar .ea-ch-m { position: static; transform: none; }
.ea [aria-checked="true"] { border: 3px solid var(--ea-accent); background: var(--ea-head); }
.ea .is-ok { border: 3px solid var(--ea-ok) !important; background: var(--ea-ok-bg) !important; }
.ea .is-bad { border: 3px solid var(--ea-bad) !important; background: var(--ea-bad-bg) !important; }
.ea .is-ok .ea-ch-m { color: var(--ea-ok); } .ea .is-bad .ea-ch-m { color: var(--ea-bad); }
.ea button:disabled { cursor: default; opacity: 1; }
.ea-numrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ea .ea-in { width: 9em; min-width: 0; height: 48px; padding: 0 10px; font: inherit; font-size: 20px; font-weight: 700; text-align: center; color: inherit; background: var(--ea-in); border: 2px solid var(--ea-accent); border-radius: 8px; }
.ea .ea-in:disabled { -webkit-text-fill-color: currentColor; opacity: 1; }
.ea .ea-in.is-bad { text-decoration: line-through; }
.ea-unit { font-weight: 800; font-size: 18px; }
.ea-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ea-mark { font-weight: 800; }
.ea-mark:empty { display: none; }
.ea-mark.is-ok { color: var(--ea-ok); } .ea-mark.is-bad { color: var(--ea-bad); }
.ea-msg { color: var(--ea-bad); font-weight: 700; }
.ea-msg:empty { display: none; }
.ea-worked-title { font-weight: 800; font-size: 18px; }
.ea button:focus-visible, .ea .ea-in:focus-visible { outline: 3px solid var(--tlg-focus, #b84c00); outline-offset: 2px; }

/* Briefing example */
.ea.ea-example { position: static; display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 12px; padding: 8px; background: none; align-items: center; }
.ps-brief--drawer .ea.ea-example { grid-template-columns: minmax(0, 1fr); }

/* Narrower than a Chromebook: one column (evidence above the answers). */
@media (max-width: 1100px) {
  .ea { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .ea-fig, .ea-task { min-height: auto; flex-shrink: 0; }
}
@media (max-width: 900px) { .ea { position: static; overflow: visible; } }
@media (max-width: 560px) {
  .ea { padding: 6px; }
  .ea-bar { grid-template-columns: 40px minmax(70px, 1fr) minmax(40px, 1fr) 4.8em; gap: 6px; }
  .ea-bar .ea-ch-m { display: none; }
  .ea-bar-ic .ea-src { width: 40px; height: 34px; }
  .ea-fbar { grid-template-columns: minmax(0, 1fr) 4.6em; }
  .ea-fbar-track { grid-column: 1 / -1; grid-row: 2; }
  .ea-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ea-cards--1, .ea-cards--mini { grid-template-columns: minmax(0, 230px); }
  .ea-choices--land { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ea.ea-example { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .ea * { animation: none !important; } }
