/* Ausgeology · How much metal does the future need?: styles for this lesson's models and its Fermi estimates.
   The first blocks (the brief, number answers, the shared parts of the models) are carried over from the rubbish lesson. */

:root {
  --mt-paper: #fdfdf9; --mt-sky: #dcecf7; --mt-ground: #c9b48a; --mt-ground-2: #a8905f; --mt-grass: #8fb35a; --mt-water: #3d7fc4;
  --mt-ok: #15803d; --mt-no: #b91c1c; --mt-warn: #b45309;
  --mt-copper: #b8632a; --mt-copper-2: #e09a5f; --mt-steel: #6b7885; --mt-concrete: #a9aca6; --mt-glass: #5fa8c9; --mt-alu: #b9c4cf; --mt-other: #8a6fb0;
  --mt-coal: #3a3f44; --mt-gas: #d07a2a; --mt-nuclear: #7b5ea8; --mt-hydro: #2f79b8; --mt-wind: #3f9a8c; --mt-solar: #d9a400;
  --mt-you: #1f5f8b; --mt-src: #b4501c; --mt-band-a: #bfe3c8; --mt-band-b: #f1e3a6; --mt-band-c: #f0c4bd;
  --mt-li: #7b5ea8; --mt-rock: #9b9488; --mt-rock-2: #7d776c; --mt-tail: #c9c2b2;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mt-paper: #151c1f; --mt-sky: #1c2b36; --mt-ground: #5a4d35; --mt-ground-2: #463c2a; --mt-grass: #5f8a35; --mt-water: #6aa9e8;
    --mt-ok: #4ade80; --mt-no: #f87171; --mt-warn: #f59e0b;
    --mt-copper: #e08a4f; --mt-copper-2: #b8632a; --mt-steel: #9aa7b4; --mt-concrete: #7d817b; --mt-glass: #6fb6d6; --mt-alu: #c5d0da; --mt-other: #a98ae0;
    --mt-coal: #8b939b; --mt-gas: #e8944a; --mt-nuclear: #a98ae0; --mt-hydro: #5b9be0; --mt-wind: #5cc0b0; --mt-solar: #e8b923;
    --mt-you: #7fb9e4; --mt-src: #ec8a52; --mt-band-a: #1d4a2b; --mt-band-b: #4d4219; --mt-band-c: #4f2622;
    --mt-li: #a98ae0; --mt-rock: #6f695f; --mt-rock-2: #57524a; --mt-tail: #4a463d;
  }
}
:root[data-theme="dark"] {
  --mt-paper: #151c1f; --mt-sky: #1c2b36; --mt-ground: #5a4d35; --mt-ground-2: #463c2a; --mt-grass: #5f8a35; --mt-water: #6aa9e8;
  --mt-ok: #4ade80; --mt-no: #f87171; --mt-warn: #f59e0b;
  --mt-copper: #e08a4f; --mt-copper-2: #b8632a; --mt-steel: #9aa7b4; --mt-concrete: #7d817b; --mt-glass: #6fb6d6; --mt-alu: #c5d0da; --mt-other: #a98ae0;
  --mt-coal: #8b939b; --mt-gas: #e8944a; --mt-nuclear: #a98ae0; --mt-hydro: #5b9be0; --mt-wind: #5cc0b0; --mt-solar: #e8b923;
  --mt-you: #7fb9e4; --mt-src: #ec8a52; --mt-band-a: #1d4a2b; --mt-band-b: #4d4219; --mt-band-c: #4f2622;
  --mt-li: #a98ae0; --mt-rock: #6f695f; --mt-rock-2: #57524a; --mt-tail: #4a463d;
}

/* the syllabus quotes in the teacher notes */
blockquote.nesa { margin: 0; padding: 12px 16px; border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--surface); max-width: 72ch; }
blockquote.nesa p { margin: 0 0 6px; }
blockquote.nesa ul { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }

/* the brief and how the lesson works */
.wd-brief { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; padding: 16px 18px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--ochre); }
.wd-brief > * { margin: 0; }
.wd-brief > .label { color: var(--ochre); }
.wd-brief ul { padding-left: 1.3em; display: grid; gap: 4px; }
.wd-cycle { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wd-cycle > li { display: grid; gap: 6px; align-content: start; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.wd-cycle h3 { font-size: 1.04rem; margin: 0; }
.wd-cycle p { margin: 0; font-size: 0.97rem; line-height: 1.5; }
.wd-cycle .small { color: var(--ink-2); font-size: 0.9rem; }
@media (max-width: 860px) { .wd-cycle { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 520px) { .wd-cycle { grid-template-columns: minmax(0, 1fr); } }
.mt-cycle > li { border-top: 6px solid var(--lv, var(--line)); }
.mt-howlead { margin: 0 0 10px; max-width: 72ch; }
.screen-head.mt-first { margin-top: 18px; padding-top: 22px; border-top: 2px solid var(--line); }

/* number answers */
.num { display: grid; gap: 8px; }
.num label { font-weight: 700; line-height: 1.4; }
.num-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.num-row input { width: 9.5em; max-width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 1.04rem; color: var(--ink); background: var(--surface); font-variant-numeric: tabular-nums; }
.num-row input:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); outline-offset: 0; }
.num.is-right .num-row input { border-color: var(--good); }
.num.is-wrong .num-row input { border-color: var(--bad); }
.num-unit { color: var(--ink-2); }
.num .fb { margin: 0; }
.nums { display: grid; gap: 18px; max-width: 820px; }
.mt-eq { margin: 4px 0; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); font-size: 1.04rem; font-variant-numeric: tabular-nums; }
.mt-eq b { font-weight: 700; }

/* the models: shared pieces */
.lab.viz { margin: 4px 0 6px; }
.viz-lead { margin: 0; color: var(--ink-2); max-width: 72ch; }
.viz-read { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); line-height: 1.5; max-width: 820px; }
.viz-read:empty { display: none; }
.wd-opt { min-height: 40px; padding: 7px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.95rem; font-weight: 650; cursor: pointer; text-align: left; line-height: 1.25; }
.wd-opt:hover { border-color: var(--accent); }
.wd-opt[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wd-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-ctl-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.mt-ctl-row > .label { margin-right: 2px; }
.mt-ctl-row > .slider-row { flex: 1 1 280px; min-width: 0; }
@media (max-width: 620px) { .slider-row .label { white-space: normal; } }
.mt-side { display: grid; gap: 10px; align-content: start; min-width: 0; }
.mt-side > * { margin: 0; }
.mt-side .slider-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
.mt-side .slider-row .label { white-space: normal; line-height: 1.25; }
.mt-side .slider-row input { grid-column: 1 / -1; grid-row: 2; }
.slider-row output { font-weight: 700; font-variant-numeric: tabular-nums; }
.mt-two { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .mt-two { grid-template-columns: minmax(0, 1fr); } }
.mt-fig { min-width: 0; display: grid; gap: 8px; }
.mt-svg { width: 100%; height: auto; display: block; border-radius: 12px; background: var(--mt-paper); border: 1px solid var(--line); overflow: hidden; }
.mt-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.mt-scroll:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.mt-swipe { display: none; margin: 0; font-size: 0.88rem; color: var(--ink-2); }
@media (max-width: 620px) { .mt-swipe { display: block; } .mt-scroll > svg { min-width: 600px; } }
.mt-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px 12px; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.mt-facts div { display: grid; gap: 1px; }
.mt-facts dt { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.mt-facts dd { margin: 0; font-size: 1.02rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.mt-bad { color: var(--mt-no); font-weight: 700; }
.mt-good { color: var(--mt-ok); font-weight: 700; }
.mt-tablebox { min-width: 0; overflow-x: auto; }
.mt-tablebox:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.mt-tbl { border-collapse: collapse; width: 100%; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.mt-tbl caption { text-align: left; font-weight: 700; padding: 0 0 6px; }
.mt-tbl th, .mt-tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.mt-tbl thead th { font-size: 0.8rem; color: var(--ink-2); }
.mt-tbl td.is-bad { color: var(--mt-no); font-weight: 700; }
.mt-tbl td.is-good { color: var(--mt-ok); }
.mt-empty { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.mt-tablewrap { display: grid; gap: 6px; }
.mt-small { font-size: 0.9rem; color: var(--ink-2); }
.mt-btnrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mt-legend .sw { border-radius: 4px; }

/* text in the drawings */
.mt-t { font-family: var(--font-body); font-size: 13px; fill: var(--ink); }
.mt-ts { font-family: var(--font-body); font-size: 11.5px; fill: var(--ink-2); }
.mt-tb { font-weight: 700; }
.mt-mid { text-anchor: middle; }
.mt-end { text-anchor: end; }
.mt-it { font-style: italic; }
.mt-halo { paint-order: stroke; stroke: var(--mt-paper); stroke-width: 4px; stroke-linejoin: round; }
.mt-wlab { fill: #ffffff; paint-order: stroke; stroke: rgba(10, 20, 30, 0.7); stroke-width: 3.5px; stroke-linejoin: round; }
.mt-axis { stroke: var(--ink-2); stroke-width: 1.2; fill: none; }
.mt-grid { stroke: var(--line); stroke-width: 1; fill: none; }
.mt-head { fill: var(--ink-2); }
.mt-leader { stroke: var(--ink-2); stroke-width: 1; fill: none; }

.wd-opt:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.mt-cycle > li.mt-step1 { --lv: var(--mt-you); } .mt-cycle > li.mt-step2 { --lv: var(--mt-copper); } .mt-cycle > li.mt-step3 { --lv: var(--mt-src); }
.phase.p-a i { background: #1f5f8b; } .phase.p-b i { background: #8a4a16; } .phase.p-c i { background: #6c4fa8; }
.mt-cv { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.mt-facts dd { font-size: 0.98rem; }
.mt-tbl tr.is-on th, .mt-tbl tr.is-on td { background: var(--surface-2); }
.mt-tbl tr.mt-total th, .mt-tbl tr.mt-total td { font-weight: 700; border-top: 2px solid var(--ink-2); }
.mt-table table { border-collapse: collapse; width: 100%; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.mt-table caption { text-align: left; font-weight: 700; padding: 0 0 6px; }
.mt-table th, .mt-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.mt-legend { font-size: 0.9rem; }
.mt-mark { stroke: var(--ink); stroke-width: 1.6; stroke-dasharray: 5 4; fill: none; }
.mt-belt { stroke: var(--ink-2); stroke-width: 5; stroke-linecap: round; fill: none; }
.mt-barval { fill: var(--ink); }

/* ---------- the Fermi estimate (every screen) ---------- */
.mt-fermi { display: grid; gap: 12px; padding: 16px 18px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--mt-you); }
.mt-f-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .mt-f-top { grid-template-columns: minmax(0, 1fr); } }
.mt-f-card, .mt-f-side { display: grid; gap: 10px; align-content: start; min-width: 0; }
.mt-f-card > *, .mt-f-side > * { margin: 0; }
.mt-f-card > .label { color: var(--mt-you); }
.mt-f-q { font-family: var(--font-display, inherit); font-size: 1.22rem; font-weight: 700; line-height: 1.3; }
.mt-f-given { padding-left: 1.2em; display: grid; gap: 2px; font-size: 0.97rem; }
.mt-f-think { color: var(--ink-2); font-size: 0.97rem; }
.mt-f-factors { display: grid; gap: 12px; }
.mt-f-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
.mt-f-row .label { white-space: normal; line-height: 1.3; text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.mt-f-row input { grid-column: 1 / -1; grid-row: 2; }
.mt-f-row input:disabled { opacity: 0.55; }
.mt-f-work { padding: 10px 14px; border-radius: 10px; background: var(--surface-2); font-variant-numeric: tabular-nums; display: grid; gap: 4px; }
.mt-f-work p { margin: 0; font-size: 0.95rem; }
.mt-f-work .mt-f-est { font-size: 1.06rem; }
.mt-f-msg { min-height: 1.3em; }
.mt-f-reveal { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); border-left: 6px solid var(--mt-src); background: var(--mt-paper); }
.mt-f-reveal p { margin: 0; font-size: 0.97rem; line-height: 1.5; }
.mt-f-reveal:focus { outline: none; }
.mt-f-verdict { font-size: 1.02rem !important; }
.mt-f-loglab { margin-top: 2px; }
.mt-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 4px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--mt-paper); font-size: 0.86rem; color: var(--ink-2); }
.mt-chip b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); color: var(--ink); font-size: 0.82rem; }
.mt-chip.is-here { border-color: var(--mt-you); border-width: 2.5px; }
.mt-chip.is-a { background: var(--mt-band-a); color: var(--ink); } .mt-chip.is-b { background: var(--mt-band-b); color: var(--ink); } .mt-chip.is-c { background: var(--mt-band-c); color: var(--ink); }
.mt-chip.is-locked { border-style: dashed; }
.mt-sw-a { background: var(--mt-band-a); border: 1px solid var(--line); } .mt-sw-b { background: var(--mt-band-b); border: 1px solid var(--line); } .mt-sw-c { background: var(--mt-band-c); border: 1px solid var(--line); }
.mt-f-note label { font-weight: 700; }
.mt-ruler .mt-band-a, rect.mt-band-a { fill: var(--mt-band-a); } .mt-ruler .mt-band-b, rect.mt-band-b { fill: var(--mt-band-b); }
.mt-mk-p { stroke: none; } .mt-mk-l { stroke-width: 2.5; fill: none; } .mt-mk-thin { stroke-width: 1.2; }
.mt-mk.is-you .mt-mk-p { fill: var(--mt-you); } .mt-mk.is-you .mt-mk-l { stroke: var(--mt-you); } .mt-mk.is-you text { fill: var(--mt-you); }
.mt-mk.is-lock .mt-mk-p { fill: var(--mt-you); } .mt-mk.is-lock .mt-mk-l { stroke: var(--mt-you); } .mt-mk.is-lock text { fill: var(--mt-you); }
.mt-mk.is-src .mt-mk-p { fill: var(--mt-src); } .mt-mk.is-src .mt-mk-l { stroke: var(--mt-src); } .mt-mk.is-src text { fill: var(--mt-src); }
.mt-mk.is-you .mt-mk-p { fill: var(--mt-paper); stroke: var(--mt-you); stroke-width: 2; }
.mt-mk text { paint-order: stroke; stroke: var(--mt-paper); stroke-width: 4px; stroke-linejoin: round; }
.mt-own-rows { display: grid; gap: 8px; }
.mt-own-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 0; padding: 8px 10px 10px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.mt-own-row legend { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); padding: 0 4px; }
.mt-own-row label, .mt-own-unit { display: grid; gap: 3px; font-size: 0.86rem; color: var(--ink-2); min-width: 0; }
.mt-own-row input, .mt-own-row select, .mt-own-unit input { min-width: 0; width: 100%; border: 1.5px solid var(--line); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 0.98rem; color: var(--ink); background: var(--surface); }
.mt-own-unit input { max-width: 16em; }
@media (max-width: 560px) { .mt-own-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ---------- drawings: materials ---------- */
.mt-p-sky { fill: var(--mt-sky); } .mt-p-ground { fill: var(--mt-ground); } .mt-p-sea, .mt-p-water { fill: var(--mt-water); opacity: 0.55; }
.mt-p-concrete { fill: var(--mt-concrete); stroke: var(--ink-2); stroke-width: 1; }
.mt-p-rebar { stroke: var(--mt-steel); stroke-width: 1.6; fill: none; }
.mt-p-steel { fill: var(--mt-steel); stroke: var(--ink-2); stroke-width: 0.8; } .mt-p-steel-line { stroke: var(--mt-steel); stroke-width: 3; fill: none; }
.mt-p-zinc { fill: none; stroke: var(--mt-alu); stroke-width: 4; }
.mt-p-cu { fill: var(--mt-copper); stroke: var(--ink-2); stroke-width: 0.8; } .mt-p-cu-line { stroke: var(--mt-copper); stroke-width: 4; fill: none; stroke-linecap: round; } .mt-p-cu-thin { stroke: var(--mt-copper); stroke-width: 2; fill: none; }
.mt-p-alu { fill: var(--mt-alu); stroke: var(--ink-2); stroke-width: 0.8; } .mt-p-alu-line { fill: none; stroke: var(--mt-alu); stroke-width: 9; stroke-linejoin: round; }
.mt-p-glass { fill: var(--mt-glass); fill-opacity: 0.4; stroke: var(--mt-glass); stroke-width: 1.5; } .mt-p-shine { stroke: #ffffff; stroke-width: 3; opacity: 0.6; fill: none; stroke-linecap: round; }
.mt-p-poly { fill: #f1eee4; stroke: var(--ink-2); stroke-width: 1; } .mt-p-cell { fill: #1f3a6b; stroke: #0f2345; stroke-width: 0.8; } .mt-p-silver { stroke: #dfe5ea; stroke-width: 0.9; fill: none; }
.mt-p-sun { fill: var(--mt-solar); } .mt-p-ray { stroke: var(--mt-solar); stroke-width: 2.5; stroke-dasharray: 8 7; fill: none; stroke-linecap: round; }
.mt-p-box, .mt-p-plant { fill: var(--surface-2); stroke: var(--ink-2); stroke-width: 1.2; } .mt-p-nacelle { fill: #e9edf0; stroke: var(--ink-2); stroke-width: 1; }
.mt-p-gen { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1; } .mt-p-blade { fill: #f4f6f7; stroke: var(--ink-2); stroke-width: 0.9; } .mt-p-nose { fill: #e9edf0; stroke: var(--ink-2); stroke-width: 1; }
.mt-p-magnet { fill: #c0392b; } .mt-p-magnet2 { fill: #2f6fb0; }
.mt-p-case { fill: none; stroke: var(--mt-alu); stroke-width: 8; } .mt-p-core { fill: var(--mt-steel); } .mt-p-core2 { fill: var(--mt-steel); opacity: 0.75; } .mt-p-lam { stroke: var(--mt-paper); stroke-width: 0.8; opacity: 0.55; fill: none; }
.mt-p-bearing { fill: var(--surface); stroke: var(--mt-steel); stroke-width: 4; } .mt-p-turn { stroke: var(--mt-paper); stroke-width: 2; stroke-dasharray: 10 14; fill: none; }
.mt-p-cath { fill: #5b7fb5; } .mt-p-cathdot { fill: #2f4f86; } .mt-p-elec { fill: var(--mt-band-b); opacity: 0.8; } .mt-p-sep { stroke: var(--ink-2); stroke-width: 2; stroke-dasharray: 3 4; fill: none; }
.mt-p-graphite { fill: #3a3f44; } .mt-p-layer { stroke: #6a7078; stroke-width: 1.2; fill: none; } .mt-p-wire { stroke: var(--ink-2); stroke-width: 2.5; fill: none; }
.mt-p-ion { fill: var(--mt-li); stroke: var(--mt-paper); stroke-width: 1.2; } .mt-p-electron { fill: var(--mt-solar); stroke: var(--ink); stroke-width: 0.6; }
.mt-p-coal { fill: var(--mt-coal); } .mt-p-stack { fill: #b9a898; stroke: var(--ink-2); stroke-width: 1; } .mt-p-cool { fill: var(--mt-concrete); stroke: var(--ink-2); stroke-width: 1; }
.mt-p-pipe { stroke: var(--mt-steel); stroke-width: 9; fill: none; } .mt-p-pipeflow { stroke: var(--mt-gas); stroke-width: 3; stroke-dasharray: 9 9; fill: none; }
.mt-p-rod { fill: var(--mt-nuclear); } .mt-p-waterflow { stroke: #ffffff; stroke-width: 3; stroke-dasharray: 9 8; fill: none; opacity: 0.9; } .mt-p-windline { stroke: var(--ink-2); stroke-width: 2; stroke-dasharray: 12 9; fill: none; opacity: 0.6; }
.mt-p-power { stroke: var(--mt-solar); stroke-width: 4; stroke-dasharray: 7 6; fill: none; } .mt-p-puff { fill: #6f747a; } .mt-p-steam { fill: #ffffff; opacity: 0.8; stroke: var(--line); stroke-width: 0.6; }
.mt-p-drum { fill: var(--mt-steel); stroke: var(--ink-2); stroke-width: 1; }
.mt-p-hull { fill: #5a6672; } .mt-p-tank { fill: var(--mt-gas); } .mt-p-road { fill: #4a5058; } .mt-p-lane { stroke: #f4f0d8; stroke-width: 3; stroke-dasharray: 22 18; fill: none; }

/* ---------- screen 2: inside the machines ---------- */
.mt-insvg .mt-part { cursor: pointer; }
.mt-insvg .mt-part.is-dim { opacity: 0.55; }
.mt-insvg .mt-part.is-on { filter: drop-shadow(0 0 3px var(--focus)) drop-shadow(0 0 1px var(--focus)); }
.mt-partlist .wd-opt.is-seen:not([aria-pressed="true"]) { border-color: var(--good); }
.mt-in-lead { color: var(--ink-2); }
.mt-in-read { display: grid; gap: 4px; min-height: 7.2em; } .mt-in-read p { margin: 0; }
.mt-bmode { display: inline-flex; }
.mt-b-ev { fill: var(--mt-you); } .mt-b-ice { fill: var(--mt-steel); } .mt-sw-ev { background: var(--mt-you); } .mt-sw-ice { background: var(--mt-steel); }

/* ---------- screen 3: building ---------- */
.mt-m-concrete { fill: var(--mt-concrete); background: var(--mt-concrete); } .mt-m-steel { fill: var(--mt-steel); background: var(--mt-steel); } .mt-m-glass { fill: var(--mt-glass); background: var(--mt-glass); }
.mt-m-alu { fill: var(--mt-alu); background: var(--mt-alu); } .mt-m-copper { fill: var(--mt-copper); background: var(--mt-copper); } .mt-m-other { fill: var(--mt-other); background: var(--mt-other); }
.mt-blk { stroke: var(--mt-paper); stroke-width: 0.6; }
.wd-opt:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- screen 4: land ---------- */
.mt-landgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .mt-landgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .mt-landgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mt-landcell { display: grid; gap: 4px; align-content: start; min-width: 0; } .mt-landcell p { margin: 0; font-size: 0.92rem; line-height: 1.4; }
.mt-landbox { position: relative; aspect-ratio: 1; border: 1px solid var(--ink-2); border-radius: 4px; background-color: var(--mt-paper);
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px), linear-gradient(to top, var(--line) 1px, transparent 1px); background-size: 11.111% 11.111%; background-position: left bottom; overflow: hidden; }
.mt-landsq { position: absolute; left: 0; bottom: 0; min-width: 2px; min-height: 2px; border: 1.5px solid var(--ink); }
.mt-sq-wide { border: 2px dashed var(--ink); background: repeating-linear-gradient(45deg, transparent 0 7px, rgba(120, 130, 140, 0.28) 7px 9px); }
.mt-sq-nuclear { background: var(--mt-nuclear); } .mt-sq-gas { background: var(--mt-gas); } .mt-sq-hydro { background: var(--mt-hydro); } .mt-sq-coal { background: var(--mt-coal); } .mt-sq-solar { background: var(--mt-solar); } .mt-sq-wind { background: var(--mt-wind); }
.mt-land-w { font-weight: 700; }

/* ---------- screen 5: ore and rock ---------- */
.mt-heap-ore { fill: var(--mt-rock); stroke: var(--mt-rock-2); stroke-width: 1.5; } .mt-heap-tail { fill: var(--mt-tail); stroke: var(--mt-rock-2); stroke-width: 1.5; }
.mt-dot-ore { fill: var(--mt-rock-2); } .mt-dot-tail { fill: var(--mt-tail); stroke: var(--mt-rock-2); stroke-width: 0.6; }
.mt-b-fuel { fill: var(--mt-coal); } .mt-b-build { fill: var(--mt-copper); } .mt-sw-fuel { background: var(--mt-coal); } .mt-sw-build { background: var(--mt-copper); }
.mt-rockrow { cursor: pointer; } .mt-rockrow.is-on rect { stroke: var(--focus); stroke-width: 3; }
.mt-rockrows { margin-top: 4px; }

/* ---------- screen 6: running ---------- */
.mt-b-coal { fill: var(--mt-coal); } .mt-b-gas { fill: var(--mt-gas); } .mt-b-nuclear { fill: var(--mt-nuclear); } .mt-b-hydro { fill: var(--mt-hydro); } .mt-b-wind { fill: var(--mt-wind); } .mt-b-solar { fill: var(--mt-solar); }
.mt-introw.is-on text { fill: var(--ink); } .mt-introw.is-on rect { stroke: var(--focus); stroke-width: 3; }
.mt-run-read { display: grid; gap: 6px; } .mt-run-read p { margin: 0; }

/* ---------- screen 7: copper ---------- */
.mt-a-old { fill: var(--mt-steel); } .mt-a-new { fill: var(--mt-copper); } .mt-a-rec { fill: var(--mt-wind); } .mt-a-gap { fill: var(--mt-no); fill-opacity: 0.3; }
.mt-l-dem { stroke: var(--ink); stroke-width: 3; fill: none; }
.mt-s-old { background: var(--mt-steel); } .mt-s-new { background: var(--mt-copper); } .mt-s-rec { background: var(--mt-wind); } .mt-s-dem { background: var(--ink); } .mt-s-gap { background: var(--mt-no); opacity: 0.4; }
.mt-lead { stroke: var(--ink); stroke-width: 1.8; fill: none; } .mt-lead.is-late { opacity: 0.45; } .mt-lead-dot { fill: var(--ink); } .mt-lead-head { stroke: var(--ink); stroke-width: 1.6; fill: none; }

/* ---------- screen 8: the fleet and the judgement ---------- */
.mt-ship { transition: opacity 0.4s; } .mt-ship.is-gone { opacity: 0.12; }
.mt-car-body { fill: #c9ced3; stroke: #23282d; stroke-width: 1; transition: fill 0.3s; } .mt-car-wheel { fill: #16191c; } .mt-car-bolt { fill: none; }
.mt-car.is-ev .mt-car-body { fill: var(--mt-you); } .mt-car.is-ev .mt-car-bolt { fill: #ffe27a; }
.mt-b-track { fill: var(--surface-2); }
.mt-impacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .mt-impacts { grid-template-columns: minmax(0, 1fr); } }
.mt-impact { display: grid; gap: 8px; align-content: start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); border-left: 6px solid var(--line); background: var(--mt-paper); min-width: 0; }
.mt-impact > * { margin: 0; } .mt-impact h4 { font-size: 1.02rem; } .mt-impact p { font-size: 0.95rem; line-height: 1.5; }
.mt-impact textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; color: var(--ink); background: var(--surface); }
.mt-impact[data-r="good"] { border-left-color: var(--mt-ok); } .mt-impact[data-r="bad"] { border-left-color: var(--mt-no); } .mt-impact[data-r="both"] { border-left-color: var(--mt-warn); } .mt-impact[data-r="unsure"] { border-left-color: var(--ink-2); }

/* ---------- screen 9: all the estimates ---------- */
.mt-caldot circle { stroke: var(--ink); stroke-width: 1.5; } .mt-caldot.is-a circle { fill: var(--mt-band-a); } .mt-caldot.is-b circle { fill: var(--mt-band-b); } .mt-caldot.is-c circle { fill: var(--mt-band-c); }
.mt-caln { fill: var(--ink); }

/* ---------- movement, only for readers who haven't asked for less ---------- */
@media (prefers-reduced-motion: no-preference) {
  .mt-spin { animation: mt-spin 7s linear infinite; } .mt-spin2 { animation-duration: 9s; }
  .mt-flow { animation: mt-flow 1.4s linear infinite; }
  .mt-insvg .mt-p-cu-line.mt-flow, .mt-insvg .mt-p-cu-thin.mt-flow { stroke-dasharray: 10 6; }
  .mt-mk.is-new { animation: mt-drop 0.6s ease-out both; }
  .mt-landsq { transition: width 0.5s ease, height 0.5s ease, opacity 0.3s; }
  .mt-steam { animation: mt-rise 3s ease-in-out infinite; }
}
@keyframes mt-spin { to { rotate: 360deg; } }
@keyframes mt-flow { to { stroke-dashoffset: -32; } }
@keyframes mt-drop { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }
@keyframes mt-rise { 0%, 100% { translate: 0 0; opacity: 0.85; } 50% { translate: 0 -6px; opacity: 1; } }
@media (max-width: 620px) { .mt-f-row { grid-template-columns: minmax(0, 1fr); } .mt-f-row output { justify-self: start; grid-row: 3; } }
