/* Carbon Courier: route map on the left, route slip on the right (fits the 1366×768 stage, ~1066×628). */
.cc-stage,.cc-example{--cc-sky1:#9fd3f2;--cc-sky2:#e3f3fb;--cc-hill1:#9fcf7a;--cc-hill2:#79b65a;--cc-grass1:#86c45c;--cc-grass2:#5c9d3c;--cc-soil1:#8a6440;--cc-soil2:#5b3f26;
  --cc-water1:#3d93c4;--cc-water2:#123f66;--cc-depot1:#ffffff;--cc-depot2:#dde7ea;--cc-ink:#17262d;--cc-pill:#ffffffee;--cc-route:#d9480f;--cc-sun:#ffd34d;--cc-accent:#1d6b52}
[data-theme=dark] .cc-stage,[data-theme=dark] .cc-example{--cc-sky1:#0f1f3d;--cc-sky2:#2b3f63;--cc-hill1:#3d6a3a;--cc-hill2:#2c5530;--cc-grass1:#36633a;--cc-grass2:#24462a;--cc-soil1:#4a3522;--cc-soil2:#2c2015;
  --cc-water1:#1b4f73;--cc-water2:#071d33;--cc-depot1:#e9eef0;--cc-depot2:#b9c6cc;--cc-ink:#f1f5f4;--cc-pill:#1c2730ee;--cc-route:#ff8a4c;--cc-sun:#e9e4c8;--cc-accent:#5fd0a5}

.cc-stage{position:absolute;inset:0;display:grid;grid-template-columns:minmax(0,1fr) 372px;gap:12px;padding:10px;overflow:hidden;color:var(--tlg-text,#172033);font-size:16px}
.cc-map-host{min-width:0;min-height:0;container-type:size;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}
.cc-map{position:relative;flex:none;width:min(100cqw,calc((100cqh - 54px) * 1.2));aspect-ratio:720/600;border:3px solid var(--tlg-border-strong,#475569);border-radius:18px;overflow:hidden;background:var(--cc-sky2);box-shadow:0 8px 22px #0f172a2e}
.cc-svg{display:block;width:100%;height:100%}
.cc-lbl{font-family:var(--tlg-font,system-ui,sans-serif);font-size:20px;font-weight:800;fill:var(--cc-ink)}
.cc-lbl--sm{font-size:18px;font-weight:700}.cc-lbl--light{fill:#ffffff}.cc-lbl--tag{font-size:17px;fill:#ffffff;letter-spacing:.04em}
.cc-lbl--atom{font-size:13px;fill:#ffffff}.cc-lbl--atom-big{font-size:18px;fill:#ffffff}.cc-lbl--badge{font-size:18px;fill:#ffffff}
.cc-lbl--carrier{font-size:18px;fill:#2a1d00}.cc-lbl--pill{font-size:18px;font-weight:800}.cc-lbl--energy{font-size:18px;font-weight:800}.cc-lbl--stamp{font-size:24px;fill:#0f6b3a;letter-spacing:.08em}
.cc-sun{fill:var(--cc-sun)}.cc-sun-halo{fill:var(--cc-sun);opacity:.25}
.cc-deco-cloud{fill:#ffffff;opacity:.75}[data-theme=dark] .cc-deco-cloud{opacity:.18}
.cc-smoke{fill:#c7ced6;opacity:.55}

/* links: one-way arrows */
.cc-link{stroke:#26343c;stroke-opacity:.55;stroke-width:4.5;stroke-linecap:round}
.cc-arrowhead{fill:#26343c;fill-opacity:.7}
[data-theme=dark] .cc-link{stroke:#e6eef2;stroke-opacity:.6}[data-theme=dark] .cc-arrowhead{fill:#e6eef2;fill-opacity:.8}
.cc-link.is-used{stroke:#f2b705;stroke-opacity:1;stroke-width:7}

/* the student's route (echo only) */
.cc-route-leg{stroke:var(--cc-route);stroke-width:5;stroke-dasharray:12 9;stroke-linecap:round;opacity:.9}
.cc-route-leg.is-active{stroke-width:6.5}
.cc-route-head{fill:var(--cc-route)}
.cc-route-leg.is-ok{stroke:#1f8a4c;stroke-dasharray:none;opacity:.55}.cc-route-leg.is-warn{stroke:#c77700;opacity:.7}.cc-route-leg.is-bad{stroke:#c62828;opacity:.95}
.cc-leg-badge circle{fill:var(--cc-route);stroke:#ffffff;stroke-width:2.5}

/* depots */
.cc-depot{cursor:pointer;outline:none}
.cc-pad{stroke:#33444d;stroke-width:2.5}
.cc-ring{fill:none;stroke:transparent;stroke-width:5}
.cc-depot:hover .cc-ring{stroke:var(--cc-accent);stroke-dasharray:6 5}
.cc-depot:focus-visible .cc-ring{stroke:var(--tlg-focus,#2563eb);stroke-width:6}
.cc-depot.is-stop .cc-pad{stroke:var(--cc-route);stroke-width:4.5}
.cc-depot.is-start .cc-pad{stroke:#1f8a4c;stroke-width:5}
.cc-depot.is-end .cc-pad{stroke:#b45309;stroke-width:5;stroke-dasharray:8 5}
.cc-name-bg{fill:var(--cc-pill);stroke:#33444d55;stroke-width:1.5}
.cc-tag rect{stroke:#ffffff;stroke-width:2}.cc-tag--start rect{fill:#1f7a45}.cc-tag--end rect{fill:#a24a07}
.is-locked .cc-depot{cursor:default}.is-locked .cc-depot:hover .cc-ring{stroke:transparent}
.cc-note rect{fill:var(--cc-pill);stroke:#33444d55}
.cc-count rect{fill:#17262dcc}

/* reveal */
.cc-token-glow{fill:#ffd75e;opacity:.45}
.cc-token-wrap .cc-carrier rect{fill:#ffe48a;stroke:#7a5410;stroke-width:2}
.cc-token-wrap[data-form=dic] .cc-carrier rect{fill:#bfe6ff;stroke:#1d5f8f}.cc-token-wrap[data-form=co2] .cc-carrier rect{fill:#eef2f5;stroke:#4b5763}
.cc-token-wrap[data-form=organic] .cc-carrier rect{fill:#c8ef9e;stroke:#2f7d32}.cc-token-wrap[data-form=fuel] .cc-carrier rect{fill:#d5d9de;stroke:#14161a}
.cc-token-wrap.is-stuck .cc-token-glow{fill:#c62828}
.cc-map:not(.is-done) .cc-token-glow{animation:cc-pulse .9s ease-in-out infinite alternate}
.cc-pill rect{fill:var(--cc-pill);stroke-width:2.5}.cc-pill--ok rect{stroke:#1f8a4c}.cc-pill--warn rect{stroke:#c77700}.cc-pill--bad rect{stroke:#c62828}
.cc-pill text{fill:var(--cc-ink)}
.cc-ray{stroke:#f2b705;stroke-width:5;stroke-linecap:round;stroke-dasharray:10 8;animation:cc-dash .6s linear infinite}
.cc-heat{stroke:#e8590c;stroke-width:4;fill:none;stroke-linecap:round;animation:cc-rise 1.1s ease-out infinite}
.cc-energy--in .cc-lbl--energy{fill:#8a6100}.cc-energy--out .cc-lbl--energy{fill:#b3410b}
[data-theme=dark] .cc-energy--in .cc-lbl--energy{fill:#ffd75e}[data-theme=dark] .cc-energy--out .cc-lbl--energy{fill:#ffa26b}
.cc-energy text{paint-order:stroke;stroke:var(--cc-pill);stroke-width:5px}
.cc-stamp rect{fill:#e9f8ef;stroke:#0f6b3a;stroke-width:4}
.cc-stamp{animation:cc-stamp .35s ease-out both}
.cc-banner-slot{flex:none;height:48px;display:flex;align-items:center;justify-content:center;max-width:100%}
.cc-banner{max-width:100%;padding:6px 14px;border-radius:12px;font-size:17px;font-weight:800;text-align:center;box-shadow:0 4px 14px #0003;width:max-content}
.cc-banner--ok{background:#e7f6ec;color:#0f5132;border:2px solid #1f8a4c}.cc-banner--warn{background:#fff4dc;color:#6b4300;border:2px solid #c77700}.cc-banner--bad{background:#fdecea;color:#7f1d1d;border:2px solid #c62828}
@keyframes cc-pulse{to{opacity:.15}}
@keyframes cc-dash{to{stroke-dashoffset:-18}}
@keyframes cc-rise{from{transform:translateY(0);opacity:1}to{transform:translateY(-16px);opacity:.15}}
@keyframes cc-stamp{from{opacity:0;transform:scale(1.6)}}
.cc-stamp{transform-box:fill-box;transform-origin:center}

/* route slip */
.cc-slip{min-width:0;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:6px;padding:10px 12px;background:var(--tlg-surface,#fff);border:2px solid var(--tlg-border,#cbd5e1);border-radius:16px;
  background-image:repeating-linear-gradient(0deg,transparent 0 31px,color-mix(in srgb,var(--cc-accent) 8%,transparent) 31px 32px)}
.cc-slip-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.cc-slip-title{margin:0;font-size:20px}
.cc-clear{font:inherit;font-size:16px;font-weight:700;min-height:36px;padding:4px 12px;border-radius:999px;border:2px solid var(--tlg-border-strong,#64748b);background:transparent;color:var(--tlg-text);cursor:pointer}
.cc-clear:focus-visible,.cc-select:focus-visible{outline:3px solid var(--tlg-focus,#2563eb);outline-offset:2px}
.cc-slip-sum{margin:0;font-size:17px}
.cc-tip{margin:0;font-size:16px;color:var(--tlg-text-muted,#475569);min-height:1.2em}
.cc-legs{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.cc-leg{border:2px solid var(--tlg-border,#cbd5e1);border-radius:12px;padding:6px 10px 8px;background:var(--tlg-surface,#fff);transition:border-color .15s,box-shadow .15s}
.cc-leg.is-active{border-color:var(--cc-route);box-shadow:0 0 0 3px color-mix(in srgb,var(--cc-route) 22%,transparent)}
.cc-leg-top{display:flex;align-items:center;gap:8px;margin-bottom:4px}
.cc-leg-num{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--cc-route);color:#fff;font-weight:800;flex:none}
.cc-leg.is-set .cc-leg-num{background:var(--cc-accent);color:#fff}
[data-theme=dark] .cc-leg.is-set .cc-leg-num{color:#08261c}
.cc-leg-from{flex:1;font-size:16px}
.cc-leg-icon svg{display:block;width:34px;height:34px}
.cc-mini-pad{fill:#eef3f4;stroke:#33444d;stroke-width:3}.cc-mini-empty{fill:none;stroke:var(--tlg-border-strong,#64748b);stroke-width:4;stroke-dasharray:8 6}
.cc-mini-q{font:800 40px var(--tlg-font,system-ui);fill:var(--tlg-text-muted,#64748b)}
.cc-leg-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.cc-fld{display:grid;gap:2px;min-width:0}
.cc-fld-l{font-size:16px;font-weight:700}
.cc-select{font:inherit;font-size:16px;min-height:44px;width:100%;min-width:0;border:2px solid var(--tlg-border-strong,#64748b);border-radius:10px;padding:6px 8px;background:var(--tlg-surface,#fff);color:var(--tlg-text)}
.cc-select:disabled{opacity:1;background:var(--tlg-bg-band,#f1f5f9)}
.cc-proc-desc{margin:3px 0 0;font-size:16px;color:var(--tlg-text-muted,#475569);min-height:0}
.cc-proc-desc:empty{display:none}
.cc-report{border:2px solid var(--cc-accent);border-radius:12px;padding:8px 10px;display:grid;gap:6px}
.cc-report-h{margin:0;font-size:18px}
.cc-rules{border:1px solid var(--tlg-border,#cbd5e1);border-radius:10px;padding:6px 10px;font-size:16px}
.cc-rules summary{cursor:pointer;font-weight:700;min-height:32px;display:flex;align-items:center}
.cc-rules ul{margin:4px 0;padding-left:20px}.cc-rules li{margin:2px 0}
.cc-rules-note{margin:6px 0 0;color:var(--tlg-text-muted,#475569)}

/* briefing example */
.cc-example{max-width:560px;margin:0 auto;border:3px solid var(--tlg-border-strong,#475569);border-radius:16px;overflow:hidden}
.cc-example .cc-svg{height:auto}

@media (max-width:900px){
  .cc-stage{position:static;display:flex;flex-direction:column;overflow:visible}
  .cc-map-host{container-type:normal;display:block;overflow-x:auto;border-radius:18px}.cc-banner-slot{height:auto;min-height:0;margin-top:6px}.cc-map{width:100%;min-width:600px}.cc-svg{height:auto}
  .cc-slip{overflow:visible}
}
@media (max-width:420px){.cc-leg-row{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.cc-stage *,.cc-example *{animation:none!important;transition:none!important}}
.cc-leg-badge.is-ok circle{fill:#1f8a4c}.cc-leg-badge.is-warn circle{fill:#b86e00}.cc-leg-badge.is-bad circle{fill:#c62828}
.cc-leg-res{margin:4px 0 0;font-size:16px;font-weight:700;padding:3px 8px;border-radius:8px}
.cc-leg-res--ok{background:#e7f6ec;color:#0f5132}.cc-leg-res--warn{background:#fff4dc;color:#6b4300}.cc-leg-res--bad{background:#fdecea;color:#7f1d1d}
