/* The Watcher page (watcher/watcher.js; docs/watcher.md), in the calm redesign. Loaded after styles.css, so a rule here wins over
   the same rule there. Docs/Hub design standard.md has the rules. Colours only from the tokens in styles.css (light and dark alike). */

.wt-mode { margin: 10px 0 0; }

.wt-cols { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
@media (min-width: 900px) { .wt-cols { grid-template-columns: 1fr 1fr; } }

.wt-sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; margin-top: 16px; padding: 16px; border: 1px solid var(--calm-line); border-radius: var(--r-card); background: var(--surface); }
.wt-cols > .wt-sec { margin-top: 0; }
.wt-h { margin: 0; font: 700 1.05rem/1.3 var(--rt-body); color: var(--text); }

/* A status dot (and, for colour-blind readers, always the word beside it). */
.wt-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--rt-neutral); }
.wt-dot.ok { background: var(--rt-ok); }
.wt-dot.warn { background: var(--rt-warn); }
.wt-dot.fail { background: var(--rt-bad); }
.wt-dot.unknown { background: var(--rt-neutral); }

.wt-checks { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.wt-check { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px solid var(--border); }
.wt-check:first-child { border-top: 0; }
.wt-check-t { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wt-check-n { min-width: 0; font: 600 .95rem/1.35 var(--rt-body); color: var(--text); overflow-wrap: anywhere; }
.wt-check-s { margin-left: auto; flex: none; font: 600 .8rem/1.4 var(--rt-body); color: var(--text-2); }
.wt-check.fail .wt-check-s { color: var(--rt-bad); }
.wt-check.warn .wt-check-s { color: var(--rt-warn); }
.wt-check-d { margin: 0; font: 400 .9rem/1.4 var(--rt-body); color: var(--text-2); overflow-wrap: anywhere; }

/* The last runs of one check, oldest first: small bars. */
.wt-strip { display: flex; gap: 2px; height: 8px; }
.wt-tick { flex: 1 1 0; max-width: 10px; border-radius: 2px; background: var(--rt-ok); }
.wt-tick.warn { background: var(--rt-warn); }
.wt-tick.fail { background: var(--rt-bad); }
.wt-tick.unknown { background: var(--rt-neutral); }

.wt-alert { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.wt-alert-t { display: flex; align-items: center; gap: 8px; margin: 0; font: 700 1rem/1.35 var(--rt-body); color: var(--text); }
.wt-alert-t .ic { flex: none; color: var(--rt-bad); }
.wt-alert-since { margin-left: auto; font: 400 .85rem/1.3 var(--rt-body); color: var(--text-2); }
.wt-alert-d { margin: 0; font: 400 .95rem/1.4 var(--rt-body); color: var(--text); }
.wt-found { margin: 0; padding: 10px 12px; border-radius: var(--r-card); background: var(--surface-2); font: 400 .95rem/1.45 var(--rt-body); color: var(--text); }

.wt-rv-head { margin: 0; font: 600 1rem/1.4 var(--rt-body); color: var(--text); }
.wt-rv-body { margin: 0; font: 400 .92rem/1.5 var(--rt-body); color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }

.wt-sp-n { margin: 0; font: 400 1rem/1.3 var(--rt-body); color: var(--text-2); }
.wt-sp-n b { font: 700 2rem/1.05 var(--rt-cond); color: var(--text); font-variant-numeric: tabular-nums; }
.wt-bar-track { display: block; height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.wt-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--link); transform-origin: 0 50%; transition: transform var(--t-screen) var(--ease-out); }
.wt-bar-fill.high { background: var(--rt-warn); }

.wt-mails { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.wt-mail { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--border); }
.wt-mail:first-child { border-top: 0; }
.wt-mail-s { font: 600 .92rem/1.35 var(--rt-body); color: var(--text); overflow-wrap: anywhere; }
.wt-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.wt-links .btn { display: inline-flex; align-items: center; gap: 6px; }
