/* Cydral Technology, site stylesheet.
   Tokens first, then base, layout, components and page parts. Night sections carry the vision,
   day sections carry the facts. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-ext.woff2?v=776f6dcaf0") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin.woff2?v=a79fdb52d4") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Spectral";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/spectral-italic-latin-ext.woff2?v=f554218b51") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Spectral";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/spectral-italic-latin.woff2?v=db397149a9") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Cyrillic companions: fetched only by the pages that show Cyrillic text in these families. */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/onest-cyrillic.woff2?v=68e5e01d62") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Spectral";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/spectral-italic-cyrillic.woff2?v=800e7c4478") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2?v=18be452724") format("woff2");
}

:root {
  --night: #0b1233;
  --night-2: #121b47;
  --night-3: #24306a;
  --ink: #101a3f;
  --ink-2: #4a557f;
  --ink-3: #7a84a8;
  --paper: #f4f6fb;
  --white: #ffffff;
  --line: #d9deec;
  --gold: #f2b544;
  --gold-deep: #a86a00;
  --blue: #5b8cff;
  --blue-deep: #2b50d6;
  --teal: #2fd3c0;
  --teal-deep: #0b7a6e;
  --violet: #b690ff;
  --violet-deep: #6a3fd0;
  --on-night: #e9edfb;
  --soft-on-night: #aeb8de;
  --orbit: rgba(154, 169, 214, 0.26);

  --accent: var(--gold);
  --accent-deep: var(--gold-deep);

  --sans: "Bricolage Grotesque", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1.0625rem;
  --step-2: 1.3125rem;
  --step-3: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);
  --step-4: clamp(1.875rem, 1.4rem + 2vw, 2.625rem);
  --step-5: clamp(2.375rem, 1.5rem + 3.8vw, 4.125rem);

  --wrap: 75rem;
  --gutter: clamp(1.25rem, 0.6rem + 2.6vw, 2.5rem);
  --band: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem);
  --radius: 6px;
  --header-h: 4.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step-1);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 660;
  line-height: 1.08;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); letter-spacing: -0.032em; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); line-height: 1.2; letter-spacing: -0.012em; }
h4 { font-size: var(--step-1); line-height: 1.3; letter-spacing: 0; }

p { margin: 0 0 1em; max-width: 68ch; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue-deep); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.day :focus-visible { outline-color: var(--blue-deep); }

code, kbd, pre { font-family: var(--mono); font-size: 0.9em; }
code { padding: 0.08em 0.32em; background: rgba(16, 26, 63, 0.07); border-radius: 3px; overflow-wrap: anywhere; }
pre {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  background: var(--night);
  color: var(--on-night);
  border-radius: var(--radius);
  line-height: 1.55;
  font-size: var(--step--1);
  tab-size: 2;
}
pre code { padding: 0; background: none; color: inherit; font-size: inherit; overflow-wrap: normal; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.6rem 1rem; background: var(--gold); color: var(--night); font-weight: 600; border-radius: var(--radius);
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(11, 18, 51, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--orbit);
  color: var(--on-night);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 2.25rem; width: auto; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }
.nav-list { display: flex; align-items: center; gap: 0.15rem; margin: 0; padding: 0; list-style: none; }
.nav-list > li { position: relative; }
.nav a, .nav button {
  font: inherit; color: var(--on-night); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.nav-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.55rem 0.7rem; border-radius: var(--radius);
  font-size: var(--step-0); font-weight: 500; letter-spacing: 0.002em; white-space: nowrap;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { background: rgba(255, 255, 255, 0.08); }
.nav-link[aria-current="page"], .nav-link.is-section { color: var(--gold); }
.nav-link svg { width: 1.15rem; height: 1.15rem; flex: none; }
.nav-link .chev { width: 0.7rem; height: 0.7rem; opacity: 0.7; transition: transform 0.15s; }
.nav-link[aria-expanded="true"] .chev { transform: rotate(180deg); }

.menu {
  position: absolute; top: calc(100% + 0.5rem); left: 0; z-index: 60;
  min-width: 19rem; margin: 0; padding: 0.5rem; list-style: none;
  background: var(--night-2); border: 1px solid var(--night-3); border-radius: 10px;
  box-shadow: 0 18px 40px rgba(3, 6, 22, 0.5);
  display: none;
}
.menu.is-right { left: auto; right: 0; }
.menu.is-open { display: block; }
.menu a {
  display: block; padding: 0.6rem 0.75rem; border-radius: var(--radius);
  font-size: var(--step-0); font-weight: 560; line-height: 1.3;
}
.menu a small { display: block; margin-top: 0.15rem; font-size: var(--step--1); font-weight: 400; color: var(--soft-on-night); }
.menu a:hover, .menu a:focus-visible { background: rgba(255, 255, 255, 0.08); }
.menu a[aria-current="true"] { color: var(--gold); }
.menu .sep { height: 1px; margin: 0.4rem 0.5rem; background: var(--night-3); }

/* The language list is a native control: it keeps the keyboard and the touch behaviour of the platform. */
/* A long menu label gives way to its abbreviation between the mobile menu and the width where it fits. That width
   depends on the language: the label is longer in German and Spanish, and longer still in Russian. */
.nav-link .short { display: none; }
@media (min-width: 68.0625rem) and (max-width: 78rem) {
  .nav-link .full { display: none; }
  .nav-link .short { display: inline; }
}
@media (min-width: 68.0625rem) and (max-width: 87rem) {
  html:is([lang="de"], [lang="es"]) .nav-link .full { display: none; }
  html:is([lang="de"], [lang="es"]) .nav-link .short { display: inline; }
}
@media (min-width: 68.0625rem) and (max-width: 96rem) {
  html[lang="ru"] .nav-link .full { display: none; }
  html[lang="ru"] .nav-link .short { display: inline; }
}
@media (min-width: 68.0625rem) and (max-width: 76rem) {
  html[lang="ru"] .site-header .wrap { gap: 1rem; }
  html[lang="ru"] .nav-link { padding-inline: 0.4rem; font-size: 0.875rem; }
}
.nav-lang { margin-left: 0.35rem; }
.no-js .nav-lang { display: none; }
.select { position: relative; display: inline-flex; align-items: center; color: var(--on-night); }
.select svg { position: absolute; top: 50%; width: 1.05rem; height: 1.05rem; transform: translateY(-50%); pointer-events: none; }
.select svg:first-child { left: 0.7rem; }
.select svg.chev { right: 0.7rem; width: 0.7rem; height: 0.7rem; opacity: 0.7; }
.select select {
  -webkit-appearance: none; appearance: none;
  min-height: 2.4rem; padding: 0.4rem 1.9rem 0.4rem 2.2rem;
  font: inherit; font-size: var(--step-0); font-weight: 500; line-height: 1.2; color: inherit;
  background: transparent; border: 1px solid var(--night-3); border-radius: var(--radius); cursor: pointer;
}
.select select:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--soft-on-night); }
.select select option { color: var(--on-night); background: var(--night-2); }

.nav-toggle {
  display: none; margin-left: auto; width: 2.75rem; height: 2.75rem; padding: 0;
  align-items: center; justify-content: center;
  color: var(--on-night); background: none; border: 1px solid var(--night-3); border-radius: var(--radius); cursor: pointer;
}
.nav-toggle svg { width: 1.4rem; height: 1.4rem; }
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-menu { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: block; }

/* ---------------------------------------------------------------------------- bands */

.band { padding-block: var(--band); }
.band.tight { padding-block: calc(var(--band) * 0.62); }
.night { background: var(--night); color: var(--on-night); }
.night p { color: var(--soft-on-night); }
.night a { color: var(--on-night); }
.night code { background: rgba(255, 255, 255, 0.1); }
.day { background: var(--paper); }
.white { background: var(--white); }
.sky {
  background-color: var(--night);
  background-image: linear-gradient(180deg, rgba(11, 18, 51, 0.55), rgba(11, 18, 51, 0.2) 45%, var(--night) 100%),
    image-set(url("../img/photo/sky-1920.webp?v=617008942a") type("image/webp"), url("../img/photo/sky-1920.jpg?v=49a9abe030") type("image/jpeg"));
  background-size: cover; background-position: center top;
}

.band-head { max-width: 46rem; margin-bottom: clamp(1.1rem, 0.85rem + 1.2vw, 1.6rem); }
.band-head p { margin-top: 0.75rem; font-size: var(--step-2); line-height: 1.45; color: var(--ink-2); }
.night .band-head p { color: var(--soft-on-night); }

.lead { font-size: var(--step-2); line-height: 1.45; }
.note { font-family: var(--serif); font-style: italic; font-size: var(--step-1); color: var(--ink-2); }
.night .note { color: var(--soft-on-night); }
.small { font-size: var(--step-0); }
.muted { color: var(--ink-2); }
.night .muted { color: var(--soft-on-night); }

/* ---------------------------------------------------------------------------- buttons */

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 3rem; padding: 0.7rem 1.25rem;
  font: inherit; font-size: var(--step-1); font-weight: 600; line-height: 1.2; text-decoration: none;
  border: 1.5px solid transparent; border-radius: var(--radius); cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn svg { width: 1.15rem; height: 1.15rem; flex: none; }
.btn-primary { background: var(--gold); color: var(--night); }
.btn-primary:hover { background: #ffc85c; }
.btn-ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-ghost:hover { background: rgba(16, 26, 63, 0.06); }
.night .btn-ghost { color: var(--on-night); border-color: var(--soft-on-night); }
.night .btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--on-night); }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

.textlink { font-weight: 600; }

/* ---------------------------------------------------------------------------- hero */

.hero { position: relative; overflow: hidden; padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.75rem) clamp(2.5rem, 1.5rem + 3.5vw, 4.25rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(1.5rem, 3.5vw, 3rem); align-items: center; }
.hero h1 { max-width: 17ch; }
.hero .lead { margin-top: 1.5rem; max-width: 34rem; color: var(--on-night); }

.chart { position: relative; margin: 0; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart figcaption { margin-top: 0.75rem; max-width: 30rem; font-family: var(--serif); font-style: italic; font-size: var(--step-0); color: var(--soft-on-night); }
.chart .grid line, .chart .grid path { stroke: var(--orbit); stroke-width: 1; fill: none; }
.chart .grid text { fill: #7f8bb8; font-family: var(--serif); font-style: italic; font-size: 13px; }
.chart .figure { stroke: #c9d3f5; stroke-opacity: 0.55; stroke-width: 1.4; fill: none; stroke-linecap: round; }
.chart .star { fill: #f4f6fb; }
.chart .label { fill: var(--on-night); font-family: var(--serif); font-style: italic; font-size: 16px; }
.chart .label.sub { fill: #8f9bc6; font-size: 13px; }
.chart .albireo-link { cursor: pointer; }
.chart .albireo-link .label { fill: var(--gold); font-size: 19px; }
.chart .albireo-link:hover .ring, .chart .albireo-link:focus-visible .ring { stroke-opacity: 0.95; }
.chart .ring { fill: none; stroke: var(--gold); stroke-opacity: 0.45; stroke-width: 1.2; transition: stroke-opacity 0.2s; }

.d0 { --i: 0; } .d1 { --i: 1; } .d2 { --i: 2; } .d3 { --i: 3; } .d4 { --i: 4; } .d5 { --i: 5; } .d6 { --i: 6; }
.d7 { --i: 7; } .d8 { --i: 8; } .d9 { --i: 9; } .d10 { --i: 10; } .d11 { --i: 11; } .d12 { --i: 12; }

@media (prefers-reduced-motion: no-preference) {
  .chart .figure { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s cubic-bezier(0.5, 0, 0.2, 1) forwards; animation-delay: calc(var(--i, 0) * 0.28s + 0.3s); }
  .chart .star, .chart .label, .chart .pair, .chart .ring { opacity: 0; animation: appear 0.7s ease-out forwards; animation-delay: calc(var(--i, 0) * 0.12s + 0.15s); }
  .chart .twinkle { animation: appear 0.7s ease-out forwards, twinkle 5.5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 0.12s + 0.15s), calc(var(--i, 0) * 0.7s + 2.4s); }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes appear { to { opacity: 1; } }
  @keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
}

.page-hero { padding-block: clamp(2.25rem, 1.25rem + 3.5vw, 4rem) clamp(2rem, 1.25rem + 3vw, 3.25rem); }
.page-hero h1 { max-width: 18ch; }
.page-hero .lead { margin-top: 1.25rem; max-width: 44rem; color: var(--on-night); }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.5rem; padding: 0; list-style: none; font-size: var(--step-0); color: var(--soft-on-night); }
.crumbs a { color: var(--soft-on-night); }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; opacity: 0.6; }

/* ---------------------------------------------------------------------------- facts */

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--orbit); }
.facts > div { padding: 1.5rem 1.5rem 0.25rem 0; }
.facts > div + div { padding-left: 1.5rem; border-left: 1px solid var(--orbit); }
.facts { padding-bottom: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem); }
.facts dt { font-size: var(--step-2); font-weight: 640; letter-spacing: -0.012em; color: var(--on-night); }
.facts dd { margin: 0.4rem 0 0; font-size: var(--step-0); color: var(--soft-on-night); }

/* ---------------------------------------------------------------------------- plates */

.plates { display: grid; gap: 1.25rem; }
.plates.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plates.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plates.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.plate {
  position: relative; display: flex; flex-direction: column;
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.night .plate { background: var(--night-2); border-color: var(--night-3); }
.plate h3 + p, .plate h4 + p { margin-top: 0.6rem; }
.plate p { font-size: var(--step-0); color: var(--ink-2); }
.night .plate p { color: var(--soft-on-night); }
.plate .kind { margin-bottom: 0.6rem; font-family: var(--serif); font-style: italic; font-size: var(--step-0); color: var(--ink-2); }
.night .plate .kind { color: var(--soft-on-night); }
.plate .more { margin-top: auto; padding-top: 1.1rem; font-size: var(--step-0); font-weight: 600; }
.plate.is-link { transition: border-color 0.15s; }
.plate.is-link:hover { border-color: var(--ink-3); }
.plate.is-link h3 a { color: inherit; text-decoration: none; }
.plate.is-link h3 a::after { content: ""; position: absolute; inset: 0; }
.plate.accent { border-top: 3px solid var(--accent); }
.plate .fig { margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--ink); }
.plate .fig b { font-weight: 660; font-variant-numeric: tabular-nums; }
.night .plate .fig { border-color: var(--night-3); color: var(--on-night); }

.product-mark { width: 3rem; height: 3rem; margin-bottom: 1rem; }

.build { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1.25rem; }
.build .plate.wide { grid-row: span 2; }
.build .shot { margin: 1.25rem -0.25rem -0.25rem; }

.shot { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--white); box-shadow: 0 14px 34px rgba(16, 26, 63, 0.1); }
.night .shot { border-color: var(--night-3); box-shadow: 0 18px 44px rgba(3, 6, 22, 0.55); }
.shot img { width: 100%; }

/* ---------------------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.night .table-wrap { border-color: var(--night-3); background: var(--night-2); }
table { width: 100%; border-collapse: collapse; font-size: var(--step-0); line-height: 1.45; font-variant-numeric: tabular-nums; }
caption { padding: 0.9rem 1rem 0.2rem; text-align: left; font-weight: 640; font-size: var(--step-1); caption-side: top; }
th, td { padding: 0.7rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.night th, .night td { border-color: var(--night-3); }
thead th { font-weight: 600; color: var(--ink-2); white-space: nowrap; background: rgba(16, 26, 63, 0.03); }
.night thead th { color: var(--soft-on-night); background: rgba(255, 255, 255, 0.03); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; }
td .best { font-weight: 680; }
.table-note { margin-top: 0.75rem; font-family: var(--serif); font-style: italic; font-size: var(--step-0); color: var(--ink-2); max-width: 70ch; }
.night .table-note { color: var(--soft-on-night); }

.spec th { width: 32%; min-width: 9rem; color: var(--ink-2); font-weight: 560; }
.spec td { overflow-wrap: anywhere; }

.meter { display: inline-block; width: 5.5rem; height: 0.4rem; margin-left: 0.6rem; vertical-align: middle; border-radius: 1px; overflow: hidden; }
.meter .bg { fill: rgba(16, 26, 63, 0.1); }
.meter .fg { fill: var(--accent-deep); }
.night .meter .bg { fill: rgba(255, 255, 255, 0.12); }
.night .meter .fg { fill: var(--accent); }

.state { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 3px; font-size: var(--step--1); font-weight: 600; white-space: nowrap; }
.state.yes { background: #dff5ec; color: #0b6b47; }
.state.part { background: #fdf0d2; color: #7a4d00; }
.state.no { background: #eceef5; color: #4a557f; }

/* ---------------------------------------------------------------------------- lists */

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.steps li { counter-increment: step; padding: 1.4rem 1.5rem 1.4rem 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); display: block; margin-bottom: 0.5rem; font-family: var(--serif); font-style: italic; font-size: var(--step-2); color: var(--accent-deep); }
.steps h3 { font-size: var(--step-1); }
.steps p { margin-top: 0.35rem; font-size: var(--step-0); color: var(--ink-2); }

.ticks { margin: 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding: 0.55rem 0 0.55rem 1.6rem; border-bottom: 1px solid var(--line); font-size: var(--step-0); }
.night .ticks li { border-color: var(--night-3); }
.ticks li::before { content: ""; position: absolute; left: 0.15rem; top: 1.05rem; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); }

.defs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; margin: 0; }
.defs > div { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.night .defs > div { border-color: var(--night-3); }
.defs dt { font-weight: 640; }
.defs dd { margin: 0.3rem 0 0; font-size: var(--step-0); color: var(--ink-2); }
.night .defs dd { color: var(--soft-on-night); }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.split.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split > * { min-width: 0; }
.stack > * + * { margin-top: 1.25rem; }
.stack-lg > * + * { margin-top: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem); }

/* ---------------------------------------------------------------------------- stack diagram */

.layers { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.layers li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; align-items: baseline; padding: 0.95rem 1.1rem; background: var(--night-2); border: 1px solid var(--night-3); border-radius: var(--radius); }
.layers li:first-child { border-color: var(--gold); }
.layers b { font-weight: 640; color: var(--on-night); }
.layers span { font-size: var(--step-0); color: var(--soft-on-night); }

/* ---------------------------------------------------------------------------- product pages */

.product-hero { padding-block: clamp(2.25rem, 1.25rem + 3.5vw, 3.75rem) 0; }
.product-hero .intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; padding-bottom: clamp(2rem, 1.5rem + 2.5vw, 3.25rem); }
.product-hero h1 { display: flex; align-items: center; gap: 1rem; }
.product-hero h1 img { width: 1.1em; height: 1.1em; }
.product-hero .tagline { margin-top: 1.1rem; font-size: var(--step-3); font-weight: 560; line-height: 1.2; letter-spacing: -0.015em; color: var(--on-night); max-width: 24ch; }
.product-hero .lead { margin-top: 1.1rem; font-size: var(--step-1); color: var(--soft-on-night); }
.release { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; font-size: var(--step-0); color: var(--soft-on-night); }
.release b { color: var(--on-night); font-weight: 600; }

.subnav { position: sticky; top: var(--header-h); z-index: 20; background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.subnav ul { display: flex; gap: 0.25rem; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a { display: block; padding: 0.9rem 0.8rem; font-size: var(--step-0); font-weight: 560; color: var(--ink-2); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--ink); border-color: var(--accent-deep); }

.theme-albireo { --accent: var(--blue); --accent-deep: var(--blue-deep); }
.theme-pseudalis { --accent: var(--teal); --accent-deep: var(--teal-deep); }
.theme-next { --accent: var(--violet); --accent-deep: var(--violet-deep); }

.gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.gallery-stage { position: relative; }
.gallery-stage figure { margin: 0; display: none; }
.gallery-stage figure.is-on { display: block; }
.gallery-stage figcaption { margin-top: 0.8rem; font-family: var(--serif); font-style: italic; color: var(--soft-on-night); }
.day .gallery-stage figcaption, .white .gallery-stage figcaption { color: var(--ink-2); }
.gallery-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.gallery-tabs button {
  padding: 0.45rem 0.85rem; font: inherit; font-size: var(--step-0); font-weight: 560; cursor: pointer;
  color: var(--ink-2); background: transparent; border: 1px solid var(--line); border-radius: 999px;
}
.gallery-tabs button[aria-selected="true"] { color: var(--white); background: var(--ink); border-color: var(--ink); }
.night .gallery-tabs button { color: var(--soft-on-night); border-color: var(--night-3); }
.night .gallery-tabs button[aria-selected="true"] { color: var(--night); background: var(--on-night); border-color: var(--on-night); }

video.tour { width: 100%; border-radius: 10px; border: 1px solid var(--night-3); background: var(--night-2); }

/* Pseudonymization example */
.pseudo { border: 1px solid var(--night-3); border-radius: 10px; overflow: hidden; background: var(--night-2); }
.pseudo-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--night-3); font-size: var(--step-0); color: var(--soft-on-night); }
.pseudo-switch { display: inline-flex; padding: 0.2rem; background: var(--night); border: 1px solid var(--night-3); border-radius: 999px; }
.pseudo-switch button { padding: 0.35rem 0.85rem; font: inherit; font-size: var(--step--1); font-weight: 600; color: var(--soft-on-night); background: none; border: 0; border-radius: 999px; cursor: pointer; }
.pseudo-switch button[aria-pressed="true"] { background: var(--teal); color: var(--night); }
.pseudo-doc { margin: 0; padding: 1.25rem 1.25rem 1.4rem; font-family: var(--mono); font-size: var(--step--1); line-height: 1.75; color: var(--on-night); white-space: pre-wrap; overflow-wrap: anywhere; min-height: 15.5rem; }
.pseudo-doc mark { padding: 0.05em 0.25em; border-radius: 3px; color: var(--night); background: var(--gold); }
.pseudo-doc mark.t { background: var(--teal); }
.pseudo-note { padding: 0.7rem 1rem; border-top: 1px solid var(--night-3); font-family: var(--serif); font-style: italic; font-size: var(--step-0); color: var(--soft-on-night); }

/* ---------------------------------------------------------------------------- downloads */

.dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.dl-card { display: flex; flex-direction: column; padding: 1.5rem; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); }
.dl-card h3 { display: flex; align-items: center; gap: 0.6rem; }
.dl-card h3 img { width: 1.75rem; height: 1.75rem; }
.dl-card p { margin-top: 0.6rem; font-size: var(--step-0); color: var(--ink-2); }
.dl-meta { margin: 1rem 0 0; padding: 0; font-size: var(--step-0); }
.dl-meta div { display: flex; gap: 0.75rem; padding: 0.4rem 0; border-top: 1px solid var(--line); }
.dl-meta dt { flex: none; width: 5.5rem; color: var(--ink-2); }
.dl-meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.dl-meta .hash { font-family: var(--mono); font-size: 0.74rem; line-height: 1.5; }
.dl-card .actions { margin-top: auto; padding-top: 1.25rem; }
.dl-card .btn { width: 100%; }
.dl-state { margin-top: 0.75rem; font-size: var(--step--1); color: var(--ink-2); }
.dl-state[hidden] { display: none; }
.copy { margin-left: 0.4rem; padding: 0.1rem 0.45rem; font: inherit; font-size: 0.72rem; font-weight: 600; color: var(--blue-deep); background: none; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; }
.notes { margin-top: 1rem; font-size: var(--step-0); }
.notes summary { cursor: pointer; font-weight: 600; color: var(--blue-deep); }
.notes p { margin-top: 0.6rem; color: var(--ink-2); }

.tree { margin: 0; padding: 1.1rem 1.25rem; background: var(--night); color: var(--on-night); border-radius: var(--radius); font-family: var(--mono); font-size: var(--step--1); line-height: 1.7; overflow-x: auto; white-space: pre; }
.tree i { font-style: normal; color: #8f9bc6; }

/* ---------------------------------------------------------------------------- repos */

.repo { display: flex; flex-direction: column; padding: 1.4rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.repo h3 { font-size: var(--step-1); font-family: var(--mono); font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.repo h3 a { color: var(--ink); text-decoration: none; }
.repo h3 a:hover { text-decoration: underline; }
.repo p { margin-top: 0.55rem; font-size: var(--step-0); color: var(--ink-2); }
.repo .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: auto 0 0; padding: 1rem 0 0; list-style: none; font-size: var(--step--1); color: var(--ink-2); }
.repo .tags li { padding: 0.1rem 0.5rem; border: 1px solid var(--line); border-radius: 3px; }
.repo figure { margin: 1rem 0 0; }
.repo figure img { width: 100%; border-radius: 4px; }
.repo.wide { grid-column: span 2; }

/* ---------------------------------------------------------------------------- form */

.form { display: grid; gap: 1.1rem; }
.form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.field label { display: block; margin-bottom: 0.35rem; font-size: var(--step-0); font-weight: 600; }
.field .opt { font-weight: 400; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.75rem 0.85rem; font: inherit; font-size: var(--step-1); color: var(--ink);
  background: var(--white); border: 1.5px solid #b9c0d8; border-radius: var(--radius);
}
.field textarea { min-height: 10rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue-deep); outline-offset: 1px; border-color: var(--blue-deep); }
.field [aria-invalid="true"] { border-color: #c0392b; }
.field .err { margin-top: 0.3rem; font-size: var(--step--1); color: #a32a1e; }
.hp { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 0.9rem 1rem; border-radius: var(--radius); font-size: var(--step-0); }
.form-status[hidden] { display: none; }
.form-status.ok { background: #dff5ec; color: #0b5a3c; }
.form-status.ko { background: #fbe4e0; color: #8a2217; }
.consent { font-size: var(--step--1); color: var(--ink-2); }

.contact-side { padding: 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.contact-side dl { margin: 0; }
.contact-side dt { margin-top: 1.1rem; font-size: var(--step-0); color: var(--ink-2); }
.contact-side dt:first-child { margin-top: 0; }
.contact-side dd { margin: 0.15rem 0 0; font-weight: 560; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------------------- misc */

/* A statement over a line drawing shown as a watermark: the drawing lies under the text, and no image has a caption. */
.eiffel { position: relative; overflow: hidden; isolation: isolate; }
.eiffel::before {
  content: ""; position: absolute; z-index: -1; inset-block: 0.75rem 0;
  inset-inline-start: 50%; width: min(42vw, 15rem);
  background: url("../img/art/eiffel.svg?v=08fc7b2df8") no-repeat 50% 100% / contain; opacity: 0.13; pointer-events: none;
}
.mission .lead { max-width: 56rem; margin: 0; font-size: var(--step-3); line-height: 1.38; color: var(--ink); }
@media (max-width: 720px) {
  .eiffel::before { inset-inline: 0; width: auto; opacity: 0.1; }
}

.photo { margin: 0; }
.photo img { width: 100%; border-radius: 10px; }
.photo figcaption { margin-top: 0.6rem; font-family: var(--serif); font-style: italic; font-size: var(--step-0); color: var(--ink-2); }
.night .photo figcaption { color: var(--soft-on-night); }

.prose h2 { margin-top: 2.25rem; font-size: var(--step-3); }
.prose h2:first-child { margin-top: 0; }
.prose h2 + p, .prose h2 + ul { margin-top: 0.9rem; }
.prose ul { margin: 0 0 1em; padding-left: 1.2rem; max-width: 68ch; }
.prose li { margin-bottom: 0.4rem; }

.cta-band h2 { max-width: 20ch; }
.cta-band p { margin-top: 1rem; font-size: var(--step-2); line-height: 1.45; max-width: 42rem; }

.badge { display: inline-block; padding: 0.15rem 0.6rem; font-size: var(--step--1); font-weight: 600; color: var(--night); background: var(--accent); border-radius: 3px; }

.h3 { font-size: var(--step-2); line-height: 1.2; letter-spacing: -0.012em; }
.plate .lead { margin-top: 0.5rem; font-size: var(--step-1); font-weight: 560; color: var(--ink); }
.plate .shot, .plate .pseudo { margin-top: 1.25rem; }
.plate .pseudo { position: relative; z-index: 1; }
.next-row { margin-top: 1.25rem; }
.sample { display: grid; gap: 0.35rem; margin-top: 1.1rem; font-family: var(--mono); font-size: var(--step--1); }
.sample span { padding: 0.35rem 0.6rem; border-radius: 4px; background: rgba(16, 26, 63, 0.06); color: var(--ink); overflow-wrap: anywhere; }
.sample span + span { background: var(--night); color: var(--teal); }
.innov-engines { margin-top: 2rem; }
.tour-fig { margin-bottom: 2rem; }
.steps.devices { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.gateway { min-height: 100vh; display: flex; align-items: center; }
.gateway h1 { margin-top: 2.5rem; max-width: 16ch; }
.gateway .lead { margin-top: 1.25rem; max-width: 40rem; color: var(--on-night); }
.langs { padding: 0; list-style: none; }

/* ---------------------------------------------------------------------------- footer */

.site-footer { padding-block: clamp(2.5rem, 1.75rem + 3vw, 3.75rem) 1.75rem; background: var(--night); color: var(--soft-on-night); font-size: var(--step-0); border-top: 1px solid var(--orbit); }
.site-footer a { color: var(--on-night); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: 2.5rem; }
.foot-brand img { height: 2.5rem; width: auto; }
.foot-brand p { margin-top: 1.1rem; max-width: 24rem; }
.site-footer h2 { font-size: var(--step-0); font-weight: 640; letter-spacing: 0; color: var(--on-night); }
.site-footer ul { margin: 0.9rem 0 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 0.5rem; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--night-3); font-size: var(--step--1); }
.foot-base ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; }
.foot-base li { margin: 0; }

/* ---------------------------------------------------------------------------- product proof, founder */

.badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.badges li {
  padding: 0.28rem 0.7rem; font-size: var(--step--1); font-weight: 560; color: var(--on-night);
  border: 1px solid var(--orbit); border-radius: var(--radius); background: rgba(255, 255, 255, 0.04);
}
.facts.figures dt { font-size: var(--step-4); font-weight: 660; letter-spacing: -0.02em; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }

.founder-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; margin-top: 1.5rem; }
.portrait { width: clamp(8.5rem, 6rem + 9vw, 11rem); height: auto; border-radius: 50%; box-shadow: 0 0 0 4px var(--night), 0 0 0 6px var(--gold); }
.founder-hero .role { margin: 0.6rem 0 0; font-family: var(--serif); font-style: italic; font-size: var(--step-2); color: var(--gold); }
.prose-lg p { font-size: var(--step-1); max-width: 62ch; }
.cta-band .small { margin-top: 0.75rem; font-size: var(--step-0); color: var(--soft-on-night); }

/* ---------------------------------------------------------------------------- diagrams, idea box */

.diagram { margin: 1.5rem 0 0; }
.diagram .scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.diagram a { display: block; }
.diagram img { width: 100%; min-width: 46rem; height: auto; }
.diagram figcaption { margin-top: 0.6rem; font-family: var(--serif); font-style: italic; font-size: var(--step-0); color: var(--ink-2); }
.plate .files { margin-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.plate .files code { font-size: 0.72rem; padding: 0.15rem 0.4rem; border-radius: 4px; background: var(--paper); color: var(--ink-2); overflow-wrap: anywhere; }
.form .hint { margin: 0.35rem 0 0; font-size: var(--step--1); color: var(--ink-2); }
.steps-list { margin: 1rem 0 0; padding-left: 1.2rem; }
.steps-list li { padding: 0.35rem 0 0.35rem 0.3rem; }
.page-hero .badges + .actions { margin-top: 1.5rem; }

/* ---------------------------------------------------------------------------- other scripts */
/* Latin words stay in the faces of the brand; each script adds a companion or the fonts of the system. */

html[lang="ru"] { --sans: "Bricolage Grotesque", "Onest", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; }
html[lang="zh"] {
  --script: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC";
  --sans: "Bricolage Grotesque", var(--script), system-ui, sans-serif;
  --serif: "Spectral", var(--script), serif;
}
html[lang="ja"] {
  --script: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP";
  --sans: "Bricolage Grotesque", var(--script), system-ui, sans-serif;
  --serif: "Spectral", var(--script), serif;
}
html[lang="hi"] {
  --script: "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", Mangal;
  --sans: "Bricolage Grotesque", var(--script), system-ui, sans-serif;
  --serif: "Spectral", var(--script), serif;
}
/* These scripts have no italic: the browser must not slant them. */
html:is([lang="zh"], [lang="ja"], [lang="hi"]) { font-synthesis: weight; }
html:is([lang="zh"], [lang="ja"], [lang="hi"], [lang="ru"]) :is(h1, h2, h3, h4, .tagline, .facts dt, .lead) { letter-spacing: 0; }
html:is([lang="zh"], [lang="ja"]) body { line-height: 1.75; }
html:is([lang="zh"], [lang="ja"]) :is(h1, h2) { line-height: 1.3; }
html:is([lang="zh"], [lang="ja"]) :is(h3, h4, .tagline) { line-height: 1.4; }
html:is([lang="zh"], [lang="ja"]) .hero h1 { max-width: 11em; }
html:is([lang="zh"], [lang="ja"]) .page-hero h1 { max-width: 13em; }
html:is([lang="zh"], [lang="ja"]) .product-hero .tagline { max-width: 15em; }
html:is([lang="zh"], [lang="ja"]) .cta-band h2 { max-width: 14em; }
html[lang="ja"] { line-break: strict; }
html[lang="hi"] body { line-height: 1.75; }
html[lang="hi"] :is(h1, h2, h3, h4, .tagline) { line-height: 1.42; }

/* ---------------------------------------------------------------------------- responsive */

@media (max-width: 68rem) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 55; margin: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 1rem var(--gutter) 2.5rem; overflow-y: auto;
    background: var(--night);
  }
  .nav.is-open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--night-3); }
  .nav-link { width: 100%; justify-content: space-between; padding: 1rem 0.25rem; font-size: var(--step-2); font-weight: 560; border-radius: 0; }
  .nav-link:hover, .nav-link[aria-expanded="true"] { background: none; }
  .menu, .menu.is-right { position: static; min-width: 0; padding: 0 0 0.75rem; background: none; border: 0; box-shadow: none; }
  .menu a { padding: 0.65rem 0.75rem; font-size: var(--step-1); }
  .nav-list > li.nav-lang { margin: 1.25rem 0 0; border-bottom: 0; }
  .nav-lang .select { display: flex; }
  .nav-lang .select select { width: 100%; min-height: 3rem; font-size: var(--step-1); }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 40rem) {
  .founder-top { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 62rem) {
  .hero-grid, .product-hero .intro, .split, .split.even, .build { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 18ch; }
  .chart { max-width: 34rem; }
  .plates.c3, .plates.c4, .dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts > div:nth-child(n + 3) { border-top: 1px solid var(--orbit); }
  .steps, .steps.devices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
  .build .plate.wide { grid-row: auto; }
}

@media (max-width: 40rem) {
  :root { --header-h: 3.75rem; }
  body { font-size: 1rem; }
  .brand img { height: 1.9rem; }
  .plates.c2, .plates.c3, .plates.c4, .dl, .defs, .steps, .steps.devices, .form .row { grid-template-columns: minmax(0, 1fr); }
  .repo.wide { grid-column: auto; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts > div, .facts > div + div { padding: 1.1rem 0 0.2rem; border-left: 0; }
  .facts > div + div { border-top: 1px solid var(--orbit); }
  .actions .btn { width: 100%; }
  .layers li { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem; }
  .chart .label { font-size: 19px; }
  .chart .label.sub, .chart .grid text { font-size: 15px; }
  .chart .albireo-link .label { font-size: 22px; }

  /* Small data tables become stacked records; wide catalogs keep their horizontal scroll. */
  table.stackable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stackable, table.stackable tbody, table.stackable tr, table.stackable th, table.stackable td { display: block; width: 100%; }
  table.stackable tr { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
  .night table.stackable tr { border-color: var(--night-3); }
  table.stackable tr:last-child { border-bottom: 0; }
  table.stackable th, table.stackable td { padding: 0.15rem 0; border: 0; text-align: left; white-space: normal; }
  table.stackable td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-2); font-weight: 560; }
  .night table.stackable td[data-label]::before { color: var(--soft-on-night); }
  table.stackable tbody th { font-size: var(--step-1); margin-bottom: 0.15rem; }
  .spec th { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .site-header, .site-footer, .subnav, .actions, .nav-toggle { display: none !important; }
  .night, .sky { background: #fff !important; color: #000 !important; }
  .night p, .night .muted { color: #222 !important; }
}

/* Japanese: lines break between phrases where the browser knows how. */
html[lang="ja"] :is(h1, h2, h3, .lead, .tagline) { word-break: auto-phrase; }

/* Long words in headings: hyphenated where the language has rules for it, and never wider than the page. */
h1, h2, h3 { overflow-wrap: break-word; }
html:is([lang="ru"], [lang="de"]) :is(h1, h2, h3) { -webkit-hyphens: auto; hyphens: auto; }
