/* Shared styles for scan and legal pages. Landing page keeps its own CSS from the approved design. */
@font-face {
  font-family: Geist;
  src: url("../fonts/Geist.woff2") format("woff2"), url("../fonts/Geist-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: Inter;
  src: url("../fonts/Inter.woff2") format("woff2"), url("../fonts/Inter-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

:root {
  --bg: #E7E7E9;
  --grid: rgba(16, 23, 39, 0.02);
  --ink: #101727;
  --muted: #646569;
  --purple: #6A51E4;
  --purple-hover: #5A41D4;
  --line: #CFD3DD;
  --line-soft: #E2E3E7;
  --btn-border: #C8C8CC;
  --surface: #FFFFFF;
  --keep-text: #393A3E;
  --wrap: 1200px;
  --card: 880px;
  --radius-btn: 12px;
  --radius-nav: 10px;
  --radius-card: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: 0 0;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

.wrap {
  width: var(--wrap);
  margin: 0 auto;
}

.nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: Geist, Inter, sans-serif;
  font-weight: 650;
  font-size: 16px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-nav);
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.btn-ghost {
  border: 1px solid var(--btn-border);
  background: #fff;
  color: var(--ink);
}

.btn-ghost:hover { background: #f7f7f8; }

.btn-primary {
  background: var(--purple);
  color: #fff;
}

.btn-primary:hover { background: var(--purple-hover); }

.btn[disabled], .btn[aria-disabled="true"] {
  background: #D9DAE1;
  border: 1.5px solid #8F92A3;
  color: #2F3037;
  cursor: not-allowed;
}

:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }

/* --- Scan page --- */
.scan-main {
  width: var(--card);
  padding: 24px 0 140px;
}

.page-head { display: flex; flex-direction: column; gap: 16px; }

.stepper {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.stepper li { display: flex; align-items: center; gap: 8px; }
.stepper li + li::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--line);
  margin-right: 8px;
}
.stepper .n {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: Geist, Inter, sans-serif;
  font-weight: 650;
  font-size: 13px;
  letter-spacing: -0.02em;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  line-height: 1;
}
.stepper .done .n { background: var(--ink); border-color: var(--ink); color: #fff; }
.stepper .now { color: var(--ink); font-weight: 600; }
.stepper .now .n { background: var(--purple); border-color: var(--purple); color: #fff; }

.page-head h1 {
  font-family: Geist, Inter, sans-serif;
  font-weight: 800;
  font-size: 40px;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.notice {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 14px 20px;
  font-size: 14px;
  color: var(--muted);
}
.notice b, .notice strong { color: var(--ink); font-weight: 600; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.stats-row .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px 18px;
}
.stats-row .k { font-size: 12px; color: var(--muted); font-weight: 500; }
.stats-row .v {
  font-family: Geist, Inter, sans-serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
  margin-top: 4px;
}
.stats-row .s { font-size: 12px; color: var(--muted); margin-top: 2px; }

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 24px 0 16px;
}
.pill {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--btn-border);
  background: #fff;
  color: var(--ink);
  font: 600 13px Inter, sans-serif;
  cursor: pointer;
}
.pill[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.listcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.sender {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line-soft);
}
.sender:last-child { border-bottom: 0; }
.sender.off { background: #F6F6F7; }

.icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Geist, Inter, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.meta {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 16px;
  text-align: left;
}
.meta .name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}
.meta .count {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--muted);
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
  flex: 0 0 auto;
}

.btn-keep,
.btn-unsub {
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-nav);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.btn-keep {
  border: 1px solid var(--btn-border);
  background: #fff;
  color: var(--keep-text);
}
.btn-keep:hover { background: #f7f7f8; }
.btn-keep.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.btn-unsub {
  background: var(--purple);
  color: #fff;
}
.btn-unsub:hover { background: var(--purple-hover); }
.btn-unsub.is-off {
  background: #fff;
  border: 1px solid var(--btn-border);
  color: var(--keep-text);
}
.btn-unsub:disabled,
.btn-keep:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bottom {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.bottom .bar {
  width: var(--card);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 80px;
}
.bottom .sum b {
  font-family: Geist, Inter, sans-serif;
  font-weight: 650;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: block;
}
.bottom .sum span { display: block; font-size: 13px; color: var(--muted); }
.bottom .acts { display: flex; gap: 8px; }

dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 28px;
  max-width: 560px;
  width: calc(100% - 48px);
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, sans-serif;
}
dialog::backdrop { background: rgba(16, 23, 39, 0.4); }
dialog h3 {
  font-family: Geist, Inter, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
dialog > p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
dialog ul {
  list-style: disc;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  font-size: 14px;
}
dialog .row {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
  gap: 8px;
}

/* Legal / prose */
.prose {
  width: min(720px, var(--wrap));
  padding: 32px 0 80px;
}
.prose h1 {
  font-family: Geist, Inter, sans-serif;
  font-weight: 800;
  font-size: 40px;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.prose h2 {
  font-family: Geist, Inter, sans-serif;
  font-weight: 650;
  font-size: 22px;
  letter-spacing: -0.03em;
  margin: 32px 0 10px;
}
.prose p, .prose li { margin-bottom: 10px; }
.prose ul { list-style: disc; padding-left: 22px; }
.prose a { color: var(--purple); text-decoration: underline; }
.concept {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}
.concept strong { color: var(--ink); }
.prose .card { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; font-size: 12px; }

.foot {
  border-top: 1px solid var(--line);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.foot p { font-size: 12px; font-weight: 400; color: var(--muted); }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--ink); }

@media (max-width: 1240px) {
  .wrap, .scan-main, .bottom .bar, .prose { width: 100%; padding-left: 24px; padding-right: 24px; }
  .scan-main { padding-bottom: 140px; }
  .prose { padding-bottom: 80px; }
}
@media (max-width: 800px) {
  .page-head h1 { font-size: 32px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .sender { height: auto; padding: 14px 16px; flex-wrap: wrap; gap: 10px; }
  .meta { margin-left: 12px; }
  .actions { margin-left: auto; }
  .bottom .bar { flex-direction: column; align-items: stretch; height: auto; padding-top: 12px; padding-bottom: 12px; gap: 10px; }
  .bottom .acts .btn { flex: 1; }
  .notice { flex-direction: column; align-items: stretch; }
}

/* --- Prototype label, checkout, report, overview --- */
.title-row { display: flex; align-items: center; gap: 12px; }
.proto {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font-size: 12px; font-weight: 500; letter-spacing: 0.01em; color: var(--muted); line-height: 1; white-space: nowrap;
}
.narrow { width: 560px; margin: 0 auto; padding: 24px 0 96px; }
.narrow .page-head { margin-bottom: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; margin-bottom: 16px; }
.panel-head { height: 56px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); }
.panel-head h2 { font-family: Geist, Inter, sans-serif; font-size: 16px; font-weight: 650; letter-spacing: -0.02em; line-height: 1; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv.total { font-weight: 600; font-size: 16px; }
.kv.total span:first-child { color: var(--ink); }
.consent { display: flex; gap: 12px; align-items: flex-start; padding: 20px 24px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--purple); flex: 0 0 auto; }
.btn-lg { height: 48px; padding: 0 24px; border-radius: var(--radius-btn); font-size: 16px; }
.btn-block { width: 100%; }
.fineprint { margin-top: 12px; font-size: 12px; color: var(--muted); text-align: center; }
.error-note { margin-top: 12px; font-size: 14px; color: #B42318; text-align: center; }
.report-main { width: var(--card); margin: 0 auto; padding: 24px 0 96px; }
.group-title { font-family: Geist, Inter, sans-serif; font-size: 13px; font-weight: 650; letter-spacing: -0.01em; color: var(--muted); margin: 24px 0 8px; }
.status { flex: 0 0 auto; margin-left: 16px; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--btn-border); background: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.unsubscribed { border-color: #C9C0F5; background: #F1EEFD; color: #4B37B8; }
.status.unsubscribed::before { background: var(--purple); }
.status.confirm, .status.email { border-color: #E6D7A8; background: #FBF5E2; color: #7A5A00; }
.status.confirm::before, .status.email::before { background: #B8860B; }
.status.failed { border-color: #F0C2BC; background: #FDEEEC; color: #B42318; }
.status.failed::before { background: #B42318; }
.meta .more { margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.meta .more a { color: var(--purple); text-decoration: underline; }
.ovr { width: 960px; margin: 0 auto; padding: 24px 0 96px; }
.ovr .grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.ovr .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ovr .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px 18px; }
.ovr .k { font-size: 12px; color: var(--muted); font-weight: 500; }
.ovr .v { font-family: Geist, Inter, sans-serif; font-weight: 700; font-size: 26px; letter-spacing: -0.03em; line-height: 1.15; margin-top: 4px; }
.ovr .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ovr h2 { font-family: Geist, Inter, sans-serif; font-size: 16px; font-weight: 650; letter-spacing: -0.02em; margin: 32px 0 12px; }
.progress { height: 10px; border-radius: 999px; background: var(--line-soft); overflow: hidden; margin: 12px 0 6px; }
.progress span { display: block; height: 100%; background: var(--purple); width: 0; }
.ovr .note { font-size: 13px; color: var(--muted); margin-top: 12px; }
@media (max-width: 1240px) { .narrow, .report-main, .ovr { width: 100%; padding-left: 24px; padding-right: 24px; } }
@media (max-width: 800px) { .ovr .grid5, .ovr .grid3 { grid-template-columns: 1fr 1fr; } .status { margin-left: 0; } }
.report-main .sender { padding-top: 12px; padding-bottom: 12px; }

/* --- Round 1: calmer test-mode label, consistent chrome, mobile, report sections --- */
.mode-badge {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-size: 13px; font-weight: 600; color: var(--keep-text); white-space: nowrap;
}
.mode-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #B8860B; }
.h2-note { font-family: Inter, sans-serif; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 8px; }
.lede { font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 640px; }
.lede b { color: var(--ink); font-weight: 600; }
.section { margin-top: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.section-head h2 { font-family: Geist, Inter, sans-serif; font-size: 18px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.section-head .n { color: var(--muted); font-weight: 500; }
.section-desc { font-size: 14px; line-height: 1.5; color: var(--muted); margin: -4px 0 12px; max-width: 680px; }
.row-note { flex: 0 0 auto; margin-left: 16px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tick { flex: 0 0 auto; margin-left: 16px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #F1EEFD; color: var(--purple); font-size: 13px; font-weight: 700; }
.tick.bad { background: #FDEEEC; color: #B42318; }
details.listcard > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 24px; font-size: 14px; font-weight: 600; }
details.listcard > summary::-webkit-details-marker { display: none; }
details.listcard > summary::after { content: "Show"; font-weight: 600; font-size: 13px; color: var(--purple); }
details.listcard[open] > summary::after { content: "Hide"; }
details.listcard[open] > summary { border-bottom: 1px solid var(--line-soft); }
details.listcard > summary span { color: var(--muted); font-weight: 400; }
.report-actions { display: flex; justify-content: center; gap: 12px; margin-top: 32px; }
.pick { font-size: 13px; color: var(--muted); margin: 0 24px 16px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
@media (max-width: 800px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-left: -24px; margin-right: -24px; padding: 0 24px 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .pill { flex: 0 0 auto; }
  .sender { display: grid; grid-template-columns: 40px 1fr; align-items: center; column-gap: 12px; row-gap: 10px; }
  .sender .meta { margin-left: 0; }
  .sender .actions { grid-column: 1 / -1; margin-left: 0; }
  .sender .actions > * { flex: 1; }
  .sender .row-note, .sender .tick { grid-column: 2; margin-left: 0; justify-self: start; }
  .sender .tick { display: none; }
  .title-row { flex-wrap: wrap; }
  .page-head h1 { font-size: 30px; }
  .nav .mode-badge { height: 28px; font-size: 12px; }
  .report-actions { flex-direction: column; }
  .foot { height: auto; flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media print {
  header, footer, .report-actions, .stepper, #later, .state-card-actions, .skip { display: none !important; }
  html, body { background: #fff !important; background-image: none !important; }
  .sender .btn, .mode-badge, .page-head .btn { display: none !important; }
  details.listcard > summary::after { content: ""; }
  .listcard, .stats-row .card { break-inside: avoid; }
  h2, h3, .sec-head { break-after: avoid; }
}
[hidden] { display: none !important; }
details.listcard > summary span { margin-right: auto; }
.chip { flex: 0 0 auto; margin-left: 16px; display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; background: #F4F4F6; border: 1px solid var(--line-soft); font-size: 12px; color: var(--keep-text); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 800px) {
  .wrap.foot { padding-top: 20px; padding-bottom: 20px; }
  .sender .chip { grid-column: 2; margin-left: 0; justify-self: start; max-width: 100%; }
}

/* --- Round 2 (Design Bot review): one column on the logo line, clear button states --- */
.page { width: var(--wrap); margin: 0 auto; }
.page.scan-main > *, .page.report-main > * { max-width: var(--card); }
.page.narrow > * { max-width: var(--card); }
.page.ovr > * { max-width: var(--card); }
.page.scan-main, .page.report-main, .page.ovr, .page.narrow { width: var(--wrap); }
.bottom .bar.page-bar { width: var(--wrap); padding-right: calc(var(--wrap) - var(--card)); }
.note-line { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--muted); }
.note-line::before { content: ""; flex: 0 0 auto; transform: translateY(-2px); width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.note-line:has(#notice-text:empty) { display: none; }
.mode-badge::before { background: var(--muted); }
.count .sep { margin: 0 6px; color: var(--line); }
.btn-primary[disabled], .btn-primary[aria-disabled="true"] { background: var(--purple); border-color: var(--purple); color: #fff; opacity: 0.4; }
.btn-keep, .btn-unsub { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 112px; }
.btn-keep.is-chosen { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn-unsub.is-soft { background: #F1EEFD; border: 1px solid #DCD5FA; color: #4B37B8; }
.btn-unsub.is-soft:hover { background: #E6E0FC; }
.ck { font-size: 12px; font-weight: 700; }
.left-alone { display: inline-flex; align-items: center; justify-content: center; height: 36px; min-width: 232px; padding: 0 16px; border-radius: var(--radius-nav); border: 1px dashed var(--btn-border); font-size: 13px; font-weight: 600; color: var(--muted); cursor: help; }
.pill:hover { border-color: var(--ink); }
.pill[aria-pressed="true"]:hover { border-color: var(--ink); }
.page-head .lede { margin-top: -4px; }

@media (max-width: 1240px) {
  .page, .page.scan-main, .page.report-main, .page.ovr, .page.narrow { width: 100%; padding-left: 24px; padding-right: 24px; }
  .bottom .bar.page-bar { width: 100%; padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 800px) {
  .ovr .grid5 { grid-template-columns: 1fr 1fr; }
  .ovr .grid5 > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .left-alone { width: 100%; min-width: 0; }
  .btn-keep, .btn-unsub { min-width: 0; }
}
@media (max-width: 800px) {
  details.listcard > summary span { display: none; }
  details.listcard > summary { justify-content: space-between; }
  .report-actions { flex-direction: column-reverse; }
}
dialog { margin: auto; } dialog ul { list-style: none; padding-left: 0; gap: 14px; } dialog li b { display: block; margin-bottom: 2px; } dialog li span { color: var(--muted); }
.page.prose { width: var(--wrap); }
.page.prose > * { max-width: 720px; }
@media (max-width: 1240px) {
  .page.prose { width: 100%; padding-left: 24px; padding-right: 24px; }
  .page.prose h1 { overflow-wrap: break-word; }
}
@media (max-width: 360px) {
  .page.prose h1 { font-size: 30px; line-height: 1.15; }
}

.prose blockquote { border-left: 3px solid var(--purple); background: #fff; border-radius: 0 12px 12px 0; padding: 12px 16px; margin: 8px 0 16px; font-size: 15px; }
main.page { min-height: calc(100vh - 64px - 65px); }
.report-actions { justify-content: flex-start; } .report-main #later { text-align: left; margin-top: 24px; }

/* --- Round 6 --- */
.btn-primary[disabled], .btn-primary[aria-disabled="true"] { background: #D9DAE1; border: 1.5px solid #8F92A3; color: #2F3037; opacity: 1; cursor: not-allowed; }
@media (max-width: 480px) {
  .stepper { gap: 4px; font-size: 12px; }
  .stepper li { gap: 6px; }
  .stepper li + li::before { width: 14px; margin-right: 4px; }
  .stepper .n { width: 26px; height: 26px; }
}
.hint { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; }
@media (max-width: 800px) {
  .filters { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); padding-right: 48px; scroll-snap-type: x proximity; }
  .pill { scroll-snap-align: start; }
  .page.scan-main { padding-bottom: 200px; }
  .bottom .sum span { display: none; }
  .bottom .bar { gap: 10px; padding-top: 12px; padding-bottom: 12px; }
  .ovr .grid5 { grid-template-columns: 1fr; gap: 8px; }
  .ovr .grid5 > .card:last-child:nth-child(odd) { grid-column: auto; }
  .ovr .grid5 .card { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; padding: 12px 16px; }
  .ovr .grid5 .card .k { grid-column: 1; }
  .ovr .grid5 .card .s { grid-column: 1; margin-top: 0; }
  .ovr .grid5 .card .v { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; font-size: 22px; text-align: right; }
}
@media (max-width: 800px) {
  .sender > .btn { grid-column: 1 / -1; width: 100%; margin-left: 0; height: 40px; font-size: 14px; }
}

/* --- Round 7 --- */
.perks { padding: 4px 24px 18px; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.perks li { display: flex; gap: 8px; }
.perks li::before { content: "✓"; color: var(--purple); font-weight: 700; }
.faq { margin-top: 16px; }
.faq-body { padding: 16px 24px 8px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.faq-body p { margin-bottom: 10px; }
.faq-body b { color: var(--ink); font-weight: 600; }
.empty-row { padding: 32px 24px; text-align: center; font-size: 14px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* --- Round 7b (Design Bot): one 880 column everywhere --- */
.co-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.co-col { min-width: 0; }
.co-col .panel:last-of-type { margin-bottom: 16px; }
.test-card { padding: 0; }
.test-card .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.test-card .stat { padding: 16px 18px; border-left: 1px solid var(--line-soft); }
.test-card .stat:first-child { border-left: 0; }
.test-card .k { font-size: 12px; color: var(--muted); font-weight: 500; }
.test-card .v { font-family: Geist, Inter, sans-serif; font-weight: 700; font-size: 26px; letter-spacing: -0.03em; line-height: 1.15; margin-top: 4px; }
.test-card .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
@media (max-width: 800px) {
  .co-grid { grid-template-columns: 1fr; gap: 0; }
  .filters { scroll-padding-left: 24px; scroll-padding-right: 24px; }
  .test-card .grid3 { grid-template-columns: 1fr; }
  .test-card .stat { border-left: 0; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 12px 16px; }
  .test-card .stat:first-child { border-top: 0; }
  .test-card .stat .k, .test-card .stat .s { grid-column: 1; margin-top: 0; }
  .test-card .stat .v { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; font-size: 22px; }
}
.ovr .test-card { padding: 0; }

/* --- Round 11: search, reset, sr-only --- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin: 24px 0 16px; }
.toolbar .filters { margin: 0; }
.tools { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.search input { height: 36px; width: 200px; padding: 0 14px 0 36px; border-radius: 999px; border: 1px solid var(--btn-border); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23646569' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E") 12px center no-repeat; font: 500 13px Inter, sans-serif; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.search input:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.link-btn { font-size: 13px; font-weight: 600; color: var(--purple); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
@media (max-width: 800px) {
  .toolbar { display: block; margin: 24px 0 16px; }
  .toolbar .filters { margin: 0 -24px 12px; }
  .tools { margin-left: 0; justify-content: space-between; }
  .search { flex: 1; }
  .search input { width: 100%; }
}

/* --- Round 12: skip link --- */
.skip { position: absolute; left: 16px; top: -48px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font: 600 14px Inter, sans-serif; text-decoration: none; }
.skip:focus,
.skip:focus-visible {
  position: fixed;
  top: 10px;
  left: max(24px, calc((100vw - var(--wrap)) / 2));
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}
body:has(.skip:focus),
body:has(.skip:focus-visible) {
  padding-top: 56px;
}

/* --- Round 15: mobile filters, first-screen list, stepper labels, one-line subtitles --- */
.step-label { flex-shrink: 0; }
@media (max-width: 480px) {
  .stepper { gap: 6px; font-size: 12px; }
  .stepper li { gap: 8px; }
  .stepper li + li::before { width: 12px; margin-right: 6px; }
  .stepper .n { width: 26px; height: 26px; flex-shrink: 0; }
}
@media (max-width: 800px) {
  .toolbar .filters {
    display: flex;
    flex-wrap: wrap;
    overflow: visible;
    margin: 0 0 12px;
    padding: 0;
    gap: 8px;
    -webkit-mask-image: none;
    mask-image: none;
    scroll-snap-type: none;
  }
  .filters .pill { padding: 0 10px; }
  .scan-main .meta .count { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .report-main .meta .count { white-space: normal; overflow: visible; overflow-wrap: break-word; }
  .report-main .sub-target { overflow-wrap: anywhere; }
}

/* Layout: on the scan page the bar is part of the page, not over the list */
body.has-bar {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.has-bar header { flex-shrink: 0; }
body.has-bar main.scan-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 32px;
}
body.has-bar .bottom {
  position: relative;
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
body.has-bar .bottom::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: var(--list-cover, 0px);
  pointer-events: none;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
}

@media (max-width: 380px) and (max-height: 700px) {
  body.has-bar .page-head { gap: 10px; }
  body.has-bar .page-head h1 { font-size: 28px; }
  body.has-bar .page-head .lede { font-size: 15px; line-height: 1.4; }
  body.has-bar .toolbar { margin: 16px 0 12px; }
}

dialog[open] {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 48px);
  overflow: hidden;
}
dialog[open] ul {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}
dialog[open] .row { flex-shrink: 0; }

/* --- Round 18: account-mail phrase by width, report subtitles wrap --- */
.account-mail .short { display: none; }
@media (max-width: 800px) {
  .account-mail .full { display: none; }
  .account-mail .short { display: inline; }
}
@media (max-width: 360px) {
  .scan-main .meta .count { white-space: normal; overflow: visible; }
  .scan-main .account-mail { display: block; white-space: nowrap; margin-top: 1px; }
  .stepper { gap: 4px; font-size: 11px; }
  .stepper li { gap: 6px; }
  .stepper li + li::before { width: 8px; margin-right: 4px; }
  .stepper .n { width: 24px; height: 24px; font-size: 12px; }
  .logo { white-space: nowrap; }
  .nav-actions .btn { height: 32px; padding: 0 10px; font-size: 13px; }
  #empty .kv { flex-direction: column; align-items: stretch; gap: 12px; }
  #empty .kv .btn { width: 100%; }
}

/* --- Round 20: report note with parentheses on desktop; equal checkout cards --- */
.sub-note-wide { display: inline; }
.sub-note-narrow { display: none; }
@media (max-width: 800px) {
  .sub-note-wide { display: none; }
  .sub-note-narrow { display: block; margin-top: 2px; }
}
@media (min-width: 801px) {
  .co-grid { align-items: stretch; }
  .co-col { display: flex; flex-direction: column; }
  .co-col > .panel,
  .co-col .panel:last-of-type { flex: 1; margin-bottom: 0; }
  .co-actions { margin-top: 16px; }
}

/* --- Round 21: short screens (phone landscape) — filters fully above the bar --- */
@media (max-height: 500px) {
  body.has-bar .page-head { gap: 8px; }
  body.has-bar .page-head h1 { font-size: 28px; }
  body.has-bar .page-head .lede { font-size: 15px; line-height: 1.4; }
  body.has-bar .toolbar { margin: 10px 0 8px; }
}

/* --- Round 24: failed scan — footer at the bottom, not flush against the FAQ --- */
body:not(.has-bar):has(main.scan-main) {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body:not(.has-bar) main.scan-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}
body:not(.has-bar) main.scan-main > footer {
  margin-top: auto;
}
body:not(.has-bar) main.scan-main > details.faq {
  margin-bottom: 48px;
}

/* --- Round 25–26: shared empty/error card --- */
.state-card { padding: 24px; }
.state-card h2 {
  font-family: Geist, Inter, sans-serif;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0 0 8px;
}
.state-card p { margin: 0 0 20px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.state-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 800px) {
  .state-card-actions { flex-direction: column; }
  .state-card-actions .btn { width: 100%; text-align: center; }
}

@media (max-width: 319px) {
  .bottom .acts { flex-direction: column; align-items: stretch; width: 100%; }
  .bottom .acts .btn { width: 100%; flex: none; }
}

/* Skip target on long pages: do not draw a ring around the whole main column. */
main[tabindex="-1"]:focus,
main[tabindex="-1"]:focus-visible { outline: none; }

.icon-c0{background:#EDE0D4;color:#4A3426}
.icon-c1{background:#D7E4E6;color:#1F3F44}
.icon-c2{background:#F0D9D4;color:#5C2E27}
.icon-c3{background:#E1E6D4;color:#3A4220}
.icon-c4{background:#E8D4E0;color:#4A2740}
.noscript-note{padding:24px;font:500 15px Inter,sans-serif}
.page-top{padding-top:96px}
.center-head{text-align:center;align-items:center}
.btn-row{display:flex;gap:12px;justify-content:center;margin-top:8px}
.mt-14{margin-top:14px}
.mt-12{margin-top:12px}
.card-flush{padding:0;overflow:auto;margin-bottom:16px}
body.cover-0 .bottom::before{height:0px}
body.cover-4 .bottom::before{height:4px}
body.cover-8 .bottom::before{height:8px}
body.cover-12 .bottom::before{height:12px}
body.cover-16 .bottom::before{height:16px}
body.cover-20 .bottom::before{height:20px}
body.cover-24 .bottom::before{height:24px}
body.cover-28 .bottom::before{height:28px}
body.cover-32 .bottom::before{height:32px}
body.cover-36 .bottom::before{height:36px}
body.cover-40 .bottom::before{height:40px}
body.cover-44 .bottom::before{height:44px}
body.cover-48 .bottom::before{height:48px}
body.cover-52 .bottom::before{height:52px}
body.cover-56 .bottom::before{height:56px}
body.cover-60 .bottom::before{height:60px}
body.cover-64 .bottom::before{height:64px}
body.cover-68 .bottom::before{height:68px}
body.cover-72 .bottom::before{height:72px}
body.cover-76 .bottom::before{height:76px}
body.cover-80 .bottom::before{height:80px}
body.cover-84 .bottom::before{height:84px}
body.cover-88 .bottom::before{height:88px}
body.cover-92 .bottom::before{height:92px}
body.cover-96 .bottom::before{height:96px}
body.cover-100 .bottom::before{height:100px}
body.cover-104 .bottom::before{height:104px}
body.cover-108 .bottom::before{height:108px}
body.cover-112 .bottom::before{height:112px}
body.cover-116 .bottom::before{height:116px}
body.cover-120 .bottom::before{height:120px}
body.cover-124 .bottom::before{height:124px}
body.cover-128 .bottom::before{height:128px}
body.cover-132 .bottom::before{height:132px}
body.cover-136 .bottom::before{height:136px}
body.cover-140 .bottom::before{height:140px}
body.cover-144 .bottom::before{height:144px}
body.cover-148 .bottom::before{height:148px}
body.cover-152 .bottom::before{height:152px}
body.cover-156 .bottom::before{height:156px}
body.cover-160 .bottom::before{height:160px}
body.cover-164 .bottom::before{height:164px}
body.cover-168 .bottom::before{height:168px}
body.cover-172 .bottom::before{height:172px}
body.cover-176 .bottom::before{height:176px}
body.cover-180 .bottom::before{height:180px}
body.cover-184 .bottom::before{height:184px}
body.cover-188 .bottom::before{height:188px}
body.cover-192 .bottom::before{height:192px}
body.cover-196 .bottom::before{height:196px}
body.cover-200 .bottom::before{height:200px}
#bar.w-0{width:0%}
#bar.w-1{width:1%}
#bar.w-2{width:2%}
#bar.w-3{width:3%}
#bar.w-4{width:4%}
#bar.w-5{width:5%}
#bar.w-6{width:6%}
#bar.w-7{width:7%}
#bar.w-8{width:8%}
#bar.w-9{width:9%}
#bar.w-10{width:10%}
#bar.w-11{width:11%}
#bar.w-12{width:12%}
#bar.w-13{width:13%}
#bar.w-14{width:14%}
#bar.w-15{width:15%}
#bar.w-16{width:16%}
#bar.w-17{width:17%}
#bar.w-18{width:18%}
#bar.w-19{width:19%}
#bar.w-20{width:20%}
#bar.w-21{width:21%}
#bar.w-22{width:22%}
#bar.w-23{width:23%}
#bar.w-24{width:24%}
#bar.w-25{width:25%}
#bar.w-26{width:26%}
#bar.w-27{width:27%}
#bar.w-28{width:28%}
#bar.w-29{width:29%}
#bar.w-30{width:30%}
#bar.w-31{width:31%}
#bar.w-32{width:32%}
#bar.w-33{width:33%}
#bar.w-34{width:34%}
#bar.w-35{width:35%}
#bar.w-36{width:36%}
#bar.w-37{width:37%}
#bar.w-38{width:38%}
#bar.w-39{width:39%}
#bar.w-40{width:40%}
#bar.w-41{width:41%}
#bar.w-42{width:42%}
#bar.w-43{width:43%}
#bar.w-44{width:44%}
#bar.w-45{width:45%}
#bar.w-46{width:46%}
#bar.w-47{width:47%}
#bar.w-48{width:48%}
#bar.w-49{width:49%}
#bar.w-50{width:50%}
#bar.w-51{width:51%}
#bar.w-52{width:52%}
#bar.w-53{width:53%}
#bar.w-54{width:54%}
#bar.w-55{width:55%}
#bar.w-56{width:56%}
#bar.w-57{width:57%}
#bar.w-58{width:58%}
#bar.w-59{width:59%}
#bar.w-60{width:60%}
#bar.w-61{width:61%}
#bar.w-62{width:62%}
#bar.w-63{width:63%}
#bar.w-64{width:64%}
#bar.w-65{width:65%}
#bar.w-66{width:66%}
#bar.w-67{width:67%}
#bar.w-68{width:68%}
#bar.w-69{width:69%}
#bar.w-70{width:70%}
#bar.w-71{width:71%}
#bar.w-72{width:72%}
#bar.w-73{width:73%}
#bar.w-74{width:74%}
#bar.w-75{width:75%}
#bar.w-76{width:76%}
#bar.w-77{width:77%}
#bar.w-78{width:78%}
#bar.w-79{width:79%}
#bar.w-80{width:80%}
#bar.w-81{width:81%}
#bar.w-82{width:82%}
#bar.w-83{width:83%}
#bar.w-84{width:84%}
#bar.w-85{width:85%}
#bar.w-86{width:86%}
#bar.w-87{width:87%}
#bar.w-88{width:88%}
#bar.w-89{width:89%}
#bar.w-90{width:90%}
#bar.w-91{width:91%}
#bar.w-92{width:92%}
#bar.w-93{width:93%}
#bar.w-94{width:94%}
#bar.w-95{width:95%}
#bar.w-96{width:96%}
#bar.w-97{width:97%}
#bar.w-98{width:98%}
#bar.w-99{width:99%}
#bar.w-100{width:100%}

/* Cancel-contract button. Outlined, so it stays separate from the pay button. */
.withdraw { border: 1px solid var(--line); background: #fff; border-radius: var(--radius-card); padding: 20px 24px; margin: 0 0 24px; }
.withdraw h2 { font-size: 18px; line-height: 1.3; margin: 0 0 8px; }
.withdraw p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.withdraw a { color: var(--purple); }
.withdraw__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.withdraw__btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px;
  border-radius: 10px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink);
  font: 600 15px/1.2 Inter, sans-serif; cursor: pointer; text-align: center;
}
.withdraw__btn:hover { background: #f7f7f8; }
.withdraw__btn--quiet { border-color: var(--btn-border); font-weight: 500; }
.withdraw__step[hidden], .withdraw__done[hidden], [data-withdraw-ref][hidden] { display: none !important; }
.withdraw-note { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--ink); text-align: left; }
.model-static, .model-preview {
  white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px; line-height: 1.5; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 12px 0 20px;
}
.model-fields { display: grid; gap: 12px; margin: 16px 0; }
.model-fields label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.model-fields input, .model-fields textarea {
  font: 400 16px/1.4 Inter, sans-serif; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; width: 100%; background: #fff; color: var(--ink);
}
.model-fields textarea { min-height: 72px; resize: vertical; }
