:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --panel: #ffffff;
  --text: #1d252c;
  --muted: #68737d;
  --line: #dfe4e8;
  --accent: #167a6b;
  --accent-soft: #dff3ef;
  --sidebar: #24313a;
  --muri-teal: #00c5b4;
  --muri-teal-dark: #00a298;
  --muri-blue: #1a71a2;
  --muri-blue-dark: #125682;
  --muri-navy: #0c2e4d;
  --muri-ink: #06182a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-body {
  background: #f7fbfb;
  color: var(--muri-ink);
}

.is-hidden {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.auth-panel .brand {
  color: var(--text);
  margin-bottom: 26px;
}

.auth-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  color: #fff;
  padding: 22px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--accent);
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d7dee3;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.nav-icon {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #b9f2eb;
}

.nav-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav a.active,
.nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav a.active .nav-icon,
.nav a:hover .nav-icon {
  background: var(--muri-teal-dark);
  border-color: var(--muri-teal);
  color: #fff;
}

.main {
  padding: 28px;
  min-width: 0;
}

.topbar,
.panel-header,
.topbar-actions,
.metrics,
.workspace,
.report-grid,
.form-grid {
  display: grid;
  gap: 16px;
}

.topbar {
  grid-template-columns: 1fr auto;
  align-items: end;
  margin-bottom: 22px;
}

.topbar-actions {
  grid-template-columns: 180px 180px 150px auto auto auto;
  align-items: center;
}

.button-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.status-line {
  min-height: 20px;
  font-size: 13px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.2;
}

h2 {
  font-size: 16px;
}

p,
small {
  color: var(--muted);
}

button,
select,
input,
textarea {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

button {
  padding: 0 14px;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.small-button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.secondary-button {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}

.danger-button {
  background: #a23a32;
  border-color: #a23a32;
}

select,
input,
textarea {
  padding: 0 10px;
}

textarea {
  min-height: 140px;
  padding: 10px;
  resize: vertical;
}

.compact-input {
  width: 92px;
}

.metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.setup-checklist {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.checklist-grid span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.checklist-grid i {
  display: grid;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 1px solid #c9d2d8;
  border-radius: 999px;
}

.checklist-grid span.is-complete {
  color: var(--text);
  background: #f1faf8;
  border-color: #bde7df;
}

.checklist-grid span.is-complete i {
  background: var(--muri-teal-dark);
  border-color: var(--muri-teal-dark);
}

.checklist-grid span.is-complete i::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.metrics article,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metrics article {
  padding: 16px;
  display: grid;
  gap: 6px;
  overflow: hidden;
}

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

.metric-card {
  min-height: 154px;
  align-content: start;
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric-icon,
.source-dot,
.empty-state i {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-style: normal;
  font-weight: 700;
}

.metric-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 12px;
}

.metric-icon-visitors {
  background: #dff3ef;
  color: #106a5c;
}

.metric-icon-leads {
  background: #e7efff;
  color: #315fba;
}

.metric-icon-conversions {
  background: #e4f5e9;
  color: #2f7d46;
}

.metric-icon-revenue {
  background: #fff2d6;
  color: #9a6500;
}

.metric-icon-source {
  background: #eef2f3;
  color: #52606b;
}

.metric-bars {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 32px;
  margin-top: 8px;
}

.metric-bars i {
  display: block;
  width: 100%;
  min-width: 12px;
  border-radius: 4px 4px 0 0;
  opacity: 0.95;
}

.bar-tone-teal {
  background: #167a6b;
}

.bar-tone-blue {
  background: #4f77d0;
}

.bar-tone-green {
  background: #3f9658;
}

.bar-tone-amber {
  background: #d18b14;
}

.bar-tone-slate {
  background: #60717f;
}

.bar-step-1 {
  opacity: 0.72;
}

.bar-step-2 {
  opacity: 0.42;
}

.workspace {
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  margin-bottom: 18px;
}

.traffic-mix {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.mix-strip {
  display: flex;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f3;
}

.mix-strip i {
  display: block;
  min-width: 8px;
}

.mix-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px 12px;
}

.mix-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.mix-legend b {
  margin-left: auto;
  color: var(--text);
  font-weight: 700;
}

.install-guide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.report-grid {
  grid-template-columns: 1fr 1fr;
}

.visitor-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 18px;
  min-width: 0;
}

.panel-header {
  grid-template-columns: 1fr auto;
  align-items: start;
  margin-bottom: 14px;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #101820;
  color: #edf6f4;
  border-radius: 6px;
  padding: 14px;
  margin: 0 0 16px;
  font-size: 13px;
}

.form-grid {
  grid-template-columns: 1fr;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

td strong,
td small {
  display: block;
}

td small {
  margin-top: 4px;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover,
.selected-row {
  background: #f0f6f4;
}

.journey-preview {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.journey-preview strong {
  color: var(--text);
  font-size: 12px;
}

.journey-preview span {
  display: block;
}

.visitor-detail {
  display: grid;
  gap: 16px;
}

.detail-summary,
.detail-stats {
  display: grid;
  gap: 6px;
}

.detail-summary strong {
  font-size: 18px;
}

.detail-summary small,
.detail-stats small {
  color: var(--muted);
}

.detail-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-stats span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.detail-stats strong {
  display: block;
  font-size: 18px;
}

.timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.timeline time {
  color: var(--muted);
  font-size: 12px;
}

.timeline strong,
.timeline small {
  display: block;
}

.bar-row {
  display: grid;
  grid-template-columns: 150px 1fr 44px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
}

.bar-row span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bar-row div {
  height: 9px;
  background: #eef2f3;
  border-radius: 999px;
  overflow: hidden;
}

.bar-row i {
  display: block;
  height: 100%;
}

.bar-row b {
  text-align: right;
}

.source-dot {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #fff;
  font-size: 10px;
}

.source-search {
  background: #4f77d0;
}

.source-social {
  background: #7d61c8;
}

.source-email {
  background: #d18b14;
}

.source-referral {
  background: #3f9658;
}

.source-direct {
  background: #60717f;
}

.source-other {
  background: #167a6b;
}

.event-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.event-event {
  color: #106a5c;
  background: #eef9f6;
  border-color: #c9e8e2;
}

.event-lead {
  color: #315fba;
  background: #f0f5ff;
  border-color: #cdd9f6;
}

.event-conversion {
  color: #8a5b00;
  background: #fff7e6;
  border-color: #f2d79a;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 5px;
  padding: 18px;
  border: 1px dashed #ccd5db;
  border-radius: 8px;
  background: #fbfcfd;
}

.empty-state i {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #eef2f3;
  color: #52606b;
  font-size: 12px;
}

.empty-state strong {
  font-size: 14px;
}

.empty-state small {
  max-width: 360px;
  line-height: 1.4;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(247, 251, 251, 0.94);
  border-bottom: 1px solid rgba(12, 46, 77, 0.1);
  backdrop-filter: blur(12px);
}

.site-nav,
.hero-section,
.signal-band,
.content-section,
.feature-grid,
.cta-section,
.page-hero,
.contact-layout,
.site-footer,
.login-main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muri-ink);
  font-weight: 800;
  text-decoration: none;
}

.site-brand img {
  flex: 0 0 auto;
}

.site-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-links a,
.footer-links a {
  color: #31546a;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-links a:hover,
.footer-links a:hover {
  color: var(--muri-teal-dark);
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  gap: 56px;
  align-items: center;
  min-height: calc(100vh - 74px);
  padding: 70px 0;
}

.hero-copy {
  display: grid;
  gap: 22px;
}

.site-eyebrow {
  color: var(--muri-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1 {
  color: var(--muri-ink);
  font-size: clamp(42px, 7vw, 74px);
  line-height: 0.98;
  max-width: 820px;
}

.hero-copy p,
.page-hero p,
.split-section p,
.cta-section p {
  color: #39576a;
  font-size: 18px;
  line-height: 1.7;
  max-width: 680px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.site-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--muri-teal-dark);
  border-radius: 6px;
  background: var(--muri-teal-dark);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.secondary-site-button {
  background: #fff;
  color: var(--muri-ink);
  border-color: rgba(12, 46, 77, 0.18);
}

.attribution-visual {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(12, 46, 77, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 197, 180, 0.12), rgba(26, 113, 162, 0.08)),
    #fff;
  box-shadow: 0 18px 50px rgba(6, 24, 42, 0.12);
}

.flow-node {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(12, 46, 77, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.flow-node span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--muri-navy);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.flow-node.active span {
  background: var(--muri-teal-dark);
}

.flow-node strong {
  color: var(--muri-ink);
  font-size: 18px;
}

.flow-node small {
  color: #577082;
}

.flow-line {
  width: 2px;
  height: 28px;
  margin-left: 36px;
  background: linear-gradient(var(--muri-teal), var(--muri-blue));
}

.signal-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(12, 46, 77, 0.1);
  border-radius: 8px;
  background: rgba(12, 46, 77, 0.1);
}

.signal-band article {
  display: grid;
  gap: 8px;
  padding: 24px;
  background: #fff;
}

.signal-band strong {
  color: var(--muri-navy);
  font-size: 20px;
}

.signal-band span {
  color: #4e6879;
  line-height: 1.5;
}

.content-section,
.feature-grid,
.cta-section,
.page-hero,
.contact-layout {
  padding: 76px 0 0;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
  gap: 46px;
  align-items: start;
}

.split-section h2,
.cta-section h2 {
  color: var(--muri-ink);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.06;
  margin-top: 8px;
}

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

.feature-grid article,
.contact-form,
.contact-panel,
.login-card {
  border: 1px solid rgba(12, 46, 77, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(6, 24, 42, 0.08);
}

.feature-grid article {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--muri-teal-dark);
  color: #fff;
  font-weight: 800;
}

.feature-grid h3 {
  color: var(--muri-navy);
  font-size: 20px;
  margin: 0;
}

.feature-grid p {
  color: #4e6879;
  line-height: 1.6;
}

.cta-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 70px;
}

.page-hero {
  display: grid;
  gap: 14px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 78px;
}

.contact-form,
.login-card {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.contact-form button,
.login-card button {
  background: var(--muri-teal-dark);
  border-color: var(--muri-teal-dark);
  font-weight: 800;
}

.form-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.contact-panel h2 {
  color: var(--muri-navy);
  margin: 0;
}

.contact-panel ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
  color: #4e6879;
  line-height: 1.5;
}

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

.login-main {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 74px);
  padding: 44px 0;
}

.login-card {
  width: min(430px, 100%);
}

.login-card h1 {
  color: var(--muri-ink);
  font-size: 32px;
  line-height: 1.1;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0 40px;
  border-top: 1px solid rgba(12, 46, 77, 0.1);
}

.site-footer p {
  max-width: 430px;
  margin-top: 10px;
  color: #577082;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: start;
}

@media (max-width: 900px) {
  .app-shell,
  .topbar,
  .workspace,
  .visitor-layout,
  .report-grid,
  .metrics,
  .setup-checklist,
  .checklist-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 14px;
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav a {
    justify-content: flex-start;
    padding: 9px;
  }

  .nav-icon {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
  }

  .main {
    padding: 18px;
  }

  .topbar-actions {
    grid-template-columns: 1fr;
  }

  .site-nav,
  .site-footer,
  .cta-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-links {
    flex-wrap: wrap;
    gap: 14px;
  }

  .hero-section,
  .split-section,
  .feature-grid,
  .contact-layout,
  .signal-band {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
    padding: 48px 0;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 42px;
  }
}
