/* Why It Matters 04: the missing middle (deck slide 5) and the concentration rings (deck A3).
   Desktop: a 1200 x 480 stage, everything placed in % so it scales. Under 1040px: one column, top to bottom.
   Motion uses the site's build engine (motion.js): [data-build] figures, [data-reveal] items, [data-draw] lines. */

/* ---------- Rings: access to the mineral is only the starting point ---------- */
.mm-rings{display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,2fr);gap:20px 56px;align-items:center;margin:44px 0 56px;padding:34px 0 26px;border-block:1px solid var(--line)}
.mm-rings-head h3{font:400 clamp(24px,2.2vw,29px)/1.3 Georgia,'Times New Roman',serif;color:var(--ivory);margin:0 0 14px}
.mm-rings-head p{font-size:16px;line-height:1.7;color:#bfd2cc;margin:0}
.mm-ring-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;text-align:center}
.mm-ring h4{font:400 16px/1.35 Arial,Helvetica,sans-serif;color:var(--ivory);margin:0}
.mm-ring-art{position:relative;width:min(168px,100%);aspect-ratio:1;margin:16px auto 14px}
.mm-ring-art svg{width:100%;height:100%;display:block}
.mm-ring-art circle{fill:none;stroke-width:13;transform:rotate(-90deg);transform-origin:50% 50%;transform-box:fill-box}
.mm-track{stroke:#299486}
.mm-arc{stroke:#c9783f;stroke-dasharray:var(--v) 1;stroke-dashoffset:0}
.mm-ring-art strong{position:absolute;inset:0;display:grid;place-items:center;font:400 clamp(28px,2.6vw,36px)/1 Georgia,'Times New Roman',serif;color:var(--ivory)}
.mm-ring p{margin:0;font-size:14px;line-height:1.6}
.mm-ring p.mm-china{color:#dfaa82}
.mm-ring p.mm-other{color:#80c4b7}
.mm-rings figcaption{grid-column:1/-1;margin-top:10px}

/* The lead-in: why the rings follow the permanent magnet. Reads like the site's bridge lines; never animates. */
.mm-lead-in{max-width:900px;margin:36px 0 0;font:italic clamp(19px,1.6vw,22px)/1.55 Georgia,'Times New Roman',serif;color:#9fdcd2;text-wrap:pretty}
.mm-lead-in span{font-style:normal;margin-left:4px}
.mm-lead-in+.mm-rings{margin-top:30px}

/* ---------- The chain ---------- */
.mm-flow{margin:0}
.mm-stage{position:relative;aspect-ratio:1200/480;width:100%;container-type:inline-size}
.mm-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.mm-line{fill:none;stroke:#7cc8bb;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.mm-join{fill:#f3f0e8}
.mm-tie{fill:none;stroke:rgba(201,120,63,.75);stroke-width:1.3;stroke-dasharray:4 4}
.mm-later-line{fill:none;stroke:#7cc8bb;stroke-width:1.3;stroke-dasharray:5 5}
.mm-later-head{fill:none;stroke:#7cc8bb;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.mm-group{position:absolute}
.mm-group>*{position:absolute;box-sizing:border-box;margin:0}

.mm-frame{border:1.5px solid rgba(201,120,63,.8);border-radius:12px;background:rgba(255,255,255,.025)}
.mm-pill{display:flex;align-items:center;justify-content:center;gap:0 6px;border-radius:999px;font-size:clamp(11px,1.05cqw,13px);line-height:1;white-space:nowrap;color:#dce8e5;border:1px solid #5f9c90}
.mm-pill strong{font-weight:400;letter-spacing:.14em;text-transform:uppercase;color:var(--ivory)}
.mm-pill-mid{background:#c9783f;border-color:#c9783f;color:#081b23}
.mm-pill-mid strong{color:#081b23}

.mm-node{display:flex;align-items:center;justify-content:center;gap:12px;padding:10px 14px;border:1px solid #5f9c90;border-radius:8px;background:rgba(12,38,46,.94);text-align:center}
.mm-node h3{font:400 clamp(15px,1.6cqw,19.5px)/1.22 Georgia,'Times New Roman',serif;color:var(--ivory);margin:0;text-wrap:balance}
.mm-node p{font-size:clamp(12px,1.2cqw,14.5px);line-height:1.35;color:#bfd2cc;margin:4px 0 0}
.mm-src{justify-content:flex-start;text-align:left}
.mm-node .role-icon{width:clamp(26px,2.9cqw,34px);height:clamp(26px,2.9cqw,34px)}
.mm-use{background:#f3f0e8;border-color:#f3f0e8}
.mm-use h3{color:#0b1c26}
.mm-use p{color:#2c4a4c}
.mm-mend{background:rgba(12,38,46,.6)}
.mm-mend h3{font-family:Arial,Helvetica,sans-serif;font-size:clamp(14px,1.4cqw,17px)}
.mm-back{background:#299486;border-color:#299486}
.mm-back h3{color:#061a1f}

.mm-stop{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 10px;border:1.3px dashed rgba(201,120,63,.75);border-radius:8px;text-align:center}
.mm-stop p{font-size:clamp(12.5px,1.28cqw,15.5px);line-height:1.35;color:#e6ece9;margin:0;text-wrap:balance}
.mm-stop .mm-stop-k{font-size:clamp(10.5px,1cqw,12px);letter-spacing:.12em;text-transform:uppercase;color:#dfaa82;margin-bottom:5px}

.mm-note{display:flex;align-items:center;font-size:clamp(13px,1.33cqw,16px);line-height:1.55;color:#c8d7d2}
.mm-later{font:italic clamp(13px,1.33cqw,16px)/1.4 Georgia,'Times New Roman',serif;color:#9fdcd2;white-space:nowrap}
.mm-later-up,.mm-later-to{display:none}
.mm-flow figcaption{margin-top:22px}

/* ---------- Motion (only when motion.js runs; reduced motion shows the finished state) ---------- */
.mm-rings{--stagger:420ms}
.mm-flow{--stagger:190ms}
.motion .mm-rings .mm-arc{transition:stroke-dashoffset 1.05s cubic-bezier(.3,.6,.2,1);transition-delay:calc(var(--i,0) * var(--stagger) + .2s)}
.motion .mm-rings:not(.is-built) .mm-arc,
.motion .mm-rings.per-item .mm-ring:not(.is-in) .mm-arc{stroke-dashoffset:var(--v)}
.motion .mm-flow [data-draw]{stroke-dasharray:1;transition:stroke-dashoffset .5s cubic-bezier(.3,.6,.2,1);transition-delay:calc(var(--i,0) * var(--stagger))}
.motion .mm-flow:not(.is-built) [data-draw]{stroke-dashoffset:1}
.motion .mm-flow.is-built [data-draw]{stroke-dashoffset:0}
.motion .mm-flow .mm-fade{transition:opacity .5s ease;transition-delay:calc(var(--i,0) * var(--stagger))}
.motion .mm-flow:not(.is-built) .mm-fade{opacity:0}
/* The Can Stop If cards drop into place (top to bottom). */
.motion .mm-flow:not(.is-built) .mm-stop,
.motion .mm-flow.per-item .mm-stop:not(.is-in){translate:0 -12px}
.motion .mm-flow.is-done [data-draw],.motion .mm-flow.is-done .mm-fade,.motion .mm-rings.is-done .mm-arc{transition-delay:0s}
.motion-init .mm-flow [data-draw],.motion-init .mm-flow .mm-fade,.motion-init .mm-rings .mm-arc{transition:none!important}
@media (prefers-reduced-motion:reduce){
  .motion .mm-flow [data-draw],.motion .mm-rings .mm-arc{stroke-dashoffset:0!important;transition:none!important}
  .motion .mm-flow [data-draw]{stroke-dasharray:none!important}
  .motion .mm-flow .mm-fade{opacity:1!important;transition:none!important}
}
@media print{
  .motion .mm-flow [data-draw]{stroke-dasharray:none!important;stroke-dashoffset:0!important}
  .motion .mm-flow .mm-fade{opacity:1!important}
  .motion .mm-rings .mm-arc{stroke-dashoffset:0!important}
}

/* ---------- Tablet and phone: one column, top to bottom ---------- */
@media (max-width:1040px){
  .mm-rings{grid-template-columns:1fr;gap:26px;margin:36px 0 44px}
  .mm-lead-in{margin-top:30px;font-size:19px}
  .mm-lead-in+.mm-rings{margin-top:24px}
  .mm-stage{aspect-ratio:auto;display:flex;flex-direction:column;gap:34px;container-type:normal}
  .mm-lines{display:none}
  .mm-group{position:relative;left:auto!important;top:auto!important;width:auto!important;height:auto!important}
  .mm-group>*{position:relative;left:auto!important;top:auto!important;width:auto!important;height:auto!important}
  .mm-group:not(.mm-reuse)::after{content:'\2193';position:absolute;left:50%;bottom:-30px;translate:-50% 0;color:#7cc8bb;font-size:20px;line-height:1}
  .mm-up{display:grid;gap:10px}
  .mm-mid{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:14px;border:1.5px solid rgba(201,120,63,.8);border-radius:12px;background:rgba(255,255,255,.025)}
  .mm-down{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  .mm-frame{display:none}
  .mm-down .mm-use{grid-column:1/-1}
  .mm-pill{grid-column:1/-1;justify-self:start;padding:8px 14px;font-size:12px;white-space:normal}
  .mm-node{min-height:64px;padding:12px 14px}
  .mm-node h3{font-size:18px}
  .mm-node p{font-size:14px}
  .mm-mend h3{font-size:16px}
  .mm-node .role-icon{width:30px;height:30px}
  .mm-stop{padding:10px}
  .mm-stop p{font-size:14px}
  .mm-stop .mm-stop-k{font-size:11px}
  .mm-reuse{display:grid;gap:30px;padding-top:26px;border-top:1px dashed rgba(124,200,187,.45)}
  .mm-reuse .mm-node:not(.mm-back)::after{content:'\2193';position:absolute;left:50%;bottom:-25px;translate:-50% 0;color:#7cc8bb;font-size:18px;line-height:1}
  .mm-note{font-size:15px;margin-top:-10px}
  .mm-later{white-space:normal;font-size:16px;order:5}
  .mm-later-up,.mm-later-to{display:inline}
}
@media (max-width:520px){
  .mm-ring-list{gap:12px}
  .mm-ring h4{font-size:13px;min-height:2.7em}
  .mm-ring-art{width:min(96px,100%);margin:10px auto}
  .mm-ring-art circle{stroke-width:15}
  .mm-ring-art strong{font-size:22px}
  .mm-ring p{font-size:12.5px;line-height:1.45}
  .mm-node h3{font-size:16.5px}
  .mm-stop p{font-size:13.5px}
}
