/* M1 additions: notice banners, rule cards, clock explanations, data/privacy screen,
   backup/restore status and delete confirmation. Plain CSS on the existing tokens.
   No frameworks, no remote fonts, no animation that ignores prefers-reduced-motion. */

.notice{background:#eef7f4;border:1px solid #bfe0d7;color:#0f4d42;border-radius:8px;padding:9px 12px;margin:8px 0 12px;font-size:13px;line-height:1.5}
.notice b{color:#0b3f36}
.danger-zone{border-color:#f0bcbc;background:#fffafa}
.status-line{font-size:12.5px;color:var(--muted);line-height:1.45;max-width:70ch}
.status-line.ok{color:#0f6b3c;font-weight:600}
.status-line.bad{color:var(--bad);font-weight:600}
.warn.ok{background:#e7f5ec;border:1px solid #bfe0cc;color:#0f6b3c}
.error-list{margin:8px 0 0 18px;color:var(--bad);font-size:13px;line-height:1.5}
.privacy-facts{margin:6px 0 0 18px;padding:0;font-size:13.5px;line-height:1.6;max-width:78ch}
.privacy-facts li{margin:4px 0}
.delete-list{margin:6px 0 10px 18px;padding:0;line-height:1.6}
.delete-list li{margin:4px 0}
.h1-sub{font-weight:400;color:#b9c6d2}
.align-self-center{align-self:center}
.legend i.lg-loan{background:#14202b}
.legend i.lg-y{background:#0f5c4d}
.legend i.lg-z{background:#3f9c86}
.legend i.lg-w{background:#9fd2c5}
.email-out{margin-top:10px;display:none}
.email-out.on{display:block}
.input-narrow{width:80px;padding:4px 6px;font-size:13px}
.input-month{width:70px;padding:4px 6px;font-size:13px}
.check-pill{padding:2px 6px}
.kpis-three{grid-template-columns:repeat(3,1fr);margin:8px 0}

/* Rule source buttons sit inside prose and chips; keep the hit area usable. */
.rule-ref{font:inherit;font-size:11.5px;font-weight:700;color:#0f4d42;background:#e8f3f0;border:1px solid #bfe0d7;border-radius:999px;padding:1px 8px;cursor:pointer;vertical-align:baseline;line-height:1.5}
.rule-ref:hover{background:#d6ebe5}
.rule-ref:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.chip .rule-ref{background:#fff;border-color:rgba(20,32,43,.18);color:#24323d;font-size:10.5px;padding:0 5px;margin-left:2px}

/* Rule cards: the summary is the statement; opening it reveals publisher, link and date. */
.rule-card{border:1px solid var(--line);border-radius:8px;background:#fff;margin:6px 0;padding:0}
.rule-card summary{cursor:pointer;list-style:none;display:flex;gap:10px;align-items:flex-start;justify-content:space-between;padding:10px 12px;min-height:44px}
.rule-card summary::-webkit-details-marker{display:none}
.rule-card summary:focus-visible{outline:3px solid var(--focus);outline-offset:-3px;border-radius:8px}
.rule-card[open] summary{border-bottom:1px solid var(--line);background:#fafbfc;border-radius:8px 8px 0 0}
.rule-statement{font-size:13px;line-height:1.45;color:var(--ink)}
.rule-status{flex:none;font-size:10.5px;font-weight:700;letter-spacing:.3px;padding:2px 6px;border-radius:4px;white-space:nowrap}
.rule-status.current{background:#e7f5ec;color:#0f6b3c}
.rule-status.verify{background:#fff6e5;color:#9a5b00;border:1px solid #f1d39a}
.rule-source{padding:10px 12px;font-size:12.5px;line-height:1.55;color:#26333d}
.rule-source p{margin:3px 0}
.rule-source a{color:#0f5c4d;word-break:break-word}
.rule-topic h3{font-size:12px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);margin:14px 0 4px}
.stage-context{border:1px solid var(--line);border-radius:10px;background:#fafbfc;padding:10px 12px;margin:10px 0 4px}
.stage-context .hint{margin:0 0 6px}
.stage-rule-list{list-style:none;margin:6px 0 0;padding:0}
.stage-rule-list li{margin:4px 0}
.stage-rule-list summary{cursor:pointer;font-size:12.5px;font-weight:700;color:#0f4d42;min-height:32px}
.stage-rule-list ul{list-style:none;margin:6px 0 0;padding:0}
.stage-rule-list li{margin:4px 0}
.clock-explain{border:1px solid #d9e3ea;background:#fbfcfd;border-radius:10px;padding:10px 12px;margin:8px 0 12px;font-size:13px;line-height:1.55}
.clock-explain p{margin:2px 0 6px}
.clock-explain ul{margin:2px 0 6px 18px;padding:0}
.clock-explain li{margin:3px 0}
.dispute-note{border:1px solid #e6cfe0;background:#fbf3f8;border-radius:10px;padding:10px 12px;margin:8px 0 12px;font-size:13px;line-height:1.55;color:#4a1f3c}
.dispute-note .hint{color:#6b4a5e;margin-top:4px}
.chip.clock.missing{background:#eef1f4;color:#3d4b58}

/* Rule dialog */
#rule-dialog{max-width:760px}
#rule-dialog h2{font-size:18px;line-height:1.4;margin:0 0 8px;text-transform:none;letter-spacing:0;color:var(--ink)}
#rule-dialog .rule-status{display:inline-block;margin-bottom:12px}
.rule-detail{display:grid;grid-template-columns:max-content 1fr;gap:6px 14px;margin:8px 0 14px;font-size:13px}
.rule-detail dt{color:var(--muted);font-weight:700}
.rule-detail dd{margin:0;overflow-wrap:anywhere}
.rule-detail a{color:#0f5c4d}

/* Data screen */
@media(max-width:900px){.notice{font-size:12.5px}}
@media(prefers-reduced-motion:reduce){.rule-card summary,.rule-ref{transition:none!important}}
