/* Unjunk shared stylesheet.
   Built from docs/Unjunk.html (landing, review queue desktop and phone, pricing).
   The design ships a light and a dark theme (.t-light / .t-dark); here the dark
   theme follows prefers-color-scheme. */

/* Fonts: Google Fonts subsets embedded in the design, self-hosted. Licences in fonts/OFL.txt. */
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url(fonts/inter-tight-latin-35babd43.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/public-sans-latin-989b6c57.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin-340e696a.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin-ext-7eed183e.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --bg: #f6f5f0;
  --panel: #ffffff;
  --ink: #161814;
  --muted: #565a52;
  --line: #dcdad2;
  --accent: #0d6b4c;
  --accent-ink: #ffffff;
  --accent-soft: #dcefe5;
  --warn: #7f5300;
  --warn-soft: #f6ead0;

  --font-body: 'Public Sans', system-ui, sans-serif;
  --font-display: 'Inter Tight', 'Public Sans', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-ms: 'Segoe UI', 'Public Sans', sans-serif;

  --wrap: 1200px;
  --gutter: 24px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121412;
    --panel: #1b1e1b;
    --ink: #ecebe5;
    --muted: #a2a69d;
    --line: #2e322e;
    --accent: #5ccb9a;
    --accent-ink: #0b1a13;
    --accent-soft: #183528;
    --warn: #e3b65a;
    --warn-soft: #3a2e14;
  }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
body.is-app { font-size: 16px; line-height: 1.5; }
img, svg { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--ink); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); }
p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.trust :focus-visible, .cta-band :focus-visible { outline-color: var(--bg); }

.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;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: var(--bg); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.eyebrow--accent { color: var(--accent); letter-spacing: 0; }
.label-caps {
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}

.h-display {
  font-weight: 800;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.0;
  letter-spacing: -0.035em;
}
.h-section {
  font-weight: 700;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.h-card { font-weight: 700; font-size: 24px; letter-spacing: -0.02em; }

/* ---------- Brand ---------- */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.brand-mark svg { width: 16px; height: 16px; stroke: var(--accent-ink); }
.brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.btn:hover { color: var(--ink); border-color: var(--ink); }
.btn--primary { border: 0; background: var(--accent); color: var(--accent-ink); min-height: 48px; padding: 0 22px; }
.btn--primary:hover { color: var(--accent-ink); filter: brightness(1.08); }
.btn--outline { border-color: var(--ink); }
.btn--panel { background: var(--panel); min-height: 48px; }
.btn--small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn--link {
  border: 0; background: transparent; color: var(--accent); padding: 0 4px;
  text-decoration: underline; font-weight: 600;
}

/* Sign in with Microsoft: follows Microsoft's dark-theme button spec (#2F2F2F, 21px logo). */
.btn-ms {
  display: inline-flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 22px; border-radius: 4px;
  background: #2f2f2f; color: #ffffff; border: 1px solid #2f2f2f;
  font-family: var(--font-ms); font-weight: 600; font-size: 16px;
  text-decoration: none; white-space: nowrap;
}
.btn-ms:hover { color: #ffffff; background: #1f1f1f; }
.btn-ms svg { width: 21px; height: 21px; flex: none; }
.btn-ms--light { background: #ffffff; color: #5e5e5e; border-color: #8c8c8c; }
.btn-ms--light:hover { background: #f3f3f3; color: #5e5e5e; }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; line-height: 1.5;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.chip svg { width: 12px; height: 12px; flex: none; }
.chip--warn { background: var(--warn-soft); color: var(--warn); }
.chip--accent { background: var(--accent-soft); color: var(--accent); font-family: var(--font-mono); padding: 3px 9px; }
.chip--outline { border: 1px solid var(--line); color: var(--muted); }
.pill {
  font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
.pill--junk { background: var(--ink); color: var(--bg); }
.pill--route { border: 1px solid var(--accent); color: var(--accent); padding: 5px 11px; }
.pill--keep { border: 1px solid var(--line); color: var(--ink); padding: 5px 11px; }

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

/* ---------- Public header and footer ---------- */
.site-header {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  padding-top: 24px; padding-bottom: 24px;
}
.nav-main {
  display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center;
  font-size: 15px; font-weight: 500;
}
.nav-main a { color: var(--ink); text-decoration: none; }
.nav-main a:hover { color: var(--accent); }
.nav-main a[aria-current="page"] { color: var(--accent); }
.nav-main .nav-signin {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 16px; min-height: 44px; display: inline-flex; align-items: center;
}
.nav-main .nav-signin:hover { border-color: var(--ink); color: var(--ink); }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap {
  padding-top: 32px; padding-bottom: 48px;
  display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between;
  font-size: 15px; color: var(--muted);
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-nav a { color: var(--ink); }
.footer-nav a:hover { color: var(--accent); }
.gmail-note { display: inline-flex; align-items: center; gap: 8px; }
.gmail-note::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none;
}

/* ---------- Landing ---------- */
.hero {
  padding-top: 56px; padding-bottom: 88px;
  display: flex; flex-wrap: wrap; gap: 56px; align-items: center;
}
.hero-copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero-lede { font-size: 20px; line-height: 1.5; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
.hero-cta p { font-size: 15px; color: var(--muted); }

.proof {
  flex: 1 1 420px; min-width: 0; padding: 28px;
  display: flex; flex-direction: column; gap: 22px;
}
.proof-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.proof-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.proof-stat { display: flex; flex-direction: column; gap: 4px; }
.proof-stat dt { font-size: 14px; color: var(--muted); }
.proof-stat dd { margin: 0; }
.big-num {
  font-family: var(--font-mono); font-weight: 500;
  font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.03em; line-height: 1.05;
}
.big-num--before { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.big-num--after { color: var(--accent); }
.bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; display: flex; }
.bar > span { background: var(--accent); }
.proof-caption { font-size: 15px; color: var(--muted); }
.proof-row {
  border-top: 1px solid var(--line); padding-top: 18px;
  display: flex; align-items: baseline; gap: 8px 14px; flex-wrap: wrap;
}
.proof-row .num { font-family: var(--font-mono); font-weight: 500; font-size: 40px; letter-spacing: -0.03em; line-height: 1; }
.proof-row .txt { font-size: 16px; }
.proof-note { font-size: 13px; color: var(--muted); }

.band { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section { padding-top: 88px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 48px; }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 40em; }
.section-head--split {
  max-width: none; flex-direction: row; flex-wrap: wrap; gap: 16px 40px;
  align-items: end; justify-content: space-between;
}
.section-head--split > div { display: flex; flex-direction: column; gap: 12px; max-width: 36em; }
.section-head--split > p { font-size: 15px; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.step { display: flex; flex-direction: column; gap: 14px; padding-top: 20px; border-top: 2px solid var(--ink); }
.step .n { font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.step p { color: var(--muted); }
.step--accent { border-top-color: var(--accent); }
.step--accent .n { color: var(--accent); }

.sample { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.sample-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted);
}
.sample ul { margin: 0; padding: 0; list-style: none; }
.sample li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.sample li:last-child { border-bottom: 0; }
.sample .who { flex: 1 1 240px; min-width: 0; }
.sample .who b { font-weight: 600; }
.sample .who .chip { margin-left: 6px; }
.sample .addr { font-size: 14px; color: var(--muted); }
.sample .count { font-family: var(--font-mono); font-size: 15px; width: 90px; }

.price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.price-card { border-radius: var(--radius-lg); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.price-card h3 { font-weight: 700; font-size: 26px; }
.price-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; font-size: 17px; }
.price-card li { display: flex; gap: 12px; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.price-card li:last-child { border-bottom: 0; padding-bottom: 0; }
.price-card li > :last-child { font-family: var(--font-mono); text-align: right; }
.price-card > p { font-size: 15px; color: var(--muted); }
.price-card--free { background: var(--accent); color: var(--accent-ink); }
.price-card--free li { border-bottom-color: color-mix(in srgb, currentColor 25%, transparent); }
.price-card--free > p { color: inherit; }
.more-link { font-weight: 600; font-size: 16px; align-self: flex-start; }

.trust { background: var(--ink); color: var(--bg); }
.trust .wrap {
  padding-top: 72px; padding-bottom: 72px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 36px;
}
.trust-item { display: flex; flex-direction: column; gap: 10px; }
.trust-item svg { width: 28px; height: 28px; }
.trust-item h3 { font-weight: 700; font-size: 20px; }
.trust-item p { font-size: 15px; opacity: 0.8; }
.trust a { color: inherit; }

.cta { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.cta h2 { font-weight: 800; font-size: clamp(34px, 5vw, 60px); line-height: 1.0; letter-spacing: -0.035em; max-width: 14em; }

/* ---------- Pricing page ---------- */
.page-main { padding-top: 48px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 64px; }
.page-intro { display: flex; flex-direction: column; gap: 18px; max-width: 46em; }
.page-intro .h-display { font-size: clamp(38px, 5.5vw, 68px); }
.page-intro .lede { font-size: 19px; color: var(--muted); }

.table-scroll { overflow-x: auto; }
.price-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 16px; }
.price-table th {
  text-align: left; font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted);
  padding: 16px 24px; border-bottom: 1px solid var(--line); font-weight: 600;
}
.price-table td { padding: 18px 24px; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table tbody tr:last-child td { border-bottom: 0; }
.price-table td:first-child { font-weight: 600; }
.price-table td:nth-child(2) { font-family: var(--font-mono); white-space: nowrap; }
.price-table tr.is-free { background: var(--accent-soft); }
.price-table tr.is-free td:nth-child(2) { color: var(--accent); }

.examples { display: flex; flex-direction: column; gap: 24px; }
.examples h2 { font-weight: 700; font-size: clamp(28px, 3.5vw, 36px); letter-spacing: -0.03em; }
.example-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.example { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.example-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.example-head h3 { font-weight: 700; font-size: 22px; }
.example-head .total { font-family: var(--font-mono); font-size: 44px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.example dl { margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.example dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.example dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.example dd { margin: 0; font-family: var(--font-mono); }

.notes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 40px;
  border-top: 1px solid var(--line); padding-top: 48px;
}
.notes > div { display: flex; flex-direction: column; gap: 12px; }
.notes h2 { font-weight: 700; font-size: 24px; }
.notes a { font-weight: 600; }

.cta-band {
  background: var(--ink); color: var(--bg); border-radius: 16px; padding: 40px;
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
}
.cta-band h2 { font-weight: 800; font-size: clamp(26px, 3.5vw, 32px); letter-spacing: -0.03em; max-width: 18em; }
@media (max-width: 600px) { .cta-band { padding: 28px 20px; } }

/* ---------- Legal pages ---------- */
.prose { max-width: 44em; display: flex; flex-direction: column; gap: 16px; }
.prose h1 { font-weight: 800; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.035em; }
.prose h2 { font-weight: 700; font-size: 24px; letter-spacing: -0.02em; margin-top: 24px; }
.prose ul { margin: 0; padding-left: 1.25em; display: flex; flex-direction: column; gap: 6px; }
.prose code { font-family: var(--font-mono); font-size: 0.9em; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.draft-note {
  align-self: flex-start; font-family: var(--font-mono); font-size: 13px;
  background: var(--warn-soft); color: var(--warn); border-radius: 999px; padding: 4px 12px;
}

/* ---------- App shell ---------- */
.app-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.app-header .wrap {
  padding-top: 14px; padding-bottom: 14px;
  display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between;
}
.app-header .brand-mark { width: 26px; height: 26px; }
.app-header .brand-mark svg { width: 15px; height: 15px; }
.app-header .brand-name { font-size: 20px; }
.app-nav ul { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 15px; font-weight: 500; }
.app-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; }
.app-nav a:hover { background: var(--bg); color: var(--ink); }
.app-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.app-user { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; color: var(--muted); }
.app-user form { margin: 0; }
.app-menu { display: none; }

@media (max-width: 760px) {
  .app-header .wrap { position: relative; padding-top: 20px; flex-wrap: nowrap; }
  .app-header .brand-mark { width: 24px; height: 24px; border-radius: 6px; }
  .app-header .brand-mark svg { width: 14px; height: 14px; }
  .app-header .brand-name { font-size: 19px; }
  .desk-nav { display: none; }
  .app-menu { display: block; }
  .app-menu > summary {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
    list-style: none; cursor: pointer; color: var(--ink);
  }
  .app-menu > summary::-webkit-details-marker { display: none; }
  .app-menu > summary svg { width: 20px; height: 20px; }
  .app-menu[open] > summary { background: var(--bg); }
  .app-menu-body {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 5;
    background: var(--panel); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px; display: flex; flex-direction: column; gap: 12px;
  }
  .app-nav ul { flex-direction: column; }
  .app-nav a { width: 100%; }
}

.app-main { padding-top: 40px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 28px; }
.page-title { display: flex; flex-direction: column; gap: 6px; }
.page-title h1 { font-weight: 800; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; line-height: 1.05; }
.title-row { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: end; justify-content: space-between; }

.stats {
  display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); overflow: hidden; margin: 0;
}
.stats > div { padding: 12px 20px; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.stats > div:last-child { border-right: 0; }
.stats dt { font-size: 13px; color: var(--muted); }
.stats dd { margin: 0; font-family: var(--font-mono); font-size: 22px; font-weight: 500; }
.stats .accent { color: var(--accent); }

.flash {
  background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); padding: 20px 24px;
  display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; justify-content: space-between;
}
.flash .num { font-family: var(--font-mono); font-size: 26px; font-weight: 500; }
.flash--error { background: var(--warn-soft); color: var(--warn); }

.example-banner {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  border: 1px dashed var(--warn); background: var(--warn-soft); color: var(--warn);
  border-radius: var(--radius); padding: 12px 16px; font-size: 14px; font-weight: 600;
}

.card { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.card h2 { font-weight: 700; font-size: 24px; letter-spacing: -0.02em; }
.kv { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 24px; }
.kv dt { color: var(--muted); font-size: 15px; }
.kv dd { margin: 0; font-weight: 600; }
.card-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.card-actions form { margin: 0; }
.scan-progress {
  -webkit-appearance: none; appearance: none; width: 100%; height: 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--accent-soft); overflow: hidden;
  color: var(--accent);
}
.scan-progress::-webkit-progress-bar { background: var(--accent-soft); border-radius: 999px; }
.scan-progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.scan-progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }

.soon { padding: 40px 28px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.soon h2 { font-weight: 700; font-size: 24px; letter-spacing: -0.02em; }
.soon p { color: var(--muted); max-width: 40em; }
.soon ul { margin: 0; padding-left: 1.2em; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }

/* ---------- Sign-in pages ---------- */
.auth { padding-top: 48px; padding-bottom: 96px; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 30em; padding: 32px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.auth-card h1 { font-weight: 800; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; line-height: 1.05; }
.auth-card .lede { color: var(--muted); }
.auth-card form { width: 100%; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-card form .btn { width: 100%; }
.auth-alt { font-size: 15px; color: var(--muted); }
@media (max-width: 600px) { .auth { padding-top: 24px; } .auth-card { padding: 24px 20px; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 15px; font-weight: 600; }
.input {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 17px;
}
.input:focus-visible { border-color: var(--accent); }
.form-error {
  width: 100%; background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 15px; font-weight: 600;
}
.form-error a { color: inherit; }

/* ---------- Mailboxes ---------- */
.btn--tall { min-height: 52px; }
.btn--on-ink { border-color: color-mix(in srgb, var(--bg) 45%, transparent); color: var(--bg); min-height: 48px; }
.btn--on-ink:hover { border-color: var(--bg); color: var(--bg); }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.connect-options { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: flex-start; }
.connect-option { display: flex; flex-direction: column; gap: 8px; max-width: 22em; }
.connect-note { font-size: 14px; color: var(--muted); }
.mailbox-list { margin: 0; padding: 0; list-style: none; }
.mailbox-list li {
  display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.mailbox-list li:first-child { padding-top: 0; }
.mailbox-list .who { display: flex; flex-direction: column; min-width: 0; }
.mailbox-list .who .muted { font-size: 14px; }
.mailbox-list form { margin: 0; }
.mb-switch { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; font-size: 14px; color: var(--muted); margin: 0; }
.mb-switch select {
  min-height: 36px; max-width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); padding: 0 8px; font-size: 14px;
}

/* ---------- Review queue ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.toolbar .hint { font-size: 14px; color: var(--muted); }

.queue { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.queue-head {
  display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 20px; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted);
}
.queue-head .c-sender, .sender .who { flex: 1 1 320px; min-width: 0; }
.queue-head .c-count, .sender .count { width: 84px; flex: none; }
.queue-head .c-decision, .sender .decision { flex: 0 1 380px; }
.queue-list { margin: 0; padding: 0; list-style: none; }

.sender {
  display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.sender .who { display: flex; flex-direction: column; gap: 2px; }
.sender .name-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sender .name { font-weight: 600; }
.sender .meta { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sender .unsub { font-size: 13px; color: var(--muted); }
.sender .count { font-family: var(--font-mono); font-size: 16px; }

.decision { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.decision legend { padding: 0; }
.seg { position: relative; display: inline-flex; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font-size: 14px; font-weight: 600; user-select: none;
}
.seg:hover span { border-color: var(--muted); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.seg--junk input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.seg--keep input:checked + span,
.seg--route input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.seg--later span { padding: 0 12px; font-weight: 500; border-color: transparent; color: var(--muted); }
.seg--later input:checked + span { border: 1px dashed var(--muted); }

.route-to { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.route-to select {
  min-height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); padding: 0 8px; font-size: 14px;
}
@supports selector(:has(*)) {
  .route-to { display: none; }
  .decision:has(.seg--route input:checked) .route-to { display: flex; }
  .sender:has(.seg--junk input:checked) .who,
  .sender:has(.seg--junk input:checked) .count { opacity: 0.6; }
}

.queue-foot {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  padding: 18px 20px; background: var(--bg);
}
.queue-foot .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.queue-foot .showing { font-size: 14px; color: var(--muted); }
.junk-rest-mobile { display: none; }

.pager { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; font-size: 14px; color: var(--muted); }

.empty { padding: 56px 28px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.empty h2 { font-weight: 700; font-size: 26px; letter-spacing: -0.02em; }
.empty p { color: var(--muted); max-width: 36em; }
.empty-mark {
  width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.empty-mark svg { width: 24px; height: 24px; }

.phone-only { display: none; }

/* Phone layout (design: "Review queue · phone", 390px). */
@media (max-width: 760px) {
  .app-main { padding-top: 20px; gap: 16px; }
  .review .title-row { align-items: baseline; flex-wrap: nowrap; justify-content: space-between; gap: 8px; }
  .review .page-title h1 { font-size: 28px; }
  .review .page-title .eyebrow { display: none; }
  .phone-only { display: inline; }
  .desk-only { display: none; }
  .review .stats { display: none; }
  .phone-chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
  .phone-chips .chip { font-size: 13px; padding: 4px 10px; }
  .review .toolbar { display: none; }

  .queue { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .queue-head { display: none; }
  .queue-list { display: flex; flex-direction: column; gap: 12px; }
  .sender {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start;
  }
  .sender .who { flex: none; }
  .sender .name-line .chip { font-size: 11px; padding: 2px 7px; }
  .sender .name-line .chip svg { display: none; }
  .sender .addr, .sender .unsub, .sender .meta-sep { display: none; }
  .sender .meta { font-size: 13px; }
  .sender .count { width: auto; font-size: 17px; font-weight: 500; text-align: right; }
  .sender .decision {
    grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  }
  .seg { display: flex; }
  .seg span { width: 100%; min-height: 44px; font-size: 15px; }
  .seg--later { grid-column: 1 / -1; }
  .seg--later span { min-height: 36px; font-size: 14px; }
  .route-to { grid-column: 1 / -1; }
  .route-to select { flex: 1 1 auto; min-height: 44px; }

  .queue-foot {
    position: sticky; bottom: 0; z-index: 2;
    margin: 0 calc(-1 * var(--gutter)); padding: 12px var(--gutter) 20px;
    background: var(--panel); border-top: 1px solid var(--line);
  }
  .queue-foot .showing, .queue-foot .skip { display: none; }
  .queue-foot .actions { flex: 1 1 auto; flex-wrap: nowrap; gap: 8px; }
  .queue-foot .actions > * { flex: 1 1 0; min-height: 52px; border-radius: 10px; padding: 0 12px; }
  .junk-rest-mobile { display: inline-flex; }
  .app-main.review { padding-bottom: 0; }
}
@media (min-width: 761px) {
  .phone-chips { display: none; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .btn, .btn-ms, .seg span, .app-nav a, .nav-main a { transition: background-color .15s, color .15s, border-color .15s, opacity .15s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
