/* 06 «Зелений тариф і моніторинг» — Figma node 46:368 (1800 × 1000).
   Interaction follows the notes «06 — інтерактив для верстки». */

/* --s: one design pixel; positions below are the frame's own coordinates. */
@property --s { syntax: "<length>"; inherits: true; initial-value: 1px; }

.tariff {
  --s: min(100cqw / 1800, 100svh / 1000);
  position: relative;
  isolation: isolate;
  display: flex;
  justify-content: center;
  overflow: clip; /* not hidden: the moving background inside must still stick to the screen */
  background: #d2ec83; /* color-bg-highlight */
}
.tariff__canvas { --ui: var(--s); position: relative; flex: none; width: calc(1800 * var(--s)); height: calc(1000 * var(--s)); }
/* the moving bands (tariff-bg.js): behind everything, one screen tall, following a long phone section */
.tariff__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.tariff__bg canvas { position: sticky; top: 0; display: block; width: 100%; height: min(100%, 100lvh); }
.tariff__earn > *, .monitor > * { position: absolute; }
.tariff :focus-visible { outline: 2px solid var(--color-bg-strong); outline-offset: 3px; }
.income :focus-visible { outline-color: var(--color-bg-accent); }
/* keyboard focus on the slider rings the thumb, not the whole strip */
.tariff .power__input:focus-visible { outline: none; }
.power__input:focus-visible::-webkit-slider-thumb { border-radius: 50%; box-shadow: 0 0 0 3px var(--color-text-inverse); }
.power__input:focus-visible::-moz-range-thumb { border-radius: 50%; box-shadow: 0 0 0 3px var(--color-text-inverse); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ───────────── Left: head ───────────── */
.tariff__index, .monitor__badge {
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--s));
  padding: calc(9 * var(--s)) calc(16 * var(--s)) calc(7 * var(--s));
  border: 1px solid var(--color-bg-strong);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: calc(14 * var(--s));
  line-height: calc(17 * var(--s));
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tariff__index::before, .monitor__badge::before { content: ""; position: relative; top: calc(-1 * var(--s)); width: calc(8 * var(--s)); height: calc(8 * var(--s)); background: url("../assets/tariff/dot-index.svg") center / contain; }
.tariff__index { top: calc(64 * var(--s)); left: calc(64 * var(--s)); }
.tariff__title { top: calc(100 * var(--s)); left: calc(60 * var(--s)); font-family: var(--font-display); font-weight: 500; font-size: calc(88 * var(--s)); line-height: calc(84 * var(--s)); letter-spacing: -.035em; white-space: nowrap; }
.tariff__lead { top: calc(282 * var(--s)); left: calc(64 * var(--s)); width: calc(760 * var(--s)); font-size: calc(18 * var(--s)); line-height: calc(24 * var(--s)); color: var(--color-text-on-accent-muted); }

/* ───────────── Income calculator ───────────── */
.income {
  top: calc(342 * var(--s));
  left: calc(64 * var(--s));
  display: flex;
  flex-direction: column;
  gap: calc(28 * var(--s));
  width: calc(760 * var(--s));
  height: calc(594 * var(--s));
  padding: calc(32 * var(--s));
  border-radius: calc(28 * var(--s));
  background: var(--color-bg-inverse);
  color: var(--color-text-inverse);
  scroll-margin-top: 24px;
}
.income__head .btn { margin-right: calc(1 * var(--s)); }
.income__head { display: flex; align-items: center; justify-content: space-between; gap: calc(16 * var(--s)); height: calc(44 * var(--s)); flex: none; }
.income__label { position: relative; top: calc(1 * var(--s)); font-weight: 600; font-size: calc(14 * var(--s)); line-height: calc(17 * var(--s)); letter-spacing: .04em; text-transform: uppercase; color: var(--color-text-inverse-muted); }

.power { display: flex; flex-direction: column; gap: calc(16 * var(--s)); flex: none; }
.power__row { display: flex; align-items: baseline; justify-content: space-between; height: calc(34 * var(--s)); font-size: calc(15 * var(--s)); line-height: calc(23 * var(--s)); color: var(--color-text-inverse-muted); }
.power__value { margin-right: calc(1 * var(--s)); font-weight: 600; font-size: calc(28 * var(--s)); line-height: calc(34 * var(--s)); letter-spacing: -.01em; color: var(--color-text-inverse); font-variant-numeric: tabular-nums; }
.power__slider { position: relative; height: calc(56 * var(--s)); }
.power__input {
  --pos: 100%;
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(26 * var(--s));
  margin: 0;
  background: none;
  cursor: grab;
  touch-action: pan-y;
}
.power__input:active { cursor: grabbing; }
/* the 6px line runs between the thumb's first and last centre (13px in from each side) */
.power__input::-webkit-slider-runnable-track {
  height: calc(26 * var(--s));
  background: linear-gradient(90deg, var(--color-bg-accent) var(--pos), rgb(251 247 239 / .15) var(--pos)) center / calc(100% - 26 * var(--s)) calc(6 * var(--s)) no-repeat;
}
.power__input::-webkit-slider-thumb { -webkit-appearance: none; width: calc(26 * var(--s)); height: calc(26 * var(--s)); background: url("../assets/tariff/thumb.svg") center / contain no-repeat; transition: scale .15s ease; }
.power__input:active::-webkit-slider-thumb { scale: 1.15; }
.power__input::-moz-range-track { height: calc(6 * var(--s)); background: rgb(251 247 239 / .15); }
.power__input::-moz-range-progress { height: calc(6 * var(--s)); background: var(--color-bg-accent); }
.power__input::-moz-range-thumb { width: calc(26 * var(--s)); height: calc(26 * var(--s)); border: 0; background: url("../assets/tariff/thumb.svg") center / contain no-repeat; }

/* each tick is a 56px wide target centred on its stop */
.power__tick { position: absolute; top: 0; left: calc(13 * var(--s) + var(--t) * (100% - 26 * var(--s))); width: calc(56 * var(--s)); height: calc(56 * var(--s)); margin-left: calc(-28 * var(--s)); color: var(--color-text-inverse-subtle); }
.power__tick i { position: absolute; z-index: 1; top: calc(9 * var(--s)); left: calc(50% - 4 * var(--s)); width: calc(8 * var(--s)); height: calc(8 * var(--s)); border-radius: 50%; background: #4c4e55; transition: background-color .2s ease; }
.power__tick.is-reached i { background: var(--color-bg-accent); }
.power__tick > span { position: absolute; top: calc(36 * var(--s)); left: 50%; translate: -50% 0; padding: 0 calc(2 * var(--s)); font-size: calc(12 * var(--s)); line-height: calc(15 * var(--s)); white-space: nowrap; transition: color .2s ease; }
.power__tick:first-of-type > span { left: calc(50% - 15 * var(--s)); translate: none; }
.power__tick:last-of-type > span { right: calc(50% - 15 * var(--s)); left: auto; translate: none; }
.power__tick.is-current > span { color: var(--color-text-inverse); }
@media (hover: hover) { .power__tick:hover > span { color: var(--color-text-inverse); } }

.income__result { display: flex; align-items: flex-end; justify-content: space-between; gap: calc(16 * var(--s)); flex: none; }
.income__sum { font-family: var(--font-display); font-weight: 500; font-size: calc(140 * var(--s)); line-height: calc(126 * var(--s)); letter-spacing: -.05em; white-space: nowrap; color: var(--color-bg-accent); }
.income__note { display: flex; flex-direction: column; gap: calc(4 * var(--s)); padding-bottom: calc(12 * var(--s)); }
.income__note strong { font-weight: 700; font-size: calc(18 * var(--s)); line-height: calc(22 * var(--s)); }
.income__note span { width: calc(210 * var(--s)); font-size: calc(13 * var(--s)); line-height: calc(16 * var(--s)); color: var(--color-text-inverse-muted); }

/* ── Months: bars are 120px at full scale and shrink with scaleY; --k = power / 30 ── */
.months { --k: 1; position: relative; display: flex; justify-content: space-between; height: calc(170 * var(--s)); flex: none; }
.months::before { content: ""; position: absolute; top: calc(140 * var(--s)); right: 0; left: 0; height: 1px; background: rgb(251 247 239 / .15); }
.month { position: relative; width: calc(40 * var(--s)); height: 100%; color: var(--color-text-inverse-subtle); }
.month i {
  position: absolute;
  bottom: calc(30 * var(--s));
  left: 0;
  width: 100%;
  height: calc(120 * var(--s));
  border-radius: calc(2 * var(--s));
  background: var(--color-bg-accent);
  opacity: .45;
  transform: scaleY(calc(var(--h) * var(--k)));
  transform-origin: bottom;
  transition: transform .6s cubic-bezier(.34, 1.45, .5, 1) calc(var(--i) * 14ms), opacity .2s ease;
}
.month.is-active i { opacity: 1; }
.month span { position: absolute; top: calc(150 * var(--s)); left: 50%; translate: -50% 0; font-size: calc(12 * var(--s)); line-height: calc(15 * var(--s)); transition: color .2s ease; }
.month.is-active span { color: var(--color-text-inverse-subtle); }
.months__tip {
  position: absolute;
  bottom: calc(38 * var(--s) + var(--rise, 120) * var(--s));
  left: var(--x, 54.3%);
  translate: -50% 0;
  padding: calc(4 * var(--s)) calc(8 * var(--s));
  border-radius: calc(8 * var(--s));
  background: var(--color-bg-surface);
  font-size: calc(12 * var(--s));
  line-height: calc(15 * var(--s));
  white-space: nowrap;
  color: var(--color-text-primary);
  pointer-events: none;
  transition: left .3s cubic-bezier(.23, 1, .32, 1), bottom .5s cubic-bezier(.34, 1.3, .5, 1), opacity .3s ease;
}

/* ───────────── Right: intro ───────────── */
.monitor__intro { top: calc(64 * var(--s)); left: calc(940 * var(--s)); display: flex; flex-direction: column; align-items: flex-start; gap: calc(20 * var(--s)); }
.monitor__badge { padding: calc(9 * var(--s)) calc(16 * var(--s)) calc(7 * var(--s)); border: 0; background: var(--color-bg-strong); color: var(--color-text-inverse); }
.monitor__badge::before { background-image: url("../assets/tariff/dot-live.svg"); }
.monitor__title { position: relative; margin-top: calc(1 * var(--s)); margin-bottom: calc(-1 * var(--s)); width: calc(360 * var(--s)); font-family: var(--font-display); font-weight: 500; font-size: calc(44 * var(--s)); line-height: calc(46 * var(--s)); letter-spacing: -.025em; }
.monitor__text { width: calc(340 * var(--s)); font-size: calc(15 * var(--s)); line-height: calc(23 * var(--s)); color: var(--color-text-on-accent-muted); }
.monitor__stores { display: flex; align-items: flex-start; gap: calc(8 * var(--s)); }
.monitor__stores .btn--secondary { min-width: calc(115 * var(--s)); }
.monitor__stores .btn--outline { min-width: calc(133 * var(--s)); }

/* ───────────── Phone ───────────── */
.phone-box { top: calc(110 * var(--s)); left: calc(1364 * var(--s)); width: calc(372 * var(--s)); height: calc(780 * var(--s)); perspective: calc(1400 * var(--s)); }
.phone-mock {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid var(--color-bg-strong);
  border-radius: calc(54 * var(--s));
  background: var(--color-bg-strong);
  box-shadow: 0 calc(40 * var(--s)) calc(80 * var(--s)) calc(-10 * var(--s)) rgb(38 31 5 / .35);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.app {
  position: absolute;
  top: calc(11 * var(--s));
  left: calc(11 * var(--s));
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--s));
  width: calc(348 * var(--s));
  height: calc(756 * var(--s));
  overflow: hidden;
  padding: calc(18 * var(--s)) calc(20 * var(--s)) calc(14 * var(--s));
  border-radius: calc(42 * var(--s));
  background: var(--color-bg-inverse);
  color: var(--color-text-inverse);
  line-height: normal;
}
.app > * { flex: none; }
.app p { margin: 0; }
.app__status { display: flex; align-items: center; justify-content: space-between; height: calc(24 * var(--s)); font-size: calc(12 * var(--s)); }
.app__status i { width: calc(92 * var(--s)); height: calc(24 * var(--s)); border-radius: calc(12 * var(--s)); background: var(--color-bg-strong); }
.app__head { display: flex; align-items: center; justify-content: space-between; }
.app__head p:first-child { display: flex; flex-direction: column; gap: calc(2 * var(--s)); }
.app__head span { font-weight: 600; font-size: calc(14 * var(--s)); line-height: calc(17 * var(--s)); letter-spacing: .04em; text-transform: uppercase; color: var(--color-text-inverse-subtle); }
.app__head strong { font-weight: 700; font-size: calc(18 * var(--s)); line-height: calc(22 * var(--s)); }
.app__online { display: flex; align-items: center; gap: calc(6 * var(--s)); padding: calc(4 * var(--s)) calc(12 * var(--s)); border: 1px solid rgb(251 247 239 / .15); border-radius: var(--radius-full); font-size: calc(12 * var(--s)); line-height: calc(15 * var(--s)); }
.app__online::before { content: ""; flex: none; width: calc(6 * var(--s)); height: calc(6 * var(--s)); background: url("../assets/tariff/dot-online.svg") center / contain; }

/* battery ring: the arc is revealed by a conic mask */
@property --fill-turn { syntax: "<number>"; inherits: false; initial-value: .78; }
.ring-chart { position: relative; height: calc(170 * var(--s)); }
.ring-chart img { position: absolute; top: calc(5 * var(--s)); left: calc(74 * var(--s)); width: calc(160 * var(--s)); height: calc(160 * var(--s)); }
.ring-chart__value {
  -webkit-mask-image: conic-gradient(#000 calc(var(--fill-turn) * 1turn + .004turn), transparent 0);
  mask-image: conic-gradient(#000 calc(var(--fill-turn) * 1turn + .004turn), transparent 0);
  transition: --fill-turn 1.4s cubic-bezier(.65, 0, .35, 1) .2s;
}
.ring-chart p { position: absolute; top: calc(59 * var(--s)); right: calc(0 * var(--s)); left: 0; display: flex; flex-direction: column; align-items: center; }
.ring-chart strong { font-weight: 700; font-size: calc(30 * var(--s)); line-height: calc(37 * var(--s)); letter-spacing: -.015em; }
.ring-chart span { font-size: calc(12 * var(--s)); line-height: calc(15 * var(--s)); color: var(--color-text-inverse-subtle); }

.app__now { display: flex; gap: calc(10 * var(--s)); }
.app__now p { display: flex; flex: 1; flex-direction: column; gap: calc(2 * var(--s)); padding: calc(12 * var(--s)); border-radius: calc(18 * var(--s)); background: var(--color-bg-strong); }
.app__now span { font-size: calc(12 * var(--s)); line-height: calc(15 * var(--s)); color: var(--color-text-inverse-subtle); }
.app__now strong { font-weight: 700; font-size: calc(18 * var(--s)); line-height: calc(22 * var(--s)); }
.app__tabs { display: flex; gap: calc(2 * var(--s)); padding: calc(4 * var(--s)); border-radius: var(--radius-full); background: var(--color-bg-strong); }
.app__tabs span { flex: 1; padding: calc(8 * var(--s)); border-radius: var(--radius-full); font-size: calc(12 * var(--s)); line-height: calc(15 * var(--s)); text-align: center; color: var(--color-text-inverse-muted); }
.app__tabs .is-on { background: var(--color-bg-accent); color: var(--color-text-primary); }

.hours { position: relative; height: calc(96 * var(--s)); }
.hours i {
  position: absolute;
  bottom: calc(12 * var(--s));
  left: calc(var(--i) * 22.615 * var(--s));
  width: calc(14 * var(--s));
  height: calc(var(--h) * var(--s));
  border-radius: calc(2 * var(--s));
  background: var(--color-bg-accent);
  opacity: .55;
  transform-origin: bottom;
  transition: transform .5s cubic-bezier(.23, 1, .32, 1) calc(.3s + var(--i) * 55ms);
}
.hours i.is-peak { opacity: 1; }
.hours span { position: absolute; top: calc(84 * var(--s)); left: 0; font-size: calc(12 * var(--s)); line-height: calc(15 * var(--s)); color: var(--color-text-inverse-subtle); }
.hours span:last-child { right: 0; left: auto; }

.app__today { margin: 0; padding: 0; list-style: none; white-space: nowrap; }
.app__today li { display: flex; align-items: center; justify-content: space-between; height: calc(47 * var(--s)); padding: 0 calc(4 * var(--s)); border-top: 1px solid rgb(251 247 239 / .15); }
.app__today span { font-size: calc(13 * var(--s)); color: var(--color-text-inverse-muted); }
.app__today strong { font-weight: 700; font-size: calc(18 * var(--s)); }
.app__today li:first-child strong { color: var(--color-bg-accent); }
.app__bar { align-self: center; width: calc(120 * var(--s)); height: calc(5 * var(--s)); border-radius: 3px; background: rgb(251 247 239 / .15); }

/* ───────────── Live chip ───────────── */
.live-chip {
  top: calc(92 * var(--s));
  left: calc(1564 * var(--s));
  z-index: 2;
  display: flex;
  align-items: center;
  gap: .27em;
  width: calc(196 * var(--s));
  padding: calc(8 * var(--s)) calc(16 * var(--s));
  border-radius: var(--radius-full);
  background: var(--color-bg-strong);
  box-shadow: 0 calc(14 * var(--s)) calc(36 * var(--s)) rgb(38 26 13 / .14);
  font-size: calc(13 * var(--s));
  line-height: calc(16 * var(--s));
  white-space: nowrap;
  color: var(--color-text-inverse);
}
.live-chip::before { content: ""; flex: none; width: calc(8 * var(--s)); height: calc(8 * var(--s)); margin-right: calc(8 * var(--s) - .27em); border-radius: 50%; background: url("../assets/tariff/dot-live.svg") center / contain; }
.live-chip span { font-variant-numeric: tabular-nums; transition: opacity .2s ease; }
.live-chip span.is-changing { opacity: 0; }

/* ───────────── Widgets around the phone ─────────────
   Each orbit is a widget with its connector and two nodes; they float together. */
.orbit { top: 0; left: 0; z-index: 3; }
.orbit__float > * { position: absolute; }
.widget {
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--s));
  padding: calc(20 * var(--s)) calc(24 * var(--s));
  border-radius: calc(22 * var(--s));
  background: var(--color-bg-surface);
  box-shadow: 0 calc(14 * var(--s)) calc(36 * var(--s)) rgb(38 26 13 / .14);
  line-height: normal;
  white-space: nowrap;
}
.widget p { margin: 0; }
.widget--sold { top: calc(500 * var(--s)); left: calc(940 * var(--s)); width: calc(330 * var(--s)); height: calc(131 * var(--s)); }
.widget--outages { top: calc(660 * var(--s)); left: calc(990 * var(--s)); width: calc(330 * var(--s)); height: calc(111 * var(--s)); background: var(--color-bg-strong); color: var(--color-text-inverse); }
.widget--saved { top: calc(836 * var(--s)); left: calc(940 * var(--s)); width: calc(300 * var(--s)); height: calc(97 * var(--s)); }
.widget__label { font-size: calc(12 * var(--s)); line-height: calc(15 * var(--s)); color: var(--color-text-secondary); }
.widget__value { font-weight: 600; font-size: calc(28 * var(--s)); line-height: calc(34 * var(--s)); letter-spacing: -.01em; }
.widget__spark { position: relative; display: block; width: calc(160 * var(--s)); height: calc(26 * var(--s)); }
.widget__spark img { position: absolute; top: calc(-1 * var(--s)); left: calc(-1 * var(--s)); width: calc(162 * var(--s)); height: calc(28 * var(--s)); }
.widget__caps { font-weight: 600; font-size: calc(14 * var(--s)); line-height: calc(17 * var(--s)); letter-spacing: .04em; text-transform: uppercase; color: var(--color-text-inverse-muted); }
.widget__strong { font-weight: 700; font-size: calc(18 * var(--s)); line-height: calc(22 * var(--s)); }
.widget__note { display: flex; align-items: center; gap: calc(8 * var(--s)); font-size: calc(13 * var(--s)); line-height: calc(16 * var(--s)); color: var(--color-text-inverse-muted); }
.widget__note::before { content: ""; flex: none; width: calc(8 * var(--s)); height: calc(8 * var(--s)); background: url("../assets/tariff/dot-live.svg") center / contain; }

.orbit__line { overflow: visible; height: calc(12 * var(--s)); }
.orbit__line line { stroke: var(--color-bg-strong); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }
.orbit__node { background: center / contain no-repeat; }
.orbit__node--widget { width: calc(6 * var(--s)); height: calc(6 * var(--s)); background-image: url("../assets/tariff/node-widget.svg"); }
.orbit__node--phone { left: calc(1359 * var(--s)); width: calc(10 * var(--s)); height: calc(10 * var(--s)); background-image: url("../assets/tariff/node-phone.svg"); }
.orbit__node--phone::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--color-bg-strong); opacity: 0; }

.orbit--sold .orbit__line { top: calc(524.75 * var(--s)); left: calc(1270 * var(--s)); width: calc(94 * var(--s)); }
.orbit--sold .orbit__node--widget { top: calc(527.75 * var(--s)); left: calc(1267 * var(--s)); }
.orbit--sold .orbit__node--phone { top: calc(525.75 * var(--s)); }
.orbit--outages .orbit__line { top: calc(684.75 * var(--s)); left: calc(1320 * var(--s)); width: calc(44 * var(--s)); }
.orbit--outages .orbit__node--widget { top: calc(687.75 * var(--s)); left: calc(1317 * var(--s)); }
.orbit--outages .orbit__node--phone { top: calc(685.75 * var(--s)); }
.orbit--saved .orbit__line { top: calc(860.75 * var(--s)); left: calc(1240 * var(--s)); width: calc(124 * var(--s)); }
.orbit--saved .orbit__node--widget { top: calc(863.75 * var(--s)); left: calc(1237 * var(--s)); }
.orbit--saved .orbit__node--phone { top: calc(861.75 * var(--s)); }

/* ───────────── Motion ─────────────
   tariff.js adds .tariff--live, then .is-earn / .is-monitor when each half comes into view
   (separately: on a phone the two halves are screens apart). */
.tariff--live:not(.is-earn) .months { --k: 0; }
.tariff--live:not(.is-earn) .months__tip { opacity: 0; }
.tariff--live:not(.is-monitor) .ring-chart__value { --fill-turn: 0; transition: none; }
.tariff--live:not(.is-monitor) .hours i { transform: scaleY(0); transition: none; }

.tariff--live .orbit__line line { stroke-dashoffset: 1; }
.tariff--live .widget, .tariff--live .orbit__node { opacity: 0; }
.tariff--live.is-monitor .widget { opacity: 1; transition: opacity .5s ease var(--d); }
.tariff--live.is-monitor .orbit__node { opacity: 1; transition: opacity .2s ease calc(var(--d) + .3s); }
.tariff--live.is-monitor .orbit__node--phone { transition-delay: calc(var(--d) + .85s); }
.tariff--live.is-monitor .orbit__line line { stroke-dashoffset: 0; transition: stroke-dashoffset .6s cubic-bezier(.65, 0, .35, 1) calc(var(--d) + .3s); }
.orbit--sold { --d: .3s; --period: 3.2s; }
.orbit--outages { --d: .5s; --period: 3.9s; }
.orbit--saved { --d: .7s; --period: 3.5s; }

/* float ±6px, each in its own phase */
.tariff--live .orbit__float { animation: orbit-float var(--period) cubic-bezier(.37, 0, .63, 1) infinite alternate; }
.tariff--live .orbit--outages .orbit__float { animation-delay: -1.7s; }
.tariff--live .orbit--saved .orbit__float { animation-delay: -2.6s; }
@keyframes orbit-float { from { transform: translateY(calc(-6 * var(--s))); } to { transform: translateY(calc(6 * var(--s))); } }
.tariff--live .orbit__node--phone::after { animation: node-pulse 2.4s cubic-bezier(.23, 1, .32, 1) var(--d) infinite; }
@keyframes node-pulse { 0% { scale: 1; opacity: .7; } 70%, 100% { scale: 2.8; opacity: 0; } }
.tariff--live:not(.is-onscreen) .orbit__float, .tariff--live:not(.is-onscreen) .orbit__node--phone::after { animation-play-state: paused; }

/* ───────────── Narrower windows ─────────────
   Figma has only the 1800 frame: calculator first, then the monitoring part stacked. */
@media (max-width: 1279px) {
  .tariff { --s: 1px; }
  .tariff__canvas { box-sizing: border-box; width: 100%; max-width: 760px; height: auto; padding: 64px 20px; }
  .tariff__earn, .monitor { display: flex; flex-direction: column; align-items: flex-start; }
  .tariff__earn > *, .monitor > *, .orbit__float > * { position: static; }
  .tariff__title { margin-top: 20px; font-size: clamp(40px, 11.5cqw, 88px); line-height: .96; }
  .tariff__lead { width: auto; margin-top: 16px; font-size: 16px; line-height: 1.45; }
  .income { box-sizing: border-box; width: 100%; height: auto; gap: 24px; margin-top: 28px; padding: 24px 16px; border-radius: 24px; }
  .income__head { flex-wrap: wrap; height: auto; }
  .income__result { flex-direction: column; align-items: flex-start; gap: 4px; }
  .income__sum { font-size: min(21cqw, 120px); line-height: 1; }
  .income__note { padding: 0; }
  .month { width: 6%; }
  .month span { font-size: 10px; }

  .monitor { margin-top: 56px; gap: 28px; }
  .monitor__title { width: auto; max-width: 360px; font-size: clamp(28px, 8cqw, 44px); line-height: 1.05; }
  .monitor__text { width: auto; max-width: 420px; }
  .phone-box { --s: min(1px, (100cqw - 56px) / 372); align-self: center; width: calc(372 * var(--s)); height: calc(780 * var(--s)); }
  .live-chip { order: -1; align-self: center; width: auto; margin-bottom: -12px; font-size: 13px; line-height: 16px; padding: 8px 16px; }
  .monitor__intro { order: -2; gap: 16px; }
  .orbit { width: 100%; }
  .widget { box-sizing: border-box; width: 100%; max-width: 372px; height: auto; margin: 0 auto; white-space: normal; }
  .orbit + .orbit { margin-top: -16px; }
  .orbit__line, .orbit__node { display: none; }
}
@media (min-width: 600px) and (max-width: 1279px) {
  .tariff__canvas { padding-inline: 40px; }
  .income { padding: 32px; }
}
