:root {
  font: 16px/1.5 system-ui, sans-serif;
  color: #182345;
  background: #eef2ff;
  --royal: #3456c8;
  --line: #c5cfee;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem max(1rem, calc((100% - 54rem) / 2)); background: #233c9e; color: white;
}
header strong { font-size: 1.25rem; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand img { border-radius: 9px; box-shadow: 0 0 0 2px #ffffff55; }
.address { font-size: 1.35rem; font-weight: 700; letter-spacing: .04em; color: var(--royal); font-variant-numeric: tabular-nums; margin: .15rem 0; }
main { width: min(54rem, calc(100% - 2rem)); margin: 2rem auto; }
nav, .row, .actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
nav { margin-bottom: 1rem; }
.row { justify-content: space-between; }
section {
  background: white; border: 1px solid var(--line); padding: clamp(1rem, 4vw, 2rem);
  border-radius: 1.1rem; box-shadow: 0 .6rem 2rem #25377612;
}
h1 { color: #233c9e; margin: 0 0 .75rem; line-height: 1.2; }
label { display: block; font-weight: 600; margin: .85rem 0 .3rem; }
input, button { min-height: 46px; border: 1px solid var(--line); border-radius: .55rem; font: inherit; }
input { width: 100%; padding: .5rem .7rem; color: inherit; }
button { padding: .48rem .85rem; cursor: pointer; color: #233c9e; background: #f5f7ff; }
button.primary, button[aria-pressed="true"] { background: var(--royal); color: white; border-color: var(--royal); }
:focus-visible { outline: 3px solid #708cff; outline-offset: 3px; }
form button { margin-top: 1rem; }
#notice { background: #e3eaff; border-radius: .55rem; padding: .7rem 1rem; }
#devices { padding: 0; list-style: none; margin-bottom: 0; }
#devices li { border-top: 1px solid var(--line); padding: .8rem 0; overflow-wrap: anywhere; }
#devices small { display: block; color: #4c5672; margin-bottom: .4rem; }
.badge { display: inline-block; margin-left: .5rem; padding: .1rem .55rem; border-radius: 1rem; font-size: .85rem; background: #e4e7ef; color: #3b4256; }
.badge.on { background: #d5f5e0; color: #0d5a2b; }
.tags { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .4rem; }
.tags span { font-size: .85rem; padding: .05rem .5rem; border: 1px solid var(--line); border-radius: .4rem; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f5f7ff; padding: .7rem; border-radius: .55rem; }
details { margin-top: 1.2rem; border-top: 1px solid var(--line); padding-top: .8rem; }
summary { cursor: pointer; font-weight: 600; min-height: 46px; display: flex; align-items: center; }
#audit { padding-left: 1rem; font-size: .9rem; overflow-wrap: anywhere; }
#security .actions { margin-top: .8rem; }
.recovery { font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; columns: 2; }
small { display: block; color: #4c5672; margin-top: .3rem; }
@media (prefers-color-scheme: dark) {
  :root { background: #11182b; color: #ecf0ff; --line: #52618b; }
  section, input { background: #1c2848; }
  h1 { color: #adc0ff; }
  #notice { background: #263964; }
  #devices small { color: #c1cbe8; }
  pre { background: #263964; }
  .address { color: #adc0ff; }
  small { color: #c1cbe8; }
  .badge { background: #34406a; color: #e1e6f7; }
  .badge.on { background: #1f5a37; color: #dcffe8; }
}
