:root {
  color-scheme: dark;
  font: 1rem/1.5 system-ui, sans-serif;
  color: #edf2f7;
  background: #101418;
  --muted: #b1bfcb;
  --border: #455463;
  --accent: #82ecc5;
}
* { box-sizing: border-box; }
body { max-width: 72rem; margin: auto; padding: clamp(1rem, 3vw, 2.5rem); }
header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.25rem; }
h1 { font-size: clamp(1.55rem, 4vw, 2.4rem); margin: 0; line-height: 1.15; }
h2 { font-size: 1.2rem; margin: 0 0 .8rem; }
#build, .details, #access, #log-status, #sending { color: var(--muted); }
main { display: grid; gap: 1rem; }
section { min-width: 0; padding: clamp(.9rem, 2vw, 1.35rem); border: 1px solid var(--border); border-radius: .7rem; background: #1b2229; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
button, select, input, textarea {
  font: inherit; color: inherit; border: 1px solid var(--border);
  background: #10171d; border-radius: .35rem; min-height: 44px; padding: .45rem .75rem;
}
button { background: #283541; cursor: pointer; touch-action: manipulation; }
button:hover:enabled { border-color: var(--accent); }
button:disabled, fieldset:disabled button { cursor: default; opacity: .55; }
#connect:enabled, #raw-send:enabled { background: var(--accent); color: #10231c; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ports { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .8rem; }
.ports > div { min-width: 0; }
label { display: block; font-weight: 600; margin-bottom: .25rem; }
select, textarea { width: 100%; }
.details { margin: .35rem 0 0; overflow-wrap: anywhere; font-size: .875rem; }
fieldset { min-width: 0; margin: .75rem 0; border: 1px solid var(--border); border-radius: .35rem; }
legend { padding: 0 .35rem; }
.raw { display: grid; gap: .25rem; }
.raw form { margin-top: .5rem; }
.raw-send { display: flex; flex-wrap: wrap; gap: .55rem; }
.raw-send input { flex: 1 1 16rem; min-width: 0; }
textarea, #raw { font-family: ui-monospace, monospace; }
textarea { display: block; margin-top: .75rem; resize: vertical; font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
