:root {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #17202a;
  background: #f4f6f8;
  --ink: #17202a;
  --muted: #64748b;
  --line: #d8dee6;
  --panel: #ffffff;
  --navy: #12253b;
  --blue: #0f5b9d;
  --teal: #087f73;
  --amber: #9a5b00;
  --red: #a02c2c;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--blue); }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 10; background: #fff; padding: 8px 12px; }
.skip-link:focus { left: 12px; }
.topbar { min-height: 56px; background: var(--navy); color: #fff; }
.topbar-inner { max-width: 1240px; min-height: 56px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 12px; }
.brand { color: #fff; text-decoration: none; font-weight: 750; letter-spacing: .01em; }
.brand-sub { color: #b8c7d7; font-size: 12px; }
.env { color: #f5c76b; font-size: 12px; margin-left: auto; text-transform: uppercase; }
.topbar-link { color: #d9efff; font-size: 12px; text-decoration: none; border: 1px solid #50718f; padding: 6px 9px; border-radius: 4px; }
.container { max-width: 1240px; margin: 0 auto; padding: 30px 20px 70px; }
h1 { font-size: 30px; line-height: 1.15; margin: 0 0 7px; letter-spacing: 0; }
h2 { font-size: 17px; line-height: 1.3; margin: 0 0 14px; letter-spacing: 0; }
h3 { font-size: 15px; margin: 8px 0 6px; }
p { line-height: 1.6; }
.eyebrow { color: var(--teal); font-size: 12px; font-weight: 700; margin: 0 0 6px; text-transform: uppercase; }
.page-head, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.page-head { margin-bottom: 20px; }
.page-head p, .section-head span, .hint { margin: 0; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.switch-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.switch-chip.on { color: #17623d; background: #e8f3ec; border-color: #a8d3b6; }
.switch-chip.off { color: #7d4d00; background: #fff6df; border-color: #e8cc8c; }
.workbench-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #eaf3f5; border: 1px solid #c7dfe2; padding: 13px 15px; margin-bottom: 10px; }
.intro-copy { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.intro-copy strong { font-size: 14px; }
.intro-copy span { color: #48616b; font-size: 13px; }
.intro-status { display: flex; gap: 7px; align-items: center; color: #3f5964; font-size: 12px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--teal); }
.dot.amber { background: #c47c00; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 6px; overflow-x: auto; position: sticky; top: 0; z-index: 2; background: #f4f6f8; }
.tabs a { padding: 12px 0 10px; color: #475569; text-decoration: none; white-space: nowrap; font-size: 13px; }
.tabs a:hover, .tabs a:focus { color: var(--blue); }
.section { padding: 25px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 55px; }
.section-kicker { color: var(--teal) !important; font-size: 12px !important; font-weight: 700; }
.metrics { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.metric { background: var(--panel); padding: 13px 14px; min-height: 82px; }
.metric span, .metric strong { display: block; }
.metric span { font-size: 12px; color: var(--muted); }
.metric strong { font-size: 25px; margin-top: 8px; color: var(--ink); }
.notice { background: #e8f3ec; border-left: 3px solid #25814e; padding: 11px 14px; margin-bottom: 16px; }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.action-card { display: grid; gap: 5px; min-height: 144px; padding: 15px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--teal); color: var(--ink); text-decoration: none; }
.action-card:hover, .action-card:focus { border-color: #7ab9b7; box-shadow: 0 2px 7px rgba(18, 37, 59, .08); }
.action-index { color: var(--teal); font-size: 12px; font-weight: 800; }
.action-card strong { font-size: 15px; }
.action-card small { color: var(--muted); line-height: 1.5; }
.action-link, .card-link { color: var(--blue); font-size: 12px; font-weight: 650; margin-top: auto; }
.inline-form { display: grid; grid-template-columns: 2fr 1fr 1.3fr 1.6fr auto; align-items: end; gap: 12px; }
.inline-form label, .login label { display: grid; gap: 5px; font-size: 13px; }
.check { display: flex !important; align-items: center; min-height: 38px; }
.check input { width: auto; }
.inline-form input, .inline-form select, .action-row input, .login input { width: 100%; height: 38px; border: 1px solid #b8c2cc; border-radius: 4px; background: #fff; padding: 0 9px; font: inherit; }
button, .cta { min-height: 38px; border: 0; border-radius: 4px; background: var(--blue); color: #fff; padding: 8px 14px; font: inherit; text-decoration: none; cursor: pointer; }
button:hover, button:focus, .cta:hover, .cta:focus { background: #0b477b; }
.button-subtle { background: #e8eef4; color: #18354f; }
.button-subtle:hover, .button-subtle:focus { background: #dbe5ee; }
.button-danger { background: transparent; color: var(--red); border: 1px solid #d8aaaa; margin-left: 5px; }
.button-danger:hover, .button-danger:focus { background: #fbecec; color: var(--red); }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--panel); font-size: 13px; }
th, td { text-align: left; border-bottom: 1px solid #e2e8f0; padding: 10px; vertical-align: top; }
th { background: #edf2f6; color: #475569; font-weight: 650; white-space: nowrap; }
td a { color: var(--blue); }
.actions form { display: flex; white-space: nowrap; }
.actions button { min-height: 30px; padding: 4px 8px; font-size: 12px; }
.status, .readiness { display: inline-block; font-size: 12px; }
.status-auto_send, .status-active, .ready { color: #1d6b43; }
.status-suppress, .status-paused, .missing { color: var(--red); }
.neutral { color: #536273; }
.muted { color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.details { display: grid; grid-template-columns: 120px 1fr; gap: 10px; margin: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.score { font-size: 32px; }
.action-row { display: flex; gap: 8px; flex-wrap: wrap; }
.action-row input { max-width: 320px; }
.mail-preview { white-space: pre-wrap; background: var(--panel); border: 1px solid var(--line); padding: 20px; line-height: 1.65; }
.login { max-width: 360px; margin: 80px auto; background: var(--panel); border: 1px solid var(--line); padding: 24px; border-radius: 6px; display: grid; gap: 16px; }
.error, .warning { color: var(--red); }
.sample { max-width: 680px; margin: 0 auto; background: var(--panel); padding: 32px; border: 1px solid #e2e6ea; border-radius: 8px; }
.quote { border-left: 3px solid #1769aa; background: #f3f7fb; padding: 16px; margin: 24px 0; }
.lead-form { display: grid; gap: 12px; margin-top: 28px; }
.lead-form label { display: grid; gap: 5px; font-size: 14px; }
.lead-form input, .lead-form select, .lead-form textarea { border: 1px solid #c9d1d9; border-radius: 4px; padding: 9px; font: inherit; }
.consent { display: flex !important; align-items: center; gap: 8px; }
.integration-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.integration-card { display: flex; flex-direction: column; min-height: 190px; padding: 14px; background: var(--panel); border: 1px solid var(--line); }
.integration-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.integration-kind { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.integration-card p { color: #52606d; font-size: 12px; line-height: 1.55; margin: 0 0 9px; }
.integration-card small { color: var(--muted); line-height: 1.45; }
.card-link { margin-top: 10px; }
@media (max-width: 1050px) {
  .metrics { grid-template-columns: repeat(4, minmax(110px, 1fr)); }
  .integration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .inline-form { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; }
  .actions button { display: block; }
}
@media (max-width: 600px) {
  .container { padding: 22px 12px 52px; }
  .topbar-inner { padding: 0 12px; }
  .brand-sub { display: none; }
  .page-head { display: block; }
  .page-actions { margin-top: 13px; }
  .workbench-intro { display: block; }
  .intro-status { margin-top: 8px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .action-grid, .integration-grid { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr; }
  .sample { padding: 20px; }
  .details { grid-template-columns: 1fr; }
  .section { padding: 19px 0; }
}
