:root {
  color-scheme: light;
  --paper: #f4f7fb;
  --white: #fff;
  --ink: #15233b;
  --muted: #506078;
  --line: #dce4ee;
  --blue: #1e4bc3;
  --blue-dark: #173c9f;
  font: 15px/1.55 Inter, system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: var(--blue); text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.top { background: var(--white); border-bottom: 1px solid var(--line); }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.nav, .nav nav, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.nav { min-height: 68px; justify-content: space-between; padding-block: 10px; }
.nav nav { gap: 20px; }
.nav nav a, .text-button { color: var(--muted); text-decoration: none; font-weight: 600; }
.nav nav a:hover, .text-button:hover { color: var(--blue); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--blue); color: #fff; border-radius: 9px; font-size: .83rem; }
.text-button { background: transparent; border: 0; padding: 0; }
main { padding-block: 38px 54px; }
main.narrow { max-width: 440px; margin-top: 5vh; }
main.form-page { max-width: 660px; }
.heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 4vw, 2.4rem); letter-spacing: -.035em; line-height: 1.15; overflow-wrap: anywhere; }
h2 { font-size: 1.2rem; margin-bottom: 14px; }
h3 { font-size: 1rem; margin: 22px 0 8px; }
p { margin-block: 8px; }
.muted, small { color: var(--muted); }
.note, small { font-size: .86rem; }
.note { margin-block: 12px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: clamp(16px, 3vw, 25px); min-width: 0; }
.card > h1 { margin-bottom: 16px; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px 13px; background: var(--white); color: var(--ink); font-weight: 650; text-decoration: none; width: fit-content; }
.button:hover { background: var(--paper); }
.button.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.button.primary:hover { background: var(--blue-dark); }
.button.small { padding: 5px 10px; font-size: .86rem; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.metrics.overview { gap: 15px; margin-bottom: 20px; }
.metric { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.metric span { color: var(--muted); font-size: .86rem; }
.metric strong { font-size: 1.7rem; line-height: 1.2; overflow-wrap: anywhere; }
.metric.inset { background: var(--paper); padding: 12px; border-radius: 8px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 9px; }
th { background: var(--paper); color: var(--muted); font-size: .83rem; white-space: nowrap; }
td { overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
.ellipsis { display: block; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-link { color: var(--ink); font-weight: 700; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .8rem; font-weight: 650; }
.badge.live { background: #e6f7ee; color: #246347; }
.badge.paused { background: #fff1d8; color: #855014; }
.stack { display: grid; gap: 15px; }
label { display: grid; gap: 5px; font-weight: 650; }
label small { font-weight: 400; }
input, select, textarea { width: 100%; min-width: 0; padding: 9px 11px; border-radius: 7px; border: 1px solid #a8b7c9; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.notice { border: 1px solid #a7d7be; border-radius: 8px; background: #e8f7ee; color: #23513d; padding: 10px 14px; margin: 0 0 16px; }
.notice.error { background: #fff0ef; color: #852c36; border-color: #e6b7bc; }
.back { display: inline-block; margin-bottom: 14px; font-weight: 650; }
.detail-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
.detail-heading h1 { margin-bottom: 8px; }
.section-heading { margin-bottom: 14px; }
.section-heading h2 { margin: 0; }
.qr-image { display: block; width: min(100%, 224px); height: auto; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.destination { overflow-wrap: anywhere; }
[data-copy] { margin-top: 8px; }
.chart { display: block; width: 100%; height: 130px; }
.chart rect { fill: var(--blue); }
.chart line { stroke: var(--line); }
.chart-labels, .device-list div { display: flex; justify-content: space-between; gap: 8px; }
.chart-labels { font-size: .8rem; }
.device-list div { padding-block: 5px; border-bottom: 1px solid var(--line); }
@media (max-width: 720px) {
  .wrap { width: calc(100% - 28px); }
  .detail-grid { grid-template-columns: 1fr; }
  .nav nav { gap: 12px; }
  main { padding-top: 25px; }
  .metrics.overview { gap: 7px; }
  .metrics.overview .card { padding: 10px; }
}
