:root {
  --ink: #1f2430;
  --muted: #5b6270;
  --line: #e3e6ec;
  --soft: #f6f7f9;
  --bg: #ffffff;
  --accent: #2f5bd3;
  --accent-ink: #ffffff;
  --code-bg: #14171f;
  --code-ink: #e6e9f0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -0.02em; }
h2 { font-size: 26px; letter-spacing: -0.01em; }
h3 { font-size: 17px; }
p { margin: 0 0 14px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
section { padding: 64px 0; }
section.soft { background: var(--soft); }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }

header.top { border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; font-weight: 700; font-size: 20px; color: var(--ink); letter-spacing: -0.01em; }
.brand img { width: 28px; height: 28px; margin-right: 8px; flex: none; }
.brand span { color: var(--accent); }
nav a { color: var(--muted); margin-left: 20px; font-size: 15px; }
nav a:hover { color: var(--ink); text-decoration: none; }
/* Top menu (CR-0457): the link pointed at gets a light pill, the page or home section you are on gets the filled one */
nav a:not(.btn) { margin-left: 2px; padding: 5px 9px; border-radius: 999px; transition: background-color 0.15s, color 0.15s; }
nav a:not(.btn):hover, nav a:not(.btn):focus-visible { color: #1f3fa8; background: #e6edfd; }
nav a:not(.btn)[aria-current] { color: #fff; font-weight: 600; background: linear-gradient(120deg, #2f5bd3 0%, #5b4fd8 55%, #0e9ab8 100%); box-shadow: 0 2px 8px rgba(47, 91, 211, 0.28); }
nav a:not(.btn)[aria-current]:hover { color: #fff; filter: brightness(1.08); }

.btn {
  display: inline-block; padding: 11px 18px; border-radius: 8px; font-weight: 600; font-size: 15px;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn.ghost { background: var(--bg); color: var(--ink); border-color: var(--line); }

.hero { padding: 72px 0 56px; }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 640px; margin-bottom: 26px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hero .note { font-size: 14px; color: var(--muted); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }

.codecard { background: var(--code-bg); color: var(--code-ink); border-radius: 12px; overflow: hidden; }
.codecard .bar { padding: 10px 14px; font-size: 13px; color: #9aa3b5; border-bottom: 1px solid #262b37; display: flex; justify-content: space-between; }
pre { margin: 0; padding: 16px; overflow-x: auto; font-size: 13px; line-height: 1.55; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; }
p code, li code, td code { background: var(--soft); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.copy { background: none; border: 0; color: #9aa3b5; cursor: pointer; font-size: 13px; padding: 0; }
.tablist { display: flex; flex-wrap: wrap; gap: 4px; }
.tablist button { background: none; border: 0; color: #9aa3b5; cursor: pointer; font: inherit; font-size: 13px; padding: 4px 9px; border-radius: 6px; }
.tablist button:hover { color: #fff; }
.tablist button[aria-selected="true"] { color: #fff; background: #262b37; }
.tablist button:focus-visible, .copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.copy:hover { color: #fff; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.step { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.step .n { display: inline-block; width: 28px; height: 28px; line-height: 28px; text-align: center; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 12px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }

.points { border-left: 3px solid var(--accent); padding: 4px 0 4px 20px; }
.point + .point { margin-top: 22px; }
.point h3 { font-size: 18px; }
.point p { font-size: 15px; margin: 0; }

.router { border-left: 3px solid var(--accent); padding: 4px 0 4px 20px; max-width: 760px; }
.router p { font-size: 17px; }

.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.price { border: 1px solid var(--line); border-radius: 12px; padding: 22px; background: var(--bg); }
.price.featured { border-color: var(--accent); }
.price .amount { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0; }
.price .amount small { font-size: 14px; color: var(--muted); font-weight: 400; }
.price ul { padding-left: 18px; margin: 12px 0 0; color: var(--muted); font-size: 15px; }
.fine { font-size: 14px; color: var(--muted); margin-top: 16px; }

.cta { text-align: center; }

[hidden] { display: none !important; }
.lead { font-size: 18px; color: var(--muted); max-width: 640px; margin-bottom: 24px; }
.btn { cursor: pointer; font-family: inherit; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.account { padding: 56px 0 72px; }
.account h2 { font-size: 20px; margin-top: 40px; }
.account-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.account-head > div { min-width: 0; }
/* CR-0511 phase 2: Overview dashboard (avatar header, quick actions, subscription summary) */
.account-head .who { display: flex; align-items: center; gap: 16px; min-width: 0; }
.account-head .who > div { min-width: 0; }
.account-head .who h1 { margin-bottom: 2px; overflow-wrap: anywhere; font-size: clamp(24px, 6vw, 44px); }
.account-head .since { margin: 0; font-size: 14px; }
.account-head .photo { flex: 0 0 auto; }
.account-head .head-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
/* CR-0873: "Go to your mailbox" greyed out for an account without an address */
.mbgo-off { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.mbgo-off small { margin: 0; font-size: 12px; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-width: 860px; }
.qcard { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--ink); text-decoration: none; }
.qcard strong { color: var(--accent); font-size: 16px; }
.qcard span { color: var(--muted); font-size: 14px; }
.qcard:hover { border-color: #b9c9f3; background: #f8faff; }
.qcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ov-subs p { margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ov-subs .pill { margin-left: 0; }
#account-email { overflow-wrap: anywhere; }
.notice { border: 1px solid var(--accent); background: #eef3fd; color: var(--ink); border-radius: 8px; padding: 12px 16px; margin: 0 0 24px; }
.notice.bad { border-color: #c2410c; background: #fff4ed; }
.tabs { display: flex; flex-wrap: nowrap; gap: 4px; margin: 24px 0 28px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; font: inherit; font-size: 15px; font-weight: 600; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; margin-bottom: -1px; cursor: pointer; border-radius: 8px 8px 0 0; white-space: nowrap; }
.tabs button:hover { color: var(--ink); background: var(--soft); }
.tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel > h2:first-child { margin-top: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; max-width: 860px; }
.stats .stat { margin: 0; max-width: none; }
.stats + p { margin-top: 16px; }
.stat { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin: 28px 0 0; max-width: 420px; }
.stat strong { font-size: 36px; letter-spacing: -0.02em; line-height: 1.1; }
.form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 12px 0 16px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); flex: 1 1 200px; }
.form input { font: inherit; font-size: 15px; color: var(--ink); padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; }
.form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.form select { font: inherit; font-size: 15px; color: var(--ink); padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.keykind { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: 13px; font-weight: 600; background: #e3f4e8; color: #17663a; }
.keykind.test { background: #fff4d9; color: #7a5200; }
.lc-form textarea { font: inherit; font-size: 15px; color: var(--ink); padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; min-width: min(420px, 100%); }
.form label.lc-filter { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 8px; }
.lcs { white-space: nowrap; }
.lc-why-short { display: none; }
@media (max-width: 600px) { .lc-why { display: none; } .lc-why-short { display: block; font-size: 13px; margin-top: 2px; } }
.lc-counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.lc-counts span, .lcs { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 600; background: var(--soft); color: var(--ink); }
.lcs.valid { background: #e3f4e8; color: #17663a; }
.lcs.risky, .lcs.role { background: #fff4d9; color: #7a5200; }
.lcs.disposable, .lcs.no_mx, .lcs.invalid { background: #fde8e8; color: #9b1c1c; }
.testview { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0 20px; }
.testview h3 { margin: 0 0 4px; }
.testview pre { background: var(--soft); border-radius: 8px; white-space: pre-wrap; word-break: break-word; margin: 10px 0; }
.testview iframe { width: 100%; height: 360px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.account #new-key { margin: 0 0 20px; max-width: 720px; }
.account #new-key pre { word-break: break-all; white-space: pre-wrap; }
.terms { border: 1px solid #dfe5f2; border-radius: 10px; padding: 12px 16px; margin: 12px 0; font-size: 14px; background: #fafbff; }
.terms ul { margin: 8px 0; padding-left: 20px; }
.terms .agree { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
.terms .agree input { margin-top: 4px; flex: 0 0 auto; }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 12px 0 8px; }
.pack { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.pack-usd { font-size: 28px; line-height: 1.1; }
.pack-credits { font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.pack .btn { margin-top: auto; }
.terms summary { cursor: pointer; font-weight: 600; }
.terms details[open] summary { margin-bottom: 4px; }
/* CR-0511 phase 4: keyboard focus on the account page */
.btn:focus-visible, .terms summary:focus-visible, .terms .agree input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.form select:focus, .lc-form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.photo-row label.btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
td.empty-row { text-align: center; padding: 18px 12px; }
.account table tbody tr td .btn.ghost { color: var(--ink); }
.cta .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* OAuth consent is a small, focused sign-in surface rather than a marketing page. */
.oauth-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: #f7f9fd; }
.oauth-top { background: rgba(255, 255, 255, 0.92); }
.oauth-top .wrap { max-width: 1120px; height: 58px; }
.oauth-top .brand { font-size: 18px; }
.oauth-top .brand img { width: 26px; height: 26px; }
.oauth-secure { color: var(--muted); font-size: 13px; }
.oauth-secure::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #2b8a57; }
.oauth-main { flex: 1 0 auto; display: grid; place-items: center; width: 100%; padding: 44px 0; }
.oauth-main > .wrap { width: 100%; }
.oauth-card { width: min(100%, 620px); margin: 0 auto; padding: 38px 42px 34px; border: 1px solid #dfe5f0; border-radius: 18px; background: #fff; box-shadow: 0 18px 55px rgba(31, 55, 98, 0.09); }
.oauth-card h1 { font-size: clamp(30px, 5vw, 40px); margin-bottom: 18px; }
.oauth-intro { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.oauth-client { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin-bottom: 12px; }
.oauth-client strong { font-size: 17px; overflow-wrap: anywhere; }
.oauth-client span { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.oauth-request { color: var(--muted); margin-bottom: 9px; }
.oauth-form strong { overflow-wrap: anywhere; }
.oauth-permissions { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.oauth-permissions li { position: relative; padding-left: 24px; }
.oauth-permissions li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 800; }
.oauth-permissions span { color: var(--muted); }
.oauth-form { display: block; margin: 24px 0 0; }
.oauth-form > p:first-of-type { margin-bottom: 18px; color: var(--muted); }
.oauth-form label { display: block; margin: 0 0 7px; color: var(--ink); font-size: 14px; font-weight: 650; }
.oauth-form input:not([type="hidden"]) { display: block; width: 100%; min-height: 46px; margin: 0 0 17px; padding: 10px 12px; background: #fff; }
.oauth-form input:not([type="hidden"]):focus { outline: 3px solid rgba(47, 91, 211, 0.16); border-color: var(--accent); }
.oauth-actions { display: flex; gap: 10px; align-items: center; margin-top: 22px; }
.oauth-actions .btn { min-height: 44px; }
.oauth-actions .btn-ghost { color: var(--ink); background: #fff; border-color: var(--line); }
.oauth-help { margin: 11px 0 0; color: var(--muted); font-size: 14px; }
.oauth-switch { margin-top: 18px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.oauth-switch:hover { text-decoration: underline; }
.oauth-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.oauth-form .form-error { margin: -3px 0 12px; padding: 9px 11px; border-radius: 8px; background: #fff1f0; font-size: 14px; }
.oauth-footer { flex: 0 0 auto; padding: 14px 0; background: #fff; font-size: 13px; }
.oauth-footer .wrap { max-width: 1120px; align-items: center; gap: 8px 20px; }
.oauth-footer nav { display: flex; gap: 18px; }
.oauth-footer nav a { margin: 0; padding: 0; font-size: 13px; }
@media (max-width: 600px) {
  .oauth-secure { display: none; }
  .oauth-main { place-items: start center; padding: 20px 0; }
  .oauth-main > .wrap { padding: 0 12px; }
  .oauth-card { padding: 28px 22px 24px; border-radius: 14px; }
  .oauth-card h1 { font-size: 30px; }
  .oauth-actions { align-items: stretch; flex-direction: column; }
  .oauth-actions .btn { width: 100%; text-align: center; }
  .oauth-footer .wrap { justify-content: center; text-align: center; }
}
footer a { color: var(--muted); margin-right: 16px; }

table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 8px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.docs { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; padding-top: 48px; padding-bottom: 64px; }
.toc { position: sticky; top: 24px; align-self: start; font-size: 15px; }
.toc a { display: block; color: var(--muted); padding: 4px 0; }
.toc a:hover { color: var(--ink); }
.docs section { padding: 0 0 36px; }
.docs h2 { margin-top: 8px; }
.docs pre { border-radius: 10px; margin: 10px 0 18px; background: var(--soft); border: 1px solid var(--line); }
.table-scroll { overflow-x: auto; }

@media (max-width: 860px) {
  .hero-grid, .steps, .grid, .pricing, .docs { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .docs { gap: 24px; }
  nav a { margin-left: 14px; font-size: 14px; }
  nav a:not(.btn) { margin-left: 0; padding: 5px 7px; }
  th, td { padding: 8px 8px; }
}

@media (max-width: 560px) {
  header.top .wrap { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; row-gap: 8px; }
  nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px; }
  nav a { margin-left: 0; }
  nav a.btn { margin-left: 0 !important; }
}

/* Articles (CR-0053) */
.article { padding: 56px 0 72px; }
.wrap.narrow { max-width: 760px; }
.article h1 { margin-bottom: 14px; }
.article h2 { font-size: 22px; margin-top: 36px; }
.article ul { padding-left: 22px; margin: 0 0 16px; }
.article li { margin-bottom: 8px; }
.article .lead { margin-bottom: 28px; }
.article figure { margin: 28px 0; }
.article figure svg { width: 100%; height: auto; display: block; }
.article figure figcaption { font-size: 13px; margin-top: 8px; }
.article .sources { font-size: 15px; }
.article-end { margin-top: 40px; }
.articles-index { padding: 56px 0 72px; }
.article-grid { grid-template-columns: repeat(3, 1fr); }
.article-card { display: block; color: inherit; }
.article-card:hover { text-decoration: none; border-color: var(--accent); }
.article-card h3 { font-size: 17px; line-height: 1.3; margin: 4px 0 8px; }
.article-card p { font-size: 14px; }
@media (max-width: 860px) {
  .article-grid, .steps, .pricing, .grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
}

/* Deep email check page (CR-0098) */
.checkform { display: block; margin-top: 24px; }
.checkform label { display: block; font-weight: 600; margin-bottom: 6px; }
.checkrow { display: flex; gap: 10px; }
.checkrow input { flex: 1; min-width: 0; font-size: 17px; padding: 11px 13px; }
.scorebox { display: flex; gap: 24px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin: 8px 0 20px; background: var(--bg); }
.scorebox .score { display: flex; flex-direction: column; align-items: center; min-width: 110px; }
.scorebox .score strong { font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; color: var(--accent); }
.scorebox .score span { font-size: 13px; color: var(--muted); }
.scorebox p { margin: 0 0 4px; }
.verdict { font-weight: 700; font-size: 19px; }
.verdict[data-verdict="likely_invalid"], .checks .st-fail { color: #b42318; }
.verdict[data-verdict="risky"], .verdict[data-verdict="unknown"], .checks .st-warn { color: #b54708; }
.verdict[data-verdict="likely_valid"], .checks .st-pass { color: #067647; }
.checks .st-info, .checks .st-skip { color: var(--muted); }
.checks td { vertical-align: top; }
.checks td:first-child { font-weight: 600; font-size: 13px; white-space: nowrap; }
.checks td.detail { white-space: pre-wrap; word-break: break-word; font-size: 14px; }
@media (max-width: 560px) { .scorebox { flex-direction: column; align-items: flex-start; } .checkrow { flex-direction: column; } }

/* Deep check as the home hero and the highlighted nav link */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.h1 { font-size: clamp(28px, 3.6vw, 38px); letter-spacing: -0.02em; }
/* Gmail cleanup stays a soft featured pill; it only fills in when it is the page you are on (CR-0457) */
nav a.nav-check { color: #2f5bd3; font-weight: 600; background: #eef2fe; box-shadow: inset 0 0 0 1px #cbd7f6; }
nav:has(a:not(.btn):not(.nav-check):hover) a.nav-check:not([aria-current]) { color: var(--muted); background: transparent; box-shadow: none; }
nav a.nav-check small { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.85; margin-left: 2px; }
.checkhero {
  padding: 64px 0 60px; color: #fff;
  background: linear-gradient(125deg, #1f3fa8 0%, #2f5bd3 38%, #5b4fd8 72%, #0e9ab8 100%);
}
.checkhero .eyebrow { color: #cfe0ff; }
.checkhero h1 { color: #fff; }
.checkhero .lead { color: #e3eafc; font-size: 18px; max-width: 600px; }
.checkhero .note { font-size: 14px; color: #d6e1fb; margin: 14px 0 0; }
.checkhero .note a { color: #fff; text-decoration: underline; }
/* No highlight on the gradient: the light code box hid white text (an address in the hero lead). */
.checkhero .lead code, .checkhero .note code { background: none; border: 0; padding: 0; color: #fff; }
.checkhero .checkrow { max-width: 560px; }
.checkhero .checkrow input { font: inherit; font-size: 17px; color: var(--ink); padding: 12px 14px; border: 0; border-radius: 8px; box-shadow: 0 4px 18px rgba(10, 20, 60, 0.25); }
.checkhero .checkrow input:focus { outline: 3px solid #9fd8ff; outline-offset: 1px; }
.checkhero .checkrow .btn { background: #fff; color: #1f3fa8; border-color: #fff; white-space: nowrap; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 12px; padding: 14px 18px; }
.checklist strong { display: block; font-size: 16px; }
.checklist span { font-size: 14px; color: #d6e1fb; }
@media (max-width: 560px) { .checkhero { padding: 44px 0 40px; } .checkhero .checkrow { flex-direction: column; } }
.article pre { border-radius: 10px; margin: 10px 0 18px; background: var(--soft); border: 1px solid var(--line); }
.article .code-block pre { background: transparent; border: 0; border-radius: 0; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.article .tbl { margin: 12px 0 18px; }
.article figure img { display: block; }

/* Gmail cleanup (CR-0164): the home hero, the second-tier deep check panel and the tool page */
.checkhero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.checkhero .actions .btn { background: #fff; color: #1f3fa8; border-color: #fff; }
.checkhero .actions .btn.herolink { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.stepslist { counter-reset: none; }
.checkband { padding: 56px 0; background: linear-gradient(125deg, #eef3fd 0%, #f1effd 60%, #e9f7fa 100%); border-bottom: 1px solid var(--line); }
.checkband .lead { font-size: 18px; color: var(--muted); max-width: 600px; }
.checkband .note { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.checkband .checkrow { max-width: 560px; }
.checkband .checkrow input { font: inherit; font-size: 17px; color: var(--ink); padding: 12px 14px; border: 1px solid #cfd8ee; border-radius: 8px; background: #fff; }
.checkband .checkrow input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.checkband .checkrow .btn { white-space: nowrap; }
.checkband .checklist li { background: #fff; border-color: #dfe5f2; }
.checkband .checklist span { color: var(--muted); }
@media (max-width: 560px) { .checkband { padding: 40px 0; } .checkband .checkrow { flex-direction: column; } }

.cleanup { padding-top: 40px; }
.cleanup h3 { margin-top: 26px; }
.cstep { border: 1px solid var(--line); border-radius: 14px; padding: 6px 22px 20px; margin-top: 22px; background: var(--bg); }
.cstep h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; overflow-wrap: anywhere; }
.cstep h2 .n { display: inline-block; width: 28px; height: 28px; line-height: 28px; text-align: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 15px; font-weight: 700; flex: none; }
.mailboxes { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
.mailbox { font: inherit; text-align: left; cursor: pointer; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; display: flex; flex-direction: column; max-width: 100%; }
.mailbox strong { overflow-wrap: anywhere; }
.mailbox span { font-size: 13px; color: var(--muted); }
.mailbox.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.help { font-size: 15px; margin: 4px 0 0; }
.help summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.help ol { padding-left: 22px; }
.progress .bar { height: 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; max-width: 560px; }
.progress .bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2f5bd3, #0e9ab8); transition: width 0.4s; }
.fine.bad { color: #b42318; }
.cstats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 8px 0 4px; }
.cstat { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; }
.cstat strong { font-size: 20px; letter-spacing: -0.01em; }
.cstat span { font-size: 13px; color: var(--muted); }
.cgroups { display: grid; gap: 10px; }
.cgroup { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.cgroup.empty { opacity: 0.6; }
.chead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; cursor: pointer; }
.chead input { width: 18px; height: 18px; }
.chead small { display: block; color: var(--muted); font-size: 14px; }
.ccount { text-align: right; }
.ccount strong { font-size: 20px; display: block; }
.linkbtn { background: none; border: 0; padding: 0; margin: 8px 0 0 30px; color: var(--accent); font: inherit; font-size: 14px; cursor: pointer; }
.fine .linkbtn { margin: 0; }
.cexamples { margin: 6px 0 0 30px; }
.cexamples table { font-size: 14px; }
.cexamples td { padding: 6px 8px; overflow-wrap: anywhere; }
.cexamples td:first-child { white-space: nowrap; color: var(--muted); }
.cexamples code { overflow-wrap: anywhere; }
.csenders { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 20px; font-size: 14px; }
.csenders li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dotted var(--line); padding: 3px 0; }
.csenders span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coptions { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin: 4px 0 12px; font-size: 15px; }
.coptions select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.tick { display: inline-flex; gap: 6px; align-items: center; }
.cbar { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff; border: 1px solid var(--accent); border-radius: 12px; padding: 12px 16px; margin-top: 16px; box-shadow: 0 -4px 18px rgba(20, 30, 70, 0.08); }
.cbar p { margin: 0; flex: 1 1 260px; font-size: 15px; }
.cempty { border: 1px solid #f1c6b4; background: #fff8f4; border-radius: 12px; padding: 4px 16px 10px; margin-top: 14px; }
.cempty h3 { margin-top: 12px; }
.cempty .tick.sure { align-items: flex-start; margin-top: 10px; font-weight: 600; }
.cempty .tick.sure input { margin-top: 4px; }
.btn.danger { background: #b42318; border-color: #b42318; color: #fff; }
.ctwo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ctwo .card h3 { margin-top: 0; }
.ctwo .card p { color: var(--ink); margin: 0 0 12px; }
.ctwo .card ol { padding-left: 20px; margin: 0 0 12px; font-size: 15px; }
.ctwo .card .fine { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .cstats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ctwo, .csenders { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .cstep { padding: 2px 14px 16px; } .cstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .linkbtn, .cexamples { margin-left: 0; } }

/* Footer links sit side by side with no spaces between them: let them wrap on a phone */
footer a { display: inline-block; }

/* CR-0167: the Gmail mark with a shine, for the "keep it clean regularly" offer. */
.gmail-shine { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 16px; background: #fff; border: 1px solid #e3e8f4; box-shadow: 0 6px 20px rgba(47, 91, 211, 0.16); flex: none; }
.gmail-shine svg.gm { width: 34px; height: auto; display: block; }
.gmail-shine::before { content: ""; position: absolute; inset: -5px; border-radius: 20px; padding: 2px; background: conic-gradient(from var(--shine, 0deg), transparent 0 62%, #fbbc04 72%, #fff 80%, #4285f4 88%, transparent 96%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: gmail-ring 3.2s linear infinite; pointer-events: none; }
.gmail-shine i { position: absolute; width: 12px; height: 12px; background: #fbbc04; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; animation: gmail-spark 2.4s ease-in-out infinite; pointer-events: none; }
.gmail-shine i:nth-of-type(1) { top: -9px; right: -7px; }
.gmail-shine i:nth-of-type(2) { bottom: -6px; left: -9px; width: 9px; height: 9px; background: #4285f4; animation-delay: 0.8s; }
.gmail-shine i:nth-of-type(3) { top: 8px; left: -12px; width: 7px; height: 7px; background: #ea4335; animation-delay: 1.5s; }
.gmail-shine.small { width: 34px; height: 34px; border-radius: 10px; vertical-align: middle; margin-right: 8px; }
.gmail-shine.small svg.gm { width: 20px; }
.gmail-shine.small::before { inset: -4px; border-radius: 13px; }
.gmail-shine.small i { transform-origin: center; scale: 0.75; }
@property --shine { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes gmail-ring { to { --shine: 360deg; } }
@keyframes gmail-spark { 0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); } 45% { opacity: 1; transform: scale(1) rotate(45deg); } 70% { opacity: 0; transform: scale(0.5) rotate(80deg); } }
@media (prefers-reduced-motion: reduce) { .gmail-shine::before, .gmail-shine i { animation: none; } .gmail-shine i { opacity: 0.9; } }
.keephead { display: flex; align-items: center; gap: 16px; margin: 20px 0 6px; padding-left: 8px; }
.keephead h2 { margin: 0; }
.keephead p { margin: 4px 0 0; }
.cstep.keep { border-color: #cfdaf6; background: linear-gradient(180deg, #f6f8ff 0%, var(--bg) 140px); }
.agree-line { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; margin: 12px 0; }
.agree-line input { margin-top: 4px; }
.sublist { display: grid; gap: 12px; margin: 12px 0 8px; }
.subcard { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; }
.subcard.on { border-color: #b9c9f3; background: #f8faff; }
.subcard h3 { margin: 0 0 2px; font-size: 17px; }
.subcard p { margin: 0; font-size: 14px; color: var(--muted); }
.pill { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: 13px; font-weight: 600; background: #e3f4e8; color: #17663a; margin-left: 6px; vertical-align: middle; }
.pill.warn { background: #fff4d9; color: #7a5200; }
.pill.off { background: #eef0f4; color: #555c6b; }
.slots { display: grid; gap: 12px; margin: 12px 0; }
.slot { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px 6px; }
.slot .form { margin: 4px 0 8px; }
.slot .slot-n { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.slot .fine { margin: 0 0 8px; }
.slot .fine.bad { color: #c2410c; }
/* CR-0167: the tools index leads with the deep check. */
.toolhero { padding: 52px 0 48px; }
.toolhero .checklist { margin-top: 0; }
.toolstrip { padding: 40px 0; border-bottom: 1px solid var(--line); }
.toolstrip .grid { grid-template-columns: repeat(4, 1fr); margin-top: 16px; }
.toolstrip .card h3 { margin-top: 0; font-size: 17px; }
@media (max-width: 860px) { .toolstrip .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .toolstrip .grid { grid-template-columns: 1fr; } .keephead { align-items: flex-start; } }

/* CR-0172: the home hero is a carousel. Every slide sits in the same grid cell, so the panel is as tall as the
   tallest one and nothing below it moves when the slide changes. */
.herocar { padding: 56px 0 26px; }
.herocar .slides { display: grid; }
.herocar .slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 0.5s ease, visibility 0s linear 0.5s; }
.herocar .slide.on { opacity: 1; visibility: visible; transition: opacity 0.5s ease; }
.herocar .h1 { color: #fff; font-size: clamp(30px, 4.4vw, 46px); }
.herocar .eyebrow .mark { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: #fff; color: #1f3fa8; font-weight: 800; font-size: 16px; letter-spacing: 0; margin-right: 8px; vertical-align: middle; text-transform: none; }
.carnav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 30px; }
.carnav button { font: inherit; font-size: 14px; cursor: pointer; color: #dfe8ff; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.24); border-radius: 999px; padding: 6px 14px; position: relative; overflow: hidden; }
.carnav button:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.carnav button[aria-selected="true"] { background: #fff; color: #1f3fa8; border-color: #fff; font-weight: 600; }
.carnav button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: #2f5bd3; transform-origin: left; animation: car-fill var(--car-ms, 6000ms) linear forwards; }
.herocar.paused .carnav button[aria-selected="true"]::after { animation-play-state: paused; }
.carnav .carpause { margin-left: auto; padding: 6px 12px; }
@keyframes car-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .herocar .slide, .herocar .slide.on { transition: none; } }
@media (max-width: 560px) { .herocar { padding: 40px 0 22px; } .carnav { gap: 6px; } .carnav button { font-size: 13px; padding: 5px 10px; } }

/* CR-0172: a short page header for a tool page, so the tool itself is on the first screen. */
.checkhero.slim { padding: 22px 0; }
.checkhero.slim .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px 28px; flex-wrap: wrap; }
.checkhero.slim h1 { font-size: clamp(22px, 2.6vw, 28px); margin: 0 0 4px; }
.checkhero.slim .eyebrow { margin-bottom: 6px; }
.checkhero.slim .note { margin: 0; }
.checkhero.slim .actions { margin: 0; }
.cleanup.first { padding-top: 26px; }

/* CR-0172: the mailbox page. */
.mbpage { padding-top: 40px; }
.mbpoints { margin-top: 28px; }
.mbnew { align-items: flex-end; max-width: 760px; }
/* CR-0180: name and signature of an address */
.mb-cardacts { display: flex; flex-wrap: wrap; gap: 8px; }
.mb-sig { margin: 8px 0 0; padding-left: 10px; border-left: 2px solid var(--line); font: inherit; font-size: 13px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.subcard p.mb-fix { color: #9a5b00; margin-top: 6px; max-width: 560px; }
.mb-editwrap { display: grid; gap: 10px; }
.mb-edit { display: grid; gap: 8px; max-width: 560px; padding: 4px 2px 10px; }
.mb-edit label { display: grid; gap: 4px; }
.mb-edit textarea { font: inherit; font-size: 15px; color: var(--ink); padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.mbnew .fine { flex: 1 1 100%; margin: 0; order: 9; }
.mb-edit p { margin: 0; }
/* CR-0847: normal or kid-safe address, and the kid-safe part of an address card */
.mbkind { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px 18px; border: 0; padding: 0; margin: 0; }
.mbkind legend { font-size: 14px; color: var(--muted); padding: 0; margin-bottom: 4px; }
.form .mbkind label { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 8px; font-size: 15px; color: var(--ink); }
.form .mbkind input, .form .agree-line input, .mb-kid .agree-line input { padding: 0; margin: 0; }
.form .agree-line { flex: 1 1 100%; flex-direction: row; align-items: center; margin: 0; color: var(--ink); }
.mbnew .mbkid-note { order: 0; }
.mb-kid { display: grid; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); max-width: 560px; }
.mb-kid p { margin: 0; }
.mb-kid .agree-line { margin: 0; align-items: center; }
.mb-kid .mb-cardacts { align-items: center; }
.mbaddr { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.mbaddr input { border: 0; flex: 1 1 auto; min-width: 0; background: transparent; }
.mbaddr b { padding: 0 11px 0 2px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.mb { display: grid; grid-template-columns: 248px minmax(0, 1fr) 288px; grid-template-rows: auto minmax(0, 1fr); height: 100vh; height: 100dvh; background: var(--soft); }
.mb-side { display: flex; flex-direction: column; gap: 12px; padding: 14px 12px; overflow-y: auto; min-height: 0; }
.mb-side select { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; max-width: 100%; }
.mb-side .fine { margin: 0; }
.mb-folders { display: grid; gap: 2px; }
.mb-folders button { font: inherit; font-size: 15px; text-align: left; cursor: pointer; border: 0; background: none; border-radius: 999px; padding: 8px 14px; color: var(--ink); display: flex; gap: 12px; align-items: center; }
.mb-folders button b { font-weight: inherit; flex: 1 1 auto; }
.mb-folders button:hover { background: #e9ecf2; }
.mb-folders button.on { background: #eaf0fd; color: #1f3fa8; font-weight: 600; }
.mb-folders button span { font-size: 12px; font-weight: 600; background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; }
.mb-main { min-width: 0; min-height: 0; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); padding: 12px 16px 16px; margin: 12px 12px 12px 0; }
.mb-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 10px; }
#list-view .mb-bar { justify-content: flex-start; }
.mb-rows { border-top: 1px solid var(--line); }
.mb-row { font: inherit; font-size: 15px; width: 100%; text-align: left; cursor: pointer; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 6px; display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; color: var(--muted); }
.mb-row:hover { background: var(--soft); }
.mb-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-row .what b { color: var(--ink); font-weight: 500; }
.mb-row .what i { font-style: normal; font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; margin: 0 4px 0 8px; }
.mbpage .pager { display: flex; gap: 4px; align-items: center; margin-left: auto; font-size: 13px; }
.mb-row .when { font-size: 13px; }
.mb-row.unread .who, .mb-row.unread .what b { color: var(--ink); font-weight: 700; }
/* CR-0318: a bin on each row, over the date when the pointer is on the row; always there on a touch screen */
.mb-line { position: relative; }
.mb-del { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: var(--bg); opacity: 0; }
.mb-line:hover .mb-del, .mb-del:focus-visible, .mb-del.armed { opacity: 1; }
.mb-line:hover .mb-row .when { visibility: hidden; }
.mb-del.armed { color: #c0392b; background: #fdecea; }
.mb-row .what i.mb-in { margin: 0 8px 0 0; background: var(--soft); }
@media (hover: none) {
  .mb-del { opacity: 1; top: auto; bottom: 6px; transform: none; }
  .mb-line .mb-row { padding-right: 40px; }
  .mb-line:hover .mb-row .when { visibility: visible; }
}
.mb-empty { padding: 28px 6px; margin: 0; }
.mb-read h2 { margin: 6px 0 8px; font-size: 22px; overflow-wrap: anywhere; }
.mb-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--muted); margin: 0 0 14px; overflow-wrap: anywhere; }
.mb-meta b { color: var(--ink); font-weight: 600; }
#read-actions { justify-content: flex-start; }
#read-body pre { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 15px; }
#read-body iframe { width: 100%; height: 62vh; min-height: 320px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mb-files { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.mb-file { font: inherit; cursor: pointer; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; max-width: 260px; }
.mb-file:hover { border-color: var(--accent); }
.mb-file:disabled { cursor: default; opacity: .7; }
.mb-file:disabled:hover { border-color: var(--line); }
.mb-file b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.mb-file span { font-size: 12px; color: var(--muted); }
.mb-compose { display: block; margin: 0; }
.mb-compose h2 { margin-top: 4px; }
.mb-compose label { margin-bottom: 12px; }
.mb-compose textarea { font: inherit; font-size: 15px; color: var(--ink); padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.mb-compose textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.mb-compose select { font: inherit; font-size: 15px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
/* Calendar (CR-0456): the email59 addresses as chips in their colours, days with meeting cards */
.mb-calnav { margin-top: 6px; }
.mb-cal .mb-bar h2 { margin: 0; }
.mb-calnav button.on { background: #eaf0fd; color: #1f3fa8; font-weight: 600; }
.mb-calboxes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.mb-calbox { font: inherit; font-size: 13px; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: 3px 10px; display: inline-flex; gap: 6px; align-items: center; }
.mb-calbox.on { color: var(--ink); border-color: #c9d3ea; background: #f5f8ff; }
.mb-calbox .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mb-calbox:not(.on) .dot { opacity: 0.3; }
.mb-calday { font-size: 14px; font-weight: 600; color: var(--muted); margin: 16px 0 6px; }
.mb-calday.today { color: #1f3fa8; }
.mb-event { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; border: 1px solid var(--line); border-left: 4px solid #2f5bd3; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.mb-event.cancelled .mb-evbody > b { text-decoration: line-through; color: var(--muted); }
.mb-evtime { font-size: 14px; color: var(--muted); }
.mb-evbody { overflow-wrap: anywhere; }
.mb-evbody p { margin: 2px 0 0; }
.mb-rsvp { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mb-rsvp .btn.on { background: #eaf0fd; border-color: #2f5bd3; color: #1f3fa8; }
.mb-meetwhen { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: end; }
.mb-meetwhen label { flex: 0 1 auto; }
@media (max-width: 860px) { .mb-event { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.mb-viewer { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; width: min(960px, 94vw); max-height: 92vh; }
.mb-viewer::backdrop { background: rgba(20, 24, 40, 0.55); }
.mb-viewer strong { overflow-wrap: anywhere; }
#viewer-body img { max-width: 100%; max-height: 76vh; display: block; margin: 0 auto; }
#viewer-body iframe { width: 100%; height: 76vh; border: 1px solid var(--line); border-radius: 8px; }
#viewer-body pre { max-height: 76vh; overflow: auto; background: var(--soft); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
#manage .card { margin-top: 18px; max-width: 520px; }
#manage .card h3 { margin-top: 0; }
#manage .card p { color: var(--ink); margin: 0 0 10px; }
}

/* CR-0196: with an address open the mailbox is the whole window: a top bar with the menu button, folders and the
   page's sections in the menu (a drawer on phones), the mail in the middle, articles on the right. */
body.mbapp { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
body.mbapp > header.top, body.mbapp > footer { display: none; }
body.mbapp main { flex: 1 1 auto; min-height: 0; }
body.mbapp .mbpage { padding: 0; height: 100%; }
body.mbapp .mbpage > .wrap { max-width: none; padding: 0; height: 100%; }
body.mbapp #signed-in { height: 100%; }
body.mbapp .notice { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; margin: 0; width: max-content; max-width: min(560px, 92vw); box-shadow: 0 8px 28px rgba(20, 24, 40, 0.18); }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mb-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.mb-top .brand { margin: 0 22px 0 4px; }
.mb-top .brand:hover { text-decoration: none; }
.mb-top input[type="search"] { font: inherit; font-size: 15px; color: var(--ink); padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); flex: 1 1 auto; min-width: 0; max-width: 720px; margin-right: auto; }
.mb-top input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: -1px; background: var(--bg); }
.mb-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.mb-icon:hover { background: var(--soft); color: var(--ink); }
.mb-icon.small { width: 30px; height: 30px; }
.mb-icon:disabled { opacity: 0.35; cursor: default; background: none; }
.mb.noside { grid-template-columns: minmax(0, 1fr) 288px; }
.mb.noside .mb-side { display: none; }
.mb.noside .mb-main { margin-left: 12px; }
.mb-write, .mb-fab { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; box-shadow: 0 2px 8px rgba(20, 24, 40, 0.16); }
.mb-writerow { display: flex; align-items: center; gap: 8px; }
.mb-write { align-self: flex-start; padding: 13px 20px; }
.mb-fab { display: none; }
.mb-menu { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 10px; }
.mb-menu a, .mb-menu button { font: inherit; font-size: 15px; text-align: left; cursor: pointer; border: 0; background: none; border-radius: 999px; padding: 8px 14px; color: var(--ink); display: flex; gap: 12px; align-items: center; }
.mb-menu a:hover, .mb-menu button:hover { background: #e9ecf2; text-decoration: none; }
.mb-menu .ic, .mb-folders .ic { color: var(--muted); }
.mb-folders button.on .ic { color: inherit; }
.mb[data-view="manage"] .mb-menu [data-open="manage"] { background: #eaf0fd; color: #1f3fa8; font-weight: 600; }
.mb[data-view="manage"] .mb-folders button.on { background: none; color: var(--ink); font-weight: 400; }
.mb-side #usage { margin-top: auto; padding: 8px 14px 0; font-size: 13px; }
.mb-legal { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 0 14px; font-size: 13px; }
.mb-scrim { display: none; }
#list-view .mb-bar { flex-wrap: nowrap; }
#list-view .mb-bar h2 { margin: 0 6px 0 4px; font-size: 18px; }
.mb-row .av { display: none; }
.mb-row .when { display: inline-flex; align-items: center; gap: 6px; }
.mb-tick { color: #17803d; display: inline-flex; align-items: center; gap: 4px; flex: none; }
.mb-tick .ic { width: 17px; height: 17px; stroke-width: 2.2; }
.mb-meta .mb-tick { font-weight: 600; }
.mb-spamnote { border-left: 3px solid #e2b93b; background: #fffaeb; border-radius: 0 8px 8px 0; padding: 8px 12px; color: var(--ink); max-width: 640px; }
.mb-compose .fine { margin-top: 10px; }
#manage h2 { margin-top: 6px; }
.mb-start { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.mb-ads { overflow-y: auto; min-height: 0; padding: 12px 12px 12px 0; display: grid; gap: 10px; align-content: start; }
.mb-adlabel { display: flex; justify-content: space-between; gap: 8px; margin: 2px 2px 0; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.mb-adlabel a { letter-spacing: 0; text-transform: none; font-weight: 400; font-size: 12px; }
.mb-ad { display: grid; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--ink); }
.mb-ad:hover { border-color: var(--accent); text-decoration: none; }
.mb-ad small { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.mb-ad b { font-size: 15px; line-height: 1.3; }
.mb-ad span { font-size: 13px; line-height: 1.45; color: var(--muted); }
.mb-ad em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--accent); }
.mb-adline { display: none; gap: 8px; margin-top: 18px; }
@media (max-width: 1180px) {
  .mb, .mb.noside { grid-template-columns: 248px minmax(0, 1fr); }
  .mb.noside { grid-template-columns: minmax(0, 1fr); }
  .mb-ads { display: none; }
  .mb-adline { display: grid; }
}
@media (max-width: 860px) {
  .mb, .mb.noside { grid-template-columns: minmax(0, 1fr); background: var(--bg); }
  .mb-top { padding: 6px 8px; gap: 4px; }
  .mb-top .brand, .mb-top a.mb-icon { display: none; }
  .mb-top input[type="search"] { max-width: none; }
  .mb-side, .mb.noside .mb-side { display: flex; position: fixed; inset: 0 auto 0 0; z-index: 40; width: min(84vw, 320px); background: var(--bg); box-shadow: 0 0 40px rgba(20, 24, 40, 0.25); transform: translateX(-104%); visibility: hidden; transition: transform 0.2s ease, visibility 0.2s; }
  .mb.drawer .mb-side { transform: none; visibility: visible; }
  .mb.drawer .mb-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(20, 24, 40, 0.45); }
  .mb-write { display: none; }
  .mb-main, .mb.noside .mb-main { margin: 0; border: 0; border-radius: 0; padding: 8px 12px 88px; }
  .mb[data-view="list"] .mb-fab { display: inline-flex; position: fixed; right: 16px; bottom: 18px; z-index: 30; padding: 14px 20px; box-shadow: 0 6px 18px rgba(20, 24, 40, 0.28); }
  .mb-rows { border-top: 0; }
  .mb-row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 0 12px; padding: 10px 2px; border-bottom: 0; align-items: center; }
  .mb-row .av { display: flex; align-items: center; justify-content: center; grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 600; font-size: 17px; }
  .mb-row .what { grid-column: 2 / -1; grid-row: 2; font-size: 14px; }
  .mb-row .what b { display: block; overflow: hidden; text-overflow: ellipsis; }
  .mb-row .what i { margin-left: 0; }
  .mb-read h2 { font-size: 20px; }
  #read-body iframe { height: 58vh; }
  .mb-compose textarea { min-height: 38vh; }
  .mb-compose label { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .mb-side { transition: none; } }

/* "Use it from an assistant" block on tool pages with an API (CR-0131 BD-29) */
.assist { padding: 0 0 40px; }
.assist .box { border: 1px solid var(--line, #e2e8f0); border-radius: 14px; padding: 20px; background: var(--soft, #f8fafc); }
.assist h2 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.assist pre { background: #0f172a; color: #e2e8f0; border-radius: 10px; margin: 12px 0; }
.assist dl { display: grid; grid-template-columns: 7rem 1fr; gap: 4px 12px; margin: 0; font-size: 15px; }
.assist dt { font-weight: 600; }
.assist dd { margin: 0; }

/* Profile photo on the account page (CR-0456) */
.photo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 20px; }
.photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.photo-none { display: inline-flex; align-items: center; justify-content: center; background: #2f5bd3; color: #fff; font-size: 26px; font-weight: 600; }
.photo-none[hidden], .photo[hidden] { display: none; }

/* Theme switch (CR-0742): the round sun/moon button theme.js adds to the top menu. */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-left: 10px; padding: 0; flex: none; vertical-align: middle; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--muted); cursor: pointer; }
.theme-toggle:hover { color: var(--ink); background: var(--soft); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 560px) { .theme-toggle { margin-left: 4px; } }

/* Dark theme (CR-0742). Daylight is the default: nothing below applies until theme.js puts data-theme="dark"
   on <html>, which happens only after the visitor picks dark with the switch.
   How to add to it: the variables come first; after them one rule for every colour the light rules write out.
   Each rule starts with :where(html[data-theme="dark"]) so it weighs the same as the light rule it replaces and
   wins only by coming later. Keep the light rules as they are. */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e6e9f0;
  --muted: #a3abbb;
  --line: #2a3140;
  --soft: #141926;
  --bg: #0f131b;
  --accent: #3d6ae6;
  --accent-ink: #ffffff;
  --code-bg: #0a0d13;
  --code-ink: #e6e9f0;
  /* dark only */
  --link: #8fb0ff;      /* accent as text: the fill blue is too dim to read on dark */
  --card: #171d2a;      /* raised surface: cards, steps, boxes */
  --field: #0b0f16;     /* inputs */
  --hover: #1f2634;
  --tint: #18223d;      /* the light theme's pale blue backgrounds */
  --tint-ink: #b9ccff;
  --tint-line: #2f4379;
  --ok-bg: #12331f; --ok-ink: #7ee2a8;
  --warn-bg: #3a2c0a; --warn-ink: #f5c96a;
  --bad-bg: #3d1516; --bad-ink: #ffa3a3;
  --off-bg: #232a38; --off-ink: #a3abbb;
  --frame: #2c3445;     /* the phone frame around app screenshots */
  --box-line: #2a3140;  /* the pale grey frame (#e5e7eb) of boxes that write their border inline */
}

/* Shared parts: links, top menu, buttons, cards, code, forms, notices, pills */
:where(html[data-theme="dark"]) a { color: var(--link); }
:where(html[data-theme="dark"]) .eyebrow { color: var(--link); }
:where(html[data-theme="dark"]) .brand span { color: var(--link); }
:where(html[data-theme="dark"]) nav a:not(.btn):not([aria-current]):hover,
:where(html[data-theme="dark"]) nav a:not(.btn):not([aria-current]):focus-visible { color: #dbe5ff; background: #1c2a52; }
:where(html[data-theme="dark"]) nav a.nav-check { color: var(--tint-ink); background: var(--tint); box-shadow: inset 0 0 0 1px var(--tint-line); }
:where(html[data-theme="dark"]) .codecard { box-shadow: inset 0 0 0 1px var(--line); }
:where(html[data-theme="dark"]) .step,
:where(html[data-theme="dark"]) .card,
:where(html[data-theme="dark"]) .price { background: var(--card); }
:where(html[data-theme="dark"]) :is(input, select, textarea) { background-color: var(--field); color: var(--ink); border-color: var(--line); }
:where(html[data-theme="dark"]) .qcard:hover { border-color: var(--tint-line); background: var(--hover); }
:where(html[data-theme="dark"]) .qcard strong { color: var(--link); }
:where(html[data-theme="dark"]) .notice { background: var(--tint); border-color: var(--tint-line); }
:where(html[data-theme="dark"]) .notice.bad { border-color: #c2410c; background: #3a1d10; }
:where(html[data-theme="dark"]) .tabs button[aria-selected="true"] { color: var(--link); border-bottom-color: var(--link); }
:where(html[data-theme="dark"]) .keykind,
:where(html[data-theme="dark"]) .pill,
:where(html[data-theme="dark"]) .lcs.valid { background: var(--ok-bg); color: var(--ok-ink); }
:where(html[data-theme="dark"]) .keykind.test,
:where(html[data-theme="dark"]) .pill.warn,
:where(html[data-theme="dark"]) .lcs.risky,
:where(html[data-theme="dark"]) .lcs.role { background: var(--warn-bg); color: var(--warn-ink); }
:where(html[data-theme="dark"]) .lcs.disposable,
:where(html[data-theme="dark"]) .lcs.no_mx,
:where(html[data-theme="dark"]) .lcs.invalid { background: var(--bad-bg); color: var(--bad-ink); }
:where(html[data-theme="dark"]) .pill.off { background: var(--off-bg); color: var(--off-ink); }

/* Signed-in pages: the account console, the mailbox landing page and app, the admin's inbound page.
   An email's own HTML is not themed: it stays on white inside its frame (.testview iframe, #read-body iframe,
   #detail iframe). Avatar colours and the calendar's address colours come from mailbox.js and are the same in
   both themes. inbound.html has its own style block and takes its two written-out colours from --bad-ink. */
:where(html[data-theme="dark"]) .subcard.on { border-color: var(--tint-line); background: var(--card); }
:where(html[data-theme="dark"]) .pack-credits { color: var(--link); }
:where(html[data-theme="dark"]) .subcard p.mb-fix { color: var(--warn-ink); }
:where(html[data-theme="dark"]) .mbaddr { background: var(--field); }
:where(html[data-theme="dark"]) .mb-side select,
:where(html[data-theme="dark"]) .mb-compose select { background: var(--field); }
:where(html[data-theme="dark"]) .mb-folders button:hover,
:where(html[data-theme="dark"]) .mb-menu a:hover,
:where(html[data-theme="dark"]) .mb-menu button:hover { background: var(--hover); }
:where(html[data-theme="dark"]) .mb-folders button.on,
:where(html[data-theme="dark"]) .mb-calnav button.on,
:where(html[data-theme="dark"]) .mb[data-view="manage"] .mb-menu [data-open="manage"] { background: var(--tint); color: var(--tint-ink); }
:where(html[data-theme="dark"]) .mb-del.armed { color: var(--bad-ink); background: var(--bad-bg); }
:where(html[data-theme="dark"]) .mb-calbox { background: var(--card); }
:where(html[data-theme="dark"]) .mb-calbox.on { border-color: var(--tint-line); background: var(--tint); }
:where(html[data-theme="dark"]) .mb-calday.today { color: var(--link); }
:where(html[data-theme="dark"]) .mb-event { background: var(--card); }
:where(html[data-theme="dark"]) .mb-rsvp .btn.on { background: var(--tint); border-color: var(--link); color: var(--tint-ink); }
:where(html[data-theme="dark"]) .mb-viewer { background: var(--card); color: var(--ink); }
:where(html[data-theme="dark"]) .mb-viewer::backdrop { background: rgba(0, 0, 0, 0.65); }
:where(html[data-theme="dark"]) .mb-tick { color: var(--ok-ink); }
:where(html[data-theme="dark"]) .mb-spamnote { border-left-color: #b8922a; background: var(--warn-bg); }
:where(html[data-theme="dark"]) .mb-ad small,
:where(html[data-theme="dark"]) .mb-ad em { color: var(--link); }
:where(html[data-theme="dark"]) .mb-ad:hover { border-color: var(--link); }
@media (max-width: 860px) {
  :where(html[data-theme="dark"]) .mb-side { box-shadow: 0 0 40px rgba(0, 0, 0, 0.6); }
  :where(html[data-theme="dark"]) .mb.drawer .mb-scrim { background: rgba(0, 0, 0, 0.6); }
}

/* Public pages: deep check, Gmail cleanup, home, verify, the assistant block. The gradient hero bands
   (.checkhero, .herocar) are the same in both themes, so their white fields and buttons stay white. */
:where(html[data-theme="dark"]) .scorebox,
:where(html[data-theme="dark"]) .cstep,
:where(html[data-theme="dark"]) .cbar,
:where(html[data-theme="dark"]) .terms { background: var(--card); }
:where(html[data-theme="dark"]) .terms { border-color: var(--line); }
:where(html[data-theme="dark"]) .cbar { box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.4); }
:where(html[data-theme="dark"]) .scorebox .score strong,
:where(html[data-theme="dark"]) .help summary,
:where(html[data-theme="dark"]) .linkbtn { color: var(--link); }
:where(html[data-theme="dark"]) .verdict[data-verdict="likely_invalid"], :where(html[data-theme="dark"]) .checks .st-fail { color: var(--bad-ink); }
:where(html[data-theme="dark"]) .verdict[data-verdict="risky"], :where(html[data-theme="dark"]) .verdict[data-verdict="unknown"], :where(html[data-theme="dark"]) .checks .st-warn { color: var(--warn-ink); }
:where(html[data-theme="dark"]) .verdict[data-verdict="likely_valid"], :where(html[data-theme="dark"]) .checks .st-pass { color: var(--ok-ink); }
:where(html[data-theme="dark"]) .fine.bad { color: var(--bad-ink); }
:where(html[data-theme="dark"]) .slot .fine.bad { color: var(--bad-ink); }
:where(html[data-theme="dark"]) .checkhero .checkrow input { background-color: #fff; color: #1f2430; }
:where(html[data-theme="dark"]) .checkband { background: linear-gradient(125deg, #151c30 0%, #1a1a33 60%, #12232b 100%); }
:where(html[data-theme="dark"]) .checkband .checkrow input { border-color: var(--line); background: var(--field); }
:where(html[data-theme="dark"]) .checkband .checklist li { background: var(--card); border-color: var(--line); }
:where(html[data-theme="dark"]) .coptions select { background: var(--field); }
:where(html[data-theme="dark"]) .cempty { border-color: #7a3f27; background: #2b1810; }
:where(html[data-theme="dark"]) .gmail-shine { background: var(--card); border-color: var(--line); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); }
:where(html[data-theme="dark"]) .cstep.keep { border-color: var(--tint-line); background: linear-gradient(180deg, var(--tint) 0%, var(--card) 140px); }
:where(html[data-theme="dark"]) .assist pre { box-shadow: inset 0 0 0 1px var(--line); }

/* The OAuth sign-in page the API draws (api/app/oauth.py); it loads theme.js and follows the choice. */
:where(html[data-theme="dark"]) .oauth-page { background: var(--bg); }
:where(html[data-theme="dark"]) .oauth-top { background: rgba(15, 19, 27, 0.92); }
:where(html[data-theme="dark"]) .oauth-secure::before { background: var(--ok-ink); }
:where(html[data-theme="dark"]) .oauth-card { border-color: var(--line); background: var(--card); box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45); }
:where(html[data-theme="dark"]) .oauth-permissions li::before,
:where(html[data-theme="dark"]) .oauth-switch { color: var(--link); }
:where(html[data-theme="dark"]) .oauth-form input:not([type="hidden"]) { background: var(--field); }
:where(html[data-theme="dark"]) .oauth-form input:not([type="hidden"]):focus { outline-color: rgba(143, 176, 255, 0.3); border-color: var(--link); }
:where(html[data-theme="dark"]) .oauth-actions .btn-ghost { color: var(--ink); background: var(--card); border-color: var(--line); }
:where(html[data-theme="dark"]) .oauth-form .form-error { background: var(--bad-bg); color: var(--bad-ink); }
:where(html[data-theme="dark"]) .oauth-footer { background: var(--soft); }

/* The b59.link list box (the waitlist on /app) brings its own light colours in a style tag it adds later,
   so these rules weigh more on purpose (no :where). Its button is the same in both themes. */
html[data-theme="dark"] .b59l { color: var(--ink); }
html[data-theme="dark"] .b59l .b59l-desc,
html[data-theme="dark"] .b59l .b59l-share { color: var(--muted); }
html[data-theme="dark"] .b59l .b59l-input { background: var(--field); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .b59l .b59l-ok { color: var(--ok-ink); }

/* Articles. The article text comes from the content API (the content DB), so its inline colours can't be edited
   here; the rules with !important are for those. The comments and reactions blocks (content API widgets)
   take their colours from --b59c-*: set on the root, because the widget hangs its verify dialog on <body>. The
   widgets add their style tags later, so the rules for colours they write out weigh more on purpose (no :where).
   Drawn figures (SVG with its own dark text) and pictures sit on a light panel instead of being recoloured. */
html[data-theme="dark"] {
  --b59c-accent: var(--link);
  --b59c-accent-dark: var(--link);
  --b59c-text: var(--ink);
  --b59c-muted: var(--muted);
  --b59c-border: var(--line);
  --b59c-bg: var(--card);
}
html[data-theme="dark"] .b59c .b59c-btn { background: var(--accent); color: #fff; }
html[data-theme="dark"] .b59c .b59c-btn:hover { background: var(--accent); filter: brightness(1.12); }
html[data-theme="dark"] .b59c-err { color: var(--bad-ink); background: var(--bad-bg); border-top-color: #5a2224; }
html[data-theme="dark"] .b59r-err { color: var(--bad-ink); }
html[data-theme="dark"] .b59c-dlg { background: rgba(0, 0, 0, 0.65); }
:where(html[data-theme="dark"]) .article figure svg { background: #f6f7f9; border-radius: 12px; padding: 14px; }
:where(html[data-theme="dark"]) .article figure img { background-color: #fff; }
html[data-theme="dark"] .article figure img { border-color: var(--line) !important; }
html[data-theme="dark"] [data-b59-article] :is([style*="background:#f"], [style*="background: #f"]) { background: var(--card) !important; border-color: var(--line) !important; }
html[data-theme="dark"] [data-b59-article] :is([style*="color:#6b7280"], [style*="color: #6b7280"]) { color: var(--muted) !important; }

/* Kid mailbox (CR-0847 phase 4, kid.html): full screen, big type, one mailbox. Colours only from the theme
   variables, so the dark theme needs no rules of its own. */
body.kidpage { min-height: 100vh; display: flex; flex-direction: column; background: var(--soft); font-size: 17px; }
.kid-top { display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
.kid-top .brand { margin-right: auto; }
.kid-who { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.kid-notice { position: fixed; top: 72px; left: 50%; transform: translateX(-50%); z-index: 5; max-width: min(560px, 92vw); box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.kid-signin { flex: 1; display: grid; place-items: center; padding: 24px; }
.kid-card, .kid-form { display: grid; gap: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.kid-card { width: min(420px, 100%); }
.kid-card h1 { font-size: 30px; margin: 0; }
.kid-card p { margin: 0; }
.kid-card label, .kid-form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.kid-card input, .kid-form input, .kid-form textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); width: 100%; }
.kid-form textarea { resize: vertical; min-height: 220px; }
.kid-card .btn, .kid-form .btn { font-size: 17px; padding: 10px 20px; }
.kid-app { flex: 1; display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 20px; max-width: 1100px; width: 100%; margin: 0 auto; align-content: start; }
.kid-folders { display: flex; flex-direction: column; gap: 6px; }
.kid-folders [data-folder], .kid-refresh { font: inherit; text-align: left; padding: 10px 14px; border: 0; border-radius: 10px; background: none; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; }
.kid-folders [data-folder]:hover, .kid-refresh:hover { background: var(--bg); }
.kid-folders [data-folder].on { background: var(--bg); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.kid-folders #kid-write { font-size: 17px; padding: 12px 18px; margin-bottom: 8px; }
.kid-refresh { color: var(--muted); font-size: 14px; margin-top: 8px; }
.kid-pane { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 8px; min-width: 0; min-height: 70vh; }
#kid-read, #kid-compose { padding: 20px 24px; }
#kid-compose { padding: 0; border: 0; background: none; }
.kid-messages { list-style: none; margin: 0; padding: 0; }
.kid-messages li + li { border-top: 1px solid var(--line); }
.kid-messages button { font: inherit; color: var(--ink); width: 100%; text-align: left; background: none; border: 0; border-radius: 10px; padding: 12px 14px; cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
.kid-messages button:hover { background: var(--soft); }
.kid-messages .unread .kid-from, .kid-messages .unread .kid-subj { font-weight: 700; }
.kid-from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kid-date { grid-column: 2; grid-row: 1; font-size: 14px; }
.kid-subj, .kid-snip { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kid-snip { font-size: 15px; }
.kid-empty { padding: 28px 14px; margin: 0; }
.kid-more { display: flex; gap: 8px; justify-content: flex-end; margin: 0; padding: 4px 8px; }
.kid-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kid-meta { display: flex; flex-direction: column; font-size: 15px; overflow-wrap: anywhere; }
.kid-body iframe { width: 100%; min-height: 60vh; border: 0; background: #fff; border-radius: 8px; }
.kid-body pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 0; }
.kid-pic { display: block; max-width: 100%; margin-top: 12px; border-radius: 8px; }
.kid-files { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 720px) {
  .kid-app { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .kid-app > .kid-pane { min-height: 50vh; }
  .kid-folders { flex-direction: row; flex-wrap: wrap; }
  .kid-folders #kid-write { margin: 0; flex-basis: 100%; }
  .kid-folders [data-folder] { gap: 6px; }
  .kid-who { display: none; }
  #kid-read { padding: 14px; }
}
