:root {
  --pine: #16382f;
  --pine-2: #1e4a3e;
  --clay: #a33b16;
  --clay-deep: #862f10;
  --sand: #f4efe6;
  --sand-2: #e7dfd1;
  --card: #fffaf3;
  --ink: #1c1916;
  --muted: #5c564c;
  --line: #ddd4c6;
  --brass: #b08945;
  --sans: "Manrope", "Segoe UI", sans-serif;
  --serif: "Petrona", Georgia, serif;
  --mono: "Inconsolata", ui-monospace, monospace;
  --header: 78px;
  --shadow: 0 16px 40px rgba(22, 56, 47, 0.12);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(22, 56, 47, 0.05), transparent 220px),
    var(--sand);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

body.rm-has-dock { padding-bottom: 0; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--clay); }

a:hover { color: var(--clay-deep); }

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 0.35em;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
}

h2 {
  margin: 0 0 0.6em;
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h3 {
  margin: 1.4em 0 0.4em;
  font-family: var(--sans);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

::selection { background: var(--pine); color: var(--sand); }

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
}

.rm-skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--card);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 80;
}

.rm-skip:focus { top: 12px; }

.rm-ticker {
  overflow: hidden;
  background: var(--clay);
  color: #fffaf3;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.rm-ticker-track {
  display: flex;
  width: max-content;
  padding: 9px 0;
  animation: rm-slide 32s linear infinite;
}

.rm-ticker-group { display: flex; flex-shrink: 0; }

.rm-ticker:hover .rm-ticker-track { animation-play-state: paused; }

.rm-ticker span { padding-right: 2.4rem; white-space: nowrap; }

@keyframes rm-slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.rm-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(22, 56, 47, 0.96);
  color: var(--sand);
  backdrop-filter: blur(8px);
}

.rm-header a { color: var(--sand); text-decoration: none; }

.rm-header-row,
.rm-nav-row,
.rm-wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.rm-header-row {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--header);
}

.rm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.2rem;
}

.rm-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.rm-brand small {
  display: block;
  font-weight: 500;
  letter-spacing: 0;
  font-size: 0.72rem;
  opacity: 0.75;
}

.rm-langs {
  display: flex;
  gap: 6px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
}

.rm-langs a {
  border: 1px solid rgba(244, 239, 230, 0.28);
  border-radius: 999px;
  padding: 4px 8px;
}

.rm-langs a[aria-current="page"] {
  background: var(--sand);
  color: var(--pine);
}

.rm-header-cta { display: flex; gap: 8px; }

.rm-header a.rm-btn-sand,
.rm-header a.rm-btn-sand:hover { color: var(--pine); }

.rm-header a.rm-btn-clay,
.rm-header a.rm-btn-clay:hover { color: #fffaf3; }

.rm-lang-mobile a {
  border: 1px solid rgba(244, 239, 230, 0.35);
  border-radius: 999px;
  padding: 4px 8px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.rm-cyr,
.rm-cyr h1,
.rm-cyr .rm-pull,
.rm-cyr .rm-drop::first-letter {
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.rm-nav-row {
  display: flex;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  padding: 0 0 12px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  scrollbar-width: none;
}

.rm-nav-row a { white-space: nowrap; opacity: 0.88; }

.rm-nav-row a:hover { opacity: 1; }

.rm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  cursor: pointer;
}

.rm-btn-clay { background: var(--clay); color: #fffaf3; }
.rm-btn-clay:hover { background: var(--clay-deep); color: #fff; }

.rm-btn-sand { background: var(--sand); color: var(--pine); }
.rm-btn-sand:hover { background: #fff; color: var(--pine); }

.rm-btn-pine { background: var(--pine); color: var(--sand); }
.rm-btn-pine:hover { background: var(--pine-2); color: white; }

.rm-btn-line {
  background: transparent;
  color: var(--pine);
  border: 1.5px solid var(--pine);
}

.rm-hero {
  position: relative;
  overflow: hidden;
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto 10px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
}

.rm-mark {
  position: absolute;
  left: -18px;
  bottom: -78px;
  font-size: 13rem;
  line-height: 0.8;
  color: rgba(22, 56, 47, 0.06);
  font-family: var(--serif);
  font-weight: 700;
  pointer-events: none;
  user-select: none;
}

.rm-kicker {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay);
}

.rm-lead {
  max-width: 38rem;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 1.12rem;
}

.rm-cta { display: flex; flex-wrap: wrap; gap: 10px; }

.rm-cta .rm-btn { min-width: 0; flex: 1 1 9.5rem; font-size: 1.05rem; }

.rm-ticket {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px 22px 18px;
  position: relative;
  background-image: radial-gradient(circle at left, transparent 9px, var(--card) 10px);
  background-size: 22px 100%;
  background-repeat: repeat-y;
  border: 1px solid var(--line);
}

.rm-ticket::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  border-left: 2px dashed var(--sand-2);
}

.rm-ticket-label {
  margin: 0 0 6px 12px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.rm-url {
  display: block;
  margin: 0 0 14px 12px;
  color: var(--pine);
  font-family: var(--mono);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.rm-ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 12px;
}

.rm-facts {
  width: min(1120px, calc(100% - 32px));
  margin: 8px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.rm-facts article {
  background: transparent;
  border-top: 2px solid var(--pine);
  padding: 10px 4px 4px;
}

.rm-facts strong {
  display: block;
  font-family: var(--sans);
  font-size: 1rem;
}

.rm-facts p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.rm-slider-wrap {
  margin-top: 26px;
  background: var(--pine);
  color: var(--sand);
  padding: 26px 0 30px;
}

.rm-slider-head {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.rm-slider-head h2 { color: var(--sand); margin: 0; }

.rm-slider-head p {
  margin: 4px 0 0;
  color: rgba(244, 239, 230, 0.78);
  font-size: 1rem;
}

.rm-arrows { display: flex; gap: 8px; }

.rm-arrows button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(244, 239, 230, 0.35);
  background: transparent;
  color: var(--sand);
  font-size: 1.3rem;
  cursor: pointer;
}

.rm-track {
  width: min(1120px, calc(100% - 32px));
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.rm-track::-webkit-scrollbar { display: none; }

.rm-slide {
  flex: 0 0 min(78vw, 280px);
  scroll-snap-align: start;
  background: #fffaf3;
  color: var(--ink);
  min-height: 210px;
  border-radius: 16px;
  padding: 16px 16px 14px;
}

.rm-slide em {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 800;
  color: var(--clay);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.rm-slide h3 {
  margin: 8px 0;
  font-size: 1.25rem;
}

.rm-slide p { margin: 0; color: var(--muted); font-size: 1rem; }

.rm-crumb {
  width: min(1120px, calc(100% - 32px));
  margin: 22px auto 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  font-family: var(--sans);
  font-size: 0.92rem;
}

.rm-crumb li { display: flex; align-items: center; color: var(--muted); }

.rm-crumb li:not(:last-child)::after {
  content: "/";
  margin: 0 8px;
  color: var(--brass);
}

.rm-layout {
  width: min(1120px, calc(100% - 32px));
  margin: 18px auto 40px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.rm-dl { margin: 0 0 1rem; }
.rm-dl dt { font-family: var(--sans); font-weight: 800; }
.rm-dl dd { margin: 0 0 12px; }

.rm-toc {
  position: sticky;
  top: 128px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
}

.rm-toc a { color: var(--ink); text-decoration: none; }

.rm-toc a:hover { color: var(--clay); }

.rm-byline {
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.95rem;
}

.rm-drop::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.5rem;
  line-height: 0.8;
  padding: 6px 8px 0 0;
  color: var(--clay);
  font-weight: 700;
}

.rm-article p { margin: 0 0 1rem; }

.rm-article section { padding-top: 0.4rem; }

.rm-pull {
  margin: 1.2rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 4px solid var(--clay);
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.35;
  color: var(--pine);
}

.rm-steps {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.rm-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  margin: 0 0 12px;
}

.rm-steps li::before {
  content: counter(step);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pine);
  color: var(--sand);
  font-family: var(--sans);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rm-note {
  background: #f7f1e4;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 1rem;
}

.rm-score {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 1rem;
}

.rm-score b {
  font-family: var(--sans);
  font-size: 3rem;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--pine);
}

.rm-score span {
  display: block;
  font-family: var(--sans);
  color: var(--muted);
}

.rm-bars { display: grid; gap: 8px; }

.rm-bars div { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-family: var(--sans); font-size: 0.92rem; }

.rm-bars i {
  display: block;
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 99px;
  background: var(--sand-2);
  position: relative;
}

.rm-bars i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: var(--clay);
  border-radius: inherit;
}

.rm-event h2 { color: var(--sand); }
.rm-hero > :not(.rm-mark) { position: relative; z-index: 1; }

.rm-event {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  background: var(--pine);
  color: var(--sand);
  border-radius: 16px;
  padding: 16px;
  margin: 0 0 1rem;
}

.rm-event strong {
  font-family: var(--sans);
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.rm-event p { margin: 0 0 0.6rem; color: rgba(244, 239, 230, 0.9); }

.rm-faq { border-top: 1px solid var(--line); padding: 12px 0; }

.rm-faq summary {
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
}

.rm-faq p { margin: 8px 0 0; }

.rm-foot {
  background: var(--ink);
  color: #efe8dc;
  padding: 28px 0 36px;
  font-family: var(--sans);
}

.rm-foot .rm-wrap { display: grid; gap: 8px; }

.rm-foot a { color: #f0d7a2; }

.rm-foot small { color: #c9c1b4; line-height: 1.5; }

.rm-dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 250, 243, 0.96);
  border-top: 1px solid var(--line);
}

.rm-dock .rm-btn { flex: 1; }

@media (max-width: 860px) {
  .rm-header-cta { display: none; }
  .rm-hero, .rm-facts, .rm-layout { grid-template-columns: 1fr; }
  .rm-toc {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 14px;
    padding-bottom: 4px;
  }
  .rm-toc a { white-space: nowrap; }
  .rm-score, .rm-event { grid-template-columns: 1fr; }
  .rm-dock { display: flex; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .rm-langs { display: none; }
  .rm-lang-mobile { display: flex; }
}

.rm-lang-mobile {
  display: none;
  gap: 8px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 10px;
}

@media (max-width: 860px) {
  .rm-lang-mobile { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rm-ticker-track { animation: none; }
}
