:root {
  --bg: #131f28;
  --panel: #1c2b39;
  --panel-soft: #223446;
  --text: #f4f8fb;
  --muted: #94a5b3;
  --faint: #2b4052;
  --teal: #006c6e;
  --teal-bright: #13a4a6;
  --orange: #ff9d00;
  --line: #23a9a8;
}

* {
  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;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.topbar,
.site-row,
.metrics,
.report-head,
.chart-head {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  margin-bottom: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 25px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--bg);
  background: var(--orange);
  border-radius: 8px;
  font-weight: 900;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.nav {
  display: flex;
  gap: 34px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.site-row {
  gap: 12px;
  margin-bottom: 20px;
}

.account-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: -34px 0 16px auto;
  text-align: right;
}

.profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-initial {
  display: grid;
  place-items: center;
  color: var(--bg);
  background: var(--orange);
  font-size: 18px;
  font-weight: 900;
}

.account-identity {
  display: grid;
  gap: 2px;
}

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

.profile-editor {
  position: relative;
}

.profile-editor summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  text-decoration: underline;
  text-decoration-color: rgba(148, 165, 179, 0.45);
  text-underline-offset: 3px;
}

.profile-editor summary::-webkit-details-marker {
  display: none;
}

.profile-editor summary:hover {
  color: var(--text);
}

.profile-popover {
  position: absolute;
  z-index: 10;
  top: 28px;
  right: 0;
  width: min(540px, calc(100vw - 48px));
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  padding: 18px;
  text-align: left;
  background: var(--panel-soft);
  border: 1px solid rgba(148, 165, 179, 0.25);
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.profile-editor form {
  display: grid;
  gap: 14px;
}

.account-settings-section + .account-settings-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 165, 179, 0.2);
}

.account-settings-section h3 {
  margin: 0 0 14px;
  font-size: 17px;
}

.account-settings-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.account-settings-heading > div {
  display: grid;
  gap: 3px;
}

.account-settings-heading span,
.account-settings-heading small,
.field-hint {
  color: var(--muted);
  font-size: 12px;
}

.account-settings-heading strong {
  font-size: 20px;
}

.account-settings-heading small {
  max-width: 260px;
  line-height: 1.4;
  text-align: right;
}

.plan-upgrade-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 15px;
}

.plan-upgrade-links .button-link {
  min-height: 44px;
  text-align: center;
}

.account-plan-options {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}

.account-plan-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 11px 12px;
  background: rgba(19, 35, 52, 0.72);
  border-radius: 5px;
}

.account-plan-option.is-current {
  padding: 8px 9px;
  border: 3px solid var(--orange);
}

.account-plan-option > div {
  display: grid;
  gap: 3px;
}

.account-plan-option small {
  color: var(--muted);
  font-size: 12px;
}

.account-plan-option form {
  display: block;
}

.plan-current-text {
  color: var(--orange);
  font-size: 18px;
  font-weight: 900;
}

.plan-switch-link {
  appearance: none;
  padding: 0;
  color: var(--orange);
  background: none;
  border: 0;
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.plan-switch-link:hover,
.plan-switch-link:focus-visible {
  color: #ffc15b;
}

.field-hint {
  font-weight: 500;
}

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

.live-dot {
  width: 9px;
  height: 9px;
  background: #00d47e;
  border-radius: 50%;
}

.live-count {
  color: #c3d1db;
  font-weight: 700;
}

.spacer {
  flex: 1;
}

.ghost-button,
.icon-button,
.date-button,
.danger-button {
  min-height: 40px;
  color: #dce6ed;
  background: #182838;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  cursor: pointer;
}

.danger-button {
  color: #ffe5e5;
  background: #6f2424;
}

.danger-link {
  color: #ff9b9b;
  background: transparent;
  border: 0;
  padding: 8px 4px;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.icon-button {
  width: 40px;
  padding: 0;
}

.date-button {
  min-width: 142px;
  text-align: left;
}

.primary-button {
  min-height: 44px;
  color: var(--bg);
  background: var(--orange);
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
}

.wide {
  width: 100%;
}

.panel {
  background: var(--panel);
  border-radius: 4px;
}

.section-title {
  margin: 0;
  font-size: 30px;
}

.hero-panel {
  padding: 18px 22px 26px;
}

.metrics {
  gap: 0;
  margin-bottom: 22px;
}

.metrics article {
  flex: 1;
  min-width: 0;
  padding: 0 20px;
  border-left: 1px solid rgba(148, 165, 179, 0.45);
}

.metrics article:first-child {
  border-left: 0;
  padding-left: 0;
}

.metrics span,
.eyebrow,
.report-head a,
.chart-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  line-height: 1;
}

.metrics em {
  margin-left: 8px;
  color: #28d796;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.chart-head {
  justify-content: space-between;
  margin-bottom: 8px;
  text-transform: none;
}

.chart {
  height: 335px;
}

.chart svg {
  width: 100%;
  height: 100%;
}

.grid line {
  stroke: rgba(148, 165, 179, 0.12);
  stroke-width: 1;
}

.traffic-bar {
  stroke-linecap: butt;
  transition: y2 180ms ease;
}

.pageview-bar {
  stroke: rgba(45, 126, 207, 0.38);
}

.visit-bar {
  stroke: #2e86de;
}

.traffic-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.chart-legend,
.chart-legend span {
  display: flex;
  align-items: center;
}

.chart-legend {
  gap: 18px;
}

.chart-legend span {
  gap: 7px;
}

.legend-swatch {
  display: inline-block;
  width: 18px;
  height: 7px;
  background: #2e86de;
}

.pageview-swatch {
  background: rgba(45, 126, 207, 0.38);
}

.ai-panel {
  margin-top: 24px;
  padding: 28px;
}

.auth-shell {
  min-height: 100vh;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 52px;
  align-items: start;
}

.auth-copy h1,
.empty-dashboard h1 {
  margin: 0;
  max-width: 720px;
  font-size: 52px;
  line-height: 1.08;
}

.auth-copy p:not(.eyebrow) {
  max-width: 640px;
  color: #c4d2dc;
  font-size: 21px;
  line-height: 1.45;
}

.auth-panel,
.setup-panel,
.snippet-panel,
.empty-dashboard {
  padding: 28px;
}

.form {
  display: grid;
  gap: 16px;
}

.form h2 {
  margin: 0;
  font-size: 24px;
}

.secondary-form {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid rgba(148, 165, 179, 0.22);
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 44px;
  color: var(--text);
  background: #132334;
  border: 1px solid rgba(148, 165, 179, 0.18);
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
}

input:focus,
select:focus {
  outline: 2px solid rgba(255, 157, 0, 0.44);
  outline-offset: 2px;
}

input[type="file"] {
  min-height: 48px;
  padding: 7px;
  line-height: 32px;
}

input[type="file"]::file-selector-button {
  min-height: 32px;
  margin: 0 10px 0 0;
  color: var(--text);
  background: var(--panel-soft);
  border: 0;
  border-radius: 4px;
  padding: 0 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  vertical-align: middle;
}

.notice {
  margin-bottom: 20px;
  padding: 14px 16px;
  color: #dff8ec;
  background: rgba(0, 108, 110, 0.35);
  border-radius: 4px;
  font-weight: 800;
}

.notice.error {
  color: #ffe5e5;
  background: rgba(174, 52, 52, 0.34);
}

.notice.success {
  color: #e5fff2;
}

.setup-panel {
  margin-bottom: 28px;
}

.add-site-panel,
.traffic-exclusions-panel {
  margin-top: 24px;
}

.add-site-panel h2,
.traffic-exclusions-panel h2 {
  margin: 0;
}

.website-management-list {
  display: grid;
  gap: 10px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 165, 179, 0.2);
}

.website-management-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(300px, 1.4fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  background: #132334;
  border-radius: 5px;
}

.website-domain {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.website-domain strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.website-domain small {
  color: var(--muted);
}

.website-name-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px auto;
  gap: 10px;
  align-items: center;
}

.website-name-form label {
  display: block;
}

.website-remove-form {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.traffic-exclusions-panel {
  margin-bottom: 0;
}

.admin-overview-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
}

.site-form {
  display: grid;
  grid-template-columns: 1fr 1fr 110px auto;
  gap: 16px;
  align-items: end;
}

.ignored-ip-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: end;
  margin-top: 22px;
}

.goal-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
  margin-top: 24px;
}

.goal-form .goal-rule {
  grid-column: 1 / -1;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.detected-ip-form {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--muted);
}

.detected-ip-form strong {
  color: var(--text);
}

.section-note {
  color: var(--muted);
  line-height: 1.5;
}

.ignored-ip-list {
  margin-top: 24px;
}

.ignored-ip-list .admin-row > div:first-child small {
  margin-left: 10px;
}

.site-select {
  min-width: 250px;
  font-weight: 900;
}

.period-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #182838;
  border-radius: 6px;
}

.period-tabs a {
  min-height: 32px;
  padding: 7px 12px;
  color: var(--muted);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 900;
}

.period-tabs a.active {
  color: var(--bg);
  background: var(--orange);
}

.bot-toggle-form {
  margin-left: 8px;
}

.toggle-label {
  display: flex;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.toggle-label input {
  width: 18px;
  min-height: 18px;
}

.refresh-note {
  margin: -6px 0 16px;
  color: #c3d1db;
  font-size: 14px;
  font-weight: 800;
}

.conversion-panel {
  margin-top: 24px;
  padding: 24px;
}

.conversion-panel > .report-head h2 {
  margin: 0;
  font-size: 26px;
}

.conversion-heading {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

.conversion-heading h2 {
  grid-column: 2;
  text-align: center;
}

.conversion-heading a {
  grid-column: 3;
  justify-self: end;
}

.conversion-metrics {
  justify-content: center;
  gap: clamp(16px, 4vw, 42px);
  margin: 24px 0 0;
}

.conversion-metrics article,
.conversion-metrics article:first-child {
  display: flex;
  width: clamp(185px, 22vw, 225px);
  min-width: 0;
  min-height: 132px;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px;
  text-align: center;
  background: rgba(19, 35, 52, 0.72);
  border: 1px solid rgba(148, 165, 179, 0.25);
  border-top: 3px solid var(--orange);
  border-radius: 6px;
}

.conversion-metrics strong {
  margin: 10px 0 7px;
  font-size: 34px;
}

.conversion-metrics em {
  margin-left: 0;
}

.conversion-grid {
  margin-top: 24px;
}

.conversion-grid .report {
  min-height: 220px;
  background: rgba(19, 35, 52, 0.58);
}

.journey-filters {
  display: grid;
  grid-template-columns: 1.2fr repeat(2, 0.8fr) repeat(3, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 20px;
}

.journey-report {
  padding: 12px;
}

.journey-row {
  display: grid;
  grid-template-columns: 1.1fr 1.5fr 0.8fr 1.1fr;
  gap: 18px;
  padding: 16px;
  border-bottom: 1px solid rgba(148, 165, 179, 0.16);
}

.journey-row:hover {
  background: var(--panel-soft);
}

.journey-row div {
  min-width: 0;
}

.journey-row span,
.journey-row strong,
.journey-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-row small,
.journey-timeline small {
  margin-top: 5px;
  color: var(--muted);
}

.journey-timeline {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.journey-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  padding-bottom: 24px;
}

.journey-timeline li::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 34px;
  bottom: 0;
  width: 2px;
  background: var(--faint);
}

.journey-timeline li:last-child::before {
  display: none;
}

.result-copy {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 6px;
}

.result-copy small {
  margin: 0;
  line-height: 1.5;
}

.goal-result-copy span,
.journey-result-copy strong {
  flex: 0 1 auto;
}

.journey-result-copy {
  align-items: center;
  padding-top: 5px;
}

.journey-result-copy .conversion-badge,
.journey-result-copy .last-page-label {
  margin-top: 0;
}

.journey-marker {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--bg);
  background: var(--orange);
  border-radius: 50%;
  font-weight: 900;
}

.conversion-badge,
.last-page-label {
  display: inline-block;
  margin: 8px 8px 0 0;
  padding: 5px 8px;
  color: #dff8ec;
  background: rgba(0, 108, 110, 0.55);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}

.last-page-label {
  color: #ffe7bd;
  background: rgba(255, 157, 0, 0.22);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 0 8px;
  color: var(--muted);
}

.health-panel {
  margin-top: 24px;
  padding: 24px;
}

.health-panel h2 {
  margin: 0;
  font-size: 26px;
}

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

.health-grid article {
  min-width: 0;
  padding: 16px;
  background: #132334;
  border-radius: 4px;
}

.health-grid span,
.health-grid strong {
  display: block;
}

.health-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.health-grid strong {
  margin-top: 7px;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
}

.health-reasons {
  margin-top: 24px;
}

.empty-dashboard {
  margin-top: 26px;
}

.snippet-panel {
  margin-top: 24px;
}

.settings-divider {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-divider::before,
.settings-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(148, 165, 179, 0.3);
}

.settings-divider + .snippet-panel {
  margin-top: 18px;
}

.snippet-panel h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

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

.snippet-actions,
.admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.snippet-panel p {
  margin: 0 0 16px;
  color: var(--muted);
}

pre {
  margin: 0;
  overflow-x: auto;
  color: #e7f1f6;
  background: #132334;
  border-radius: 4px;
  padding: 16px;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.empty-state {
  color: var(--muted);
  font-size: 16px;
}

.tracker-test-result {
  min-height: 24px;
  margin-top: 14px;
  font-weight: 800;
}

.success-text {
  color: #28d796 !important;
}

.error-text {
  color: #ffb3b3 !important;
}

.admin-row {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 12px;
  background: #132334;
  border-radius: 4px;
}

.admin-row span {
  color: var(--text);
  font-weight: 900;
}

.admin-row small {
  color: var(--muted);
}

.admin-user-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.admin-actions form {
  margin: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
}

.ai-weekly-panel {
  display: block;
  border-top: 4px solid var(--orange);
  background: linear-gradient(135deg, rgba(26, 42, 55, 0.98), rgba(15, 29, 40, 0.98));
}

.ai-weekly-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(222, 232, 238, 0.2);
}

.ai-weekly-heading h2 {
  margin: 0;
  color: #f5f7f8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

.ai-weekly-copy {
  max-width: 1040px;
  margin: 20px 0 0;
  color: #e2e8ec;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.7;
}

.ai-weekly-body {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 20px;
}

.ai-weekly-body .ai-weekly-copy {
  margin: 0;
}

.ai-report-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: var(--orange);
  border: 1px solid rgba(255, 157, 0, 0.72);
  border-radius: 9px;
  background: rgba(255, 157, 0, 0.04);
}

.ai-report-icon svg {
  width: 43px;
  height: 43px;
}

.ai-report-icon rect {
  fill: currentColor;
}

.ai-report-icon path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.tracker-intro {
  font-size: 16px;
}

.tracker-steps {
  display: grid;
  gap: 16px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: tracker-step;
}

.tracker-steps li {
  position: relative;
  padding: 18px 18px 18px 62px;
  background: rgba(19, 35, 52, 0.72);
  border: 1px solid rgba(148, 165, 179, 0.14);
  counter-increment: tracker-step;
}

.tracker-steps li::before {
  content: counter(tracker-step);
  position: absolute;
  top: 17px;
  left: 18px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--bg);
  background: var(--orange);
  border-radius: 50%;
  font-weight: 900;
}

.tracker-steps li > strong,
.tracker-steps li > span {
  display: block;
}

.tracker-steps li > span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.5;
}

.tracker-steps form,
.tracker-steps pre {
  margin-top: 14px;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.report {
  min-height: 330px;
  padding: 18px;
}

.detail-panel {
  margin-top: 24px;
  padding: 24px;
}

#details.detail-panel {
  border: 5px solid var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 157, 0, 0.12), 0 20px 48px rgba(0, 0, 0, 0.34);
}

.detail-panel .report-head {
  align-items: flex-start;
}

.detail-panel h2 {
  margin: 0;
  font-size: 26px;
}

.detail-note {
  margin: -6px 0 20px;
  color: var(--muted);
}

.report-head {
  justify-content: space-between;
  margin-bottom: 18px;
}

.report h2 {
  margin: 0;
  font-size: 18px;
}

.report-head a {
  color: var(--orange);
}

.bar-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 34px;
  margin-bottom: 8px;
  padding: 0 10px;
  overflow: hidden;
  color: #dce6ed;
}

.bar-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: var(--panel-soft);
}

.bar-row span,
.bar-row b {
  position: relative;
  z-index: 1;
  font-size: 15px;
}

.bar-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-label-link {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(255, 159, 10, 0.58);
  text-underline-offset: 3px;
}

.report-label-link:hover,
.report-label-link:focus-visible {
  color: var(--orange);
  text-decoration-color: currentColor;
}

.bar-row.source-row {
  min-height: 48px;
}

.bar-row.source-row span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.bar-row.source-row span strong,
.bar-row.source-row span small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row.source-row span small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.bar-row b {
  font-weight: 800;
}

.map-fake {
  position: relative;
  height: 235px;
  overflow: hidden;
  background: #182838;
  border-radius: 4px;
}

.map-fake::before {
  content: "";
  position: absolute;
  inset: 34px 48px;
  border: 1px solid rgba(148, 165, 179, 0.18);
  border-radius: 50%;
  transform: skew(-18deg);
}

.region {
  position: absolute;
  display: block;
  background: var(--teal);
  opacity: 0.82;
  border-radius: 48% 52% 42% 58%;
}

.region.one {
  left: 16%;
  top: 36%;
  width: 96px;
  height: 52px;
}

.region.two {
  left: 35%;
  top: 32%;
  width: 70px;
  height: 46px;
  background: var(--orange);
  opacity: 0.76;
}

.region.three {
  left: 53%;
  top: 40%;
  width: 120px;
  height: 62px;
}

.region.four {
  left: 73%;
  top: 56%;
  width: 74px;
  height: 38px;
}

.region.five {
  left: 24%;
  top: 62%;
  width: 54px;
  height: 64px;
  opacity: 0.56;
}

.admin-plan-form {
  display: grid;
  grid-template-columns: 150px auto;
  gap: 8px;
  align-items: center;
}

.admin-account-card {
  gap: 16px;
  padding: 20px;
}

.admin-account-head,
.admin-account-actions {
  display: flex;
  align-items: center;
}

.admin-account-head {
  justify-content: space-between;
  gap: 18px;
}

.admin-account-head > div {
  display: grid;
  gap: 4px;
}

.admin-account-head span:first-child {
  font-size: 19px;
}

.account-status-badge {
  color: #28d796 !important;
  font-size: 12px;
  text-transform: capitalize;
}

.admin-account-stats {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.admin-account-stats span {
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(34, 52, 70, 0.75);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.admin-account-actions {
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 165, 179, 0.15);
}

.admin-account-actions > form {
  margin: 0;
}

.admin-account-editor {
  position: relative;
}

.admin-account-editor summary {
  list-style: none;
  cursor: pointer;
}

.admin-account-editor summary::-webkit-details-marker {
  display: none;
}

.admin-account-editor[open] {
  flex-basis: 100%;
}

.admin-account-editor form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
  padding: 16px;
  background: var(--panel-soft);
  border-radius: 5px;
}

#websites .report-head > div {
  display: grid;
  gap: 5px;
}

#websites .report-head small {
  color: var(--muted);
}

.admin-plan-form select {
  min-height: 40px;
}

.landing-shell {
  width: min(1240px, calc(100% - 32px));
}

.landing-topbar {
  margin-bottom: 44px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(480px, 1.18fr);
  gap: 54px;
  align-items: center;
  min-height: 570px;
  padding: 34px 0 76px;
}

.landing-hero-copy h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(43px, 5vw, 69px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.landing-hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  margin: 24px 0 0;
  color: #c4d2dc;
  font-size: 20px;
  line-height: 1.55;
}

.landing-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.landing-preview {
  position: relative;
}

.landing-preview::before {
  content: "";
  position: absolute;
  inset: 8% 6%;
  z-index: -1;
  background: rgba(19, 164, 166, 0.28);
  filter: blur(60px);
}

.landing-preview img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(148, 165, 179, 0.2);
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.landing-section {
  padding: 82px 0;
  border-top: 1px solid rgba(148, 165, 179, 0.18);
}

.landing-section-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.landing-section-head h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.landing-section-head > p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.plan-grid,
.tech-grid,
.account-form-grid {
  display: grid;
  gap: 18px;
}

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

.plan-card {
  display: flex;
  min-height: 490px;
  flex-direction: column;
  padding: 30px;
  border: 1px solid transparent;
}

.featured-plan {
  border-color: rgba(255, 157, 0, 0.72);
  box-shadow: 0 16px 48px rgba(255, 157, 0, 0.09);
}

.plan-kicker {
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-card h3 {
  margin: 18px 0 2px;
  font-size: 35px;
}

.plan-card h3 small {
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
}

.plan-range,
.plan-card li {
  color: var(--muted);
}

.plan-range {
  min-height: 44px;
  margin: 0;
  line-height: 1.45;
}

.plan-card ul {
  display: grid;
  flex: 1;
  gap: 13px;
  margin: 26px 0;
  padding-left: 20px;
}

.plan-card li {
  line-height: 1.4;
}

.plan-status {
  display: grid;
  min-height: 44px;
  place-items: center;
  color: var(--orange);
  background: rgba(255, 157, 0, 0.08);
  border: 1px solid rgba(255, 157, 0, 0.25);
  border-radius: 6px;
  font-weight: 900;
}

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

.tech-grid article {
  padding: 25px;
  background: rgba(28, 43, 57, 0.62);
  border: 1px solid rgba(148, 165, 179, 0.14);
  border-radius: 6px;
}

.tech-grid strong {
  font-size: 18px;
}

.tech-grid p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.account-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 920px;
}

.app-footer {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 34px;
  color: var(--muted);
  font-size: 14px;
}

.app-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 165, 179, 0.16);
}

.footer-credit {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-privacy {
  color: var(--muted);
  font-weight: 800;
}

.app-footer a:hover {
  color: var(--text);
}

.footer-heart {
  color: #f53873;
  font-size: 17px;
}

.footer-contact {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--orange);
  background: rgba(255, 157, 0, 0.09);
  border-radius: 50%;
}

.footer-contact svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.privacy-shell {
  width: min(1120px, calc(100% - 32px));
}

.privacy-hero {
  max-width: 900px;
  padding: 32px 0 48px;
}

.privacy-hero h1 {
  margin: 0;
  font-size: clamp(40px, 5vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.privacy-hero > p:not(.eyebrow) {
  max-width: 820px;
  margin: 22px 0 0;
  color: #c4d2dc;
  font-size: 19px;
  line-height: 1.6;
}

.privacy-callout {
  margin-bottom: 18px;
  padding: 28px;
  border-left: 5px solid var(--orange);
}

.privacy-callout h2,
.privacy-panel h2 {
  margin: 0 0 14px;
}

.privacy-callout p,
.privacy-panel p {
  margin: 0;
  color: #c8d4dc;
  line-height: 1.7;
}

.privacy-panel p + p {
  margin-top: 15px;
}

.privacy-panel a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.privacy-panel {
  padding: 28px;
}

.privacy-contact-panel {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .topbar {
    margin-bottom: 34px;
  }

  .site-row,
  .metrics,
  .ai-panel,
  .report-grid,
  .auth-grid,
  .site-form,
  .admin-user-row,
  .ignored-ip-form,
  .goal-form,
  .journey-filters,
  .journey-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .account-strip {
    margin-top: 0;
  }

  .profile-popover {
    position: fixed;
    top: 96px;
    right: 16px;
    bottom: 16px;
    max-height: none;
  }

  .plan-upgrade-links,
  .account-settings-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .account-plan-option,
  .admin-account-editor form {
    grid-template-columns: 1fr;
  }

  .admin-account-actions,
  .admin-account-head {
    align-items: stretch;
    flex-direction: column;
  }

  .account-settings-heading small {
    text-align: left;
  }

  .admin-overview-grid {
    grid-template-columns: 1fr;
  }

  .landing-hero,
  .plan-grid,
  .tech-grid,
  .account-form-grid,
  .privacy-grid {
    grid-template-columns: 1fr;
  }

  .privacy-contact-panel {
    grid-column: auto;
  }

  .app-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-hero {
    gap: 38px;
    min-height: auto;
    padding-bottom: 58px;
  }

  .landing-section {
    padding: 58px 0;
  }

  .plan-card {
    min-height: auto;
  }

  .admin-plan-form {
    grid-template-columns: 1fr;
  }

  .website-management-row,
  .website-name-form {
    grid-template-columns: 1fr;
  }

  .ignored-ip-list .admin-row > div:first-child small {
    display: block;
    margin: 5px 0 0;
  }

  .health-grid {
    grid-template-columns: 1fr;
  }

  .goal-form .goal-rule {
    grid-column: auto;
  }

  .detected-ip-form {
    align-items: stretch;
    flex-direction: column;
  }

  .spacer {
    display: none;
  }

  .metrics article {
    border-left: 0;
    border-top: 1px solid rgba(148, 165, 179, 0.25);
    padding: 14px 0;
  }

  .metrics article:first-child {
    border-top: 0;
  }

  .conversion-metrics {
    justify-items: center;
  }

  .conversion-metrics article,
  .conversion-metrics article:first-child {
    width: min(190px, 100%);
    padding: 22px;
    border: 1px solid rgba(148, 165, 179, 0.25);
    border-top: 3px solid var(--orange);
  }

  .ai-weekly-heading {
    display: block;
  }

  .ai-weekly-heading h2 {
    margin-top: 6px;
    font-size: 25px;
  }

  .ai-weekly-body {
    grid-template-columns: 1fr;
  }

  .auth-copy h1,
  .empty-dashboard h1 {
    font-size: 36px;
  }

  .brand {
    font-size: 24px;
  }

  .snippet-head {
    align-items: stretch;
    flex-direction: column;
  }

  .chart {
    height: 260px;
  }
}
