:root {
  color-scheme: light;
  --ink: #202922;
  --muted: #69756e;
  --line: #dce3dc;
  --paper: #f5f7f4;
  --panel: #ffffff;
  --green: #245842;
  --green-soft: #e8f1eb;
  --amber-soft: #fbf2dc;
  --red: #9b3d36;
  --red-soft: #faeae8;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 15px; line-height: 1.5; }
a { color: inherit; }
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { font-size: 17px; font-weight: 700; text-decoration: none; letter-spacing: -.02em; }
.wordmark span { color: var(--muted); font-weight: 400; }
.header-note, .header-link { color: var(--muted); font-size: 13px; text-decoration: none; }
.header-link:hover, .text-link:hover { text-decoration: underline; }
.page-space { padding-top: 38px; padding-bottom: 48px; }
.narrow-page { max-width: 860px; }
.intro-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 7px; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .1em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 9px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -.04em; line-height: 1.12; }
h2 { margin-bottom: 8px; font-size: 20px; letter-spacing: -.025em; }
.intro-copy { max-width: 650px; margin-bottom: 0; color: var(--muted); }
.demo-status { display: flex; align-items: flex-start; gap: 11px; min-width: 230px; padding: 13px 15px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.status-dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: #4f8b69; flex: none; }
.demo-status strong, .demo-status small { display: block; }
.demo-status strong { font-size: 13px; }
.demo-status small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.metric { min-height: 120px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; }
.metric span, .metric small { display: block; color: var(--muted); font-size: 13px; }
.metric strong { display: block; margin: 4px 0 3px; font-size: 27px; letter-spacing: -.035em; }
.metric small { font-size: 11px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; }
.simulation { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 22px; margin-bottom: 18px; }
.simulation h2 { margin-bottom: 4px; }
.simulation p { margin-bottom: 0; }
.simulation .small { max-width: 680px; margin-top: 7px; }
.simulation-actions { display: flex; gap: 9px; flex: none; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(295px, .9fr); align-items: start; gap: 18px; margin-bottom: 18px; }
.leads-panel, .form-panel, .outbox-panel, .detail-panel { padding: 21px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading .eyebrow { margin-bottom: 3px; }
.count-pill { padding: 4px 9px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 10px 10px 9px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; white-space: nowrap; }
td { padding: 12px 10px; border-top: 1px solid #edf0ed; vertical-align: top; font-size: 12px; }
.lead-name { display: block; font-weight: 700; text-decoration: none; white-space: nowrap; }
.cell-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 20px; background: #eef1ee; color: #49564e; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge-new { background: var(--amber-soft); color: #765516; }
.badge-contacted { background: #e8eff7; color: #3d5f83; }
.badge-quoted { background: #eeeafa; color: #65529b; }
.badge-won { background: var(--green-soft); color: #285c3f; }
.badge-lost { background: var(--red-soft); color: var(--red); }
.text-link { color: var(--green); font-weight: 700; text-decoration: none; }
.form-panel h2 { margin-bottom: 5px; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.enquiry-form { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; }
.enquiry-form label, .status-form label { margin-top: 6px; font-size: 12px; font-weight: 700; }
.required { margin-left: 4px; color: var(--muted); font-size: 10px; font-weight: 400; }
input, select, textarea { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #cbd5cd; border-radius: 5px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #98b9a2; outline-offset: 1px; }
.consent-row { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 3px; color: var(--ink); font-size: 11px !important; font-weight: 400 !important; }
.consent-row input { width: 15px; min-height: 15px; height: 15px; margin: 2px 0 0; flex: none; }
.field-error { color: var(--red); font-size: 11px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 37px; padding: 8px 13px; border: 1px solid transparent; border-radius: 5px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.button-primary { background: var(--green); color: #fff; }
.button-primary:hover { background: #1b4935; }
.button-secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.button-secondary:hover { background: #f7f9f7; border-color: #b8c4bb; }
.button-danger { background: #fff; border-color: #e6c5c2; color: var(--red); }
.button-danger:hover { background: #fff7f6; }
.full-width { width: 100%; margin-top: 7px; }
.outbox-panel { margin-bottom: 18px; }
.outbox-panel td { overflow-wrap: anywhere; }
.delivery-label { display: inline-block; padding: 3px 7px; border-radius: 4px; background: var(--green-soft); color: #285c3f; font-size: 10px; font-weight: 700; white-space: nowrap; }
.delivery-failed { background: var(--red-soft); color: var(--red); }
.delivery-pending { background: var(--amber-soft); color: #765516; }
.notice { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 5px; font-size: 13px; }
.notice ul { margin: 6px 0 0; padding-left: 18px; }
.notice.success { background: var(--green-soft); border-color: #c5ddcb; color: #285c3f; }
.notice.error { background: #fff7f6; border-color: #e6c5c2; color: var(--red); }
.empty-state { margin: 20px 0 6px; color: var(--muted); font-size: 13px; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding-top: 13px; color: var(--muted); font-size: 11px; }
.detail-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.detail-panel { margin-bottom: 16px; }
.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 28px; margin: 18px 0 20px; }
.detail-list div { min-width: 0; }
.detail-list dt { margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 700; }
.message-box { padding: 13px 14px; background: #f7f9f7; border-radius: 5px; font-size: 12px; }
.message-box p { margin: 5px 0 0; white-space: pre-wrap; }
.action-row { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; margin: 15px 0 9px; }
.action-row form { margin: 0; }
.status-form { display: flex; align-items: end; gap: 8px; }
.status-form label { margin: 0; }
.status-form select { width: 130px; }
.timeline { margin: 20px 0 0; padding: 0 0 0 16px; list-style: none; border-left: 1px solid var(--line); }
.timeline-item { position: relative; padding: 0 0 24px 18px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { position: absolute; top: 4px; left: -21px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: var(--green); content: ''; }
.timeline-top { display: flex; justify-content: space-between; gap: 15px; font-size: 13px; }
.timeline-top time, .timeline-recipient { color: var(--muted); font-size: 11px; }
.timeline-subject { margin: 7px 0 2px; font-size: 12px; font-weight: 700; }
.timeline-recipient { margin: 0 0 9px; }
.email-body { margin: 0; padding: 12px; overflow-x: auto; background: #f7f9f7; border: 1px solid #edf0ed; border-radius: 5px; color: #36433a; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.optout-panel { margin-top: 32px; padding: 28px; }
.optout-panel h1 { font-size: 30px; }

@media (max-width: 850px) {
  .content-grid { grid-template-columns: 1fr; }
  .form-panel { order: -1; }
}
@media (max-width: 650px) {
  .wrap { width: min(100% - 24px, 1180px); }
  .page-space { padding-top: 26px; }
  .intro-row, .simulation { align-items: stretch; flex-direction: column; }
  .demo-status { min-width: 0; }
  .metrics { grid-template-columns: 1fr; gap: 9px; }
  .metric { min-height: auto; }
  .simulation-actions { flex-wrap: wrap; }
  .leads-panel, .form-panel, .outbox-panel, .detail-panel { padding: 16px; }
  .detail-list { grid-template-columns: 1fr; gap: 11px; }
  .detail-title, .site-footer { align-items: flex-start; flex-direction: column; }
  .timeline-top { flex-direction: column; gap: 2px; }
  .status-form { align-items: stretch; flex-direction: column; }
}
