.st-panel { grid-column:1/-1; min-width:0; color:var(--text); padding:20px 0; }
.st-panel header,.st-dialog header { display:flex; align-items:center; justify-content:space-between; gap:12px; }.st-panel h2 { font-size:22px; margin:0; }.st-panel header span,.st-endpoints span,.st-metrics span,.st-metrics small,.st-endpoints small { color:var(--muted); font-size:13px; }
.st-center { display:flex; align-items:center; flex-direction:column; margin:30px auto 24px; gap:14px; }
.st-go { position:relative; display:flex; flex-direction:column; justify-content:center; align-items:center; width:260px!important; height:260px!important; min-height:260px!important; aspect-ratio:1; flex-shrink:0; border:2px solid var(--accent)!important; border-radius:50%!important; background:var(--panel)!important; color:var(--text)!important; padding:20px!important; cursor:pointer; }
.st-go strong { font-size:54px; font-weight:600; line-height:1.15; }.st-unit { font-size:18px; color:var(--muted); }.st-go:disabled { opacity:1; cursor:default; }.st-go.st-running:after { content:''; position:absolute; inset:-6px; border:4px solid transparent; border-top-color:var(--up); border-right-color:var(--accent); border-radius:50%; animation:st-turn 1s linear infinite; pointer-events:none; }
@keyframes st-turn { to { transform:rotate(360deg); } }.st-progress { width:240px; height:4px; accent-color:var(--accent); }.st-phase { min-height:20px; font-size:13px; color:var(--muted); }
.st-metrics,.st-endpoints { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); max-width:800px; margin:24px auto; gap:30px; text-align:center; }.st-metrics div,.st-endpoints div { display:flex; flex-direction:column; gap:10px; min-width:0; }.st-metrics strong { font-size:32px; }.st-endpoints strong { font-size:20px; overflow-wrap:anywhere; }.st-endpoints { margin-top:36px; }.st-endpoints button { align-self:center; border:0; background:none; color:var(--accent); font:inherit; cursor:pointer; padding:8px; }.st-endpoints button:disabled { opacity:.5; }
.st-chart { max-width:1100px; margin:24px auto 0; min-width:0; }.st-chart .chart-box { height:auto; min-height:210px; }.st-chart svg { min-height:160px; }.st-message { text-align:center; font-size:13px; margin:16px 0; overflow-wrap:anywhere; }.st-message:empty { display:none; }.st-message.error,.st-form-error { color:var(--down); }
.st-dialog { box-sizing:border-box; width:min(700px,calc(100% - 24px)); max-height:90dvh; border:1px solid var(--line); border-radius:6px; background:var(--panel); color:var(--text); padding:20px; }.st-dialog::backdrop { background:#0008; }.st-dialog h3 { font-size:19px; margin:0; }.st-dialog button { min-height:40px; padding:8px 14px; border:1px solid var(--line); border-radius:5px; background:var(--panel-2); color:var(--text); cursor:pointer; }.st-dialog button:disabled { opacity:.5; }.st-dialog [data-close] { width:42px; font-size:22px; }.st-dialog-content { margin-top:20px; }.st-server-tools { display:flex; gap:12px; }.st-server-tools input { flex:1; min-width:0; }.st-server-row { display:flex; gap:10px; align-items:center; padding:12px 0; border-bottom:1px solid var(--line); }.st-server-row [data-select] { flex:1; min-width:0; display:flex; align-items:start; flex-direction:column; gap:6px; text-align:left; }.st-server-row [data-select] strong,.st-server-row [data-select] span { overflow-wrap:anywhere; max-width:100%; }.st-server-row .selected { border-color:var(--accent); }.st-server-row small { color:var(--muted); }
.st-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }.st-form label { display:flex; flex-direction:column; gap:8px; font-size:13px; min-width:0; }.st-dialog input,.st-dialog select { box-sizing:border-box; min-width:0; padding:10px; color:var(--text); background:var(--panel-2); border:1px solid var(--line); border-radius:5px; font:inherit; }.st-form footer,.st-form-note,.st-form-error { grid-column:1/-1; }.st-form p { margin:0; font-size:13px; line-height:1.5; }.st-form-note { color:var(--muted); }.st-form footer { text-align:right; }.st-form [type=submit] { color:#fff; background:var(--nav-active); }
@media(max-width:600px) { .st-panel { padding:8px 0; }.st-go { width:220px!important; height:220px!important; min-height:220px!important; }.st-metrics,.st-endpoints { gap:14px; }.st-metrics strong { font-size:24px; }.st-endpoints strong { font-size:16px; }.st-form { grid-template-columns:1fr; }.st-dialog { padding:16px; }.st-dialog input,.st-dialog select { font-size:16px; }.st-dialog button { min-height:44px; }.st-server-tools { flex-wrap:wrap; }.st-server-tools input { width:100%; flex-basis:100%; } }
@media(prefers-reduced-motion:reduce) { .st-go.st-running:after { animation-duration:3s; } }
.st-form footer { display:flex; justify-content:flex-end; gap:12px; }.st-form [data-delete] { margin-right:auto; color:var(--down); }

/* Server choices contain multiple lines, unlike the dashboard's fixed-height buttons. */
.st-dialog { height:auto; max-height:calc(100dvh - 32px); overflow:auto; overscroll-behavior:contain; }
body .st-dialog header,body.theme-dark .st-dialog header { margin:0; padding:0 0 14px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:var(--panel); box-shadow:none; }
.st-dialog header h3 { min-width:0; overflow-wrap:anywhere; }
.st-dialog [data-close] { flex:0 0 42px; }
.st-dialog .st-server-row [data-select] { height:auto; min-height:96px; align-self:stretch; justify-content:center; line-height:1.45; white-space:normal; }
.st-dialog .st-server-row [data-select] > * { flex-shrink:0; max-width:100%; overflow-wrap:anywhere; }
.st-dialog .st-server-row [data-select] strong,.st-dialog .st-server-row [data-select] span { color:var(--text); }
.st-dialog .st-server-row [data-select] small { font-size:12px; color:var(--muted); }
.st-dialog input,.st-dialog select { height:auto; min-height:44px; line-height:1.4; }
.st-dialog .st-form footer { flex-wrap:wrap; }

/* Keep tool layout independent of the dashboard's global header and button rules. */
body.speedtest-view .summary, body.speedtest-view #statusLine:not(.error) { display:none; }
body.speedtest-view #cards { display:block; }
body.speedtest-view .st-panel { max-width:1120px; margin:0 auto; padding:8px 0 24px; }
body .st-panel > .st-heading, body.theme-dark .st-panel > .st-heading { display:flex; margin:0; padding:0 0 20px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; box-shadow:none; }
.st-heading h2 { font-size:24px; line-height:1.3; }
.st-heading p { margin:6px 0 0; font-size:13px; color:var(--muted); }
.st-heading .st-mode { flex-shrink:0; font-size:12px; font-variant-numeric:tabular-nums; }
.st-panel .st-endpoints { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; max-width:none; text-align:left; align-items:center; margin:0; padding:20px 0; gap:24px; border-bottom:1px solid var(--line); }
.st-panel .st-endpoints > div { gap:6px; }
.st-panel .st-endpoints strong { font-size:15px; line-height:1.5; }
.st-panel .st-endpoints [data-change] { height:auto; min-height:40px; padding:9px 14px; border:1px solid var(--line); border-radius:6px; background:var(--panel); color:var(--text); font-size:13px; line-height:1.4; }
.st-panel .st-endpoints [data-change]:hover { border-color:var(--accent); color:var(--accent); }
.st-workspace { display:grid; grid-template-columns:240px minmax(0,1fr); align-items:center; gap:48px; padding:32px 0; }
.st-panel .st-center { margin:0; gap:12px; min-width:0; }
.st-panel .st-go { width:176px!important; height:176px!important; min-height:176px!important; padding:18px!important; background:var(--panel)!important; box-shadow:none; }
.st-panel .st-go strong { font-size:28px; line-height:1.2; font-variant-numeric:tabular-nums; }
.st-panel .st-go .st-unit { font-size:15px; margin-top:6px; }
.st-panel .st-go:disabled:not(.st-running) { opacity:.5; }
.st-panel .st-go:focus-visible { outline:3px solid var(--accent); outline-offset:6px; }
.st-panel .st-progress { width:176px; height:5px; }
.st-panel .st-phase { text-align:center; line-height:1.5; max-width:100%; min-height:20px; }
.st-panel .st-metrics { max-width:none; width:100%; margin:0; gap:20px 32px; text-align:left; }
.st-panel .st-metrics > div { gap:10px; padding:14px 0 14px 20px; border-left:3px solid var(--up); }
.st-panel .st-metrics > .st-tx { border-color:var(--accent); }
.st-panel .st-metrics > div > span { font-size:12px; font-weight:600; color:var(--text); display:flex; align-items:center; gap:8px; }
.st-panel .st-metrics > div > span small { font-size:11px; color:var(--muted); }
.st-panel .st-metrics strong { font-size:32px; line-height:1.3; font-variant-numeric:tabular-nums; white-space:nowrap; }
.st-panel .st-metrics .st-rx strong { color:var(--up); }
.st-panel .st-metrics .st-tx strong { color:var(--accent); }
.st-direction { grid-column:1/-1; font-size:12px; margin:0; color:var(--muted); }
.st-panel .st-message { text-align:left; margin:0 0 20px; padding:12px 14px; border-left:3px solid var(--up); background:var(--panel); }
.st-panel .st-message.error { border-color:var(--down); }
.st-chart-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; padding-top:20px; border-top:1px solid var(--line); }
.st-chart-heading h3 { margin:0; font-size:14px; }
.st-chart-heading span { font-size:12px; color:var(--muted); }
.st-panel .st-chart { max-width:none; margin:12px 0 0; }
@media(max-width:760px) {
  .st-workspace { grid-template-columns:200px minmax(0,1fr); gap:24px; }
  .st-panel .st-metrics { gap:20px 16px; }
  .st-panel .st-metrics strong { font-size:24px; }
  .st-panel .st-metrics > div { padding-left:12px; }
}
@media(max-width:600px) {
  .st-heading h2 { font-size:22px; }
  .st-heading .st-mode { font-size:11px; }
  .st-panel .st-endpoints { grid-template-columns:minmax(0,1fr) auto; gap:18px 12px; padding:18px 0; }
  .st-panel .st-endpoints > div:first-child { grid-column:1/-1; }
  .st-panel .st-endpoints strong { font-size:14px; }
  .st-panel .st-endpoints [data-change] { max-width:130px; min-height:44px; font-size:12px; }
  .st-workspace { grid-template-columns:minmax(0,1fr); padding:26px 0; gap:24px; }
  .st-panel .st-go { width:152px!important; height:152px!important; min-height:152px!important; }
  .st-panel .st-progress { width:152px; }
  .st-panel .st-metrics { gap:16px 12px; }
  .st-panel .st-metrics strong { font-size:22px; }
  .st-panel .st-metrics > div > span { gap:5px; font-size:11px; }
  .st-panel .st-metrics > div > small { font-size:11px; }
  .st-chart-heading span { font-size:11px; }
}
@media(prefers-reduced-motion:reduce) { .st-go.st-running:after { animation:none; } }
