/* 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; }

/* ---------- the navy redesign, step 4: operations (Oct 23, 2026; docs/navy-redesign.md) ----------
   The design's Watcher: cards with the design's inner room and tight Inter titles, each check's status a soft pill
   (red only for a problem, which needs Brandon), and the spend a big number over a slim blue bar. */
.wt-sec { gap: 12px; padding: 20px 22px; }
.wt-h { font: 700 1.125rem/1.3 var(--rt-body); letter-spacing: -.02em; }
.wt-alert { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-box); }
.wt-found { border-radius: var(--r-box); }
.wt-check { padding: 12px 0; }
.wt-check-n { letter-spacing: -.01em; }
.wt-check-s { padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-2); font: 600 .75rem/1.2 var(--rt-body); }
.wt-check.fail .wt-check-s { background: var(--rt-bad-bg); }
.wt-strip { gap: 3px; height: 7px; }
.wt-tick { border-radius: var(--r-pill); }
.wt-sp-n b { font: 800 2.25rem/1.05 var(--rt-cond); letter-spacing: -.04em; }
.wt-bar-track { height: 7px; }
.wt-bar-fill { background: var(--accent); }
.wt-links .btn { border-radius: var(--r-pill); }

/* ---------- the exact rebuild (Oct 23, 2026): the design's WatcherPage (styles.css has the hero, insight cards, metric row) ----------
   The checks and the rest fold below the design's cards; the sections inside a fold lose their own card. */
.watcher-screen .wt-hero h2 { margin-bottom: 6px; }
.watcher-screen .wt-hero > span { flex: none; }
.wt-insight h2 { overflow-wrap: anywhere; }
.wt-insight p { padding-bottom: 22px; overflow-wrap: anywhere; }
.wt-insight .ds-button .ic, .watcher-screen .ds-page-header .ds-button .ic { width: 16px; height: 16px; }
.ds-insight-icon .ic { width: 22px; height: 22px; }
.wt-month .ds-section-heading { margin-bottom: 14px; }
.wt-month .wt-mode { margin: 14px 0 0; }
.wt-side { display: flex; flex-direction: column; gap: 12px; }
.watcher-screen .more.wt-fold { padding: 0 16px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
.watcher-screen .more.wt-fold .more-b { display: flex; flex-direction: column; gap: 10px; padding: 0 0 16px; }
.wt-fold .wt-cols { margin-top: 0; }
.wt-fold .wt-cols > .wt-sec { padding: 0; border: 0; background: none; }
@media (max-width: 760px) { .watcher-screen .ds-metric-row { grid-template-columns: repeat(2, 1fr); } .watcher-screen .ds-metric-row > div:nth-child(3) { border-left: 0; } .watcher-screen .ds-metric-row > div:nth-child(n+3) { border-top: 1px solid var(--ds-line); } }
