:root {
  --ink: #05070b;
  --ink-soft: #0a101a;
  --panel: #0d1522;
  --panel-2: #111c2d;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #f5f8fc;
  --muted: #8d9bad;
  --muted-light: #b7c3d0;
  --blue: #0a68ff;
  --blue-bright: #2b8cff;
  --blue-soft: rgba(10, 104, 255, 0.14);
  --gold: #f4bd31;
  --danger: #ff5e67;
  --success: #40d99a;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 28px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --header-height: 74px;
  --page-pad: clamp(20px, 4vw, 72px);
  --display: "Arial Black", "Arial Narrow", Arial, sans-serif;
  --body: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 26px);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.reading-progress {
  position: fixed;
  z-index: 1001;
  inset: 0 auto auto 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), #56b6ff);
  box-shadow: 0 0 18px rgba(43, 140, 255, 0.8);
}

.site-header {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto;
  height: var(--header-height);
  background: rgba(5, 7, 11, 0.72);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: background 180ms ease, border-color 180ms ease;
}

.site-header.scrolled {
  background: rgba(5, 7, 11, 0.94);
  border-color: var(--line);
}

.header-inner {
  width: min(1500px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--page-pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}

.compact-brand,
.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
}

.compact-brand img,
.admin-brand img { object-fit: contain; }

.compact-brand span,
.admin-brand span,
.footer-brand div { display: grid; line-height: 1.05; }

.compact-brand strong,
.admin-brand strong {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.compact-brand small,
.admin-brand small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.desktop-nav { display: flex; align-items: center; gap: 36px; }
.desktop-nav a {
  position: relative;
  color: var(--muted-light);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.desktop-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -10px;
  left: 0;
  height: 2px;
  background: var(--blue-bright);
  transform: scaleX(0);
  transition: transform 180ms ease;
}
.desktop-nav a:hover::after { transform: scaleX(1); }

.header-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }

.team-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 16px;
  color: #dce4ef;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.team-button:hover { background: rgba(88, 101, 242, 0.16); border-color: rgba(123, 137, 255, 0.45); transform: translateY(-1px); }
.team-button svg { width: 19px; height: 19px; fill: currentColor; stroke: none; }
.team-button img { border-radius: 50%; }
.team-button--active { border-color: rgba(64, 217, 154, 0.35); }

.icon-button,
.mobile-nav-toggle {
  width: 42px;
  height: 42px;
  padding: 10px;
  color: var(--text);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.icon-button svg { width: 100%; height: 100%; }
.mobile-nav-toggle { display: none; }

.official-badge,
.eyebrow {
  color: var(--blue-bright);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.official-badge { display: inline-flex; align-items: center; gap: 9px; }
.official-badge span {
  width: 7px;
  height: 7px;
  background: var(--blue-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(43, 140, 255, 0.12), 0 0 18px var(--blue-bright);
}

.editor-heading h1,
.error-shell h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  line-height: .98;
  letter-spacing: -0.065em;
  text-transform: uppercase;
}

.primary-button,
.secondary-button {
  min-height: 50px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.primary-button { color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-bright)); box-shadow: 0 12px 35px rgba(10, 104, 255, .28); }
.primary-button:hover { filter: brightness(1.1); }
.primary-button svg { width: 18px; height: 18px; transition: transform 180ms ease; }
.primary-button:hover svg { transform: translateX(3px); }
.secondary-button { background: transparent; border: 1px solid var(--line-strong); }

.auth-notice-wrap { padding: 26px var(--page-pad) 0; background: var(--ink); }
.auth-notice {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  background: rgba(255, 190, 48, .08);
  border: 1px solid rgba(255, 190, 48, .22);
  border-radius: 12px;
}
.auth-notice > svg { width: 24px; height: 24px; color: var(--gold); }
.auth-notice strong { font-size: 13px; }
.auth-notice p { margin: 2px 0 0; color: var(--muted-light); font-size: 12px; }
.notice-close { color: var(--muted); background: transparent; border: 0; font-size: 24px; }

.rules-area { position: relative; padding: 120px var(--page-pad) 140px; background: var(--ink); }

.rules-toolbar {
  position: sticky;
  z-index: 50;
  top: calc(var(--header-height) + 14px);
  width: min(1280px, 100%);
  min-height: 66px;
  margin: 0 auto 28px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(13, 21, 34, .92);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
  backdrop-filter: blur(18px);
}

.search-box { flex: 1; max-width: 680px; display: flex; align-items: center; gap: 12px; padding: 0 10px; }
.search-box svg { width: 21px; height: 21px; color: var(--muted); }
.search-box input { flex: 1; min-width: 0; padding: 9px 0; background: transparent; border: 0; outline: 0; font-size: 14px; }
.search-box input::placeholder { color: #667386; }
.search-box:focus-within svg { color: var(--blue-bright); }
.search-box kbd { padding: 4px 7px; color: var(--muted); background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 6px; font-family: inherit; font-size: 9px; font-weight: 800; }

.toolbar-meta { padding-right: 10px; display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.toolbar-meta span { display: inline-flex; align-items: center; gap: 6px; }
.toolbar-meta svg { width: 14px; height: 14px; color: var(--success); }
.toolbar-divider { width: 1px; height: 18px; background: var(--line-strong); }

.rules-layout {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.rules-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 108px);
  max-height: calc(100vh - var(--header-height) - 128px);
  padding: 2px 14px 20px 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}
.sidebar-heading { padding: 0 8px 14px; display: flex; justify-content: space-between; color: #dce4ef; font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.sidebar-close { display: none; color: var(--muted); background: transparent; border: 0; font-size: 25px; }
.nav-group { margin-bottom: 25px; }
.nav-group > p { margin: 0 0 7px; padding: 0 8px; color: #526074; font-size: 9px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.nav-group a {
  position: relative;
  min-height: 39px;
  padding: 8px 9px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
  color: #7f8da0;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  transition: color 150ms ease, background 150ms ease;
}
.nav-group a > span { color: #435065; font-family: var(--display); font-size: 10px; }
.nav-group a::before { content: ""; position: absolute; left: -1px; width: 2px; height: 16px; background: var(--blue-bright); border-radius: 2px; opacity: 0; }
.nav-group a:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-group a.active { color: #fff; background: var(--blue-soft); }
.nav-group a.active::before { opacity: 1; }
.nav-group a.active > span { color: var(--blue-bright); }

.sidebar-help { margin: 26px 7px 0; padding: 15px; display: flex; gap: 11px; background: rgba(10,104,255,.08); border: 1px solid rgba(43,140,255,.15); border-radius: 12px; }
.sidebar-help svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--blue-bright); }
.sidebar-help div { display: grid; }
.sidebar-help strong { font-size: 11px; }
.sidebar-help span { color: var(--muted); font-size: 9px; line-height: 1.45; }

.sidebar-backdrop { display: none; }
.rules-content { min-width: 0; }
.protected-zone, .protected-content { -webkit-user-select: none; user-select: none; }

.read-first {
  margin-bottom: 34px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  background: linear-gradient(90deg, rgba(244,189,49,.08), rgba(244,189,49,.025));
  border: 1px solid rgba(244,189,49,.17);
  border-radius: 13px;
}
.read-first-icon { width: 34px; height: 34px; display: grid; place-items: center; color: #0b0d10; background: var(--gold); border-radius: 50%; font-family: var(--display); font-size: 16px; }
.read-first div:nth-child(2) { display: grid; }
.read-first strong { font-size: 12px; }
.read-first p { margin: 1px 0 0; color: var(--muted-light); font-size: 11px; }
.read-first > span { color: #7b8797; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.rules-section { padding: 58px 0 38px; border-top: 1px solid var(--line); }
.rules-section:first-of-type { border-top: 0; padding-top: 16px; }
.rules-section[hidden], .searchable-block[hidden] { display: none !important; }
.rules-section-header { margin-bottom: 28px; display: grid; grid-template-columns: 58px 1fr; gap: 18px; align-items: start; }
.section-number { width: 50px; height: 50px; padding: 1px; background: linear-gradient(135deg, var(--blue-bright), rgba(43,140,255,.08) 70%); clip-path: polygon(0 0, 100% 0, 100% 75%, 75% 100%, 0 100%); }
.section-number span { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; background: var(--panel); clip-path: inherit; font-family: var(--display); font-size: 14px; }
.section-group { color: var(--blue-bright); font-size: 9px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.rules-section-header h3 { margin: 5px 0 0; font-family: var(--display); font-size: clamp(24px, 3vw, 38px); line-height: 1.05; letter-spacing: -.04em; text-transform: uppercase; }
.rules-section-header p { max-width: 680px; margin: 10px 0 0; color: var(--muted); font-size: 12px; }

.section-blocks { display: grid; gap: 10px; }
.rule-card {
  position: relative;
  min-height: 86px;
  padding: 19px 18px;
  display: grid;
  grid-template-columns: 82px minmax(0,1fr) 32px;
  gap: 18px;
  align-items: start;
  background: linear-gradient(110deg, rgba(17,28,45,.92), rgba(12,19,31,.84));
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}
.rule-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--blue-bright); opacity: 0; transition: opacity 180ms ease; }
.rule-card:hover { background: linear-gradient(110deg, rgba(18,32,53,.96), rgba(13,22,36,.9)); border-color: rgba(43,140,255,.25); transform: translateX(2px); }
.rule-card:hover::before { opacity: 1; }
.rule-code { width: max-content; min-width: 66px; padding: 5px 8px; color: #74afff; background: rgba(10,104,255,.12); border: 1px solid rgba(43,140,255,.15); border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; font-weight: 900; text-align: center; }
.rule-copy h4 { margin: 0 0 4px; font-size: 13px; }
.rule-copy p,
.note-card p { margin: 0; color: #c0cad7; font-size: 13px; line-height: 1.7; white-space: pre-line; }
.rule-mark { width: 26px; height: 26px; padding: 5px; color: rgba(64,217,154,.55); background: rgba(64,217,154,.06); border: 1px solid rgba(64,217,154,.1); border-radius: 50%; }

.rules-subheading { padding: 29px 0 11px; display: grid; grid-template-columns: 34px auto 1fr; align-items: center; gap: 12px; }
.rules-subheading span { height: 1px; background: linear-gradient(90deg, var(--blue), rgba(10,104,255,.2)); }
.rules-subheading span:last-of-type { background: linear-gradient(90deg, rgba(255,255,255,.1), transparent); }
.rules-subheading h4 { margin: 0; font-family: var(--display); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.rules-subheading > p { grid-column: 2 / -1; margin: 0; color: var(--muted); font-size: 12px; white-space: pre-line; }

.note-card { padding: 18px 20px; display: grid; grid-template-columns: 24px 1fr; gap: 13px; background: rgba(10,104,255,.07); border: 1px solid rgba(43,140,255,.14); border-radius: 11px; }
.note-card > svg { width: 22px; height: 22px; color: var(--blue-bright); }
.note-card strong { display: block; margin-bottom: 4px; font-size: 12px; }
.note-card--warning { background: rgba(244,189,49,.07); border-color: rgba(244,189,49,.17); }
.note-card--warning > svg { color: var(--gold); }

.no-results { min-height: 420px; display: grid; place-items: center; align-content: center; text-align: center; }
.no-results[hidden] { display: none !important; }
.no-results svg { width: 46px; height: 46px; margin-bottom: 15px; color: #4d5a6d; }
.no-results strong { font-family: var(--display); font-size: 22px; text-transform: uppercase; }
.no-results p { margin: 6px 0 20px; color: var(--muted); }
.no-results button { padding: 9px 15px; color: var(--blue-bright); background: var(--blue-soft); border: 1px solid rgba(43,140,255,.2); border-radius: 8px; font-size: 11px; font-weight: 800; }

.site-footer { min-height: 120px; padding: 28px var(--page-pad); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; border-top: 1px solid var(--line); background: #040609; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { font-family: var(--display); font-size: 13px; text-transform: uppercase; }
.footer-brand span, .site-footer > p { color: var(--muted); font-size: 9px; }
.footer-meta { display: grid; text-align: center; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.site-footer > p { justify-self: end; }

.copy-toast { position: fixed; z-index: 2000; right: 24px; bottom: 24px; max-width: 340px; padding: 13px 17px; color: #fff; background: #172236; border: 1px solid rgba(43,140,255,.3); border-radius: 10px; box-shadow: var(--shadow); font-size: 12px; font-weight: 700; opacity: 0; pointer-events: none; transform: translateY(14px); transition: opacity 180ms ease, transform 180ms ease; }
.copy-toast.show { opacity: 1; transform: translateY(0); }
.noscript-banner { position: fixed; z-index: 3000; right: 0; bottom: 0; left: 0; padding: 10px; color: #111; background: var(--gold); text-align: center; font-size: 12px; font-weight: 800; }

/* Admin */
.admin-page { min-height: 100vh; color: #e8eef6; background: #080d15; }
.admin-sidebar { position: fixed; z-index: 200; inset: 0 auto 0 0; width: 282px; padding: 24px 15px 18px; display: flex; flex-direction: column; background: #070c14; border-right: 1px solid var(--line); }
.admin-brand { margin: 0 9px 30px; }
.admin-sidebar-label { padding: 0 10px 9px; display: flex; justify-content: space-between; color: #526074; font-size: 9px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.admin-sidebar-label strong { min-width: 22px; padding: 2px 6px; color: #85b9ff; background: var(--blue-soft); border-radius: 10px; text-align: center; }
.admin-section-nav { flex: 1; margin-right: -5px; padding-right: 5px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.admin-section-nav a { min-height: 54px; padding: 8px 10px; display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 9px; color: #778599; border: 1px solid transparent; border-radius: 10px; }
.admin-section-nav a > span { color: #425169; font-family: var(--display); font-size: 10px; }
.admin-section-nav a div { min-width: 0; display: grid; }
.admin-section-nav a strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.admin-section-nav a small { overflow: hidden; color: #4e5b6d; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.admin-section-nav a:hover { color: #dfe7f2; background: rgba(255,255,255,.025); }
.admin-section-nav a.active { color: #fff; background: var(--blue-soft); border-color: rgba(43,140,255,.15); }
.admin-section-nav a.active > span { color: var(--blue-bright); }
.add-section-link { margin: 13px 0; min-height: 43px; padding: 0 12px; display: flex; align-items: center; gap: 10px; color: #91bfff; background: rgba(10,104,255,.08); border: 1px dashed rgba(43,140,255,.25); border-radius: 10px; font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.add-section-link:hover, .add-section-link.active { background: rgba(10,104,255,.14); }
.add-section-link svg { width: 17px; height: 17px; }
.admin-user { padding: 12px; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 12px; }
.admin-user > img { border-radius: 50%; }
.admin-user > div { min-width: 0; display: grid; }
.admin-user strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-user span { color: var(--success); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.admin-user button { width: 30px; height: 30px; padding: 6px; color: #6e7b8e; background: transparent; border: 0; }
.admin-user button:hover { color: var(--danger); }

.admin-main { min-height: 100vh; margin-left: 282px; }
.admin-topbar { position: sticky; z-index: 100; top: 0; height: 68px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(8,13,21,.9); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.admin-breadcrumb { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 10px; }
.admin-breadcrumb span { color: #647186; }
.admin-breadcrumb b { color: #3d4859; }
.admin-breadcrumb strong { overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.preview-button { min-height: 36px; padding: 0 13px; display: inline-flex; align-items: center; gap: 8px; color: #aeb9c8; background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 8px; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.preview-button:hover { color: #fff; border-color: var(--line-strong); }
.preview-button svg { width: 16px; height: 16px; }
.admin-menu-button { display: none; width: 38px; height: 38px; padding: 9px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 8px; }

.admin-workspace { width: min(1040px, calc(100% - 64px)); margin: 0 auto; padding: 54px 0 90px; }
.admin-notice { margin-bottom: 25px; padding: 13px 15px; display: flex; align-items: center; gap: 10px; color: #bbf3dc; background: rgba(64,217,154,.07); border: 1px solid rgba(64,217,154,.18); border-radius: 10px; font-size: 11px; font-weight: 700; }
.admin-notice svg { width: 20px; height: 20px; }
.admin-notice span { flex: 1; }
.admin-notice button { color: #7cbda2; background: transparent; border: 0; font-size: 20px; }
.editor-heading { margin-bottom: 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.editor-heading h1 { margin-top: 8px; font-size: clamp(34px, 4.5vw, 58px); }
.editor-heading p { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.order-actions { display: flex; gap: 7px; }
.order-actions button { width: 38px; height: 38px; padding: 9px; color: #8190a4; background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 8px; }
.order-actions button:hover { color: #fff; border-color: rgba(43,140,255,.3); }

.editor-form { display: grid; gap: 18px; }
.editor-panel { padding: 26px; background: #0d1420; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 14px 50px rgba(0,0,0,.12); }
.panel-title { margin-bottom: 24px; display: grid; grid-template-columns: 35px 1fr; gap: 13px; align-items: start; }
.panel-title > span { width: 31px; height: 31px; display: grid; place-items: center; color: #7eb6ff; background: var(--blue-soft); border: 1px solid rgba(43,140,255,.16); border-radius: 8px; font-family: var(--display); font-size: 9px; }
.panel-title h2 { margin: 0; font-family: var(--display); font-size: 16px; letter-spacing: -.02em; text-transform: uppercase; }
.panel-title p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.panel-title--actions { grid-template-columns: 35px 1fr auto; align-items: center; }
.add-block-button { min-height: 38px; padding: 0 13px; display: inline-flex; align-items: center; gap: 7px; color: #fff; background: var(--blue); border: 0; border-radius: 8px; font-size: 9px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.add-block-button:hover { background: var(--blue-bright); }
.add-block-button svg { width: 16px; height: 16px; }

.form-grid { display: grid; grid-template-columns: 160px 1fr; gap: 17px; }
.field { min-width: 0; display: grid; gap: 7px; align-content: start; }
.field > span { color: #9eabba; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.field > small { color: #566376; font-size: 9px; }
.field input,
.field textarea,
.field select { width: 100%; padding: 11px 12px; color: #e9eef6; background: #090f18; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; outline: 0; font-size: 12px; transition: border-color 150ms ease, box-shadow 150ms ease; }
.field textarea { resize: vertical; line-height: 1.6; }
.field select { min-height: 43px; }
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: rgba(43,140,255,.65); box-shadow: 0 0 0 3px rgba(10,104,255,.1); }
.field--wide { grid-column: 1 / -1; }
.field--small input { text-align: center; }

.editor-blocks { display: grid; gap: 13px; }
.editor-block { background: #0a111c; border: 1px solid rgba(255,255,255,.09); border-radius: 11px; overflow: hidden; }
.block-toolbar { min-height: 44px; padding: 0 11px 0 14px; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.018); border-bottom: 1px solid rgba(255,255,255,.07); }
.drag-index { color: #46546a; font-family: var(--display); font-size: 9px; }
.block-toolbar > strong { flex: 1; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.block-toolbar > div { display: flex; gap: 3px; }
.block-toolbar button { width: 29px; height: 29px; padding: 7px; color: #647287; background: transparent; border: 0; border-radius: 6px; }
.block-toolbar button:hover { color: #fff; background: rgba(255,255,255,.05); }
.block-toolbar .remove-block:hover { color: var(--danger); background: rgba(255,94,103,.07); }
.block-fields { padding: 17px; display: grid; grid-template-columns: 1fr 180px; gap: 14px; }
.empty-blocks { min-height: 230px; display: grid; place-items: center; align-content: center; text-align: center; border: 1px dashed rgba(255,255,255,.11); border-radius: 11px; }
.empty-blocks svg { width: 38px; height: 38px; margin-bottom: 11px; color: #435066; }
.empty-blocks strong { font-size: 12px; }
.empty-blocks p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }

.editor-savebar { position: sticky; z-index: 80; bottom: 16px; min-height: 72px; padding: 12px 14px 12px 18px; display: flex; align-items: center; gap: 18px; background: rgba(15,23,36,.95); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 18px 60px rgba(0,0,0,.45); backdrop-filter: blur(16px); }
.editor-savebar > div { flex: 1; display: grid; }
.editor-savebar span { font-size: 10px; font-weight: 900; text-transform: uppercase; }
.editor-savebar small { color: var(--muted); font-size: 9px; }
.editor-savebar > a { color: var(--muted); font-size: 10px; font-weight: 800; }
.editor-savebar > button { min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; gap: 9px; color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-bright)); border: 0; border-radius: 9px; font-size: 10px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.editor-savebar > button:hover { filter: brightness(1.1); }
.editor-savebar svg { width: 17px; height: 17px; }

.danger-zone { margin-top: 40px; padding: 20px; display: flex; justify-content: space-between; align-items: center; gap: 20px; background: rgba(255,94,103,.035); border: 1px solid rgba(255,94,103,.12); border-radius: 12px; }
.danger-zone strong { color: #ff9da3; font-size: 11px; text-transform: uppercase; }
.danger-zone p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.danger-zone > button { min-height: 38px; padding: 0 13px; color: #ff9da3; background: rgba(255,94,103,.06); border: 1px solid rgba(255,94,103,.2); border-radius: 8px; font-size: 9px; font-weight: 900; text-transform: uppercase; }

.delete-dialog { width: min(460px, calc(100% - 30px)); padding: 28px; color: var(--text); background: #101926; border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 30px 100px rgba(0,0,0,.65); }
.delete-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }
.dialog-close-form { position: absolute; top: 12px; right: 12px; }
.dialog-close-form button { color: var(--muted); background: transparent; border: 0; font-size: 24px; }
.dialog-icon { width: 48px; height: 48px; padding: 11px; color: var(--danger); background: rgba(255,94,103,.09); border-radius: 50%; }
.delete-dialog h2 { margin: 18px 0 8px; font-family: var(--display); font-size: 22px; line-height: 1.1; text-transform: uppercase; }
.delete-dialog > p { color: var(--muted-light); font-size: 12px; }
.delete-dialog > div:last-child { margin-top: 24px; display: flex; justify-content: flex-end; gap: 9px; }
.delete-dialog > div:last-child button { min-height: 39px; padding: 0 14px; border-radius: 8px; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.delete-dialog > div:last-child > button { color: var(--muted-light); background: transparent; border: 1px solid var(--line); }
.delete-dialog > div:last-child form button { color: #fff; background: #d94c55; border: 0; }
.admin-sidebar-backdrop { display: none; }

/* Error */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 10%, rgba(10,104,255,.16), transparent 38%), #05070b; }
.error-shell { width: min(640px, 100%); text-align: center; }
.error-shell .compact-brand { margin: 0 auto 50px; }
.error-code { width: 98px; height: 98px; margin: 0 auto 24px; padding: 1px; background: linear-gradient(135deg, var(--blue-bright), transparent 70%); clip-path: polygon(0 0, 100% 0, 100% 75%, 75% 100%, 0 100%); }
.error-code span { width: 100%; height: 100%; display: grid; place-items: center; background: #0c1522; clip-path: inherit; font-family: var(--display); font-size: 25px; }
.error-shell h1 { margin-top: 10px; font-size: clamp(38px, 7vw, 68px); }
.error-shell > p:not(.eyebrow) { max-width: 540px; margin: 20px auto 0; color: var(--muted-light); }
.error-actions { margin-top: 30px; display: flex; justify-content: center; gap: 10px; }

@media (max-width: 1100px) {
  .desktop-nav { display: none; }
  .header-inner { grid-template-columns: 1fr auto; }
  .rules-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 34px; }
}

@media (max-width: 820px) {
  :root { --header-height: 66px; }
  .mobile-nav-toggle { display: block; }
  .team-button span { display: none; }
  .team-button { width: 42px; padding: 0; justify-content: center; }
  .rules-area { padding-top: 86px; }
  .rules-toolbar { top: calc(var(--header-height) + 8px); }
  .toolbar-meta { display: none; }
  .rules-layout { display: block; }
  .rules-sidebar { position: fixed; z-index: 1200; inset: 0 auto 0 0; width: min(330px, 88vw); max-height: none; padding: 24px 18px; background: #080e18; border-right: 1px solid var(--line-strong); transform: translateX(-102%); transition: transform 220ms ease; }
  .rules-sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .sidebar-backdrop { position: fixed; z-index: 1190; inset: 0; display: block; background: rgba(0,0,0,.65); opacity: 0; pointer-events: none; transition: opacity 220ms ease; }
  .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
  .read-first { grid-template-columns: auto 1fr; }
  .read-first > span { grid-column: 2; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .footer-meta { justify-self: end; text-align: right; }
  .site-footer > p { grid-column: 1 / -1; justify-self: start; }

  .admin-sidebar { width: min(310px, 88vw); transform: translateX(-102%); transition: transform 220ms ease; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-menu-button { display: block; }
  .admin-topbar { padding: 0 20px; justify-content: flex-start; }
  .admin-breadcrumb { flex: 1; }
  .admin-workspace { width: min(100% - 36px, 1040px); }
  .admin-sidebar-backdrop { position: fixed; z-index: 190; inset: 0; display: block; background: rgba(0,0,0,.65); opacity: 0; pointer-events: none; transition: opacity 220ms ease; }
  .admin-sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
}

@media (max-width: 580px) {
  :root { --page-pad: 18px; }
  .compact-brand small { display: none; }
  .primary-button { min-height: 46px; }
  .rules-toolbar { padding: 8px; }
  .search-box kbd { display: none; }
  .rules-section { padding-top: 45px; }
  .rules-section-header { grid-template-columns: 44px 1fr; gap: 13px; }
  .section-number { width: 41px; height: 41px; }
  .rules-section-header h3 { font-size: 24px; }
  .rule-card { grid-template-columns: 1fr 25px; gap: 10px; padding: 17px 15px; }
  .rule-code { grid-column: 1 / -1; margin-bottom: 1px; }
  .rule-copy { grid-column: 1; }
  .rule-mark { grid-column: 2; grid-row: 2; }
  .read-first { padding: 15px; }
  .read-first p { font-size: 10px; }
  .read-first > span { display: none; }
  .site-footer { display: flex; align-items: flex-start; flex-direction: column; }
  .footer-meta { justify-self: auto; text-align: left; }
  .copy-toast { right: 14px; bottom: 14px; left: 14px; text-align: center; }

  .admin-topbar { height: 62px; }
  .admin-breadcrumb span, .admin-breadcrumb b { display: none; }
  .preview-button { width: 38px; padding: 0; justify-content: center; }
  .preview-button { font-size: 0; }
  .editor-heading { align-items: flex-start; flex-direction: column; }
  .editor-heading h1 { font-size: 36px; }
  .editor-panel { padding: 18px; }
  .panel-title, .panel-title--actions { grid-template-columns: 31px 1fr; }
  .add-block-button { grid-column: 1 / -1; justify-self: start; margin-top: 5px; }
  .form-grid, .block-fields { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .editor-savebar { align-items: stretch; flex-wrap: wrap; }
  .editor-savebar > div { width: 100%; flex-basis: 100%; }
  .editor-savebar > a { align-self: center; margin-left: auto; }
  .danger-zone { align-items: flex-start; flex-direction: column; }
  .error-actions { flex-direction: column; }
}

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

@media print {
  .public-page > * { display: none !important; }
  .public-page::before {
    content: "O Livro de Regras da DuArrasta City está disponível apenas para consulta no portal oficial.";
    display: block;
    padding: 60px;
    color: #111;
    background: #fff;
    font: 700 18px/1.5 Arial, sans-serif;
    text-align: center;
  }
}

/* Public rules experience */
body.public-page {
  position: relative;
  isolation: isolate;
  background: transparent;
}

body.public-page::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(3, 7, 13, .92) 0%, rgba(3, 8, 16, .68) 46%, rgba(3, 8, 16, .28) 76%, rgba(3, 7, 13, .62) 100%),
    linear-gradient(180deg, rgba(5, 7, 11, .18), rgba(5, 7, 11, .56)),
    url("/images/rules-background.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.public-page .site-header {
  background: rgba(5, 8, 14, .84);
  border-bottom-color: rgba(255, 255, 255, .07);
}

.public-page .desktop-nav a:first-child { color: #fff; }

.public-page .auth-notice-wrap {
  padding-top: calc(var(--header-height) + 24px);
  background: transparent;
}

.auth-notice-wrap + .rules-area { padding-top: 38px; }

.rules-area {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--header-height) + 64px) var(--page-pad) 120px;
  overflow: clip;
  background: transparent;
}

.rules-area::before {
  display: none;
}

.rules-masthead,
.rules-layout { position: relative; z-index: 1; }

.rules-masthead {
  width: min(1400px, 100%);
  min-height: 350px;
  margin: 0 auto 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: clamp(32px, 5vw, 84px);
}

.rules-masthead-copy {
  position: relative;
  max-width: 840px;
  padding-left: 24px;
}

.rules-emblem {
  position: relative;
  width: 320px;
  height: 320px;
  justify-self: center;
  overflow: visible;
  pointer-events: none;
}

.rules-emblem span {
  position: absolute;
  inset: 25%;
  background: radial-gradient(circle, rgba(10, 104, 255, .24), rgba(10, 104, 255, .04) 48%, transparent 72%);
  border-radius: 50%;
  filter: blur(18px);
}

.rules-emblem img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 420px;
  max-width: none;
  opacity: .92;
  filter: drop-shadow(0 20px 32px rgba(0, 0, 0, .42)) drop-shadow(0 0 18px rgba(10, 104, 255, .18));
  transform: translate(-51%, -49.25%);
}

.rules-masthead-copy::before {
  content: "";
  position: absolute;
  inset: 3px auto 4px 0;
  width: 3px;
  background: linear-gradient(var(--blue-bright), rgba(43, 140, 255, .04));
  border-radius: 4px;
  box-shadow: 0 0 24px rgba(43, 140, 255, .35);
}

.rules-masthead h1 {
  max-width: 820px;
  margin: 20px 0 0;
  font-family: var(--display);
  font-size: clamp(46px, 5.4vw, 76px);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.065em;
  text-transform: uppercase;
}

.rules-masthead h1 em {
  color: var(--blue-bright);
  font-style: normal;
}

.rules-masthead-copy > p {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted-light);
  font-size: 14px;
}

.document-status {
  margin-top: 19px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: #6f7e91;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.document-status span { display: inline-flex; align-items: center; gap: 7px; }
.document-status svg { width: 15px; height: 15px; color: var(--success); }

.rules-toolbar {
  top: calc(var(--header-height) + 12px);
  width: min(1400px, 100%);
  min-height: 64px;
  margin-bottom: 22px;
  padding: 9px 12px;
  background: rgba(11, 18, 30, .92);
  border-color: rgba(255, 255, 255, .12);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .32), 0 0 0 1px rgba(10, 104, 255, .03) inset;
}

.search-box {
  max-width: 760px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  transition: background 180ms ease;
}

.search-box:focus-within { background: rgba(255, 255, 255, .035); }
.search-box input { font-size: 13px; }
.toolbar-meta { padding-right: 8px; }

.rules-layout {
  width: min(1400px, 100%);
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 32px;
}

.rules-sidebar {
  top: calc(var(--header-height) + 98px);
  max-height: calc(100vh - var(--header-height) - 118px);
  padding: 16px 10px 18px;
  background: linear-gradient(180deg, rgba(14, 23, 38, .82), rgba(8, 14, 23, .74));
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
  backdrop-filter: blur(14px);
}

.sidebar-heading {
  padding: 2px 10px 15px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.sidebar-heading b {
  min-width: 22px;
  margin-left: 6px;
  padding: 2px 6px;
  color: #91bdff;
  background: var(--blue-soft);
  border-radius: 10px;
  font-size: 8px;
  text-align: center;
}

.rules-sidebar nav { padding-top: 15px; }
.nav-group { margin-bottom: 21px; }
.nav-group > p { padding: 0 10px; }
.nav-group a {
  min-height: 42px;
  padding: 8px 10px;
  grid-template-columns: 30px 1fr;
  border: 1px solid transparent;
  border-radius: 9px;
}

.nav-group a::before { left: 0; }
.nav-group a.active { border-color: rgba(43, 140, 255, .13); }
.sidebar-help { margin: 24px 4px 0; }

.rules-content { min-width: 0; }

.read-first {
  margin-bottom: 22px;
  padding: 16px 18px;
  background: linear-gradient(110deg, rgba(244, 189, 49, .08), rgba(17, 28, 45, .56));
  border-color: rgba(244, 189, 49, .2);
  border-radius: 14px;
}

.read-first-icon {
  width: 32px;
  height: 32px;
  box-shadow: 0 0 22px rgba(244, 189, 49, .16);
}

.rules-section {
  margin-bottom: 24px;
  padding: 0;
  scroll-margin-top: calc(var(--header-height) + 104px);
  overflow: hidden;
  background: linear-gradient(145deg, rgba(13, 22, 36, .88), rgba(8, 14, 23, .82));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .16);
}

.rules-section:first-of-type { padding-top: 0; border-top: 1px solid var(--line); }

.rules-section-header {
  position: relative;
  min-height: 116px;
  margin: 0;
  padding: 24px 28px;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  overflow: hidden;
  background:
    linear-gradient(105deg, rgba(20, 35, 57, .9), rgba(12, 21, 35, .62)),
    radial-gradient(circle at 92% 22%, rgba(10, 104, 255, .13), transparent 34%);
  border-bottom: 1px solid var(--line);
}

.rules-section-header::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(var(--blue-bright), rgba(43, 140, 255, .16));
  box-shadow: 0 0 20px rgba(43, 140, 255, .32);
}

.rules-section-header::after {
  content: attr(data-number);
  position: absolute;
  right: 28px;
  top: 50%;
  color: rgba(102, 161, 255, .045);
  font-family: var(--display);
  font-size: 92px;
  line-height: 1;
  letter-spacing: -.08em;
  pointer-events: none;
  transform: translateY(-50%);
}

.section-number {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  padding: 1px;
  background: linear-gradient(145deg, rgba(43, 140, 255, .9), rgba(43, 140, 255, .16));
  border-radius: 14px;
  clip-path: none;
  box-shadow: 0 10px 28px rgba(0, 74, 190, .16);
}

.section-number span {
  background: linear-gradient(145deg, #0d1b2e, #091322);
  border-radius: 13px;
  clip-path: none;
  font-size: 15px;
}

.section-heading-copy { position: relative; z-index: 1; }

.section-group {
  width: max-content;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  color: #7fb5ff;
  background: rgba(10, 104, 255, .1);
  border: 1px solid rgba(43, 140, 255, .14);
  border-radius: 999px;
  font-size: 8px;
  letter-spacing: .13em;
}

.rules-section-header h3 {
  margin-top: 8px;
  font-size: clamp(24px, 2.55vw, 34px);
  letter-spacing: -.035em;
}

.rules-section-header p { max-width: 760px; margin-top: 7px; color: #93a1b3; font-size: 12px; }

.section-blocks {
  padding: 18px;
  gap: 8px;
}

.rule-card {
  min-height: 82px;
  padding: 18px 18px;
  grid-template-columns: 88px minmax(0, 1fr) 30px;
  gap: 16px;
  background: rgba(255, 255, 255, .022);
  border-color: rgba(255, 255, 255, .075);
  border-radius: 12px;
}

.rule-card::before { width: 3px; }
.rule-card:hover {
  background: linear-gradient(100deg, rgba(10, 104, 255, .085), rgba(255, 255, 255, .026));
  border-color: rgba(43, 140, 255, .25);
  transform: none;
}

.rule-code {
  min-width: 72px;
  padding: 6px 9px;
  color: #91bdff;
  background: rgba(10, 104, 255, .11);
  border-color: rgba(43, 140, 255, .18);
  border-radius: 7px;
}

.rule-copy h4 { margin-bottom: 5px; font-size: 13px; }
.rule-copy p,
.note-card p { color: #c7d1dd; font-size: 13.5px; line-height: 1.72; }

.rule-mark {
  width: 28px;
  height: 28px;
  padding: 6px;
  color: rgba(123, 174, 246, .5);
  background: rgba(10, 104, 255, .045);
  border-color: rgba(43, 140, 255, .09);
}

.rules-subheading { padding: 32px 8px 13px; }
.note-card { margin: 2px 0; border-radius: 12px; }

.site-footer {
  min-height: 108px;
  background: rgba(3, 5, 8, .72);
}

.developer-credit {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.developer-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--blue-bright);
  background: rgba(10, 104, 255, .1);
  border: 1px solid rgba(43, 140, 255, .18);
  border-radius: 9px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
}

.developer-credit > span:last-child { display: grid; line-height: 1.05; }
.developer-credit small { color: #5e6c7e; font-size: 7px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.developer-credit strong { margin-top: 4px; color: #dbe6f4; font-family: var(--display); font-size: 11px; letter-spacing: .02em; text-transform: uppercase; }

@media (max-width: 1100px) {
  .rules-masthead { grid-template-columns: minmax(0, 1fr) 250px; gap: 24px; }
  .rules-emblem { width: 250px; height: 280px; }
  .rules-emblem img { width: 380px; }
  .rules-layout { grid-template-columns: 254px minmax(0, 1fr); gap: 24px; }
  .rules-section-header { padding: 25px 24px; }
}

@media (max-width: 820px) {
  .rules-area { padding-top: calc(var(--header-height) + 48px); }
  .auth-notice-wrap + .rules-area { padding-top: 34px; }
  .rules-masthead { position: relative; grid-template-columns: 1fr; margin-bottom: 32px; }
  .rules-masthead h1 { font-size: clamp(43px, 10vw, 66px); }
  .rules-emblem { position: absolute; right: -44px; width: 270px; height: 300px; opacity: .2; }
  .rules-emblem img { width: 400px; }
  .rules-toolbar { top: calc(var(--header-height) + 8px); }
  .rules-layout { display: block; }
  .rules-sidebar {
    position: fixed;
    z-index: 1200;
    inset: 0 auto 0 0;
    width: min(340px, 89vw);
    max-height: none;
    padding: 20px 14px;
    border-width: 0 1px 0 0;
    border-radius: 0;
    background: #080e18;
    transform: translateX(-102%);
    transition: transform 220ms ease;
  }
  .rules-sidebar.open { transform: translateX(0); }
  .rules-section-header { grid-template-columns: 52px minmax(0, 1fr); }
}

@media (max-width: 580px) {
  .rules-area { padding-top: calc(var(--header-height) + 36px); padding-bottom: 80px; }
  body.public-page::before { background-position: 58% center; }
  .rules-masthead { min-height: 340px; }
  .rules-masthead-copy { padding-left: 16px; }
  .rules-emblem { right: -76px; width: 230px; height: 270px; opacity: .16; }
  .rules-emblem img { width: 350px; }
  .rules-masthead h1 { margin-top: 17px; font-size: clamp(38px, 12vw, 54px); line-height: .94; }
  .rules-masthead-copy > p { margin-top: 18px; font-size: 12.5px; }
  .document-status { align-items: flex-start; flex-direction: column; gap: 7px; }
  .rules-toolbar { margin-bottom: 16px; border-radius: 13px; }
  .rules-section { margin-bottom: 16px; border-radius: 16px; }
  .rules-section-header {
    min-height: 0;
    padding: 20px 17px;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
  }
  .rules-section-header::after { right: 14px; font-size: 68px; }
  .section-number { width: 46px; height: 46px; border-radius: 12px; }
  .section-number span { border-radius: 11px; font-size: 13px; }
  .section-group { padding: 3px 7px; font-size: 7px; }
  .rules-section-header h3 { font-size: 22px; }
  .rules-section-header p { font-size: 11px; }
  .section-blocks { padding: 10px; gap: 7px; }
  .rule-card {
    min-height: 0;
    padding: 16px 14px;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .rule-code { grid-column: auto; margin: 0; }
  .rule-copy { grid-column: auto; }
  .rule-mark { display: none; }
  .rule-copy p, .note-card p { font-size: 12.5px; }
  .rules-subheading { padding: 27px 4px 10px; }
  .read-first { padding: 14px; }
}
