:root {
  /* "Statute" identity — regulatory authority. Ink-navy + evidence-green,
     gold as the signal accent, warm paper ground, serif headlines. */
  --ink: #141b2e;
  --green: #1f6f43;
  --green-dark: #17532f;
  --gold: #b8862f;
  --gold-dark: #8a6114;
  --muted: #59606f;
  --line: #e6e1d5;
  --bg: #faf8f2;
  --card: #ffffff;
  --danger: #a3271d;
  --radius: 8px;
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, .brand { font-family: var(--serif); letter-spacing: -0.01em; }
h1, h2, h3 { font-weight: 700; text-wrap: balance; }

a { color: var(--green); }
a:hover { color: var(--green-dark); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 1.2rem; text-decoration: none; color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 16px; }
.user-email { color: var(--muted); font-size: 0.9rem; }
.nav-link { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.nav-link:hover { color: var(--green); }
.inline { display: inline; margin: 0; }
.link-button {
  background: none; border: none; color: var(--green);
  cursor: pointer; font-size: 0.9rem; padding: 0;
}
.link-button:hover { text-decoration: underline; }

.container { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 32px 24px; }

.site-footer { border-top: 1px solid var(--line); padding: 20px 24px; color: var(--muted); font-size: 0.85rem; text-align: center; }
.footer-nav { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--green); }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* Auth cards (login / signup) */
.auth-card {
  max-width: 420px; margin: 24px auto; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.auth-card h1 { margin-top: 0; font-size: 1.5rem; }

form label { display: block; margin: 16px 0 0; font-weight: 600; font-size: 0.9rem; }
form input[type="text"], form input[type="email"], form input[type="password"] {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; font-weight: 400;
  background: #fff;
}
form input:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
.hint { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }
form select {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; background: #fff; color: var(--ink);
}
form select:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; margin-top: 16px; }
label.check input { width: auto; margin: 0; }
.account-meta { display: grid; grid-template-columns: 140px 1fr; gap: 6px 16px; margin: 0 0 20px; font-size: 0.9rem; }
.account-meta dt { color: var(--muted); }
.account-meta dd { margin: 0; }
.danger-zone { border-color: #f0c8c4; }
.danger-zone h2 { color: var(--danger); }

button.primary {
  margin-top: 24px; width: 100%; padding: 12px 16px; border: none;
  background: var(--green); color: #fff; font-size: 0.98rem; font-weight: 600;
  border-radius: 6px; cursor: pointer; transition: background .15s ease;
}
button.primary:hover { background: var(--green-dark); }
button.primary:focus-visible, .btn-sm:focus-visible, .btn-lg:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

.error {
  background: #fdecea; color: var(--danger); border: 1px solid #f5c6c2;
  padding: 10px 12px; border-radius: 8px; margin-top: 8px; font-size: 0.9rem;
}
.flash {
  background: #e9f5ee; color: var(--green-dark); border: 1px solid #c4e3d1;
  padding: 12px 14px; border-radius: 8px; margin-bottom: 20px;
}
.flash p { margin: 0; }
.flash-error { background: #fdecea; color: var(--danger); border-color: #f5c6c2; }

/* Dashboard */
.banner {
  border-radius: var(--radius); padding: 12px 16px; margin-top: 20px; font-size: 0.9rem;
  border: 1px solid var(--line); background: var(--card);
}
.banner-trial { background: #fff7e6; border-color: #f0dcac; color: #7a5a12; }
.banner-active { background: #e9f5ee; border-color: #c4e3d1; color: var(--green-dark); }

.page-head h1 { margin: 0 0 4px; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin-top: 20px;
}
.panel h2 { margin: 0 0 16px; font-size: 1.1rem; }

/* Dashboard alert filters */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-head h2 { margin: 0; }
.alert-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.alert-filters input[type="search"], .alert-filters select {
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 0.9rem; background: #fff; color: var(--ink);
}
.alert-filters .filter-search { min-width: 180px; }
.alert-filters input:focus, .alert-filters select:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
.alert-filters .btn-sm { border: none; cursor: pointer; }
.filter-clear { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.filter-clear:hover { color: var(--green); }
@media (max-width: 520px) {
  .alert-filters { width: 100%; }
  .alert-filters .filter-search, .alert-filters select { flex: 1 1 auto; }
}

.chips { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: #eef5f0; color: var(--green-dark); border: 1px solid #d3e6da;
  padding: 5px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
}

.empty { text-align: center; padding: 16px 8px; }
.empty p { margin: 4px 0; }

.alerts { list-style: none; padding: 0; margin: 0; }
.alert { padding: 16px 0; border-top: 1px solid var(--line); }
.alert:first-child { border-top: none; padding-top: 0; }
.alert h3 { margin: 6px 0 4px; font-size: 1.05rem; }
.alert-link { display: block; text-decoration: none; color: inherit; }
.alert-link:hover h3 { color: var(--green); }
.alert-more { font-size: 0.85rem; color: var(--green); }
.alert-head { display: flex; align-items: center; gap: 8px; }
.back { margin: 0 0 4px; }
.back a { text-decoration: none; color: var(--muted); font-size: 0.9rem; }
.back a:hover { color: var(--green); }
.passage {
  margin: 0; padding: 16px 20px; border-left: 3px solid var(--gold);
  background: #f7f2e7; border-radius: 0 6px 6px 0; font-size: 1.05rem;
  color: var(--ink); white-space: pre-wrap; font-family: var(--serif);
}
.tag {
  background: #efece2; color: #6b5a2e; border-radius: 4px;
  padding: 2px 8px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.tag-type { background: #e9ebf1; color: #3a4a63; }
.tag-new { background: var(--gold); color: #fff; }
.alert time { margin-left: auto; }

/* Unread / "new" alert state — gold is the signal color */
.unread-count {
  display: inline-block; background: var(--gold); color: #fff; font-size: 0.72rem;
  font-weight: 700; padding: 2px 9px; border-radius: 4px; vertical-align: middle; margin-left: 6px;
}
.alert-new { position: relative; }
.alert-new::before {
  content: ""; position: absolute; left: -14px; top: 22px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--gold);
}
.alert:first-child.alert-new::before { top: 6px; }

/* Alert-detail action bar */
.detail-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.detail-bar .back { margin: 0; }
.detail-bar button { border: 1px solid #cfe0d5; cursor: pointer; }

/* Help page */
.help-list { display: grid; grid-template-columns: 1fr; gap: 4px 0; margin: 0; }
.help-list dt { font-weight: 600; margin-top: 14px; }
.help-list dt:first-child { margin-top: 0; }
.help-list dd { margin: 4px 0 0; }
.support-box { background: #f1ece0; border-color: #e0d8c4; }
.support-box a { font-weight: 600; }

/* Subscription page */
.plan-summary { display: grid; grid-template-columns: 120px 1fr; gap: 12px 16px; margin: 0; align-items: start; }
.plan-summary dt { color: var(--muted); }
.plan-summary dd { margin: 0; }
.plan-summary .chips { margin: 0; }
.pill {
  display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; text-transform: uppercase; letter-spacing: 0.02em; margin-right: 6px;
}
.pill-trial { background: #fff7e6; color: #7a5a12; border: 1px solid #f0dcac; }
.pill-active { background: #e9f5ee; color: var(--green-dark); border: 1px solid #c4e3d1; }
.action-list { list-style: none; padding: 0; margin: 8px 0 0; }
.action-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.action-list li:first-child { border-top: none; }
.action-list li > div { flex: 1; }
.action-list strong { display: block; }
.action-list p { margin: 2px 0 0; }
.action-list .btn-sm { white-space: nowrap; }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid #f0c8c4; }
.btn-danger:hover { background: #fdecea; }
@media (max-width: 520px) {
  .plan-summary { grid-template-columns: 1fr; gap: 2px; }
  .plan-summary dt { margin-top: 10px; }
  .action-list li { flex-direction: column; align-items: flex-start; }
}

.account dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 0; }
.account dt { color: var(--muted); }
.account dd { margin: 0; }

@media (max-width: 520px) {
  .account dl { grid-template-columns: 1fr; gap: 2px; }
  .account dt { margin-top: 10px; }
}

/* ---- Header CTA + buttons ---- */
.btn-sm {
  display: inline-block; background: var(--green); color: #fff; text-decoration: none;
  padding: 8px 15px; border-radius: 6px; font-size: 0.88rem; font-weight: 600;
  transition: background .15s ease;
}
.btn-sm:hover { background: var(--green-dark); color: #fff; }
.btn-lg {
  display: inline-block; background: var(--green); color: #fff; text-decoration: none;
  padding: 13px 26px; border-radius: 6px; font-weight: 600; font-size: 1rem;
  letter-spacing: 0.01em; transition: background .15s ease;
}
.btn-lg:hover { background: var(--green-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--green-dark); border: 1px solid var(--line); }
.btn-ghost:hover { background: #f1ede2; color: var(--green-dark); }

/* ---- Marketing layout ---- */
main.marketing { max-width: none; width: 100%; margin: 0; padding: 0; }
.marketing .eyebrow {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem;
  font-weight: 700; color: var(--green); margin: 0 0 14px;
}
.marketing h1 { font-size: 2.6rem; line-height: 1.1; margin: 0 0 16px; text-wrap: balance; }
.marketing h2 { font-size: 1.9rem; margin: 0 0 14px; text-wrap: balance; }
.lead { font-size: 1.2rem; line-height: 1.55; }

.hero { background: linear-gradient(180deg, #f1ece0 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero-inner { max-width: 780px; margin: 0 auto; padding: 88px 24px 76px; text-align: center; }
.hero .lead { max-width: 640px; margin: 0 auto 28px; color: #3d4453; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }

.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); }
.band-inner { max-width: 780px; margin: 0 auto; padding: 64px 24px; text-align: center; }

.steps-wrap, .features-wrap { max-width: 1060px; margin: 0 auto; padding: 64px 24px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: #eef5f0;
  color: var(--green-dark); font-weight: 700; margin-bottom: 14px;
}
.step h3 { margin: 0 0 8px; font-size: 1.2rem; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
}
.feature h3 { margin: 0 0 8px; font-size: 1.1rem; }

.proof-band { background: #f2f7f4; border-top: 1px solid var(--line); }
.proof-band .band-inner { max-width: 720px; }
.proof-band .btn-lg { margin-top: 22px; }

/* ---- Pricing ---- */
.pricing-head .band-inner { max-width: 720px; padding: 72px 24px 24px; }
.plans-wrap { max-width: 1060px; margin: 0 auto; padding: 24px 24px 72px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.plan {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; text-align: center;
}
.plan-featured { border-color: var(--green); box-shadow: 0 8px 28px rgba(47,125,79,0.12); position: relative; }
.plan-tag {
  display: inline-block; background: var(--green); color: #fff; font-size: 0.72rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 4px 12px; border-radius: 999px; margin: 0 0 10px;
}
.plan h3 { margin: 0 0 10px; font-size: 1.3rem; }
.price { margin: 0 0 6px; }
.price .amount { font-size: 2.4rem; font-weight: 800; }
.price .per { color: var(--muted); font-size: 1rem; }
.plan-list { list-style: none; padding: 0; margin: 18px 0 24px; text-align: left; }
.plan-list li { padding: 7px 0 7px 26px; position: relative; border-top: 1px solid var(--line); }
.plan-list li:before { content: "✓"; color: var(--green); position: absolute; left: 4px; font-weight: 700; }
.plans-note { text-align: center; margin-top: 26px; }

/* ---- Pricing matrix ---- */
.matrix-wrap { max-width: 720px; margin: 0 auto; padding: 8px 24px 8px; }
.matrix-inner { text-align: center; }
.price-matrix {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 auto;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.price-matrix th, .price-matrix td {
  padding: 20px 18px; border-bottom: 1px solid var(--line); text-align: center;
}
.price-matrix thead th {
  background: #f1ece0; color: var(--green-dark); font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.price-matrix tbody th { text-align: left; font-weight: 600; background: #fafcfb; }
.price-matrix tr:last-child th, .price-matrix tr:last-child td { border-bottom: none; }
.price-matrix .corner { background: #f1ece0; }
.price-matrix .amount { font-size: 1.7rem; font-weight: 800; }
.price-matrix .per { color: var(--muted); font-size: 0.9rem; }
.matrix-note { max-width: 560px; margin: 18px auto 0; }
.matrix-cta { margin-top: 22px; }

.enterprise-band { background: #f2f7f4; border-top: 1px solid var(--line); margin-top: 40px; }
.enterprise-band .band-inner { max-width: 680px; }

@media (max-width: 520px) {
  .price-matrix th, .price-matrix td { padding: 14px 10px; }
  .price-matrix .amount { font-size: 1.4rem; }
}

/* ---- Coverage page ---- */
.coverage-wrap { max-width: 760px; margin: 0 auto; padding: 8px 24px 8px; text-align: center; }
.coverage-table {
  width: 100%; border-collapse: separate; border-spacing: 0; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.coverage-table th, .coverage-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.coverage-table thead th {
  background: #f1ece0; color: var(--green-dark); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.coverage-table tbody th { font-weight: 600; }
.coverage-table tr:last-child th, .coverage-table tr:last-child td { border-bottom: none; }
.coverage-table .cov-count { font-variant-numeric: tabular-nums; color: var(--muted); }
.coverage-table tr.cov-soon th { color: var(--muted); }
.chip-live { background: #eef5f0; color: var(--green-dark); border: 1px solid #d3e6da; }
.chip-soon { background: #f2f2f0; color: var(--muted); border: 1px solid var(--line); }
.coverage-note { max-width: 620px; margin: 18px auto 0; }

/* ---- FAQ ---- */
.faq-wrap { max-width: 760px; margin: 0 auto; padding: 64px 24px; }
.faq-wrap h2 { text-align: center; margin-bottom: 28px; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 4px 20px; margin-bottom: 12px;
}
.faq summary {
  cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green); font-size: 1.3rem; font-weight: 700; margin-left: 12px; }
.faq details[open] summary::after { content: "–"; }
.faq details > p { margin: 0 0 16px; }

@media (max-width: 820px) {
  .steps, .features, .plans { grid-template-columns: 1fr; }
  .marketing h1 { font-size: 2.1rem; }
  .marketing h2 { font-size: 1.6rem; }
}
@media (max-width: 520px) {
  .coverage-table th, .coverage-table td { padding: 12px 12px; }
}

/* ---- Print: a clean, forwardable alert (no site chrome) ---- */
@media print {
  .site-header, .site-footer, .no-print, .flash { display: none !important; }
  body { background: #fff; }
  .container { padding: 0; max-width: 100%; }
  .panel { border: none; box-shadow: none; padding: 12px 0; margin-top: 8px; break-inside: avoid; }
  .passage { border-left: 3px solid #000; background: #f4f4f4; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.75rem; word-break: break-all; }
}
