:root {
  color-scheme: dark;
  --page: #0a1019;
  --surface: #111b29;
  --surface-2: #0d1622;
  --line: #27374b;
  --text: #edf4ff;
  --muted: #9cadc5;
  --teal: #53e4c4;
  --teal-ink: #09241f;
  --red: #ffa3a5;
  --yellow: #f1c270;
  font: 16px/1.5 "Segoe UI", "Inter", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(ellipse at 68% 0%, #14253a 0, transparent 53%), var(--page); }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .58; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.topbar { background: #0c1521; border-bottom: 1px solid #253449; }
.topbar-inner { margin: auto; max-width: 1336px; padding: 18px 34px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: inline-flex; gap: 7px; align-items: center; text-decoration: none; font-weight: 850; font-size: 15px; letter-spacing: .14em; }
.brand-accent { color: var(--teal); }
.mark { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; gap: 3px; align-items: end; justify-content: center; padding-bottom: 9px; background: #163d3a; box-shadow: inset 0 0 0 1px #2c5e56; margin-right: 4px; }
.mark i { width: 3px; height: 6px; display: block; border-radius: 2px; background: var(--teal); }
.mark i:nth-child(2) { height: 10px; }
.mark i:nth-child(3) { height: 14px; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.node { font-size: .79rem; padding: 6px 12px; border: 1px solid #2c4553; background: #12282e; border-radius: 99px; display: inline-flex; align-items: center; gap: 9px; color: #b7efe2; white-space: nowrap; }
.node i { width: 7px; height: 7px; background: var(--teal); border-radius: 50%; box-shadow: 0 0 12px #53e4c466; }
.workspace { max-width: 1336px; padding: 56px 34px 52px; margin: auto; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 33px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -.055em; font-weight: 760; line-height: 1.12; }
.hero p { color: var(--muted); font-size: 1.06rem; margin-top: 12px; }
.vantage { background: #102032; border: 1px solid var(--line); border-radius: 13px; padding: 12px 18px; min-width: 180px; }
.vantage span, .vantage strong { display: block; }
.vantage span { font-size: .79rem; color: var(--muted); }
.vantage strong { margin-top: 3px; color: var(--teal); font-family: "Cascadia Mono", Menlo, monospace; font-size: .96rem; font-weight: 550; }
.layout { display: grid; grid-template-columns: minmax(335px, .76fr) minmax(0, 1.24fr); gap: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 18px 56px #05090e65; }
.test-panel { padding: 22px; }
.tabs { display: flex; gap: 4px; border: 1px solid #2a3a50; padding: 4px; border-radius: 11px; background: var(--surface-2); margin: 0 0 23px; }
.tabs button { background: transparent; border: 0; color: var(--muted); font-size: .89rem; font-weight: 690; flex: 1; padding: 10px 12px; border-radius: 7px; }
.tabs .selected { color: var(--teal); background: #1b3540; }
.field { display: flex; flex-direction: column; min-width: 0; gap: 6px; margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: .75fr 1.25fr; gap: 12px; }
label { font-size: .86rem; font-weight: 620; }
label span { color: var(--muted); font-size: .74rem; font-weight: 450; margin-left: 4px; }
input:not([type=checkbox]) { min-width: 0; width: 100%; height: 43px; padding: 0 12px; color: var(--text); background: #0b1421; border: 1px solid #344760; border-radius: 8px; }
input::placeholder { color: #7e94af; }
.field small, .hint { color: var(--muted); font-size: .78rem; }
.hint { margin: 8px 0 16px; line-height: 1.55; }
.toggle { display: flex; gap: 9px; align-items: center; padding: 3px 0; }
.toggle span { color: var(--text); font-size: .86rem; font-weight: 550; margin: 0; }
input[type=checkbox] { inline-size: 16px; block-size: 16px; margin: 0; accent-color: var(--teal); }
.ssh { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 12px; }
.primary { width: 100%; border: none; border-radius: 9px; background: var(--teal); color: var(--teal-ink); padding: 11px 15px; text-align: left; font-weight: 760; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.primary:hover:enabled { background: #7cebd3; }
.check-button { margin-top: 20px; }
.quiet { border: 1px solid #34475f; background: #162334; color: #dbe8f9; padding: 6px 10px; border-radius: 7px; font-size: .8rem; }
.quiet:hover:enabled { background: #22364c; }
.fingerprint { margin: -4px 0 0; }
.observed-key { overflow-wrap: anywhere; color: var(--teal); margin-top: 9px; font: .78rem/1.55 "Cascadia Mono", monospace; }
.key-field { display: flex; align-items: center; gap: 8px; }
.form-error { background: #381e29; border: 1px solid #62404f; color: var(--red); border-radius: 8px; padding: 9px 10px; font-size: .84rem; margin-top: 13px; }
.results { overflow: hidden; min-height: 414px; }
.results-heading { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 19px 22px; border-bottom: 1px solid var(--line); }
h2 { font-size: 1.12rem; font-weight: 730; letter-spacing: -.02em; }
.results-heading span { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.empty { min-height: 328px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 22px; text-align: center; gap: 7px; }
.empty p { font-weight: 650; color: #d5e0ef; }
.empty > span { font-size: .87rem; color: var(--muted); max-width: 340px; }
.trace-symbol { display: flex; align-items: center; gap: 8px; color: var(--teal); height: 44px; margin-bottom: 8px; position: relative; }
.trace-symbol::before { content: ""; height: 1px; background: #386877; position: absolute; inset: 50% 3px auto; }
.trace-symbol i { display: block; position: relative; width: 10px; height: 10px; border-radius: 50%; background: #162a37; border: 1px solid #4b8894; }
.trace-symbol i:nth-child(3) { width: 17px; height: 17px; border-color: var(--teal); box-shadow: 0 0 20px #53e4c433; }
.loading .trace-symbol i { animation: pulse 1.4s ease-in-out infinite alternate; }
.loading .trace-symbol i:nth-child(2) { animation-delay: .15s; }
.loading .trace-symbol i:nth-child(3) { animation-delay: .3s; }
.loading .trace-symbol i:nth-child(4) { animation-delay: .45s; }
@keyframes pulse { from { opacity: .35; } to { opacity: 1; transform: scale(1.13); } }
.filled { padding: 20px; display: grid; gap: 12px; }
.outcome { padding: 15px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 11px; min-width: 0; }
.outcome-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.outcome-head h3 { font: 600 .95rem/1.45 "Cascadia Mono", monospace; overflow-wrap: anywhere; }
.pill { color: var(--teal); background: #173c36; padding: 4px 8px; font-weight: 700; font-size: .73rem; border-radius: 7px; white-space: nowrap; }
.pill.unstable, .pill.tcp_only { color: var(--yellow); background: #3a3023; }
.pill.unreachable, .pill.vpn_failed { color: var(--red); background: #412631; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(93px,1fr)); gap: 8px; }
.metric { min-width: 0; border-top: 1px solid var(--line); padding-top: 9px; }
.metric span, .metric strong { display: block; }
.metric span { color: var(--muted); font-size: .75rem; }
.metric strong { font: 600 .91rem/1.5 "Cascadia Mono", monospace; margin-top: 3px; overflow-wrap: anywhere; }
.outcome details, .method { color: var(--muted); font-size: .83rem; }
.outcome details { margin-top: 13px; }
summary { cursor: pointer; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; text-align: left; }
td, th { padding: 6px 4px; border-bottom: 1px solid var(--line); }
th { font-weight: 650; }
.method { margin-top: 19px; line-height: 1.7; }
.method p { margin-top: 6px; max-width: 850px; }
.result-note { color: var(--muted); font-size: .8rem; }
.login-view { min-height: calc(100vh - 69px); display: grid; place-items: center; padding: 42px 22px; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px; width: min(100%, 430px); box-shadow: 0 22px 80px #04091088; }
.login-mark { width: 44px; height: 44px; margin-bottom: 18px; padding-bottom: 14px; }
.login-card h1 { font-size: 1.88rem; }
.login-card > p { color: var(--muted); margin: 9px 0 25px; font-size: .92rem; }
.login-card form { display: grid; gap: 8px; }
.login-card input { margin-bottom: 6px; }
.login-card .primary { margin-top: 5px; }
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .workspace { padding-top: 36px; }
  .results { min-height: 335px; }
  .empty { min-height: 259px; }
}
@media (max-width: 560px) {
  .topbar-inner, .workspace { padding-left: 17px; padding-right: 17px; }
  .topbar-actions { gap: 7px; }
  .node { font-size: .67rem; padding: 5px 7px; gap: 5px; }
  .brand { font-size: .76rem; gap: 4px; }
  .hero { align-items: start; flex-direction: column; gap: 16px; }
  .vantage { min-width: 0; padding: 8px 12px; }
  .test-panel, .filled { padding: 16px; }
  .results-heading { padding: 15px 16px; }
  .results-heading span { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }
