/*
 * Inbox Atlas: one stylesheet for every page.
 *
 * The colours, type and spacing come from the founder's prototype. Light and
 * dark follow the system (prefers-color-scheme) unless the theme button has
 * set data-theme="light" or data-theme="dark" on <html>. No web fonts: the
 * serif and sans stacks are the system's own.
 *
 * --faint is kept for rules, carets and decoration only; it is too light for
 * small text, so small text that carries meaning uses --muted.
 */

/* ── Tokens ─────────────────────────────────────────────────────────────── */

:root {
  --bg: #F3F5F7; --panel: #FFFFFF; --ink: #1C2430; --muted: #5B6675; --faint: #8A94A3; --rule: #DCE1E7;
  --accent: #1F5F6B; --bar: #C9D6DC; --bar-strong: #1F5F6B; --hover: #EBEFF3;
  --on-accent: #F3F5F7; --tint: #E3EDEF;
  --ok: #2B6A45; --ok-bg: #E5F1E9;
  --warn: #85550F; --warn-bg: #FAF0DF;
  --danger: #A13B3B; --danger-bg: #FAEAEA;
  --shadow: 0 1px 2px rgba(28, 36, 48, .05), 0 10px 28px rgba(28, 36, 48, .07);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161C; --panel: #191E26; --ink: #E6EAF0; --muted: #A3ADBB; --faint: #747F8E; --rule: #2A313C;
    --accent: #7FB8C4; --bar: #2C3A42; --bar-strong: #7FB8C4; --hover: #20262F;
    --on-accent: #12161C; --tint: #1A292F;
    --ok: #8CC7A1; --ok-bg: #16261D;
    --warn: #E2BA74; --warn-bg: #2A2216;
    --danger: #EE9D9D; --danger-bg: #2E1B1D;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .28);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12161C; --panel: #191E26; --ink: #E6EAF0; --muted: #A3ADBB; --faint: #747F8E; --rule: #2A313C;
  --accent: #7FB8C4; --bar: #2C3A42; --bar-strong: #7FB8C4; --hover: #20262F;
  --on-accent: #12161C; --tint: #1A292F;
  --ok: #8CC7A1; --ok-bg: #16261D;
  --warn: #E2BA74; --warn-bg: #2A2216;
  --danger: #EE9D9D; --danger-bg: #2E1B1D;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .28);
  color-scheme: dark;
}

/* ── Base ───────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--sans); font-variant-numeric: tabular-nums;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
main { flex: 1 0 auto; }
h1, h2, h3 { margin: 0; }
h1 { font: 400 clamp(30px, 5vw, 44px)/1.15 var(--serif); letter-spacing: -.01em; }
h2 { font: 400 clamp(23px, 3.4vw, 30px)/1.2 var(--serif); letter-spacing: -.005em; }
h3 { font: 600 15px/1.4 var(--sans); }
p { margin: 0 0 12px; }
a { color: var(--accent); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }
small { font-size: 12.5px; }
code { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
img, svg { max-width: 100%; }
input, button, select, textarea { font: inherit; color: inherit; }
input[type=checkbox] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-app { max-width: 880px; }
.wrap-narrow { max-width: 760px; }
.wrap-text { max-width: 720px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ── Header and footer ──────────────────────────────────────────────────── */

.site-head { border-bottom: 1px solid var(--rule); background: var(--bg); padding-top: env(safe-area-inset-top, 0px); }
.head-row { display: flex; align-items: center; gap: 8px 20px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; border-radius: 6px; }
.brand:hover .brand-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.brand-name { font: 500 19px/1 var(--serif); letter-spacing: -.005em; white-space: nowrap; }
.mark { width: 28px; height: 28px; flex: none; display: block; }
.mark .m-bg { fill: var(--accent); }
.mark .m-b { fill: var(--bg); }
.site-nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; }
.site-nav a, .site-nav .linklike { color: var(--ink); text-decoration: none; font-size: 14.5px; padding: 8px 2px; }
.site-nav a:hover, .site-nav .linklike:hover { color: var(--accent); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 1px solid var(--rule); border-radius: 50%; background: var(--panel); color: var(--ink); cursor: pointer; padding: 0;
}
.icon-btn:hover { background: var(--hover); }
.icon-btn svg { width: 18px; height: 18px; display: block; }
.theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* The app header: brand, mailbox, links, theme. On phones the mailbox and links get their own rows. */
.app-head .head-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "brand mailbox nav theme"; align-items: center;
}
.app-head .brand { grid-area: brand; margin-right: 0; }
.app-head .mailbox { grid-area: mailbox; }
.app-head .site-nav { grid-area: nav; justify-content: flex-end; }
.app-head .theme-toggle { grid-area: theme; }
.mailbox {
  justify-self: start; max-width: 100%; min-width: 0; display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px; border: 1px solid var(--rule); border-radius: 999px; background: var(--panel);
  color: var(--muted); font-size: 13px;
}
.mailbox span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mailbox:empty { visibility: hidden; }
.mailbox .state { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.mailbox .state.off { background: var(--warn); }

.site-foot { border-top: 1px solid var(--rule); margin-top: 72px; color: var(--muted); font-size: 13.5px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 22px; padding-bottom: 26px; }
.foot-row nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-row a { color: var(--muted); }
.foot-row a:hover { color: var(--accent); }
.foot-row p { margin: 0; }

.demo-bar {
  background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--rule);
  font-size: 14px; text-align: center; padding: 9px 16px; font-weight: 500;
}

/* ── Buttons and forms ──────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: var(--radius);
  border: 1px solid var(--rule); background: var(--panel); color: var(--ink);
  font: 500 15px/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.1); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--panel); }
.btn-danger:hover { background: var(--danger); filter: brightness(1.08); }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: 13.5px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; filter: none; }
.btn.busy { cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.linklike {
  background: none; border: 0; padding: 0; margin: 0; color: var(--accent); cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px; font: inherit;
}
.inline-form { display: inline; margin: 0; }
.field { display: grid; gap: 6px; margin: 0 0 12px; }
.field label { font-weight: 500; font-size: 14px; }
.text-input {
  width: 100%; max-width: 320px; min-height: 44px; padding: 9px 12px; border: 1px solid var(--rule);
  border-radius: 6px; background: var(--panel); color: var(--ink);
}

/* ── Notices, cards, progress ───────────────────────────────────────────── */

.notice {
  display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; padding: 12px 14px;
  background: var(--tint); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: var(--radius);
}
.notice > div { flex: 1; min-width: 0; }
.notice p:last-child { margin-bottom: 0; }
.notice.ok { background: var(--ok-bg); border-left-color: var(--ok); }
.notice.warn { background: var(--warn-bg); border-left-color: var(--warn); }
.notice.error { background: var(--danger-bg); border-left-color: var(--danger); }
.notice .dismiss { flex: none; width: 32px; height: 32px; margin: -4px -6px -4px 0; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 6px; font-size: 20px; line-height: 1; }
.notice .dismiss:hover { background: var(--hover); color: var(--ink); }

.card { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px 22px 20px; margin: 0 0 16px; }
.card > h2 { font-size: 23px; margin: 0 0 10px; }
.card > h3 { margin: 18px 0 6px; }
.empty { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 28px 24px; color: var(--muted); }
.empty h2 { color: var(--ink); margin: 0 0 8px; font-size: 24px; }
.empty p:last-child { margin-bottom: 0; }
.error-text { color: var(--danger); }

.bar { height: 6px; background: var(--bar); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--bar-strong); border-radius: 3px; transition: width .4s ease; }
.bar.indeterminate > i { width: 32%; animation: bar-slide 1.6s ease-in-out infinite; }
@keyframes bar-slide { from { transform: translateX(-100%); } to { transform: translateX(320%); } }

/* ── Landing ────────────────────────────────────────────────────────────── */

.hero { padding: 72px 0 80px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.4vw, 54px); margin: 0 0 18px; max-width: 14ch; }
.hero .lead { font-size: 17px; color: var(--muted); max-width: 54ch; margin: 0 0 26px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-note { color: var(--muted); font-size: 13.5px; margin: 14px 0 0; }

.hero-map { margin: 0; container-type: inline-size; }
.hero-map .frame {
  position: relative; aspect-ratio: 4 / 3; background: var(--panel); border: 1px solid var(--rule);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.hero-map figcaption { color: var(--muted); font-size: 13px; margin: 10px 2px 0; }
.hero-map .blk { position: absolute; padding: 1px; }
.hero-map .blk > div { position: absolute; inset: 1px; border-radius: 2px; overflow: hidden; display: flex; flex-direction: column; }
.hero-map .lbl { flex: none; height: 22px; padding: 4px 7px 0; color: #fff; font: 600 12px/1.3 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-map .body { position: relative; flex: 1; margin: 0 2px 2px; }
.hero-map .body span { position: absolute; border: 1px solid rgba(0, 0, 0, .14); }
.hero-map .dot { position: absolute; right: 7px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); }
@container (max-width: 460px) {
  .hero-map .sm .lbl { display: none; }
  .hero-map .lbl { font-size: 11px; padding: 3px 5px 0; height: 19px; }
}
/* Positions: a squarified treemap of the prototype's fictional example mailbox, computed with treemap.js. */
.hero-map .hm1 { left: 0%; top: 0%; width: 44.431%; height: 51.361%; }
.hero-map .hm1 .s1 { left: 0%; top: 0%; width: 67.692%; height: 100%; }
.hero-map .hm1 .s2 { left: 67.692%; top: 0%; width: 32.308%; height: 76.72%; }
.hero-map .hm1 .s3 { left: 67.692%; top: 76.72%; width: 32.308%; height: 23.28%; }
.hero-map .hm2 { left: 0%; top: 51.361%; width: 44.431%; height: 48.639%; }
.hero-map .hm2 .s1 { left: 0%; top: 0%; width: 57.762%; height: 100%; }
.hero-map .hm2 .s2 { left: 57.762%; top: 0%; width: 42.238%; height: 66.239%; }
.hero-map .hm2 .s3 { left: 57.762%; top: 66.239%; width: 37.426%; height: 33.761%; }
.hero-map .hm2 .s4 { left: 95.188%; top: 66.239%; width: 4.812%; height: 33.761%; }
.hero-map .hm3 { left: 44.431%; top: 0%; width: 28.892%; height: 39.628%; }
.hero-map .hm3 .s1 { left: 0%; top: 0%; width: 77.853%; height: 100%; }
.hero-map .hm3 .s2 { left: 77.853%; top: 0%; width: 22.147%; height: 100%; }
.hero-map .hm4 { left: 73.323%; top: 0%; width: 26.677%; height: 39.628%; }
.hero-map .hm4 .s1 { left: 0%; top: 0%; width: 47.97%; height: 100%; }
.hero-map .hm4 .s2 { left: 47.97%; top: 0%; width: 52.03%; height: 42.553%; }
.hero-map .hm4 .s3 { left: 47.97%; top: 42.553%; width: 52.03%; height: 34.752%; }
.hero-map .hm4 .s4 { left: 47.97%; top: 77.305%; width: 52.03%; height: 22.695%; }
.hero-map .hm5 { left: 44.431%; top: 39.628%; width: 24.715%; height: 35.513%; }
.hero-map .hm5 .s1 { left: 0%; top: 0%; width: 66.667%; height: 100%; }
.hero-map .hm5 .s2 { left: 66.667%; top: 0%; width: 33.333%; height: 100%; }
.hero-map .hm6 { left: 44.431%; top: 75.141%; width: 24.715%; height: 24.859%; }
.hero-map .hm6 .s1 { left: 0%; top: 0%; width: 66.667%; height: 100%; }
.hero-map .hm6 .s2 { left: 66.667%; top: 0%; width: 33.333%; height: 91.429%; }
.hero-map .hm6 .s3 { left: 66.667%; top: 91.429%; width: 33.333%; height: 8.571%; }
.hero-map .hm7 { left: 69.147%; top: 39.628%; width: 18.498%; height: 26.994%; }
.hero-map .hm7 .s1 { left: 0%; top: 0%; width: 79.688%; height: 100%; }
.hero-map .hm7 .s2 { left: 79.688%; top: 0%; width: 20.313%; height: 100%; }
.hero-map .hm8 { left: 87.644%; top: 39.628%; width: 12.356%; height: 26.994%; }
.hero-map .hm9 { left: 69.147%; top: 66.622%; width: 17.414%; height: 16.801%; }
.hero-map .hm10 { left: 69.147%; top: 83.423%; width: 17.414%; height: 16.577%; }
.hero-map .hm11 { left: 86.56%; top: 66.622%; width: 13.44%; height: 19.156%; }
.hero-map .hm12 { left: 86.56%; top: 85.778%; width: 13.44%; height: 14.222%; }

/* Area colours: one muted hue per area, the same on every page (app.js holds the same list). */
.a-people { --c: #8D4E56; --c2: #975D64; }
.a-finance { --c: #3C6642; --c2: #4F7554; }
.a-government { --c: #3F4858; --c2: #4E5766; }
.a-health { --c: #255D57; --c2: #3C6C66; }
.a-career { --c: #416190; --c2: #54719D; }
.a-education { --c: #705381; --c2: #7E648F; }
.a-housing { --c: #815F33; --c2: #896A43; }
.a-shopping { --c: #83442A; --c2: #91563F; }
.a-travel { --c: #2B5C73; --c2: #406B81; }
.a-food { --c: #5B5726; --c2: #6A673B; }
.a-entertainment { --c: #70405F; --c2: #7E516D; }
.a-tech { --c: #2C6B74; --c2: #447A82; }
.a-newsletters { --c: #4E4C7A; --c2: #5D5D87; }
.a-other { --c: #5A6066; --c2: #6A6F75; }
.hero-map .blk > div { background: var(--c); }
.hero-map .body span { background: var(--c2); }

.band { padding: 64px 0; border-top: 1px solid var(--rule); }
.band-head { max-width: 640px; margin: 0 0 28px; }
.band-head h2 { margin: 0 0 12px; }
.band-head p { color: var(--muted); font-size: 16.5px; margin: 0; }
.band .eyebrow { display: block; color: var(--accent); font: 600 12.5px/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; margin: 0 0 10px; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px 22px 22px; }
.feature h3 { font: 400 22px/1.25 var(--serif); margin: 0 0 4px; }
.feature .price-line { color: var(--accent); font-weight: 600; font-size: 14px; margin: 0 0 12px; }
.feature p { color: var(--muted); margin: 0 0 10px; }
.feature p:last-child { margin-bottom: 0; }

.prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.prices.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prices.one { grid-template-columns: minmax(0, 420px); }
.panel .prices, .card .prices { margin: 16px 0 4px; }
.price { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px 22px 22px; }
.price.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.prices .price h3 { font: 400 22px/1.2 var(--serif); margin: 0 0 6px; }
.price .amount { font: 400 34px/1.1 var(--serif); margin: 6px 0 2px; letter-spacing: -.01em; }
.price .amount small { font: 400 15px/1.3 var(--sans); color: var(--muted); letter-spacing: 0; }
.price .alt { color: var(--muted); font-size: 14px; margin: 0 0 14px; min-height: 1.5em; }
.price ul { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; flex: 1; }
.price li { position: relative; padding-left: 20px; color: var(--ink); }
.price li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); opacity: .75; }
.price .buy { display: grid; gap: 8px; margin-top: auto; }
.price .buy .btn { width: 100%; }
.price .fine { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

.never-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 0; max-width: 760px; border-top: 1px solid var(--rule); }
.never-list li { padding: 13px 0 13px 30px; border-bottom: 1px solid var(--rule); position: relative; }
.never-list li::before {
  content: ""; position: absolute; left: 4px; top: 21px; width: 12px; height: 2px; background: var(--accent);
}

/* ── App: summary, Map, List ────────────────────────────────────────────── */

.app-main { padding-top: 40px; padding-bottom: 24px; }
.app-main h1 { margin: 0 0 10px; }
.lede { color: var(--muted); margin: 0 0 24px; max-width: 64ch; min-height: 1.55em; }
.strip { display: flex; height: 14px; border-radius: 3px; overflow: hidden; margin: 0 0 10px; background: var(--rule); }
.strip span { display: block; height: 100%; border-right: 1px solid var(--bg); min-width: 1px; }
.strip span:last-child { border-right: 0; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 28px; padding: 0; color: var(--muted); font-size: 13px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; background: var(--c); }
.legend .key { color: var(--muted); }
.legend .key-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--panel); box-shadow: inset 0 0 0 2px var(--muted); }
.legend .key-pill { display: inline-block; padding: 0 6px; border-radius: 999px; border: 1px solid var(--rule); background: var(--panel); color: var(--ink); font-size: 11px; font-weight: 600; line-height: 16px; }

.progress-banner { margin: 0 0 24px; }
.progress-banner .bar { margin: 10px 0 2px; }
.progress-banner p { margin: 0; }
.progress-banner .sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

.viewbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.views { display: flex; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; width: max-content; }
.views button { border: 0; border-radius: 0; background: var(--panel); color: var(--muted); font: 500 14px/1 var(--sans); padding: 11px 18px; cursor: pointer; min-height: 40px; }
.views button + button { border-left: 1px solid var(--rule); }
.views button:hover { background: var(--hover); }
.views button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

.crumbs { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin: 0 0 10px; font-size: 14px; color: var(--muted); min-height: 32px; }
.crumbs ol { display: contents; list-style: none; }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.crumbs button { font: 500 13.5px/1 var(--sans); padding: 7px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); color: var(--ink); cursor: pointer; }
.crumbs button:hover { background: var(--hover); }
.crumbs .sep { color: var(--faint); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.crumbs .count { color: var(--muted); font-weight: 400; margin-left: 4px; }

.map {
  position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 72vh; min-height: 360px;
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden;
  touch-action: manipulation;
}
.map svg { display: block; width: 100%; height: 100%; }
.map .cell { cursor: pointer; outline: none; }
.map .cell.leaf { cursor: default; }
.map rect { transition: filter .18s ease, opacity .18s ease; }
.map .cell:hover .box, .map .sub:hover { filter: brightness(1.13) saturate(1.05); }
.map .cell:hover .box, .map .sub:hover { stroke: #fff; stroke-width: 2; }
.map .sub { cursor: pointer; }
.map .sub-edge { fill: none; stroke: rgba(0, 0, 0, .18); stroke-width: 1; pointer-events: none; }
.map svg:hover .cell:not(:hover) { opacity: .86; }
.map .cell:focus-visible .box { stroke: var(--ink); stroke-width: 3; }
.map .cell:focus-visible .focus-ring { stroke: var(--panel); stroke-width: 2; }
.map .focus-ring { fill: none; stroke: none; pointer-events: none; }
.map text { pointer-events: none; fill: #fff; font-family: var(--sans); }
.map .t1 { font-weight: 600; font-size: 13px; }
.map .t1 .c { font-weight: 400; opacity: .88; }
.map .t2 { font-size: 11px; }
.map .t2.c { opacity: .85; }
.map .pill rect { fill: rgba(255, 255, 255, .93); stroke: none; }
.map .pill text { font-size: 10.5px; font-weight: 600; }
.map .dot { fill: #fff; stroke: rgba(0, 0, 0, .28); stroke-width: 1; pointer-events: none; }
.map .enter { animation: map-in .32s ease both; }
@keyframes map-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.map-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; color: var(--muted); text-align: center; }

.tip {
  position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none;
  max-width: min(310px, calc(100% - 16px)); padding: 10px 12px; border-radius: 6px;
  background: var(--ink); color: var(--bg); font-size: 12.5px; line-height: 1.45;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .2); opacity: 0; transition: opacity .12s ease;
}
.tip.on { opacity: 1; }
.tip b { display: block; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.tip .path { opacity: .78; font-size: 11.5px; overflow-wrap: anywhere; }
.tip .desc { margin: 4px 0 6px; opacity: .95; }
.tip .prot { margin-top: 4px; font-weight: 600; font-size: 11.5px; }

.hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.hint + .hint { margin-top: 4px; }

.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.search { flex: 1 1 240px; min-height: 42px; padding: 9px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); color: var(--ink); }
.search::placeholder { color: var(--muted); opacity: 1; }
.list-status { color: var(--muted); font-size: 13px; margin: -4px 0 10px; min-height: 1.4em; }
.list-head { display: grid; grid-template-columns: minmax(0, 1fr) 96px 70px; gap: 12px; padding: 0 12px 6px; color: var(--muted); font-size: 12px; }
.list-head span:not(:first-child) { text-align: right; }
.tree { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.tree details, .tree .row { border-top: 1px solid var(--rule); }
.tree > :first-child { border-top: 0; }
.tree .kids details, .tree .kids .row { border-top: 1px solid transparent; }
.tree summary, .tree .row > .line {
  display: grid; grid-template-columns: minmax(0, 1fr) 96px 70px; gap: 12px; align-items: center; padding: 9px 12px;
}
.tree summary { list-style: none; cursor: pointer; }
.tree summary::-webkit-details-marker { display: none; }
.tree summary:hover { background: var(--hover); }
.tree summary > div:first-child, .tree .line > div:first-child { min-width: 0; }
.tree .name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tree .name b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree .lvl1 > summary .name b { font: 500 17px/1.3 var(--serif); }
.tree .swatch { flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.tree .caret { flex: none; width: 10px; color: var(--faint); transition: transform .15s; font-size: 16px; line-height: 1; }
.tree details[open] > summary .caret { transform: rotate(90deg); }
.tree .row .caret { visibility: hidden; }
.tree .recent { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tree .addr { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree .meta { color: var(--muted); font-size: 12px; }
.tree .num { text-align: right; }
.tree .num small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.25; white-space: nowrap; }
.tree .share { height: 3px; background: var(--bar); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.tree .share i { display: block; height: 100%; background: var(--bar-strong); }
.tree .kids { padding-left: 18px; }
.tree mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.no-match { padding: 18px 12px; color: var(--muted); }

.app-foot { margin-top: 28px; color: var(--muted); font-size: 13px; max-width: 68ch; }
.app-foot p { margin: 0 0 8px; }
.app-foot .check { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .01em; }
.app-foot .check.bad { color: var(--danger); font-weight: 600; }

.skeleton { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); }

/* ── Cleanup ────────────────────────────────────────────────────────────── */

.stepper { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0 0 24px; padding: 0; counter-reset: step; }
.stepper li { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 13.5px; min-width: 0; }
.stepper li::before { content: ""; display: block; height: 4px; border-radius: 2px; background: var(--rule); }
.stepper .n { font-weight: 600; }
.stepper li.done { color: var(--ink); }
.stepper li.done::before { background: var(--accent); opacity: .55; }
.stepper li[aria-current="step"] { color: var(--ink); font-weight: 600; }
.stepper li[aria-current="step"]::before { background: var(--accent); }
.stepper li.stopped::before { background: var(--danger); }
.stepper .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.panel { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px 24px 22px; margin: 0 0 16px; }
.panel > h2 { font-size: 25px; margin: 0 0 8px; }
.panel h3 { margin: 22px 0 6px; }
.panel .intro { color: var(--muted); max-width: 62ch; }
.panel .next { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; }
.panel .next b { color: var(--ink); font-weight: 600; }
.big-line { font: 400 21px/1.35 var(--serif); margin: 4px 0 12px; }
.panel > .bar { margin: 12px 0 14px; }
.facts + p { margin-top: 12px; }
.facts { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.facts li span:last-child { text-align: right; white-space: nowrap; font-weight: 500; }
.facts .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--c); margin-right: 8px; vertical-align: 0; }

.senders { list-style: none; padding: 0; margin: 10px 0 0; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.senders li + li { border-top: 1px solid var(--rule); }
.senders label, .senders .ro {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 11px 14px; cursor: pointer;
}
.senders .ro { grid-template-columns: minmax(0, 1fr) auto; cursor: default; }
.senders label:hover { background: var(--hover); }
.senders input { margin-top: 2px; }
.senders .who { min-width: 0; }
.senders .who b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.senders .who span { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.senders .figs { text-align: right; white-space: nowrap; }
.senders .figs small { display: block; color: var(--muted); }
.senders li.kept .who b, .senders li.kept .figs { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.area-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.senders .who span.area-tag { display: inline-flex; margin-top: 2px; }
.area-tag i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); display: inline-block; }
.list-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.saving { color: var(--muted); font-size: 13px; min-height: 1.4em; }

.rules { margin: 14px 0 0; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--bg); }
.rules > summary { cursor: pointer; padding: 11px 14px; font-weight: 500; }
.rules > ul { margin: 0; padding: 0 16px 14px 34px; color: var(--muted); }
.rules > div { padding: 0 12px 12px; }
.rules > div .senders { margin: 0; background: var(--panel); }
.rules li { margin: 4px 0; }

.verified { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--ok-bg); border: 1px solid var(--rule); margin: 4px 0 16px; }
.verified svg { flex: none; width: 20px; height: 20px; color: var(--ok); margin-top: 1px; }
.verified p { margin: 0; }
.verified .sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }

.apply-steps { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 14px; }
.apply-steps li { display: grid; gap: 6px; }
.apply-steps .row-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.apply-steps .state { color: var(--muted); }
.apply-steps li.current .row-top { font-weight: 600; }

.confirm { margin: 12px 0 0; padding: 14px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--bg); }
.confirm p { margin: 0 0 10px; }

.history { margin: 8px 0 0; }
.history > summary { cursor: pointer; font-weight: 500; padding: 8px 0; width: max-content; max-width: 100%; }
.history ul { list-style: none; padding: 0; margin: 6px 0 0; border-top: 1px solid var(--rule); }
.history li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.history li span:last-child { color: var(--muted); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--rule); color: var(--muted); font-size: 11.5px; font-weight: 500; vertical-align: 1px; margin-left: 6px; }

/* ── Settings ───────────────────────────────────────────────────────────── */

.settings-main { padding-top: 40px; }
.settings-main h1 { margin: 0 0 22px; }
.rows { margin: 0; display: grid; grid-template-columns: minmax(110px, 170px) minmax(0, 1fr); border-top: 1px solid var(--rule); }
.rows dt, .rows dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.rows dt { color: var(--muted); padding-right: 16px; }
.rows dd { overflow-wrap: anywhere; }
.card .actions { margin-top: 16px; }
.card .actions + p { margin-top: 10px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 45%, var(--rule)); }
.danger-zone > details > summary { cursor: pointer; font-weight: 500; color: var(--danger); padding: 4px 0; width: max-content; max-width: 100%; }
.danger-zone ul { color: var(--muted); padding-left: 20px; margin: 10px 0 14px; }
.danger-zone li { margin: 4px 0; }

/* ── Legal and never-does pages ─────────────────────────────────────────── */

.doc-main { padding-top: 48px; }
.draft-note { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--rule); border-left: 3px solid var(--warn); border-radius: var(--radius); padding: 10px 14px; font-weight: 600; margin: 0 0 24px; }
.prose { max-width: 68ch; }
.prose h1 { margin: 0 0 8px; }
.prose .updated { color: var(--muted); margin: 0 0 28px; }
.prose h2 { font-size: 24px; margin: 36px 0 10px; }
.prose h3 { margin: 20px 0 6px; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 14px; }
.prose li { margin: 5px 0; }
.prose .placeholder { background: var(--warn-bg); color: var(--warn); padding: 0 4px; border-radius: 3px; font-weight: 500; }
.prose blockquote { margin: 12px 0 16px; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--panel); border-radius: 0 var(--radius) var(--radius) 0; }
.prose blockquote p:last-child { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 14px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule); }
.prose th { color: var(--muted); font-weight: 500; }

.prose .nevers { list-style: none; padding: 0; margin: 28px 0 0; counter-reset: never; border-top: 1px solid var(--rule); }
.nevers li { counter-increment: never; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 12px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.nevers li::before { content: counter(never); font: 400 26px/1.1 var(--serif); color: var(--accent); }
.nevers h2 { font: 600 16.5px/1.4 var(--sans); margin: 2px 0 4px; }
.nevers p { color: var(--muted); margin: 0; }
.doc-cta { margin-top: 28px; }

/* ── Small screens ──────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero h1 { max-width: 16ch; }
  .features, .prices, .prices.two, .prices.one { grid-template-columns: minmax(0, 1fr); }
  .prices { max-width: 480px; }
}
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .head-row { min-height: 56px; }
  .hide-sm { display: none !important; }
  .app-head .head-row {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand theme" "mailbox mailbox" "nav nav"; row-gap: 6px;
  }
  .app-head .site-nav { justify-content: flex-start; }
  .band { padding: 48px 0; }
  .card, .panel { padding: 18px 16px; }
  .rows { grid-template-columns: minmax(0, 1fr); }
  .rows dt { border-bottom: 0; padding-bottom: 0; }
  .rows dd { padding-top: 2px; }
  .stepper li { font-size: 12px; }
  .stepper .label { white-space: normal; }
  .stepper .n { display: block; }
}
@media (max-width: 560px) {
  .app-main { padding-top: 28px; }
  .map { aspect-ratio: 3 / 4; }
  .tree summary, .tree .row > .line, .list-head { grid-template-columns: minmax(0, 1fr) 80px 48px; gap: 8px; padding-left: 8px; padding-right: 8px; }
  .tree .kids { padding-left: 10px; }
  .senders label { grid-template-columns: 22px minmax(0, 1fr); }
  .senders label .figs { grid-column: 2; text-align: left; }
  .senders .figs { white-space: normal; }
  .senders .figs small { display: inline; margin-left: 8px; }
  .senders .ro { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .senders .ro .figs { text-align: left; }
}

/* ── Motion ─────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .map .enter { animation: none; }
  .map rect, .tip, .tree .caret, .bar > i { transition: none; }
  .bar.indeterminate > i { animation: none; width: 100%; opacity: .45; }
}
