:root {
  color-scheme: light;
  --blue: #2a6d9e;
  --blue-dark: #1d5079;
  --blue-tint: #e8f0f6;
  --orange: #f59a23;
  --orange-dark: #e08600;
  --orange-ink: #a85f00;
  --ink: #1e2a3a;
  --muted: #55626f;
  --line: #d8dfe5;
  --paper: #f6f8fa;
  --white: #ffffff;
  --title: #3d67c4;
  --teal: #009999;
  --teal-dark: #007a7a;
  --card: #eef1f4;
  --card-line: #d3dae0;
  --error: #b42318;
  --on-accent: #ffffff;
  --on-orange: #1e2a3a;
  --header-bg: rgb(246 248 250 / .94);
  --field-line: #a9b4be;
  --grid-line: rgb(42 109 158 / .07);
  --tint-teal: rgb(0 153 153 / .08);
  --tint-blue: rgb(42 109 158 / .08);
  --band-top: #f2f6f9;
  --band-bottom: #eaf1f6;
  --white-bottom: #f7fafc;
  --success-bg: #e7f5ea;
  --success-ink: #1c5d2a;
  --error-bg: #fdecea;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 10px;
}

/* Dark theme: chosen with the header button, or following the device when nothing was chosen */
:root[data-theme="dark"] {
  color-scheme: dark;
  --blue: #6fb0e0; --blue-dark: #9ccbee; --blue-tint: #1d2c3b; --ink: #e3eaf1; --muted: #9daab6; --line: #2b3946;
  --orange-ink: #f5a43a; --paper: #111921; --white: #18222c; --title: #86aaf2; --teal: #23b5b5; --teal-dark: #4fd0ce; --card: #1a2531; --card-line: #2d3c4a;
  --error: #ff8f86; --header-bg: rgb(17 25 33 / .92); --field-line: #4a5a69; --grid-line: rgb(111 176 224 / .08);
  --tint-teal: rgb(35 181 181 / .1); --tint-blue: rgb(111 176 224 / .08); --band-top: #131d27; --band-bottom: #0f171f; --white-bottom: #151f29;
  --success-bg: #173322; --success-ink: #8fdca4; --error-bg: #3a1c1a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --blue: #6fb0e0; --blue-dark: #9ccbee; --blue-tint: #1d2c3b; --ink: #e3eaf1; --muted: #9daab6; --line: #2b3946;
    --orange-ink: #f5a43a; --paper: #111921; --white: #18222c; --title: #86aaf2; --teal: #23b5b5; --teal-dark: #4fd0ce; --card: #1a2531; --card-line: #2d3c4a;
    --error: #ff8f86; --header-bg: rgb(17 25 33 / .92); --field-line: #4a5a69; --grid-line: rgb(111 176 224 / .08);
    --tint-teal: rgb(35 181 181 / .1); --tint-blue: rgb(111 176 224 / .08); --band-top: #131d27; --band-bottom: #0f171f; --white-bottom: #151f29;
    --success-bg: #173322; --success-ink: #8fdca4; --error-bg: #3a1c1a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
code, .mono { font-family: var(--mono); font-size: .92em; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
h1, h2 { color: var(--title); }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0; }
p + p { margin-top: .9em; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }
.section { padding-block: clamp(56px, 8vw, 96px); }
.section + .section { border-top: 1px solid var(--line); }
.section-white { background: linear-gradient(180deg, var(--white), var(--white-bottom)); }
main > .section { position: relative; isolation: isolate; }
main > .section:not(.section-white) { background: radial-gradient(800px 420px at 92% 0%, var(--tint-teal), transparent 70%), radial-gradient(760px 420px at 0% 100%, var(--tint-blue), transparent 70%), linear-gradient(180deg, var(--band-top), var(--band-bottom)); }
main > .section:not(.section-white):not(.hero)::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 32px 32px; -webkit-mask-image: radial-gradient(ellipse 75% 85% at 85% 20%, #000, transparent 80%); mask-image: radial-gradient(ellipse 75% 85% at 85% 20%, #000, transparent 80%); pointer-events: none; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { margin-top: 12px; color: var(--muted); }
.eyebrow { font: 600 .82rem/1.3 var(--mono); color: var(--teal-dark); margin-bottom: 12px; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.5; color: var(--muted); }
.fine { font-size: .84rem; line-height: 1.5; color: var(--muted); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 14px; z-index: 20; }
.skip:focus { left: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--title); font-size: 1.9rem; line-height: 1; font-weight: 700; text-decoration: none; letter-spacing: -.025em; white-space: nowrap; }
.brand img { border-radius: 7px; }
.site-header nav { display: flex; gap: 22px; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: .95rem; padding-block: 8px; }
.site-header nav a:hover { color: var(--ink); }
.site-header nav a[aria-current] { color: var(--ink); font-weight: 600; box-shadow: 0 2px 0 var(--teal); }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.lang-menu { position: relative; font-size: .9rem; }
.lang-menu summary { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px; color: var(--ink); font-weight: 600; cursor: pointer; list-style: none; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.lang-menu summary:hover { border-color: var(--blue); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: ""; width: 6px; height: 6px; margin-left: 2px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: translateY(-2px) rotate(45deg); }
.lang-menu ul { position: absolute; right: 0; top: 100%; z-index: 12; min-width: 180px; margin: 6px 0 0; padding: 6px; list-style: none; background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 28px rgb(30 42 58 / .14); }
.lang-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 5px; color: var(--ink); text-decoration: none; }
.lang-menu a:hover { background: var(--paper); }
.lang-menu a[aria-current] { color: var(--blue); font-weight: 600; }
.theme-toggle { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); cursor: pointer; }
.theme-toggle:hover { border-color: var(--blue); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .sun, :root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
.flag { flex: none; width: 21px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgb(30 42 58 / .14); object-fit: cover; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px; border: 0; border-radius: 8px; background: var(--orange); color: var(--on-orange); font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background-color .15s; }
.button:hover { background: var(--orange-dark); color: var(--on-orange); }
.button[disabled] { opacity: .65; cursor: progress; }
.button-small { min-height: 38px; padding: 6px 14px; font-size: .9rem; }
.button-plain { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 1px var(--line); }
.button-plain:hover { background: var(--white); color: var(--blue-dark); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Hero */
.hero { padding-block: clamp(36px, 6vw, 72px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero .lead { margin-top: 22px; max-width: 34em; }
.hero .fine { margin-top: 16px; }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 14px; box-shadow: 0 18px 50px rgb(30 42 58 / .2); }

/* Hero rack, drawn behind the phone */
main > .hero { background: linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 32px 32px, var(--paper); }
.rack { display: block; width: min(320px, 100%); margin-top: 28px; overflow: visible; }
.rack rect, .rack path { fill: none; stroke: #7a7a7a; stroke-width: 1; }
.rack .module > rect:first-child { fill: url(#rack-module); stroke: #6e6e6e; }
.rack .rail { fill: #9aa3ab; stroke: #7f8891; }
.rack .screen, .rack .strip { fill: url(#rack-strip); stroke: none; }
.rack .module path { stroke: #9a9a9a; }
.rack .port { fill: #1f1f1f; }
.rack text { font: 500 9px var(--mono); fill: #d6d6d6; }
.led { fill: #555; stroke: none; }
.led-steady { fill: #3ddc6e; }
.led-scan { animation: channel 4.8s steps(1) infinite; }
@keyframes channel { 0%, 42% { fill: #2fe0c8; } 43%, 100% { fill: #555; } }

/* Simulated plant */
.plant { padding: clamp(16px, 3vw, 30px); background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); }
.plant-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 44px); align-items: start; }
.ladder { width: 100%; height: auto; }
.ladder .rail-line { fill: none; stroke: var(--ink); stroke-width: 3; }
.ladder path { fill: none; stroke: #8795a1; stroke-width: 2.2; transition: stroke .12s; }
.ladder .wire.live { stroke: var(--teal); stroke-width: 3; stroke-dasharray: 9 5; animation: flow .7s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -14; } }
.ladder text { font: 600 12px var(--mono); fill: var(--ink); text-anchor: middle; }
.ladder .tag { font-weight: 500; font-size: 10.5px; fill: var(--muted); }
.ladder .blade { stroke: transparent; }
.ladder .contact.closed .blade { stroke: var(--teal); stroke-width: 3; }
.ladder .contact.closed path:not(.blade) { stroke: var(--ink); }
.ladder .coil.on path { stroke: var(--teal); stroke-width: 3; }
.plant-buttons { display: flex; gap: 14px; margin-bottom: 16px; }
.push { flex: 1; min-height: 58px; border: 0; border-radius: 10px; color: var(--on-accent); font: 700 1.2rem var(--mono); letter-spacing: .04em; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: transform .08s, box-shadow .08s; }
.push-start { background: var(--teal); box-shadow: 0 4px 0 var(--teal-dark); }
.push-stop { background: #b42318; box-shadow: 0 4px 0 #7f1910; }
.push.pressed { transform: translateY(4px); box-shadow: none; }
.vat { font-size: .9rem; }
.vat th, .vat td { padding: 6px 10px 6px 0; }
.vat [data-value] { font: 600 .95rem var(--mono); }
.vat [data-value].on { color: var(--teal-dark); }
.vat th, .vat td { border-bottom-color: var(--card-line); }
.belt { width: 100%; height: auto; margin-top: 20px; }
.belt-body { fill: var(--ink); }
.belt-top { fill: none; stroke: var(--teal); stroke-width: 3; stroke-dasharray: 16 14; }
.running .belt-top { animation: belt 1s linear infinite; }
@keyframes belt { to { stroke-dashoffset: -150; } }
.rollers circle { fill: #38485a; stroke: #8795a1; stroke-width: 2; }
.box { fill: var(--white); stroke: var(--blue); stroke-width: 2; }
.sensor path { fill: none; stroke: #a9b4be; stroke-width: 2; stroke-dasharray: 4 5; }
.sensor rect { fill: var(--ink); }
.sensor text { font: 600 13px var(--mono); fill: var(--muted); }
.sensor.on path { stroke: var(--teal); stroke-width: 3; }
.plant-note { margin-top: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Industrial photos */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.gallery figure { margin: 0; }
.gallery figcaption { margin-top: 10px; font-weight: 600; font-size: .98rem; }
.pdf-sample { margin: 22px 0 0; }
.pdf-sample img { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 28px rgb(30 42 58 / .12); }
.pdf-sample figcaption { margin-top: 10px; color: var(--muted); font-size: .92rem; }
/* The sample PDF page is white: in the dark theme it is dimmed until the pointer is on it */
.pdf-sample img { transition: filter .2s ease; }
:root[data-theme="dark"] .pdf-sample img { filter: brightness(.5) contrast(1.1); border-color: var(--card-line); box-shadow: 0 10px 28px rgb(0 0 0 / .35); }
:root[data-theme="dark"] .pdf-sample a:hover img, :root[data-theme="dark"] .pdf-sample a:focus-visible img { filter: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pdf-sample img { filter: brightness(.5) contrast(1.1); border-color: var(--card-line); box-shadow: 0 10px 28px rgb(0 0 0 / .35); }
  :root:not([data-theme="light"]) .pdf-sample a:hover img, :root:not([data-theme="light"]) .pdf-sample a:focus-visible img { filter: none; }
}
.gallery figcaption span { display: block; font-weight: 400; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.photo-credit { margin-top: 16px; }

/* Changelog */
.changelog-head { padding-bottom: 28px; }
.changelog-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 340px); gap: clamp(28px, 6vw, 72px); align-items: center; }
.changelog-intro h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
.changelog-intro .lead { margin-top: 18px; font-size: 1.08rem; }
.changelog-intro .rack { width: 100%; margin: 0; justify-self: end; }
.section + .changelog-body { border-top: 0; padding-top: 12px; }
.changelog-dates { margin: 12px 0 0; color: var(--muted); font-size: .88rem; }
.timeline { --lens: 96px; --axis: 104px; margin-bottom: 28px; padding: clamp(14px, 2.6vw, 28px); background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); }
.timeline-hint { margin: 0 0 10px; color: var(--muted); font-size: .86rem; text-align: center; }
.timeline-stage { --pos: 100%; position: relative; height: calc(var(--axis) + var(--lens) / 2 + 14px); }
.timeline-end { position: absolute; top: 0; left: 0; margin: 0; color: var(--blue-dark); font-size: .78rem; line-height: 1.25; }
.timeline-end span, .timeline-end b { display: block; }
.timeline-end b { font: 600 .9rem var(--mono); }
.timeline-end.is-last { right: 0; left: auto; text-align: right; }
.timeline-scale { position: absolute; inset: 0 calc(var(--lens) / 2); }
.timeline-axis { position: absolute; top: var(--axis); right: 0; left: 0; height: 2px; margin-top: -1px; background: var(--blue-dark); }
.timeline-tick { --grow: 1; position: absolute; top: var(--axis); width: 2px; height: 16px; margin: -8px 0 0 -1px; background: var(--blue-dark); transform: scaleY(var(--grow)); transition: transform .18s ease; }
.timeline-tick.is-edge { top: 40px; height: calc(var(--axis) - 20px); margin-top: 0; transform: none; }
.timeline-year { position: absolute; top: calc(var(--axis) + 26px); color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; transform: translateX(-50%); }
.timeline-lens { position: absolute; top: var(--axis); left: var(--pos); display: grid; place-items: start center; width: var(--lens); height: var(--lens); overflow: hidden; color: var(--teal-dark); background: var(--white); border: 3px solid var(--teal); border-radius: 50%; box-shadow: 0 6px 18px rgba(30, 42, 58, .22), inset 6px 6px 12px rgba(42, 109, 158, .1); transform: translate(-50%, -50%); transition: left .16s ease; }
.timeline-lens::before { content: ""; position: absolute; top: 50%; right: 0; left: 0; height: 3px; margin-top: -1.5px; background: var(--blue-dark); }
.timeline-lens::after { content: ""; position: absolute; top: 50%; left: 50%; width: 3px; height: 26px; margin: -3px 0 0 -1.5px; background: var(--blue-dark); }
.timeline-lens b { padding-top: calc(var(--lens) * .16); font: 700 calc(var(--lens) * .25)/1 var(--mono); }
.timeline-link { position: absolute; top: calc(var(--axis) + var(--lens) / 2); bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--teal); transition: left .16s ease; }
.timeline-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: grab; opacity: 0; touch-action: pan-y; -webkit-appearance: none; appearance: none; }
.timeline-input:active { cursor: grabbing; }
.timeline-input::-webkit-slider-runnable-track { height: 100%; }
.timeline-input::-webkit-slider-thumb { width: var(--lens); height: 100%; -webkit-appearance: none; }
.timeline-input::-moz-range-track { height: 100%; }
.timeline-input::-moz-range-thumb { width: var(--lens); height: 100%; border: 0; }
.timeline-stage:has(.timeline-input:focus-visible) .timeline-lens { outline: 3px solid var(--orange); outline-offset: 2px; }
.timeline-detail { width: min(480px, 100%); min-height: 96px; padding: 10px 14px; background: var(--white); border: 1px solid var(--teal); border-radius: var(--radius); }
.timeline.is-ready .timeline-detail { transition: transform .16s ease; }
.timeline-detail p { margin: 0; font-size: .95rem; line-height: 1.45; }
.timeline-detail .timeline-meta { margin-bottom: 2px; color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.timeline-meta b { margin-right: 6px; color: var(--teal-dark); font: 700 .98rem var(--mono); }
.changelog tbody tr { transition: background-color .16s ease; }
.changelog tbody tr.is-active { background: rgba(0, 153, 153, .12); }
.changelog tbody tr.is-planned th, .changelog tbody tr.is-planned td { color: var(--muted); }
.timeline-planned { position: absolute; top: var(--axis); right: 0; height: 2px; margin-top: -1px; background: repeating-linear-gradient(90deg, var(--card) 0 5px, transparent 5px 10px); }
.timeline-tick.is-planned { background: repeating-linear-gradient(180deg, var(--blue-dark) 0 5px, transparent 5px 9px); }
.timeline-tick.is-major { background: var(--orange); }
.timeline-major { display: none; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--orange); color: var(--on-orange); font-size: .74rem; font-weight: 600; }
.timeline.is-major .timeline-major { display: inline-block; }
.timeline.is-major .timeline-lens, .timeline.is-major .timeline-detail { border-color: var(--orange); }
.timeline.is-major .timeline-link { background: var(--orange); }
.timeline.is-major .timeline-lens b, .timeline.is-major .timeline-meta b { color: var(--orange-ink); }
.changelog tbody tr.is-major th { color: var(--orange-ink); }
.changelog tbody tr.is-major.is-active { background: rgba(245, 154, 35, .14); }

/* Welcome message */
.welcome { width: min(500px, calc(100% - 32px)); padding: 0; border: 1px solid var(--card-line); border-radius: 14px; background: var(--white); color: var(--ink); box-shadow: 0 24px 60px rgba(30, 42, 58, .3); }
.welcome[open] { animation: welcome-in .28s ease; }
.welcome::backdrop { background: rgba(30, 42, 58, .45); }
.welcome form { display: grid; gap: 14px; padding: clamp(22px, 5vw, 34px); }
.welcome img { border-radius: 12px; }
.welcome h2 { font-size: clamp(1.4rem, 4vw, 1.75rem); }
.welcome p { margin: 0; }
.welcome-school { padding: 12px 14px; background: var(--card); border-left: 3px solid var(--teal); border-radius: 8px; font-size: .95rem; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
@keyframes welcome-in { from { opacity: 0; transform: translateY(14px); } }
.changelog-card { padding: clamp(6px, 2vw, 18px) clamp(14px, 2.6vw, 28px); background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); }
.changelog th, .changelog td { padding: 13px 18px 13px 0; border-bottom-color: var(--card-line); }
.changelog tbody tr:last-child > * { border-bottom: 0; }
.changelog tbody th { width: 84px; color: var(--teal-dark); font: 600 .98rem var(--mono); }
.changelog .changelog-date { width: 150px; padding-right: 0; color: var(--muted); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.changelog thead .changelog-date { font-size: .82rem; }

/* Closing band */
.band { display: block; width: 100%; height: clamp(200px, 34vw, 460px); object-fit: cover; }

/* Link status line */
.signal { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 12px; max-width: 460px; margin-top: 36px; font: 500 .8rem/1 var(--mono); color: var(--muted); }
.signal i { position: relative; height: 2px; background: var(--line); overflow: hidden; }
.signal i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 34%; background: var(--teal); animation: scan 2.4s linear infinite; }
.signal i + span + i::after { animation-delay: .9s; }
.signal b { color: var(--blue); font-weight: 600; }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); background: var(--card); }
.facts > div { position: relative; padding: 22px 20px; border-left: 1px solid var(--card-line); transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease; }
.facts > div:hover { z-index: 1; background: var(--white); border-radius: 10px; box-shadow: 0 12px 28px rgb(30 42 58 / .14); transform: scale(1.05); }
.facts > div:first-child { border-left: 0; }
.facts dt { font-size: .82rem; color: var(--muted); }
.facts dd { margin: 3px 0 0; font-weight: 600; line-height: 1.35; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 18px; border-top: 2px solid var(--teal); border-radius: 10px; background: color-mix(in srgb, var(--white) 80%, transparent); box-shadow: 0 1px 3px rgb(30 42 58 / .08); transition: transform .2s ease, box-shadow .2s ease; }
.steps li:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgb(30 42 58 / .12); }
.steps li::before { content: counter(step); display: block; font: 600 .95rem/1 var(--mono); color: var(--teal-dark); margin-bottom: 14px; }
.steps p { margin-top: 8px; color: var(--muted); }
.steps a { color: inherit; text-decoration: none; }
.steps a::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.steps h3::after { content: " →"; color: var(--teal-dark); opacity: .55; transition: opacity .2s, margin-left .2s; }
.steps li:hover h3::after, .steps a:focus-visible h3::after { opacity: 1; margin-left: 4px; }
.steps li:has(a:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
.steps a:focus-visible { outline: none; }

/* Tour */
.tour { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.segmented { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--blue-tint); margin-bottom: 20px; }
.segmented button { min-height: 38px; padding: 6px 18px; border: 0; border-radius: 7px; background: transparent; color: var(--blue-dark); font: 500 .92rem var(--sans); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--white); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgb(30 42 58 / .16); }
.tour-tabs { display: grid; }
.tour-tabs button { display: block; width: 100%; padding: 14px 16px; border: 0; border-left: 2px solid var(--line); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background-color .15s, border-color .15s; }
.tour-tabs button:hover { background: var(--paper); }
.tour-tabs button[aria-selected="true"] { border-left-color: var(--teal); background: var(--card); }
.tab-name { display: block; font-weight: 600; }
.tab-caption { display: block; color: var(--muted); font-size: .94rem; line-height: 1.45; }
.tour-stage { display: flex; justify-content: center; }
.tour-image { width: auto; max-height: min(720px, 82vh); border-radius: 20px; box-shadow: 0 16px 44px rgb(30 42 58 / .2); transition: opacity .18s; }
.tour-image.is-changing { opacity: 0; }

/* Lists */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 40px; }
.feature-grid h3 { margin-bottom: 6px; }
.feature-grid p { color: var(--muted); font-size: .98rem; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.notice { padding: 18px 20px; border-left: 3px solid var(--orange); background: var(--card); border-radius: 0 var(--radius) var(--radius) 0; }
.notice strong { display: block; margin-bottom: 3px; }
.checks { margin: 0; padding: 0; list-style: none; }
.checks li { padding: 13px 0; border-bottom: 1px solid var(--line); }
.checks li:first-child { padding-top: 0; }

/* PLC picker */
.picker > input { position: absolute; opacity: 0; pointer-events: none; }
.picker-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.picker-tabs label { display: inline-flex; align-items: center; min-height: 42px; padding: 7px 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); font: 500 .94rem var(--mono); cursor: pointer; }
.picker-tabs label:hover { border-color: var(--teal); }
.plc-panel { display: none; padding: 22px; background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); }
.plc-values { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 16px; }
.plc-values dt { font-size: .82rem; color: var(--muted); }
.plc-values dd { margin: 0; font: 600 1.7rem/1.3 var(--mono); color: var(--teal-dark); }
.plc-panel p { color: var(--muted); font-size: .96rem; }
#plc300:checked ~ .picker-tabs [for="plc300"], #plc400:checked ~ .picker-tabs [for="plc400"], #plc1200:checked ~ .picker-tabs [for="plc1200"], #plc1500:checked ~ .picker-tabs [for="plc1500"], #plclogo:checked ~ .picker-tabs [for="plclogo"] { background: var(--teal-dark); border-color: var(--teal-dark); color: var(--paper); }
#plc300:focus-visible ~ .picker-tabs [for="plc300"], #plc400:focus-visible ~ .picker-tabs [for="plc400"], #plc1200:focus-visible ~ .picker-tabs [for="plc1200"], #plc1500:focus-visible ~ .picker-tabs [for="plc1500"], #plclogo:focus-visible ~ .picker-tabs [for="plclogo"] { outline: 3px solid var(--orange); outline-offset: 2px; }
#plc300:checked ~ .p300, #plc400:checked ~ .p400, #plc1200:checked ~ .p1200, #plc1500:checked ~ .p1500, #plclogo:checked ~ .plogo { display: block; }

/* Guide */
.guide-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; align-items: start; }
.guide-nav { position: sticky; top: 92px; display: grid; gap: 2px; font-size: .94rem; }
.guide-nav a { padding: 6px 12px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; }
.guide-nav a:hover { color: var(--ink); }
.guide-nav a.is-current { border-left-color: var(--teal); color: var(--ink); font-weight: 600; }
.guide-content > section { padding-block: 0 64px; }
.guide-content > section + section { border-top: 1px solid var(--line); padding-top: 56px; }
.guide-content h2 { margin-bottom: 14px; }
.guide-content h3 { margin: 28px 0 8px; }
.guide-content ul, .guide-content ol { padding-left: 1.25em; margin: 12px 0 0; }
.guide-content li + li { margin-top: 6px; }
.guide-content .muted { color: var(--muted); }
.table-wrap { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: .96rem; }
th, td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .82rem; font-weight: 600; color: var(--muted); }
td code { white-space: nowrap; color: var(--blue-dark); }

/* Network path */
.guide-content h4 { margin: 22px 0 6px; color: var(--teal-dark); font-size: 1.02rem; }
.path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 18px; background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); }
.path div { padding: 15px 16px; border-left: 1px solid var(--card-line); }
.path div:first-child { border-left: 0; }
.path small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; margin-bottom: 5px; }
.path code { display: block; font-weight: 600; overflow-wrap: anywhere; }

/* Video */
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.video-frame { aspect-ratio: 16 / 9; width: 100%; border: 0; border-radius: var(--radius); }
.video-load { display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 16 / 9; width: 100%; padding: 13px; border: 1px solid var(--card-line); border-radius: var(--radius); background: var(--card); color: var(--ink); font: 500 .9rem/1.35 var(--sans); text-align: left; cursor: pointer; }
.video-load:hover { border-color: var(--blue); }
.video-load span { color: var(--teal-dark); font-size: .8rem; margin-top: 4px; }
.tour-video { width: min(300px, 100%); margin-top: 16px; border-radius: 16px; background: var(--ink); }

/* Form */
.form { display: grid; gap: 20px; padding: clamp(20px, 4vw, 34px); background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field label, .field legend { display: block; margin-bottom: 6px; padding: 0; font-weight: 600; font-size: .95rem; }
.field .optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--white); color: var(--ink); font: 16px/1.45 var(--sans); }
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid var(--orange); outline-offset: 0; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { margin-top: 5px; color: var(--error); font-size: .88rem; }
.field-error:empty { display: none; }
.trap { position: absolute; left: -9999px; height: 1px; overflow: hidden; }
.form-note { padding: 14px 16px; border-radius: 8px; background: var(--white); font-size: .92rem; line-height: 1.5; }
.form-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.status { padding: 14px 16px; border-radius: 8px; font-size: .96rem; }
.status:empty { display: none; }
.status.is-success { background: var(--success-bg); color: var(--success-ink); }
.status.is-error { background: var(--error-bg); color: var(--error); }

/* Prose */
.prose h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 18px; }
.prose h2 { font-size: 1.4rem; margin: 38px 0 10px; }
.prose ul { padding-left: 1.25em; }
.prose li + li { margin-top: 6px; }

/* Footer */
.site-footer { padding-block: 34px; border-top: 1px solid var(--line); background: var(--card); }
.visits { margin-bottom: 18px; color: var(--teal-dark); font-weight: 600; }
.visits[hidden] { display: none; }
.footer-row { display: flex; justify-content: space-between; gap: 30px; }
.footer-row p + p { margin-top: 8px; }
.footer-row > .fine { flex: none; }
.footer-row > div .fine { max-width: 68ch; }

/* Reveal on scroll, only once JavaScript has set it up */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 520px) {
  .lang-menu .lang-name { display: none; }
}

@media (max-width: 1180px) {
  .timeline-year.is-minor { display: none; }
}

@media (max-width: 900px) {
  .hero-grid, .split, .tour, .guide-layout { grid-template-columns: minmax(0, 1fr); }
  .plant-top { grid-template-columns: minmax(0, 1fr); }
  .changelog-intro { grid-template-columns: minmax(0, 1fr); }
  .changelog-intro .rack { width: min(280px, 80%); justify-self: start; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts > div:nth-child(3) { border-left: 0; }
  .facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .guide-nav { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; scrollbar-width: none; }
  .guide-nav a { border-left: 0; border-bottom: 2px solid var(--line); white-space: nowrap; }
  .guide-nav a.is-current { border-bottom-color: var(--teal); }
  .tour-tabs { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; scrollbar-width: none; }
  .tour-tabs button { border-left: 0; border-bottom: 2px solid var(--line); padding: 10px 14px; }
  .tour-tabs button[aria-selected="true"] { border-bottom-color: var(--teal); }
  .tab-caption { display: none; }
  .tour-stage { flex-direction: column; align-items: center; }
  .tour-image { max-height: 76vh; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .header-row { flex-wrap: wrap; gap: 0 14px; padding-block: 8px; }
  .brand { font-size: 1.5rem; gap: 9px; }
  .site-header nav { order: 3; width: 100%; gap: 16px; overflow-x: auto; scrollbar-width: none; }
  .site-header nav a { white-space: nowrap; font-size: .9rem; }
  .timeline { --lens: 76px; --axis: 92px; }
  .timeline-detail { min-height: 118px; }
  .changelog th, .changelog td { padding-right: 10px; font-size: .9rem; }
  .changelog tbody th { width: 52px; font-size: .88rem; }
  .changelog .changelog-date { width: 82px; font-size: .78rem; white-space: normal; }
  .steps, .feature-grid, .form-row, .gallery { grid-template-columns: minmax(0, 1fr); }
  .path { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .path div:nth-child(3) { border-left: 0; }
  .path div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .video-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-row { flex-direction: column; gap: 12px; }
  html { scroll-padding-top: 112px; }
}

/* After the 620px rules, so that they win on phones */
@media (max-width: 520px) {
  .header-row { gap: 0 10px; }
  .header-end { gap: 8px; }
  .brand { font-size: 1.25rem; gap: 8px; }
  .brand img { width: 36px; height: 36px; }
  .theme-toggle { width: 34px; height: 34px; }
  .lang-menu summary { min-height: 34px; padding: 0 7px; }
  .header-end .button-small { min-height: 34px; padding: 6px 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .signal i::after { animation: none; transform: translateX(100%); }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tour-image { transition: none; }
  .steps li { transition: none; }
  .steps li:hover { transform: none; }
  .facts > div { transition: none; }
  .facts > div:hover { transform: none; }
  .welcome[open] { animation: none; }
  .timeline-tick, .timeline-lens, .timeline-link, .timeline.is-ready .timeline-detail, .changelog tbody tr { transition: none; }
  .led-scan { animation: none; }
  .ladder .wire.live, .running .belt-top { animation: none; }
}

/* News and OPC Server Setup (73.0) */
.news .button { margin-top: 6px; }
.news-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; text-align: center; }
.news-docs-intro { margin-top: 28px; color: var(--muted); text-align: center; }
.news .eyebrow, .setup .eyebrow { font-size: 1rem; }
.setup-head { max-width: 820px; }
.setup-head h1 { font-size: clamp(1.8rem, 4.2vw, 2.8rem); }
.setup-head .lead { margin-top: 16px; }
.setup-note { margin: 14px 0 0; padding: 12px 16px; background: var(--card); border: 1px solid var(--card-line); border-left: 4px solid var(--orange); border-radius: var(--radius); }
.setup-steps { display: grid; gap: 22px; margin: 34px 0 0; padding: 0; list-style: none; }
.setup-step { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: clamp(16px, 3vw, 32px); align-items: start; padding: clamp(14px, 2.4vw, 24px); background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); }
.setup-step.is-wide { grid-template-columns: minmax(0, 1fr); }
.setup-number { margin: 0 0 4px; color: var(--orange-ink); font: 700 .82rem var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.setup-text h2 { margin: 0 0 8px; font-size: 1.2rem; }
.setup-text p:last-child { margin: 0; }
.setup-shot { display: block; overflow: hidden; border: 1px solid var(--card-line); border-radius: 8px; background: #fff; transition: box-shadow .15s, transform .15s; }
.setup-shot:hover { box-shadow: 0 8px 22px rgba(30, 42, 58, .2); transform: translateY(-2px); }
.setup-shot img { display: block; width: 100%; height: auto; }
.setup-back { margin-top: 28px; }
@media (max-width: 760px) { .setup-step { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .setup-shot { transition: none; } .setup-shot:hover { transform: none; } }

/* App Store QR code and tutorial video of the overview page (73.0) */
.store { display: flex; align-items: center; gap: 22px; margin-top: 30px; }
.store .actions { flex: 1; margin-top: 0; }
.actions-stack { flex-direction: column; align-items: flex-start; }
.actions-pair { display: flex; flex-wrap: nowrap; gap: 12px; }
.actions-pair .button { white-space: nowrap; }
.qr { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 132px; color: var(--muted); font-size: .74rem; line-height: 1.25; text-align: center; text-decoration: none; }
.qr img:not(.badge) { width: 104px; height: 104px; padding: 6px; background: #fff; border-radius: 10px; box-shadow: 0 2px 12px rgba(20, 30, 45, .16); image-rendering: pixelated; }
.qr .badge { width: auto; height: 40px; }
.qr:hover img { filter: brightness(1.04); }
@media (max-width: 760px), (hover: none) { .qr { display: none; } }
.tutorial { width: min(1100px, 100% - 32px); max-width: none; padding: 0; border: 0; border-radius: var(--radius); background: #0b1118; color: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.tutorial::backdrop { background: rgba(5, 10, 16, .72); }
.tutorial-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 18px; }
.tutorial-head p { margin: 0; color: #dfe7ef; font-size: .95rem; }
.tutorial-close { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.tutorial-close:hover { background: rgba(255, 255, 255, .22); }
.tutorial video { display: block; width: 100%; height: auto; background: #000; }
