:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --ink: #1a1d21;
  --muted: #667085;
  --line: #e3e6ea;
  --brand: #2563eb;
  --good: #0f9d58;
  --bad: #d93025;
  --warn: #f29900;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 24px;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 28px 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }

a { color: var(--brand); }

.container { max-width: 1400px; margin: 0 auto; }
.narrow { max-width: 720px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.subtitle { color: var(--muted); margin: 0 0 20px; }

label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }

input[type=date], input[type=file], select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  margin-bottom: 16px;
}

button {
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button:hover:not(:disabled) { filter: brightness(1.08); }
button:disabled { background: #c3c8d0; cursor: not-allowed; }
button.secondary { background: #eef1f5; color: var(--ink); }

.row:not(footer .row) { display: flex; gap: 16px; flex-wrap: wrap; }
.row:not(footer .row) > * { flex: 1 1 240px; }

/* Stat cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.stat-value { font-size: 24px; font-weight: 700; margin-top: 6px; }
.stat-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

.improved, .up { color: var(--good); font-weight: 600; }
.declined, .down { color: var(--bad); font-weight: 600; }
.same { color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #fafbfc; font-weight: 600; position: sticky; top: 0; cursor: pointer; white-space: nowrap; }
th:hover { background: #f0f2f5; }
tbody tr:hover { background: #fafbfc; }
td.num, th.num { text-align: right; white-space: nowrap; }
.url-cell { min-width: 300px; max-width: 320px; word-break: break-all; font-size: 13px; }

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-good { background: #e3f5e9; color: #0b6b3a; }
.badge-bad { background: #fde8e6; color: #a5150b; }
.badge-warn { background: #fef4e0; color: #96620a; }
.badge-muted { background: #eef1f5; color: var(--muted); }

/* Status / messages */
.msg { padding: 12px 14px; border-radius: 8px; margin: 12px 0; font-size: 14px; }
.msg-error { background: #fde8e6; color: #a5150b; }
.msg-success { background: #e3f5e9; color: #0b6b3a; }
.msg-info { background: #e8f0fe; color: #1246a0; }
.msg-warn { background: #fef4e0; color: #96620a; }

/* Progress */
.progress-track { height: 10px; background: #e8ebef; border-radius: 999px; overflow: hidden; margin: 12px 0 8px; }
.progress-bar { height: 100%; background: var(--brand); width: 0%; transition: width .4s ease; }

/* Nav */
.nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.nav a {
  padding: 8px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}
.nav a:hover { background: #f0f2f5; }
.nav a.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters input[type=text], .filters select { width: auto; min-width: 180px; margin-bottom: 0; }

.no-data { text-align: center; margin-top: 80px; color: var(--muted); }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

.chart-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }

/* Branding */
.brand-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  margin: -24px -24px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand-bar a { text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-logo-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
  flex-shrink: 0;
}
.brand-name { font-weight: 700; font-size: 16px; color: var(--ink); }

/* Scope badge: makes "whole domain" vs "mapped URLs only" impossible to miss */
.scope-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  vertical-align: middle;
}
.scope-badge.mapped { background: #e8f0fe; color: #1246a0; }
.scope-badge.domain { background: #eef1f5; color: var(--muted); }

/* Critical severity (above high) */
.badge-critical { background: #7f1d1d; color: #fff; }
.risk-critical { color: #7f1d1d; font-weight: 700; }

/* ===========================================================================
   Marketing site (home / about / privacy / contact)
   Namespaced under .mkt- so nothing here collides with the app's own styles.
   =========================================================================== */

.mkt-body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: #0f172a;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.mkt-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid #eceef2;
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  z-index: 50;
}
.mkt-nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mkt-nav-links { display: flex; align-items: center; gap: 28px; }
.mkt-nav-links a { color: #45506b; text-decoration: none; font-size: 15px; font-weight: 500; }
.mkt-nav-links a:hover { color: #0f172a; }
.mkt-nav-cta {
  background: #2563eb; color: #fff; text-decoration: none;
  padding: 10px 20px; border-radius: 8px; font-weight: 600; font-size: 14px;
}
.mkt-nav-cta:hover { filter: brightness(1.08); }

.mkt-section { padding: 88px 32px; }
.mkt-section.alt { background: #f8f9fc; }
.mkt-inner { max-width: 1080px; margin: 0 auto; }
.mkt-narrow { max-width: 720px; margin: 0 auto; }

.mkt-eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #b45309; background: #fef3e8; padding: 5px 12px; border-radius: 999px;
  margin-bottom: 18px;
}
.mkt-h1 { font-size: 52px; line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 20px; color: #0b1120; }
.mkt-h2 { font-size: 34px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 14px; color: #0b1120; }
.mkt-lede { font-size: 19px; line-height: 1.6; color: #45506b; margin: 0 0 32px; }

.mkt-hero { padding: 100px 32px 40px; text-align: center; }
.mkt-hero-actions { display: flex; gap: 14px; justify-content: center; margin-bottom: 64px; }
.mkt-btn-primary {
  background: #2563eb; color: #fff; text-decoration: none; font-weight: 700; font-size: 16px;
  padding: 15px 26px; border-radius: 9px; display: inline-block;
}
.mkt-btn-primary:hover { filter: brightness(1.08); }
.mkt-btn-secondary {
  background: #fff; color: #0f172a; text-decoration: none; font-weight: 600; font-size: 16px;
  padding: 15px 26px; border-radius: 9px; border: 1px solid #dbe0ea; display: inline-block;
}
.mkt-btn-secondary:hover { background: #f8f9fc; }

/* Signature element: the recovery curve, styled like the product's own
   timeline chart — go-live split, amber "before", blue "after". This is the
   product's actual chart language, not a decorative stock illustration. */
.mkt-curve-wrap {
  max-width: 920px; margin: 0 auto; background: #0b1120; border-radius: 20px;
  padding: 40px 40px 30px; text-align: left;
}
.mkt-curve-caption { color: #94a3b8; font-size: 13px; margin-top: 14px; display: flex; justify-content: space-between; }
.mkt-curve-callout { fill: #fff; font-weight: 700; }

.mkt-metric-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: #eceef2; border: 1px solid #eceef2; border-radius: 14px; overflow: hidden;
  max-width: 900px; margin: 0 auto;
}
.mkt-metric { background: #fff; padding: 26px 20px; text-align: center; }
.mkt-metric-label { font-size: 13px; color: #74809b; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.mkt-metric-sub { font-size: 14px; color: #45506b; margin-top: 6px; }

.mkt-steps { display: grid; gap: 28px; }
.mkt-step { display: flex; gap: 24px; align-items: flex-start; }
.mkt-step-num {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px;
  background: #eaf0fe; color: #2563eb; font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.mkt-step-title { font-weight: 700; font-size: 18px; margin: 0 0 4px; color: #0b1120; }
.mkt-step-body { color: #45506b; margin: 0; font-size: 15px; }

.mkt-grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.mkt-card {
  background: #fff; border: 1px solid #eceef2; border-radius: 14px; padding: 24px;
}
.mkt-card-title { font-weight: 700; font-size: 16px; margin: 0 0 8px; color: #0b1120; }
.mkt-card-body { font-size: 14px; color: #56607a; margin: 0; line-height: 1.55; }

.mkt-accuracy-list { display: grid; gap: 18px; }
.mkt-accuracy-item { display: flex; gap: 14px; }
.mkt-check {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: #dcfce7; color: #16a34a; font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}

.mkt-cta-banner {
  background: #0b1120; border-radius: 22px; padding: 64px 40px; text-align: center;
  max-width: 1000px; margin: 0 auto;
}
.mkt-cta-banner .mkt-h2 { color: #fff; }
.mkt-cta-banner p { color: #b6c0d6; }

.mkt-footer { padding: 48px 32px 32px; border-top: 1px solid #eceef2; }
.mkt-footer-inner {
  max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 16px;
}
.mkt-footer-links { display: flex; gap: 22px; }
.mkt-footer-links a { color: #56607a; text-decoration: none; font-size: 14px; }
.mkt-footer-links a:hover { color: #0f172a; }
.mkt-footer-copy { color: #94a3b8; font-size: 13px; }

.mkt-legal { max-width: 760px; margin: 0 auto; padding: 64px 32px 100px; }
.mkt-legal h2 { font-size: 22px; margin: 40px 0 12px; color: #0b1120; }
.mkt-legal h2:first-of-type { margin-top: 0; }
.mkt-legal p, .mkt-legal li { color: #45506b; font-size: 15.5px; line-height: 1.7; }
.mkt-legal ul { padding-left: 20px; }
.mkt-legal-updated { color: #94a3b8; font-size: 14px; margin-top: -8px; }

.mkt-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 720px) {
  .mkt-h1 { font-size: 36px; }
  .mkt-hero { padding: 64px 20px 24px; }
  .mkt-section { padding: 56px 20px; }
  .mkt-metric-strip { grid-template-columns: repeat(2, 1fr); }
  .mkt-contact-grid { grid-template-columns: 1fr; }
  .mkt-nav-links { display: none; }
}

/* Health dashboard: status-specific colours */
.status-excellent, .status-good {
  color: #155724; background-color: #d4edda;
}
.status-on-track, .status-early-stage {
  color: #0c5460; background-color: #d1ecf1;
}
.status-monitoring-required {
  color: #856404; background-color: #fff3cd;
}
.status-concerning, .status-urgent-attention-needed {
  color: #721c24; background-color: #f8d7da;
}
.status-pill {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: .3px;
}

/* Health dashboard: milestone cards */
.milestone-card {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.milestone-card.achieved { background-color: #d4edda; }
.milestone-card.high     { background-color: #e8f5e8; }
.milestone-card.medium   { background-color: #fff3cd; }
.milestone-card.low      { background-color: #f8d7da; }

/* Health dashboard: business impact alert */
.business-impact-alert {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  color: #856404;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.business-impact-alert::before {
  content: "⚠️";
  font-size: 20px;
  line-height: 1;
}

/* Health dashboard: confidence colours */
.confidence-high   { color: #28a745; font-weight: 700; }
.confidence-medium { color: #b8860b; font-weight: 700; }
.confidence-low     { color: #dc3545; font-weight: 700; }

/* Health dashboard: risk severity (in addition to badge- classes) */
.risk-high   { color: #dc3545; }
.risk-medium { color: #fd7e14; }
.risk-low    { color: #28a745; }

/* Health dashboard: hoverable cards */
.health-card {
  transition: box-shadow .15s ease, transform .15s ease;
}
.health-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
