  :root {
    --bg:       #0a0b10;
    --card:     #12141c;
    --card2:    #191b26;
    --border:   #1e2133;
    --accent:   #f5a623;
    --accent2:  #e05b30;
    --green:    #3ecf8e;
    --blue:     #4f8ef7;
    --purple:   #9b7fe8;
    --text:     #e8eaf2;
    --muted:    #555878;
    --mono:     monospace;
    --sans:     sans-serif;
    --display:  sans-serif;
  }
  :root[data-theme="light"] {
    --bg:       #f5f4ef;
    --card:     #ffffff;
    --card2:    #eeede8;
    --border:   #d8d6cc;
    --accent:   #c97d0a;
    --accent2:  #c04820;
    --green:    #1a9e65;
    --blue:     #2c6fd4;
    --purple:   #6b4fc2;
    --text:     #1a1a2a;
    --muted:    #888070;
  }
  @media (prefers-color-scheme: light) {
    :root:not([data-theme]) {
      --bg:       #f5f4ef;
      --card:     #ffffff;
      --card2:    #eeede8;
      --border:   #d8d6cc;
      --accent:   #c97d0a;
      --accent2:  #c04820;
      --green:    #1a9e65;
      --blue:     #2c6fd4;
      --purple:   #6b4fc2;
      --text:     #1a1a2a;
      --muted:    #888070;
    }
    body::before {
      background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201,125,10,0.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 30% at 85% 80%, rgba(44,111,212,0.04) 0%, transparent 60%);
    }
    .logo {
      text-shadow: 0 0 40px rgba(201,125,10,0.25), 0 0 80px rgba(201,125,10,0.08);
    }
  }
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
  }

  /* ── Background texture ── */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
      radial-gradient(ellipse 80% 50% at 50% -10%, rgba(245,166,35,0.08) 0%, transparent 70%),
      radial-gradient(ellipse 40% 30% at 85% 80%, rgba(79,142,247,0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
  }

  .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
  }

  /* ── Header ── */
  .header {
    padding: 60px 0 40px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
  }
  .logo {
    font-family: var(--display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    letter-spacing: 0.12em;
    color: var(--accent);
    text-shadow: 0 0 40px rgba(245,166,35,0.4), 0 0 80px rgba(245,166,35,0.15);
    margin-bottom: 6px;
  }
  .logo span { color: var(--text); }
  .tagline {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 28px;
  }
  .uptime-banner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 10px 24px;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 12px;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
  }
  .uptime-banner:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: color-mix(in oklab, var(--accent) 16%, transparent);
  }
  .uptime-banner:hover strong { color: var(--text); }
  .uptime-banner strong { color: var(--text); }
  .live-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-top: 8px;
  }
  .live-stat {
    text-align: center;
  }
  .live-stat .num {
    font-family: var(--mono);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--accent);
    display: block;
    line-height: 1;
  }
  .live-stat .lbl {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .splash-access {
    text-align: right;
    margin-bottom: 8px;
  }
  .splash-manage-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    text-decoration: none;
    margin-left: 8px;
    background: color-mix(in oklab, var(--bg) 55%, transparent);
    box-shadow: inset 0 1px 0 color-mix(in oklab, var(--ink) 8%, transparent);
    transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
  }
  .splash-manage-btn:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    background: color-mix(in oklab, var(--accent) 16%, transparent);
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 22%, transparent),
                0 0 16px color-mix(in oklab, var(--accent) 30%, transparent);
  }
  .splash-manage-btn:focus-visible {
    outline: 2px solid color-mix(in oklab, var(--accent) 70%, transparent);
    outline-offset: 2px;
  }

  /* ── Announce URLs ── */
  .announce-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 32px;
  }
  .announce-title {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
  }
  .announce-title a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--bg) 55%, transparent);
    box-shadow: inset 0 1px 0 color-mix(in oklab, var(--ink) 8%, transparent);
    transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s;
  }
  .announce-title a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: color-mix(in oklab, var(--accent) 16%, transparent);
    transform: translateY(-1px);
  }
  .announce-title a:focus-visible {
    outline: 2px solid color-mix(in oklab, var(--accent) 70%, transparent);
    outline-offset: 2px;
  }
  .announce-title a .announce-cta-arrow {
    display: inline-block;
    opacity: 0.82;
    transform: translateX(0);
    transition: transform 0.15s ease, opacity 0.15s ease;
  }
  .announce-title a:hover .announce-cta-arrow,
  .announce-title a:focus-visible .announce-cta-arrow {
    opacity: 1;
    transform: translateX(2px);
  }
  .url-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }
  .url-row:last-child { border-bottom: none; }
  .url-badge {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 3px 10px;
    border-radius: 4px;
    min-width: 52px;
    text-align: center;
  }
  .url-badge.udp   { background: rgba(79,142,247,0.15); color: var(--blue); border: 1px solid rgba(79,142,247,0.3); }
  .url-badge.http  { background: rgba(245,166,35,0.12); color: var(--accent); border: 1px solid rgba(245,166,35,0.3); }
  .url-badge.https { background: rgba(62,207,142,0.12); color: var(--green); border: 1px solid rgba(62,207,142,0.3); }
  .url-text {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .copy-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.72rem;
    padding: 5px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
  }
  .copy-btn:hover  { border-color: var(--accent); color: var(--accent); }
  .copy-btn.copied { border-color: var(--green); color: var(--green); }

  /* ── Tabs ── */
  .tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
  }
  .tab {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 8px 22px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
  }
  .tab:hover  { color: var(--text); }
  .tab.active { background: var(--card2); color: var(--accent); border: 1px solid var(--border); }

  /* ── Panels ── */
  .panel { display: none; }
  .panel.visible { display: block; }

  /* ── Stat cards ── */
  .stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
  }
  .stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 22px;
    transition: border-color 0.2s;
  }
  .stat-card:hover { border-color: rgba(245,166,35,0.3); }
  .stat-card.highlight { border-color: var(--border); }
  .stat-card.highlight:hover { border-color: rgba(62,207,142,0.25); }
  .stat-value {
    font-family: var(--mono);
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 6px;
  }
  .stat-card.highlight .stat-value { color: var(--green); }
  .stat-label {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .stat-label small { font-size: 0.65rem; display: block; margin-top: 2px; }

  /* ── Section title ── */
  .section-title {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 28px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }

  /* ── Protocol bars ── */
  .proto-breakdown { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
  .proto-row { display: flex; align-items: center; gap: 12px; }
  .proto-label {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--muted);
    width: 44px;
    text-align: right;
    flex-shrink: 0;
  }
  .proto-bar-bg {
    flex: 1;
    background: var(--card2);
    border-radius: 4px;
    height: 10px;
    overflow: hidden;
  }
  .proto-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 2px;
  }
  .proto-bar.udp   { background: var(--blue); }
  .proto-bar.https { background: var(--green); }
  .proto-bar.http  { background: var(--muted); }
  .proto-bar.ipv4  { background: var(--accent); }
  .proto-bar.ipv6  { background: var(--purple); }
  .proto-val {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text);
    min-width: 130px;
    text-align: right;
  }
  .proto-val small { color: var(--muted); }

  /* ── Bar chart ── */
  .chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 100px;
    padding: 8px 0 0;
  }
  .bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
  }
  .bar-slot {
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: flex-end;
  }
  .bar {
    flex: none;
    width: 100%;
    background: rgba(245,166,35,0.35);
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: background 0.2s;
  }
  .bar.min { background: rgba(245,166,35,0.25); }
  .bar.max { background: rgba(245,166,35,0.7); }
  .bar.future { opacity: 0.22; }
  .bar:hover { background: var(--accent); }
  .bar.active { background: rgba(245,166,35,0.7); }
  .bar-label {
    font-family: var(--mono);
    font-size: 0.55rem;
    color: var(--muted);
    margin-top: 4px;
    white-space: nowrap;
  }
  .range-note {
    margin-left: 10px;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit;
  }

  /* ── Bragging points ── */
  .brag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 8px;
  }
  .brag-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 0.88rem;
    color: var(--muted);
  }
  .brag-card strong { color: var(--text); display: block; margin-bottom: 2px; font-size: 0.95rem; }

  /* ── No data ── */
  .no-data {
    text-align: center;
    padding: 48px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.85rem;
  }

  /* ── Footer ── */
  .footer {
    margin-top: 56px;
    padding: 28px 0 40px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.8;
  }
  .footer a { color: var(--muted); text-decoration: underline; }
  .footer .stateless {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 20px;
    margin: 16px auto;
    max-width: 640px;
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--muted);
  }

  @media (max-width: 600px) {
    .live-stats { gap: 20px; }
    .url-text { font-size: 0.75rem; }
    .proto-val { min-width: 80px; font-size: 0.72rem; }
  }

/* Rust splash addition: public share control. */
.share-row {
  display: flex;
  justify-content: center;
  margin: 14px 0 10px;
}
.share-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.share-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.share-copy-helper { position: fixed; left: -10000px; top: 0; opacity: 0; pointer-events: none; }
.bar.pct-0{height:0%}.proto-bar.pct-0{width:0%}
.bar.pct-1{height:1%}.proto-bar.pct-1{width:1%}
.bar.pct-2{height:2%}.proto-bar.pct-2{width:2%}
.bar.pct-3{height:3%}.proto-bar.pct-3{width:3%}
.bar.pct-4{height:4%}.proto-bar.pct-4{width:4%}
.bar.pct-5{height:5%}.proto-bar.pct-5{width:5%}
.bar.pct-6{height:6%}.proto-bar.pct-6{width:6%}
.bar.pct-7{height:7%}.proto-bar.pct-7{width:7%}
.bar.pct-8{height:8%}.proto-bar.pct-8{width:8%}
.bar.pct-9{height:9%}.proto-bar.pct-9{width:9%}
.bar.pct-10{height:10%}.proto-bar.pct-10{width:10%}
.bar.pct-11{height:11%}.proto-bar.pct-11{width:11%}
.bar.pct-12{height:12%}.proto-bar.pct-12{width:12%}
.bar.pct-13{height:13%}.proto-bar.pct-13{width:13%}
.bar.pct-14{height:14%}.proto-bar.pct-14{width:14%}
.bar.pct-15{height:15%}.proto-bar.pct-15{width:15%}
.bar.pct-16{height:16%}.proto-bar.pct-16{width:16%}
.bar.pct-17{height:17%}.proto-bar.pct-17{width:17%}
.bar.pct-18{height:18%}.proto-bar.pct-18{width:18%}
.bar.pct-19{height:19%}.proto-bar.pct-19{width:19%}
.bar.pct-20{height:20%}.proto-bar.pct-20{width:20%}
.bar.pct-21{height:21%}.proto-bar.pct-21{width:21%}
.bar.pct-22{height:22%}.proto-bar.pct-22{width:22%}
.bar.pct-23{height:23%}.proto-bar.pct-23{width:23%}
.bar.pct-24{height:24%}.proto-bar.pct-24{width:24%}
.bar.pct-25{height:25%}.proto-bar.pct-25{width:25%}
.bar.pct-26{height:26%}.proto-bar.pct-26{width:26%}
.bar.pct-27{height:27%}.proto-bar.pct-27{width:27%}
.bar.pct-28{height:28%}.proto-bar.pct-28{width:28%}
.bar.pct-29{height:29%}.proto-bar.pct-29{width:29%}
.bar.pct-30{height:30%}.proto-bar.pct-30{width:30%}
.bar.pct-31{height:31%}.proto-bar.pct-31{width:31%}
.bar.pct-32{height:32%}.proto-bar.pct-32{width:32%}
.bar.pct-33{height:33%}.proto-bar.pct-33{width:33%}
.bar.pct-34{height:34%}.proto-bar.pct-34{width:34%}
.bar.pct-35{height:35%}.proto-bar.pct-35{width:35%}
.bar.pct-36{height:36%}.proto-bar.pct-36{width:36%}
.bar.pct-37{height:37%}.proto-bar.pct-37{width:37%}
.bar.pct-38{height:38%}.proto-bar.pct-38{width:38%}
.bar.pct-39{height:39%}.proto-bar.pct-39{width:39%}
.bar.pct-40{height:40%}.proto-bar.pct-40{width:40%}
.bar.pct-41{height:41%}.proto-bar.pct-41{width:41%}
.bar.pct-42{height:42%}.proto-bar.pct-42{width:42%}
.bar.pct-43{height:43%}.proto-bar.pct-43{width:43%}
.bar.pct-44{height:44%}.proto-bar.pct-44{width:44%}
.bar.pct-45{height:45%}.proto-bar.pct-45{width:45%}
.bar.pct-46{height:46%}.proto-bar.pct-46{width:46%}
.bar.pct-47{height:47%}.proto-bar.pct-47{width:47%}
.bar.pct-48{height:48%}.proto-bar.pct-48{width:48%}
.bar.pct-49{height:49%}.proto-bar.pct-49{width:49%}
.bar.pct-50{height:50%}.proto-bar.pct-50{width:50%}
.bar.pct-51{height:51%}.proto-bar.pct-51{width:51%}
.bar.pct-52{height:52%}.proto-bar.pct-52{width:52%}
.bar.pct-53{height:53%}.proto-bar.pct-53{width:53%}
.bar.pct-54{height:54%}.proto-bar.pct-54{width:54%}
.bar.pct-55{height:55%}.proto-bar.pct-55{width:55%}
.bar.pct-56{height:56%}.proto-bar.pct-56{width:56%}
.bar.pct-57{height:57%}.proto-bar.pct-57{width:57%}
.bar.pct-58{height:58%}.proto-bar.pct-58{width:58%}
.bar.pct-59{height:59%}.proto-bar.pct-59{width:59%}
.bar.pct-60{height:60%}.proto-bar.pct-60{width:60%}
.bar.pct-61{height:61%}.proto-bar.pct-61{width:61%}
.bar.pct-62{height:62%}.proto-bar.pct-62{width:62%}
.bar.pct-63{height:63%}.proto-bar.pct-63{width:63%}
.bar.pct-64{height:64%}.proto-bar.pct-64{width:64%}
.bar.pct-65{height:65%}.proto-bar.pct-65{width:65%}
.bar.pct-66{height:66%}.proto-bar.pct-66{width:66%}
.bar.pct-67{height:67%}.proto-bar.pct-67{width:67%}
.bar.pct-68{height:68%}.proto-bar.pct-68{width:68%}
.bar.pct-69{height:69%}.proto-bar.pct-69{width:69%}
.bar.pct-70{height:70%}.proto-bar.pct-70{width:70%}
.bar.pct-71{height:71%}.proto-bar.pct-71{width:71%}
.bar.pct-72{height:72%}.proto-bar.pct-72{width:72%}
.bar.pct-73{height:73%}.proto-bar.pct-73{width:73%}
.bar.pct-74{height:74%}.proto-bar.pct-74{width:74%}
.bar.pct-75{height:75%}.proto-bar.pct-75{width:75%}
.bar.pct-76{height:76%}.proto-bar.pct-76{width:76%}
.bar.pct-77{height:77%}.proto-bar.pct-77{width:77%}
.bar.pct-78{height:78%}.proto-bar.pct-78{width:78%}
.bar.pct-79{height:79%}.proto-bar.pct-79{width:79%}
.bar.pct-80{height:80%}.proto-bar.pct-80{width:80%}
.bar.pct-81{height:81%}.proto-bar.pct-81{width:81%}
.bar.pct-82{height:82%}.proto-bar.pct-82{width:82%}
.bar.pct-83{height:83%}.proto-bar.pct-83{width:83%}
.bar.pct-84{height:84%}.proto-bar.pct-84{width:84%}
.bar.pct-85{height:85%}.proto-bar.pct-85{width:85%}
.bar.pct-86{height:86%}.proto-bar.pct-86{width:86%}
.bar.pct-87{height:87%}.proto-bar.pct-87{width:87%}
.bar.pct-88{height:88%}.proto-bar.pct-88{width:88%}
.bar.pct-89{height:89%}.proto-bar.pct-89{width:89%}
.bar.pct-90{height:90%}.proto-bar.pct-90{width:90%}
.bar.pct-91{height:91%}.proto-bar.pct-91{width:91%}
.bar.pct-92{height:92%}.proto-bar.pct-92{width:92%}
.bar.pct-93{height:93%}.proto-bar.pct-93{width:93%}
.bar.pct-94{height:94%}.proto-bar.pct-94{width:94%}
.bar.pct-95{height:95%}.proto-bar.pct-95{width:95%}
.bar.pct-96{height:96%}.proto-bar.pct-96{width:96%}
.bar.pct-97{height:97%}.proto-bar.pct-97{width:97%}
.bar.pct-98{height:98%}.proto-bar.pct-98{width:98%}
.bar.pct-99{height:99%}.proto-bar.pct-99{width:99%}
.bar.pct-100{height:100%}.proto-bar.pct-100{width:100%}
