:root {
  color-scheme: dark;
  --page: #050a08;
  --page-soft: #08120e;
  --panel: #0b1712;
  --panel-raised: #102019;
  --panel-muted: #0a1410;
  --text: #f2f7f4;
  --text-soft: #c2cec7;
  --muted: #82958a;
  --line: rgba(226, 242, 232, 0.12);
  --line-strong: rgba(226, 242, 232, 0.22);
  --lime: #c7f36b;
  --lime-strong: #a9e144;
  --cyan: #72ddcd;
  --gold: #f0c56b;
  --danger: #ff8d83;
  --danger-soft: rgba(255, 107, 95, 0.12);
  --warning: #f3bd68;
  --success: #75ddb0;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--page);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% -4%, rgba(199, 243, 107, 0.12), transparent 29rem),
    radial-gradient(circle at 92% 26%, rgba(114, 221, 205, 0.09), transparent 31rem),
    linear-gradient(180deg, #07100c 0, var(--page) 32rem);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(199, 243, 107, 0.3);
  color: #fff;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--lime);
  color: #102006;
  font-weight: 850;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  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;
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 10, 8, 0.84);
  backdrop-filter: blur(18px) saturate(140%);
}

.header-inner {
  width: min(var(--content), calc(100% - 36px));
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(199, 243, 107, 0.32);
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(199, 243, 107, 0.2), rgba(114, 221, 205, 0.05)),
    var(--panel);
  color: var(--lime);
  box-shadow: inset 0 0 20px rgba(199, 243, 107, 0.08);
  font-size: 19px;
  font-weight: 950;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.service-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.service-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(243, 189, 104, 0.09);
}

.service-indicator.is-online .service-dot {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(117, 221, 176, 0.1), 0 0 14px rgba(117, 221, 176, 0.4);
}

.service-indicator.is-offline .service-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 141, 131, 0.1);
}

.collector-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid rgba(199, 243, 107, 0.25);
  border-radius: 12px;
  background: rgba(199, 243, 107, 0.08);
  color: var(--lime);
  font-size: 12px;
  font-weight: 820;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.collector-link:hover {
  border-color: rgba(199, 243, 107, 0.5);
  background: rgba(199, 243, 107, 0.13);
  transform: translateY(-1px);
}

#collector-version {
  color: var(--muted);
  font-size: 10px;
}

main {
  width: min(var(--content), calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  align-items: end;
  gap: clamp(38px, 7vw, 96px);
  padding: clamp(68px, 9vw, 118px) 0 clamp(48px, 7vw, 76px);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(39px, 6.6vw, 78px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero h1 span {
  color: var(--text-soft);
}

.hero-lead {
  max-width: 670px;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.65;
}

.stats {
  display: grid;
  gap: 10px;
  margin: 0;
}

.stat-card {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(11, 23, 18, 0.76);
}

.stat-card dt {
  max-width: 150px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.35;
}

.stat-card dd {
  margin: 0;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-size: clamp(23px, 3vw, 34px);
  font-weight: 920;
  letter-spacing: -0.04em;
}

.stats[aria-busy="true"] .stat-card dd {
  color: transparent;
}

.stats[aria-busy="true"] .stat-card dd::after {
  width: 62px;
  height: 20px;
  display: block;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
  background-size: 220% 100%;
  content: "";
  animation: shimmer 1.35s linear infinite;
}

@keyframes shimmer {
  to { background-position: -220% 0; }
}

.content-card {
  min-height: 620px;
  margin-bottom: 64px;
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(16, 32, 25, 0.86), rgba(8, 18, 14, 0.96)),
    var(--panel);
  box-shadow: var(--shadow);
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 10, 7, 0.38);
}

.tab-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 820;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.tab-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.tab-button[aria-selected="true"] {
  border-color: rgba(199, 243, 107, 0.18);
  background: rgba(199, 243, 107, 0.1);
  color: var(--lime);
}

.tab-count {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-soft);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.tab-count:empty {
  display: none;
}

.tab-panel {
  padding: clamp(22px, 4vw, 42px);
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(130px, 0.8fr)) auto;
  align-items: end;
  gap: 12px;
  padding-bottom: clamp(28px, 5vw, 46px);
  border-bottom: 1px solid var(--line);
}

.filter-field {
  min-width: 0;
}

.filter-field label {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.filter-field input,
.filter-field select {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: rgba(3, 9, 6, 0.62);
  color: var(--text);
  font-size: 13px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.filter-field input::placeholder {
  color: #607269;
}

.filter-field input:hover,
.filter-field select:hover {
  border-color: var(--line-strong);
}

.filter-field input:focus,
.filter-field select:focus {
  border-color: rgba(199, 243, 107, 0.55);
  background: rgba(5, 13, 9, 0.9);
  box-shadow: 0 0 0 4px rgba(199, 243, 107, 0.08);
}

.filter-field select {
  color-scheme: dark;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.primary-button,
.quiet-button,
.load-more-button,
.rule-filter-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 820;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.primary-button {
  border: 1px solid var(--lime);
  background: linear-gradient(135deg, var(--lime), var(--lime-strong));
  color: #112006;
  box-shadow: 0 10px 25px rgba(169, 225, 68, 0.12);
}

.quiet-button,
.load-more-button,
.rule-filter-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
}

.primary-button:hover,
.quiet-button:hover,
.load-more-button:hover,
.rule-filter-button:hover {
  transform: translateY(-1px);
}

.quiet-button:hover,
.load-more-button:hover,
.rule-filter-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
}

button:disabled {
  cursor: wait;
  opacity: 0.56;
  transform: none !important;
}

.results-heading,
.rules-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(28px, 5vw, 44px) 0 20px;
}

.results-heading h2,
.rules-toolbar h2 {
  margin: 0;
  font-size: clamp(25px, 3.5vw, 38px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-kicker {
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 10px;
}

.results-summary,
.rules-version {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.results-summary {
  text-align: right;
}

.view-state {
  min-height: 270px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 40px 20px;
  text-align: center;
}

.state-icon {
  width: 44px;
  height: 44px;
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.view-state[data-kind="loading"] .state-icon::before {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(199, 243, 107, 0.18);
  border-top-color: var(--lime);
  border-radius: 50%;
  content: "";
  animation: spin 0.8s linear infinite;
}

.view-state[data-kind="empty"] .state-icon::before {
  content: "—";
  font-size: 21px;
  font-weight: 850;
}

.view-state[data-kind="error"] .state-icon {
  border-color: rgba(255, 141, 131, 0.28);
  background: var(--danger-soft);
  color: var(--danger);
}

.view-state[data-kind="error"] .state-icon::before {
  content: "!";
  font-size: 20px;
  font-weight: 900;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.state-title {
  margin: 0;
  font-size: 19px;
}

.state-message {
  max-width: 460px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.state-retry {
  margin-top: 18px;
}

.punishment-list,
.rules-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.punishment-card {
  position: relative;
  padding: clamp(18px, 3vw, 26px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(7, 16, 12, 0.72);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.punishment-card::before {
  width: 3px;
  position: absolute;
  inset: 14px auto 14px 0;
  border-radius: 0 4px 4px 0;
  background: var(--warning);
  content: "";
}

.punishment-card.is-revoke::before {
  background: var(--success);
}

.punishment-card:hover {
  border-color: var(--line-strong);
  background: rgba(10, 22, 16, 0.88);
  transform: translateY(-1px);
}

.event-topline,
.event-footer,
.event-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.event-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 820;
  line-height: 1;
}

.badge-action {
  border-color: rgba(243, 189, 104, 0.23);
  background: rgba(243, 189, 104, 0.08);
  color: #f6cc86;
}

.is-revoke .badge-action {
  border-color: rgba(117, 221, 176, 0.25);
  background: rgba(117, 221, 176, 0.08);
  color: var(--success);
}

.badge-status.is-confirmed {
  border-color: rgba(114, 221, 205, 0.25);
  color: var(--cyan);
}

.badge-wipe {
  border-color: rgba(199, 243, 107, 0.26);
  color: var(--lime);
}

.event-time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.event-title-row {
  align-items: baseline;
  justify-content: flex-start;
  margin-top: 17px;
}

.event-title {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(20px, 2.8vw, 27px);
  font-weight: 880;
  letter-spacing: -0.025em;
}

.event-reason {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.event-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}

.meta-item {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.meta-label {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meta-value {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 680;
}

.event-footer {
  justify-content: flex-start;
  margin-top: 16px;
}

.rule-filter-button {
  min-height: 34px;
  padding: 0 11px;
  color: var(--cyan);
  font-size: 11px;
}

.load-more-wrap {
  display: grid;
  place-items: center;
  padding-top: 26px;
}

.load-more-button {
  min-width: 190px;
}

.load-more-button.is-loading span::after {
  display: inline-block;
  margin-left: 8px;
  content: "…";
}

.rules-toolbar {
  align-items: end;
  padding-top: 4px;
}

.rules-toolbar > div:first-child {
  min-width: 0;
}

.rules-version {
  margin-top: 8px;
}

.rules-search {
  width: min(360px, 100%);
  flex: 0 0 auto;
}

.rules-summary {
  margin-bottom: 20px;
  text-align: left;
}

.rule-card {
  display: grid;
  grid-template-columns: minmax(74px, auto) minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;
  padding: clamp(18px, 3vw, 25px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(7, 16, 12, 0.72);
}

.rule-number {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border: 1px solid rgba(199, 243, 107, 0.24);
  border-radius: 10px;
  background: rgba(199, 243, 107, 0.07);
  color: var(--lime);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.rule-copy {
  min-width: 0;
}

.rule-category {
  margin: 0 0 5px;
  color: var(--cyan);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.rule-title {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
}

.rule-description {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.rule-sanction {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 2px solid var(--warning);
  background: rgba(243, 189, 104, 0.06);
  color: #e8c996;
  font-size: 12px;
  line-height: 1.5;
}

.rule-card .rule-filter-button {
  align-self: center;
  white-space: nowrap;
}

.site-footer {
  width: min(var(--content), calc(100% - 36px));
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 25px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.site-footer p {
  margin: 0;
}

.site-footer strong {
  color: var(--text-soft);
}

.noscript-message {
  position: fixed;
  z-index: 100;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 141, 131, 0.3);
  border-radius: 12px;
  background: #281310;
  color: #ffd5d0;
  text-align: center;
}

@media (max-width: 1080px) {
  .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-field-wide {
    grid-column: span 2;
  }

  .filter-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 62px;
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-card {
    min-height: 116px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .event-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rule-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .rule-card .rule-filter-button {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 660px) {
  .header-inner,
  main,
  .site-footer {
    width: min(100% - 24px, var(--content));
  }

  .header-inner {
    min-height: 66px;
  }

  .brand-copy small,
  .service-indicator {
    display: none;
  }

  .collector-link {
    min-height: 38px;
    padding: 0 11px;
    font-size: 11px;
  }

  .hero {
    min-height: 0;
    padding: 50px 0 40px;
  }

  .hero h1 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .hero-lead {
    font-size: 15px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 76px;
    align-items: center;
    flex-direction: row;
  }

  .content-card {
    margin-right: -4px;
    margin-bottom: 34px;
    margin-left: -4px;
    border-radius: 20px;
  }

  .tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tab-button {
    padding: 0 12px;
  }

  .tab-panel {
    padding: 18px;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .filter-field-wide {
    grid-column: auto;
  }

  .filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }

  .results-heading,
  .rules-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .results-summary {
    text-align: left;
  }

  .rules-search {
    width: 100%;
  }

  .event-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .event-time {
    white-space: normal;
  }

  .event-meta {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .rule-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .rule-number {
    justify-self: start;
  }

  .rule-card .rule-filter-button {
    grid-column: auto;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .service-dot,
  .punishment-card::before {
    forced-color-adjust: none;
  }

  .tab-button[aria-selected="true"],
  .primary-button {
    border: 2px solid ButtonText;
  }
}
