/* Terminus (owner 2026-10-12): the flagship scavenger page. Toxic green (the server's color) on rust and soot.
   Effects: parallax layers, dust canvas, reveal on scroll, counters, the loot minigame. All of it stops under
   prefers-reduced-motion. Art slots fall back to CSS until Web Visuals delivers (data-tm-art). */
.tm {
  --tm-acc: #a1e68e; --tm-acc-hi: #dcffd0; --tm-acc-dim: rgba(161, 230, 142, 0.12); --tm-acc-line: rgba(161, 230, 142, 0.38);
  --tm-rust: #ff8a3d; --tm-rust-dim: rgba(255, 138, 61, 0.14); --tm-dead: #ff6b5a;
  --tm-bg: #07090a; --tm-panel: #111512; --tm-panel-2: #171c18; --tm-line: #263028; --tm-text: #eef3ec; --tm-muted: #a3ad9f;
  --t-trash: #8d968a; --t-common: #e9efe6; --t-uncommon: #7fd6ff; --t-rare: #c48bff; --t-elite: #ffcf4d;
  background: var(--tm-bg); color: var(--tm-text); overflow-x: clip;
  font-family: "Inter", system-ui, sans-serif;
}
.tm *, .tm *::before, .tm *::after { box-sizing: border-box; }
.tm img { max-width: 100%; }
.tm-wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ---------- buttons ---------- */
.tm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; min-height: 48px; padding: 0.8rem 1.4rem; border-radius: 12px; font: 800 1rem/1 "Inter", system-ui, sans-serif; letter-spacing: 0.02em; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; }
.tm-btn svg { width: 18px; height: 18px; }
.tm-btn.is-main { color: #0b1209; background: linear-gradient(180deg, #d4ffc6, var(--tm-acc)); box-shadow: 0 0 0 1px rgba(161, 230, 142, 0.6), 0 10px 30px -8px rgba(161, 230, 142, 0.55); }
.tm-btn.is-main:hover, .tm-btn.is-main:focus-visible { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(161, 230, 142, 0.8), 0 16px 40px -8px rgba(161, 230, 142, 0.7); }
.tm-btn.is-ghost { color: var(--tm-acc-hi); background: rgba(0, 0, 0, 0.35); border: 1px solid var(--tm-acc-line); }
.tm-btn.is-ghost:hover, .tm-btn.is-ghost:focus-visible { background: var(--tm-acc-dim); transform: translateY(-2px); }
.tm-link { color: var(--tm-acc); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(161, 230, 142, 0.45); }
.tm-link:hover, .tm-link:focus-visible { text-decoration-color: var(--tm-acc); }

/* ---------- hero ---------- */
.tm-hero { position: relative; min-height: min(100svh, 920px); display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.tm-layers { position: absolute; inset: 0; z-index: -1; }
.tm-layer { position: absolute; inset: -12% 0; will-change: transform; }
/* placeholder art until Visuals delivers: a dusk sky over a ruined skyline, built from gradients */
.tm-l-sky { background: radial-gradient(70rem 40rem at 70% 18%, rgba(255, 138, 61, 0.28), transparent 60%), radial-gradient(50rem 30rem at 20% 10%, rgba(161, 230, 142, 0.12), transparent 65%), linear-gradient(180deg, #1a1410 0%, #0d0f0c 55%, #07090a 100%); }
.tm-l-art { background:
    linear-gradient(180deg, transparent 52%, rgba(7, 9, 10, 0.9) 78%),
    repeating-linear-gradient(90deg, transparent 0 7%, rgba(20, 24, 21, 0.95) 7% 9.5%, transparent 9.5% 13%, rgba(16, 20, 17, 0.95) 13% 17%, transparent 17% 21%) bottom / 100% 34% no-repeat; }
.tm-l-art.has-art { background-size: cover; background-position: 62% 40%; }
.tm-l-fog { background: radial-gradient(60rem 14rem at 50% 82%, rgba(161, 230, 142, 0.10), transparent 70%), radial-gradient(40rem 10rem at 15% 70%, rgba(255, 255, 255, 0.05), transparent 70%); }
.tm-l-shade { inset: 0; background: linear-gradient(90deg, rgba(7, 9, 10, 0.92) 0%, rgba(7, 9, 10, 0.55) 45%, rgba(7, 9, 10, 0.1) 75%), linear-gradient(0deg, var(--tm-bg) 0%, transparent 30%); }
.tm-dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tm-hero-inner { position: relative; width: min(1180px, 100% - 32px); margin-inline: auto; padding: 6.5rem 0 5rem; }
.tm-crumbs { margin-bottom: 1.4rem; }
.tm-crumbs a, .tm-crumbs span { color: rgba(238, 243, 236, 0.7); }
.tm-kicker { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0; font: 800 0.8rem/1 "Inter", system-ui, sans-serif; letter-spacing: 0.28em; text-transform: uppercase; color: var(--tm-acc); }
.tm-blip { width: 9px; height: 9px; border-radius: 50%; background: var(--tm-acc); box-shadow: 0 0 0 0 rgba(161, 230, 142, 0.7); animation: tm-blip 2s ease-out infinite; }
@keyframes tm-blip { 0% { box-shadow: 0 0 0 0 rgba(161, 230, 142, 0.7); } 100% { box-shadow: 0 0 0 14px rgba(161, 230, 142, 0); } }
.tm-title { position: relative; margin: 0.6rem 0 0.4rem; font-family: "Cinzel", serif; font-weight: 800; font-size: clamp(2.5rem, 12.5vw, 8.5rem); line-height: 0.92; letter-spacing: 0.04em; text-transform: uppercase; color: #f4fff0; text-shadow: 0 0 40px rgba(161, 230, 142, 0.35), 0 4px 0 rgba(0, 0, 0, 0.6); }
/* a faint glitch slice: the world is not quite the Rust you know */
.tm-title::after { content: attr(data-glitch); }
.tm-laws { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; }
.tm-law { font: 800 clamp(1.25rem, 3.4vw, 2rem)/1.15 "Inter", system-ui, sans-serif; letter-spacing: -0.01em; }
.tm-law { display: inline-flex; align-items: center; gap: 0.5rem; }
.tm-law b { font-weight: 900; }
.tm-fact { width: 28px; height: 28px; flex: 0 0 auto; filter: drop-shadow(0 0 8px rgba(255, 217, 100, 0.35)); }
.tm-law .tm-fact { width: clamp(24px, 3.4vw, 32px); height: clamp(24px, 3.4vw, 32px); }
.tm-eyebrow { display: inline-flex; align-items: center; gap: 0.55rem; }
.tm-eyebrow .tm-fact { width: 22px; height: 22px; }
.tm-fact-end { margin-left: auto; }
.tm-law.is-no b { color: var(--tm-dead); text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: rgba(255, 107, 90, 0.75); }
.tm-law.is-yes b { color: var(--tm-acc); text-shadow: 0 0 18px rgba(161, 230, 142, 0.6); }
.tm-tag { max-width: 34rem; margin: 1.1rem 0 0; font-size: clamp(1.05rem, 2.2vw, 1.25rem); line-height: 1.5; color: rgba(238, 243, 236, 0.85); }
.tm-tag em { font-style: normal; font-weight: 800; color: var(--tm-acc-hi); }
.tm-hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }
.tm-zero { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; max-width: 34rem; margin-top: 2rem; }
.tm-zero-cell { padding: 0.75rem 0.8rem; border-radius: 12px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 107, 90, 0.3); backdrop-filter: blur(4px); }
.tm-zero-cell b { display: block; font: 900 clamp(1.8rem, 5vw, 2.6rem)/1 "Inter", system-ui, sans-serif; color: var(--tm-dead); font-variant-numeric: tabular-nums; }
.tm-zero-cell span { display: block; margin-top: 0.3rem; font-size: 0.82rem; line-height: 1.3; color: var(--tm-muted); }
.tm-scroll { position: absolute; left: 50%; bottom: 1.4rem; width: 28px; height: 44px; margin-left: -14px; border-radius: 14px; border: 2px solid rgba(238, 243, 236, 0.4); }
.tm-scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--tm-acc); animation: tm-scroll 1.8s ease-in-out infinite; }
@keyframes tm-scroll { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(16px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- sections ---------- */
.tm-sec { position: relative; padding: clamp(4rem, 9vw, 7rem) 0; }
.tm-sec + .tm-sec { border-top: 1px solid rgba(161, 230, 142, 0.06); }
.tm-head { max-width: 46rem; margin-bottom: 2.2rem; }
.tm-eyebrow { margin: 0; font: 800 0.78rem/1 "Inter", system-ui, sans-serif; letter-spacing: 0.26em; text-transform: uppercase; color: var(--tm-rust); }
.tm-head h2 { margin: 0.55rem 0 0; font-family: "Cinzel", serif; font-weight: 800; font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: 1.05; color: #f4fff0; }
.tm-lead { margin: 1rem 0 0; font-size: clamp(1.02rem, 2vw, 1.2rem); line-height: 1.55; color: rgba(238, 243, 236, 0.82); }
.tm-lead b, .tm-sec p b { color: #fff; }

/* section backgrounds: Visuals' scenes, faded into the page; loaded only when near the screen (terminus.js) */
.tm-sec.has-bg { overflow: hidden; isolation: isolate; }
.tm-bg { position: absolute; inset: -12% 0; z-index: -1; background-size: cover; background-position: center; opacity: 0; transition: opacity 0.9s ease; will-change: transform; }
.tm-bg.is-ready { opacity: 0.3; }
.tm-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--tm-bg) 0%, rgba(7, 9, 10, 0.55) 18%, rgba(7, 9, 10, 0.55) 82%, var(--tm-bg) 100%), linear-gradient(90deg, rgba(7, 9, 10, 0.85), rgba(7, 9, 10, 0.2) 60%, rgba(7, 9, 10, 0.6)); }
.tm-bg.is-portrait { left: auto; width: min(760px, 70%); background-position: 70% 30%; }
.tm-bg.is-portrait.is-ready { opacity: 0.45; }
.tm-bg.is-portrait::after { background: linear-gradient(180deg, var(--tm-bg) 0%, transparent 25%, transparent 75%, var(--tm-bg) 100%), linear-gradient(90deg, var(--tm-bg) 0%, rgba(7, 9, 10, 0.4) 45%, transparent 100%); }
@media (max-width: 760px) { .tm-bg.is-ready { opacity: 0.22; } .tm-bg.is-portrait { width: 100%; } }

/* reveal on scroll */
.tm [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tm [data-reveal].is-in { opacity: 1; transform: none; }
.tm:not(.tm-js) [data-reveal] { opacity: 1; transform: none; }

/* ---------- first five minutes: a lit path ---------- */
.tm-path { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; counter-reset: none; }
/* the line runs from the first stop to the last: five equal columns, four 1rem gaps, stops 54px wide */
.tm-path::before { content: ""; position: absolute; left: 27px; right: calc((100% - 4rem) / 5 - 27px); top: 26px; height: 3px; background: repeating-linear-gradient(90deg, var(--tm-acc) 0 14px, transparent 14px 26px); opacity: 0.35; }
.tm-path::after { content: ""; position: absolute; left: 27px; top: 26px; height: 3px; width: calc(var(--tm-progress, 0) * (100% - (100% - 4rem) / 5)); background: var(--tm-acc); box-shadow: 0 0 14px var(--tm-acc); transition: width 0.25s linear; }
.tm-stop { position: relative; z-index: 1; }
.tm-stop-n { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 1rem; border-radius: 50%; font: 900 1.5rem/1 "Cinzel", serif; color: #0b1209; background: radial-gradient(circle at 35% 30%, #e8ffe0, var(--tm-acc)); box-shadow: 0 0 0 6px var(--tm-bg), 0 0 26px rgba(161, 230, 142, 0.6); }
.tm-stop-card { height: calc(100% - 70px); padding: 1.3rem 1.2rem; border-radius: 16px; background: linear-gradient(180deg, var(--tm-panel-2), var(--tm-panel)); border: 1px solid var(--tm-line); }
.tm-stop-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--tm-acc); background: var(--tm-acc-dim); border: 1px solid var(--tm-acc-line); }
.tm-stop-ico svg { width: 22px; height: 22px; }
.tm-stop h3 { margin: 0.85rem 0 0.4rem; font: 800 1.2rem/1.2 "Inter", system-ui, sans-serif; }
.tm-stop p { margin: 0; color: var(--tm-muted); line-height: 1.5; }
.tm-stop .tm-cmd-sm { padding: 0.2rem 0.5rem; font-size: 1rem; vertical-align: 1px; }
.tm-gets { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.8rem; }
.tm-get { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.65rem 0.3rem 0.3rem; border-radius: 10px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--tm-acc-line); font-weight: 700; font-size: 0.88rem; }
.tm-get img { width: 30px; height: 30px; }
.tm-get > span { display: flex; flex-direction: column; line-height: 1.15; }
.tm-get small { font-weight: 600; font-size: 0.74rem; color: var(--tm-muted); }
@media (max-width: 1100px) {
  .tm-path { grid-template-columns: minmax(0, 1fr); gap: 0.9rem; padding-left: 0; }
  .tm-path::before, .tm-path::after { left: 26px; right: auto; top: 30px; width: 3px; height: auto; bottom: 30px; }
  .tm-path::before { background: repeating-linear-gradient(180deg, var(--tm-acc) 0 14px, transparent 14px 26px); }
  .tm-path::after { bottom: auto; height: calc(var(--tm-progress, 0) * (100% - 60px)); width: 3px; transition: height 0.25s linear; }
  .tm-stop { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 0.9rem; align-items: start; }
  .tm-stop-n { margin: 0; }
  .tm-stop-card { height: auto; }
}

/* ---------- dead / alive ---------- */
.tm-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.tm-col { padding: 1.5rem; border-radius: 20px; }
.tm-col.is-dead { background: linear-gradient(160deg, rgba(255, 107, 90, 0.1), rgba(255, 107, 90, 0.02) 60%), var(--tm-panel); border: 1px solid rgba(255, 107, 90, 0.3); }
.tm-col.is-alive { background: linear-gradient(160deg, rgba(161, 230, 142, 0.12), rgba(161, 230, 142, 0.02) 60%), var(--tm-panel); border: 1px solid var(--tm-acc-line); }
.tm-col h3 { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1rem; font: 900 1.6rem/1 "Cinzel", serif; letter-spacing: 0.08em; text-transform: uppercase; }
.tm-col.is-dead h3 { color: var(--tm-dead); }
.tm-col.is-alive h3 { color: var(--tm-acc); }
.tm-col-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font: 900 1.2rem/1 "Inter", system-ui, sans-serif; border: 2px solid currentColor; }
.tm-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 0.6rem; }
.tm-tiles li { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 0.65rem; align-items: center; padding: 0.7rem; border-radius: 12px; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.06); }
.tm-tiles li.is-wide { grid-column: 1 / -1; }
.tm-tiles img { grid-row: 1 / span 2; width: 44px; height: 44px; object-fit: contain; }
.tm-tiles b { font-size: 1rem; }
.tm-tiles span { font-size: 0.82rem; line-height: 1.3; color: var(--tm-muted); }
.tm-col.is-dead img { filter: grayscale(1) brightness(0.55); }
.tm-col.is-dead li { position: relative; overflow: hidden; }
.tm-col.is-dead li::after { content: ""; position: absolute; left: 6px; top: 50%; width: 40px; height: 3px; background: var(--tm-dead); transform: rotate(-35deg); border-radius: 2px; box-shadow: 0 0 8px rgba(255, 107, 90, 0.6); }
.tm-note { margin: 1rem 0 0; font-size: 0.92rem; color: var(--tm-muted); }
@media (max-width: 820px) { .tm-split { grid-template-columns: minmax(0, 1fr); } }

/* ---------- loot: leans ---------- */
.tm-sec-loot { background: radial-gradient(60rem 30rem at 80% 0%, rgba(255, 138, 61, 0.08), transparent 70%), radial-gradient(50rem 30rem at 0% 100%, rgba(161, 230, 142, 0.07), transparent 70%); }
.tm-leans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 1rem; }
.tm-lean { position: relative; padding: 1.3rem 1.2rem 1.2rem; border-radius: 18px; background: linear-gradient(180deg, var(--tm-panel-2), var(--tm-panel)); border: 1px solid var(--tm-line); overflow: hidden; transition: transform 0.25s ease, border-color 0.25s ease; }
.tm-lean:hover { transform: translateY(-4px); border-color: var(--tm-acc-line); }
.tm-lean h3 { margin: 0; font: 800 1.25rem/1.2 "Inter", system-ui, sans-serif; }
.tm-lean p { margin: 0.25rem 0 0; font-weight: 700; color: var(--tm-rust); }
.tm-lean-icons { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.9rem; }
.tm-lean-icons img { width: 40px; height: 40px; padding: 4px; border-radius: 10px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.06); }
.tm-anything { margin: 1.2rem 0 0; font-size: 1.1rem; color: rgba(238, 243, 236, 0.85); }

/* ---------- the minigame ---------- */
.tm-game { margin-top: 2.5rem; padding: clamp(1.1rem, 3vw, 2rem); border-radius: 24px; background: radial-gradient(40rem 20rem at 50% 30%, rgba(161, 230, 142, 0.08), transparent 70%), linear-gradient(180deg, #121713, #0b0e0c); border: 1px solid var(--tm-acc-line); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.tm-game-head h3 { margin: 0; font: 900 clamp(1.6rem, 4vw, 2.2rem)/1.1 "Cinzel", serif; color: #f4fff0; }
.tm-game-head p { margin: 0.3rem 0 0; color: var(--tm-muted); }
.tm-pick { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.2rem 0 0.5rem; }
.tm-pick button { min-height: 44px; padding: 0.55rem 1rem; border-radius: 999px; border: 1px solid var(--tm-line); background: rgba(0, 0, 0, 0.4); color: var(--tm-text); font: 700 0.92rem/1 "Inter", system-ui, sans-serif; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.tm-pick button:hover { border-color: var(--tm-acc-line); }
.tm-pick button[aria-selected="true"] { background: var(--tm-acc); border-color: var(--tm-acc); color: #0b1209; }
.tm-lean-tag { display: block; min-height: 1.4em; margin: 0.2rem 0 0; font-weight: 700; color: var(--tm-rust); }
.tm-stage { position: relative; display: grid; place-items: center; min-height: clamp(320px, 46vw, 420px); margin-top: 0.5rem; }
.tm-box { position: relative; z-index: 2; display: grid; place-items: center; width: clamp(180px, 42vw, 260px); aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tm-box:focus-visible { outline: 3px solid var(--tm-acc); outline-offset: 8px; border-radius: 20px; }
.tm-box-art { position: relative; width: 100%; height: 100%; display: block; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.7)); transition: transform 0.15s ease; }
.tm-box-art img { width: 100%; height: 100%; object-fit: contain; }
.tm-box:hover .tm-box-art { transform: translateY(-4px) scale(1.02); }
.tm-box-hint { position: absolute; bottom: -2.2rem; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 800 0.8rem/1 "Inter", system-ui, sans-serif; letter-spacing: 0.2em; text-transform: uppercase; color: var(--tm-acc); animation: tm-pulse 1.6s ease-in-out infinite; }
@keyframes tm-pulse { 50% { opacity: 0.35; } }
.tm-box.is-hit .tm-box-art { animation: tm-shake 0.32s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes tm-shake { 10%, 90% { transform: translate(-2px, 1px) rotate(-1deg); } 20%, 80% { transform: translate(4px, -2px) rotate(2deg); } 30%, 50%, 70% { transform: translate(-7px, 2px) rotate(-3deg); } 40%, 60% { transform: translate(7px, -1px) rotate(3deg); } }
.tm-box.is-open .tm-box-art { animation: tm-burst 0.5s ease-out forwards; }
@keyframes tm-burst { 0% { transform: scale(1); } 30% { transform: scale(1.12); filter: brightness(1.8) drop-shadow(0 0 40px rgba(161, 230, 142, 0.9)); } 100% { transform: scale(0.92) translateY(10px); opacity: 0.35; filter: grayscale(0.6) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6)); } }
.tm-box.is-open .tm-box-hint { opacity: 0; animation: none; }
/* hit sparks */
.tm-spark { position: absolute; z-index: 3; width: 6px; height: 6px; border-radius: 50%; background: #ffd27a; box-shadow: 0 0 10px #ff9a3d; pointer-events: none; animation: tm-spark 0.55s ease-out forwards; }
@keyframes tm-spark { to { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; } }
.tm-crack { position: absolute; inset: 18% 22%; z-index: 3; pointer-events: none; background: linear-gradient(115deg, transparent 47%, rgba(255, 255, 255, 0.9) 48%, transparent 50%), linear-gradient(40deg, transparent 55%, rgba(255, 255, 255, 0.7) 56%, transparent 57.5%); opacity: 0; transition: opacity 0.15s ease; mix-blend-mode: overlay; }
.tm-box[data-hits="1"] .tm-crack, .tm-box[data-hits="2"] .tm-crack { opacity: 0.6; }

/* CSS placeholder containers (until Visuals' art): one shape per kind */
.tm-ph { position: absolute; inset: 12%; border-radius: 10px; }
.tm-ph[data-k="barrel"] { inset: 6% 24%; border-radius: 22px / 14px; background: repeating-linear-gradient(180deg, transparent 0 22%, rgba(0, 0, 0, 0.35) 22% 25%), linear-gradient(90deg, #1d4f8a, #3b7fc4 40%, #1a4377); box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.4); }
.tm-ph[data-k="crate"] { inset: 20% 10%; background: repeating-linear-gradient(90deg, #6b4a2b 0 18%, #5a3d23 18% 20%), #6b4a2b; border: 6px solid #3d2a17; }
.tm-ph[data-k="military"] { inset: 26% 6%; background: linear-gradient(180deg, #4d5a3a, #36402a); border: 5px solid #262d1d; box-shadow: inset 0 0 0 10px rgba(0, 0, 0, 0.15); }
.tm-ph[data-k="elite"] { inset: 26% 6%; background: linear-gradient(180deg, #4a4f57, #2c3036); border: 5px solid #1c1f24; box-shadow: inset 0 0 0 10px rgba(255, 207, 77, 0.12), 0 0 30px rgba(255, 207, 77, 0.25); }
.tm-ph[data-k="supply"] { inset: 28% 12% 8%; background: linear-gradient(180deg, #2e5fa8, #1c3f75); border: 5px solid #102544; }
.tm-ph[data-k="supply"]::before { content: ""; position: absolute; left: 10%; right: 10%; bottom: 112%; height: 70%; border-radius: 50% 50% 8px 8px / 80% 80% 8px 8px; background: repeating-linear-gradient(90deg, #e9eef5 0 16%, #d9363e 16% 32%); opacity: 0.9; }
.tm-ph[data-k="scientist"] { inset: 6% 28%; border-radius: 40% 40% 12px 12px; background: linear-gradient(180deg, #d9e2ea 0 22%, #2e6fae 22%); }
.tm-ph::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(120deg, rgba(255, 255, 255, 0.16), transparent 40%); }

/* loot cards spill out */
.tm-spill { position: absolute; inset: 0; z-index: 4; pointer-events: none; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 0.7rem; padding: 0.5rem; }
.tm-card { pointer-events: auto; position: relative; width: clamp(94px, 24vw, 128px); padding: 0.7rem 0.5rem 0.6rem; border-radius: 14px; text-align: center; background: linear-gradient(180deg, #1c221d, #0f1310); border: 1px solid var(--tc, var(--t-common)); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 14px 30px -10px rgba(0, 0, 0, 0.9), 0 0 22px -6px var(--tc, transparent); transform-origin: 50% 120%; animation: tm-card-in 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.25) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes tm-card-in { 0% { opacity: 0; transform: translate(var(--fx, 0), 120px) rotate(var(--fr, 0deg)) scale(0.3); } 100% { opacity: 1; transform: none; } }
.tm-card img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6)); }
.tm-card b { display: block; margin-top: 0.35rem; font-size: 0.8rem; line-height: 1.2; color: #fff; }
.tm-card small { display: block; margin-top: 0.25rem; font: 800 0.62rem/1 "Inter", system-ui, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tc, var(--t-common)); }
.tm-card[data-tier="trash"] { --tc: var(--t-trash); }
.tm-card[data-tier="common"] { --tc: var(--t-common); }
.tm-card[data-tier="uncommon"] { --tc: var(--t-uncommon); }
.tm-card[data-tier="rare"] { --tc: var(--t-rare); }
.tm-card[data-tier="elite"] { --tc: var(--t-elite); }
.tm-card[data-tier="elite"]::before { content: ""; position: absolute; inset: -2px; border-radius: 15px; background: conic-gradient(from var(--tm-ang, 0deg), transparent 0 70%, rgba(255, 207, 77, 0.9) 85%, transparent 100%); z-index: -1; animation: tm-spin 2.4s linear infinite; }
@property --tm-ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes tm-spin { to { --tm-ang: 360deg; } }

.tm-haul { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-top: 1.4rem; padding: 0.8rem 1rem; border-radius: 14px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--tm-line); }
.tm-haul-l { font: 800 0.75rem/1 "Inter", system-ui, sans-serif; letter-spacing: 0.22em; text-transform: uppercase; color: var(--tm-muted); }
.tm-haul b { font-size: 1.2rem; color: #fff; font-variant-numeric: tabular-nums; }
.tm-haul-trash b { color: var(--t-trash); }
.tm-again { margin-left: auto; min-height: 44px; padding: 0.55rem 1.1rem; border-radius: 10px; border: 0; background: var(--tm-acc); color: #0b1209; font: 800 0.95rem/1 "Inter", system-ui, sans-serif; cursor: pointer; }
.tm-again[hidden] { display: none; }
.tm-game-note { margin: 0.8rem 0 0; font-size: 0.82rem; color: var(--tm-muted); }

/* ---------- recycling machine ---------- */
.tm-sec-recycle { background: linear-gradient(180deg, transparent, rgba(161, 230, 142, 0.04) 50%, transparent); }
.tm-machine { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; padding: 1.5rem; border-radius: 22px; background: var(--tm-panel); border: 1px solid var(--tm-line); overflow: hidden; }
.tm-belt { position: relative; display: flex; gap: 0.7rem; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.tm-belt img { flex: 0 0 auto; width: 52px; height: 52px; padding: 6px; border-radius: 12px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.06); animation: tm-belt 6s linear infinite; }
.tm-belt.is-in img { filter: grayscale(0.4); }
.tm-belt.is-out img { border-color: var(--tm-acc-line); box-shadow: 0 0 14px -4px rgba(161, 230, 142, 0.6); }
@keyframes tm-belt { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.tm-recycler { position: relative; display: grid; place-items: center; width: clamp(96px, 16vw, 140px); aspect-ratio: 1; border-radius: 24px; background: radial-gradient(circle, rgba(161, 230, 142, 0.25), transparent 70%), #0b0f0c; border: 2px solid var(--tm-acc-line); box-shadow: 0 0 40px -6px rgba(161, 230, 142, 0.5); }
.tm-recycler img { width: 64%; animation: tm-hum 0.5s ease-in-out infinite alternate; }
@keyframes tm-hum { to { transform: translateY(-2px) rotate(0.6deg); } }
.tm-gear { position: absolute; inset: -10px; border-radius: 50%; border: 3px dashed rgba(161, 230, 142, 0.35); animation: tm-rot 8s linear infinite; }
@keyframes tm-rot { to { transform: rotate(360deg); } }
/* Auto Recycler: two tiers, the commands up front, a little picker that shows what /autorec does */
.tm-ar { margin-top: 1.6rem; padding: clamp(1.2rem, 3vw, 2rem); border-radius: 24px; background: radial-gradient(40rem 18rem at 85% 0%, rgba(161, 230, 142, 0.16), transparent 70%), linear-gradient(180deg, #131a14, #0c100d); border: 1px solid var(--tm-acc-line); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(161, 230, 142, 0.08) inset; }
.tm-ar-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.1rem; align-items: center; }
.tm-ar-head > img { width: 64px; height: 64px; padding: 6px; border-radius: 16px; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--tm-acc-line); box-shadow: 0 0 26px -6px rgba(161, 230, 142, 0.6); }
.tm-ar-head h3 { margin: 0.35rem 0 0; font: 900 clamp(1.4rem, 3.6vw, 2.1rem)/1.1 "Cinzel", serif; color: #f4fff0; }
.tm-ar-head p:last-child { margin: 0.35rem 0 0; color: var(--tm-muted); }
.tm-ar-tiers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 1rem; margin: 1.4rem 0 1.2rem; }
.tm-ar-tier { position: relative; padding: 1.2rem 1.2rem 1.1rem; border-radius: 18px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--tm-line); }
.tm-ar-tier.is-top { border-color: var(--tm-acc-line); background: linear-gradient(160deg, rgba(161, 230, 142, 0.1), rgba(0, 0, 0, 0.4) 60%); }
.tm-cmd { display: inline-block; padding: 0.35rem 0.7rem; border-radius: 8px; background: #050706; border: 1px solid var(--tm-acc-line); font: 800 1.15rem/1 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--tm-acc-hi); text-shadow: 0 0 10px rgba(161, 230, 142, 0.5); }
.tm-ar-tier h4 { margin: 0.75rem 0 0.3rem; font: 800 1.2rem/1.2 "Inter", system-ui, sans-serif; color: #fff; }
.tm-ar-tier h4 small { font-weight: 700; font-size: 0.8rem; color: var(--tm-acc); }
.tm-ar-tier p { margin: 0; color: var(--tm-muted); line-height: 1.5; }
.tm-ranks { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.9rem 0 0; padding: 0; }
.tm-ranks li { padding: 0.3rem 0.6rem; border-radius: 999px; font: 700 0.8rem/1 "Inter", system-ui, sans-serif; background: rgba(255, 207, 77, 0.1); border: 1px solid rgba(255, 207, 77, 0.35); color: #ffe39a; }
.tm-ar-ui { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.35rem; margin-top: 0.9rem; padding: 0.55rem; border-radius: 12px; background: #050706; border: 1px solid var(--tm-line); }
.tm-ar-cell { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.06); }
.tm-ar-cell img { width: 72%; height: 72%; object-fit: contain; opacity: 0.55; }
.tm-ar-cell.is-on { border-color: var(--tm-acc); background: var(--tm-acc-dim); box-shadow: 0 0 12px -3px rgba(161, 230, 142, 0.8); }
.tm-ar-cell.is-on img { opacity: 1; }
.tm-ar-cell.is-on::after { content: ""; position: absolute; right: -4px; top: -4px; width: 14px; height: 14px; border-radius: 50%; background: var(--tm-acc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1209' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 9px no-repeat; }
.tm-ar.is-in .tm-ar-cell.is-on { animation: tm-tick 2.8s ease-in-out infinite; }
.tm-ar.is-in .tm-ar-cell.is-on:nth-child(3n) { animation-delay: 0.6s; }
.tm-ar.is-in .tm-ar-cell.is-on:nth-child(3n+1) { animation-delay: 1.2s; }
@keyframes tm-tick { 0%, 70%, 100% { transform: none; } 80% { transform: scale(1.12); box-shadow: 0 0 18px -2px rgba(161, 230, 142, 1); } }
@media (max-width: 760px) { .tm-ar-tiers { grid-template-columns: minmax(0, 1fr); } .tm-ar .tm-btn { width: 100%; } }
@media (max-width: 560px) { .tm-ar-head { grid-template-columns: minmax(0, 1fr); gap: 0.8rem; } .tm-ar-head > img { width: 52px; height: 52px; } }
@media (max-width: 760px) {
  .tm-machine { grid-template-columns: minmax(0, 1fr); padding: 1.1rem; }
  .tm-recycler { margin: 0 auto; }
}

/* ---------- basics ---------- */
.tm-basics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 1rem; }
.tm-basic { padding: 1.4rem 1.3rem; border-radius: 18px; background: linear-gradient(180deg, var(--tm-panel-2), var(--tm-panel)); border: 1px solid var(--tm-line); }
.tm-basic-icons { display: flex; gap: 0.4rem; }
.tm-basic-icons img { width: 52px; height: 52px; padding: 5px; border-radius: 12px; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--tm-acc-line); }
.tm-basic h3 { margin: 0.9rem 0 0.35rem; font: 800 1.3rem/1.2 "Inter", system-ui, sans-serif; }
.tm-basic p { margin: 0 0 0.6rem; color: var(--tm-muted); line-height: 1.5; }

/* ---------- everything else ---------- */
.tm-same { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 0.7rem; }
.tm-same a { display: block; padding: 1rem 1.1rem; border-radius: 14px; background: var(--tm-panel); border: 1px solid var(--tm-line); text-decoration: none; transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease; }
.tm-same a:hover, .tm-same a:focus-visible { transform: translateY(-3px); border-color: var(--tm-acc-line); background: var(--tm-panel-2); }
.tm-same b { display: block; font-size: 1.05rem; color: #fff; }
.tm-same span { display: block; margin-top: 0.2rem; font-size: 0.85rem; color: var(--tm-muted); }

/* off-screen sections pause their loops (terminus.js toggles .is-off) */
.tm-sec.is-off *, .tm-sec.is-off *::before, .tm-sec.is-off *::after { animation-play-state: paused !important; }

/* ---------- phones ---------- */
@media (max-width: 560px) {
  .tm-hero { min-height: 0; }
  .tm-hero-inner { padding: 5rem 0 4.5rem; }
  .tm-zero { gap: 0.4rem; }
  .tm-zero-cell { padding: 0.6rem 0.55rem; }
  .tm-zero-cell span { font-size: 0.74rem; }
  .tm-hero-cta .tm-btn { flex: 1 1 100%; }
  .tm-scroll { display: none; }
  .tm-game { border-radius: 18px; }
  .tm-stage { min-height: 340px; }
  .tm-again { margin-left: 0; width: 100%; }
}

/* ---------- reduced motion: no parallax, no dust, no loops; cards and reveals just appear ---------- */
@media (prefers-reduced-motion: reduce) {
  .tm-layer { will-change: auto; transform: none !important; }
  .tm-dust { display: none; }
  .tm-bg { will-change: auto; transform: none !important; transition: none; }
  .tm-ar-cell.is-on, .tm-blip, .tm-scroll span, .tm-box-hint, .tm-belt img, .tm-recycler img, .tm-gear, .tm-card[data-tier="elite"]::before { animation: none; }
  .tm [data-reveal] { opacity: 1; transform: none; transition: none; }
  .tm-card { animation: none; }
  .tm-box.is-hit .tm-box-art { animation: none; }
  .tm-box.is-open .tm-box-art { animation: none; opacity: 0.4; }
  .tm-path::after { transition: none; }
  .tm-btn, .tm-lean, .tm-same a { transition: none; }
}
