/* fan.mt-glitch.com. A light page that reads like a thermal image: cool paper, ink lines, and one colour,
   the app's own temperature scale. `--temp` is the simulated Mac's temperature right now (site.js). */

:root {
  color-scheme: light;
  --paper: #EDF1F4;
  --sheet: #FFFFFF;
  --ink: #0F151C;
  --ink2: #2B3542;
  --steel: #566373;
  --mist: #8794A3;
  --line: rgba(15, 21, 28, .11);
  --line2: rgba(15, 21, 28, .2);
  /* Shared/PanelUI.swift: Color.temperature, Panel.accent, Panel.amber */
  --cold: #7FD3FF; --cool: #30B0C7; --warm: #F5C233; --hot: #FF8C29; --crit: #FF453A;
  --thermal: linear-gradient(90deg, #7FD3FF, #30B0C7 24%, #F5C233 52%, #FF8C29 76%, #FF453A);
  --blue: #0A84FF;
  --amber: linear-gradient(90deg, #FFBF61, #FF8A2E);
  --temp: #30B0C7;
  --display: "Sofia Sans Extra Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --text: "Sofia Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --ui-round: ui-rounded, "SF Pro Rounded", var(--ui);
  --gutter: clamp(18px, 4vw, 56px);
  --wide: 1360px;
  --gap: clamp(76px, 9.5vw, 156px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
:root[lang=ru] [lang=en], :root[lang=en] [lang=ru] { display: none !important; }
:root[data-release=soon] .when-out, :root[data-release=out] .when-soon { display: none !important; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; background: var(--paper); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; color: var(--ink); /* no background: html has it, and one here would cover the z-index: -1 glows */
  font: 400 18px/1.5 var(--text); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
/* Glows wider than the page and things a gust throws sideways must not widen it. `clip`, not `hidden`: the other
   axis stays visible and nothing becomes a scroll container (the top bar is sticky). */
main, .top, .foot { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 300; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* Readings change in place: their digits keep one width. */
.tag, .pult, .now, .s-val, .h-w, .hold-num, .curve-svg, .hold-svg, .rule-then { font-variant-numeric: tabular-nums; }

/* ───────────── Type ───────────── */
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.008em; text-wrap: balance; }
h1 { font-size: clamp(62px, 8.4vw, 128px); line-height: .86; }
h2 { font-size: clamp(46px, 6vw, 92px); line-height: .9; }
h3 { font: 700 19px/1.25 var(--text); }
.lead { margin-top: 24px; max-width: 33em; color: var(--ink2); font-size: clamp(18px, 1.42vw, 21px); line-height: 1.48; text-wrap: pretty; }
.fine { margin-top: 16px; max-width: 40em; color: var(--steel); font-size: 15.5px; line-height: 1.45; text-wrap: pretty; }

/* ───────────── Buttons ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px;
  border-radius: 14px; font: 700 16px/1 var(--text); text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .15s, box-shadow .15s;
}
.btn:active { transform: scale(.97); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }
.btn-line { box-shadow: inset 0 0 0 1.5px var(--line2); }
.btn-line:hover { background: rgba(15, 21, 28, .05); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-lg { min-height: 56px; padding: 0 26px; font-size: 18px; border-radius: 16px; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 15px; border-radius: 11px; }
.soon {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 24px 0 20px; border-radius: 16px;
  background: var(--ink); color: #fff; font: 700 17px/1.1 var(--text);
}
.soon i { width: 10px; height: 10px; border-radius: 50%; background: var(--temp); transition: background-color .6s; animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--temp) 70%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* ───────────── Top bar ───────────── */
.top {
  position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: 20px; height: 60px;
  padding: 0 var(--gutter); background: color-mix(in srgb, var(--paper) 78%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 1px 0 var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 17px/1 var(--text); text-decoration: none; letter-spacing: -.01em; }
.top-nav { display: flex; gap: 4px; margin-left: auto; }
.top-nav a { padding: 8px 11px; border-radius: 9px; color: var(--steel); font: 600 15.5px/1 var(--text); text-decoration: none; transition: color .15s, background-color .15s; }
.top-nav a:hover { color: var(--ink); background: rgba(15, 21, 28, .06); }
.top-side { display: flex; align-items: center; gap: 10px; }
.lang { min-width: 40px; height: 36px; border-radius: 11px; font: 700 14px/1 var(--text); color: var(--steel); box-shadow: inset 0 0 0 1.5px var(--line2); }
.lang:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
@media (max-width: 1020px) { .top-nav { display: none; } .top-side { margin-left: auto; } }
@media (max-width: 400px) { .brand span { font-size: 15px; } }

/* ───────────── Hero ───────────── */
.hero {
  position: relative; max-width: var(--wide); margin: 0 auto; padding: clamp(28px, 4.4vw, 64px) var(--gutter) 0;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px); align-items: start;
}
.hero-copy { padding-top: clamp(0px, 2.4vw, 40px); }
.bench { display: grid; grid-template-columns: minmax(0, 1fr) 340px; container-type: inline-size; }
.mac { grid-column: 1 / -1; grid-row: 1; position: relative; container-type: inline-size; }
/* The air around the Mac takes its temperature. Bigger than the Mac and down to nothing at its own edges, so no
   box ever cuts it. */
.mac::before {
  content: ""; position: absolute; inset: -38% -26% -24%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--temp) 36%, transparent), transparent);
}
.pult { grid-column: 2; grid-row: 2 / span 2; margin-top: -27.4cqw; }
.loadbar-hero { grid-column: 1; grid-row: 2; padding: 20px 20px 0 0; }
.sim-note { grid-column: 1; grid-row: 3; align-self: start; margin: 16px 20px 0 0; color: var(--steel); font-size: 14.5px; line-height: 1.4; text-wrap: pretty; }
@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding-top: 0; }
  .bench { max-width: 820px; }
}
@media (max-width: 700px) {
  .bench { grid-template-columns: minmax(0, 1fr); }
  .pult { grid-column: 1; grid-row: auto; margin-top: 22px; justify-self: center; }
  .loadbar-hero, .sim-note { grid-row: auto; padding-right: 0; margin-right: 0; }
}

/* The Mac, opened up. */
.mac-svg { width: 100%; height: auto; overflow: visible; color: var(--ink); --t0: var(--cool); --t1: var(--cool); --t2: var(--cool); }
.mac-case { fill: #F8FAFB; stroke: var(--ink); stroke-width: 2; filter: drop-shadow(0 34px 34px rgba(15, 21, 28, .14)); }
.bloom { mix-blend-mode: multiply; }
.mac-lines { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.mac-lines .soft { stroke-opacity: .32; }
.mac-lines .dash { stroke-dasharray: 4 5; stroke-opacity: .32; }
.mac-lines .vents { stroke-width: 8; stroke-dasharray: 2.5 5.5; stroke-opacity: .5; stroke-linecap: butt; }
.mac-lines .fins { fill: url(#fins); }
.mac-lines .pipe, .mac-lines .plate { fill: rgba(255, 255, 255, .5); }
.mac-lines .chip { fill: var(--ink); stroke: none; opacity: .88; }
.screws { fill: var(--ink); stroke: none; opacity: .3; }
.rotor use { fill: var(--ink); }
.rotor [data-blades] { opacity: var(--blade, .82); }
.rotor .blur { fill: var(--ink); opacity: var(--blur, 0); }
.rotor .hub { fill: #F8FAFB; stroke: var(--ink); stroke-width: 1.5; }
.rotor .hub-dot { fill: var(--ink); }
.air { fill: none; stroke: var(--t1); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 9 15; opacity: var(--air, 0); }

/* One orchestrated moment: the drawing draws itself, then the Mac gets to work (site.js). */
@media (prefers-reduced-motion: no-preference) {
  .mac.is-live :is(.mac-case, .mac-lines rect:not(.dash):not(.chip), .mac-lines circle) {
    stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.5s cubic-bezier(.65, 0, .25, 1) .1s forwards;
  }
  .mac.is-live :is(.rotor, .tag, .chip, .screws, .vents, .dash) { animation: appear .6s ease 1.1s backwards; }
  .mac.is-live .mac-case { fill-opacity: 0; animation: draw 1.5s cubic-bezier(.65, 0, .25, 1) .1s forwards, fill-in .6s ease .9s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fill-in { to { fill-opacity: 1; } }
@keyframes appear { from { opacity: 0; } }

.tag {
  position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px 4px 7px; border-radius: 8px; background: var(--ink); color: #fff;
  font: 600 12.5px/1.2 var(--text); white-space: nowrap; pointer-events: none;
  box-shadow: 0 6px 14px -6px rgba(15, 21, 28, .5);
}
.tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--cool)); transition: background-color .4s; }
.tag b { font-weight: 700; }
.tag-rpm { background: #fff; color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink); padding: 3px 8px; }
@container (max-width: 560px) { .tag-2 { display: none; } .tag { font-size: 11.5px; } }

/* Load picker: the same control wherever a demo needs heat. */
.load-h { margin-bottom: 8px; color: var(--steel); font: 600 14.5px/1.2 var(--text); }
.seg { position: relative; display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 13px; background: rgba(15, 21, 28, .07); }
.seg-thumb { position: absolute; top: 0; left: 0; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(15, 21, 28, .18), 0 0 0 .5px rgba(15, 21, 28, .08); pointer-events: none; }
.seg.is-ready .seg-thumb { transition: translate .4s var(--spring), width .4s var(--spring), height .2s; }
.seg-load .seg-thumb { background: var(--ink); box-shadow: none; }
.seg button { position: relative; min-height: 34px; padding: 0 13px; border-radius: 10px; color: var(--ink2); font: 600 14.5px/1 var(--text); white-space: nowrap; transition: background-color .15s, color .15s, box-shadow .15s; }
.seg button:hover:not([aria-checked=true]) { background: rgba(255, 255, 255, .55); }
.seg button[aria-checked=true] { color: var(--ink); }
.seg-load button[aria-checked=true] { color: #fff; }
.loadbar { margin-top: 20px; }
.loadbar-hero { margin-top: 0; }

/* ───────────── «Пульт» (Screens/ControlPanel, light appearance) ───────────── */
.pult {
  position: relative; z-index: 2; width: 340px; max-width: 100%; display: grid; gap: 10px; padding: 14px; border-radius: 26px;
  font: 400 13px/1.3 var(--ui); color: #1D1D1F; letter-spacing: -.003em;
  background: linear-gradient(180deg, rgba(255, 255, 255, .66), rgba(255, 255, 255, .46));
  -webkit-backdrop-filter: blur(26px) saturate(190%); backdrop-filter: blur(26px) saturate(190%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8), inset 0 1.5px 0 #fff, 0 0 0 .5px rgba(15, 21, 28, .14),
    0 44px 70px -34px rgba(15, 21, 28, .5), 0 16px 30px -18px rgba(15, 21, 28, .3);
}
.pult-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px; }
.pult-head b { font-size: 15px; font-weight: 700; }
.pult-sim { color: #6E6E73; font-size: 11.5px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile, .fan { background: rgba(255, 255, 255, .52); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .7); }
.tile { display: grid; gap: 3px; padding: 10px 6px 10px 10px; border-radius: 14px; min-width: 0; }
.tile-cap { display: flex; align-items: center; gap: 5px; color: #6E6E73; font-size: 11.5px; white-space: nowrap; overflow: hidden; }
.tile-cap .ic { width: 13px; height: 13px; color: var(--tint, #6E6E73); transition: color .4s; }
.tint-bolt { color: #E8B100 !important; }
.tile-row { display: flex; align-items: baseline; gap: 6px; }
.tile-row b { font: 600 20px/1.15 var(--ui-round); }
.spark { flex: 1; min-width: 0; height: 16px; overflow: visible; }
.spark polyline { fill: none; stroke: var(--tint, var(--cool)); stroke-opacity: .8; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: stroke .4s; }
.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.chip {
  min-height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, .58);
  font: 500 11.5px/1 var(--ui); color: #1D1D1F; white-space: nowrap; transition: background .2s, color .2s, opacity .12s;
}
.chip:hover { background: rgba(255, 255, 255, .9); }
.chip:active { opacity: .7; }
.chip.is-on, .chip-on { background: var(--blue); color: #fff; }
.chip.is-hot { background: var(--amber); color: #290F00; }
.pult-notice { display: flex; gap: 7px; padding: 0 4px; color: #6E6E73; font-size: 11.5px; line-height: 1.3; }
.pult-notice .ic { width: 14px; height: 14px; color: var(--crit); margin-top: 1px; }
.fan { display: grid; gap: 8px; padding: 12px; border-radius: 16px; }
.fan-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.fan-head b { font-weight: 600; }
.fan-rpm { margin-left: auto; }
.fan-glyph { width: 15px; height: 15px; color: var(--blue); }
.fan-slider { position: relative; height: 18px; touch-action: pan-y; cursor: grab; border-radius: 9px; }
.fan-slider.is-dragging { cursor: grabbing; }
.fan-track { position: absolute; inset: 5px 0; border-radius: 99px; background: rgba(15, 21, 28, .1); overflow: hidden; }
.fan-fill { position: absolute; inset: 0 auto 0 0; width: max(8px, calc(var(--fill, 0) * 100%)); border-radius: 99px; background: linear-gradient(90deg, rgba(10, 132, 255, .75), var(--blue)); }
.fan-tick { position: absolute; top: -1px; left: clamp(0px, calc(var(--tick, 0) * 100% - 1px), calc(100% - 2px)); width: 2px; height: 10px; border-radius: 1px; background: rgba(15, 21, 28, .7); }
.fan-thumb {
  position: absolute; top: 50%; left: calc(var(--thumb, 0) * 100%); width: 10px; height: 10px; border-radius: 50%;
  transform: translate(-50%, -50%); background: var(--blue); box-shadow: 0 0 0 1.5px #fff, 0 .5px 2px 1px rgba(0, 0, 0, .25);
  transition: width .2s var(--ease), height .2s var(--ease), background-color .2s;
}
.fan-slider.is-set .fan-thumb { width: 16px; height: 16px; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 .5px 2.5px rgba(0, 0, 0, .3); }
.fan-slider.is-set .fan-tick { display: none; }
.fan-foot { display: flex; justify-content: space-between; gap: 8px; color: #6E6E73; font-size: 11.5px; }
.fan-foot .is-draft { color: var(--blue); font-weight: 600; }
.fan-foot .is-alarm { color: var(--crit); }
.pult-foot { display: flex; justify-content: space-between; }
.gbtn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 13px; border-radius: 999px;
  font: 500 13px/1 var(--ui); text-decoration: none; color: #1D1D1F; background: rgba(255, 255, 255, .7);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .9), 0 1px 3px rgba(15, 21, 28, .14); transition: transform .2s var(--ease), filter .15s;
}
.gbtn:hover { filter: brightness(1.06); }
.gbtn:active { transform: scale(.96); }
.gbtn-pro { background: var(--blue); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 6px rgba(10, 132, 255, .4); }
.gbtn .ic { width: 14px; height: 14px; }

/* ───────────── Chapters ───────────── */
.ch {
  max-width: var(--wide); margin: 0 auto; padding: var(--gap) var(--gutter) 0;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 48px); row-gap: clamp(28px, 3.4vw, 48px); align-items: start;
}
.ch-head { grid-column: span 5; }
.ch-head-wide { grid-column: 1 / span 9; }
.ch-curve > .sheet, .ch-hold > .sheet { grid-column: span 7; }
.ch > :is(.rules, .mon, .facts, .whatif, .guards) { grid-column: 1 / -1; }
.aside { margin-top: 34px; max-width: 30em; }
.aside p { margin-top: 8px; color: var(--steel); font-size: 16px; line-height: 1.45; text-wrap: pretty; }
@media (max-width: 980px) {
  .ch > * { grid-column: 1 / -1 !important; }
  .ch-hold > .ch-head { order: -1; }
}

.sheet {
  min-width: 0; padding: clamp(16px, 2vw, 26px); border-radius: 24px; background: var(--sheet);
  box-shadow: 0 0 0 1px var(--line), 0 44px 70px -52px rgba(15, 21, 28, .4);
}
.sheet-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.sheet-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 10px; }
.now { color: var(--steel); font: 600 15px/1.3 var(--text); }
/* On its own line, so the chart doesn't move when the sentence changes length. */
.curve .now { flex-basis: 100%; }
.now b { color: var(--ink); }
.lbtn { min-height: 34px; padding: 0 12px; border-radius: 10px; color: var(--ink2); font: 600 14.5px/1 var(--text); box-shadow: inset 0 0 0 1.5px var(--line2); transition: box-shadow .15s, background-color .15s; }
.lbtn:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.lbtn:disabled { opacity: .4; cursor: not-allowed; box-shadow: inset 0 0 0 1.5px var(--line2); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Curve editor (Features/ControlFans/CurveEditor) */
.curve-svg { width: 100%; height: auto; overflow: visible; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.curve-svg .grid { stroke: var(--line); stroke-width: 1; }
.curve-svg text { font: 600 12px var(--text); fill: var(--mist); }
.curve-svg .area { fill: url(#curve-fill); opacity: .42; }
.curve-svg .line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.curve-svg .handle { fill: #fff; stroke: var(--ink); stroke-width: 2.5; cursor: grab; touch-action: none; transition: r .15s var(--ease); outline: none; }
.curve-svg .handle:hover, .curve-svg .handle:focus-visible { r: 11px; }
.curve-svg .handle:focus-visible { stroke: var(--blue); }
.curve-svg .handle.is-dragging { cursor: grabbing; r: 11px; }
.curve-svg .raw { fill: var(--mist); }
.curve-svg .follow { transition: transform .5s linear; }
.curve-svg .follow line { stroke: var(--blue); stroke-width: 1.5; stroke-dasharray: 3 4; }
.curve-svg .follow-dot { fill: var(--blue); stroke: #fff; stroke-width: 2; transition: transform .5s linear; }
.curve-svg .follow-text { fill: var(--blue); font-weight: 700; font-size: 13px; transition: transform .5s linear; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--steel); font-size: 14px; }
.lg { display: inline-flex; align-items: center; gap: 7px; }
.lg::before { content: ""; width: 0; height: 0; border: 5px solid transparent; border-bottom: 8px solid var(--mist); border-top: 0; }
.lg-follow::before { width: 9px; height: 9px; border: 0; border-radius: 50%; background: var(--blue); }

/* Hold */
.hold { display: grid; grid-template-columns: minmax(170px, 230px) minmax(0, 1fr); gap: 8px clamp(18px, 2.6vw, 36px); align-items: center; }
.hold > .loadbar { grid-column: 1 / -1; }
.hold-cap { color: var(--steel); font: 600 15px/1 var(--text); }
.hold-num { display: block; margin: 6px 0 4px; font: 800 clamp(96px, 11vw, 150px)/.84 var(--display); letter-spacing: -.02em; }
.hold-scale { display: flex; justify-content: space-between; margin-top: 4px; color: var(--mist); font: 600 12.5px/1 var(--text); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; background: none; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--cool), var(--warm) 38%, var(--hot) 72%, var(--crit)); }
input[type=range]::-moz-range-track { height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--cool), var(--warm) 38%, var(--hot) 72%, var(--crit)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -8px; border-radius: 50%; background: #fff; border: 2.5px solid var(--ink); box-shadow: 0 2px 6px rgba(15, 21, 28, .3); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2.5px solid var(--ink); box-shadow: 0 2px 6px rgba(15, 21, 28, .3); }
.hold-svg { width: 100%; height: auto; overflow: visible; }
.hold-svg .grid { stroke: var(--line); }
.hold-svg text { font: 600 12px var(--text); fill: var(--mist); }
.hold-svg .temp { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.hold-svg .target { stroke: var(--crit); stroke-width: 1.5; stroke-dasharray: 5 5; transition: transform .25s var(--ease), opacity .3s; }
.hold-svg .target-text { fill: var(--crit); font-weight: 700; transition: transform .25s var(--ease), opacity .3s; }
.hold-svg .level { fill: rgba(10, 132, 255, .22); stroke: var(--blue); stroke-width: 1.5; stroke-linejoin: round; }
.hold-svg .temp-text { fill: var(--ink); font-weight: 700; font-size: 13px; }
.hold-svg .level-text { fill: var(--blue); font-weight: 700; }
@media (max-width: 620px) { .hold { grid-template-columns: minmax(0, 1fr); } }

/* Rules */
.rules { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 3vw, 44px) clamp(24px, 4vw, 64px); align-items: start; }
.sit { display: grid; gap: 4px; }
.sit-h { margin-bottom: 8px; color: var(--steel); font: 600 15px/1.2 var(--text); }
.sw { display: flex; align-items: center; gap: 14px; min-height: 48px; font: 600 18px/1.2 var(--text); cursor: pointer; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw-ui { position: relative; flex: none; width: 46px; height: 28px; border-radius: 99px; background: rgba(15, 21, 28, .16); transition: background-color .2s; }
.sw-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 21, 28, .3); transition: transform .25s var(--ease); }
.sw input:checked + .sw-ui { background: var(--ink); }
.sw input:checked + .sw-ui::after { transform: translateX(18px); }
.sw input:focus-visible + .sw-ui { outline: 2.5px solid var(--blue); outline-offset: 3px; }
.rule-sheet { padding-top: 8px; padding-bottom: 20px; }
.rule-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 15px 0; box-shadow: 0 1px 0 var(--line); color: var(--mist); transition: color .2s; }
.rule-list .ic { width: 22px; height: 22px; }
.rule-if { font: 600 17.5px/1.25 var(--text); }
.rule-then { grid-column: 2; color: inherit; font-size: 15.5px; }
.rule-state { grid-row: 1 / span 2; grid-column: 3; justify-self: end; max-width: 11em; text-align: right; font: 600 14px/1.2 var(--text); }
.rule-list li.is-match { color: var(--steel); }
.rule-list li.is-match .rule-if { color: var(--ink2); }
.rule-list li.is-on { color: var(--ink2); }
.rule-list li.is-on .rule-if { color: var(--ink); }
.rule-list li.is-on .rule-state { padding: 6px 11px; border-radius: 9px; background: var(--ink); color: #fff; }
.rule-result { display: flex; align-items: center; gap: 12px; margin-top: 18px; font: 700 19px/1.25 var(--text); }
.rule-result .ic { width: 26px; height: 26px; flex: none; color: var(--blue); }
.points { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px clamp(24px, 4vw, 64px); color: var(--steel); font-size: 16px; line-height: 1.45; }
.points li { text-wrap: pretty; }
@media (max-width: 860px) { .rules, .points { grid-template-columns: minmax(0, 1fr); } }

/* Sensors, heat sources */
.mon { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(18px, 2.4vw, 32px); align-items: start; }
.sensors li { display: grid; grid-template-columns: minmax(0, 11em) minmax(60px, 1fr) 4.6em; gap: 14px; align-items: center; min-height: 46px; box-shadow: 0 1px 0 var(--line); }
.sensors li:last-child, .heat li:last-child { box-shadow: none; }
.s-name { font: 600 16px/1.2 var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-name small { display: block; margin-top: 2px; color: var(--mist); font: 500 12.5px/1 var(--text); }
.s-name code { font: 600 14.5px/1 ui-monospace, "SF Mono", Menlo, monospace; }
.rng { position: relative; height: 8px; border-radius: 99px; background: rgba(15, 21, 28, .07); }
.rng-span { position: absolute; inset: 0; border-radius: inherit; background: var(--thermal); clip-path: inset(0 var(--r, 100%) 0 var(--l, 0%) round 99px); transition: clip-path .5s linear; }
.rng-now { position: absolute; top: -4px; left: var(--x, 0%); width: 2.5px; height: 16px; margin-left: -1px; border-radius: 2px; background: var(--ink); transition: left .5s linear; }
.s-val { text-align: right; font: 700 17px/1.1 var(--text); }
.s-val small { display: block; margin-top: 2px; color: var(--mist); font: 500 12.5px/1 var(--text); white-space: nowrap; }
.heat li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; box-shadow: 0 1px 0 var(--line); }
.h-ico { grid-row: span 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--c, var(--steel)); color: #fff; font: 700 15px/1 var(--text); }
.h-name { font: 600 16px/1.2 var(--text); }
.h-w { font: 700 16px/1.2 var(--text); }
.h-bar { grid-column: 2 / -1; height: 5px; border-radius: 99px; background: rgba(15, 21, 28, .07); overflow: hidden; }
.h-bar i { display: block; height: 100%; width: calc(var(--w, 0) * 100%); min-width: 4px; border-radius: inherit; background: linear-gradient(90deg, var(--hot), var(--crit)); transition: width .6s var(--ease); }
@media (max-width: 900px) { .mon { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 460px) { .sensors li { grid-template-columns: minmax(0, 8.5em) minmax(40px, 1fr) 4.2em; gap: 10px; } }

/* ───────────── Safety: the dark band ───────────── */
.band {
  margin-top: var(--gap); color: #EAF0F6; background: var(--ink);
  background-image: radial-gradient(ellipse 30% 44% at 70% 44%, color-mix(in srgb, var(--temp) 26%, transparent), transparent);
}
.band .ch { padding-bottom: var(--gap); }
.band .lead { color: #B9C4D0; }
.whatif { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(18px, 3vw, 48px); align-items: start; }
.wi-tabs { display: grid; gap: 4px; }
.wi-tabs button { display: block; width: 100%; padding: 14px 16px; border-radius: 14px; text-align: left; color: #93A0AE; font: 600 19px/1.2 var(--text); transition: color .15s, background-color .15s; }
.wi-tabs button:hover { color: #fff; }
.wi-tabs button[aria-selected=true] { color: #fff; background: rgba(255, 255, 255, .09); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.wi-stage { padding: clamp(18px, 2.6vw, 34px); border-radius: 24px; background: #171F29; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.wi-diagram { display: grid; grid-template-columns: minmax(0, 1fr) clamp(24px, 6vw, 80px) minmax(0, 1fr) clamp(24px, 6vw, 80px) minmax(0, 1fr); align-items: start; }
.node { display: grid; justify-items: center; gap: 6px; text-align: center; }
.node .ic { width: 52px; height: 52px; padding: 13px; border-radius: 16px; color: var(--ink); background: var(--cold); transition: background-color .3s, color .3s, opacity .3s, box-shadow .3s; }
.node b { font: 700 16.5px/1.2 var(--text); }
.node [data-node-text] { min-height: 2.6em; color: #93A0AE; font-size: 14px; line-height: 1.3; text-wrap: balance; transition: color .3s; }
.node[data-state=off] .ic { background: transparent; color: #66727F; box-shadow: inset 0 0 0 1.5px #3B4652; }
.node[data-state=wait] .ic { background: var(--warm); }
.node[data-state=hot] .ic { background: var(--crit); color: #fff; }
.node[data-state=sys] .ic { background: #E6ECF2; }
.node[data-state=off] b { color: #66727F; }
.wire { height: 2px; margin-top: 25px; background: repeating-linear-gradient(90deg, var(--cold) 0 6px, transparent 6px 12px); background-size: 12px 2px; transition: opacity .3s; }
.wire[data-state=off] { opacity: .16; }
@media (prefers-reduced-motion: no-preference) { .wire:not([data-state=off]) { animation: flow .7s linear infinite; } }
@keyframes flow { to { background-position-x: 12px; } }
.wi-steps { display: grid; gap: 12px; margin: 30px 0 22px; counter-reset: step; }
.wi-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: baseline; color: #66727F; font-size: 17.5px; line-height: 1.4; transition: color .35s; counter-increment: step; }
.wi-steps li::before { content: counter(step); font: 800 26px/1 var(--display); color: inherit; }
.wi-steps li.is-on { color: #EAF0F6; }
.lbtn-dark { color: #B9C4D0; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .2); }
.lbtn-dark:hover { color: #fff; box-shadow: inset 0 0 0 1.5px #fff; }
.guards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px clamp(24px, 4vw, 64px); margin-top: clamp(8px, 2vw, 28px); }
.guards li { color: #B9C4D0; font-size: 16.5px; line-height: 1.45; text-wrap: pretty; }
.guards b { display: block; margin-bottom: 6px; color: #fff; font: 700 19px/1.25 var(--text); }
@media (max-width: 860px) {
  .whatif, .guards { grid-template-columns: minmax(0, 1fr); }
  .wi-tabs { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); scrollbar-width: none; }
  .wi-tabs button { padding: 10px 14px; font-size: 16px; white-space: nowrap; }
}

/* ───────────── The rest ───────────── */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(28px, 3.4vw, 48px) clamp(24px, 3vw, 48px); }
.facts > div { padding-top: 16px; box-shadow: 0 -2px 0 var(--ink); }
.facts dt { font: 700 20px/1.2 var(--text); }
.facts dd { margin-top: 8px; color: var(--steel); font-size: 16.5px; line-height: 1.45; text-wrap: pretty; }
@media (max-width: 1020px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .facts { grid-template-columns: minmax(0, 1fr); } }

.steps { grid-column: span 7; display: grid; gap: clamp(22px, 2.6vw, 34px); counter-reset: step; }
.steps li { display: grid; grid-template-columns: clamp(48px, 5vw, 72px) minmax(0, 1fr); column-gap: 8px; counter-increment: step; color: var(--steel); font-size: 17.5px; line-height: 1.45; }
.steps li::before { content: counter(step); grid-row: span 3; font: 800 clamp(64px, 6.4vw, 92px)/.82 var(--display); color: var(--ink); }
.steps b { display: block; margin-bottom: 4px; color: var(--ink); font: 700 clamp(20px, 1.7vw, 24px)/1.2 var(--text); }
.helper-demo { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; margin-top: 14px; padding: 9px 10px 9px 12px; border-radius: 14px; background: var(--sheet); box-shadow: 0 0 0 1px var(--line); font: 400 13px/1.3 var(--ui); color: #3A3A3C; }
.helper-demo .ic { width: 18px; height: 18px; color: var(--hot); transition: color .3s; }
.helper-demo[data-step="2"] .ic { color: #2FB457; }
.helper-demo .chip { min-height: 26px; flex: none; }

.ch-faq .faq { grid-column: 6 / -1; }
.faq details { box-shadow: 0 1px 0 var(--line2); }
.faq details:first-child { box-shadow: 0 1px 0 var(--line2), 0 -1px 0 var(--line2); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; font: 700 clamp(19px, 1.7vw, 23px)/1.25 var(--text); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 14px; height: 14px; background: linear-gradient(var(--ink), var(--ink)) center / 100% 2.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2.5px 100% no-repeat; transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { max-width: 38em; padding: 0 0 22px; color: var(--ink2); font-size: 17.5px; line-height: 1.5; text-wrap: pretty; }

.get { position: relative; display: grid; justify-items: center; padding: var(--gap) var(--gutter); text-align: center; }
/* An ellipse that ends exactly at the section's edges. */
.get::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, var(--temp) 46%, transparent), transparent); }
.get .app-icon { margin-bottom: 22px; filter: drop-shadow(0 22px 26px rgba(15, 21, 28, .3)); }
.get h2 { font-size: clamp(56px, 9vw, 148px); line-height: .86; }
.get .lead, .get .fine { margin-inline: auto; }
.get .cta { justify-content: center; }

.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 28px var(--gutter) 36px; box-shadow: 0 -1px 0 var(--line); color: var(--steel); font-size: 15px; }
.foot .brand { color: var(--ink); font-size: 16px; }
.foot a:not(.brand) { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.foot-note { margin-left: auto; }
@media (max-width: 760px) { .foot-note { margin-left: 0; } }

/* ───────────── Motion ─────────────
   One theme: air. Headings are blown in letter by letter, blocks drift in from the side the wind comes from, the
   hero heading leans with the fans, and a gust (site.js) blows the interface off the page and lets it settle back.
   All of it is off under prefers-reduced-motion. */
:root { --spring: cubic-bezier(.3, 1.4, .5, 1); }
@supports (transition-timing-function: linear(0, 1)) {
  :root { --spring: linear(0, .46 8%, .86 16%, 1.05 24%, 1.1 31%, 1.07 39%, 1.01 50%, .985 62%, .995 78%, 1); }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wd { display: inline-block; white-space: nowrap; }
.ltr { display: inline-block; transform-origin: 50% 88%; }

/* The app icon with its blades on their own layer, turning as fast as the model's fans. */
.app-icon { position: relative; display: inline-block; flex: none; width: var(--s); height: var(--s); }
.app-icon img { position: absolute; inset: 0; width: 100%; height: 100%; }
.app-icon [data-icon-blades] { will-change: transform; }
button.app-icon { border-radius: 26%; transition: scale .35s var(--spring); }
button.app-icon:hover { scale: 1.07; }
button.app-icon:active { scale: .94; }

.rotor { cursor: pointer; outline: none; }
.rotor .hit { fill: transparent; }
.rotor .hub-dot { transition: fill .2s; }
.rotor:hover .hub-dot { fill: var(--blue); }
.rotor:focus-visible .hub { stroke: var(--blue); stroke-width: 3; }

.btn .ic { transition: translate .3s var(--spring); }
.btn:hover .ic { translate: 0 3px; }
.rule-list li { transition: color .25s; }
.rule-state { transition: opacity .2s; }
.rule-state:empty { opacity: 0; }
.winds, .streak { display: none; }

@media (prefers-reduced-motion: no-preference) {
  /* Headings: blown in from the right, a letter at a time. */
  .js:not(.js-late) .hero h1:not(.is-split) { visibility: hidden; }
  .is-split .ltr { opacity: 0; translate: .5em 0; rotate: 9deg; }
  .is-split.is-in .ltr {
    opacity: 1; translate: 0 0; rotate: 0deg;
    transition: opacity .4s ease, translate .95s var(--spring), rotate .95s var(--spring);
    transition-delay: calc(var(--i) * 15ms);
  }
  /* Everything else drifts in the same way. */
  .rv { opacity: 0; translate: 44px 0; }
  .rv.is-in { opacity: 1; translate: 0 0; transition: opacity .6s ease, translate .9s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }

  /* The hero heading stands in the fans' airflow: `--wind` is their level. */
  .hero.is-windy h1 .ltr { animation: flutter .5s ease-in-out infinite; animation-delay: calc(var(--i) * -73ms); }
  .winds { display: block; position: absolute; inset: 0 42% 0 0; z-index: -1; pointer-events: none; opacity: var(--gale, 0); transition: opacity .8s; }
  .winds i {
    position: absolute; left: 100%; top: calc(6% + var(--n) * 13%); width: clamp(120px, 20vw, 300px); height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, transparent, rgba(15, 21, 28, .2), transparent);
    animation: wind 1.3s linear infinite; animation-delay: calc(var(--n) * -.41s);
  }
  .winds i:nth-child(odd) { width: clamp(70px, 12vw, 180px); animation-duration: .95s; }
  @media (max-width: 1180px) { .winds { inset: 0; } } /* stacked hero: the heading is as wide as the page */

  .mac::before, .get::before { animation: breathe 5.5s ease-in-out infinite; }
  .bench.is-live .pult { transform-origin: 85% 0; animation: pult-in .9s var(--spring) 1.15s backwards; }
  .bench.is-live :is(.loadbar-hero, .sim-note) { animation: appear .7s ease 1.5s backwards; }

  /* A gust: lines from the fan, the Mac shudders, whatever the visitor is holding only jolts. */
  .streak {
    display: block; position: fixed; left: 0; top: 0; z-index: 250; width: 190px; height: 2.5px; border-radius: 2px; opacity: 0;
    transform-origin: 0 50%; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(15, 21, 28, .3) 40%, #fff 80%, transparent);
  }
  .mac.is-gusting .mac-svg { animation: shudder .7s linear; }
  .bench .pult.is-jolted { animation: jolt .7s var(--spring); } /* as specific as the entrance, and after it */

  /* The curve draws itself the first time it is seen. */
  .curve:not(.is-in) :is(.line, .area, .handle, .follow, .follow-dot, .follow-text, .raw) { opacity: 0; }
  .curve.is-fresh .line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.3s var(--ease) .25s forwards; }
  .curve.is-fresh .area { animation: appear 1s ease .9s backwards; }
  .curve.is-fresh .handle { transform-box: fill-box; transform-origin: center; animation: pop .55s var(--spring) backwards; animation-delay: calc(.45s + var(--i) * 120ms); }
  .curve.is-fresh :is(.follow, .follow-dot, .follow-text, .raw) { animation: appear .5s ease 1.4s backwards; }

  .rule-list li.is-on .rule-state { animation: pop .45s var(--spring); }
  .rule-result.is-swap [data-rule-text] { animation: slide-in .5s var(--ease); }

  @supports (interpolate-size: allow-keywords) {
    .faq details { interpolate-size: allow-keywords; }
    .faq details::details-content { block-size: 0; overflow: clip; opacity: 0; transition: block-size .4s var(--ease), opacity .3s, content-visibility .4s allow-discrete; }
    .faq details[open]::details-content { block-size: auto; opacity: 1; }
  }
}
@keyframes flutter {
  0%, 100% { transform: skewX(calc(var(--wind, 0) * 4deg)); }
  50% { transform: skewX(calc(var(--wind, 0) * 10deg)) translateX(calc(var(--wind, 0) * -.03em)); }
}
@keyframes wind { from { translate: 0 0; opacity: 0; } 15%, 80% { opacity: 1; } to { translate: -78vw 0; opacity: 0; } }
@keyframes breathe { 50% { scale: 1.07; opacity: .8; } }
@keyframes pult-in { from { opacity: 0; transform: translateY(-18px) scale(.93); } }
@keyframes shudder { 10% { translate: -3px 1px; } 25% { translate: 3px -2px; } 40% { translate: -2px -1px; } 60% { translate: 2px 1px; } 80% { translate: -1px 0; } }
@keyframes jolt { 20% { translate: 9px 7px; rotate: 1.3deg; } }
@keyframes pop { from { scale: 0; opacity: 0; } }
@keyframes slide-in { from { translate: 20px 0; opacity: 0; } }
