:root {
  color-scheme: light;
  --text: #172638;
  --background: #edf2f7;
  --accent: #135d67;
  --muted: #47576b;
  --surface: #fff;
  --border: #d6e0ea;
  --control-border: #bfd4da;
  --control-background: #eaf4f4;
  --control-text: #134e58;
  --control-hover: #dbeeee;
  --focus: #168190;
  font-family: system-ui, sans-serif;
  color: var(--text);
  background: var(--background);
  line-height: 1.55;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --text: #e7edf5;
  --background: #101720;
  --accent: #84dcd2;
  --muted: #b0bed0;
  --surface: #182330;
  --border: #364659;
  --control-border: #50727e;
  --control-background: #233743;
  --control-text: #a4e9e1;
  --control-hover: #304b57;
  --focus: #7ee0d4;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --text: #e7edf5;
    --background: #101720;
    --accent: #84dcd2;
    --muted: #b0bed0;
    --surface: #182330;
    --border: #364659;
    --control-border: #50727e;
    --control-background: #233743;
    --control-text: #a4e9e1;
    --control-hover: #304b57;
    --focus: #7ee0d4;
  }
}

* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(52rem, calc(100% - 2rem)); margin: 0 auto; padding: clamp(2rem, 7vw, 5rem) 0; }
.intro { margin-bottom: 2rem; }
.intro-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: .7rem; }
.brand { margin: 0; color: var(--accent); font-weight: 700; }
.theme-picker { position: relative; display: flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .875rem; }
.theme-picker select { appearance: none; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--control-border); border-radius: .55rem; padding: .4rem 1.65rem .4rem .6rem; cursor: pointer; }
.theme-picker::after { content: ""; position: absolute; right: .7rem; top: 45%; width: .35rem; height: .35rem; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg); pointer-events: none; }
h1 { margin: 0; font-size: clamp(2.5rem, 7vw, 4rem); line-height: 1.05; letter-spacing: -.06em; }
h2 { margin: 0; font-size: 1.125rem; }
p { margin: .65rem 0 0; color: var(--muted); }
.card { padding: clamp(1.15rem, 4vw, 2rem); margin-bottom: 1rem; border-radius: 1.25rem; background: var(--surface); border: 1px solid var(--border); }
.ip-line { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin: .55rem 0 0; }
code { color: var(--accent); font-size: clamp(1.35rem, 4vw, 2.35rem); overflow-wrap: anywhere; }
button { font: inherit; font-weight: 650; border: 1px solid var(--control-border); border-radius: .6rem; background: var(--control-background); color: var(--control-text); padding: .55rem .85rem; cursor: pointer; }
button:hover { background: var(--control-hover); }
button:disabled { cursor: wait; }
a { color: var(--accent); text-underline-offset: .16em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; border-top: 1px solid var(--border); padding-top: 1rem; margin: 1.25rem 0; }
dt, .note { font-size: .875rem; color: var(--muted); }
dd { font-weight: 650; margin: .2rem 0 0; overflow-wrap: anywhere; }
.device { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.device .status { width: 100%; }
.status:empty { display: none; }
.status { margin: .4rem 0 0; }

@media (max-width: 40rem) {
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
