:root {
  --white: #ffffff;
  --ink: #111111;
  --ink-soft: #3a3a3a;
  --red: #c8102e;
  --red-deep: #8e0c20;
  --line: #e6e6e6;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 68ch;
  --header-h: 3.75rem;
  --cookie-space: 0px;
  --z-header: 20;
  --z-menu: 25;
  --z-telegram: 30;
  --z-cookie: 40;
  --z-age: 60;
  --z-skip: 70;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top) + 0.75rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
  padding-bottom: calc(var(--cookie-space) + env(safe-area-inset-bottom));
}

body.has-cookie {
  --cookie-space: 11.5rem;
}

body.age-lock {
  overflow: hidden;
}

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

a {
  color: var(--red);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--red-deep);
}

button,
a {
  -webkit-tap-highlight-color: rgba(200, 16, 46, 0.16);
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0;
  transform: translateY(-140%);
  z-index: var(--z-skip);
  background: var(--red);
  color: var(--white);
  padding: 0.7rem 0.95rem;
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(calc(0.5rem + env(safe-area-inset-top)));
}

.wrap {
  width: min(1080px, calc(100% - 1.5rem - env(safe-area-inset-left) - env(safe-area-inset-right)));
  margin-inline: auto;
}

.wrap--narrow {
  width: min(720px, calc(100% - 1.5rem - env(safe-area-inset-left) - env(safe-area-inset-right)));
}

h1,
h2,
h3 {
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
}

h1 {
  margin: 0.25rem 0 0.7rem;
  font-size: clamp(1.7rem, 6.4vw, 2.75rem);
  text-wrap: balance;
}

h2 {
  margin: 1.8rem 0 0.55rem;
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
}

h3 {
  margin: 0 0 0.3rem;
  font-size: 1.08rem;
}

p {
  margin: 0.65rem 0;
  text-wrap: pretty;
}

.lede,
.capsule {
  font-size: 1.05rem;
  max-width: var(--measure);
}

.capsule {
  margin: 0;
  padding: 0.15rem 0 0.15rem 0.85rem;
  border-left: 4px solid var(--red);
}

.muted,
.fine {
  color: var(--ink-soft);
}

.fine {
  font-size: 0.92rem;
}

.index {
  display: inline-block;
  margin: 0;
  padding: 0.18rem 0.45rem;
  background: var(--ink);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.running-head {
  margin: 0 0 0.55rem;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--ink);
  color: var(--white);
  border-bottom: 3px solid var(--red);
  padding-top: env(safe-area-inset-top);
}

.header__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: var(--header-h);
  padding: 0.4rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  min-width: 0;
}

.brand span {
  white-space: nowrap;
}

.site-header .brand {
  color: var(--white);
}

.brand img {
  width: 2rem;
  height: 2rem;
  max-width: none;
  object-fit: cover;
  border-radius: 0.3rem;
  background: var(--white);
}

.header__download {
  margin-left: auto;
  flex: 0 0 auto;
}

.nav-toggle,
.header__download {
  min-height: 44px;
  padding: 0.45rem 0.7rem;
  font-size: 0.88rem;
}

.nav-toggle {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--white);
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
  flex: 0 0 auto;
}

.nav-toggle:hover {
  background: var(--white);
  color: var(--ink);
}

.site-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: var(--z-menu);
  background: var(--white);
  color: var(--ink);
  border-bottom: 3px solid var(--red);
  max-height: calc(100dvh - var(--header-h) - env(safe-area-inset-top));
  overflow: auto;
  box-shadow: 0 16px 32px rgba(17, 17, 17, 0.18);
}

.site-nav.is-open {
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0.5rem;
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.65rem 1rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  border-bottom: 1px solid var(--line);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 4px 0 0 var(--red);
  font-weight: 800;
  color: var(--red);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: var(--white);
  border: 1px solid var(--red-deep);
  border-radius: 0.35rem;
  padding: 0.75rem 1rem;
  min-height: 44px;
  font: 700 0.95rem/1.2 var(--font);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}

.btn:hover {
  background: var(--red-deep);
  color: var(--white);
}

.btn--quiet {
  background: var(--white);
  color: var(--ink);
  border-color: var(--ink);
}

.btn--quiet:hover {
  background: var(--ink);
  color: var(--white);
}

.btn:disabled,
.btn[aria-disabled="true"],
.btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1rem 0;
}

.actions .btn {
  width: 100%;
}

.hero {
  padding: 1.15rem 0 0.2rem;
}

.hero__layout {
  display: grid;
  gap: 1.15rem;
}

.crumbs {
  margin: 0 0 0.7rem;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.crumbs a {
  color: var(--ink);
}

.crumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--red);
}

.page {
  padding-bottom: 1.6rem;
}

.page p,
.hero p {
  max-width: none;
}

.sheet,
.entry,
.rating,
.download-panel,
.telegram-block,
.callout,
.note {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

.sheet,
.entry,
.rating,
.download-panel,
.telegram-block {
  padding: 1rem;
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.4rem 0;
}

.table-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

caption,
.facts caption {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.85rem 0.9rem 0.35rem;
  font-weight: 800;
}

.facts,
.facts tbody,
.facts tr,
.facts th,
.facts td {
  display: block;
  width: 100%;
}

.facts tr {
  padding: 0.75rem 0.9rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.facts tr:last-child {
  border-bottom: 0;
}

.facts th,
.facts td {
  padding: 0;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  border: 0;
}

.facts th {
  margin: 0 0 0.2rem;
  background: transparent;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.facts td {
  line-height: 1.45;
}

.catalog {
  display: grid;
  gap: 0.75rem;
}

.entry p:last-child {
  margin-bottom: 0;
}

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

.steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  color: var(--white);
  background: var(--red);
  font-weight: 800;
  padding: 0.4rem 0.45rem;
  height: fit-content;
  border-radius: 0.3rem;
}

.plates {
  display: flex;
  gap: 0.75rem;
  margin: 0.8rem 0 0.2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.1rem;
  padding-bottom: 0.55rem;
  -webkit-overflow-scrolling: touch;
}

.plate {
  flex: 0 0 78%;
  scroll-snap-align: start;
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.45rem;
}

.plate img {
  width: 100%;
  height: auto;
  border-radius: 0.45rem;
  background: #f4f4f4;
}

.plate figcaption,
.banner figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.45rem;
  margin-top: 0.5rem;
  font-size: 0.92rem;
}

.plate .index {
  margin-right: 0.35rem;
}

.banner img {
  width: 100%;
  height: auto;
  border-radius: 0.6rem;
  border: 1px solid var(--line);
}

.mockup {
  width: min(17.5rem, 100%);
  margin: 0.2rem auto 0;
}

.mockup__phone {
  position: relative;
  background: #111111;
  border-radius: 1.85rem;
  padding: 0.55rem 0.45rem 0.5rem;
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.22);
}

.mockup__phone::before {
  content: "";
  display: block;
  width: 4.2rem;
  height: 0.38rem;
  margin: 0 auto 0.4rem;
  border-radius: 999px;
  background: #2a2a2a;
}

.mockup__phone img {
  width: 100%;
  height: auto;
  border-radius: 1.25rem;
  background: #111111;
}

.mockup figcaption {
  justify-content: center;
  text-align: center;
}

.rating {
  border-top: 4px solid var(--red);
}

.rating strong {
  font-size: 1.35rem;
}

.empty-stars {
  margin: 0 0 0.35rem;
  letter-spacing: 0.18em;
  font-size: 1.35rem;
  color: var(--ink);
}

.guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-list li {
  border-top: 1px solid var(--line);
}

.guide-list a {
  display: block;
  padding: 0.9rem 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
}

.guide-list a:hover {
  color: var(--red);
}

.guide-list small {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 450;
}

.filter {
  display: grid;
  gap: 0.35rem;
  margin: 1rem 0 0.4rem;
}

.filter input {
  width: 100%;
  max-width: 28rem;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0.35rem;
  font: 1rem/1.4 var(--font);
  padding: 0.75rem 0.75rem;
  min-height: 48px;
}

.note,
.callout {
  border-left: 4px solid var(--red);
  padding: 0.8rem 0.9rem;
}

.callout--plain {
  border-left-color: var(--ink);
}

.split,
.columns {
  display: grid;
  gap: 0.85rem;
}

.download-panel {
  border-top: 4px solid var(--ink);
  max-width: 40rem;
}

.download-panel .btn {
  width: 100%;
}

.countdown {
  font-size: clamp(1.7rem, 6vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--red);
  margin: 0.2rem 0 0.7rem;
}

.telegram-block {
  display: grid;
  gap: 0.75rem;
  border-top: 4px solid var(--red);
}

.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: 1.6rem 0 calc(1.2rem + env(safe-area-inset-bottom));
  border-top: 4px solid var(--red);
}

.site-footer a {
  color: var(--white);
}

.site-footer .brand {
  color: var(--white);
}

.footer__grid {
  display: grid;
  gap: 1.25rem;
}

.footer__label {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
}

.footer__links {
  display: grid;
  gap: 0.15rem;
}

.footer__links a {
  display: flex;
  align-items: center;
  min-height: 40px;
  width: fit-content;
}

.legal-line {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--white);
  font-size: 0.9rem;
}

.age-gate[hidden] {
  display: none;
}

.age-gate {
  position: fixed;
  inset: 0;
  z-index: var(--z-age);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(17, 17, 17, 0.62);
}

.age-gate__sheet {
  width: 100%;
  max-height: min(88dvh, 40rem);
  overflow: auto;
  background: var(--white);
  border-radius: 1rem 1rem 0 0;
  padding: 1.15rem 1rem calc(1.15rem + env(safe-area-inset-bottom));
}

.age-gate__mark {
  margin: 0;
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 0.25rem;
}

.age-gate h2 {
  margin-top: 0.65rem;
}

.age-gate__actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-cookie);
  display: grid;
  gap: 0.65rem;
  background: var(--white);
  color: var(--ink);
  border-top: 3px solid var(--ink);
  padding: 0.7rem max(0.75rem, env(safe-area-inset-right)) calc(0.7rem + env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  box-shadow: 0 -8px 24px rgba(17, 17, 17, 0.12);
}

.cookie p {
  margin: 0;
}

.cookie__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

body.age-lock .cookie {
  visibility: hidden;
  pointer-events: none;
}

.tg-tab {
  position: static;
  z-index: var(--z-telegram);
  display: flex;
  flex-direction: column-reverse;
  align-items: stretch;
  gap: 0.45rem;
  margin: 0;
  padding: 0.75rem max(0.75rem, env(safe-area-inset-right)) calc(0.75rem + env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  background: var(--white);
  border-top: 3px solid var(--red);
}

.tg-tab__launcher {
  width: 100%;
  background: var(--ink);
  color: var(--white);
  border: 0;
  border-radius: 0.4rem;
  font: 800 0.95rem/1.2 var(--font);
  min-height: 48px;
  padding: 0.7rem 1rem;
  cursor: pointer;
}

.tg-tab__launcher:hover {
  background: var(--red);
}

.tg-tab__panel {
  width: 100%;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 0.7rem;
  padding: 0.85rem;
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.18);
}

.tg-tab__panel[hidden] {
  display: none;
}

.tg-tab__panel .btn {
  width: 100%;
  margin-top: 0.35rem;
}

code,
.url {
  overflow-wrap: anywhere;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

ul,
ol {
  padding-left: 1.15rem;
}

.prose > * {
  max-width: var(--measure);
}

.prose .table-wrap,
.prose .plates,
.prose .split,
.prose .columns,
.prose .banner,
.prose .sheet,
.prose .download-panel,
.prose .catalog {
  max-width: none;
}

@media (max-width: 390px) {
  .brand {
    font-size: 0.92rem;
    gap: 0.3rem;
  }

  .brand img {
    width: 1.75rem;
    height: 1.75rem;
  }

  .header__bar {
    gap: 0.3rem;
  }

  .nav-toggle,
  .header__download {
    padding: 0.4rem 0.5rem;
    font-size: 0.78rem;
  }
}

@media (min-width: 700px) {
  body.has-cookie {
    --cookie-space: 6.5rem;
  }

  .page p,
  .hero p,
  .prose > * {
    max-width: var(--measure);
  }

  .prose .table-wrap,
  .prose .plates,
  .prose .split,
  .prose .columns,
  .prose .banner,
  .prose .sheet,
  .prose .download-panel,
  .prose .catalog {
    max-width: none;
  }

  .actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .actions .btn,
  .download-panel .btn {
    width: auto;
  }

  .age-gate {
    align-items: center;
    padding: 1rem;
  }

  .age-gate__sheet {
    width: min(34rem, 100%);
    border-radius: 0.8rem;
    padding: 1.25rem 1.15rem 1.15rem;
  }

  .age-gate__actions {
    display: flex;
    flex-wrap: wrap;
  }

  .facts {
    display: table;
  }

  .facts caption {
    display: table-caption;
    width: auto;
  }

  .facts tbody {
    display: table-row-group;
  }

  .facts tr {
    display: table-row;
    padding: 0;
    border-bottom: 0;
  }

  .facts th,
  .facts td {
    display: table-cell;
    width: auto;
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--line);
  }

  .facts th {
    width: 32%;
    margin: 0;
    padding-bottom: 0.75rem;
  }

  .facts td {
    padding-top: 0.75rem;
  }

  .plates {
    display: grid;
    overflow: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plate {
    flex: none;
  }

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

  .columns,
  .split {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }

  .telegram-block {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .tg-tab {
    align-items: flex-end;
    padding-inline: max(1rem, calc((100% - 1080px) / 2));
  }

  .tg-tab__launcher {
    width: auto;
    min-width: 14rem;
  }

  .tg-tab__panel {
    width: min(22rem, 100%);
  }

  .cookie {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-inline: max(1rem, calc((100% - 1080px) / 2));
  }

  .cookie p {
    max-width: 62ch;
  }

  .cookie__actions {
    display: flex;
    flex: 0 0 auto;
  }
}

@media (min-width: 900px) {
  .hero__layout,
  .footer__grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }

  .hero .mockup {
    margin-top: 0.35rem;
    justify-self: center;
  }

  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (min-width: 1100px) {
  .header__bar {
    gap: 0.85rem;
  }

  .nav-toggle {
    display: none;
  }

  .header__download {
    font-size: 0.95rem;
  }

  .site-nav {
    display: block;
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
    max-height: none;
    overflow: visible;
    margin-left: 0.2rem;
  }

  .site-nav ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.1rem 0.15rem;
    padding: 0;
  }

  .site-nav a {
    display: inline-flex;
    min-height: 44px;
    padding: 0.35rem 0.45rem;
    color: var(--white);
    border-bottom: 0;
    font-weight: 650;
    font-size: 0.92rem;
  }

  .site-nav a:hover {
    color: var(--white);
    text-decoration: underline;
    text-decoration-color: var(--red);
    text-decoration-thickness: 3px;
    text-underline-offset: 0.35rem;
  }

  .site-nav a[aria-current="page"] {
    box-shadow: inset 0 -3px 0 var(--red);
    color: var(--white);
    font-weight: 800;
  }

  .plates--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
