:root {
  --accent: #1157a0;
  --green: #11a07d;
  --nav: #1b334f;
  --nav-active: #111f31;
  --icon: #8f9da8;
  --border: #8f9da8;
  --text: #2f2f2f;
  --muted: #5c6b76;
  --page: #f2f6f9;
  --header: #dbe1e6;
  --warn: #b59025;
  --danger: #a12626;
  --shadow: 0 2px 2px rgba(0,0,0,.1);
  --toolbar: 60px;
  --navw: 240px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font: 16px/1.5 system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1c2830;
  background: var(--page);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

.account { display: flex; min-height: 100%; background: var(--page); }
.account-side { flex: 0 0 460px; padding: 72px 48px 24px; overflow: auto; }
.account-hero {
  flex: 1; position: relative;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.08), transparent 40%),
    linear-gradient(160deg, #1b334f 0%, #1157a0 70%, #0e3f72 100%);
  color: #fff;
}
.account-hero .blurb { position: absolute; left: 40px; bottom: 36px; right: 40px; }
.account-hero h2 { margin: 0 0 6px; font-weight: 600; }
.account-hero p { margin: 0; opacity: .9; font-size: 14px; }
.brand-logo { height: 32px; width: auto; display: block; }
.account .brand-logo { height: 40px; }
.account h1 { font-size: 28px; font-weight: 600; margin: 48px 0 18px; }
.field { margin: 0 0 14px; }
.field label, .filter label, .checkline { display: block; font-size: 13px; margin-bottom: 4px; }
.field input, .field select, .field textarea,
.filter input, .filter select, .dialog input, .dialog select, .dialog textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 2px; background: #fff;
}
.hint { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.error { color: var(--danger); font-size: 13px; min-height: 1.1em; }
.btn {
  border: 1px solid var(--border); background: #fff; border-radius: 2px;
  padding: 7px 14px; line-height: 1.2;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--danger); border-color: #d7a3a3; }
.btn:disabled { opacity: .45; cursor: default; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.text-btn { background: none; border: 0; color: var(--accent); padding: 0; }
.banner { background: #e5f4ef; border: 1px solid #b7e0d4; padding: 8px 10px; margin: 0 0 12px; font-size: 14px; }
.banner.warn { background: #fbf6ea; border-color: #ead7a4; }
.validation-summary-errors, .field-validation-error { color: var(--danger); font-size: 13px; }
.validation-summary-errors ul { margin: 0 0 8px; padding-left: 1.1rem; }

.shell {
  height: 100%; display: grid;
  grid-template-rows: var(--toolbar) 1fr;
  grid-template-columns: var(--navw) 1fr;
}
.shell.nav-shut { grid-template-columns: 0 1fr; }
.shell.nav-shut .sidenav { overflow: hidden; }
.topbar {
  grid-column: 1 / -1; height: var(--toolbar); background: #fff;
  box-shadow: 0 0 8px rgba(0,0,0,.25); display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 30; padding-right: 18px;
}
.brand { display: flex; align-items: center; gap: 8px; }
.menu-btn { width: 64px; height: var(--toolbar); border: 0; background: transparent; color: #8a8a8a; font-size: 20px; }
.menu-btn:hover { color: #222; }
.product-name { color: var(--text); font-size: 15px; margin-left: 8px; padding-left: 12px; border-left: 1px solid #d5dde3; }
.user-btn { border: 0; background: transparent; padding: 8px; }
.user-menu {
  position: absolute; right: 12px; top: 52px; background: #fff;
  border: 1px solid #d5dde3; box-shadow: var(--shadow); min-width: 220px; z-index: 40;
}
.user-menu a, .user-menu button {
  display: block; width: 100%; text-align: left; background: #fff; border: 0;
  padding: 10px 14px; color: inherit; text-decoration: none;
}
.user-menu a:hover, .user-menu button:hover { background: var(--page); }
.sidenav { background: var(--nav); color: #fff; padding-top: 10px; display: flex; flex-direction: column; min-height: 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  color: #fff; background: transparent; border: 0; border-left: 4px solid transparent;
  padding: 12px 12px 12px 16px; text-align: left; font-size: 15px; text-decoration: none;
}
.nav-item .ico { color: var(--icon); width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 18px; }
.nav-item .ico svg { width: 18px; height: 18px; display: block; }
.nav-item:hover, .nav-item.on { background: var(--nav-active); color: #fff; }
.nav-item.on { border-left-color: var(--accent); }
.nav-sub { display: flex; flex-direction: column; background: rgba(0,0,0,.18); }
.nav-sub a { color: #fff; text-decoration: none; padding: 8px 16px 8px 44px; font-size: 14px; }
.nav-sub a.on, .nav-sub a:hover { background: var(--nav-active); }
.canary-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; margin: 0 4px 4px 0; }
.canary-chip.pass { background: #e7f6ee; color: #1f7a4d; }
.canary-chip.warn { background: #fff6e0; color: #8a5a00; }
.canary-chip.fail { background: #fdecec; color: #9d2c2c; }
.canary-chip.idle { background: #eef2f6; color: #5c6b7a; }
.inline-form { display: inline; }
.nav-foot { margin-top: auto; padding: 12px 16px 16px; color: #8f9da8; font-size: 11px; }
.workspace { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.workspace-fill { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.page-head {
  height: 60px; background: var(--header); display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; flex: 0 0 60px;
}
.page-head h1 { font-size: 16px; margin: 0; font-weight: 600; }
.page-head .head-title { display: flex; align-items: center; min-width: 0; }
.tabs { display: flex; align-items: stretch; height: 60px; margin-left: 28px; position: relative; z-index: 2; }
.tabs button, .tabs a.tab {
  border: 0; background: transparent; padding: 0 16px; border-bottom: 3px solid transparent;
  color: inherit; text-decoration: none; display: flex; align-items: center;
}
.tabs button.on, .tabs a.tab.on { background: #fff; color: var(--accent); border-bottom-color: var(--accent); }
.page-body { flex: 1; overflow: auto; padding: 16px 20px 24px; }
.card { background: #fff; box-shadow: var(--shadow); padding: 16px 16px 8px; }
.sites-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.sites-toolbar .filters { flex: 1; margin-bottom: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 12px; }
.filter { min-width: 140px; }
.filter input { width: 160px; padding: 6px 8px; }
.filter select {
  /* 192px keeps the previous 142px of label text beside the 36px chevron square. */
  width: 192px;
  height: calc(0.75rem + 1.5em + 2px);
  padding: 0.375rem calc(0.75rem + 1.5em) 0.375rem 0.75rem;
  border: 1px solid rgba(33, 37, 41, 0.125);
  border-radius: 0.25rem;
  background-color: #fff;
  color: #212529;
  line-height: 1.5;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23212529' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M4 6.2l4 4 4-4'/%3E%3C/svg%3E"),
    linear-gradient(#e4e7eb, #e4e7eb);
  background-repeat: no-repeat, no-repeat;
  background-position: right calc((0.75rem + 1.5em - 14px) / 2) center, right 0 center;
  background-size: 14px 14px, calc(0.75rem + 1.5em) 100%;
}
.filter select:hover:not(:disabled) {
  border-color: #c7cdd5;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23212529' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M4 6.2l4 4 4-4'/%3E%3C/svg%3E"),
    linear-gradient(#ced3db, #ced3db);
}
.filter select:focus {
  outline: none;
  border-color: #e4e7eb;
  box-shadow: 0 0 0 3px rgba(228, 231, 235, 0.5);
}
.filter select:disabled { opacity: 0.65; cursor: default; }
.filter-search { margin-left: auto; }
.filter-search input {
  width: 240px; height: 34px; border: 1px solid var(--border); border-radius: 20px;
  padding: 4px 16px; background: #fff;
}
.filter-search input:focus { outline: 2px solid rgba(17,87,160,.25); border-color: var(--accent); }
.summary { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { border: 1px solid #d5dde3; background: #fff; border-radius: 2px; padding: 4px 8px; font-size: 13px; }
.chip strong { color: var(--accent); }
.chip.on { border-color: var(--accent); background: #e7f0f8; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 13px; padding: 8px; border-bottom: 1px solid var(--border); background: #fff; position: sticky; top: 0; }
table.data td { padding: 8px; border-bottom: 1px solid rgba(143,157,168,.35); vertical-align: middle; }
table.wa-grid { border: 1px solid #dee2e6; }
table.wa-grid th { background: #f8f9fa; border-bottom: 1px solid #dee2e6; border-right: 1px solid #e9ecef; padding: 0; font-weight: 600; z-index: 1; }
table.wa-grid th .sort {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px;
  background: transparent; border: 0; padding: 10px 12px; font-weight: 600; font-size: 13px; color: #212529; text-align: left;
}
table.wa-grid th .sort .arrow { color: #adb5bd; font-size: 10px; opacity: 0; }
table.wa-grid th .sort:hover .arrow, table.wa-grid th .sort.on .arrow { opacity: 1; }
table.wa-grid th .sort.on .arrow { color: var(--accent); }
table.wa-grid td { border-right: 1px solid #eef1f4; padding: 8px 12px; }
table.wa-grid th.check, table.wa-grid td.check { width: 42px; text-align: center; padding: 8px; }
table.data tbody tr:nth-child(even) { background: rgba(169,228,247,.26); }
table.data tbody tr:hover { background: rgba(160,199,238,.58); }
table.data tbody tr.selected,
table.data tbody tr.selected:nth-child(even),
table.data tbody tr.selected:hover {
  background: #c5dcf3;
  box-shadow: inset 4px 0 0 var(--accent);
}
table.data tbody tr.selected .linkish { color: #0c3f78; font-weight: 700; }
.ver-input { width: 9.5rem; padding: 4px 8px; border: 1px solid #c5d0d8; border-radius: 2px; background: #fff; }
.ver-input:focus { border-color: var(--accent); outline: 2px solid rgba(17,87,160,.2); }
.ver-input.invalid { border-color: var(--danger); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; color: #fff; }
.pill.Ok { background: var(--green); }
.pill.Warning { background: var(--warn); }
.pill.Error { background: var(--danger); }
.pill.Critical { background: #6e1212; }
.pill.Unknown { background: var(--icon); }
.due { color: var(--warn); font-size: 12px; }
.overdue { color: var(--danger); font-weight: 700; font-size: 12px; }
.muted { color: var(--muted); }
.selection-bar {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-top: 1px solid #d5dde3; padding: 10px 20px; flex: 0 0 auto;
}
.spacer { flex: 1; }
.split { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 16px; }
dl.facts { display: grid; grid-template-columns: 160px 1fr; gap: 6px 10px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.linkish { background: none; border: 0; color: var(--accent); padding: 0; text-align: left; }
a.linkish { text-decoration: none; cursor: pointer; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; font-size: 14px; }
.section-title { font-size: 15px; margin: 18px 0 8px; }
.section-title:first-child { margin-top: 0; }
.notice { background: #e7f0f8; border: 1px solid #c5d7e8; padding: 8px 10px; margin-bottom: 12px; }
.pager { display: flex; align-items: center; gap: 8px; margin-top: 12px; }

.modal {
  position: fixed; inset: 0; background: rgba(17,31,49,.45); z-index: 80;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow: auto;
}
.dialog { background: #fff; width: min(880px, 100%); box-shadow: 0 8px 28px rgba(0,0,0,.25); }
.dialog.narrow { width: min(480px, 100%); }
.dialog header, .dialog footer { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--header); }
.dialog header h2 { margin: 0; font-size: 16px; flex: 1; }
.dialog .body { padding: 16px; max-height: calc(100vh - 220px); overflow: auto; }
.dialog .x { border: 0; background: transparent; font-size: 18px; }
.steps { display: flex; gap: 0; margin-bottom: 14px; }
.steps span { flex: 1; text-align: center; font-size: 13px; padding: 6px 4px; background: var(--page); border-bottom: 3px solid transparent; color: var(--muted); }
.steps span.on { color: var(--accent); border-bottom-color: var(--accent); background: #fff; font-weight: 700; }
.steps span.done { color: var(--text); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkline input { width: auto; margin-right: 6px; }
.ask-gap { margin-top: 16px; }
#toast {
  position: fixed; right: 16px; bottom: 16px; z-index: 120;
  background: #1b334f; color: #fff; padding: 10px 14px; max-width: 360px; box-shadow: var(--shadow);
}
.actions { display: flex; gap: 8px; }
.picker { max-height: 280px; overflow: auto; background: #fff; border: 1px solid var(--border); padding: 8px 10px; }
.rule-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin-bottom: 12px; }
.print-report { display: none; margin-top: 24px; background: #fff; padding: 16px; box-shadow: var(--shadow); }
.print-report header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.print-report h2 { margin: 0; font-size: 18px; }
.print-report .meta { color: var(--muted); font-size: 13px; }
.group-head { margin: 18px 0 8px; }
.group-head h2 { margin: 0; font-size: 16px; }
@media print {
  .topbar, .sidenav, .no-print, .page-head, .sites-toolbar, .selection-bar, #toast, .user-menu, .menu-btn { display: none !important; }
  .shell, .workspace, .workspace-fill, .page-body { display: block; height: auto; overflow: visible; }
  .print-report { display: block; box-shadow: none; margin: 0; padding: 0; }
  body { background: #fff; }
}
@media (max-width: 900px) {
  .account { display: block; overflow: auto; }
  .account-hero { min-height: 140px; }
  .account-side { flex-basis: auto; }
  .split, .cols { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 0 1fr; }
  .filter-search { margin-left: 0; }
  .canary .teach-grid, .canary .diff { grid-template-columns: 1fr; }
}

.canary { max-width: 1100px; font-size: 15px; line-height: 1.45; color: #1c2830; }
.canary h1 { font-size: 22px; margin: 0 0 8px; font-weight: 650; }
.canary h2 { font-size: 16px; margin: 18px 0 8px; }
.canary h3 { font-size: 14px; margin: 12px 0 4px; }
.canary p { margin: 6px 0; }
.canary .muted { color: #5c6b76; }
.canary .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.canary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 12px 0; }
.canary .methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.canary-card, .canary .panel {
  background: #fff; border: 1px solid #d5dde3; border-radius: 10px; padding: 12px 14px; margin: 0 0 12px;
  box-shadow: none;
}
.canary-grid > .canary-card, .canary .methods > .canary-card { margin: 0; }
.canary .stat b { display: block; font-size: 22px; }
.canary label.field { display: block; margin: 8px 0; }
.canary label.field > span, .canary .k { display: block; font-size: 12px; color: #5c6b76; margin-bottom: 3px; font-weight: 400; }
.canary .field input, .canary .field select, .canary .field textarea,
.canary label.field input, .canary label.field select, .canary label.field textarea {
  width: 100%; border: 1px solid #d5dde3; border-radius: 8px; padding: 7px 8px; background: #fff;
}
.canary table.data { background: #fff; border-collapse: collapse; }
.canary table.data th, .canary table.data td { border-bottom: 1px solid #d5dde3; padding: 8px 10px; }
.canary table.data th { background: #f4f7fb; font-size: 12px; font-weight: 650; position: static; }
.canary table.data tbody tr:nth-child(even),
.canary table.data tbody tr:hover { background: #fff; }
.canary .btn { display: inline-block; background: #1b334f; color: #fff; border: 0; border-radius: 8px; padding: 8px 12px; line-height: 1.2; text-decoration: none; }
.canary a.btn:hover, .canary a.btn:focus { color: #fff; text-decoration: none; }
.canary .btn.secondary { background: #fff; color: #1c2830; border: 1px solid #d5dde3; }
.canary a.btn.secondary, .canary a.btn.secondary:hover, .canary a.btn.secondary:focus { color: #1c2830; }
.canary .btn.primary { background: #1b334f; border-color: #1b334f; color: #fff; }
.canary .linkish, .canary a.linkish { color: #1157a0; text-decoration: none; }
.canary code { font-family: Consolas, monospace; font-size: 12px; }
.canary .segment { display: inline-flex; border: 1px solid #d5dde3; border-radius: 8px; overflow: hidden; background: #fff; vertical-align: middle; }
.canary .segment a, .canary .segment label, .canary .segment button {
  position: relative; border: 0; background: #fff; padding: 6px 10px; color: #1c2830; text-decoration: none; margin: 0;
  display: inline-flex; align-items: center; cursor: pointer; font-size: 14px; font-weight: 400;
}
.canary .segment input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.canary .segment a.on, .canary .segment button.on,
.canary .segment label:has(input:checked) { background: #1b334f; color: #fff; }
.canary .steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.canary .steps span {
  flex: none; background: #fff; border: 1px solid #d5dde3; border-bottom: 1px solid #d5dde3;
  border-radius: 999px; padding: 4px 10px; font-size: 13px; color: inherit; font-weight: 400; text-align: left;
}
.canary .steps span.on { background: #1b334f; color: #fff; border-color: #1b334f; }
.canary .steps span.done { background: #e7f6ee; border-color: transparent; color: inherit; }
.canary .teach-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 14px; }
.canary:has(.teach-grid) { max-width: 1485px; }
.canary .browser { background: #fff; border: 1px solid #d5dde3; border-radius: 10px; overflow: hidden; min-height: 420px; }
.canary .chrome { display: flex; gap: 8px; align-items: center; background: #e6eef6; padding: 8px 10px; }
.canary .url { flex: 1; background: #fff; border-radius: 8px; padding: 4px 8px; font-family: Consolas, monospace; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.canary .school-bar { background: #1b334f; color: #fff; padding: 12px 14px; display: flex; justify-content: space-between; }
.canary .shot-page { padding: 14px; }
.canary .banner { background: #e8f1fb; border: 1px solid #c5daf3; border-radius: 10px; padding: 10px 12px; font-size: inherit; color: #1c2830; }
.canary fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
#canary-notice {
  position: fixed; z-index: 30; left: 50%; top: 84px; transform: translateX(-50%);
  min-width: 320px; max-width: 640px; background: #1f7a4d; color: #fff;
  padding: 22px 32px; border-radius: 14px; font-size: 22px; font-weight: 700;
  line-height: 1.35; text-align: center; box-shadow: 0 16px 48px rgba(15, 28, 43, .35);
}
.canary .banner.warn { background: #fff6e0; border-color: #efd7a2; }
.canary .step { padding: 6px 0; border-bottom: 1px solid #d5dde3; }
.canary .shot { border: 1px solid #d5dde3; border-radius: 10px; overflow: hidden; background: #fff; }
.canary .shot .cap { background: #f4f7fb; padding: 6px 10px; font-size: 12px; color: #5c6b76; }
.canary .diff { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 900px) {
  .canary .teach-grid.teach-grid,
  .canary .diff.diff { grid-template-columns: 1fr; }
}
.canary pre { white-space: pre-wrap; background: #0f1c2b; color: #d6e4f0; padding: 10px; border-radius: 8px; font-size: 12px; }
.canary details { background: #fff; border: 1px solid #d5dde3; border-radius: 10px; padding: 8px 12px; margin-top: 14px; }
.canary details summary { cursor: pointer; }
.canary .method-body[hidden] { display: none; }
.canary img.teach-shot { width: 100%; display: block; cursor: crosshair; }
.canary .search-field { max-width: 420px; }
.canary .checkline { display: block; margin: 8px 0; }
