:root {
  --ink: #172033;
  --muted: #617087;
  --blue: #255a91;
  --blue-dark: #163d66;
  --cream: #fffbea;
  --paper: #f7f8fb;
  --line: #dde5ef;
  --teal: #0f9f8f;
  --green: #4d9c6b;
  --gold: #c7963d;
  --coral: #cf6f58;
  --white: #ffffff;
  --shadow: 0 18px 48px rgba(23, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.shell {
  min-height: 100vh;
}

.hero {
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(22, 61, 102, 0.98), rgba(37, 90, 145, 0.96) 52%, rgba(15, 159, 143, 0.9)),
    radial-gradient(circle at 82% 18%, rgba(255, 251, 234, 0.22), transparent 28%);
  padding: 22px 28px 30px;
}

.topbar,
.hero-inner,
.content,
.sticky-nav-inner {
  width: min(1320px, 100%);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 34px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  width: 124px;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.2));
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-kicker,
.eyebrow,
.label,
.table-note,
.small-label {
  letter-spacing: 0;
}

.brand-kicker {
  color: rgba(255, 251, 234, 0.78);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
}

.report-pill {
  border: 1px solid rgba(255, 251, 234, 0.32);
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 10px;
  color: rgba(255, 251, 234, 0.82);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 880px;
  font-size: clamp(42px, 6vw, 84px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 248, 251, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.sticky-nav-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 28px;
}

.nav-link {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--blue-dark);
  background: var(--white);
  outline: none;
}

.content {
  padding: 26px 28px 70px;
}

.section {
  margin-top: 28px;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 40px);
  letter-spacing: 0;
}

.section-header p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
}

.section-note {
  margin: -2px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid > * {
  min-width: 0;
}

.kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
}

.two-col {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.metric,
.table-wrap,
.methodology,
.takeaway,
.service-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.06);
}

.panel,
.methodology,
.takeaway,
.service-panel {
  padding: 20px;
}

.metric {
  display: grid;
  grid-template-rows: 34px auto minmax(34px, auto);
  align-content: start;
  min-height: 128px;
  padding: 18px;
}

.metric-clickable {
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.metric-clickable:hover,
.metric-clickable:focus-visible {
  border-color: rgba(37, 90, 145, 0.45);
  box-shadow: 0 14px 34px rgba(23, 32, 51, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.metric .label,
.small-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  align-self: end;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.metric em {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.accent-blue {
  border-top: 4px solid var(--blue);
}

.accent-teal {
  border-top: 4px solid var(--teal);
}

.accent-gold {
  border-top: 4px solid var(--gold);
}

.accent-coral {
  border-top: 4px solid var(--coral);
}

.accent-green {
  border-top: 4px solid var(--green);
}

.takeaway h3,
.panel h3,
.service-panel h3,
.methodology h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.takeaway ul,
.methodology ul,
.next-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.takeaway li,
.methodology li,
.next-list li {
  margin: 8px 0;
}

.bar-list {
  display: grid;
  gap: 11px;
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.bar-top span:first-child {
  font-weight: 700;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef5;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.weekly-column-chart {
  display: grid;
  gap: 16px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  padding: 7px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.legend-toggle.active {
  border-color: rgba(37, 90, 145, 0.28);
  color: var(--ink);
  background: #f5f8fb;
}

.legend-toggle:not(.active) {
  opacity: 0.48;
}

.legend-toggle:hover,
.legend-toggle:focus-visible {
  border-color: var(--blue);
  outline: none;
}

.legend-toggle i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.weekly-plot {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  min-height: 282px;
  padding-top: 8px;
}

.weekly-axis {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 70px;
  height: 1px;
  background: var(--line);
}

.weekly-column {
  position: relative;
  display: grid;
  grid-template-rows: auto 180px auto auto;
  gap: 7px;
  min-width: 0;
  text-align: center;
}

.weekly-column > strong {
  color: var(--ink);
  font-size: 18px;
}

.weekly-column > span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.weekly-column > em {
  min-height: 40px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.2;
}

.weekly-bar {
  display: flex;
  align-items: end;
  justify-self: center;
  min-width: 0;
  width: min(100%, 138px);
  height: 180px;
  overflow: hidden;
}

.weekly-fill {
  display: flex;
  flex-direction: column-reverse;
  width: 100%;
  height: var(--bar-height);
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  transition: height 180ms ease;
}

.weekly-segment {
  display: block;
  width: 100%;
}

.weekly-segment.is-hidden {
  display: none;
}

.segment-sma {
  background: var(--teal);
}

.segment-ppc {
  background: var(--blue);
}

.segment-gbp {
  background: var(--gold);
}

.segment-other {
  background: var(--coral);
}

.context-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.context-item {
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: #f5f8fb;
  padding: 11px 12px;
}

.context-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.context-item strong {
  display: block;
  margin-top: 3px;
}

.context-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.subsection {
  display: grid;
  gap: 10px;
}

.subsection h4 {
  margin: 0;
  font-size: 15px;
}

.single-column-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--column-count, 6), minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  min-height: 238px;
  padding: 12px 0 0;
}

.single-column-chart::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 56px;
  left: 0;
  height: 1px;
  background: var(--line);
}

.single-column {
  display: grid;
  grid-template-rows: 164px auto auto;
  gap: 7px;
  min-width: 0;
  text-align: center;
}

.single-column > span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.single-column em {
  min-height: 28px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.2;
}

.single-bar {
  position: relative;
  justify-self: center;
  width: min(100%, 110px);
  height: 164px;
  border-radius: 8px;
  background: transparent;
}

.single-bar strong {
  position: absolute;
  right: 0;
  bottom: calc(var(--bar-height) + 8px);
  left: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
}

.single-bar span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  height: var(--bar-height);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--teal), var(--blue));
}

.trend-bars {
  display: grid;
  gap: 9px;
}

.trend-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
}

.trend-row div:first-child {
  min-width: 0;
}

.trend-row strong {
  font-size: 13px;
}

.trend-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.trend-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef5;
}

.trend-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

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

.control-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.control-btn[aria-pressed="true"] {
  border-color: var(--blue);
  color: var(--white);
  background: var(--blue);
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: var(--muted);
  background: #f3f6fa;
  font-size: 12px;
  text-transform: uppercase;
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

tr:last-child td {
  border-bottom: 0;
}

.clickable-row {
  cursor: pointer;
}

.lead-count-button {
  border: 0;
  border-radius: 999px;
  background: #eef5fb;
  color: var(--blue-dark);
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.lead-count-button:hover,
.lead-count-button:focus-visible {
  background: var(--blue);
  color: var(--white);
  outline: none;
}

.clickable-row:hover,
.clickable-row:focus-visible {
  background: #f5f8fb;
  outline: none;
}

.table-note {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.service-grid {
  display: grid;
  gap: 16px;
}

.service-panel {
  display: grid;
  gap: 15px;
}

.service-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.service-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--cream);
  color: var(--blue-dark);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.service-title {
  min-width: 0;
}

.service-title h3 {
  margin: 0;
}

.service-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
}

.mini-metric {
  display: grid;
  grid-template-rows: 30px auto;
  align-content: start;
  min-height: 86px;
  border-radius: 8px;
  background: #f5f8fb;
  padding: 11px;
}

.mini-metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.mini-metric strong {
  display: block;
  align-self: end;
  font-size: 20px;
  line-height: 1.05;
}

.insight {
  margin: 0;
  color: var(--ink);
}

.benchmark-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 0;
}

.benchmark-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.benchmark-panel summary::-webkit-details-marker {
  display: none;
}

.benchmark-panel summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eef5fb;
  color: var(--blue-dark);
  font-weight: 900;
}

.benchmark-panel[open] summary::after {
  content: "-";
}

.benchmark-panel summary:hover,
.benchmark-panel summary:focus-visible {
  background: #f5f8fb;
  outline: none;
}

.benchmark-panel summary span {
  font-size: 15px;
  font-weight: 900;
}

.benchmark-panel summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

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

.benchmark-panel > .table-note {
  margin: 0;
  padding: 0 14px 14px;
}

.benchmark-panel:not([open]) .benchmark-grid,
.benchmark-panel:not([open]) > .table-note {
  display: none;
}

.benchmark-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  border-radius: 8px;
  background: var(--white);
  padding: 12px;
}

.benchmark-card > span,
.benchmark-card p {
  grid-column: 1 / -1;
}

.benchmark-card > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.benchmark-card strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.benchmark-card em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.benchmark-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.timeline {
  display: grid;
  gap: 9px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border-radius: 8px;
  background: #f5f8fb;
}

.timeline-item strong {
  display: block;
}

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

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

.phase {
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: #f5f8fb;
  padding: 15px;
}

.phase strong {
  display: block;
  font-size: 28px;
}

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

.footer {
  margin-top: 34px;
  padding: 22px 0 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(23, 32, 51, 0.42);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: min(920px, 100%);
  max-height: min(82vh, 860px);
  overflow: auto;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 24px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.modal h3 {
  margin: 8px 40px 10px 0;
  font-size: 24px;
}

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

.modal ul {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.modal li {
  margin: 8px 0;
}

#lead-modal-table {
  margin-top: 18px;
}

@media (max-width: 1080px) {
  .two-col,
  .service-grid {
    grid-template-columns: 1fr;
  }
  .mini-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 18px 16px 26px;
  }

  .content {
    padding: 20px 16px 48px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 24px;
  }

  .brand-logo {
    width: 98px;
  }

  .three-col,
  .phase-grid,
  .mini-metrics,
  .benchmark-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .sticky-nav-inner {
    padding-inline: 16px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .weekly-plot {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 18px;
  }

  .single-column-chart {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 18px;
  }

  .weekly-column {
    grid-template-rows: auto 130px auto auto;
  }

  .single-column {
    grid-template-rows: 132px auto auto;
  }

  .weekly-bar {
    height: 130px;
  }

  .single-bar {
    height: 132px;
  }

  .weekly-axis {
    display: none;
  }

  .trend-row {
    grid-template-columns: 92px minmax(0, 1fr) 28px;
  }

  .table-wrap {
    overflow-x: auto;
  }

  th,
  td {
    white-space: nowrap;
  }
}
