:root {
  color-scheme: light;
  --ink: #18211d;
  --muted: #65716b;
  --line: #d9e1dc;
  --paper: #f6f8f6;
  --panel: #ffffff;
  --green: #126849;
  --green-dark: #0b5038;
  --green-soft: #e2f2ea;
  --blue: #285f91;
  --blue-soft: #e7f0f8;
  --gold: #8a6218;
  --gold-soft: #fff1cf;
  --red: #a63f3f;
  --red-soft: #fae9e7;
  --shadow: 0 18px 50px rgba(24, 33, 29, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.page-shell {
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px clamp(18px, 3.5vw, 48px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.public-topbar {
  background: rgba(246, 248, 246, 0.96);
}

.brand {
  align-items: center;
  background: transparent;
  border: 0;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 10px;
  padding: 0;
}

.brand-logo {
  display: block;
  height: 40px;
  object-fit: contain;
  width: 120px;
}

.beta-badge,
.type-label,
.status-pill,
.confidence,
.principles span,
.filter-summary span {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 6px 9px;
  white-space: nowrap;
}

.beta-badge {
  background: var(--gold-soft);
  color: var(--gold);
  text-transform: uppercase;
}

.public-links,
.account-actions,
.nav,
.hero-actions,
.card-actions,
.connection-actions,
.settings-action {
  align-items: center;
  display: flex;
  gap: 10px;
}

.public-links a,
.support-link {
  color: var(--muted);
  font-size: 14px;
}

.nav {
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.nav-item {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  min-height: 38px;
  padding: 8px 10px;
}

.nav-item:hover,
.nav-item.active {
  color: var(--green);
}

.nav-item.active {
  background: var(--green-soft);
  border-color: #c5dfd2;
  font-weight: 800;
}

.primary,
.secondary {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
}

a.primary {
  color: white;
}

.primary {
  background: var(--green);
  border: 1px solid var(--green);
  color: white;
}

.primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.secondary {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}

.secondary:hover {
  border-color: #aebbb4;
}

.small {
  min-height: 36px;
  padding: 7px 11px;
}

.wide {
  width: 100%;
}

.text-button,
.link-back {
  background: transparent;
  border: 0;
  color: var(--green);
  font-weight: 800;
  padding: 0;
}

.landing {
  display: grid;
  gap: 44px;
  padding: clamp(30px, 6vw, 76px) clamp(18px, 5vw, 64px) 36px;
}

.hero {
  align-items: center;
  display: grid;
  gap: clamp(34px, 6vw, 76px);
  grid-template-columns: minmax(0, 0.94fr) minmax(360px, 1.06fr);
  margin: 0 auto;
  max-width: 1180px;
  width: 100%;
}

.hero-brand {
  display: block;
  margin-bottom: 22px;
  max-width: 430px;
  width: 100%;
}

.hero-copy h1 {
  font-size: clamp(50px, 7vw, 84px);
  letter-spacing: 0;
  line-height: 0.98;
  margin: 10px 0 22px;
}

.eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin: 0 0 9px;
  text-transform: uppercase;
}

.subhead {
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  max-width: 650px;
}

.hero-actions {
  flex-wrap: wrap;
  margin-top: 26px;
}

.trust-line {
  color: var(--muted);
  font-size: 13px;
  margin: 14px 0 0;
}

.product-frame {
  background: #edf2ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  padding: clamp(14px, 2.4vw, 24px);
}

.preview-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preview-metrics div,
.mini-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.preview-metrics div {
  display: grid;
  gap: 5px;
  padding: 18px;
}

.preview-metrics span,
.preview-metrics small,
.mini-card span {
  color: var(--muted);
}

.preview-metrics strong {
  font-size: 30px;
}

.mini-stack,
.table-list,
.connection-grid,
.evidence-list,
.calendar-list {
  display: grid;
  gap: 10px;
}

.mini-card {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px;
}

.mini-card span,
.mini-card strong {
  display: block;
}

.mini-card span {
  font-size: 12px;
  margin-bottom: 4px;
}

.difference {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding-top: 28px;
  width: 100%;
}

.difference h2,
.difference p {
  margin: 0;
}

.difference p {
  color: var(--muted);
  margin-top: 5px;
}

.principles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.principles span {
  background: var(--blue-soft);
  color: var(--blue);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.76fr);
  margin: 0 auto;
  max-width: 1080px;
  min-height: calc(100vh - 73px);
}

.auth-context,
.auth-panel {
  align-content: center;
  display: grid;
  padding: clamp(28px, 6vw, 74px);
}

.auth-context {
  background: var(--green);
  color: white;
}

.auth-context .eyebrow,
.auth-context p {
  color: rgba(255, 255, 255, 0.8);
}

.auth-context h1 {
  font-size: clamp(38px, 5vw, 60px);
  letter-spacing: 0;
  line-height: 1.04;
  margin: 8px 0 18px;
}

.auth-context > p {
  font-size: 18px;
  line-height: 1.5;
}

.auth-points {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.auth-points span {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding-top: 10px;
}

.auth-panel {
  background: white;
}

.auth-panel h2 {
  font-size: 30px;
  margin: 24px 0 8px;
}

.auth-switch {
  background: #edf1ee;
  border-radius: 7px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
}

.auth-switch button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  min-height: 38px;
}

.auth-switch button.active {
  background: white;
  box-shadow: 0 1px 4px rgba(24, 33, 29, 0.12);
  color: var(--ink);
  font-weight: 800;
}

.field {
  display: grid;
  gap: 7px;
  margin: 16px 0;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.field input,
.field select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

.field input:focus,
.field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(18, 104, 73, 0.12);
  outline: 0;
}

.form-foot {
  color: var(--muted);
  font-size: 14px;
  margin: 18px 0 0;
  text-align: center;
}

.notice {
  border: 1px solid;
  border-radius: 7px;
  font-size: 14px;
  padding: 12px 14px;
}

.notice.info {
  background: var(--blue-soft);
  border-color: #c8dae9;
  color: var(--blue);
}

.notice.success {
  background: var(--green-soft);
  border-color: #bfdece;
  color: var(--green-dark);
}

.notice.error,
.inline-error {
  background: var(--red-soft);
  border-color: #ecc4c0;
  color: var(--red);
}

.app-layout {
  display: grid;
  gap: 24px;
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(22px, 4vw, 44px);
}

.page-heading h1,
.dashboard-heading h1,
.center-flow h1 {
  font-size: clamp(36px, 5vw, 54px);
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
}

.page-heading > p:last-child,
.dashboard-heading p,
.section-title p,
.onboarding-action p,
.connection-actions span,
.settings-section > div > p {
  color: var(--muted);
  line-height: 1.45;
}

.page-heading > p:last-child {
  margin: 10px 0 0;
}

.dashboard-heading {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.dashboard-heading p {
  margin: 8px 0 0;
}

.metric-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric {
  background: white;
  border: 1px solid var(--line);
  border-left: 5px solid;
  border-radius: 8px;
  display: grid;
  gap: 7px;
  padding: clamp(18px, 3vw, 26px);
}

.metric.potential {
  border-left-color: var(--gold);
}

.metric.confirmed {
  border-left-color: var(--green);
}

.metric span,
.metric small {
  color: var(--muted);
}

.metric span {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1;
}

.attention-band {
  align-items: center;
  background: var(--gold-soft);
  border: 1px solid #ecd79d;
  border-radius: 8px;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 16px;
}

.attention-band p {
  color: #6f581f;
  margin: 5px 0 0;
}

.cards-section {
  display: grid;
  gap: 14px;
}

.section-title,
.card-head,
.amount-row,
.review-title,
.connection-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.section-title h2,
.section-title h3,
.section-title p,
.connection-head h2,
.connection-head p,
.evidence-card h3,
.review-title h1,
.review-title p,
.decision-panel h2 {
  margin: 0;
}

.section-title p {
  margin-top: 4px;
}

.section-title > span {
  color: var(--muted);
}

.evidence-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.evidence-card,
.panel,
.connection-panel,
.settings-section,
.row-card,
.debug-stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.evidence-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
}

.evidence-card h3 {
  font-size: 23px;
}

.evidence-card > p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.card-date {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.type-label {
  background: var(--blue-soft);
  color: var(--blue);
}

.confidence {
  background: var(--gold-soft);
  color: var(--gold);
}

.confidence.high {
  background: var(--green-soft);
  color: var(--green);
}

.amount-row {
  align-items: end;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  min-height: 68px;
  padding: 12px 0;
}

.amount-row span {
  color: var(--muted);
  font-size: 12px;
}

.amount-row strong,
.amount {
  font-size: 19px;
  text-align: right;
}

.card-actions {
  margin-top: auto;
}

.card-actions > * {
  flex: 1;
}

.caught-up {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 18px;
  grid-column: 1 / -1;
  justify-content: center;
  min-height: 190px;
  padding: 30px;
  text-align: left;
}

.caught-check {
  align-items: center;
  background: var(--green-soft);
  border-radius: 999px;
  color: var(--green);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 28px;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.caught-up h3,
.caught-up p {
  margin: 0;
}

.caught-up p {
  color: var(--muted);
  margin-top: 6px;
  max-width: 520px;
}

.review-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.panel {
  padding: 20px;
}

.review-main,
.decision-panel {
  display: grid;
  gap: 18px;
}

.review-title {
  align-items: flex-start;
}

.review-title h1 {
  font-size: clamp(30px, 4vw, 44px);
}

.review-title p {
  color: var(--muted);
  margin-top: 7px;
}

.read-only-note {
  align-items: center;
  background: var(--green-soft);
  border-radius: 7px;
  color: var(--green-dark);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 12px;
}

.read-only-note span {
  font-size: 13px;
}

.evidence-line {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
}

.evidence-line span {
  color: var(--green);
  display: block;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.evidence-line p {
  color: var(--muted);
  line-height: 1.45;
  margin: 5px 0 0;
}

.decision-panel {
  position: sticky;
  top: 94px;
}

.decision-panel > p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.row-card {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(130px, auto) minmax(130px, auto);
  padding: 14px 16px;
}

.row-card > div:first-child {
  display: grid;
  gap: 5px;
  justify-items: start;
}

.row-card span:not(.type-label):not(.status-pill),
.row-card small {
  color: var(--muted);
}

.row-card > strong:last-child {
  text-align: right;
}

.row-outcome {
  display: grid;
  gap: 4px;
  justify-items: start;
}

.status-pill.connected,
.status-pill.confirmed,
.status-pill.complete {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.syncing {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-pill.error,
.status-pill.dismissed {
  background: var(--red-soft);
  color: var(--red);
}

.status-pill.disconnected,
.status-pill.resolved {
  background: #edf0ee;
  color: var(--muted);
}

.filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-summary span {
  background: white;
  border: 1px solid var(--line);
  color: var(--muted);
}

.connection-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.connection-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.connection-head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.source-mark {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  font-size: 18px;
  font-weight: 850;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.source-mark.google {
  background: var(--blue-soft);
  color: var(--blue);
}

.source-mark.qbo {
  background: var(--green-soft);
  color: var(--green);
}

.connection-detail {
  display: grid;
  gap: 6px 18px;
  grid-template-columns: auto minmax(0, 1fr);
}

.connection-detail span {
  color: var(--muted);
  font-size: 13px;
}

.connection-detail strong {
  text-align: right;
}

.connection-buttons {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.connection-panel > button,
.connection-buttons > button {
  justify-self: start;
}

.connection-help,
.success-copy,
.inline-error {
  font-size: 13px;
  margin: 0;
}

.success-copy {
  color: var(--green);
  font-weight: 800;
}

.inline-error {
  border: 1px solid;
  border-radius: 7px;
  padding: 10px;
}

.calendar-picker {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-top: 16px;
}

.calendar-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 11px;
}

.calendar-row input {
  accent-color: var(--green);
  height: 18px;
  width: 18px;
}

.calendar-row small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.connection-actions {
  flex-wrap: wrap;
}

.stepper {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.stepper li {
  align-items: center;
  border-bottom: 3px solid var(--line);
  color: var(--muted);
  display: flex;
  font-weight: 750;
  gap: 8px;
  padding: 9px 0 12px;
}

.stepper li span {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  height: 25px;
  justify-content: center;
  width: 25px;
}

.stepper li.active {
  border-color: var(--gold);
  color: var(--ink);
}

.stepper li.complete {
  border-color: var(--green);
  color: var(--green);
}

.onboarding-action {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  padding-top: 20px;
}

.onboarding-action p {
  margin: 0;
}

.settings-section {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(180px, 0.4fr) minmax(0, 1fr);
  padding: 20px;
}

.settings-section h2 {
  margin: 0;
}

.settings-section > div > p {
  margin: 5px 0 0;
}

.settings-list {
  display: grid;
}

.settings-list div {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 0;
}

.settings-list div:last-child {
  border-bottom: 0;
}

.settings-list span {
  color: var(--muted);
}

.settings-action {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.debug-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.debug-stat {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.debug-stat span {
  color: var(--muted);
  font-size: 13px;
}

.debug-stat strong {
  font-size: 30px;
}

.center-flow,
.loading-screen {
  display: grid;
  min-height: calc(100vh - 73px);
  padding: 24px;
  place-items: center;
}

.pipeline-panel {
  max-width: 650px;
  text-align: center;
  width: 100%;
}

.pipeline-panel h1 {
  margin-bottom: 30px;
}

.pipeline-panel h2 {
  font-size: 24px;
  margin: 0 0 8px;
}

.pipeline-panel > p:not(.eyebrow):not(.trust-line) {
  color: var(--muted);
  margin: 0 auto;
  max-width: 530px;
}

.scan-ring {
  animation: spin 1s linear infinite;
  border: 5px solid var(--green-soft);
  border-radius: 999px;
  border-top-color: var(--green);
  height: 54px;
  margin: 0 auto 18px;
  width: 54px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.pipeline-steps {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 28px auto;
  max-width: 470px;
  padding: 0;
  text-align: left;
}

.pipeline-steps li {
  align-items: center;
  color: #98a29d;
  display: grid;
  gap: 10px;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 36px;
}

.pipeline-steps span {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.pipeline-steps li.active {
  color: var(--ink);
  font-weight: 800;
}

.pipeline-steps li.active span {
  background: var(--blue-soft);
  border-color: #bcd4e7;
  color: var(--blue);
}

.pipeline-steps li.complete {
  color: var(--green);
}

.pipeline-steps li.complete span {
  background: var(--green-soft);
  border-color: #bfdece;
}

.error-mark {
  align-items: center;
  background: var(--red-soft);
  border-radius: 999px;
  color: var(--red);
  display: inline-flex;
  font-size: 28px;
  font-weight: 850;
  height: 58px;
  justify-content: center;
  margin-bottom: 18px;
  width: 58px;
}

.empty {
  background: white;
  border: 1px dashed #c6d2cb;
  border-radius: 8px;
  color: var(--muted);
  padding: 22px;
}

.compact-empty {
  padding: 14px;
}

.loading-screen img {
  height: 64px;
  width: 64px;
}

.loading-screen {
  align-content: center;
  gap: 18px;
}

.loading-bar {
  animation: pulse 1.1s ease-in-out infinite alternate;
  background: var(--green);
  border-radius: 999px;
  height: 4px;
  width: 90px;
}

.public-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 32px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 32px 20px 40px;
}

.public-footer img {
  display: block;
  height: auto;
  margin-bottom: 8px;
  width: 150px;
}

.public-footer p {
  color: var(--muted);
  margin: 0;
}

.public-footer nav,
.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.public-footer nav {
  justify-content: flex-end;
}

.public-footer a,
.legal-footer a {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.legal-page {
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}

.legal-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 14px max(20px, calc((100vw - 1120px) / 2));
  position: sticky;
  top: 0;
  z-index: 10;
}

.legal-header img {
  display: block;
  height: auto;
  width: 168px;
}

.legal-header nav {
  align-items: center;
  display: flex;
  gap: 18px;
}

.legal-header a {
  color: var(--ink);
  font-size: 0.9rem;
}

.legal-header .legal-app-link {
  background: var(--green);
  border-radius: 6px;
  color: white;
  padding: 10px 14px;
}

.legal-main {
  margin: 0 auto;
  max-width: 840px;
  padding: 64px 24px 80px;
}

.legal-main h1 {
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  letter-spacing: 0;
  line-height: 1;
  margin: 8px 0 20px;
}

.legal-intro {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.7;
  margin: 0 0 18px;
}

.legal-updated {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 48px;
}

.legal-section {
  border-top: 1px solid var(--line);
  padding: 30px 0 8px;
}

.legal-section h2 {
  font-size: 1.45rem;
  margin: 0 0 14px;
}

.legal-section h3 {
  font-size: 1.05rem;
  margin: 24px 0 8px;
}

.legal-section p,
.legal-section li {
  color: #34403a;
  line-height: 1.72;
}

.legal-section ul,
.legal-section ol {
  padding-left: 22px;
}

.legal-section a,
.legal-contact a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-contact {
  background: var(--green-soft);
  border-left: 4px solid var(--green);
  margin-top: 28px;
  padding: 20px 22px;
}

.legal-contact p {
  margin: 4px 0;
}

.legal-footer {
  border-top: 1px solid var(--line);
  margin: 0 auto;
  max-width: 840px;
  padding: 28px 24px 40px;
}

@keyframes pulse {
  from { opacity: 0.25; transform: scaleX(0.45); }
  to { opacity: 1; transform: scaleX(1); }
}

@media (max-width: 1040px) {
  .account-actions .support-link {
    display: none;
  }

  .nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .nav-item {
    flex: 0 0 auto;
  }
}

@media (max-width: 900px) {
  .hero,
  .auth-layout,
  .review-layout,
  .settings-section {
    grid-template-columns: 1fr;
  }

  .product-frame {
    order: -1;
  }

  .auth-layout {
    min-height: 0;
  }

  .auth-context,
  .auth-panel {
    padding: clamp(26px, 7vw, 54px);
  }

  .evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-panel {
    position: static;
  }

  .settings-section {
    gap: 14px;
  }
}

@media (max-width: 760px) {
  .public-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-footer nav {
    justify-content: flex-start;
  }

  .legal-header {
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
  }

  .legal-header img {
    margin-top: 6px;
    width: 136px;
  }

  .legal-header nav {
    gap: 10px;
  }

  .legal-header nav > a:not(.legal-app-link) {
    display: none;
  }

  .legal-main {
    padding: 42px 18px 60px;
  }

  .legal-main h1 {
    font-size: 2.5rem;
  }

  .topbar.in-app {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .topbar.in-app .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    order: 3;
    padding-bottom: 2px;
  }

  .topbar.in-app .account-actions {
    justify-content: flex-end;
  }

  .brand-logo {
    width: 112px;
  }

  .dashboard-heading,
  .attention-band,
  .difference,
  .onboarding-action {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-heading > button,
  .attention-band > button,
  .onboarding-action > button {
    width: 100%;
  }

  .evidence-grid,
  .debug-grid {
    grid-template-columns: 1fr;
  }

  .row-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .row-card > strong:last-child {
    grid-column: 1 / -1;
    text-align: left;
  }

  .review-title,
  .read-only-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .amount {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .public-topbar {
    align-items: stretch;
    display: grid;
    gap: 10px;
  }

  .public-links {
    justify-content: space-between;
  }

  .public-links > a {
    display: none;
  }

  .public-links > button {
    flex: 1;
  }

  .beta-badge {
    font-size: 10px;
  }

  .hero-copy h1 {
    font-size: 43px;
  }

  .preview-metrics,
  .metric-grid,
  .stepper {
    grid-template-columns: 1fr;
  }

  .stepper li {
    border-bottom: 0;
    border-left: 3px solid var(--line);
    padding: 4px 0 4px 10px;
  }

  .connection-head {
    align-items: start;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .connection-head .status-pill {
    grid-column: 1 / -1;
  }

  .connection-panel > button,
  .connection-buttons > button,
  .calendar-picker > button {
    width: 100%;
  }

  .caught-up {
    align-items: flex-start;
    flex-direction: column;
  }

  .mini-card,
  .section-title,
  .amount-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .amount-row strong {
    text-align: left;
  }

  .card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .row-card {
    grid-template-columns: 1fr;
  }

  .row-card > strong:last-child {
    grid-column: auto;
  }

  .settings-list div {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
