.ru-site {
  --ru-background: #f6f7fa;
  --ru-surface: #fff;
  --ru-muted-surface: #eef1f6;
  --ru-ink: #192234;
  --ru-muted: #526176;
  --ru-border: #dce2eb;
  --ru-accent: #a01839;
  --ru-accent-dark: #7f142e;
  --ru-accent-soft: #fbeef2;
  --ru-yes: #087453;
  --ru-no: #a02953;
  --ru-yes-soft: #e3f4ec;
  --ru-no-soft: #fae9ef;
  --ru-frame: min(1200px, 92%);
  --ru-radius: 14px;
  background: var(--ru-background);
  color: var(--ru-ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.ru-site main, .ru-footer {
  width: var(--ru-frame);
  max-width: 1200px;
  margin: 0 auto;
}
.ru-site main { min-height: 70vh; padding: 32px 0 48px; }
.ru-site h1 {
  color: var(--ru-ink);
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -.045em;
  line-height: 1.1;
  margin: 6px 0 20px;
}
.ru-site .panel, .ru-site .card { border-radius: var(--ru-radius); }
.ru-environment { display: block; margin-bottom: 10px; color: var(--ru-muted); }
.ru-venue { color: var(--ru-accent); font-size: .82rem; font-weight: 680; }
.ru-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.ru-summary > div {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--ru-border);
  border-radius: var(--ru-radius);
  background: var(--ru-surface);
}
.ru-summary span { color: var(--ru-muted); font-size: .82rem; }
.ru-summary strong { font-size: 1.3rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ru-summary > .ru-summary-primary {
  grid-column: 1 / -1;
  border-color: #ecd7df;
  background: var(--ru-accent-soft);
}
.ru-summary-primary strong { font-size: 1.8rem; }
.ru-site :is(a, button, summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--ru-accent);
  outline-offset: 3px;
}

.ru-header { background: var(--ru-surface); border-bottom: 1px solid var(--ru-border); }
.ru-mast, .ru-navigation {
  width: var(--ru-frame);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ru-mast { min-height: 68px; border-bottom: 1px solid var(--ru-border); }
.ru-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ru-ink);
  font-size: 1.28rem;
  font-weight: 780;
  letter-spacing: -.04em;
  white-space: nowrap;
}
.ru-logo:hover, .ru-header a:hover { text-decoration: none; }
.ru-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ru-accent);
  color: #fff;
  font-weight: 820;
}
.ru-account, .ru-communities, .ru-actions { display: flex; align-items: center; gap: 16px; }
.ru-account { gap: 12px; }
.ru-balance {
  display: grid;
  min-width: 0;
  color: var(--ru-ink);
  line-height: 1.15;
  text-align: right;
  white-space: nowrap;
}
.ru-balance span { color: var(--ru-muted); font-size: .72rem; }
.ru-balance strong { margin-top: 3px; font-size: .9rem; font-variant-numeric: tabular-nums; }
.ru-account-menu { position: relative; }
.ru-account-menu summary {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--ru-accent);
  background: var(--ru-accent-soft);
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}
.ru-account-menu summary::-webkit-details-marker { display: none; }
.ru-account-menu > div {
  display: grid;
  gap: 8px;
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  padding: 14px;
  border: 1px solid var(--ru-border);
  border-radius: 10px;
  background: var(--ru-surface);
  overflow-wrap: anywhere;
}
.ru-account-menu button {
  background: var(--ru-muted-surface);
  border: 1px solid var(--ru-border);
  border-radius: 7px;
  color: var(--ru-ink);
  font: inherit;
  padding: 5px 10px;
  cursor: pointer;
}
.ru-navigation { min-height: 49px; }
.ru-communities, .ru-actions { min-width: 0; }
.ru-communities a, .ru-actions a {
  color: var(--ru-muted);
  font-size: .88rem;
  font-weight: 660;
  white-space: nowrap;
}
.ru-communities a { padding: 13px 1px 11px; border-bottom: 2px solid transparent; }
.ru-communities a[aria-current] { color: var(--ru-accent); border-color: var(--ru-accent); }
.ru-navigation a:hover { color: var(--ru-accent); }
.ru-actions .ru-create {
  color: #fff;
  background: var(--ru-accent);
  padding: 5px 11px;
  border-radius: 7px;
}
.ru-actions .ru-create:hover { color: #fff; background: var(--ru-accent-dark); }
.ru-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--ru-border);
  padding: 20px 0 28px;
  color: var(--ru-muted);
  font-size: .8rem;
}

.ru-exchange {
  --ink: var(--ru-ink);
  --line: var(--ru-border);
  --muted: var(--ru-muted);
  --brand: var(--ru-accent);
  --yes: var(--ru-yes);
  --no: var(--ru-no);
}
.ru-exchange .yes { background: var(--ru-yes-soft); }
.ru-exchange .no { background: var(--ru-no-soft); }
.ru-exchange .outcomes input:checked + .yes { background: var(--ru-yes); }
.ru-exchange .outcomes input:checked + .no { background: var(--ru-no); }
.ru-exchange .narrow.auth { max-width: 440px; }

.ru-chapter {
  --bg: var(--ru-background);
  --surface: var(--ru-surface);
  --surface-2: var(--ru-muted-surface);
  --border: var(--ru-border);
  --text: var(--ru-ink);
  --muted: var(--ru-muted);
  --blue: var(--ru-accent);
  --blue-hover: var(--ru-accent-dark);
  --green: var(--ru-yes);
  --red: var(--ru-no);
  --green-bg: var(--ru-yes-soft);
  --red-bg: var(--ru-no-soft);
}
.ru-chapter input[type="datetime-local"] { color-scheme: light; }
.ru-chapter .stat-tile.hero { background: var(--ru-accent-soft); border-color: #ecd7df; }
.ru-chapter :is(.stat-tile.warn b, .waiting, .tag-wait) { color: #805011; }
.ru-chapter .login { max-width: 440px; margin-top: 18px; text-align: left; }
.ru-chapter .login > .logo { display: none; }
.ru-chapter .card-title { font-size: 1.08rem; letter-spacing: -.02em; }

@media (max-width: 700px) {
  .ru-site main { padding-top: 24px; }
  .ru-mast { min-height: 57px; }
  .ru-navigation { display: block; }
  .ru-actions { min-height: 43px; border-top: 1px solid var(--ru-border); }
  .ru-actions .ru-create { margin-left: auto; }
  .ru-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
