:root {
  --bg: #0b0d12;
  --bg-2: #10131a;
  --card: #161a23;
  --card-2: #1c212c;
  --line: #2a303d;
  --text: #eef0f4;
  --muted: #a3acbb;
  --red: #ef3b2d;
  --amber: #ff9d1a;
  --yellow: #ffd91a;
  --green: #3ddc6a;
  --grad: linear-gradient(90deg, #ef3b2d, #ff9d1a 55%, #ffd91a);
  --display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Barlow", system-ui, "Segoe UI", Arial, sans-serif;
  --r: 14px;
  --hud-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hud-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.02; margin: 0; text-transform: uppercase; letter-spacing: .01em; }
h1 { font-size: clamp(3rem, 7.2vw, 6rem); font-weight: 800; }
h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; }
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  font: 700 .95rem/1 var(--display); letter-spacing: .16em; text-transform: uppercase;
  color: var(--amber); margin: 0 0 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  font: 700 1.05rem/1 var(--display); letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad); color: #1a0d05; box-shadow: 0 6px 24px rgba(255, 120, 30, .32); }
.btn-primary:hover { box-shadow: 0 10px 32px rgba(255, 140, 30, .5); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--amber); }
.btn-lg { padding: 16px 26px; font-size: 1.25rem; }
.btn.is-on { background: rgba(61, 220, 106, .12); border-color: var(--green); color: var(--green); }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; }

/* ---------- HUD ---------- */
.hud {
  position: sticky; top: 0; z-index: 50; height: var(--hud-h);
  display: flex; align-items: center; gap: 22px; padding: 0 clamp(16px, 3vw, 40px);
  background: rgba(11, 13, 18, .86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { height: 54px; width: auto; }
.brand-name { font: 800 1.5rem/1 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.brand-name small { display: block; font: 600 .68rem/1.2 var(--display); letter-spacing: .2em; color: var(--muted); }
.nav { display: flex; gap: 24px; }
.nav a { font: 600 1.02rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }
.score {
  display: flex; align-items: center; gap: 12px; padding: 7px 14px 7px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); text-decoration: none;
}
.score-pts { display: flex; align-items: center; gap: 4px; font: 800 1.45rem/1 var(--display); color: var(--yellow); font-variant-numeric: tabular-nums; }
.score-pts svg { width: 20px; height: 20px; fill: var(--yellow); }
.score-rank { display: grid; gap: 4px; min-width: 104px; }
.score-rank i { font: 600 .82rem/1 var(--display); letter-spacing: .1em; text-transform: uppercase; font-style: normal; color: var(--text); }
.bar { display: block; height: 4px; border-radius: 4px; background: #2b313d; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.score.bump { animation: bump .45s; }
@keyframes bump { 40% { transform: scale(1.09); border-color: var(--yellow); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center; gap: clamp(16px, 3vw, 48px);
  padding: clamp(28px, 5vw, 64px) clamp(16px, 5vw, 80px) clamp(28px, 4vw, 56px);
  max-width: 1500px; margin: 0 auto;
}
.hero::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; max-width: 100vw; transform: translateX(-50%); z-index: -1;
  background:
    radial-gradient(60% 70% at 72% 45%, rgba(239, 59, 45, .2), transparent 70%),
    radial-gradient(40% 50% at 80% 60%, rgba(255, 190, 30, .12), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 100% 48px,
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 48px 100%;
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
  mask-image: linear-gradient(#000 70%, transparent);
}
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); max-width: 34em; margin: 22px 0 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.trust li { font-size: .95rem; color: var(--muted); }
.trust b { display: block; font: 800 1.7rem/1.05 var(--display); color: var(--text); text-transform: uppercase; }

.hero-stage { position: relative; }
#heroCanvas { display: block; width: 100%; height: min(74vh, 680px); min-height: 440px; touch-action: pan-y; }
.stage-hud {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 4px auto 0; max-width: 460px; padding: 10px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  font: 600 1rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase;
}
.stage-count { display: flex; align-items: center; gap: 9px; }
.stage-hint { color: var(--amber); }
.led { width: 10px; height: 10px; border-radius: 50%; background: #4b2320; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); transition: .3s; }
.led.on { background: var(--green); box-shadow: 0 0 12px var(--green); }
.hero-stage.full .stage-hud { border-color: var(--yellow); box-shadow: 0 0 34px rgba(255, 200, 30, .28); }
.no3d #heroCanvas, .no3d #labCanvas { display: none; }
.no3d .hero-stage::before, .no3d .viewer::before {
  content: "The 3D view is not available in this browser."; display: grid; place-items: center;
  min-height: 220px; color: var(--muted); text-align: center; padding: 20px;
}

/* ---------- Steps ---------- */
.steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  max-width: 1340px; margin: 0 auto 0; padding: 0 clamp(16px, 4vw, 40px);
}
.step { display: flex; gap: 14px; padding: 22px; background: var(--card); border: 1px solid var(--line); }
.step:first-child { border-radius: var(--r) 0 0 var(--r); }
.step:last-child { border-radius: 0 var(--r) var(--r) 0; }
.step-n {
  flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad); color: #1a0d05; font: 800 1.5rem/1 var(--display);
}
.step p { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }
.ladder { display: flex; flex-wrap: wrap; gap: 6px; }
.ladder span { font: 700 .78rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.ladder span.got { border-color: var(--amber); color: var(--yellow); background: rgba(255, 157, 26, .1); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 110px) clamp(16px, 4vw, 40px); }
.section > * { max-width: 1340px; margin-left: auto; margin-right: auto; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 34px; }
.section-head p:last-child { color: var(--muted); font-size: 1.1rem; margin: 12px 0 0; }

/* ---------- Lab ---------- */
.lab { display: grid; grid-template-columns: 250px minmax(0, 1fr) minmax(0, 420px); gap: 18px; align-items: start; }
.circuits { display: grid; gap: 6px; }
.circuit {
  display: grid; grid-template-columns: 34px 1fr 12px; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  text-align: left; transition: border-color .15s, background .15s, transform .15s;
}
.circuit:hover { border-color: #47506180; transform: translateX(3px); }
.circuit .num { font: 800 1.25rem/1 var(--display); color: var(--muted); }
.circuit .nm { font: 700 1.08rem/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.circuit .nm small { display: block; font: 500 .78rem/1.2 var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); margin-top: 2px; }
.circuit[aria-selected="true"] { border-color: var(--amber); background: linear-gradient(90deg, rgba(239, 59, 45, .16), rgba(255, 217, 26, .05)); }
.circuit[aria-selected="true"] .num { color: var(--yellow); }
.circuit .done { color: var(--green); font-weight: 600; }

.viewer {
  position: relative; border-radius: var(--r); border: 1px solid var(--line); overflow: hidden;
  background:
    radial-gradient(70% 60% at 50% 42%, rgba(255, 157, 26, .13), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 100% 36px,
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 36px 100%,
    #0e1117;
  position: sticky; top: calc(var(--hud-h) + 14px);
}
.viewer-top {
  position: absolute; inset: 0 0 auto; z-index: 2; display: flex; justify-content: space-between; gap: 10px;
  padding: 14px 16px; font: 700 .92rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; pointer-events: none;
}
.viewer-top span:first-child { color: var(--yellow); }
.viewer-hint { color: var(--muted); }
#labCanvas { display: block; width: 100%; height: min(62vh, 560px); min-height: 380px; cursor: grab; touch-action: pan-y; }
#labCanvas:active { cursor: grabbing; }
.viewer-off {
  position: absolute; left: 0; right: 0; bottom: 84px; margin: 0; text-align: center; pointer-events: none;
  font: 700 1rem/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--amber);
  transition: opacity .3s;
}
.viewer.on .viewer-off { opacity: 0; }
.breaker {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 2;
  display: flex; align-items: center; gap: 12px; padding: 9px 16px;
  background: rgba(22, 26, 35, .92); border: 1px solid var(--line); border-radius: 12px;
  font: 800 1.05rem/1 var(--display); letter-spacing: .1em;
}
.breaker:hover { border-color: var(--amber); }
.breaker-lbl { color: var(--muted); transition: color .2s; }
.breaker-lbl:first-child { color: var(--red); }
.breaker-track { width: 68px; height: 32px; border-radius: 7px; background: #07080b; border: 1px solid #3a4150; position: relative; }
.breaker-handle {
  position: absolute; top: 3px; left: 3px; width: 28px; height: 24px; border-radius: 5px;
  background: linear-gradient(#d7dbe2, #8d95a3); box-shadow: 0 2px 5px rgba(0, 0, 0, .6);
  transition: transform .22s cubic-bezier(.3, 1.6, .5, 1), background .2s;
}
.breaker[aria-pressed="true"] .breaker-handle { transform: translateX(32px); background: linear-gradient(#ffe45c, #ff9d1a); box-shadow: 0 0 14px rgba(255, 190, 30, .7); }
.breaker[aria-pressed="true"] .breaker-lbl:first-child { color: var(--muted); }
.breaker[aria-pressed="true"] .breaker-lbl:last-child { color: var(--green); }

.info { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.info .tag { display: inline-block; font: 700 .82rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: #1a0d05; background: var(--grad); padding: 6px 9px; border-radius: 6px; margin-bottom: 12px; }
.info h3.title { font-size: 2.2rem; font-weight: 800; margin-bottom: 10px; }
.info .pitch { color: var(--muted); }
.info h4 { font-size: 1.02rem; letter-spacing: .12em; color: var(--amber); margin: 20px 0 10px; }
.info li { position: relative; padding: 0 0 8px 22px; font-size: .98rem; }
.facts li::before { content: ""; position: absolute; left: 0; top: .35em; width: 11px; height: 14px; background: var(--yellow); clip-path: polygon(60% 0, 0 58%, 42% 58%, 30% 100%, 100% 40%, 55% 40%); }
.signs li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }

.quiz { margin-top: 20px; padding: 16px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); }
.quiz-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font: 700 .9rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--yellow); margin-bottom: 10px; }
.quiz-head span:last-child { color: var(--muted); }
.quiz-q { font-weight: 600; margin-bottom: 12px; }
.quiz-opts { display: grid; gap: 7px; }
.quiz-opts button {
  text-align: left; padding: 10px 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--card);
  font-size: .98rem; transition: border-color .15s, background .15s;
}
.quiz-opts button:hover:not(:disabled) { border-color: var(--amber); }
.quiz-opts button.right { border-color: var(--green); background: rgba(61, 220, 106, .12); color: #c9f7d7; }
.quiz-opts button.wrong { border-color: var(--red); background: rgba(239, 59, 45, .1); color: #f4b4ae; animation: shake .3s; }
.quiz-opts button:disabled { cursor: default; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.quiz-fb { margin: 12px 0 0; font-size: .95rem; color: var(--muted); min-height: 1.4em; }
.quiz-fb b { color: var(--green); }
.quiz-fb.bad b { color: var(--red); }
.info-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.info-actions .btn { flex: 1 1 auto; }

/* ---------- Load test ---------- */
.load { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; align-items: start; }
.load-controls, .load-gauge { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; }
.load-controls h3 { margin: 0 0 12px; color: var(--amber); font-size: 1.1rem; letter-spacing: .1em; }
.load-controls h3 + .seg { margin-bottom: 26px; }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: #0c0e13; border: 1px solid var(--line); }
.seg button { padding: 10px 20px; border-radius: 9px; border: 0; background: none; font: 700 1.15rem/1 var(--display); letter-spacing: .05em; color: var(--muted); }
.seg button[aria-checked="true"] { background: var(--grad); color: #1a0d05; }
.loads { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 8px; }
.loadchip {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); text-align: left; font-size: .98rem;
  transition: border-color .15s, background .15s;
}
.loadchip b { font: 700 1.05rem/1 var(--display); color: var(--muted); white-space: nowrap; }
.loadchip:hover:not(:disabled) { border-color: var(--amber); }
.loadchip[aria-pressed="true"] { border-color: var(--amber); background: rgba(255, 157, 26, .12); }
.loadchip[aria-pressed="true"] b { color: var(--yellow); }
.loadchip:disabled { cursor: default; opacity: .85; }
.load-gauge { text-align: center; position: sticky; top: calc(var(--hud-h) + 14px); }
.gauge { width: min(100%, 380px); margin: 0 auto; display: block; }
.gauge path { fill: none; stroke-width: 16; }
.g-track { stroke: #242a35; }
.g-ok { stroke: var(--green); }
.g-warn { stroke: var(--amber); }
.g-over { stroke: var(--red); }
.needle { transform-origin: 110px 112px; transform: rotate(-90deg); transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); }
.needle line { stroke: #fff; stroke-width: 4; stroke-linecap: round; }
.needle circle { fill: #fff; }
.gauge-read { margin: 6px 0 0; }
.gauge-read b { font: 800 4.2rem/1 var(--display); font-variant-numeric: tabular-nums; }
.gauge-read span { font: 700 1.2rem/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-left: 8px; }
.gauge-sub { color: var(--muted); margin: 4px 0 16px; }
.verdict { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); text-align: left; }
.verdict h3 { margin-bottom: 4px; }
.verdict p { margin: 0; font-size: .98rem; color: var(--muted); }
.verdict .btn { margin-top: 12px; white-space: normal; }
.verdict.ok { border-color: rgba(61, 220, 106, .5); } .verdict.ok h3 { color: var(--green); }
.verdict.warn { border-color: rgba(255, 157, 26, .6); } .verdict.warn h3 { color: var(--amber); }
.verdict.over { border-color: var(--red); background: rgba(239, 59, 45, .08); } .verdict.over h3 { color: var(--red); }
.fine { font-size: .84rem; color: var(--muted); margin: 14px 0 0; text-align: left; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.about-photos { position: relative; padding: 0 12% 12% 0; }
.photo { border-radius: var(--r); border: 1px solid var(--line); object-fit: cover; }
.photo-a { width: 100%; aspect-ratio: 4 / 5; }
.photo-b { position: absolute; right: 0; bottom: 0; width: 44%; aspect-ratio: 3 / 4; border: 4px solid var(--bg); box-shadow: 0 18px 50px rgba(0, 0, 0, .6); }
.about-copy h2 { margin-bottom: 18px; }
.about-copy > p { color: var(--muted); font-size: 1.08rem; max-width: 38em; }
.define { margin: 22px 0; padding: 16px 18px; border-left: 4px solid var(--amber); background: var(--card); border-radius: 0 12px 12px 0; }
.define h3 { color: var(--yellow); margin-bottom: 6px; }
.define p { margin: 0; }
.why { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.why li { padding: 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.why p { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }

/* ---------- Ticket ---------- */
.ticket { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; align-items: start; }
.ticket-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; }
.ticket-form h3 { color: var(--amber); font-size: 1.1rem; letter-spacing: .1em; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card-2); font: 600 1.02rem/1 var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); transition: .15s; }
.chip:hover { border-color: var(--amber); }
.chip[aria-pressed="true"] { background: var(--grad); color: #1a0d05; border-color: transparent; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fields label { display: grid; gap: 6px; font: 600 .9rem/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fields .wide { grid-column: 1 / -1; }
.fields input, .fields textarea {
  width: 100%; padding: 12px 13px; border-radius: 10px; border: 1px solid var(--line); background: #0c0e13;
  color: var(--text); font: 400 1rem/1.4 var(--body); resize: vertical;
}
.fields input:focus, .fields textarea:focus { outline: none; border-color: var(--amber); }
.ticket-card {
  background: #f4efe2; color: #1c1a15; border-radius: var(--r); overflow: hidden; position: sticky; top: calc(var(--hud-h) + 14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.ticket-head { display: flex; justify-content: space-between; gap: 10px; padding: 14px 20px; background: var(--grad); font: 800 1.1rem/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: #1a0d05; }
.ticket-card pre { margin: 0; padding: 20px; font: 500 .98rem/1.6 var(--body); white-space: pre-wrap; word-break: break-word; min-height: 170px; border-bottom: 2px dashed #c9c1ab; }
.ticket-actions { display: grid; gap: 8px; padding: 18px 20px 20px; }
.ticket-card .btn-ghost { background: #fff; border-color: #cfc7b2; color: #1c1a15; }
.ticket-card .btn-ghost:hover { border-color: #1c1a15; }

/* ---------- Footer ---------- */
.footer { padding: 48px clamp(16px, 4vw, 40px) 26px; }
.footer-grid { max-width: 1340px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.footer-logo { height: 76px; width: auto; margin-bottom: 12px; }
.footer h3 { font-size: 1rem; letter-spacing: .14em; color: var(--amber); margin-bottom: 12px; }
.footer p { margin: 0 0 6px; color: var(--muted); }
.footer a { color: var(--text); text-decoration-color: var(--line); text-underline-offset: 3px; }
.footer a:hover { text-decoration-color: var(--amber); }
.footer-base { max-width: 1340px; margin: 30px auto 0; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; max-width: min(92vw, 380px);
  background: #1d222d; border: 1px solid var(--amber); box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
  font-weight: 500; animation: toast-in .3s cubic-bezier(.2, 1.4, .4, 1), toast-out .35s 2.9s forwards;
}
.toast b { font: 800 1.3rem/1 var(--display); color: var(--yellow); white-space: nowrap; }
.toast.rank { background: var(--grad); color: #1a0d05; border-color: transparent; }
.toast.rank b { color: #1a0d05; }
@keyframes toast-in { from { transform: translateY(16px) scale(.94); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(8px); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .lab { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); }
  .circuits { grid-column: 1 / -1; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .circuit { grid-template-columns: 26px auto 12px; }
  .circuit .nm small { display: none; }
  .circuit:hover { transform: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:first-child { border-radius: var(--r) 0 0 0; } .step:nth-child(2) { border-radius: 0 var(--r) 0 0; }
  .step:nth-child(3) { border-radius: 0 0 0 var(--r); } .step:last-child { border-radius: 0 0 var(--r) 0; }
}
@media (max-width: 940px) {
  .nav { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-stage { order: -1; }
  #heroCanvas { height: 62vh; min-height: 400px; max-height: 560px; }
  .lab, .load, .about, .ticket { grid-template-columns: minmax(0, 1fr); }
  .circuits { grid-column: auto; }
  .viewer, .load-gauge, .ticket-card { position: relative; top: 0; }
  #labCanvas { height: 52vh; min-height: 340px; }
  .about-photos { max-width: 460px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hud { gap: 10px; }
  .brand-name { display: none; }
  .brand img { height: 38px; }
  .score-rank { min-width: 84px; }
  .btn-call span { display: none; }
  .btn-call { padding: 11px; }
  .steps { grid-template-columns: 1fr; }
  .step, .step:first-child, .step:nth-child(2), .step:nth-child(3), .step:last-child { border-radius: 0; }
  .step:first-child { border-radius: var(--r) var(--r) 0 0; } .step:last-child { border-radius: 0 0 var(--r) var(--r); }
  .cta-row .btn { flex: 1 1 100%; }
  .why, .fields { grid-template-columns: 1fr; }
  .info, .load-controls, .load-gauge, .ticket-form { padding: 18px; }
  .viewer-hint { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
