:root {
  --sig-up: #1f9d55;
  --sig-down: #d64545;
  --sig-degraded: #d68a1f;
  --sig-muted: #8a94a6;
}
:root:not([data-theme="dark"]), [data-theme="light"] {
  --pico-font-size: 95%;
}
@media (min-width: 1280px) { .container { max-width: 1200px; } }

nav .brand { font-weight: 700; display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; }
.logo { width: .8rem; height: .8rem; border-radius: 50%; background: var(--sig-up); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sig-up) 25%, transparent); }
.muted { color: var(--sig-muted); }
.small { font-size: .85em; }
.mono { font-family: var(--pico-font-family-monospace); }
.error { color: var(--sig-down); }
.error-box { border-left: 4px solid var(--sig-down); padding: .5rem 1rem; margin-bottom: 1rem; background: color-mix(in srgb, var(--sig-down) 8%, transparent); }
.notice, .flash { border-left: 4px solid var(--pico-primary); padding: .5rem 1rem; background: color-mix(in srgb, var(--pico-primary) 8%, transparent); }
.narrow { max-width: 420px; margin: 3rem auto; }
.inline { display: inline; margin: 0; }
.small-btn { padding: .25rem .6rem; font-size: .85em; width: auto; margin: 0; }
.danger { --pico-color: var(--sig-down); --pico-border-color: var(--sig-down); }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h2 { margin-bottom: .25rem; }
.page-head p { margin: 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.actions button, .actions [role=button] { margin: 0; }

.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #fff; background: var(--sig-muted); vertical-align: middle; }
.badge.up { background: var(--sig-up); }
.badge.down { background: var(--sig-down); }
.badge.degraded { background: var(--sig-degraded); }

.url-row { grid-template-columns: 9rem 1fr; }
.rows { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .75rem; }
.row { display: grid; gap: .5rem; align-items: start; }
.row > * { margin: 0 !important; }
.header-row { grid-template-columns: 1fr 2fr 7rem auto; }
.assertion-row { grid-template-columns: 10rem 1fr 9rem 2fr auto; }
.assertion-row [data-path][hidden] { display: block; visibility: hidden; }
@media (max-width: 768px) {
  .header-row, .assertion-row, .url-row { grid-template-columns: 1fr; }
}

.regions { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.regions label { margin: 0; }
.ranges { display: flex; gap: 1rem; margin-bottom: 1rem; }
.ranges a[aria-current] { font-weight: 700; text-decoration: underline; }
.chart { min-height: 300px; width: 100%; }
.result-details { margin: .25rem 0 0; }
.result-details summary { max-width: 40rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assertions { list-style: none; padding: 0; }
.assertions li { list-style: none; margin-bottom: .25rem; }
.assertions .pass { color: var(--sig-up); }
.assertions .fail { color: var(--sig-down); }
.token-box pre { white-space: pre-wrap; word-break: break-all; }
footer { margin-top: 2rem; }

/* region phase bars */
.group-toggle { float: right; }
.group-toggle a[aria-current] { font-weight: 700; text-decoration: underline; }
.phase-col { min-width: 16rem; width: 40%; }
.phases { display: flex; height: .9rem; border-radius: 3px; overflow: hidden; background: color-mix(in srgb, var(--sig-muted) 15%, transparent); }
.ph { display: inline-block; height: 100%; }
.legend .ph { width: .8rem; height: .8rem; border-radius: 2px; vertical-align: middle; margin-left: .75rem; }
.legend .ph:first-child { margin-left: 0; }
.ph.dns { background: #8e44ad; }
.ph.connect { background: #16a2b8; }
.ph.tls { background: #d68a1f; }
.ph.server { background: #3c71f7; }
.ph.xfer { background: #1f9d55; }

.vitals { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .75rem; margin-bottom: .75rem; }
.vitals > div { display: flex; flex-direction: column; }
.messages { margin: .25rem 0 .5rem; padding-left: 1rem; overflow-wrap: anywhere; }
.messages li { list-style: disc; }
.screenshot { max-width: 100%; border: 1px solid var(--pico-muted-border-color); border-radius: 4px; }
.requests td.url { max-width: 32rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.requests tr.failed td { color: var(--pico-del-color); }
.wf-col { min-width: 12rem; }
.wf { position: relative; height: .6rem; background: rgba(128,128,128,.12); border-radius: 2px; }
.wf span { display: block; height: 100%; background: #3c71f7; border-radius: 2px; }
.requests tr.failed .wf span { background: #d64545; }
.error-notice { border-left: 4px solid #d64545; }
.chats { list-style: none; padding: 0; }
.chats li { list-style: none; margin: .25rem 0; }
.copy { white-space: pre-wrap; word-break: break-all; user-select: all; }
.role-form { display: flex; gap: .25rem; align-items: center; }
.role-form select { margin: 0; width: auto; }
