:root {
  --navy: #0b2545;
  --navy-deep: #061a36;
  --navy-soft: #13325f;
  --gold: #c9a24a;
  --gold-bright: #e0b95a;
  --white: #ffffff;
  --gray-50: #f7f8fa;
  --gray-100: #eef1f5;
  --gray-200: #dde2eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --text: #1c2434;
  --danger: #b3261e;
  --radius: 10px;
  --shadow: 0 6px 18px rgba(11, 37, 69, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--gray-50);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

h1, h2, h3, h4 { color: var(--navy); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 1.85rem; line-height: 1.2; margin: 0 0 0.75rem; }
h2 { font-size: 1.4rem; margin: 0 0 0.5rem; }
h3 { font-size: 1.1rem; margin: 0 0 0.5rem; }
p  { margin: 0 0 0.8rem; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 1.1rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--navy);
  color: var(--white);
  border-bottom: 3px solid var(--gold);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 0; flex-wrap: wrap; row-gap: 0.5rem;
}
.brand {
  color: var(--white); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em;
  display: inline-flex; align-items: center; gap: 0.55rem;
}
.brand .accent { color: var(--gold-bright); }
.brand:hover { text-decoration: none; }
.brand-icon { width: 24px; height: 24px; display: block; flex-shrink: 0; }
.brand-text { display: inline-block; line-height: 1; }
@media (min-width: 800px) {
  .brand-icon { width: 28px; height: 28px; }
}

.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 4px;
  background: transparent; border: 0; padding: 8px; cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--white); display: block; }

.nav-list {
  list-style: none; margin: 0; padding: 0;
  display: none; flex-direction: column; gap: 0;
  flex-basis: 100%; width: 100%;
}
.nav-list.open { display: flex; }
.nav-list li { border-top: 1px solid rgba(255,255,255,0.12); }
.nav-list a, .nav-list button {
  display: block; padding: 0.9rem 0.25rem; color: var(--white);
  font-weight: 500; background: transparent; border: 0; width: 100%; text-align: left;
  font: inherit; cursor: pointer;
}
.nav-list a:hover, .nav-list button:hover { color: var(--gold-bright); text-decoration: none; }
.nav-list a.active { color: var(--gold-bright); }

@media (min-width: 800px) {
  .nav-wrap { flex-wrap: nowrap; }
  .nav-toggle { display: none; }
  .nav-list { display: flex !important; flex-direction: row; gap: 1.5rem; align-items: center; flex-basis: auto; width: auto; }
  .nav-list li { border: 0; }
  .nav-list a, .nav-list button { padding: 0.25rem 0; width: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn-primary { background: var(--gold); color: var(--navy-deep); }
.btn-primary:hover { background: var(--gold-bright); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--white); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--gold); }
.btn-ghost:hover { background: var(--gold); color: var(--navy-deep); text-decoration: none; }
.btn-navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-deep); color: var(--white); border-color: var(--navy-deep); text-decoration: none; }
.btn-danger { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn-danger:hover { background: #8f1e17; color: var(--white); border-color: #8f1e17; text-decoration: none; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.9rem; }

/* ---------- Hero / sections ---------- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--white);
  padding: 3rem 0 3.5rem;
}
.hero h1 { color: var(--white); font-size: 2.05rem; }
.hero p { color: rgba(255,255,255,0.88); font-size: 1.05rem; max-width: 640px; }
.hero .cta-row { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 1.4rem; }
@media (min-width: 600px) { .hero .cta-row { flex-direction: row; } }
@media (min-width: 800px) { .hero { padding: 5rem 0; } .hero h1 { font-size: 2.6rem; } }

.section { padding: 2.5rem 0; }
.section-alt { background: var(--white); }
.section h2 { font-size: 1.5rem; }
.lead { font-size: 1.05rem; color: var(--gray-700); }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 0.5rem;
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-2-lg { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }

.step {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
}
.step .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: var(--gold-bright);
  font-weight: 700; margin-bottom: 0.75rem;
}

.trust {
  background: var(--navy-deep); color: var(--white); border-radius: var(--radius);
  padding: 1.75rem; text-align: center;
}
.trust h2 { color: var(--white); }
.trust p { color: rgba(255,255,255,0.85); margin: 0 auto; max-width: 580px; }

.final-cta { text-align: center; padding: 3rem 0; }
.final-cta h2 { font-size: 1.6rem; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
  max-width: 560px; margin: 0 auto;
}
.form-card.wide { max-width: 760px; }
.form-row { display: flex; flex-direction: column; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 700px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 0.3rem; font-size: 0.92rem; }
.help { display: block; color: var(--gray-500); font-size: 0.82rem; margin-top: 0.2rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"],
select, textarea {
  width: 100%; padding: 0.7rem 0.85rem; font: inherit;
  border: 1px solid var(--gray-200); border-radius: 8px; background: var(--white);
  color: var(--text);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; }
@media (min-width: 700px) { .checkbox-grid { grid-template-columns: 1fr 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; color: var(--text); }
.check input { width: 18px; height: 18px; accent-color: var(--navy); }
.radio-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.radio-row label { font-weight: 500; color: var(--text); display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; }
.alert { border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 1rem; font-size: 0.95rem; }
.alert-error { background: #fdecea; color: var(--danger); border: 1px solid #f5c2bd; }
.alert-info { background: #eef4ff; color: var(--navy); border: 1px solid #cfdcf5; }
.alert-success { background: #e6f5ec; color: #1d6b3a; border: 1px solid #b9e0c9; }

fieldset { border: 1px solid var(--gray-200); border-radius: 8px; padding: 1rem; margin: 0; }
legend { padding: 0 0.5rem; color: var(--navy); font-weight: 700; }

/* ---------- Dashboard / tables ---------- */
.page { padding: 2rem 0 3rem; }
.page-header { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.25rem; }
@media (min-width: 700px) { .page-header { flex-direction: row; align-items: center; justify-content: space-between; } }

.banner {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--white); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem;
}
.banner h2 { color: var(--white); }
.banner p { color: rgba(255,255,255,0.88); }

.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 700px) { .stat-row { grid-template-columns: repeat(5, 1fr); } }
.stat {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 1rem; text-align: center;
}
.stat .v { font-size: 1.5rem; font-weight: 800; color: var(--navy); display: block; }
.stat .l { font-size: 0.8rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.08em; }

.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: 0.85rem 0.9rem; border-bottom: 1px solid var(--gray-100); font-size: 0.95rem; }
th { background: var(--gray-50); color: var(--navy); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }
tbody tr:last-child td { border-bottom: 0; }

/* Reusable responsive admin table: stack rows into cards on narrow screens so
   every column and any row actions stay reachable without horizontal scroll.
   Used by the Articles, Purchases, Waitlist, and Transaction Uploads lists. */
@media (max-width: 768px) {
  .stack-table-wrap { overflow-x: visible; border: none; background: transparent; }
  .stack-table { min-width: 0; }
  .stack-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack-table, .stack-table tbody, .stack-table tr, .stack-table td { display: block; width: 100%; }
  .stack-table tr {
    border: 1px solid var(--gray-200); border-radius: var(--radius);
    background: var(--white); margin-bottom: 0.85rem; padding: 0.5rem 0.9rem;
  }
  .stack-table td { border-bottom: 0; padding: 0.3rem 0; font-size: 0.95rem; text-align: left; }
  .stack-table td.num { text-align: left; }
  .stack-table td[data-label]::before {
    content: attr(data-label) ": "; font-weight: 700; color: var(--navy); margin-right: 0.4rem;
  }
  .stack-table td.cell-title { padding: 0.4rem 0 0.5rem; font-size: 1rem; }
  .stack-table td.row-actions {
    margin-top: 0.5rem; padding-top: 0.7rem; border-top: 1px solid var(--gray-100);
  }
}

.status-pill {
  display: inline-block; padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700;
  background: var(--gray-100); color: var(--gray-700); white-space: nowrap;
}
.status-Draft { background: #e5e7eb; color: #4b5563; }
.status-Submitted { background: #dbeafe; color: #1d4ed8; }
.status-In-Review { background: #fff1cc; color: #8a5a00; }
.status-Completed { background: #d4f1de; color: #166534; }

.badge {
  display: inline-block; background: var(--gray-100); color: var(--navy);
  padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.02em; border: 1px solid var(--gray-200);
}
.badge-gold { background: var(--gold); color: var(--navy-deep); border-color: var(--gold); }
.badge-ok { background: #d4f1de; color: #166534; border-color: #b9e0c9; }
.badge-warn { background: #fff1cc; color: #8a5a00; border-color: #f4dca0; }
.badge-danger { background: #fdecea; color: var(--danger); border-color: #f5c2bd; }
.badges { display: inline-flex; gap: 0.4rem; flex-wrap: wrap; }

.audit-list { display: grid; gap: 0.75rem; }
.audit-row {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem;
}
@media (min-width: 700px) { .audit-row { flex-direction: row; align-items: center; justify-content: space-between; } }
.audit-row .meta { color: var(--gray-500); font-size: 0.88rem; }
.audit-row .title a { color: var(--navy); font-weight: 700; }
.audit-row-right { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.breadcrumb { margin-bottom: 1rem; font-size: 0.9rem; }
.breadcrumb a { color: var(--navy); font-weight: 600; }

.detail-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.detail-actions button[disabled] { opacity: 0.55; cursor: not-allowed; }

.desktop-only { display: none; }
.mobile-only { display: block; }
@media (min-width: 768px) {
  .desktop-only { display: block; }
  .mobile-only { display: none; }
}

.coming-soon-tag {
  display: inline-block; background: var(--gold); color: var(--navy-deep);
  padding: 0.25rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}

.card-list { display: grid; gap: 0.75rem; margin-top: 1rem; }
.card-item {
  border: 1px solid var(--gray-200); border-radius: 8px; padding: 0.9rem 1rem; background: var(--white);
  display: flex; flex-direction: column; gap: 0.45rem; position: relative;
}
.card-item .top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.card-item .title { font-weight: 700; color: var(--navy); }
.card-item .title .muted { font-weight: 500; margin-left: 0.4rem; }
.card-item .sub { color: var(--gray-500); font-size: 0.88rem; }
.card-meta { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: 0.9rem; color: var(--text); }
.card-meta strong { color: var(--navy); font-weight: 700; }
.card-notes { font-size: 0.9rem; color: var(--gray-700); background: var(--gray-50); padding: 0.5rem 0.75rem; border-radius: 6px; }
.card-delete { align-self: flex-end; margin-top: 0.25rem; }

.kv { display: grid; grid-template-columns: 1fr; gap: 0.4rem 1rem; }
@media (min-width: 600px) { .kv { grid-template-columns: max-content 1fr; } }
.kv dt { font-weight: 700; color: var(--navy); font-size: 0.88rem; }
.kv dd { margin: 0; color: var(--text); }

.inline-form { display: inline-flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

/* Admin customer management */
.account-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.account-actions form { margin: 0; }
.token-box { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.token-box input {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem; flex: 1 1 280px; min-width: 0;
}
.row-muted { opacity: 0.6; }
/* Highlight a customer row whose monitoring trial is ending soon. */
.row-flag { background: #fff8e6; }
@media (max-width: 768px) {
  .stack-table tr.row-flag { background: #fff8e6; border-color: var(--gold); }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep); color: rgba(255,255,255,0.85);
  padding: 1.75rem 0; margin-top: 3rem; font-size: 0.9rem;
}
.site-footer a { color: var(--gold-bright); }
.site-footer .foot-row { display: flex; flex-direction: column; gap: 0.5rem; }
@media (min-width: 700px) { .site-footer .foot-row { flex-direction: row; justify-content: space-between; align-items: center; } }
.disclaimer-short { max-width: 640px; }
.footer-legal { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.footer-legal li { font-size: 0.88rem; }
.footer-legal a { color: var(--gold-bright); }

/* ---------- Legal pages ---------- */
.legal-doc .legal-list { padding-left: 1.4rem; margin: 0; }
.legal-doc .legal-list > li { margin-bottom: 1.25rem; }
.legal-doc .legal-list > li:last-child { margin-bottom: 0; }
.legal-doc h2 { font-size: 1.1rem; margin: 0 0 0.4rem; }
.legal-doc ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.legal-doc ul li { margin-bottom: 0.3rem; }

/* ---------- Pricing page ---------- */
.pricing-header { text-align: center; max-width: 720px; margin: 0 auto; }
.pricing-header .lead { margin: 0 auto; }
.pricing-note { text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }

.faq-section { max-width: 760px; margin-left: auto; margin-right: auto; }
.faq-list { display: grid; gap: 0.6rem; }
.faq-item {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 0.85rem 1rem;
}
.faq-item summary {
  cursor: pointer; font-weight: 700; color: var(--navy);
  list-style: none; padding-right: 1.5rem; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 0; top: 0;
  color: var(--gold); font-weight: 800; font-size: 1.15rem;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0.6rem 0 0; color: var(--gray-700); }

.muted { color: var(--gray-500); }
.small { font-size: 0.88rem; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }

/* ---------- Pricing — trial banner + featured consultation ---------- */
.trial-banner {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--white); border-radius: var(--radius); padding: 1rem 1.25rem;
  border-left: 4px solid var(--gold);
  display: flex; flex-direction: column; gap: 0.15rem;
  text-align: center;
}
.trial-banner strong { color: var(--gold-bright); font-size: 1.05rem; }
.trial-banner span { color: rgba(255,255,255,0.85); font-size: 0.95rem; }
@media (min-width: 700px) {
  .trial-banner { flex-direction: row; align-items: center; justify-content: center; gap: 0.6rem; text-align: left; }
}

.consult-card {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--white); border-radius: var(--radius);
  border: 2px solid var(--gold); padding: 1.75rem 1.5rem;
  text-align: center; max-width: 760px; margin-left: auto; margin-right: auto;
  box-shadow: 0 10px 26px rgba(11,37,69,0.18);
}
.consult-card .eyebrow { color: var(--gold-bright); }
.consult-card h2 { color: var(--white); }
.consult-card .plan-price { color: var(--white); }
.consult-card .plan-price .amt { color: var(--gold-bright); }
.consult-card .plan-price .per { color: rgba(255,255,255,0.75); }
.consult-card .lead { color: rgba(255,255,255,0.88); max-width: 560px; margin: 0 auto 1rem; }
.consult-feats {
  list-style: none; padding: 0; margin: 0 auto 1.25rem;
  display: inline-block; text-align: left; max-width: 520px;
}
.consult-feats li {
  padding-left: 1.25rem; position: relative; margin-bottom: 0.4rem;
  color: rgba(255,255,255,0.92); font-size: 0.95rem;
}
.consult-feats li::before {
  content: ""; position: absolute; left: 0; top: 0.55rem;
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold-bright);
}
.consult-cta { min-width: 220px; }

/* "Best for" line inside each audit card */
.plan-bestfor {
  font-size: 0.9rem; color: var(--navy); font-weight: 600;
  margin: -0.25rem 0 0.5rem;
}

/* "Not Sure Which Plan Fits?" helper card */
.not-sure-card {
  max-width: 760px; margin-left: auto; margin-right: auto; text-align: center;
}
.not-sure-card .section-title { margin-top: 0; }
.not-sure-card .muted { max-width: 560px; margin: 0 auto 1.25rem; }
.not-sure-actions {
  display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center;
}
.not-sure-actions .btn { min-width: 200px; }

/* ---------- Phase 3 — Report, Paywall, Loader ---------- */
.report-section-card { background: var(--white); }

.pricing-grid { gap: 1rem; }
.plan-card { display: flex; flex-direction: column; position: relative; }
.plan-card .plan-price { margin: 0.5rem 0 1rem; color: var(--navy); }
.plan-card .plan-price .amt { font-size: 1.9rem; font-weight: 800; }
.plan-card .plan-price .per { color: var(--gray-500); font-size: 0.92rem; }
.plan-card .plan-feats { list-style: none; padding: 0; margin: 0 0 1rem; flex: 1; }
.plan-card .plan-feats li {
  padding-left: 1.25rem; position: relative; margin-bottom: 0.45rem;
  color: var(--text); font-size: 0.94rem;
}
.plan-card .plan-feats li::before {
  content: ""; position: absolute; left: 0; top: 0.55rem;
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
}
.plan-popular { border: 2px solid var(--gold); box-shadow: 0 8px 24px rgba(201,162,74,0.15); }
.plan-popular .plan-badge {
  position: absolute; top: -0.7rem; right: 1rem;
  background: var(--gold); color: var(--navy-deep);
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em;
  padding: 0.25rem 0.7rem; border-radius: 999px; text-transform: uppercase;
}

/* Loader */
.loader-spinner {
  width: 56px; height: 56px; border: 4px solid var(--gray-200);
  border-top-color: var(--gold); border-radius: 50%;
  margin: 0 auto 1.5rem; animation: spp-spin 0.9s linear infinite;
}
@keyframes spp-spin { to { transform: rotate(360deg); } }

/* Report page */
.report-page .report-header {
  display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem;
}
@media (min-width: 700px) {
  .report-page .report-header { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}
.report-brand {
  color: var(--gold); font-weight: 800; font-size: 0.9rem; letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 0.3rem;
}
.report-brand .accent { color: var(--navy); }
.report-header-actions { flex-shrink: 0; }

.report-grade-card {
  display: flex; flex-direction: column; gap: 1rem; align-items: flex-start;
}
@media (min-width: 600px) {
  .report-grade-card { flex-direction: row; align-items: center; }
}
.grade-large {
  font-size: 4.5rem; font-weight: 900; line-height: 1; color: var(--navy);
  padding: 0.5rem 1.25rem; border-radius: 12px; background: var(--gray-50);
  border: 3px solid var(--gold); min-width: 110px; text-align: center;
}
.grade-body { flex: 1; }
.grade-body h2 { margin-top: 0; }
.grade-badge {
  display: inline-block; padding: 0.25rem 0.75rem; border-radius: 999px;
  font-weight: 800; font-size: 0.9rem; background: var(--gray-100); color: var(--navy);
}
.grade-green { color: #166534 !important; border-color: #16653433; }
.grade-yellow { color: #8a5a00 !important; border-color: #8a5a0033; }
.grade-red { color: var(--danger) !important; border-color: #b3261e33; }
.grade-badge.grade-green { background: #d4f1de; }
.grade-badge.grade-yellow { background: #fff1cc; }
.grade-badge.grade-red { background: #fdecea; }

.section-title { margin-top: 2rem; margin-bottom: 0.75rem; }
.report-card-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 800px) { .report-card-grid { grid-template-columns: 1fr 1fr; } }

.report-card-block { display: flex; flex-direction: column; gap: 0.5rem; }
.report-card-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.report-card-top h3 { margin: 0; }
.cat-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.25rem 0; }
.cat-tag {
  background: var(--navy); color: var(--white); border-radius: 999px;
  padding: 0.2rem 0.7rem; font-size: 0.78rem; font-weight: 600;
}
.recommendation-box {
  margin-top: 0.6rem; padding: 0.85rem 1rem; border-radius: 8px;
  background: rgba(201,162,74,0.12); border-left: 4px solid var(--gold);
  color: var(--navy-deep);
}
.spending-match .best-card { color: var(--navy); }
.rec-list { padding-left: 0; counter-reset: rec; list-style: none; display: grid; gap: 0.6rem; }
.rec-item {
  counter-increment: rec; padding-left: 3rem; position: relative;
}
.rec-item::before {
  content: counter(rec); position: absolute; left: 0.9rem; top: 0.9rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--navy); color: var(--gold-bright);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem;
}
.tip-card { display: flex; gap: 0.75rem; align-items: flex-start; }
.tip-card .tip-icon {
  flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--gold); color: var(--navy-deep);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700;
}
.disclaimer-block {
  border-top: 1px solid var(--gray-200); padding-top: 1rem; margin-top: 2rem;
}

/* ---------- Sample report page ---------- */
.sample-report-header .eyebrow { margin-bottom: 0.4rem; }
.sample-report-header .report-header-actions {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem;
}
@media (min-width: 700px) {
  .sample-report-header .report-header-actions { align-items: flex-end; text-align: right; max-width: 240px; }
}
.sample-bottom-cta {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--white); border-radius: var(--radius);
  padding: 1.75rem 1.5rem; text-align: center;
}
.sample-bottom-cta h2 { color: var(--white); }
.sample-bottom-cta .lead { color: rgba(255,255,255,0.88); max-width: 620px; margin: 0 auto 0.5rem; }
.sample-bottom-cta .detail-actions { justify-content: center; align-items: center; }
.sample-secondary-link { color: var(--gold-bright); font-weight: 600; }
.sample-secondary-link:hover { color: var(--white); }
.sample-report-link { text-align: center; }
.sample-report-link a { color: var(--navy); font-weight: 600; text-decoration: underline; }
.grade-large.grade-green { border-color: #166534; color: #166534; }
.grade-large.grade-yellow { border-color: #8a5a00; color: #8a5a00; }
.grade-large.grade-red    { border-color: var(--danger); color: var(--danger); }

/* ---------- Print styles (report page) ---------- */
@media print {
  @page { margin: 0.6in; }

  html, body {
    background: #ffffff !important;
    color: #000000;
    font-size: 11pt;
  }

  .site-header,
  .site-footer,
  .breadcrumb,
  .report-header-actions,
  .nav-toggle,
  .nav-list,
  #pdf-btn {
    display: none !important;
  }

  main { display: block; }

  .container { max-width: 100%; padding: 0; }
  .page { padding: 0; }

  a { color: #000000; text-decoration: none; }
  a[href]::after { content: ""; }

  h1, h2, h3, h4 { color: #000000; }

  .card,
  .report-grade-card,
  .report-card-block,
  .spending-match,
  .rec-item,
  .tip-card {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .section-title {
    break-before: page;
    page-break-before: always;
    break-after: avoid;
    page-break-after: avoid;
  }

  .report-page > .container > .report-header,
  .report-grade-card {
    break-before: auto;
    page-break-before: auto;
  }

  .report-card-grid,
  .grid {
    display: block !important;
  }
  .report-card-grid > *,
  .grid > * {
    margin-bottom: 0.75rem;
  }

  .grade-large {
    background: #ffffff !important;
    border: 3px solid #000000 !important;
    color: #000000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .grade-green,
  .grade-yellow,
  .grade-red,
  .grade-badge.grade-green,
  .grade-badge.grade-yellow,
  .grade-badge.grade-red,
  .recommendation-box,
  .cat-tag,
  .tip-card .tip-icon,
  .rec-item::before {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .recommendation-box {
    border-left: 4px solid #000000;
    background: #f3f3f3 !important;
    color: #000000;
  }

  .cat-tag {
    background: #000000 !important;
    color: #ffffff !important;
  }

  .rec-item::before {
    background: #000000 !important;
    color: #ffffff !important;
  }

  .tip-card .tip-icon {
    background: #000000 !important;
    color: #ffffff !important;
  }

  .disclaimer-block {
    break-before: avoid;
    page-break-before: avoid;
    border-top: 1px solid #000000;
  }
}

/* ---------- Admin work queue ---------- */
.admin-page .page-header { margin-bottom: 0.75rem; }

.admin-subnav {
  display: flex; gap: 0.4rem; flex-wrap: wrap;
  padding: 0.35rem; background: var(--white);
  border: 1px solid var(--gray-200); border-radius: 999px;
  margin-bottom: 1.25rem; width: fit-content; max-width: 100%;
  overflow-x: auto;
}
.admin-subnav-link {
  display: inline-block; padding: 0.45rem 0.95rem;
  border-radius: 999px; font-size: 0.88rem; font-weight: 600;
  color: var(--gray-700); white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}
.admin-subnav-link:hover { background: var(--gray-100); color: var(--navy); text-decoration: none; }
.admin-subnav-link.is-active { background: var(--navy); color: var(--white); }
.admin-subnav-link.is-active:hover { background: var(--navy-deep); color: var(--white); }

.queue-cards {
  display: grid; grid-template-columns: 1fr; gap: 0.75rem;
}
@media (min-width: 800px) {
  .queue-cards { grid-template-columns: 1.6fr 1fr; }
}
.queue-side { display: grid; gap: 0.75rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 800px) { .queue-side { grid-template-columns: 1fr; } }

.queue-card {
  display: flex; align-items: stretch; justify-content: space-between;
  gap: 1rem; padding: 1.25rem 1.35rem;
  border-radius: var(--radius); border: 1px solid var(--gray-200);
  background: var(--white); color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.queue-card:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(11,37,69,0.12); }
.queue-card:active { transform: translateY(0); }

.queue-card.primary {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--white); border-color: transparent;
  position: relative; overflow: hidden;
}
.queue-card.primary::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; background: var(--gold);
}
.queue-card.primary:hover { box-shadow: 0 12px 28px rgba(11,37,69,0.32); }

.queue-card-body { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.queue-card .l {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; opacity: 0.85;
}
.queue-card.primary .l { color: var(--gold-bright); opacity: 1; }
.queue-card .v {
  font-size: 2.6rem; font-weight: 800; line-height: 1; color: inherit;
}
.queue-card.primary .v { color: var(--white); }
.queue-card .sub { font-size: 0.9rem; opacity: 0.85; }
.queue-card.primary .sub { color: rgba(255,255,255,0.85); }

.queue-card.secondary {
  flex-direction: column; align-items: flex-start; padding: 1rem 1.1rem;
  gap: 0.15rem;
}
.queue-card.secondary .v { font-size: 1.9rem; color: var(--navy); }
.queue-card.secondary .l { color: var(--gray-500); }
.queue-card.secondary .sub { color: var(--gold); font-weight: 600; font-size: 0.82rem; }

.queue-card-spark {
  display: none;
  flex-direction: column; align-items: flex-end; justify-content: center;
  flex-shrink: 0; min-width: 180px;
}
@media (min-width: 520px) { .queue-card-spark { display: flex; } }
.spark-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(255,255,255,0.7); margin-bottom: 0.3rem;
}
.sparkline { width: 100%; max-width: 180px; height: 50px; display: block; }

.kpi-strip {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem;
}
.kpi-tile {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 0.9rem 1rem;
  display: flex; flex-direction: column; gap: 0.2rem;
  box-shadow: var(--shadow);
}
.kpi-tile .l {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gray-500);
}
.kpi-tile .v {
  font-size: 1.6rem; font-weight: 800; color: var(--navy); line-height: 1.1;
  display: inline-flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap;
}
.kpi-tile .sub { font-size: 0.82rem; color: var(--gray-500); }
.kpi-delta {
  display: inline-flex; align-items: center; gap: 0.2rem;
  font-size: 0.85rem; font-weight: 700;
  padding: 0.1rem 0.45rem; border-radius: 999px;
  background: var(--gray-100); color: var(--gray-500);
}
.kpi-delta-up { background: rgba(34,139,87,0.12); color: #1f7a4c; }
.kpi-delta-down { background: rgba(184,49,49,0.12); color: #a02c2c; }
.kpi-arrow { font-size: 0.7rem; line-height: 1; }

.kpi-trend { margin-top: 0.65rem; display: flex; flex-direction: column; gap: 0.25rem; }
.kpi-trend-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
}
.kpi-trend-label {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--gray-500);
}
.kpi-trend-total { font-size: 0.75rem; font-weight: 700; color: var(--navy); }
.kpi-trend-chart {
  width: 100%; height: 44px; display: block;
  shape-rendering: crispEdges;
}
.kpi-trend-axis {
  display: flex; justify-content: space-between;
  font-size: 0.68rem; color: var(--gray-500);
}
.kpi-trend-empty {
  font-size: 0.8rem; color: var(--gray-500);
  padding: 0.7rem 0.6rem; background: var(--gray-100);
  border-radius: 6px; text-align: center;
}

.chip-row {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
@media (min-width: 520px) { .chip-row { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 800px) { .chip-row { grid-template-columns: repeat(5, 1fr); } }
.chip {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 0.7rem 0.85rem;
  display: flex; flex-direction: column; gap: 0.15rem;
  color: var(--text);
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}
.chip:hover { border-color: var(--gold); background: var(--white); text-decoration: none; transform: translateY(-1px); }
.chip:active { transform: translateY(0); }
.chip .v { font-size: 1.35rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.chip .l { font-size: 0.72rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }

/* Needs-attention preview */
.needs-attention-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: 0.5rem;
}
.needs-attention-head h2 { margin: 0; }

.empty-state {
  background: var(--white); border: 1px dashed var(--gray-200);
  border-radius: var(--radius); padding: 1.5rem; text-align: center; color: var(--text);
}
.empty-state strong { color: var(--navy); }

/* Whole-row click affordance */
.audit-row.is-link { color: var(--text); transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease; }
.audit-row.is-link:hover { border-color: var(--gold); text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(11,37,69,0.08); }
.audit-row.is-link:active { transform: translateY(0); }
.audit-row.is-link .title { color: var(--navy); font-weight: 700; }

/* ---------- SLA badges ---------- */
.sla {
  display: inline-block; padding: 0.18rem 0.6rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; white-space: nowrap;
  border: 1px solid transparent;
}
.sla-green { background: #d4f1de; color: #166534; border-color: #b9e0c9; }
.sla-amber { background: #fff1cc; color: #8a5a00; border-color: #f4dca0; }
.sla-red   { background: #fdecea; color: var(--danger); border-color: #f5c2bd; }

/* ---------- Filter bar (audits list) ---------- */
.filter-bar {
  display: flex; flex-direction: column; gap: 0.6rem;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 0.75rem;
  position: sticky; top: 0; z-index: 5;
}
@media (min-width: 900px) {
  .filter-bar { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .filter-bar .filter-pills { flex: 1 1 auto; }
  .filter-bar .filter-form { flex: 1 1 260px; max-width: 360px; }
  .filter-bar .sort-toggle { flex: 0 0 auto; }
}

.filter-pills {
  display: flex; gap: 0.35rem; flex-wrap: wrap; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.pill {
  display: inline-block; padding: 0.4rem 0.85rem;
  border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  background: var(--gray-100); color: var(--gray-700);
  border: 1px solid transparent; white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}
.pill:hover { background: var(--gray-200); color: var(--navy); text-decoration: none; }
.pill.is-active { background: var(--navy); color: var(--white); }
.pill.is-active:hover { background: var(--navy-deep); color: var(--white); }
.pill-sm { padding: 0.3rem 0.7rem; font-size: 0.78rem; }

.filter-form {
  display: flex; gap: 0.5rem; align-items: center;
}
.search-input {
  flex: 1; padding: 0.55rem 0.75rem; font-size: 0.95rem;
  border: 1px solid var(--gray-200); border-radius: 8px;
}
.search-input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

.sort-toggle { display: inline-flex; gap: 0.3rem; flex-wrap: wrap; }

.date-filter-bar { position: static; }
.date-range-form {
  display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap;
}
.date-field { display: flex; flex-direction: column; gap: 0.2rem; }
.date-label {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--gray-700);
}
.date-input {
  padding: 0.5rem 0.6rem; font-size: 0.9rem;
  border: 1px solid var(--gray-200); border-radius: 8px;
  background: var(--white); color: var(--navy);
}
.date-input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.date-presets { display: inline-flex; gap: 0.3rem; flex-wrap: wrap; }
@media (min-width: 900px) {
  .date-filter-bar { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .date-filter-bar .date-range-form { flex: 1 1 auto; }
  .date-filter-bar .date-presets { flex: 0 0 auto; }
}

.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; flex-wrap: wrap;
}

/* ---------- Dashboard: plan summary + extension placeholder ---------- */
.dash-grid {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
}
@media (min-width: 720px) {
  .dash-grid { grid-template-columns: 1.4fr 1fr; }
}
.card-title { margin: 0 0 0.5rem; font-size: 1.15rem; }
.plan-summary .plan-name { font-weight: 700; font-size: 1.05rem; margin: 0 0 0.75rem; }
.plan-meta { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.4rem; }
.plan-meta li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--gray-100); padding-bottom: 0.35rem; }
.plan-meta li span { color: var(--gray-500); }
.plan-meta li strong { color: var(--navy); text-transform: capitalize; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.extension-placeholder { position: relative; }
.badge-soft {
  display: inline-block; margin-bottom: 0.5rem; padding: 0.1rem 0.55rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  background: var(--gray-100); color: var(--gray-500); border-radius: 999px;
}
.extension-placeholder button[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Onboarding ---------- */
.onboarding-card { max-width: 560px; }
.onboarding-options { display: grid; gap: 0.75rem; margin-top: 1rem; }
.onboarding-option {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.9rem 1rem; border: 1.5px solid var(--gray-100);
  border-radius: 12px; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease;
}
.onboarding-option:hover { border-color: var(--navy); }
.onboarding-option:has(input:checked) { border-color: var(--navy); background: var(--gray-100); }
.onboarding-option input { margin-top: 0.25rem; }
.onboarding-option-body { display: flex; flex-direction: column; gap: 0.15rem; }
.onboarding-option-body strong { color: var(--navy); }

/* ---------- Pricing: Personal/Business market toggle ---------- */
.market-toggle {
  display: flex; gap: 0.25rem; margin: 1.25rem auto 0; max-width: 360px;
  padding: 0.3rem; background: var(--gray-100); border-radius: 999px;
}
.market-toggle button {
  appearance: none; border: 0; background: transparent; flex: 1;
  padding: 0.6rem 1rem; border-radius: 999px;
  font: inherit; font-weight: 700; color: var(--navy); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.market-toggle button.active {
  background: var(--navy); color: var(--white);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* ---------- Pricing: monthly/yearly billing toggle ---------- */
.billing-toggle {
  display: inline-flex; gap: 0.25rem; margin: 1rem 0 0.25rem;
  padding: 0.25rem; background: var(--gray-100); border-radius: 999px;
}
.billing-toggle button {
  appearance: none; border: 0; background: transparent;
  padding: 0.45rem 1rem; border-radius: 999px;
  font: inherit; font-weight: 600; color: var(--navy); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.billing-toggle button.active {
  background: var(--navy); color: var(--white);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.billing-toggle .save-pill {
  margin-left: 0.4rem; padding: 0.05rem 0.45rem;
  font-size: 0.72rem; font-weight: 700;
  background: var(--gold); color: var(--navy-deep); border-radius: 999px;
}
.billing-toggle button:not(.active) .save-pill { background: var(--gold-bright); }

/* ---------- Checkout success / cancel landing pages ---------- */
.checkout-result { text-align: center; padding: 2rem 1.5rem; }
.checkout-result h1 { margin: 0.5rem 0 0.75rem; }
.checkout-result .detail-actions { justify-content: center; }

/* ---------- Plan selection flow + audit setup wizard ---------- */
.container.narrow { max-width: 680px; }

.flow-steps {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; list-style: none;
  padding: 0; margin: 0 0 1.25rem; font-size: 0.85rem; color: var(--gray-500);
  counter-reset: flowstep;
}
.flow-steps li { position: relative; padding-left: 1.6rem; counter-increment: flowstep; }
.flow-steps li::before {
  content: counter(flowstep); position: absolute; left: 0; top: -1px;
  width: 1.2rem; height: 1.2rem; border-radius: 50%; text-align: center;
  line-height: 1.2rem; font-size: 0.72rem; font-weight: 700;
  background: var(--gray-200); color: var(--gray-700);
}
.flow-steps li.done { color: var(--navy); }
.flow-steps li.done::before { background: var(--gold); color: var(--navy-deep); content: '\2713'; }
.flow-steps li.current { color: var(--navy); font-weight: 700; }
.flow-steps li.current::before { background: var(--navy); color: var(--white); }

.selected-plan-card { border-left: 4px solid var(--gold); }
.selected-plan-card .plan-title { margin: 0.25rem 0 0.4rem; font-size: 1.4rem; color: var(--navy); }
.selected-plan-card .plan-price { font-size: 1.6rem; font-weight: 800; color: var(--navy); margin: 0 0 0.5rem; }
.selected-plan-card .plan-price .per { font-size: 0.9rem; font-weight: 500; color: var(--gray-500); }

/* Setup wizard */
.setup-head { margin-bottom: 0.5rem; }
.setup-progress {
  height: 8px; background: var(--gray-200); border-radius: 999px;
  overflow: hidden; margin: 0.6rem 0 0.9rem;
}
.setup-progress > span { display: block; height: 100%; background: var(--gold); border-radius: 999px; transition: width 0.3s ease; }
.setup-steplist {
  display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; list-style: none;
  padding: 0; margin: 0; font-size: 0.8rem; color: var(--gray-500);
}
.setup-steplist li.current { color: var(--navy); font-weight: 700; }
.setup-steplist li.done { color: var(--navy); }
.setup-steplist li.done::before { content: '\2713\00a0'; color: var(--gold); }

.stacked-form { display: flex; flex-direction: column; gap: 1rem; }
.stacked-form label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; color: var(--navy); }
.stacked-form label span { font-size: 0.92rem; }
.stacked-form input, .stacked-form select, .stacked-form textarea {
  font: inherit; padding: 0.6rem 0.7rem; border: 1px solid var(--gray-200);
  border-radius: 8px; background: var(--white); color: var(--text); font-weight: 400;
}
.stacked-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.req { color: var(--danger); font-style: normal; }

.choice-grid { display: grid; gap: 0.75rem; margin-top: 0.5rem; }
.choice-tile {
  display: block; border: 1.5px solid var(--gray-200); border-radius: 10px;
  padding: 0.9rem 1rem; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.choice-tile:hover { border-color: var(--gold); }
.choice-tile input { margin-right: 0.5rem; }
.choice-tile .choice-title { font-weight: 700; color: var(--navy); display: inline; }
.choice-tile .choice-desc { display: block; color: var(--gray-500); font-size: 0.88rem; margin-top: 0.25rem; }
.choice-tile:has(input:checked) { border-color: var(--gold); background: #fdf8ec; }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.6rem; margin: 0.5rem 0; }
.check-tile {
  display: flex; align-items: center; gap: 0.5rem; border: 1.5px solid var(--gray-200);
  border-radius: 8px; padding: 0.6rem 0.75rem; cursor: pointer; font-size: 0.92rem;
}
.check-tile:hover { border-color: var(--gold); }
.check-tile:has(input:checked) { border-color: var(--gold); background: #fdf8ec; font-weight: 600; }

.card-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.card-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border: 1px solid var(--gray-200); border-radius: 8px; padding: 0.6rem 0.85rem;
}
.card-row .muted { display: block; margin-top: 0.1rem; }

.review-list { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; }
.review-list > div { display: grid; grid-template-columns: 150px 1fr; gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid var(--gray-100); }
.review-list dt { color: var(--gray-500); font-size: 0.9rem; margin: 0; }
.review-list dd { margin: 0; color: var(--navy); font-weight: 600; }

.setup-actions { display: flex; justify-content: space-between; gap: 0.75rem; margin-top: 1.25rem; align-items: center; }

@media (max-width: 540px) {
  .stacked-form .form-row { grid-template-columns: 1fr; }
  .review-list > div { grid-template-columns: 1fr; gap: 0.1rem; }
}

/* ===== Transaction import & review ===== */

/* Right-aligned numeric table cells */
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Responsive table wrapper (horizontal scroll on small screens) */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Summary stat cards */
.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line, #e3e7ee);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: center;
}
.stat-num { font-size: 1.5rem; font-weight: 700; color: var(--navy, #0b2545); }
.stat-label { font-size: 0.8rem; color: var(--muted, #5a6573); text-transform: uppercase; letter-spacing: 0.03em; }

/* Horizontal category bars */
.bar-list { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.bar-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.bar-label { font-weight: 600; color: var(--navy, #0b2545); }
.bar-value { color: var(--muted, #5a6573); font-variant-numeric: tabular-nums; }
.bar-track { margin-top: 0.25rem; height: 8px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--gold, #e0b95a); border-radius: 999px; }

/* Transaction tables */
.tx-table th, .tx-table td { vertical-align: middle; }
.tx-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.tx-inline-form { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.tx-cat, .tx-scope {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line, #d8dee8);
  border-radius: 8px;
  background: #fff;
  font-size: 0.9rem;
}
.tx-remove-cell { text-align: right; white-space: nowrap; }
.tx-sample th, .tx-sample td { font-size: 0.85rem; }

/* Skipped rows list */
.skip-list { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.skip-list li { font-size: 0.85rem; color: var(--muted, #5a6573); padding: 0.3rem 0; border-bottom: 1px solid #eef1f6; }

/* Stack transaction tables into cards on small screens */
@media (max-width: 640px) {
  .summary-stats { grid-template-columns: 1fr; }
  .tx-table thead { display: none; }
  .tx-table, .tx-table tbody, .tx-table tr, .tx-table td { display: block; width: 100%; }
  .tx-table tr {
    border: 1px solid var(--line, #e3e7ee);
    border-radius: 10px;
    margin-bottom: 0.6rem;
    padding: 0.4rem 0.6rem;
  }
  .tx-table td { border: none; padding: 0.3rem 0; text-align: left; }
  .tx-table td.num { text-align: left; }
  .tx-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted, #5a6573);
  }
  .tx-remove-cell { text-align: left; }
}

/* ---------- Articles ---------- */
.container-readable { max-width: 760px; }

/* Legacy article cards — still used by the homepage "Latest Articles" section
   (views/public/home.ejs). The editorial restyle below is scoped to
   .article-page, so these remain the styling for cards outside the Articles
   section. */
.article-grid { align-items: stretch; }
.article-card { display: flex; flex-direction: column; }
.article-card-body { flex: 1; }
.article-card h3 { margin: 0.6rem 0 0.4rem; font-size: 1.15rem; }
.article-card h3 a { color: var(--navy); text-decoration: none; }
.article-card h3 a:hover { color: var(--gold); }
.article-excerpt { margin: 0; }
.article-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-top: 1rem; flex-wrap: wrap;
}
.article-meta { margin: 0; }

/* ===== Editorial / newspaper styling for the Articles section =====
   All rules below are scoped under .article-page so the rest of the site's
   typography and white backgrounds are unaffected. */
.article-page {
  --ink: var(--navy);
  --paper: #f7f3ea;
  --rule: #d9d0bd;
  --muted-ink: #74705f;
  --font-head: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  background: var(--paper);
}

.article-page .breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem;
}
.article-page .breadcrumb a {
  font-family: var(--font-body); text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.78rem; color: var(--muted-ink);
}
.article-page .breadcrumb-sep { color: var(--muted-ink); font-size: 0.78rem; }
.article-page .breadcrumb-current {
  font-family: var(--font-body); font-size: 0.78rem; color: var(--muted-ink);
}

/* Masthead */
.paper-masthead {
  text-align: center; padding: 1.25rem 0 1.25rem;
  border-bottom: 3px double var(--ink); margin-bottom: 1.25rem;
}
.paper-kicker {
  display: inline-block; font-family: var(--font-body);
  text-transform: uppercase; letter-spacing: 0.28em; font-size: 0.72rem;
  font-weight: 600; color: var(--gold); margin-bottom: 0.45rem;
}
.paper-title {
  font-family: var(--font-head); font-weight: 900; color: var(--ink);
  font-size: clamp(2.3rem, 6vw, 3.6rem); line-height: 1.02;
  letter-spacing: -0.015em; margin: 0;
}
.paper-standfirst {
  font-family: var(--font-body); color: var(--muted-ink);
  max-width: 640px; margin: 0.6rem auto 0; font-size: 1.05rem; line-height: 1.5;
}

/* Category filters — single horizontal row, swipe/scroll on overflow */
.article-page .article-filters-wrap { position: relative; margin-bottom: 1.5rem; }
/* Soft edge fades hint that the row can scroll; toggled via JS scroll state */
.article-page .article-filters-wrap::before,
.article-page .article-filters-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 1px; width: 2.5rem;
  pointer-events: none; opacity: 0; transition: opacity 0.2s ease; z-index: 1;
}
.article-page .article-filters-wrap::before {
  left: 0; background: linear-gradient(to right, var(--paper), rgba(255, 255, 255, 0));
}
.article-page .article-filters-wrap::after {
  right: 0; background: linear-gradient(to left, var(--paper), rgba(255, 255, 255, 0));
}
.article-page .article-filters-wrap.can-scroll-left::before { opacity: 1; }
.article-page .article-filters-wrap.can-scroll-right::after { opacity: 1; }
.article-page .article-filters {
  display: flex; flex-wrap: nowrap; gap: 0.5rem; justify-content: flex-start;
  margin-top: 0; padding-bottom: 1.1rem; margin-bottom: 0;
  border-bottom: 1px solid var(--rule);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
}
.article-page .article-filters::-webkit-scrollbar { display: none; }
.article-page .article-filters:focus { outline: none; }
.article-page .article-filters:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.article-page .article-chip { flex: 0 0 auto; white-space: nowrap; }
.article-page .article-chip {
  display: inline-block; padding: 0.35rem 0.8rem; border-radius: 0;
  border: 1px solid var(--rule); background: transparent;
  color: var(--ink); font-family: var(--font-body);
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em; text-decoration: none;
}
.article-page .article-chip:hover { border-color: var(--ink); text-decoration: none; }
.article-page .article-chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Shared story typography (front page + related) */
.story-kicker {
  display: inline-block; font-family: var(--font-body); text-transform: uppercase;
  letter-spacing: 0.16em; font-size: 0.7rem; font-weight: 700; color: var(--gold);
  margin-bottom: 0.45rem;
}
.story-dateline {
  font-family: var(--font-body); font-size: 0.78rem; color: var(--muted-ink);
  text-transform: uppercase; letter-spacing: 0.08em; margin: 0.4rem 0 0.5rem;
}

/* Lead story */
.lead-story { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--ink); }
.lead-headline {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem); line-height: 1.08;
  letter-spacing: -0.01em; margin: 0 0 0.6rem;
}
.lead-headline a { color: var(--ink); }
.lead-headline a:hover { color: var(--navy-soft); text-decoration: none; }
.lead-deck {
  font-family: var(--font-body); font-size: 1.18rem; line-height: 1.55;
  color: var(--gray-700); margin: 0 0 0.5rem; max-width: 68ch;
}
.story-readmore {
  font-family: var(--font-body); font-weight: 700; color: var(--ink);
  border-bottom: 2px solid var(--gold); padding-bottom: 1px; display: inline-block;
}
.story-readmore:hover { text-decoration: none; color: var(--navy-soft); }

/* Story list */
.story-list { display: grid; grid-template-columns: 1fr; }
.story { padding: 1.25rem 0; border-top: 1px solid var(--rule); }
.story-list .story:first-child { border-top: 0; }
.story-headline {
  font-family: var(--font-head); font-weight: 700; font-size: 1.3rem;
  line-height: 1.18; margin: 0 0 0.4rem;
}
.story-headline a { color: var(--ink); }
.story-headline a:hover { color: var(--navy-soft); text-decoration: none; }
.story-excerpt {
  font-family: var(--font-body); color: var(--gray-700);
  font-size: 0.98rem; line-height: 1.5; margin: 0 0 0.4rem;
}
@media (min-width: 700px) {
  .story-list { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
  .story-list .story, .story-list .story:first-child { border-top: 1px solid var(--rule); }
}
@media (min-width: 1000px) {
  .story-list { grid-template-columns: repeat(3, 1fr); column-gap: 2.25rem; }
}
/* Related list stays single column inside the readable measure */
.related-list, .article-page .related-list .story:first-child { }
.related-list { grid-template-columns: 1fr !important; }

/* Article detail */
.article-detail-head { margin-bottom: 1.5rem; }
.article-headline {
  font-family: var(--font-head); font-weight: 800; color: var(--ink);
  font-size: clamp(2rem, 5vw, 3rem); line-height: 1.08;
  letter-spacing: -0.015em; margin: 0.5rem 0 0.6rem;
}
.article-deck {
  font-family: var(--font-body); font-size: 1.2rem; line-height: 1.5;
  color: var(--gray-700); font-style: italic; margin: 0 0 0.9rem; max-width: 60ch;
}
.article-dateline {
  font-family: var(--font-body); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted-ink); margin: 0;
  padding: 0.6rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.article-hero-img {
  width: 100%; height: auto; border-radius: 0;
  margin: 1.5rem 0; border: 1px solid var(--rule);
}
.article-body {
  font-family: var(--font-body); color: #29281f;
  font-size: 1.13rem; line-height: 1.8; margin-top: 1.5rem;
}
.article-body p { margin: 0 0 1.2rem; }
.article-body > p:first-of-type::first-letter {
  font-family: var(--font-head); float: left; font-weight: 800;
  font-size: 3.6rem; line-height: 0.72; padding: 0.4rem 0.55rem 0 0; color: var(--ink);
}

/* Related + CTA + empty/coming-soon */
.article-related { border-top: 2px solid var(--ink); padding-top: 0.5rem; }
.related-title { font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; }

.article-cta {
  text-align: center; padding: 2.25rem 1.5rem; border-radius: 0;
  background: var(--ink); color: var(--paper);
}
.article-cta h2 { font-family: var(--font-head); color: #fff; margin-top: 0; }
.article-cta p { font-family: var(--font-body); color: rgba(255, 255, 255, 0.85); }

.article-empty {
  text-align: center; padding: 2.5rem 1.25rem;
  background: var(--white); border: 1px solid var(--rule);
}
.article-empty h2 { font-family: var(--font-head); margin-top: 0; }
.article-empty p { font-family: var(--font-body); color: var(--muted-ink); }

/* Article status pills + admin form extras */
.status-Published { background: #dcfce7; color: #15803d; }
.status-Archived { background: #f3f4f6; color: #6b7280; }
.form-fieldset {
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 1rem;
}
.form-fieldset legend { font-weight: 700; color: var(--navy); padding: 0 0.4rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger); color: var(--white); border-color: var(--danger); text-decoration: none; }
