/* ——— Performance: тахометр + спидометр (gauges.js) ——— */
.stage {
  --gz: min(29vw, 56vh, 600px);
  --gz-x: calc(var(--pad) + 22px);
  --gz-gap: clamp(14px, 2vw, 40px);
}
#tacho { display: none !important; }
.stage:has(.panel-perf.on) .scroll-hint { opacity: 0 !important; }
.gz-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.gz-dim {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; visibility: hidden;
  background: radial-gradient(ellipse 75% 70% at 50% 52%, #05050566, #050505d9);
}
.gz {
  position: absolute; z-index: 5; left: var(--gz-x); right: var(--gz-x); top: calc(50% + 12px);
  height: var(--gz); transform: translateY(-50%);
  display: flex; justify-content: space-between; align-items: center;
  pointer-events: none; opacity: 0; visibility: hidden;
}
.gz-dial {
  position: relative; flex: none; width: var(--gz); height: var(--gz); border-radius: 50%;
  box-shadow: 0 28px 70px #000d, 0 0 0 1px #00000080;
  transform: scale(.84); will-change: transform;
}
.gz-dial::after {
  content: ""; position: absolute; inset: 7%; border-radius: 50%; pointer-events: none;
  box-shadow: inset 0 0 60px #ff9d3c14;
}
.gz svg { display: block; width: 100%; height: 100%; overflow: visible; }
.gz text { font-family: var(--sans); text-anchor: middle; }
.gz .gz-num { font-weight: 600; fill: #f1e2cc; letter-spacing: -.02em; }
.gz .gz-unit { font-size: 12px; letter-spacing: .26em; fill: #a3968a; }
.gz .gz-sub { font-size: 11px; letter-spacing: .32em; fill: #7d7268; text-transform: uppercase; }
.gz .gz-read { font-size: 31px; font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; fill: var(--gold-soft); }
.gz .gz-odo { font-size: 15px; font-weight: 700; fill: #e9dccb; font-variant-numeric: tabular-nums; }
.gz .gz-odo-dec { fill: #1a1210; }
.gz-flash .gz-needle, .gz-flash .gz-read { animation: gzFade .45s ease-out both; }
@keyframes gzFade { from { opacity: 0; } to { opacity: 1; } }

/* Текст — по центру между приборами, как средняя часть щитка */
@media (min-width: 821px) {
  .panel-perf {
    left: 50%; right: auto; top: calc(50% + 12px); transform: translate(-50%, -50%);
    width: calc(100% - 2 * var(--gz-x) - 2 * var(--gz) - 2 * var(--gz-gap)); max-width: 560px;
    text-align: center;
  }
  .panel-perf .eyebrow { margin-bottom: clamp(10px, 2vh, 20px); font-size: clamp(9px, .75vw, 10.5px); letter-spacing: .28em; }
  .panel-perf .title { font-size: clamp(22px, min(2.6vw, 5.2vh), 54px); }
  .panel-perf .stats { margin-top: clamp(16px, 3.4vh, 34px); }
  .panel-perf .stats div, .panel-perf .stats div + div { padding: clamp(10px, 1.8vh, 16px) 6px 0; }
  .panel-perf .stats dt { font-size: 9px; letter-spacing: .22em; }
  .panel-perf .stats dd { justify-content: center; gap: 4px; margin-top: 8px; }
  .panel-perf .stats b { font-size: clamp(20px, min(2.2vw, 4.4vh), 44px); }
  .panel-perf .stats small { font-size: 11px; letter-spacing: .04em; }
  .panel-perf .footnote { margin: clamp(10px, 1.8vh, 18px) auto 0; max-width: 34ch; font-size: 10.5px; line-height: 1.5; }
  .gz-gears li { width: clamp(26px, 1.7vw, 34px); height: clamp(30px, 2vw, 40px); font-size: clamp(13px, .85vw, 16px); }
  .gz-replay { font-size: clamp(9.5px, .62vw, 11px); }
  .stage:has(.panel-perf.on) .shade {
    background:
      radial-gradient(ellipse 30% 55% at 50% 52%, #050505b8, transparent 100%),
      linear-gradient(0deg, #050505e6 0%, transparent 26%, transparent 82%, #05050599 100%);
  }
}

.gz-box {
  margin-top: clamp(12px, 2.6vh, 28px);
  display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 1.8vh, 18px);
  opacity: 0; transform: translateY(14px);
  transition: opacity .7s var(--ease) .5s, transform .7s var(--ease) .5s;
}
.panel-perf.on .gz-box { opacity: 1; transform: none; }
.gz-gears { display: flex; align-items: center; gap: 12px; }
.gz-gl { font-size: 9px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--mute); }
.gz-gears ol { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.gz-gears li {
  width: 26px; height: 30px; display: grid; place-items: center;
  border: 1px solid #ffffff22; border-radius: 4px; background: #0a0807b3;
  font-size: 13px; font-weight: 700; color: #6f675e; font-variant-numeric: tabular-nums;
  transition: color .18s, background-color .18s, border-color .18s, box-shadow .18s;
}
.gz-gears li.on { color: #140d08; background: var(--gold); border-color: var(--gold); box-shadow: 0 0 18px #ff9d3c66; }
.gz-gears li.n.on { color: var(--gold-soft); background: #0a0807b3; box-shadow: none; }
.gz-replay {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px;
  border: 1px solid #d5a67066; border-radius: 999px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #d6cfc4;
  transition: border-color .3s, background-color .3s, color .3s;
}
.gz-replay b { font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--gold); transition: transform .5s var(--ease); }
.gz-replay:hover { border-color: var(--gold); background: #d5a6701a; color: var(--ink); }
.gz-replay:hover b { transform: rotate(180deg); }
.gz-replay:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (min-width: 821px) and (max-height: 640px) {
  .panel-perf .eyebrow { margin-bottom: 8px; }
  .panel-perf .stats { margin-top: 12px; }
  .panel-perf .footnote { margin-top: 8px; }
  .gz-box { margin-top: 10px; gap: 8px; }
  .gz-gears li { height: 26px; }
  .gz-replay { padding: 7px 14px; }
}
@media (min-width: 821px) and (max-height: 520px) {
  .panel-perf .eyebrow, .panel-perf .footnote { display: none; }
}

/* Телефоны: приборы рядом вверху, текст внизу */
@media (max-width: 820px) {
  .stage { --gz: min(45vw, 29vh); }
  .gz-dim { background: linear-gradient(#050505a6, #050505e6 45%); }
  .gz { left: 12px; right: 12px; top: clamp(78px, 14vh, 130px); transform: none; justify-content: center; gap: 3vw; }
  .gz-dial { box-shadow: 0 16px 40px #000d; }
  .panel-perf .stats { margin-top: 16px; }
  .panel-perf .footnote { margin-top: 12px; }
  .gz-box { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-top: 16px; gap: 12px; }
  .gz-gears { gap: 8px; }
  .gz-gears li { width: 24px; height: 28px; font-size: 12px; }
  .gz-replay { padding: 8px 12px; letter-spacing: .14em; }
}
