@font-face {
  font-family: "Formular";
  src: url("fonts/Formular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Formular";
  src: url("fonts/Formular-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #161311;
  --muted: #6b635f;
  --paper: #f6f3ee;
  --white: #fff;
  --red: #e63312;
  --red-dark: #b91f08;
  --line: rgba(22, 19, 17, .14);
  --yellow: #ffca45;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Formular", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.rules-shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }

.rules-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(246, 243, 238, .94); backdrop-filter: blur(16px); }
.rules-header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.rules-brand { display: inline-flex; }
.rules-brand img { width: 224px; display: block; }
.rules-back { color: var(--muted); font-size: 14px; font-weight: 700; }
.rules-back:hover { color: var(--red); }

.rules-main { padding: 72px 0 100px; }
.rules-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: end; }
.rules-kicker { margin: 0 0 17px; color: var(--red); font-size: 13px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.rules-hero h1 { max-width: 780px; margin: 0; font-size: clamp(48px, 6vw, 82px); line-height: .96; letter-spacing: -.055em; }
.rules-title { max-width: 720px; margin: 20px 0 0; color: var(--red-dark); font-size: clamp(23px, 2.5vw, 34px); line-height: 1.15; font-weight: 700; letter-spacing: -.025em; }
.rules-lead { max-width: 680px; margin: 27px 0 0; color: var(--muted); font-size: 18px; line-height: 1.58; }
.rules-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 31px; }
.rules-button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 13px; border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; font-weight: 700; transition: transform .2s ease, background .2s ease; }
.rules-button:hover { transform: translateY(-2px); }
.rules-button-primary { border-color: var(--red); background: var(--red); color: var(--white); }
.rules-button-primary:hover { background: var(--red-dark); }
.rules-button-secondary { background: var(--white); }
.rules-button-secondary:hover { background: var(--yellow); }

.rules-facts { margin: 0; display: grid; gap: 10px; }
.rules-facts div { border: 1px solid var(--line); border-radius: 17px; padding: 17px 19px; background: rgba(255,255,255,.75); }
.rules-facts dt { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.rules-facts dd { margin: 7px 0 0; font-size: 17px; line-height: 1.3; font-weight: 700; }

.rules-document { margin-top: 80px; border: 1px solid var(--line); border-radius: 28px; padding: 28px; background: var(--white); box-shadow: 0 24px 65px rgba(22,19,17,.08); }
.rules-document-heading { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: end; margin-bottom: 24px; }
.rules-document-heading h2 { margin: 0; font-size: clamp(34px, 4vw, 54px); line-height: 1; letter-spacing: -.045em; }
.rules-document-heading > p { margin: 0 0 4px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.rules-pdf { width: 100%; height: min(82vh, 940px); min-height: 680px; display: block; border: 1px solid var(--line); border-radius: 14px; background: #ece8e1; }
.rules-pdf-fallback { height: 100%; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 30px; text-align: center; }
.rules-pdf-fallback p { margin: 0; color: var(--muted); }
.rules-pdf-fallback a { color: var(--red); font-weight: 700; text-decoration: underline; }

.rules-footer { border-top: 1px solid var(--line); padding: 38px 0; background: var(--white); }
.rules-footer-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 36px; }
.rules-footer img { width: 205px; }
.rules-footer a { justify-self: center; color: var(--muted); font-size: 12px; }
.rules-footer a:hover { color: var(--red); }
.rules-footer p { margin: 0; color: var(--muted); font-size: 11px; }

@media (max-width: 820px) {
  .rules-shell { width: min(100% - 32px, 680px); }
  .rules-header-inner { min-height: 68px; }
  .rules-brand img { width: 185px; }
  .rules-back { font-size: 0; }
  .rules-back::after { content: "← Назад"; font-size: 14px; }
  .rules-main { padding-top: 52px; }
  .rules-hero { grid-template-columns: 1fr; gap: 42px; }
  .rules-document { margin-top: 58px; padding: 19px; }
  .rules-document-heading { grid-template-columns: 1fr; gap: 14px; }
  .rules-pdf { min-height: 600px; }
  .rules-footer-inner { grid-template-columns: 1fr; gap: 18px; }
  .rules-footer a { justify-self: start; }
}

@media (max-width: 520px) {
  .rules-shell { width: min(100% - 24px, 480px); }
  .rules-brand img { width: 165px; }
  .rules-main { padding: 40px 0 72px; }
  .rules-hero h1 { font-size: 47px; }
  .rules-title { font-size: 24px; }
  .rules-lead { font-size: 16px; }
  .rules-actions { flex-direction: column; }
  .rules-button { width: 100%; }
  .rules-document { margin-top: 48px; padding: 14px; border-radius: 20px; }
  .rules-document-heading { padding: 8px 5px 0; }
  .rules-document-heading h2 { font-size: 36px; }
  .rules-pdf { min-height: 520px; border-radius: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}