
/* Hallmark · pre-emit critique: P4 H5 E4 S5 R5 V4 */
:root {
  --metric-line: #3a526e;
  --shade: #13294592;
  --shadow: #16335920;
}
* { box-sizing: border-box }
html, body { min-height: 100%; margin: 0; overflow-x: clip }
body { background: var(--bg); color: var(--ink) }
[hidden] { display: none !important }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px }
a { color: inherit; text-underline-offset: .18em }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere }
h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.05; letter-spacing: -.055em; font-weight: 760 }
h2 { font-size: 20px; letter-spacing: -.02em }
h3 { font-size: 15px }
button, input, select {
  font: inherit; color: inherit; background: var(--paper); min-width: 0; min-height: 44px;
  padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px;
}
button { cursor: pointer; font-weight: 600 }
button:hover, summary:hover { background: var(--blue-soft) }
button:active { border-color: var(--nav-active) }
button:disabled { opacity: .58; cursor: wait }
button.primary { background: var(--blue); border-color: var(--blue); color: var(--paper); padding-inline: 16px }
button.primary:hover { background: var(--blue-hover) }
input:not([type=checkbox]), select { width: 100% }
input[readonly] { background: var(--tint) }
input[type=checkbox] { width: 20px; min-height: 20px; margin: 0; accent-color: var(--blue) }
label { display: grid; gap: 5px; font-size: 14px; font-weight: 600; min-width: 0 }
label.check { display: flex; align-items: flex-start; gap: 9px; min-height: 32px }
label.check input { flex: 0 0 20px }
.shell { min-height: 100vh }
.brand, .login-mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; width: fit-content; font-size: 21px; font-weight: 760; letter-spacing: -.045em; white-space: nowrap }
.brand-symbol { display: block; flex-shrink: 0 }
.login-mark { font-size: 28px }
.app-actions { justify-self: end; display: flex; align-items: center; gap: 8px }
.download { position: relative; z-index: 1 }
summary { cursor: pointer; border-radius: 7px; color: var(--nav-active); font-weight: 650 }
.download summary { list-style: none; display: flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 14px }
.download summary::after { content: "⌄"; margin-left: 6px }
.download-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: max-content; display: grid;
  padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: 0 10px 24px var(--shadow);
}
.download-menu a { padding: 10px 13px; border-radius: 6px; text-decoration: none; font-size: 14px }
.download-menu a:hover { background: var(--blue-soft) }
.topline, .content { width: min(100%, 1350px); margin-inline: auto; padding-inline: clamp(16px, 5vw, 72px) }
.topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; color: var(--muted); font-size: 14px }
.content { padding-block: 12px 48px }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px }
.pagehead p { margin-top: 7px; color: var(--muted) }
.box { border: 1px solid var(--line); background: var(--paper); border-radius: 12px }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 20px; background: var(--navy); color: var(--paper); border-color: var(--navy) }
.metric { min-width: 0; padding: 17px 20px }
.metric:not(:last-child) { border-right: 1px solid var(--metric-line) }
.metric dt { font-size: 14px; color: var(--metric-label) }
.metric dd { margin: 8px 0 0; font-size: clamp(20px, 3vw, 30px); line-height: 1.2; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; overflow-wrap: anywhere }
.metric:first-child dd { color: var(--lime) }
.panelbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 15px 19px; border-bottom: 1px solid var(--line) }
.panelbar label { display: flex; align-items: center; gap: 8px }
.panelbar select { width: auto; max-width: 100% }
.list { padding: 0 18px }
.row {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.18fr) minmax(0, .85fr) minmax(0, .82fr) minmax(0, 1.05fr);
  align-items: center; gap: 12px; padding: 12px 2px; min-height: 61px; border-bottom: 1px solid var(--line)
}
.row:last-child { border: 0 }
.row.heading { font-size: 13px; color: var(--muted); min-height: 40px; padding-block: 8px }
.row > div { min-width: 0; overflow-wrap: anywhere }
.row.site { grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)) }
.row.device { grid-template-columns: 23px minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.15fr) }
.row.country { grid-template-columns: minmax(0, .5fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .9fr) }
.row-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px }
.row-controls button { font-size: 14px }
.secondary, .empty, .mono { color: var(--muted) }
.secondary { font-size: 13px; line-height: 1.4 }
.mono { font-variant-numeric: tabular-nums; font-size: 13px }
.badge, .country-code { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; background: var(--blue-soft); color: var(--nav-active); font-size: 13px; font-weight: 650 }
.badge::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor }
.good { background: var(--good-bg); color: var(--good) }
.warn { background: var(--warn-bg); color: var(--warn) }
.bad, .error { color: var(--bad) }
.bad { background: var(--bad-bg) }
.danger { color: var(--bad) }
.empty { padding: 40px 18px; text-align: center }
.notice { position: fixed; right: 16px; bottom: 16px; max-width: min(410px, calc(100% - 32px)); padding: 12px 18px; border-radius: 9px; background: var(--navy); color: var(--paper); overflow-wrap: anywhere }
.login { min-height: 100vh; display: grid; justify-items: center; align-content: center; gap: 22px; padding: 16px }
.login-form { display: grid; gap: 17px; width: min(100%, 470px); padding: clamp(18px, 5vw, 32px) }
.login-form h1 { font-size: 34px }
.error { font-size: 14px }
.error:empty { display: none }
dialog {
  width: min(590px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; border: 1px solid var(--line);
  border-radius: 12px; color: var(--ink); background: var(--paper); box-shadow: 0 20px 70px var(--shadow)
}
dialog::backdrop { background: var(--shade) }
dialog form { display: grid; gap: 16px; padding: 20px }
.dialog-top, .actions { display: flex; align-items: center; justify-content: space-between; gap: 10px }
.actions { justify-content: flex-end; flex-wrap: wrap }
.actions button { white-space: nowrap }
.icon-close { position: relative; flex: 0 0 44px; width: 44px; height: 44px }
.icon-close::before, .icon-close::after { content: ""; position: absolute; top: calc(50% - 1px); left: calc(50% - 6px); width: 12px; height: 2px; border-radius: 1px; background: currentColor; transform: rotate(45deg) }
.icon-close::after { transform: rotate(-45deg) }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px }
.fields .full { grid-column: 1 / -1 }
.fields p { font-size: 14px; color: var(--muted) }
.advanced { margin-top: 3px; border-top: 1px solid var(--line); padding-top: 7px }
.advanced summary { padding: 7px 5px; font-size: 14px }
.advanced > .fields { padding: 7px 0 2px }
.service-actions { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 3px }
.service-actions h3 { margin-bottom: 8px }
.service-actions > div { display: flex; flex-wrap: wrap; gap: 7px }
.service-actions button { font-size: 14px }
@media (max-width: 800px) {
  .row-controls { justify-content: flex-start }
}
@media (max-width: 675px) {
  .topline { min-height: 46px }
  .content { padding-top: 9px }
  .pagehead { align-items: flex-start; flex-direction: column; gap: 11px }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .metric:nth-child(2) { border-right: 0 }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--metric-line) }
  .list { padding: 0 12px }
  .row, .row.site, .row.device { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px 1px }
  .row.country { grid-template-columns: minmax(0, .55fr) minmax(0, 1.45fr); gap: 10px }
  .row.heading { display: none }
  .row > div[data-label]::before { display: block; content: attr(data-label); font-size: 12px; color: var(--muted) }
  .row-controls { grid-column: 1 / -1 }
  .row.device > div:first-child { grid-row: 1; grid-column: 2; justify-self: end }
  .row.device > div:nth-child(2) { grid-row: 1; grid-column: 1 }
  .panelbar label { flex-wrap: wrap }
}
@media (max-width: 380px) {
  .brand { gap: 7px; font-size: 18px }
  .brand .brand-symbol { width: 34px; height: 34px }
  .app-actions { gap: 3px }
  .app-actions button, .app-actions summary { padding-inline: 7px; font-size: 14px }
  .fields { grid-template-columns: minmax(0, 1fr) }
  .topline, .mono { font-size: 12px }
}

