/* Шрифт 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;
}

/* Страница «памятки» по макету редакции 8 (docs/design.md, #30). Раскладка
   своя, не Tailwind: макет принят владельцем в этих правилах, перенос в
   утилиты дал бы другую страницу. Тема — класс dark на <html>, его ставит
   theme_bootstrap_js по настройке телефона, как во всём приложении. */
:root {
  --plastic: #e6e8e4;
  --body: #f4f5f2;
  --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: #f6ecd8;
  --on-amber: #1f2a30;

  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;

  color-scheme: dark;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--plastic);
  color: var(--ink);
  font-family: "Sofia Sans", system-ui, sans-serif;
  font-size: 1.125rem;
  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: "Sofia Sans Extra Condensed", "Sofia Sans", sans-serif;
  font-weight: 800;
  line-height: 0.95;
}

.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;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.25rem;
}

.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: 44px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.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;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.844rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 14ch;
  font-size: clamp(3rem, 2rem + 4.5vw, 6rem);
  text-transform: uppercase;
}

.hero .lead {
  color: var(--muted);
  font-size: 1.25rem;
}

.entries {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.entry {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
  border-radius: 16px;
  background: var(--card);
}

.entry.wrong {
  background: var(--warm);
}

.entry h2 {
  font-size: clamp(2.2rem, 1.8rem + 1.6vw, 3.2rem);
}

.shoot {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  align-self: flex-start;
  min-height: 56px;
  padding: 0 1.5rem;
  border-radius: 12px;
  background: var(--amber);
  color: var(--on-amber);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
}

.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;
}

.systems {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.6rem;
  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;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  hyphens: auto;
}

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

.keypads {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.keypad {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
  padding: 1rem;
  border-radius: 16px;
  background: var(--card);
}

.keypad img,
.keypad .blank {
  width: 100%;
  height: auto;
  border-radius: 12px;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
}

.keypad .blank {
  background: var(--plastic);
}

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

kbd.photo {
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  background: none;
}

kbd.photo 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;
}

.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);
}

.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 >= 900px) {
  .entries {
    grid-template-columns: minmax(0, 1fr) 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;
  }
}
