/* Шрифт Sofia Sans двух ширин у себя (Fontsource Variable 5.2.8, лицензия OFL),
   как Manrope в tailwind/application.css: подмножества латиница, латиница с
   латышскими буквами и кириллица. */
@font-face {
  font-family: "Sofia Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/sofia-sans-latin-3f47fc9f.woff2") 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: "Sofia Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/sofia-sans-latin-ext-6bd94e9c.woff2") 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: "Sofia Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/sofia-sans-cyrillic-d631f29b.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Sofia Sans Extra Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/sofia-sans-extra-condensed-latin-e7d70117.woff2") 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: "Sofia Sans Extra Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/sofia-sans-extra-condensed-latin-ext-cb21bcd8.woff2") 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: "Sofia Sans Extra Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/sofia-sans-extra-condensed-cyrillic-da8ec79e.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Шрифты черновика главной владельца (21.10.2026): Oswald для заголовков, Inter
   для текста — у себя, Fontsource Variable 5.3.0, лицензия OFL; подмножества
   латиница, латиница с латышскими буквами, кириллица. */
@font-face {
  font-family: Oswald;
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("/assets/oswald-latin-49b2dd5a.woff2") 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: Oswald;
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("/assets/oswald-latin-ext-6f62bdfa.woff2") 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: Oswald;
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("/assets/oswald-cyrillic-8cbbaef7.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/inter-latin-1f021a24.woff2") 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: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/inter-latin-ext-65edaaef.woff2") 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: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/inter-cyrillic-659d95ea.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Страница «памятки» по макету редакции 8 (docs/design.md, #30). Раскладка
   своя, не Tailwind: макет принят владельцем в этих правилах, перенос в
   утилиты дал бы другую страницу. Тема — класс dark на <html>, его ставит
   theme_bootstrap_js по настройке телефона, как во всём приложении. */
:root {
  --plastic: #f4f4f2;
  --body: #e9e8e3;
  --ink: #1f2a30;
  --muted: #46525a;
  --key-edge: #4f5a55;
  --amber: #f2a313;
  --link: #1e4fbf;
  --band: #1f2a30;
  --band-ink: #fff;
  --band-muted: #d7dcd8;
  --hl: #fff4dc;
  --rule: #c3c8c1;
  --card: #fff;
  --warm: #f5efe2;
  --on-amber: #1f2a30;
  --accent: #c97d07;
  --led-green: #2bb673;
  --led-red: #d94a3a;
  --led-yellow: #f2a313;

  color-scheme: light;
}

:root.dark {
  --plastic: #161c19;
  --body: #202723;
  --ink: #e6ebe7;
  --muted: #a9b4ae;
  --key-edge: #8a978f;
  --amber: #f5b23a;
  --link: #9db8ff;
  --band: #2a3238;
  --band-ink: #fff;
  --band-muted: #c9d1cc;
  --hl: #3a3220;
  --rule: #33403a;
  --on-amber: #1f2a30;
  --card: #202723;
  --warm: #2c281e;
  --accent: #f5b23a;

  color-scheme: dark;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--plastic);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
}

a {
  color: var(--link);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.disp {
  margin: 0;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.wrap {
  box-sizing: border-box;
  max-width: 70rem;
  margin-inline: auto;
  padding-inline: max(1rem, env(safe-area-inset-left, 0px)) max(1rem, env(safe-area-inset-right, 0px));
}

.bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  align-items: center;
  padding-block: 0.5rem;
}

.menu {
  display: none;
  flex-direction: column;
  order: 9;
  width: 100%;
  padding: 0.5rem 0 0.75rem;
  font-size: 1rem;
}

.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.languages {
  display: flex;
  align-items: center;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.languages .dot {
  padding-inline: 0.35rem;
}

.theme {
  display: flex;
  margin-left: 0.5rem;
}

.theme button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.theme button[data-active] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--amber);
}

.search,
.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  color: var(--ink);
}

.search svg,
.burger svg {
  width: 1.4rem;
  height: 1.4rem;
}

.burger {
  cursor: pointer;
}

#menu-open:checked ~ .menu {
  display: flex;
}

#menu-open:focus-visible ~ .burger {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: var(--ink);
  font-size: 1.5rem;
  text-decoration: none;
}

.mark {
  display: block;
  width: 2rem;
  height: 2rem;
}

.language {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 44px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-decoration: none;
}

.language[aria-current] {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--amber);
}

.page {
  padding-block: 0.75rem 2.5rem;
}

.page > h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.667rem, 2.2rem + 2.4vw, 4.736rem);
  text-wrap: balance;
}

.sec {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 1.7rem + 1.2vw, 2.667rem);
}

p {
  max-width: 62ch;
  margin: 0;
}

.note {
  color: var(--muted);
}

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.lead,
.flow {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
}

.flow {
  gap: 2.5rem;
}

.checks,
.identify,
.missing {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ph {
  display: flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 0.5rem;
  border: 1px dashed var(--muted);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.844rem;
  text-align: center;
  aspect-ratio: 4 / 3;
}

.bullets {
  margin: 0;
  padding-inline-start: 1.25rem;
}

.stop {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.stop svg {
  width: 26px;
  height: 26px;
  margin-top: 1px;
  color: var(--ink);
}

.mean {
  max-width: 40rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mean li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: baseline;
  padding-block: 0.6rem;
}

.mean .keys {
  color: var(--muted);
  font-size: 0.844rem;
}

.mean .keys strong {
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.mean li.urgent {
  margin-inline: -0.75rem;
  padding-inline: 0.75rem;
  border-radius: 8px;
  background: var(--band);
  color: var(--band-ink);
  font-weight: 700;
}

.mean li.is-marked:not(.urgent) {
  margin-inline: -0.75rem;
  padding-inline: 0.75rem;
  border-radius: 8px;
  background: var(--hl);
}

.mean li.urgent .keys {
  color: var(--band-muted);
}

.mean li.urgent .keys strong {
  color: var(--band-ink);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps > li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 1.25rem;
  counter-increment: step;
}

.steps > li + li {
  border-top: 1px solid var(--rule);
}

.steps > li::before {
  color: var(--muted);
  font-family: "Sofia Sans Extra Condensed", "Sofia Sans", sans-serif;
  font-size: 2.667rem;
  font-weight: 800;
  line-height: 0.9;
  content: counter(step);
}

.steps + .stop {
  margin-top: 1rem;
}

.body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  container-type: inline-size;
}

kbd {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  margin-inline: 0.1rem;
  padding: 0 0.55rem;
  border: 1px solid var(--key-edge);
  border-bottom-width: 3px;
  border-radius: 8px;
  background: var(--body);
  color: var(--ink);
  font: 700 1.5rem "Sofia Sans", system-ui, sans-serif;
  vertical-align: middle;
}

.shots {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.5rem;
  align-items: start;
  max-width: 30rem;
}

.shots img,
.figure img,
.boxline img,
.digit img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.figure {
  width: 3.2rem;
  margin: 0;
}

.boxline {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  max-width: 40rem;
}

/* Главная по холсту компоновки (#81): на телефоне один столбец, на компьютере
   вопрос с поиском слева, семейства справа, выбор системы под ними. */
.home {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.eyebrow {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem);
  line-height: 1.02;
  text-transform: uppercase;
  text-wrap: balance;
}

.hero .lead {
  max-width: 38ch;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.5;
}

.shoot {
  display: flex;
  box-sizing: border-box;
  gap: 1rem;
  align-items: center;
  width: 100%;
  max-width: 32rem;
  min-height: 64px;
  margin-top: 0.5rem;
  padding: 0 1.5rem;
  border-radius: 14px;
  background: var(--amber);
  color: var(--on-amber);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
}

.shoot span {
  flex: 1;
}

.shoot span::after {
  float: right;
  content: "\2192";
}

.all::after {
  content: " \2192";
}

.shoot svg {
  width: 1.6rem;
  height: 1.6rem;
}

.shoot:focus-within {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

.shot {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.844rem;
}

.shot img {
  width: 100%;
  max-width: 20rem;
  height: auto;
  border-radius: 12px;
}

/* Три случая: первый — янтарный, как главный вход «пищит или мигает». */
.cases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cases a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--tile-edge, var(--rule));
  border-radius: 12px;
  background: var(--tile, var(--card));
  color: var(--tile-ink, var(--ink));
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  text-wrap: balance;
}

.cases .main {
  --tile: var(--amber);
  --tile-edge: var(--amber);
  --tile-ink: var(--on-amber);
}

/* Семейства: на телефоне строки с рисунком слева — экран короче
   («avoid too long screen scrollings»), от планшета — карточки в ряд. */
.families {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.family {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0.15rem 0.9rem;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.family > :first-child {
  grid-row: 1 / span 2;
}

.family .name {
  align-self: end;
  font-weight: 600;
  line-height: 1.3;
}

.family .look {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.brands {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  max-width: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.8rem;
  border-radius: 18px;
  background: var(--body);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.choose {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
  border: 1px solid var(--rule);
  border-radius: 18px;
}

.choose h2 {
  font-size: clamp(1.8rem, 1.5rem + 1.2vw, 2.4rem);
}

.systems {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.systems a {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  min-height: 6.5rem;
  padding: 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--body);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.systems svg {
  width: 2rem;
  height: 2rem;
}

.all {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.photo {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 12px;
  background: var(--body);
}

/* Высота в процентах у рисунка в сетке с aspect-ratio не считается — высокий рисунок (Paradox K32)
   вылезал за квадрат; абсолютная вставка берёт размер готовой плитки. */
.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo .blank {
  width: 100%;
  height: 100%;
  background: var(--plastic);
}

.card h2 {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.series {
  color: var(--muted);
  font-weight: 400;
}

.cards {
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.card {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: var(--card);
  scroll-margin-top: 1rem;
}

.card .photo {
  align-self: start;
}

/* Вырезка клавиши с рисунка. Класс свой: «photo» — плитка каталога с квадратом,
   и клавиша с ним раздувалась в квадрат. */
kbd.cut {
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  background: none;
}

kbd.cut img {
  display: block;
  width: auto;
  height: 2rem;
  border-radius: 10px;
}

.label {
  font-weight: 700;
}

.lcd {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  max-width: 24rem;
}

.digit {
  min-height: 44px;
  padding: 3px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--ink);
  font: 700 1.5rem "Sofia Sans", system-ui, sans-serif;
  cursor: pointer;
}

.digit.text {
  border: 1px solid var(--key-edge);
  border-bottom-width: 3px;
  background: var(--body);
}

.digit:hover {
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}

.digit[aria-pressed="true"] {
  background: var(--amber);
  color: var(--on-amber);
  box-shadow: 0 0 0 2px var(--ink);
}

.picked .mean li {
  grid-template-columns: 2.5rem minmax(0, 1fr);
}

.picked .mean li.urgent {
  margin-inline: 0;
}

.say {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--ink);
  color: var(--plastic);
  font-size: 1.5rem;
  font-weight: 700;
}

.missing + .missing {
  margin-top: 2rem;
}

.guide {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 44rem;
}

.guide h1 {
  font-size: clamp(2.667rem, 2.2rem + 2.4vw, 4.736rem);
  text-wrap: balance;
}

.guide section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.catalogue {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Подвал: знак прав и ссылка на условия (#58). */
.site {
  padding-block: 2rem 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site a {
  color: inherit;
}

.index {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.index a {
  display: block;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1.25rem;
}

.systems a:hover {
  border-color: var(--ink);
}

.menu a:hover {
  text-decoration: underline;
}

.systems.big {
  margin-top: 1.5rem;
}

.systems.big a {
  min-height: 8rem;
  font-size: 1.1rem;
}

.theme button svg {
  width: 1.2rem;
  height: 1.2rem;
}

.colophon {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-block: 1.5rem 2.5rem;
}

@container (width >= 520px) {
  .lcd {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    max-width: 40rem;
  }
}

@media (width >= 760px) {
  .brand {
    order: -2;
  }

  .menu {
    display: flex;
    flex-direction: row;
    gap: 1.75rem;
    order: -1;
    width: auto;
    margin-left: 2.5rem;
    padding: 0;
    font-size: 0.95rem;
  }

  .burger {
    display: none;
  }

  .systems {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .families {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 0.9rem;
  }

  .family {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    gap: 0.35rem;
    align-items: stretch;
  }

  .family > :first-child {
    grid-row: auto;
  }

  .family .name {
    margin-top: 0.3rem;
  }
}

@media (width >= 900px) {
  .home {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2.5rem 3.5rem;
    align-items: start;
  }

  .choose {
    grid-column: 1 / -1;
  }

  .systems {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (width >= 700px) {
  .lead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
  }
}

@media (width >= 960px) {
  .page > h1 {
    max-width: 20ch;
  }

  .cols {
    grid-template-columns: minmax(0, 23rem) minmax(0, 1fr);
    gap: 4rem;
    align-items: start;
  }

  .lead {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
}

@media (width >= 960px) and (height >= 56rem) {
  .lead {
    position: sticky;
    top: 1rem;
  }
}

.find {
  display: flex;
  gap: 0.5rem;
  max-width: 36rem;
  margin: 1rem 0 1.5rem;
}

.find input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.hero .find {
  max-width: 34rem;
  margin: 0.25rem 0 0;
}

/* Страница семейства (#81): шапка с моделями, живой рисунок, «памятки» выбранной
   модели, другие семейства марки; на компьютере рисунок слева, остальное справа. */
.family-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.family-page .head {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.family-page h1 {
  font-size: clamp(2.2rem, 1.8rem + 2vw, 3.6rem);
  text-wrap: balance;
}

.back {
  align-self: flex-start;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.back::before {
  content: "\2190  ";
}

.models {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip[aria-current] {
  background: var(--ink);
  color: var(--plastic);
}

.drawing {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 18px;
  background: var(--card);
}

.art {
  display: flex;
  justify-content: center;
}

.art > * {
  width: 100%;
  max-width: 30rem;
  height: auto;
}

.states {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.states button {
  min-height: 36px;
  padding: 0 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: var(--body);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.states button[aria-pressed="true"] {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--on-amber);
}

/* Лампочки — слои рисунка из Figma: «LED …» и «Lamp …» у клавиатур с лампочками,
   значки Ready, Armed, Trouble, AC у PK55xx. Негорящие прозрачны; состояние
   зажигает свои: зелёные — готова и питание, красная — на охране, жёлтая —
   неисправность, и она мигает («All leds must be animated», владелец 21.10.2026). */
.drawing [data-part^="LED "],
.drawing [data-part^="Lamp "],
.drawing [data-part="Ready"],
.drawing [data-part="Armed"],
.drawing [data-part="Trouble"],
.drawing [data-part="AC"] {
  opacity: 0.18;
  transition: opacity 0.2s;
}

.drawing:is([data-state="normal"], [data-state="trouble"]) :is([data-part="LED Ready" i], [data-part="LED Power" i], [data-part="LED OFF"], [data-part="Ready"], [data-part="AC"], [data-part^="Lamp left"]),
.drawing[data-state="armed"] :is([data-part="LED Armed" i], [data-part="LED ARM"], [data-part="LED Power" i], [data-part="Armed"], [data-part="AC"], [data-part^="Lamp right"]) {
  opacity: 1;
}

.drawing:is([data-state="normal"], [data-state="trouble"]) :is([data-part="LED Ready" i], [data-part="LED Power" i], [data-part="LED OFF"], [data-part^="Lamp left"]) *,
.drawing[data-state="armed"] [data-part="LED Power" i] * {
  fill: var(--led-green);
}

.drawing[data-state="armed"] :is([data-part="LED Armed" i], [data-part="LED ARM"], [data-part^="Lamp right"]) * {
  fill: var(--led-red);
}

.drawing[data-state="trouble"] :is([data-part="LED System"], [data-part="LED SERVICE"], [data-part="LED FAULT"], [data-part="Trouble"], [data-part="Key TBL"], [data-part="Indicator strip"]) {
  animation: blink 1s steps(1, end) infinite;
}

.drawing[data-state="trouble"] :is([data-part="LED System"], [data-part="LED SERVICE"], [data-part="LED FAULT"], [data-part="Indicator strip"]) * {
  fill: var(--led-yellow);
}

@keyframes blink {
  0%,
  45% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0.18;
  }
}

@media (prefers-reduced-motion: reduce) {
  .drawing[data-state="trouble"] :is([data-part="LED System"], [data-part="LED SERVICE"], [data-part="LED FAULT"], [data-part="Trouble"], [data-part="Key TBL"], [data-part="Indicator strip"]) {
    opacity: 1;
    animation: none;
  }
}

.what-title {
  display: block;
}

.count {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (width >= 900px) {
  .family-page {
    grid-template-columns: minmax(0, 28rem) minmax(0, 1fr);
    grid-template-areas:
      "drawing head"
      "drawing what"
      "drawing others";
    gap: 2rem 3rem;
    align-items: start;
  }

  .family-page .head {
    grid-area: head;
  }

  .family-page .drawing {
    position: sticky;
    top: 1rem;
    grid-area: drawing;
  }

  .family-page .what {
    grid-area: what;
  }

  .family-page .others {
    grid-area: others;
  }
}

/* Окно поиска и окно случая (#81): <dialog> снизу на телефоне, по центру на
   компьютере; внутри кадр Turbo «modal» — те же страницы /search и /p. */
.modal {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  max-height: 92dvh;
  margin: auto 0 0;
  padding: 0.75rem 1rem 1rem;
  border: 0;
  border-radius: 20px 20px 0 0;
  background: var(--plastic);
  color: var(--ink);
}

.modal::backdrop {
  background: rgb(31 42 48 / 55%);
}

.modal .close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: var(--body);
  color: var(--ink);
  font-size: 1.25rem;
  cursor: pointer;
}

.modal turbo-frame {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-title {
  margin: 0;
  padding-right: 3rem;
  font-size: clamp(1.7rem, 1.4rem + 1.2vw, 2.2rem);
}

main turbo-frame#modal {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 40rem;
}

.modal .find,
main turbo-frame#modal .find {
  max-width: none;
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.row {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-height: 64px;
  padding: 0.4rem 0.75rem 0.4rem 0.4rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
}

.row .text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.row .name {
  font-weight: 600;
}

.row .look,
.row .models-line {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.row .memo-title {
  color: var(--accent);
  font-weight: 600;
  line-height: 1.35;
}

.row .cases-line {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.thumb {
  width: 4.5rem;
  height: 3.25rem;
  object-fit: contain;
}

mark {
  border-radius: 3px;
  background: var(--hl);
  color: inherit;
}

.nomodel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--rule);
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.nomodel b {
  display: block;
}

@media (width >= 760px) {
  .modal {
    width: min(100%, 38rem);
    max-height: 88dvh;
    margin: auto;
    border-radius: 20px;
  }
}

/* Каталог по маркам (#81): марка раскрывается, внутри семейства, под ними модели. */
.summary {
  color: var(--muted);
  font-size: 0.95rem;
}

.maker {
  margin-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.maker > summary {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  min-height: 44px;
  padding-block: 0.75rem;
  cursor: pointer;
  list-style: none;
}

.maker > summary::-webkit-details-marker {
  display: none;
}

.maker > summary::before {
  flex: none;
  color: var(--muted);
  content: "\25B8";
}

.maker[open] > summary::before {
  content: "\25BE";
}

.maker > summary .sec {
  margin: 0;
}

.group {
  margin: 0.5rem 0 1.5rem;
}

.group h3 {
  margin: 0;
  font-size: 1.25rem;
}

.group .cards {
  margin-top: 0.75rem;
}

.card h4 {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}
