/* Shared controls: navy work surfaces, readable text, one primary action. */
:root {
  --paper: #0b1630; --surface: #132541; --raised: #1b3353; --input: #0e1e37;
  --line: #35506d; --ink: #ecf2f8; --muted: #acbbca;
  --accent: #56c2e8; --action: #56c2e8; --focus: #f1ac7a; --red: #f3a4ae;
  --on-action: #082338; --action-hover:#7ad0ed; --action-pressed:#41a9cf;
  --control-hover:#244361; --control-edge:#486581; --control-radius:8px; --dialog-radius:16px;
  --control-depth:inset 0 1px 0 #ffffff12,0 2px 0 #02091955;
  color: var(--ink); background: var(--paper); color-scheme: dark;
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 15px; font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); line-height: 1.5; }
.remote-test-guide { max-width:780px; margin:0 auto; padding:40px 24px; }
.remote-test-guide h2 { margin-top:32px; }
.remote-test-guide code { overflow-wrap:anywhere; }
.remote-test-guide a:not(.button) { text-decoration:underline; color:var(--accent); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: 28px; font-weight: 400; line-height: 1.4; }
h2 { margin-bottom: 16px; font-size: 21px; font-weight: 400; }
h3 { font-size: 17px; font-weight: 400; }
button, input, select, textarea { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border: 1px solid transparent; border-radius: var(--control-radius); background: var(--action); color: var(--on-action); box-shadow:var(--control-depth); font-size: 14px; font-weight: 600; line-height: 1.5; text-align: center; transition:background-color .12s,border-color .12s,box-shadow .12s; }
.button:not(:disabled):hover { background: var(--action-hover); }
.button:not(:disabled):active { background: var(--action-pressed); box-shadow:inset 0 1px 2px #02091940; }
.button.secondary { background: var(--raised); border-color: var(--control-edge); color:var(--ink); font-weight:400; }
.button.secondary:not(:disabled):hover { background: var(--control-hover); border-color:var(--accent); }
.button.secondary:not(:disabled):active { background:var(--surface); }
.button:disabled { box-shadow:none; }
.button.small { min-height: 36px; padding: 6px 13px; font-size: 13px; }
.text-button { min-height: 40px; padding: 8px 12px; border: 1px solid transparent; border-radius:var(--control-radius); background: none; color: var(--accent); font-size: 14px; line-height: 1.5; }
.text-button:not(:disabled):hover { color: var(--ink); background:var(--raised); }
.text-button:not(:disabled):active { background:var(--control-hover); }
input, select, textarea { border: 1px solid var(--control-edge); border-radius: var(--control-radius); background: var(--input); color: var(--ink); padding: 10px 12px; box-shadow:inset 0 1px 2px #02091920; }
input:not(:disabled):hover, select:not(:disabled):hover { border-color: #91a7bb; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[aria-invalid=true] { border-color: var(--red); }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--action); cursor: pointer; }
.muted { margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 400; }
.connection { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.connection::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--focus); }
.connection.online::before { background: var(--accent); }
.connection.offline { color: var(--red); }
.connection.offline::before { background: var(--red); }
.positive { color: var(--focus); }
.empty { margin: 0; padding: 28px 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
footer { margin-top: 32px; padding: 18px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.8; }
dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); margin: auto; padding: 26px; overflow: auto; border: 1px solid var(--control-edge); border-radius: var(--dialog-radius); background: var(--surface); color: var(--ink); box-shadow: 0 16px 40px #02091980; }
dialog::backdrop { background: #030a18b3; }
dialog h2 { font-size: 23px; font-weight: 400; }
dialog p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.dialog-heading h2 { margin: 0; }
.close-dialog { width: 44px; height: 44px; padding: 0; flex-shrink:0; border: 1px solid transparent; border-radius: var(--control-radius); background: none; color: var(--muted); font-size: 27px; font-weight: 300; }
.close-dialog:hover { border-color: var(--line); background: var(--raised); }
.toast { display: none; position: fixed; z-index: 20; bottom: 24px; right: 24px; max-width: min(460px, calc(100% - 32px)); padding: 16px 22px; border: 1px solid #637990; border-left: 3px solid var(--accent); background: var(--surface); color: var(--ink); font-size: 15px; line-height: 1.6; box-shadow: 0 6px 24px #0004; }
.toast.visible { display: block; }
.toast[data-tone=error] { border-left-color:var(--red); }
.button.danger { background:transparent; border-color:var(--red); color:var(--red); }
.button.danger:not(:disabled):hover { background:var(--raised); border-color:var(--red); }
@media (max-width: 600px) { h1 { font-size: 25px; } .toast { right: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
