
[hidden] { display: none !important; }  /* the stacked tables below set display on rows; hidden rows stay hidden */
body { font: 15px/1.45 system-ui, sans-serif; margin: 0; color: #1d1d1f; background: #fafafa; }
header { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px;
         background: #fff; border-bottom: 1px solid #ddd; }
h1 { font-size: 20px; margin: 0; }
main { max-width: 1000px; margin: 0 auto; padding: 16px 24px 48px; }
section { background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 12px 18px; margin: 16px 0; }
h2 { font-size: 17px; margin: 4px 0 10px; }
h3 { font-size: 15px; margin: 14px 0 6px; }
h4 { font-size: 14px; margin: 10px 0 4px; color: #444; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 4px 8px; border-bottom: 1px solid #eee; vertical-align: top; }
dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; }
dt { color: #555; }
dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
ul, ol { margin: 4px 0; padding-left: 20px; }
.meta, .note, .key { color: #666; font-size: 13px; }
.sev { font-weight: 600; text-transform: uppercase; font-size: 12px; margin-right: 6px; }
.sev-critical { color: #b00020; } .sev-high { color: #c25400; }
.state-late, .state-never, .error { color: #b00020; font-weight: 600; }
button { font: inherit; padding: 4px 12px; margin-left: 8px; }
.editor { border-top: 1px dashed #ccc; margin-top: 10px; padding-top: 8px; }
.editor button:first-child, .route button:first-child { margin-left: 0; }
.editor textarea { width: 100%; max-width: 480px; font: 14px/1.4 ui-monospace, monospace; }
.route { border: 1px solid #e3e3e3; border-radius: 4px; padding: 6px 8px; margin: 6px 0; }
.route label { display: inline-block; margin: 2px 12px 2px 0; font-size: 13px; color: #444; }
.route input[type=text] { width: 150px; }
.flash { background: #eef7ee; border: 1px solid #9c9; padding: 8px 12px; border-radius: 4px; }
.flash.warn, .warnbar { background: #fff4e5; border-color: #e0a050; }
.warnbar { padding: 8px 12px; border: 1px solid #e0a050; border-radius: 6px; }
nav.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0 0; border-bottom: 1px solid #ddd; }
nav.tabs a { padding: 6px 14px; color: #1d1d1f; text-decoration: none; border: 1px solid transparent;
             border-bottom: none; border-radius: 6px 6px 0 0; }
nav.tabs a[aria-current="page"] { background: #fff; border-color: #ddd; font-weight: 600; }
.table-wrap { overflow-x: auto; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
.result-alarm, .state-overdue, .late { color: #b00020; font-weight: 600; }
.result-unknown, .state-due { color: #c25400; }
.stale { color: #b00020; }
tr.plain-in-git { background: #fdecee; }  /* the Webhooks tab: a webhook written in git as plain text */
.spark { font: 12px/1 ui-monospace, monospace; white-space: nowrap; }  /* 24 hours on one line */
.verdict { padding: 8px 12px; border: 1px solid; border-radius: 6px; font-weight: 600; }
.verdict.clear { background: #eef7ee; border-color: #9c9; }
.verdict.waiting { background: #fdecee; border-color: #e08a96; }
.verdict.unsure { background: #fff4e5; border-color: #e0a050; }
/* A tablet: tighter tables, so the wide ones fit. */
@media (max-width: 820px) {
  th, td { padding: 4px 5px; font-size: 14px; }
  td { overflow-wrap: break-word; }  /* long values (refs, addresses) break; words and numbers stay whole */
}
/* A phone: less margin, settings and tables stacked (each row a card, each cell labelled by its column). */
@media (max-width: 600px) {
  header { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  main { padding: 8px 12px 32px; }
  section { padding: 10px 12px; }
  dl { grid-template-columns: 1fr; gap: 0; }
  dd { margin: 0 0 6px 12px; }
  .table-wrap table, .table-wrap tr, .table-wrap td { display: block; }
  .table-wrap tr:first-child { display: none; }
  .table-wrap tr { border-bottom: 1px solid #ddd; padding: 6px 0; }
  .table-wrap td { border: none; padding: 2px 4px; display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 8px;
                   overflow-wrap: anywhere; }
  .table-wrap td::before { content: attr(data-label); color: #555; font-weight: normal; }
}
/* A finger (a touch screen, or any screen up to tablet width): every control at least 44 px. */
@media (pointer: coarse), (max-width: 820px) {
  button, select, input[type=text] { min-height: 44px; }
  nav.tabs a { display: inline-flex; align-items: center; min-height: 44px; }
  input[type=checkbox] { width: 22px; height: 22px; vertical-align: middle; }
  label:has(input[type=checkbox]) { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
  td a { display: inline-block; padding: 12px 4px; margin: -12px -4px; white-space: nowrap; }
}
