/* watch.css — "Watch this address" (js/watch.js) and the address-alerts page (watch.html, js/watch-page.js).
 * Works with style.css (map) and pages.css (other pages); colors come from their light/dark variables. */
:root {
  --wt-surface: var(--surface, #fff);
  --wt-surface-2: var(--surface-2, #F5F7FA);
  --wt-text: var(--text, #1B2633);
  --wt-muted: var(--muted, #5A6878);
  --wt-border: var(--border, #DFE5EC);
  --wt-ink: var(--ink, #12304D);
  --wt-bad: var(--bad, #B03A2E);
  --wt-good: var(--good, #17784A);
  --wt-good-bg: var(--good-bg, #E6F4EC);
  --wt-warn-bg: var(--warn-bg, #FFF6E5);
  --wt-warn-border: var(--warn-border, #F0CF8E);
  --wt-warn-text: var(--warn-text, #7A4F00);
  --wt-accent: var(--navy, #14324F);
  --wt-focus: var(--gold, #F2B33D);
}

/* ---------------------------------------------------------------- the button */
.wt-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.wt-slot small { color: var(--wt-muted); font-size: .8rem; }
.wt-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px;
  border: 1px solid var(--wt-accent); border-radius: 8px; background: var(--wt-surface); color: var(--wt-accent);
  font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer;
}
:root[data-theme="dark"] .wt-btn { border-color: var(--accent, #6CB0F0); color: var(--accent, #6CB0F0); }
.wt-btn:hover { background: var(--wt-surface-2); }
.wt-btn:focus-visible, .wt-dialog :focus-visible { outline: 3px solid var(--wt-focus); outline-offset: 2px; }
.wt-btn svg, .btn svg.wt-bell { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- the dialog */
html.wt-lock { overflow: hidden; }
.wt-dialog {
  box-sizing: border-box; width: min(480px, calc(100vw - 16px)); max-width: none;
  max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px);
  margin: auto; padding: 0; border: 1px solid var(--wt-border); border-radius: 14px;
  background: var(--wt-surface); color: var(--wt-text); box-shadow: 0 24px 64px rgba(16, 32, 52, .3);
  font-family: var(--font, "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif); text-align: left; overflow: hidden;
}
.wt-dialog[open] { display: flex; flex-direction: column; }
.wt-dialog::backdrop { background: rgba(10, 20, 32, .55); }
.wt-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 12px 20px; border-bottom: 1px solid var(--wt-border); }
.wt-title { flex: 1; margin: 0; font-size: 1.15rem; line-height: 1.3; color: var(--wt-ink); }
.wt-x { flex: none; width: 36px; height: 36px; margin: -4px -4px 0 0; border: 0; border-radius: 8px; background: transparent;
  color: var(--wt-muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.wt-x:hover { background: var(--wt-surface-2); color: var(--wt-text); }
.wt-body { padding: 14px 20px 20px; overflow-y: auto; overscroll-behavior: contain; }
.wt-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.wt-form p { margin: 0; }
.wt-addr { padding: 8px 12px; border-radius: 8px; background: var(--wt-surface-2); font-weight: 600; overflow-wrap: anywhere; }
.wt-intro, .wt-privacy { font-size: .88rem; line-height: 1.5; }
.wt-privacy { color: var(--wt-muted); font-size: .8rem; }
.wt-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wt-label { font-weight: 600; font-size: .9rem; color: var(--wt-ink); }
.wt-field input[type=email], .wt-field input[type=text], .wt-field input[type=password], .wt-field input[type=search], .wt-field textarea {
  box-sizing: border-box; width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--wt-border); border-radius: 8px;
  background: var(--wt-surface); color: var(--wt-text); font: inherit; font-size: 1rem;
}
.wt-check { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; line-height: 1.4; cursor: pointer; }
.wt-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; }
[aria-invalid="true"] { border-color: var(--wt-bad) !important; }
.wt-err { color: var(--wt-bad); font-size: .82rem; font-weight: 600; }
.wt-summary { padding: 8px 12px; border: 1px solid var(--wt-bad); border-radius: 8px; color: var(--wt-bad); font-size: .88rem; }
.wt-hp { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }
.wt-note { padding: 8px 12px; border: 1px solid var(--wt-warn-border); border-radius: 8px; background: var(--wt-warn-bg); color: var(--wt-warn-text); font-size: .86rem; line-height: 1.45; }
.wt-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wt-primary {
  min-height: 40px; padding: 8px 16px; border: 0; border-radius: 8px; background: var(--wt-accent); color: #fff;
  font: inherit; font-weight: 700; cursor: pointer;
}
:root[data-theme="dark"] .wt-primary { background: var(--accent, #6CB0F0); color: #0B1520; }
.wt-primary[disabled] { opacity: .6; cursor: progress; }
.wt-secondary { min-height: 40px; padding: 8px 14px; border: 1px solid var(--wt-border); border-radius: 8px; background: transparent; color: var(--wt-text); font: inherit; cursor: pointer; }
.wt-done { display: flex; flex-direction: column; gap: 10px; }
.wt-done h3 { margin: 0; font-size: 1.05rem; color: var(--wt-good); }
.wt-pro { font-size: .84rem; color: var(--wt-muted); }

/* ---------------------------------------------------------------- watch.html */
.wt-page { padding-bottom: 48px; }
.wt-page svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wt-card { margin: 18px 0; }
.wt-card h2 { margin: 0 0 8px; font-size: 1.15rem; }

/* Hero: what alerts do, the call to action and an example email */
.wt-hero { background: var(--wt-surface); border-bottom: 1px solid var(--wt-border); }
.wt-hero-in { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding-top: 44px; padding-bottom: 40px; }
.wt-intro { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.wt-kicker { margin: 0; }
.wt-intro h1 { margin: 0; font-size: 2.75rem; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.wt-lead { margin: 0; max-width: 640px; font-size: 1.125rem; line-height: 1.55; color: var(--wt-muted); }
.wt-what { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.wt-what li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.45; }
.wt-what b { display: block; color: var(--wt-ink); font-weight: 700; }
.wt-what-d { display: block; color: var(--wt-muted); font-size: .9rem; }
.wt-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--info-bg, #EEF4FF); color: var(--info-text, #1F3F7A); }
.wt-ico svg { width: 20px; height: 20px; }
.wt-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.wt-cta .btn { min-height: 44px; }
.wt-intro .wt-note { margin: 0; }

.wt-sample { flex: 1 1 340px; max-width: 440px; min-width: 0; margin: 0; }
.wt-sample-cap { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .86rem; font-weight: 600; color: var(--wt-muted); }
.wt-sample-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--wt-warn-border);
  background: var(--wt-warn-bg); color: var(--wt-warn-text); font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.wt-mail { border: 1px solid var(--wt-border); border-radius: 16px; background: var(--wt-surface); box-shadow: var(--shadow, 0 8px 24px rgba(16,32,52,.12)); overflow: hidden; }
.wt-mail p { margin: 0; }
.wt-mail-head { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--wt-surface-2); border-bottom: 1px solid var(--wt-border); }
.wt-mail-bell { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--wt-focus); color: #14324F; }
.wt-mail-bell svg { width: 18px; height: 18px; }
.wt-mail-from { font-size: .78rem; color: var(--wt-muted); font-weight: 600; }
.wt-mail-subj { font-weight: 700; color: var(--wt-ink); line-height: 1.35; overflow-wrap: anywhere; }
.wt-mail-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; font-size: .9rem; }
.wt-mail-h { font-weight: 700; color: var(--wt-ink); margin-top: 4px !important; }
.wt-mail-row { padding: 8px 10px; border-radius: 8px; background: var(--wt-surface-2); line-height: 1.45; overflow-wrap: anywhere; }
.wt-mail-row s { color: var(--wt-muted); }
.wt-mail-lvl { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--wt-muted); }
.wt-mail-btn { align-self: flex-start; margin-top: 8px !important; padding: 7px 14px; border-radius: 8px; background: var(--wt-accent); color: #fff; font-weight: 700; font-size: .84rem; }
:root[data-theme="dark"] .wt-mail-btn { background: var(--accent, #6CB0F0); color: #0B1520; }
.wt-mail-foot { margin-top: 6px !important; padding-top: 10px; border-top: 1px solid var(--wt-border); color: var(--wt-muted); font-size: .78rem; }
.wt-sample-note { margin: 10px 0 0; font-size: .8rem; color: var(--wt-muted); }

/* Sections */
.wt-h2 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.wt-steps-sec { margin: 40px 0 0; }
.wt-steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: none; }
.wt-step { position: relative; padding: 20px; border: 1px solid var(--wt-border); border-radius: 16px; background: var(--wt-surface); box-shadow: var(--shadow-sm, none); }
.wt-step-n { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--wt-focus); color: #14324F; font-weight: 800; }
.wt-step h3 { margin: 12px 0 4px; font-size: 1.05rem; }
.wt-step p { margin: 0; color: var(--wt-muted); }
.wt-step a { display: inline-block; padding: 3px 0; font-weight: 600; }

.wt-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 32px 0 0; align-items: start; }
/* The Pro dashboard needs the full width once it is open. */
.wt-plans:has(#wt-dash:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
.wt-plan { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.wt-plan > p, .wt-plan h2, .wt-plan h3 { margin: 0; }
.wt-plan h2 { font-size: 1.3rem; font-weight: 800; }
.wt-plan-fam { border-top: 4px solid var(--good, #17784A); }
.wt-plan-pro { border-top: 4px solid var(--wt-focus); }
.wt-plan-tag { align-self: flex-start; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: var(--wt-good-bg); color: var(--wt-good); }
.wt-plan-tag.is-pro { background: var(--wt-warn-bg); color: var(--wt-warn-text); }
.wt-h3 { font-size: 1rem; margin-top: 4px !important; padding-top: 14px; border-top: 1px solid var(--wt-border); }
.wt-small-p { color: var(--wt-muted); }
.wt-ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wt-ticks li { position: relative; padding-left: 26px; }
.wt-ticks li::before { content: ""; position: absolute; left: 6px; top: 3px; width: 6px; height: 11px; border: solid var(--wt-good); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.wt-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wt-check { min-height: 24px; }

/* Privacy */
.wt-privacy-box { margin: 32px 0 0; padding: 24px; border: 1px solid var(--info-border, #A9C1EC); border-radius: 16px; background: var(--info-bg, #EEF4FF); }
.wt-privacy-head { display: flex; align-items: center; gap: 12px; }
.wt-privacy-box .wt-ico { background: var(--wt-surface); }
.wt-facts { margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wt-facts > div { padding: 14px 16px; border-radius: 12px; background: var(--wt-surface); border: 1px solid var(--wt-border); }
.wt-facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.wt-facts dt { font-weight: 700; color: var(--wt-ink); }
.wt-facts dd { margin: 4px 0 0; color: var(--wt-text); font-size: .92rem; line-height: 1.5; }
.wt-privacy-more { margin: 14px 0 0; }
.wt-privacy-more a { display: inline-flex; align-items: center; min-height: 24px; font-weight: 600; }

@media (max-width: 860px) {
  .wt-steps { grid-template-columns: minmax(0, 1fr); }
  .wt-plans { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .wt-hero-in { gap: 24px; padding-top: 24px; padding-bottom: 24px; }
  .wt-intro h1 { font-size: 2rem; }
  .wt-lead { font-size: 1rem; }
  .wt-sample { max-width: none; }
  .wt-facts { grid-template-columns: minmax(0, 1fr); }
  .wt-privacy-box { padding: 18px 16px; }
  .wt-h2 { font-size: 1.3rem; }
  .wt-cta .btn { flex: 1 1 auto; }
}
@media print {
  .wt-hero { border: 0; }
  .wt-form, #wt-dash, .wt-cta, .wt-h3, .wt-h3 + .wt-small-p { display: none !important; }
  .wt-mail, .wt-step, .wt-plan, .wt-facts > div { box-shadow: none; break-inside: avoid; }
}
.wt-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.wt-row .wt-field { flex: 1 1 220px; }
.wt-status { min-height: 1.2em; font-size: .9rem; }
.wt-status.is-bad { color: var(--wt-bad); }
.wt-status.is-good { color: var(--wt-good); }
.wt-usage { font-weight: 600; }
.wt-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wt-item { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; justify-content: space-between;
  padding: 10px 12px; border: 1px solid var(--wt-border); border-radius: 10px; background: var(--wt-surface); }
.wt-item-main { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.wt-item-main b { display: block; }
.wt-schools { margin: 4px 0 0; padding: 0; list-style: none; font-size: .86rem; color: var(--wt-text); }
.wt-meta { font-size: .8rem; color: var(--wt-muted); }
.wt-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--wt-good-bg); color: var(--wt-good); }
.wt-badge.is-pending { background: var(--wt-warn-bg); color: var(--wt-warn-text); }
.wt-item-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.wt-small { min-height: 32px; padding: 4px 10px; font-size: .84rem; }
.wt-skipped { margin: 6px 0 0; padding-left: 18px; font-size: .84rem; color: var(--wt-muted); }
.wt-state { margin: 28px 0; max-width: 760px; }
.wt-state h1 { margin-top: 0; }
@media (max-width: 480px) {
  .wt-body { padding: 12px 14px 16px; }
  .wt-head { padding: 14px 12px 10px 14px; }
}
@media print { .wt-btn, .wt-slot { display: none !important; } }
#wt-dash > .wt-check { margin: 8px 0 14px; }
