:root {
  --bg: #f4f7fb;
  --bg-elevated: #ffffff;
  --bg-subtle: #eef3f8;
  --bg-strong: #e7edf5;
  --text: #101828;
  --text-secondary: #475467;
  --text-muted: #667085;
  --line: #dce3ec;
  --line-strong: #cbd5e1;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #e8f0ff;
  --telegram: #229ed9;
  --green: #11875d;
  --green-soft: #e4f5ee;
  --blue: #2563eb;
  --blue-soft: #e8f0ff;
  --amber: #b8690b;
  --amber-soft: #fff2d9;
  --red: #c63b4a;
  --red-soft: #fdebed;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 6px 18px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 18px 50px rgba(16, 24, 40, 0.1);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --header-height: 72px;
}

html[data-theme="dark"] {
  --bg: #0b111b;
  --bg-elevated: #111a27;
  --bg-subtle: #162130;
  --bg-strong: #1c2939;
  --text: #f3f6fa;
  --text-secondary: #b6c1d1;
  --text-muted: #8e9caf;
  --line: #263446;
  --line-strong: #34445a;
  --accent: #6b9cff;
  --accent-hover: #8cb2ff;
  --accent-soft: #172a50;
  --telegram: #41b4e6;
  --green: #42c795;
  --green-soft: #12372e;
  --blue: #78a7ff;
  --blue-soft: #172a50;
  --amber: #efb85f;
  --amber-soft: #3d2d16;
  --red: #f47b87;
  --red-soft: #451f29;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.16), 0 8px 22px rgba(0, 0, 0, 0.14);
  --shadow-md: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 0%, color-mix(in srgb, var(--accent) 7%, transparent) 0, transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.telegram-logo {
  fill: currentColor;
  stroke: none;
}

.site-container {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

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

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  height: var(--header-height);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 36px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

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

.brand-copy small {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.nav-list {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 26px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 160ms ease;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(0.5);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
}

.nav-link.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-count {
  min-width: 24px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-strong);
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.telegram-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--telegram) 35%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--telegram) 10%, var(--bg-elevated));
  color: var(--telegram);
  font-size: 13px;
  font-weight: 700;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.telegram-link:hover {
  border-color: color-mix(in srgb, var(--telegram) 60%, var(--line));
  background: color-mix(in srgb, var(--telegram) 15%, var(--bg-elevated));
  transform: translateY(-1px);
}

.telegram-link svg {
  width: 18px;
  height: 18px;
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.icon-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--bg-subtle);
  color: var(--text);
  transform: translateY(-1px);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.theme-button .theme-sun,
html[data-theme="dark"] .theme-button .theme-moon {
  display: none;
}

html[data-theme="dark"] .theme-button .theme-sun {
  display: block;
}

.section {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.hero-section {
  position: relative;
  overflow: hidden;
  padding: 94px 0 88px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.hero-section::before {
  position: absolute;
  top: -340px;
  left: 55%;
  width: 720px;
  height: 720px;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 50%;
  box-shadow:
    0 0 0 90px color-mix(in srgb, var(--accent) 3%, transparent),
    0 0 0 180px color-mix(in srgb, var(--accent) 2%, transparent);
  content: "";
  pointer-events: none;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(410px, 0.9fr);
  gap: 80px;
}

.service-state {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elevated) 75%, transparent);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.pulse-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}

.pulse-dot.is-online {
  background: var(--green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 14%, transparent);
}

.service-state-separator {
  width: 1px;
  height: 12px;
  margin: 0 2px;
  background: var(--line-strong);
}

.hero-copy h1 {
  max-width: 700px;
  margin: 23px 0 22px;
  font-size: clamp(44px, 5.4vw, 72px);
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero-copy > p {
  max-width: 620px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button svg {
  width: 18px;
  height: 18px;
}

.button-large {
  min-height: 50px;
  padding: 0 21px;
  border-radius: 12px;
  font-size: 14px;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 9px 24px color-mix(in srgb, var(--accent) 22%, transparent);
}

.button-primary:hover:not(:disabled) {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.button-secondary {
  border-color: var(--line);
  background: var(--bg-elevated);
  color: var(--text);
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--bg-subtle);
}

.button-ghost {
  background: transparent;
  color: var(--text-muted);
}

.button-ghost:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--text);
}

.hero-assurances {
  display: flex;
  flex-wrap: wrap;
  margin: 26px 0 0;
  padding: 0;
  gap: 9px 19px;
  color: var(--text-muted);
  font-size: 12px;
  list-style: none;
}

.hero-assurances li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-assurances svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

.surface-card {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 96%, transparent);
  box-shadow: var(--shadow-sm);
}

.network-summary {
  padding: 30px;
  border-radius: var(--radius-lg);
}

.network-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.network-summary-head > div:first-child {
  display: grid;
  gap: 6px;
}

.network-summary-head span,
.network-summary > p {
  color: var(--text-muted);
}

.network-summary-head > div:first-child > span {
  font-size: 13px;
  font-weight: 600;
}

.network-summary-head > div:first-child > strong {
  font-size: 18px;
  font-weight: 650;
}

.network-summary-head > div:first-child b {
  margin-right: 4px;
  font-size: 38px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.availability-ring {
  display: grid;
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  padding: 7px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--availability), var(--bg-strong) 0);
}

.availability-ring > div {
  display: grid;
  width: 100%;
  height: 100%;
  place-content: center;
  border-radius: 50%;
  background: var(--bg-elevated);
  text-align: center;
}

.availability-ring strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.availability-ring span {
  font-size: 10px;
}

.network-summary > p {
  min-height: 42px;
  margin: 21px 0 17px;
  font-size: 13px;
}

.distribution {
  display: flex;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-strong);
}

.distribution span {
  width: 0;
  min-width: 0;
  transition: width 350ms ease;
}

.distribution-up {
  background: var(--green);
}

.distribution-new {
  background: var(--blue);
}

.distribution-degraded {
  background: var(--amber);
}

.distribution-down {
  background: var(--red);
}

.distribution-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 15px;
  gap: 8px 20px;
  color: var(--text-secondary);
  font-size: 11px;
}

.distribution-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.distribution-legend b {
  margin-left: auto;
  color: var(--text);
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.summary-latency {
  display: flex;
  align-items: center;
  margin-top: 24px;
  padding-top: 22px;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.summary-latency-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
}

.summary-latency > div {
  display: grid;
  gap: 1px;
}

.summary-latency > div > span,
.summary-latency small {
  color: var(--text-muted);
  font-size: 11px;
}

.summary-latency strong {
  font-size: 14px;
}

.summary-latency strong b {
  font-size: 20px;
}

.summary-latency small {
  margin-left: auto;
}

.recommendations-section,
.proxies-section {
  padding: 96px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 40px;
}

.section-label {
  display: block;
  margin-bottom: 9px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(30px, 3vw, 42px);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.section-header p {
  max-width: 700px;
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.section-status {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--line));
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.section-status svg {
  width: 16px;
  height: 16px;
}

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.recommendation-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.recommendation-card:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.recommendation-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.recommendation-rank {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.recommendation-card:first-child .recommendation-rank {
  background: var(--amber-soft);
  color: var(--amber);
}

.recommendation-score {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.recommendation-score strong {
  font-size: 19px;
}

.recommendation-score small {
  color: var(--text-muted);
  font-size: 10px;
}

.recommendation-endpoint {
  padding: 21px 20px 17px;
}

.recommendation-endpoint h3 {
  overflow: hidden;
  margin: 0 0 5px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommendation-endpoint span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.recommendation-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.recommendation-metric {
  display: grid;
  grid-template-columns: 19px 1fr;
  padding: 12px;
  gap: 1px 8px;
}

.recommendation-metric:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.recommendation-metric:nth-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}

.recommendation-metric svg {
  width: 16px;
  height: 16px;
  grid-row: 1 / 3;
  color: var(--text-muted);
}

.recommendation-metric span {
  color: var(--text-muted);
  font-size: 10px;
}

.recommendation-metric strong {
  font-size: 13px;
}

.recommendation-metric strong small {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 600;
}

.recommendation-details {
  display: grid;
  margin: 18px 20px 0;
  gap: 8px;
}

.recommendation-details div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
}

.recommendation-details dt {
  color: var(--text-muted);
}

.recommendation-details dd {
  margin: 0;
  color: var(--text-secondary);
  font-weight: 650;
  text-align: right;
}

.recommendation-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 65px;
  margin-top: 18px;
  padding: 13px 20px;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-subtle) 70%, transparent);
}

.recommendation-footer > span {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommendation-footer > span svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--green);
}

.recommendation-footer > div {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.recommendation-footer .icon-button {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.recommendation-footer .connect-action {
  display: inline-flex;
  width: auto;
  padding: 0 11px;
  gap: 6px;
  border-color: color-mix(in srgb, var(--telegram) 35%, var(--line));
  background: color-mix(in srgb, var(--telegram) 10%, var(--bg-elevated));
  color: var(--telegram);
  font-size: 11px;
  font-weight: 750;
}

.recommendation-state {
  display: flex;
  align-items: center;
  min-height: 150px;
  grid-column: 1 / -1;
  justify-content: center;
  padding: 30px;
  gap: 16px;
  border-radius: var(--radius);
  color: var(--text-secondary);
}

.recommendation-state > svg {
  width: 28px;
  height: 28px;
  color: var(--green);
}

.recommendation-state.is-error > svg {
  color: var(--red);
}

.recommendation-state div {
  display: grid;
  gap: 3px;
}

.recommendation-state strong {
  color: var(--text);
}

.recommendation-state span {
  color: var(--text-muted);
  font-size: 13px;
}

.spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

.metrics-section {
  padding: 0 0 96px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 120px;
  padding: 20px;
  gap: 14px;
  border-radius: var(--radius);
}

.metric-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
}

.metric-icon svg {
  width: 20px;
  height: 20px;
}

.metric-green {
  background: var(--green-soft);
  color: var(--green);
}

.metric-blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.metric-amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.metric-red {
  background: var(--red-soft);
  color: var(--red);
}

.metric-card > div:last-child {
  display: grid;
  min-width: 0;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  flex: 1;
  gap: 1px 8px;
}

.metric-card span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
}

.metric-card strong {
  grid-row: 1 / 3;
  grid-column: 2;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.metric-card small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.methodology-section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 45%, transparent);
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
}

.method-card {
  position: relative;
  min-height: 260px;
  padding: 30px;
  background: var(--bg-elevated);
}

.method-number {
  position: absolute;
  top: 28px;
  right: 28px;
  color: var(--line-strong);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 750;
}

.method-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 44px;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.method-card h3 {
  margin: 0 0 9px;
  font-size: 18px;
}

.method-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

.proxies-header {
  align-items: flex-end;
}

.refresh-area {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
}

.last-updated {
  color: var(--text-muted);
  font-size: 11px;
}

.table-card {
  overflow: hidden;
  border-radius: var(--radius);
}

.table-toolbar {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.search-box {
  display: flex;
  align-items: center;
  width: min(320px, 100%);
  height: 40px;
  padding: 0 11px;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-subtle);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent);
}

.search-box svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box kbd {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 9px;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
}

.filter-tab {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease;
}

.filter-tab:hover,
.filter-tab.is-active {
  background: var(--bg-strong);
  color: var(--text);
}

.result-count {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
}

.proxy-table {
  width: 100%;
  border-collapse: collapse;
}

.proxy-table th,
.proxy-table td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.proxy-table th {
  background: color-mix(in srgb, var(--bg-subtle) 75%, transparent);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.proxy-table tbody tr {
  cursor: pointer;
  transition: background 140ms ease;
}

.proxy-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 4%, var(--bg-elevated));
}

.proxy-table tbody tr:last-child td {
  border-bottom: 0;
}

.endpoint-cell {
  display: grid;
  max-width: 300px;
  gap: 3px;
}

.endpoint-cell strong {
  overflow: hidden;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.endpoint-cell small {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.status-up {
  border-color: color-mix(in srgb, var(--green) 25%, transparent);
  background: var(--green-soft);
  color: var(--green);
}

.status-new,
.status-unknown {
  border-color: color-mix(in srgb, var(--blue) 25%, transparent);
  background: var(--blue-soft);
  color: var(--blue);
}

.status-degraded {
  border-color: color-mix(in srgb, var(--amber) 25%, transparent);
  background: var(--amber-soft);
  color: var(--amber);
}

.status-down {
  border-color: color-mix(in srgb, var(--red) 25%, transparent);
  background: var(--red-soft);
  color: var(--red);
}

.latency-cell {
  white-space: nowrap;
}

.latency-cell strong {
  font-size: 12px;
}

.latency-cell small,
.time-cell {
  color: var(--text-muted);
  font-size: 10px;
}

.stability-cell {
  display: grid;
  min-width: 112px;
  gap: 2px;
}

.stability-cell strong {
  color: var(--text);
  font-size: 12px;
}

.stability-cell small {
  color: var(--text-muted);
  font-size: 9px;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.row-actions .icon-button {
  width: 33px;
  height: 33px;
  border-radius: 8px;
}

.connect-action {
  color: var(--telegram);
}

.connect-action .telegram-logo {
  width: 17px;
  height: 17px;
}

.loading-row td,
.empty-row td,
.empty-row {
  padding: 36px !important;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center !important;
}

.loading-row td {
  cursor: default;
}

.loading-row .spinner {
  width: 17px;
  height: 17px;
  margin-right: 7px;
  vertical-align: middle;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 16px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 10px;
}

.pagination-bar > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-bar .icon-button {
  width: 34px;
  height: 34px;
}

.page-indicator {
  min-width: 54px;
  color: var(--text-secondary);
  text-align: center;
}

.admin-section {
  padding: 0 0 88px;
}

.admin-disclosure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.admin-disclosure > summary {
  display: flex;
  align-items: center;
  min-height: 82px;
  padding: 16px 20px;
  gap: 13px;
  cursor: pointer;
  list-style: none;
}

.admin-disclosure > summary::-webkit-details-marker {
  display: none;
}

.admin-summary-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.admin-disclosure summary > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.admin-disclosure summary strong {
  font-size: 14px;
}

.admin-disclosure summary small {
  color: var(--text-muted);
  font-size: 11px;
}

.summary-chevron {
  margin-left: auto;
  color: var(--text-muted);
  transition: transform 180ms ease;
}

.admin-disclosure[open] .summary-chevron {
  transform: rotate(90deg);
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-subtle);
}

.admin-toolbar p {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
}

.admin-toolbar > div {
  display: flex;
  gap: 8px;
}

.token-state {
  margin-left: 3px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
}

.has-token .token-state {
  color: var(--green);
}

.operations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 20px;
  gap: 16px;
}

.operation-card {
  min-width: 0;
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: none;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.card-heading h2 {
  margin: 0;
  font-size: 20px;
}

.telegram-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.telegram-title .section-label,
.card-heading .section-label {
  margin-bottom: 4px;
}

.telegram-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--telegram) 12%, var(--bg-subtle));
  color: var(--telegram);
}

.telegram-state-panel {
  display: flex;
  align-items: center;
  min-height: 76px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-subtle);
}

.telegram-state-panel > div {
  display: grid;
  gap: 3px;
}

.telegram-state-panel span {
  color: var(--text-muted);
  font-size: 10px;
}

.telegram-state-panel strong {
  font-size: 13px;
}

.telegram-orbit {
  position: relative;
  width: 32px;
  height: 32px;
  margin-left: auto;
  border: 1px solid color-mix(in srgb, var(--telegram) 35%, var(--line));
  border-radius: 50%;
}

.telegram-orbit i {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--telegram);
}

.telegram-action {
  min-height: 78px;
  padding: 17px 0;
}

.telegram-action p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 12px;
}

.inline-auth-form {
  display: flex;
  gap: 8px;
}

.inline-auth-form input {
  flex: 1;
}

.info-row {
  display: flex;
  align-items: flex-start;
  padding-top: 16px;
  gap: 9px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 10px;
}

.info-row svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.95em;
}

.ingest-form {
  display: grid;
  margin-top: 22px;
  gap: 15px;
}

.ingest-form label,
.dialog-card > label {
  display: grid;
  gap: 7px;
}

.ingest-form label > span,
.dialog-card > label > span {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--bg-subtle);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 132px;
  padding: 11px 12px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent);
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-footer small {
  color: var(--text-muted);
  font-size: 9px;
}

.footer {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 55%, transparent);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 1.2fr) 1fr;
  align-items: center;
  min-height: 130px;
  gap: 30px;
}

.footer-brand .brand-mark {
  width: 36px;
  height: 36px;
}

.footer-inner > p {
  margin: 0;
  color: var(--text-muted);
  font-size: 10px;
  text-align: center;
}

.footer-telegram {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 7px;
  color: var(--telegram);
  font-size: 12px;
  font-weight: 700;
}

.footer-telegram svg {
  width: 17px;
  height: 17px;
}

.drawer-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  background: rgba(5, 10, 18, 0.54);
  backdrop-filter: blur(4px);
}

.details-drawer {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  width: min(520px, 100vw);
  height: 100dvh;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.2);
  transform: translateX(102%);
  transition: transform 220ms ease;
}

.details-drawer.is-open {
  transform: translateX(0);
}

.drawer-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 16px 22px;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 90%, transparent);
  backdrop-filter: blur(14px);
}

.drawer-header .section-label {
  margin-bottom: 4px;
}

.drawer-header h2 {
  max-width: 380px;
  overflow: hidden;
  margin: 0;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-content {
  padding: 22px;
}

.drawer-endpoint {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.drawer-endpoint h3 {
  overflow-wrap: anywhere;
  margin: 0;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 16px;
}

.drawer-endpoint p {
  overflow-wrap: anywhere;
  margin: 7px 0 18px;
  color: var(--text-muted);
  font-size: 9px;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail-grid > div {
  display: grid;
  min-height: 82px;
  padding: 15px;
  align-content: center;
  gap: 5px;
  border-bottom: 1px solid var(--line);
}

.detail-grid > div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.detail-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.detail-grid span {
  color: var(--text-muted);
  font-size: 9px;
}

.detail-grid strong {
  font-size: 12px;
}

.history-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 28px 0 12px;
}

.history-title h3 {
  margin: 0;
  font-size: 15px;
}

.history-title span {
  color: var(--text-muted);
  font-size: 9px;
}

.history-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.history-item {
  display: flex;
  align-items: center;
  min-height: 61px;
  padding: 12px 15px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.history-item:last-child {
  border-bottom: 0;
}

.history-item > div {
  display: grid;
  gap: 2px;
}

.history-item strong {
  font-size: 10px;
}

.history-item small,
.history-item > span {
  color: var(--text-muted);
  font-size: 9px;
}

.history-item > span {
  margin-left: auto;
  white-space: nowrap;
}

.history-item.is-ok strong {
  color: var(--green);
}

.history-item.is-error strong {
  color: var(--red);
}

.token-dialog {
  width: min(470px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  outline: 0;
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-md);
}

.token-dialog::backdrop {
  background: rgba(5, 10, 18, 0.58);
  backdrop-filter: blur(4px);
}

.dialog-card {
  display: grid;
  padding: 28px;
  gap: 20px;
}

.dialog-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.dialog-copy .section-label {
  margin-bottom: 6px;
}

.dialog-copy h2 {
  margin: 0;
  font-size: 23px;
}

.dialog-copy p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.dialog-actions .button-ghost {
  margin-right: auto;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 250px;
  max-width: 390px;
  padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--line));
  border-radius: 11px;
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-md);
  font-size: 12px;
}

.toast.is-error {
  border-color: color-mix(in srgb, var(--red) 35%, var(--line));
}

@media (max-width: 1050px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 42px;
  }

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

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

  .table-toolbar {
    flex-wrap: wrap;
  }

  .filter-tabs {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 860px) {
  :root {
    --header-height: 64px;
  }

  .site-container {
    width: min(100% - 32px, 720px);
  }

  .header-inner {
    gap: 16px;
  }

  .nav-list {
    display: none;
  }

  .telegram-link span,
  .brand-copy small {
    display: none;
  }

  .telegram-link {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .hero-section {
    padding: 66px 0 64px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .hero-copy h1 {
    font-size: clamp(43px, 11vw, 64px);
  }

  .network-summary {
    max-width: 620px;
  }

  .recommendations-section,
  .proxies-section,
  .methodology-section {
    padding: 70px 0;
  }

  .metrics-section {
    padding-bottom: 70px;
  }

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

  .method-card {
    min-height: auto;
  }

  .method-icon {
    margin-bottom: 28px;
  }

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

  .footer-inner {
    grid-template-columns: 1fr auto;
    min-height: 110px;
  }

  .footer-inner > p {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-container {
    width: min(100% - 24px, 560px);
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .hero-section {
    padding-top: 48px;
  }

  .service-state > span:last-child,
  .service-state-separator {
    display: none;
  }

  .hero-copy h1 {
    margin-top: 20px;
    font-size: clamp(39px, 13vw, 54px);
  }

  .hero-copy > p {
    font-size: 16px;
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-assurances {
    display: grid;
  }

  .network-summary {
    padding: 22px;
  }

  .network-summary-head > div:first-child b {
    font-size: 32px;
  }

  .availability-ring {
    width: 82px;
    height: 82px;
  }

  .summary-latency small {
    display: none;
  }

  .section-header {
    display: grid;
    align-items: start;
    gap: 20px;
  }

  .section-header h2 {
    font-size: 31px;
  }

  .section-status {
    justify-self: start;
  }

  .recommendations-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .recommendation-card-header,
  .recommendation-endpoint,
  .recommendation-footer {
    padding-right: 17px;
    padding-left: 17px;
  }

  .recommendation-metrics,
  .recommendation-details {
    margin-right: 17px;
    margin-left: 17px;
  }

  .method-card {
    padding: 24px;
  }

  .refresh-area {
    justify-content: space-between;
  }

  .last-updated {
    order: 2;
  }

  .table-toolbar {
    padding: 12px;
  }

  .search-box {
    width: calc(100% - 62px);
  }

  .filter-tabs {
    margin: 0 -2px;
  }

  .result-count {
    order: 2;
  }

  .proxy-table thead {
    display: none;
  }

  .proxy-table,
  .proxy-table tbody,
  .proxy-table tr,
  .proxy-table td {
    display: block;
    width: 100%;
  }

  .proxy-table tbody tr {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 15px;
    border-bottom: 1px solid var(--line);
    gap: 13px 16px;
  }

  .proxy-table tbody tr:last-child {
    border-bottom: 0;
  }

  .proxy-table td {
    padding: 0;
    border: 0;
  }

  .proxy-table td:first-child {
    grid-column: 1 / -1;
    padding-right: 82px;
  }

  .proxy-table td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    content: attr(data-label);
    font-size: 8px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .proxy-table td:first-child::before,
  .proxy-table td:last-child::before {
    display: none;
  }

  .proxy-table td:last-child {
    position: absolute;
    top: 15px;
    right: 15px;
  }

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

  .pagination-bar {
    min-height: 58px;
  }

  .admin-disclosure > summary {
    padding: 14px;
  }

  .admin-disclosure summary small {
    display: none;
  }

  .admin-toolbar {
    display: grid;
  }

  .admin-toolbar > div {
    display: grid;
  }

  .operations-grid {
    padding: 12px;
  }

  .operation-card {
    padding: 18px;
  }

  .form-footer {
    align-items: flex-end;
  }

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

  .detail-grid > div,
  .detail-grid > div:nth-child(odd),
  .detail-grid > div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-grid > div:last-child {
    border-bottom: 0;
  }

  .drawer-content {
    padding: 16px;
  }

  .dialog-card {
    padding: 22px;
  }

  .dialog-actions {
    flex-wrap: wrap;
  }

  .footer-inner {
    gap: 12px;
  }

  .footer-brand .brand-copy small {
    display: none;
  }

  .footer-telegram {
    font-size: 11px;
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .toast {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

@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;
  }
}
