:root {
  color-scheme: light;
  --paper: #ffffff;
  --surface: #f5f8f7;
  --surface-strong: #edf3f1;
  --ink: #182322;
  --text: #43514f;
  --muted: #64716f;
  --line: #dce5e2;
  --teal: #0c6967;
  --teal-dark: #075755;
  --teal-pale: #e8f3f1;
  --copper: #8d522e;
  --copper-pale: #f6e8dd;
  --focus: #156e83;
  --sidebar-width: 242px;
  --content-gutter: clamp(24px, 4.1vw, 64px);
  --radius-sm: 8px;
  --radius-md: 14px;
  --shadow-soft: 0 14px 36px rgba(26, 48, 44, 0.12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }
svg { display: block; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: #fff;
  background: var(--teal-dark);
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

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

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 560px;
  padding: 27px 17px 18px;
  background: var(--paper);
  border-right: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  min-height: 44px;
  text-decoration: none;
}
.brand img { flex: 0 0 auto; object-fit: contain; }
.brand > span {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.1;
}
.brand-world {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3em;
}
.brand-mobile { display: none; }

.primary-navigation {
  display: grid;
  gap: 5px;
  margin-top: 42px;
}
.primary-navigation a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 9px 12px;
  color: var(--text);
  border-left: 3px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
.primary-navigation a:hover {
  color: var(--teal-dark);
  background: var(--surface);
}
.primary-navigation a[aria-current="page"] {
  color: var(--teal-dark);
  background: var(--teal-pale);
  border-left-color: var(--teal);
  font-weight: 650;
}
.primary-navigation svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-bottom {
  display: grid;
  gap: 3px;
  margin-top: auto;
  padding: 16px 10px 3px;
  border-top: 1px solid var(--line);
}
.sidebar-kicker {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bot-link {
  color: var(--teal-dark);
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.bot-link span { margin-left: 4px; }

.layout-main { min-width: 0; }
.mobile-topbar { display: none; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 var(--content-gutter);
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.035em;
}
.topbar a {
  color: var(--teal-dark);
  font-weight: 650;
  text-decoration: none;
  letter-spacing: 0;
}
.topbar a:hover { text-decoration: underline; text-underline-offset: 4px; }
.topbar-divider { padding: 0 9px; color: #a2aeab; }

.content {
  width: min(100%, 1660px);
  min-width: 0;
  margin: 0 auto;
  padding: 42px var(--content-gutter) 52px;
}
.page-section[hidden] { display: none; }
.page-heading { max-width: 1050px; margin: 0 0 26px; }
.page-heading h1 {
  margin: 0;
  color: #111b1a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 4vw, 55px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.08;
}
.page-heading p {
  max-width: 850px;
  margin: 13px 0 0;
  color: var(--text);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.5;
}
.page-heading-compact { margin-bottom: 24px; }
.page-heading-compact h1 { font-size: clamp(36px, 3.6vw, 48px); }
.page-heading-compact p { font-size: 16px; }

h2, h3, p { overflow-wrap: anywhere; }
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.24;
}
h3 { margin: 0; font-size: 15px; line-height: 1.35; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--teal); }
.button-primary:hover { color: #fff; background: var(--teal-dark); }
.button-primary svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.button-arrow { margin-left: 5px; font-size: 19px; line-height: 1; }
.button-secondary { color: var(--teal-dark); background: var(--paper); border-color: #9ebbb5; }
.button-secondary:hover { background: var(--teal-pale); border-color: var(--teal); }
.button-small { min-height: 40px; padding: 8px 13px; font-size: 13px; }
.page-heading .button { margin-top: 22px; }

.demo-notice, .info-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin: 23px 0;
  padding: 11px 16px;
  color: #254d4c;
  background: var(--teal-pale);
  border: 1px solid #d5e9e4;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.demo-notice svg, .info-notice svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.info-notice { margin-top: 0; }
.info-notice.is-error { color: #8a3434; background: #fff2f0; border-color: #f0d2cc; }
.info-notice.is-error svg { stroke: #a5453e; }
.info-notice > span { flex: 1 1 auto; }
.info-notice > .button { flex: 0 0 auto; }
.chart-retry { margin-top: 12px; }
.statistics-load-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; }
.statistics-load-status p { margin: 0; }
.statistics-comparison-note { max-width: 280px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.demo-tag {
  display: inline-flex;
  align-items: center;
  vertical-align: 0.18em;
  min-height: 19px;
  margin-left: 6px;
  padding: 1px 7px;
  color: #713b1d;
  background: var(--copper-pale);
  border-radius: 4px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.07em;
  line-height: 1.4;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 19px 0 8px;
  border-bottom: 1px solid var(--line);
}
.metric {
  min-width: 0;
  padding: 0 21px 19px;
  border-right: 1px solid var(--line);
}
.metric:first-child { padding-left: 0; }
.metric:last-child { padding-right: 0; border-right: 0; }
.metric-label {
  min-height: 22px;
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
}
.metric-value {
  margin: 4px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.04em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.metric-detail { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.data-caveat { margin: 8px 0 22px; color: var(--muted); font-size: 12px; }

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, 0.9fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.chart-section, .ranking-preview { min-width: 0; padding: 21px 0 19px; }
.chart-section { padding-right: 24px; }
.ranking-preview { padding-left: 24px; border-left: 1px solid var(--line); }
.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.section-heading-row h2 { font-size: 22px; }
.section-caption { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.small-note { color: var(--muted); font-size: 11px; }
.segmented-control {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid #e5ece9;
  border-radius: 8px;
}
.segmented-control button {
  min-height: 32px;
  padding: 5px 11px;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.segmented-control button:hover { color: var(--teal-dark); }
.segmented-control button[aria-pressed="true"] {
  color: var(--teal-dark);
  background: var(--paper);
  border-color: #9ebbb5;
  box-shadow: 0 1px 2px rgba(18, 53, 48, 0.06);
}

.chart {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 15px;
  overflow: visible;
}
.chart-grid-line { stroke: #e7edeb; stroke-width: 1; }
.chart-empty { fill: var(--muted); font-size: 13px; }
.chart-axis-label {
  fill: #667572;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
}
.chart-area { fill: rgba(12, 105, 103, 0.09); }
.chart-path { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-previous { fill: none; stroke: #9b6b47; stroke-width: 2; stroke-dasharray: 6 5; }
.chart-point { fill: var(--paper); stroke: var(--teal); stroke-width: 2.5; }
.chart-copper .chart-path { stroke: #9a5c34; }
.chart-copper .chart-area { fill: rgba(154, 92, 52, 0.08); }
.chart-copper .chart-point { stroke: #9a5c34; }
.chart-legend { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.compare-note { margin: 10px 0 0; color: var(--copper); font-size: 12px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.table-wrap { width: 100%; min-width: 0; }
table { width: 100%; border-collapse: collapse; text-align: left; }
.compact-table { margin-top: 12px; }
th { color: var(--muted); font-weight: 550; }
.compact-table th { padding: 8px 7px; background: var(--surface); font-size: 10px; }
.compact-table td { padding: 8px 7px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 11px; }
.compact-table tbody tr:last-child td { border-bottom: 0; }
.compact-table .place-cell { width: 34px; color: var(--copper); font-weight: 700; }
.demo-name { display: inline-flex; align-items: center; gap: 5px; }
.demo-name::after {
  content: "ДЕМО";
  color: #713b1d;
  background: var(--copper-pale);
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.command-finder { padding: 24px 0 4px; }
.command-finder-head { margin-bottom: 13px; }
.search-field {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 0 13px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid #cbd7d3;
  border-radius: 9px;
}
.search-field:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(12, 105, 103, 0.1); }
.search-field svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.search-field input {
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}
.search-field input::placeholder { color: #77827f; opacity: 1; }
.search-field kbd {
  flex: 0 0 auto;
  padding: 2px 6px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
}
.quick-results { display: grid; }
.quick-result {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 4px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 13px;
}
.quick-result:hover { color: var(--teal-dark); }
.quick-result code { color: var(--ink); font-weight: 600; }

.statistics-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 23px;
}
.statistics-grid { display: grid; gap: 18px; }
.chart-panel {
  padding: 19px 20px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.chart-large { margin-top: 17px; }
.methodology-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.methodology-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.methodology-grid article { position: relative; min-width: 0; padding: 16px 19px 18px 44px; border-right: 1px solid var(--line); }
.methodology-grid article:first-child { padding-left: 34px; }
.methodology-grid article:last-child { border-right: 0; }
.methodology-grid h3 { font-family: Georgia, "Times New Roman", serif; font-size: 17px; font-weight: 500; }
.methodology-grid p { margin: 7px 0 0; color: var(--text); font-size: 12px; line-height: 1.55; }
.method-index { position: absolute; top: 17px; left: 12px; color: var(--copper); font-size: 11px; font-weight: 700; }

.ranking-toolbar {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(160px, 0.7fr) minmax(220px, 1fr);
  align-items: end;
  gap: 14px;
  margin: 18px 0;
}
.ranking-type { display: grid; gap: 6px; }
.control-label { color: var(--muted); font-size: 12px; }
.select-look {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #cbd7d3;
  border-radius: 8px;
}
.select-look.is-selected { border-color: #9ebbb5; }
.ranking-search { min-height: 44px; }
.ranking-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, 0.34fr); gap: 28px; }
.ranking-table-section { min-width: 0; }
.results-count { margin: 12px 0 8px; color: var(--muted); font-size: 12px; }
.data-table thead { background: var(--surface); }
.data-table th, .data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.data-table th { font-size: 12px; }
.data-table th button {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.data-table th button:hover { color: var(--teal-dark); }
.data-table th button span { margin-left: 4px; color: #899693; }
.data-table td { color: var(--text); font-size: 13px; }
.data-table tr:first-child td { background: #fcf8f4; }
.rank-place { width: 42px; color: var(--copper) !important; font-weight: 700; }
.ranking-aside { border-left: 1px solid var(--line); padding-left: 21px; }
.aside-section { padding: 5px 0 19px; border-bottom: 1px solid var(--line); }
.aside-section + .aside-section { padding-top: 19px; }
.aside-section:last-child { border-bottom: 0; }
.aside-section h2 { font-size: 19px; }
.aside-section p { margin: 9px 0 0; color: var(--text); font-size: 12px; line-height: 1.6; }
.aside-section .text-link { margin-top: 11px; white-space: normal; }
.aside-locked h2 { color: var(--muted); }
.lock-icon { color: var(--copper); font-family: system-ui, sans-serif; font-size: 16px; }
.ranking-data-note { margin-top: 13px; }
.empty-state {
  margin: 16px 0;
  padding: 30px 16px;
  color: var(--muted);
  border: 1px dashed #bdcbc6;
  border-radius: var(--radius-sm);
  text-align: center;
}
.empty-state h2 { margin-top: 6px; font-size: 19px; }
.empty-state p { margin: 5px 0 0; font-size: 12px; }

.community-empty {
  display: grid;
  justify-items: center;
  max-width: 880px;
  margin: 22px auto 20px;
  padding: clamp(24px, 6vw, 72px) clamp(14px, 5vw, 60px);
  text-align: center;
}
.empty-illustration {
  display: grid;
  place-items: center;
  width: 98px;
  height: 98px;
  margin-bottom: 21px;
  color: var(--teal-dark);
  background: var(--teal-pale);
  border-radius: 50%;
}
.empty-illustration svg {
  width: 58px;
  height: 58px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.community-empty h2 { font-size: clamp(26px, 3.1vw, 39px); }
.community-empty > p { max-width: 720px; margin: 13px 0 0; color: var(--text); font-size: 17px; }
.community-empty .community-detail { margin-top: 8px; color: var(--muted); font-size: 13px; }
.community-actions { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; margin-top: 25px; }

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, auto) auto;
  align-items: end;
  gap: 14px;
  margin: 18px 0 8px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.catalog-search-field { display: grid; gap: 6px; min-width: 0; color: var(--text); font-size: 12px; font-weight: 600; }
.catalog-search-field input, .community-report-dialog select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 11px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.catalog-stat-filter { display: flex; align-items: center; gap: 9px; min-height: 42px; color: var(--text); font-size: 12px; }
.catalog-stat-filter input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--teal); }
.catalog-status { min-height: 24px; margin: 10px 2px; color: var(--muted); font-size: 12px; }
.catalog-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.catalog-error[hidden], .catalog-load-more[hidden] { display: none; }
.catalog-load-more { display: block; margin: 18px auto; }
.community-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr)); gap: 14px; align-items: stretch; }
.community-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(26, 48, 44, 0.045);
}
.community-card h2 { margin: 0; font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
.community-card h2 a { color: var(--ink); text-decoration: none; }
.community-card h2 a:hover { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }
.community-card-description { flex: 1; margin: 10px 0 14px; color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.community-card-description.is-empty { color: var(--muted); font-style: italic; }
.community-card-stats { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: auto; padding-top: 11px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
.community-card-link { align-self: flex-start; margin-top: 13px; color: var(--teal-dark); font-size: 12px; font-weight: 650; }
.community-detail-view {
  max-width: 900px;
  margin: 12px auto 24px;
  padding: clamp(20px, 4vw, 34px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 26px rgba(26, 48, 44, 0.06);
}
.community-detail-view[hidden] { display: none; }
.community-back-link { display: inline-flex; margin-bottom: 14px; color: var(--teal-dark); font-size: 12px; }
.community-detail-view h2 { font-size: clamp(24px, 3vw, 34px); overflow-wrap: anywhere; }
.community-detail-description { margin: 10px 0 18px; color: var(--text); font-size: 15px; overflow-wrap: anywhere; }
.community-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 16px 0; }
.community-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; margin: 18px 0; }
.community-stat { padding: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.community-stat dt { color: var(--muted); font-size: 11px; }
.community-stat dd { margin: 3px 0 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 600; }
.community-detail-note { color: var(--muted); font-size: 11px; }
.community-submit { margin-top: 24px; }
.community-submit code { white-space: nowrap; }
.community-report-dialog {
  width: min(520px, calc(100vw - 24px));
  max-width: 520px;
  padding: 22px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
.community-report-dialog::backdrop { background: rgba(14, 31, 29, 0.55); }
.community-report-dialog h2 { margin-bottom: 7px; font-size: 22px; }
.community-report-dialog p { color: var(--text); font-size: 13px; }
.community-report-dialog label { display: block; margin: 16px 0 6px; color: var(--text); font-size: 12px; font-weight: 650; }
.community-report-dialog .community-actions { justify-content: flex-start; gap: 10px; margin-top: 18px; }
.catalog-report-status { min-height: 20px; margin: 8px 0 0; }
.catalog-report-status.is-error { color: #9b3d36; }
.catalog-report-status.is-success { color: var(--teal-dark); }

.commands-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(235px, 0.34fr); gap: 26px; }
.commands-main { min-width: 0; }
.commands-search { margin-bottom: 14px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.filter-row button {
  min-height: 34px;
  padding: 6px 12px;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}
.filter-row button:hover { color: var(--teal-dark); border-color: #93b7b0; }
.filter-row button[aria-pressed="true"] { color: #fff; background: var(--teal); border-color: var(--teal); }
.command-table { table-layout: fixed; }
.command-table th:nth-child(1) { width: 28%; }
.command-table th:nth-child(2) { width: 39%; }
.command-table th:nth-child(3) { width: 23%; }
.command-table th:nth-child(4) { width: 10%; }
.command-table td { vertical-align: middle; }
.command-table code { color: var(--ink); font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.command-subtitle { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.access-label { color: var(--muted); font-size: 11px; }
.copy-command {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 8px;
  color: var(--teal-dark);
  background: var(--paper);
  border: 1px solid #bdd2cd;
  border-radius: 6px;
  font-size: 10px;
  cursor: pointer;
}
.copy-command:hover { background: var(--teal-pale); border-color: var(--teal); }
.copy-command svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.empty-search-icon { display: block; color: var(--teal); font-size: 27px; }
.commands-aside { border-left: 1px solid var(--line); padding-left: 21px; }
.commands-aside .aside-section { padding-top: 0; }
.commands-aside .aside-section + .aside-section { padding-top: 19px; }
.copy-status { position: fixed; right: 18px; bottom: 18px; z-index: 30; color: #fff; background: #173e3c; border-radius: 8px; padding: 9px 14px; box-shadow: var(--shadow-soft); font-size: 13px; }
.copy-status:empty { display: none; }

.connect-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.connect-bot { margin-top: 9px; font-size: 13px; }
.connect-cta { margin: 0 0 23px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 0 24px; padding: 0; list-style: none; }
.steps li { position: relative; min-width: 0; padding: 5px 22px 18px 0; }
.steps li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.step-number {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  margin-bottom: 12px;
  color: var(--copper);
  border: 1px solid #c28b65;
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}
.steps h2 { font-size: 19px; }
.steps p { margin: 6px 0 0; color: var(--text); font-size: 13px; }
.rights-section { padding: 19px 22px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.rights-section h2 { margin-bottom: 13px; font-size: 21px; }
.rights-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; padding: 0; list-style: none; }
.rights-list li { display: flex; align-items: center; gap: 10px; min-height: 40px; color: var(--text); font-size: 13px; }
.rights-list svg { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: var(--copper); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rights-note { margin: 12px 0 0; padding-top: 11px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }
.faq-section { margin-top: 25px; }
.faq-section h2 { margin-bottom: 10px; }
.faq-section details { border-top: 1px solid var(--line); }
.faq-section details:last-child { border-bottom: 1px solid var(--line); }
.faq-section summary { position: relative; padding: 14px 32px 14px 4px; color: var(--ink); font-size: 14px; font-weight: 550; cursor: pointer; list-style: none; }
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::after { content: "+"; position: absolute; right: 8px; top: 11px; color: var(--teal); font-size: 20px; font-weight: 400; }
.faq-section details[open] summary::after { content: "−"; }
.faq-section details p { max-width: 860px; margin: 0; padding: 0 30px 14px 4px; color: var(--text); font-size: 13px; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--content-gutter) 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.footer > span:first-child { color: var(--text); font-weight: 650; letter-spacing: 0.08em; }
.footer-note { text-align: right; }

.menu-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

@media (max-width: 1180px) {
  :root { --sidebar-width: 218px; --content-gutter: 28px; }
  .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(3) { padding-left: 0; }
  .overview-grid { grid-template-columns: minmax(0, 1.3fr) minmax(255px, 0.9fr); }
  .ranking-layout, .commands-layout { grid-template-columns: minmax(0, 1fr); }
  .ranking-aside, .commands-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; border-left: 0; padding-left: 0; }
  .ranking-aside .aside-section, .commands-aside .aside-section { border-bottom: 0; border-top: 1px solid var(--line); padding: 15px 0 0; }
}

@media (max-width: 880px) {
  .app-shell { display: block; }
  .mobile-topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    padding: 8px 18px;
    background: rgba(255,255,255,0.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
  }
  .brand-mobile { display: inline-flex; gap: 8px; }
  .brand-mobile img { width: 32px; height: 32px; }
  .brand-mobile > span { font-size: 13px; }
  .brand-mobile .brand-world { font-size: 8px; }
  .sidebar {
    position: fixed;
    z-index: 29;
    top: 68px;
    left: 12px;
    width: min(300px, calc(100vw - 24px));
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - 80px);
    padding: 13px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 150ms ease, transform 150ms ease;
  }
  .sidebar.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
  .brand-desktop { display: none; }
  .primary-navigation { gap: 3px; margin-top: 2px; }
  .primary-navigation a { min-height: 44px; }
  .segmented-control button,
  .filter-row button,
  .data-table th button { min-height: 44px; }
  .statistics-toolbar .button { min-height: 44px; }
  .copy-command { min-width: 44px; min-height: 44px; padding: 8px; }
  .copy-command .copy-label { display: none; }
  .text-link { min-height: 44px; padding-block: 8px; }
  .connect-bot { min-height: 44px; }
  .sidebar-bottom { margin-top: 12px; padding-top: 10px; }
  .topbar { display: none; }
  .content { padding: 29px 22px 40px; }
  .page-heading h1 { font-size: clamp(34px, 6vw, 46px); }
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .chart-section { padding-right: 0; }
  .ranking-preview { padding: 20px 0; border-top: 1px solid var(--line); border-left: 0; }
  .ranking-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ranking-search { grid-column: 1 / -1; }
  .ranking-layout, .commands-layout { gap: 18px; }
  .ranking-aside, .commands-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .catalog-toolbar { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 13px; }
  .catalog-toolbar > button { width: 100%; }
  .catalog-stat-filter { min-height: 36px; }
  .catalog-error { align-items: flex-start; flex-direction: column; }
  .community-card { padding: 17px; }
  .community-detail-view { padding: 18px 15px; }
  .community-report-dialog { padding: 18px; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .mobile-topbar { min-height: 56px; padding: 7px 14px; }
  .sidebar { top: 63px; }
  .content { padding: 23px 15px 33px; }
  .page-heading { margin-bottom: 20px; }
  .page-heading h1, .page-heading-compact h1 { font-size: 34px; }
  .page-heading p { margin-top: 9px; font-size: 15px; }
  .page-heading .button { width: 100%; margin-top: 17px; }
  .demo-notice, .info-notice { align-items: flex-start; min-height: 0; margin: 17px 0; padding: 10px 11px; font-size: 12px; }
  .metric-row { gap: 0; margin-top: 14px; }
  .metric { padding: 9px 10px 14px; border-right: 1px solid var(--line); }
  .metric:first-child, .metric:nth-child(3) { padding-left: 0; }
  .metric:nth-child(2), .metric:last-child { padding-right: 0; border-right: 0; }
  .metric:nth-child(3), .metric:nth-child(4) { border-top: 1px solid var(--line); }
  .metric-label { min-height: 0; font-size: 11px; }
  .metric-label .demo-tag { margin-left: 2px; padding: 1px 4px; font-size: 8px; }
  .metric-value { font-size: 28px; }
  .metric-detail { font-size: 10px; }
  .data-caveat { margin: 8px 0 15px; font-size: 11px; }
  .section-heading-row { align-items: flex-start; }
  .section-heading-row h2 { font-size: 20px; }
  .chart-section, .ranking-preview { padding-top: 16px; padding-bottom: 16px; }
  .chart-section .section-heading-row { flex-wrap: wrap; }
  .chart-section .segmented-control { margin-left: auto; }
  .segmented-control button { min-height: 44px; padding: 6px 10px; font-size: 12px; }
  .chart { margin-top: 12px; }
  .chart-axis-label { font-size: 20px; }
  .compact-table th { padding: 8px 5px; font-size: 9px; }
  .compact-table td { padding: 8px 5px; font-size: 10px; }
  .command-finder { padding-top: 20px; }
  .command-finder-head { flex-wrap: wrap; }
  .command-finder-head .text-link { margin-left: auto; }
  .search-field { min-height: 44px; padding: 0 10px; }
  .search-field input { font-size: 13px; }
  .search-field kbd { display: none; }
  .statistics-toolbar { align-items: flex-start; flex-direction: column; }
  .statistics-toolbar .segmented-control { max-width: 100%; }
  .statistics-toolbar .button { width: 100%; }
  .chart-panel { padding: 14px 10px 12px; }
  .chart-panel .section-heading-row { display: grid; }
  .chart-panel .section-heading-row h2 { font-size: 19px; }
  .chart-large { margin-top: 13px; }
  .methodology-grid { grid-template-columns: minmax(0,1fr); }
  .methodology-grid article, .methodology-grid article:first-child { padding: 13px 12px 15px 36px; border-right: 0; border-bottom: 1px solid var(--line); }
  .methodology-grid article:last-child { border-bottom: 0; }
  .method-index { top: 15px; left: 12px; }
  .ranking-toolbar { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .ranking-search { grid-column: auto; }
  .ranking-layout { grid-template-columns: minmax(0,1fr); }
  .ranking-aside, .commands-aside { grid-template-columns: minmax(0,1fr); gap: 0; }
  .ranking-aside .aside-section, .commands-aside .aside-section { padding: 13px 0; }
  .ranking-table thead { position: static; display: block; width: auto; height: auto; padding: 0; margin: 0 0 8px; overflow: visible; clip: auto; white-space: normal; border: 0; background: transparent; }
  .ranking-table thead tr { display: flex; flex-wrap: wrap; gap: 6px; }
  .ranking-table thead th { display: block; flex: 1 1 auto; width: auto; padding: 0; border: 0; background: transparent; }
  .ranking-table thead th button { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 7px 8px; color: var(--teal-dark); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; white-space: nowrap; }
  .ranking-table tbody tr { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 0 8px; padding: 8px 1px; border-bottom: 1px solid var(--line); }
  .ranking-table td { padding: 3px 0; border: 0; font-size: 12px; }
  .ranking-table td:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
  .ranking-table td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .ranking-table td:nth-child(3) { grid-column: 3; grid-row: 1; text-align: right; }
  .ranking-table td:nth-child(4) { grid-column: 2 / 4; grid-row: 2; text-align: left; }
  .ranking-table td:nth-child(4)::before { content: "Раунды · "; color: var(--muted); }
  .data-table th, .data-table td { padding: 9px 7px; }
  .command-table { table-layout: auto; }
  .command-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .command-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; padding: 11px 0; border-bottom: 1px solid var(--line); }
  .command-table tbody td { min-width: 0; padding: 0; border: 0; font-size: 12px; }
  .command-table tbody td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .command-table tbody td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: var(--text); font-size: 11px; }
  .command-table tbody td:nth-child(3) { grid-column: 1; grid-row: 3; }
  .command-table tbody td:nth-child(4) { grid-column: 2; grid-row: 1; }
  .command-table code { font-size: 11px; }
  .copy-command { min-width: 44px; min-height: 44px; padding: 8px; }
  .copy-command .copy-label { display: none; }
  .filter-row { gap: 6px; }
  .filter-row button { min-height: 44px; padding: 7px 10px; font-size: 11px; }
  .community-empty { margin: 4px auto 0; padding: 29px 5px; }
  .community-empty h2 { font-size: 27px; }
  .community-empty > p { font-size: 15px; }
  .community-actions { gap: 15px; }
  .community-actions .button { width: 100%; }
  .connect-heading { display: grid; }
  .connect-bot { margin-top: 0; }
  .connect-cta { width: 100%; }
  .steps { grid-template-columns: minmax(0,1fr); }
  .steps li, .steps li + li { padding: 12px 0 15px; border-left: 0; border-bottom: 1px solid var(--line); }
  .steps li:last-child { border-bottom: 0; }
  .step-number { float: left; width: 30px; height: 30px; margin: 0 10px 4px 0; font-size: 16px; }
  .steps h2 { padding-top: 3px; font-size: 17px; }
  .steps p { margin-left: 40px; }
  .rights-section { padding: 15px 12px 12px; }
  .rights-section h2 { font-size: 20px; }
  .rights-list { grid-template-columns: minmax(0,1fr); }
  .rights-list li { min-height: 37px; font-size: 12px; }
  .footer { flex-direction: column; padding: 13px 15px 18px; font-size: 10px; }
  .footer-note { text-align: left; }
}

@media (max-width: 360px) {
  .content { padding-right: 12px; padding-left: 12px; }
  .mobile-topbar { padding-right: 12px; padding-left: 12px; }
  .brand-mobile { gap: 6px; }
  .brand-mobile > span { font-size: 12px; letter-spacing: 0.1em; }
  .brand-mobile img { width: 29px; height: 29px; }
  .page-heading h1, .page-heading-compact h1 { font-size: 31px; }
  .metric { padding-right: 7px; padding-left: 7px; }
  .metric:first-child, .metric:nth-child(3) { padding-left: 0; }
  .metric-value { font-size: 25px; }
  .chart-section .section-heading-row h2 { font-size: 18px; }
  .ranking-preview .section-heading-row { align-items: center; }
  .ranking-preview .text-link { font-size: 10px; }
  .data-table td { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

[hidden] { display: none !important; }
.account-grid, .account-dashboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.account-card {
  min-width: 0;
  padding: 23px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(29, 47, 62, .045);
}
.account-card h2 { margin: 0 0 12px; font-family: var(--serif); font-size: 23px; font-weight: 500; letter-spacing: -.025em; }
.account-card > p { margin: 0 0 15px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.account-form { display: grid; gap: 13px; }
.account-form label:not(.check-row) { display: grid; gap: 6px; color: var(--ink); font-size: 12px; font-weight: 650; }
.account-form input:not([type="checkbox"]) {
  width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: #fff;
  border: 1px solid #cbd5d7; border-radius: 8px; font: inherit; font-weight: 450;
}
.account-form input:focus-visible { outline: 3px solid rgba(54, 132, 126, .22); border-color: var(--teal); }
.account-form .button { justify-self: start; }
.account-details { margin-top: 15px; color: var(--teal-dark); font-size: 13px; }
.account-details summary { cursor: pointer; }
.account-details .account-form { margin-top: 12px; }
.small-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.account-token-form { max-width: 560px; margin-top: 18px; }
.account-overview-card { display: flex; align-items: center; justify-content: space-between; gap: 15px; grid-column: 1 / -1; }
.account-overview-card h2 { margin: 4px 0 0; overflow-wrap: anywhere; }
.control-label { color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.account-state { padding: 7px 10px; color: #285e59; background: var(--teal-pale); border-radius: 999px; font-size: 11px; text-align: center; }
.privacy-options { gap: 14px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); font-size: 13px; line-height: 1.55; }
.check-row input { width: 17px; height: 17px; flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--teal); }
.session-list { display: grid; gap: 10px; margin: 15px 0 0; padding: 0; list-style: none; }
.session-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.session-item > div { display: grid; gap: 4px; min-width: 0; }
.session-item strong { font-size: 13px; font-weight: 650; }
.session-item span, .session-empty { color: var(--muted); font-size: 11px; line-height: 1.45; }
.text-button { border: 0; padding: 7px; background: transparent; color: var(--teal-dark); font: inherit; font-size: 12px; cursor: pointer; }
.text-button:hover { text-decoration: underline; }
.account-danger-zone { grid-column: 1 / -1; border-color: #ead8d2; }
.personal-activity { grid-column: 1 / -1; }
.personal-activity-note { margin: 12px 0 !important; }
.personal-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.personal-metrics > div { display: grid; gap: 5px; min-width: 0; padding: 13px; background: #f5f8f7; border: 1px solid #e5ece9; border-radius: 10px; }
.personal-metrics span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.personal-metrics strong { color: var(--ink); font-family: var(--serif); font-size: 25px; font-weight: 500; }
.account-delete-form { margin-top: 16px; }
.button-danger { color: #fff; background: #8b3d35; border-color: #8b3d35; }
.button-danger:hover { background: #713128; border-color: #713128; }
button:disabled { opacity: .58; cursor: wait; }

@media (max-width: 700px) {
  .account-grid, .account-dashboard { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .account-overview-card, .account-danger-zone, .personal-activity { grid-column: auto; }
  .account-card { padding: 18px; border-radius: 13px; }
  .account-card h2 { font-size: 21px; }
  .account-overview-card { align-items: flex-start; flex-direction: column; }
  .account-state { max-width: 100%; text-align: left; }
  .account-form .button { width: 100%; justify-content: center; }
  .session-item { align-items: flex-start; }
  .personal-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
