:root {
  color-scheme: light;
  --bg: #f8f9fb;
  --surface: #ffffff;
  --surface-2: #f3f3f6;
  --line: #e2e3e8;
  --text: #1c1d22;
  --muted: #6f7280;
  --accent: #4f3df5;
  --accent-2: #5b48ff;
  --danger: #e11d48;
  --warning: #b45309;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}

html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #080b10;
  --surface: #10151d;
  --surface-2: #171d27;
  --line: #252d3a;
  --text: #f5f7fa;
  --muted: #98a2b3;
  --accent: #8b7cff;
  --accent-2: #7565ff;
  --danger: #fb7185;
  --warning: #fbbf24;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  background: var(--accent);
  color: #03251a;
  padding: 0.5rem 1rem;
  z-index: 20;
}
.skip-link:focus {
  top: 1rem;
}
.topbar {
  min-height: 94px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.6rem max(1.25rem, calc((100vw - 1120px) / 2));
  border: 0;
  background: var(--bg);
  position: relative;
  z-index: 10;
}
html[data-theme='dark'] .topbar {
  background: rgba(8, 11, 16, 0.88);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 8px;
  background: linear-gradient(145deg, #8477ff 12%, #4c36ee 60%, #3422b8);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.topbar nav {
  display: flex;
  gap: 0.2rem;
  flex: 1;
  overflow-x: auto;
}
.topbar nav a {
  padding: 0.5rem 0.65rem;
  color: var(--muted);
  border-radius: 8px;
  white-space: nowrap;
  font-size: 0.86rem;
}
.topbar nav a:hover,
.topbar nav a:focus-visible {
  background: var(--surface-2);
  color: var(--text);
}
.theme-toggle {
  white-space: nowrap;
}
.shell {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.2rem 0 4rem;
}
.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--accent);
  margin: 0 0 0.3rem;
}
h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 1.1;
  margin: 0.1rem 0 0.5rem;
}
h2 {
  font-size: 1rem;
  margin: 0;
  letter-spacing: -0.015em;
}
h3 {
  font-size: 0.9rem;
  margin: 0;
}
.muted {
  color: var(--muted);
  font-size: 0.88rem;
}
.controls {
  display: flex;
  align-items: end;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.compact {
  font-size: 0.75rem;
  color: var(--muted);
}
select,
input,
textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  padding: 0.72rem 0.8rem;
  outline: none;
}
select:focus,
input:focus,
textarea:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(91, 72, 255, 0.13);
}
textarea {
  resize: vertical;
}
.periods {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.periods a {
  padding: 0.48rem 0.72rem;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}
.periods a.active {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}
.metrics article,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.metrics article {
  padding: 1.2rem;
}
.metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 0.4rem;
}
.metrics strong {
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}
.panel {
  padding: 1.25rem;
}
.chart-panel {
  margin-bottom: 0.8rem;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.chart-wrap {
  width: 100%;
  height: 260px;
}
.chart {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart rect {
  fill: var(--accent-2);
  opacity: 0.78;
}
.chart g:focus rect,
.chart rect:hover {
  fill: var(--accent);
  opacity: 1;
}
.chart line {
  stroke: var(--line);
}
.chart text {
  fill: var(--muted);
  font-size: 10px;
}
.table-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}
.table-panel {
  min-width: 0;
  overflow-x: auto;
}
.table-panel td code {
  display: inline-block;
  max-width: 26rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.editor-grid > .table-panel table {
  table-layout: fixed;
}
.editor-grid > .table-panel th:nth-child(1) {
  width: 24%;
}
.editor-grid > .table-panel th:nth-child(2) {
  width: 35%;
}
.editor-grid > .table-panel th:nth-child(3) {
  width: 29%;
}
.editor-grid > .table-panel th:nth-child(4) {
  width: 12%;
}
.editor-grid > .table-panel td:first-child,
.editor-grid > .table-panel td:nth-child(3) {
  white-space: normal;
}
.editor-grid > .table-panel td code {
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
}
th,
td {
  padding: 0.68rem 0.35rem;
  border-bottom: 1px solid var(--line);
}
th:nth-child(n + 2),
td:nth-child(n + 2) {
  text-align: right;
}
td:first-child {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.empty {
  min-height: 180px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
  gap: 0.3rem;
}
.empty strong {
  color: var(--text);
}
.empty.large {
  min-height: 320px;
  justify-items: center;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  color: var(--muted);
}
.status i {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: currentColor;
}
.status.success {
  color: var(--accent);
}
.status.warning {
  color: var(--warning);
}
.site-details {
  margin-top: 0.8rem;
}
.site-details dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}
.site-details dt {
  font-size: 0.75rem;
  color: var(--muted);
}
.site-details dd {
  margin: 0.2rem 0 0;
  overflow-wrap: anywhere;
}
.code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.8rem;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.68rem 1rem;
  cursor: pointer;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 650;
}
.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--line), var(--text) 25%);
}
.button.primary {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
}
.button.danger {
  background: transparent;
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger), transparent 55%);
}
.button.ghost {
  background: transparent;
}
.button.small {
  padding: 0.45rem 0.7rem;
  font-size: 0.78rem;
}
.inline-form {
  margin: 0;
}
.report-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 1.5rem;
}
.launch-panel {
  max-width: 720px;
  margin: 8vh auto;
  padding: 2rem;
  display: grid;
  gap: 1.1rem;
}
.sites-list {
  padding: 0;
}
.site-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.site-row:last-child {
  border: 0;
}
.site-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(91, 72, 255, 0.12);
  color: var(--accent);
  font-weight: 800;
}
.site-row h2 {
  font-size: 0.95rem;
}
.site-row p {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.2rem 0;
}
.row-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.narrow {
  width: min(840px, 100%);
  margin: 0 auto;
}
.form-panel {
  margin: 1.5rem 0;
}
.stack {
  display: grid;
  gap: 1rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
label {
  font-size: 0.82rem;
  font-weight: 650;
}
label small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.35rem;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: end;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.alert {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin: 1rem 0;
}
.alert.error {
  background: color-mix(in srgb, var(--danger), transparent 90%);
  border: 1px solid color-mix(in srgb, var(--danger), transparent 65%);
  color: var(--danger);
}
.alert.info,
.alert.warning {
  background: color-mix(in srgb, var(--warning), transparent 91%);
  border: 1px solid color-mix(in srgb, var(--warning), transparent 68%);
}
.alert.success {
  background: color-mix(in srgb, var(--accent), transparent 91%);
  border: 1px solid color-mix(in srgb, var(--accent), transparent 68%);
}
.alert p {
  margin: 0.25rem 0 0;
}
.danger-zone {
  border-color: color-mix(in srgb, var(--danger), transparent 70%);
  margin-top: 1rem;
}
.danger-zone p {
  color: var(--muted);
}
.danger-zone .form-actions {
  justify-content: space-between;
}
.callout {
  display: grid;
  gap: 0.25rem;
  background: var(--surface-2);
  padding: 1rem;
  border-radius: 10px;
}
.login-page {
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.login-card {
  width: min(430px, 100%);
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.login-brand {
  margin-bottom: 2.4rem;
}
.login-card h1 {
  font-size: 2rem;
}
.error-page {
  min-height: 60vh;
  display: grid;
  place-content: center;
  justify-items: start;
  max-width: 600px;
  margin: auto;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}
.feature-card {
  padding: 1.15rem;
}
.feature-card p {
  color: var(--muted);
  font-size: 0.84rem;
}
.steps {
  display: grid;
  gap: 0.5rem;
}
.step {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem;
  background: var(--surface-2);
  border-radius: 10px;
}
.step-number {
  width: 30px;
  height: 30px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  background: var(--accent-2);
  color: #fff;
  font-weight: 800;
}
.progress {
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 99px;
  overflow: hidden;
  background: var(--surface-2);
}
.progress::-webkit-progress-bar {
  background: var(--surface-2);
}
.progress::-webkit-progress-value {
  background: var(--accent-2);
}
.progress::-moz-progress-bar {
  background: var(--accent-2);
}
.tabs {
  display: flex;
  gap: 0.3rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}
.tabs a {
  padding: 0.7rem 0.85rem;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.tabs a.active {
  color: var(--text);
  border-color: var(--accent-2);
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Plausible-inspired reporting surface */
.plausible-header .brand {
  color: #20285c;
  font-size: 1.12rem;
}
html[data-theme='dark'] .plausible-header .brand {
  color: var(--text);
}
.plausible-header nav {
  justify-content: flex-end;
}
.plausible-header .admin-label {
  font-size: 0.79rem;
  white-space: nowrap;
}
.icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-button:hover,
.icon-button:focus-visible {
  background: var(--surface-2);
  color: var(--accent);
}

.analytics-overview {
  padding: 0;
  overflow: visible;
  margin: 0.25rem 0 1rem;
}
.metric-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.metric-strip article {
  min-width: 0;
  padding: 0.9rem 1rem 0.8rem;
  border-right: 1px solid var(--line);
}
.metric-strip article:last-child {
  border-right: 0;
}
.metric-strip article.active {
  background: var(--surface-2);
  border-radius: 7px 0 0 0;
}
.metric-strip span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 750;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.metric-strip strong {
  display: block;
  margin-top: 0.22rem;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}
.metric-change {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.66rem;
}
.metric-change.positive {
  color: #079669;
}
.metric-change.negative {
  color: #dc5656;
}
.comparison-note {
  margin: 0;
  padding: 0.45rem 1rem 0;
  color: var(--muted);
  font-size: 0.69rem;
  text-align: right;
}
.analytics-overview .chart-wrap {
  height: 300px;
  padding: 0.45rem 1rem 0;
}
.chart {
  color: var(--accent-2);
}
.chart-grid {
  stroke: var(--line);
  stroke-width: 1;
}
.chart-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-area {
  fill: url(#chart-fill);
}
.chart circle {
  fill: var(--surface);
  stroke: currentColor;
  stroke-width: 2;
  opacity: 0;
}
.chart g:focus circle,
.chart g:hover circle {
  opacity: 1;
}
.chart text {
  fill: var(--muted);
  font-size: 10px;
}
.analytics-toolbar {
  min-height: 54px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--line);
  position: relative;
}
.site-context select,
.analytics-toolbar select {
  width: auto;
  max-width: 220px;
  margin: 0;
  padding: 0.4rem 1.8rem 0.4rem 0.45rem;
  border: 0;
  background-color: transparent;
  font-weight: 650;
}
.analytics-toolbar .periods {
  border: 0;
  background: transparent;
}
.analytics-toolbar .periods a {
  padding: 0.38rem 0.52rem;
}
.realtime-presence {
  position: relative;
}
.realtime-presence > summary {
  cursor: pointer;
  list-style: none;
}
.realtime-presence > summary::-webkit-details-marker {
  display: none;
}
.realtime-presence > summary strong {
  color: inherit;
}
.realtime-popover {
  position: absolute;
  z-index: 12;
  top: calc(100% + 0.65rem);
  left: 0;
  width: min(620px, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}
.realtime-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.realtime-head > div span,
.realtime-head > span {
  color: var(--muted);
  font-size: 0.72rem;
}
.realtime-head strong {
  display: block;
  margin-top: 0.1rem;
  font-size: 1.65rem;
}
.realtime-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 0.9rem;
}
.realtime-grid h3 {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  text-transform: uppercase;
}
.realtime-list {
  display: grid;
  gap: 0.22rem;
}
.realtime-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: 0.28rem 0.35rem;
  border-radius: 4px;
  background: var(--surface-2);
  font-size: 0.73rem;
}
.realtime-list div span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.realtime-list p,
.realtime-privacy {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
}
.realtime-privacy {
  padding-top: 0.8rem;
}
.filter-chips {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  order: 3;
}
.filter-chips > span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.75rem;
}
.filter-chips > span strong {
  color: var(--text);
}
.filter-chips > span a {
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-left: 0.2rem;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  text-decoration: none;
}
.filter-chips > span a:hover {
  background: var(--surface-2);
  color: var(--text);
}
.filter-clear {
  color: var(--muted);
  font-size: 0.75rem;
}
.data-scope-note {
  margin: 0 1rem 1rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #c7d9ff;
  border-radius: 6px;
  background: #f2f6ff;
  color: #405373;
  font-size: 0.76rem;
  line-height: 1.45;
}
.data-scope-note.warning {
  border-color: #f4d7a8;
  background: #fff8e8;
  color: #765a25;
}
.export-menu {
  position: relative;
  color: var(--muted);
  font-size: 0.82rem;
}
.export-menu summary {
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  list-style: none;
}
.export-menu summary::-webkit-details-marker {
  display: none;
}
.export-menu[open] form {
  position: absolute;
  z-index: 4;
  right: 0;
  top: 2.25rem;
  width: 250px;
  display: grid;
  gap: 0.65rem;
  padding: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}
.export-menu form .button {
  justify-content: center;
  text-align: center;
}
.setup-steps {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.3rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}
.setup-steps code {
  color: var(--text);
}

.plausible-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.dimension-card {
  min-height: 330px;
  padding: 1rem;
}
.panel-tabs {
  display: flex;
  gap: 1.15rem;
  min-height: 34px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.dimension-tabs {
  overflow: visible;
}
.panel-tabs > a,
.panel-tabs > span,
.panel-tabs > button {
  padding: 0 0 0.7rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 750;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.panel-tabs > .active {
  color: var(--text);
  border-bottom: 2px solid var(--text);
}
.panel-tabs button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.dimension-tab-menu {
  position: relative;
  flex: 0 0 auto;
}
.dimension-tab-menu summary {
  display: flex;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 750;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}
.dimension-tab-menu summary::-webkit-details-marker {
  display: none;
}
.dimension-tab-menu summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.dimension-tab-menu summary i {
  font-size: 0.8rem;
  font-style: normal;
  line-height: 0.8;
  transition: transform 160ms ease;
}
.dimension-tab-menu[open] summary i {
  transform: rotate(180deg);
}
.dimension-tab-menu.active summary {
  color: var(--text);
  border-bottom: 2px solid var(--text);
}
.dimension-tab-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.45rem);
  left: 0;
  display: grid;
  min-width: 190px;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.16);
}
.dimension-tab-options button {
  width: 100%;
  padding: 0.62rem 0.7rem;
  border: 0;
  border-radius: 6px;
  text-align: left;
}
.dimension-tab-options button:hover,
.dimension-tab-options button.active {
  color: var(--text);
  background: var(--surface-2);
}
[data-tab-panel][hidden] {
  display: none;
}
.tab-empty {
  min-height: 235px;
}
.dimension-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.8rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.7rem;
}
.dimension-list {
  display: grid;
  gap: 0.22rem;
}
.geoip-attribution {
  margin: 0.7rem 0 0;
  font-size: 0.68rem;
}
.dimension-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 30px;
  border-radius: 5px;
  color: inherit;
  font-size: 0.77rem;
  text-decoration: none;
}
.dimension-row[href]:hover {
  background: var(--surface-2);
}
.dimension-row[href]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.dimension-row.selected {
  background: var(--surface-2);
  box-shadow: inset 3px 0 var(--accent);
}
.dimension-row > div {
  display: grid;
  grid-template-areas: 'stack';
  align-items: center;
  min-width: 0;
}
.dimension-row span,
.dimension-row progress {
  grid-area: stack;
}
.dimension-row span {
  z-index: 1;
  overflow: hidden;
  padding: 0.3rem 0.45rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.dimension-row strong {
  font-size: 0.76rem;
  font-weight: 500;
}
.dimension-row progress {
  width: 100%;
  height: 100%;
  min-height: 26px;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: transparent;
}
.dimension-row progress::-webkit-progress-bar {
  background: transparent;
}
.tone-blue progress::-webkit-progress-value {
  background: #e8f1ff;
}
.tone-orange progress::-webkit-progress-value {
  background: #fff1e3;
}
.tone-purple progress::-webkit-progress-value {
  background: #eeeaff;
}
.tone-green progress::-webkit-progress-value {
  background: #e5f8ef;
}
.tone-red progress::-webkit-progress-value {
  background: #fdebec;
}
.tone-blue progress::-moz-progress-bar {
  background: #e8f1ff;
}
.tone-orange progress::-moz-progress-bar {
  background: #fff1e3;
}
.tone-purple progress::-moz-progress-bar {
  background: #eeeaff;
}
.tone-green progress::-moz-progress-bar {
  background: #e5f8ef;
}
.tone-red progress::-moz-progress-bar {
  background: #fdebec;
}
.revenue-summary {
  margin-top: 1rem;
}
.revenue-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.revenue-title h2 {
  margin: 0.15rem 0 0.2rem;
}
.revenue-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.revenue-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.revenue-metrics article {
  min-width: 0;
  padding: 1rem;
  border-right: 1px solid var(--line);
}
.revenue-metrics article:last-child {
  border-right: 0;
}
.revenue-metrics span,
.revenue-metrics small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
}
.revenue-metrics strong {
  display: block;
  overflow: hidden;
  margin: 0.25rem 0;
  font-size: 1.35rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.revenue-chart {
  display: flex;
  align-items: end;
  gap: 2px;
  height: 210px;
  padding: 1.2rem 0 1.7rem;
  border-bottom: 1px solid var(--line);
}
.revenue-chart > div {
  position: relative;
  display: flex;
  flex: 1 1 0;
  align-items: end;
  height: 100%;
  min-width: 2px;
}
.revenue-chart i {
  display: block;
  width: 100%;
  height: var(--revenue-height);
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: #79a9f8;
}
.revenue-chart span {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 50%;
  display: none;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.62rem;
  white-space: nowrap;
}
.revenue-chart > div:first-child span,
.revenue-chart > div:last-child span {
  display: block;
}
.revenue-breakdowns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 1rem;
}
.revenue-breakdowns h3 {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
}
.revenue-list {
  display: grid;
  gap: 0.25rem;
}
.revenue-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.74rem;
}
.revenue-list > div > div {
  display: grid;
  grid-template-areas: 'stack';
  min-width: 0;
}
.revenue-list span,
.revenue-list progress {
  grid-area: stack;
}
.revenue-list span {
  z-index: 1;
  overflow: hidden;
  padding: 0.3rem 0.4rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.revenue-list progress {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 4px;
  background: transparent;
}
.revenue-list progress::-webkit-progress-bar {
  background: transparent;
}
.revenue-list progress::-webkit-progress-value,
.revenue-list progress::-moz-progress-bar {
  background: #e8f1ff;
}
.revenue-list p {
  color: var(--muted);
  font-size: 0.72rem;
}
.revenue-empty {
  margin-top: 1rem;
}

.attribution-title {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

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

.segment-comparison {
  margin-top: 1rem;
}

.segment-comparison-grid > div {
  display: grid;
  grid-template-columns: minmax(9rem, 1.2fr) repeat(2, minmax(7rem, 1fr)) minmax(6rem, 0.7fr);
  gap: 1rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.segment-comparison-grid .segment-comparison-head {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.behavior-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 0.7fr) minmax(24rem, 1.3fr);
  gap: 1rem;
  margin-top: 1rem;
}

.behavior-activation {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.behavior-activation > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
}

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

.behavior-activation .button {
  justify-self: start;
}

.behavior-map svg {
  width: 100%;
  max-height: 34rem;
  background: linear-gradient(#fff, #fafafa);
  border: 1px solid var(--border);
}

.behavior-map svg rect {
  fill: #fbfbfd;
}

.behavior-map svg circle {
  fill: rgb(239 68 68 / 0.34);
  stroke: rgb(220 38 38 / 0.55);
  stroke-width: 3;
}

.scroll-depth > div {
  display: grid;
  grid-template-columns: 3rem 1fr 3rem;
  gap: 0.7rem;
  align-items: center;
  margin: 0.55rem 0;
}

.replay-list,
.replay-timeline ol {
  display: grid;
  gap: 0.45rem;
}

.replay-list a {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
  border-radius: 0.6rem;
  color: inherit;
  text-decoration: none;
}

.replay-list a.active,
.replay-list a:hover {
  background: var(--surface-muted);
}

.replay-timeline li {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.8rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.replay-timeline li div,
.replay-list a {
  display: grid;
}

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

.board-wide {
  grid-column: 1 / -1;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
}
.performance-summary {
  margin-top: 1rem;
}
.performance-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1rem 0;
}
.performance-metrics article {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}
.performance-metrics span,
.performance-metrics small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}
.performance-metrics strong {
  display: block;
  margin: 0.22rem 0;
  font-size: 1.25rem;
}
.performance-metrics article.good {
  border-color: #a7dfc2;
}
.performance-metrics article.needs-improvement {
  border-color: #f1d08b;
}
.performance-metrics article.poor {
  border-color: #efaaaa;
}
.performance-pages {
  display: grid;
  font-size: 0.73rem;
}
.performance-pages > div {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) repeat(5, 85px);
  gap: 0.6rem;
  align-items: center;
  min-width: 700px;
  padding: 0.5rem 0.35rem;
  border-top: 1px solid var(--line);
}
.performance-pages {
  overflow-x: auto;
}
.performance-pages span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.performance-pages strong {
  text-align: right;
  font-weight: 500;
}
.performance-pages .performance-head {
  color: var(--muted);
  border-top: 0;
  font-size: 0.68rem;
}
.performance-pages .performance-head span:not(:first-child) {
  text-align: right;
}
.retention-summary {
  margin-top: 1rem;
}
.retention-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1rem 0;
}
.retention-metrics article {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}
.retention-metrics span,
.retention-metrics small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
}
.retention-metrics strong {
  display: block;
  margin: 0.2rem 0;
  font-size: 1.25rem;
}
.cohort-table {
  min-width: 760px;
  overflow-x: auto;
  font-size: 0.7rem;
}
.retention-summary:has(.cohort-table) {
  overflow-x: auto;
}
.cohort-row {
  display: grid;
  grid-template-columns: 105px 70px repeat(8, minmax(54px, 1fr));
  gap: 0.25rem;
  align-items: center;
  padding: 0.28rem 0;
}
.cohort-head {
  color: var(--muted);
}
.retention-cell {
  padding: 0.45rem 0.25rem;
  border-radius: 4px;
  text-align: center;
}
.retention-0 {
  background: var(--surface-2);
}
.retention-1 {
  background: #eaf2ff;
}
.retention-2 {
  background: #d3e3ff;
}
.retention-3 {
  background: #b5d0ff;
}
.retention-4 {
  background: #8eb6fa;
}
.retention-5 {
  background: #6398f0;
  color: #fff;
}
.goals-summary,
.annotations-strip {
  margin-top: 1rem;
}
.goals-summary {
  min-height: 240px;
}
.goals-summary > [data-tab-panel] {
  padding-top: 0.55rem;
}
.goal-head,
.goal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 90px 72px;
  gap: 1rem;
  align-items: center;
}
.goal-head,
.property-head {
  padding: 0.35rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.7rem;
}
.goal-head span:not(:first-child),
.property-head span:not(:first-child) {
  text-align: right;
}
.goal-list,
.property-list,
.funnel-list {
  display: grid;
  gap: 0.22rem;
}
.goal-row {
  min-height: 33px;
  font-size: 0.78rem;
}
.goal-row > div {
  display: grid;
  grid-template-areas: 'stack';
  min-width: 0;
  align-items: center;
}
.goal-row span,
.goal-row progress {
  grid-area: stack;
}
.goal-row span {
  z-index: 1;
  overflow: hidden;
  padding: 0.36rem 0.48rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.goal-row progress {
  width: 100%;
  height: 29px;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: transparent;
}
.goal-row progress::-webkit-progress-bar {
  background: transparent;
}
.goal-row strong {
  text-align: right;
  font-size: 0.77rem;
  font-weight: 500;
}
.property-head,
.property-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 100px;
  gap: 1rem;
  align-items: center;
}
.property-row {
  min-height: 32px;
  padding: 0.25rem 0.45rem;
  border-radius: 4px;
  background: var(--surface-2);
  font-size: 0.78rem;
}
.property-row span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.property-row strong {
  text-align: right;
  font-size: 0.77rem;
  font-weight: 500;
}
.funnel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.25rem;
  border-bottom: 1px solid var(--line);
}
.funnel-row > div {
  display: grid;
  gap: 0.15rem;
}
.funnel-row span {
  color: var(--muted);
  font-size: 0.75rem;
}
.funnel-row > strong {
  font-size: 0.78rem;
  font-weight: 500;
}
.journey-title {
  margin: 0.55rem 0 0.25rem;
  font-size: 1rem;
}
.journey-copy {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.76rem;
}
.journey-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(240px, 1fr));
  gap: 1.35rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}
.journey-column {
  min-height: 350px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.journey-column-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
}
.journey-column-head label {
  width: min(55%, 190px);
}
.journey-column-head input {
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.55rem;
  font-size: 0.75rem;
}
.journey-list {
  max-height: 300px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 0.22rem;
  padding: 0.45rem;
}
.journey-row {
  width: 100%;
  min-height: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.42rem 0.5rem;
  border: 0;
  border-radius: 4px;
  background: #eef2ff;
  color: var(--text);
  text-align: left;
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}
.journey-row span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.journey-row strong {
  font-size: 0.74rem;
  font-weight: 500;
}
.journey-row:hover,
.journey-row.active {
  background: #dfe7ff;
}
.journey-row.result {
  cursor: pointer;
}
.journey-result {
  min-height: 300px;
}
.journey-placeholder {
  min-height: 300px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 1rem;
  color: var(--muted);
  text-align: center;
}
.journey-placeholder span {
  font-size: 1.5rem;
}
.journey-placeholder p {
  max-width: 230px;
  margin: 0.45rem 0 0;
  font-size: 0.77rem;
  line-height: 1.45;
}
html[data-theme='dark'] .journey-row {
  background: color-mix(in srgb, var(--accent), transparent 82%);
}
html[data-theme='dark'] .journey-row:hover,
html[data-theme='dark'] .journey-row.active {
  background: color-mix(in srgb, var(--accent), transparent 70%);
}
.annotations-strip > strong {
  display: block;
  margin-bottom: 0.8rem;
}
.stack-list {
  display: grid;
}
.stack-list article {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}
.stack-list time {
  color: var(--muted);
}

/* Domain settings */
.settings-shell {
  max-width: 1080px;
  margin: 0 auto;
}
.back-link {
  display: inline-block;
  margin: 0.15rem 0 0.25rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 650;
}
.settings-shell > h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.25rem);
}
.settings-divider {
  height: 1px;
  margin: 1rem 0 2rem;
  background: var(--line);
}
.settings-layout {
  display: grid;
  grid-template-columns: 265px minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
}
.settings-nav {
  display: grid;
  gap: 0.2rem;
  position: sticky;
  top: 1rem;
}
.settings-nav a {
  display: flex;
  align-items: center;
  gap: 0.52rem;
  padding: 0.58rem 0.72rem;
  border-radius: 7px;
  color: #4e515c;
  font-size: 0.83rem;
}
.settings-nav a span {
  width: 1rem;
  color: var(--muted);
  text-align: center;
}
.settings-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}
.settings-nav a.active {
  background: #ededf0;
  color: var(--text);
  font-weight: 700;
}
html[data-theme='dark'] .settings-nav a {
  color: var(--muted);
}
html[data-theme='dark'] .settings-nav a.active {
  background: var(--surface-2);
  color: var(--text);
}
.settings-content {
  display: grid;
  gap: 1.1rem;
  min-width: 0;
}
.settings-card {
  padding: 1.55rem;
}
.settings-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--line);
}
.settings-card-head h2 {
  font-size: 1.03rem;
  font-weight: 500;
}
.settings-card-head p {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.settings-card form {
  max-width: 450px;
}
.quality-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.quality-metrics article {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}
.quality-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
}
.quality-metrics strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.3rem;
}
.backup-shell {
  max-width: 1180px;
}
.backup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.backup-grid .settings-card {
  margin: 0;
}
.backup-note {
  margin: 1rem 0 0;
  font-size: 0.78rem;
}
.backup-list {
  margin-bottom: 1rem;
}
.backup-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}
.backup-actions details {
  position: relative;
}
.backup-actions summary {
  list-style: none;
  cursor: pointer;
}
.backup-actions summary::-webkit-details-marker {
  display: none;
}
.restore-form {
  position: absolute;
  z-index: 10;
  right: 0;
  top: calc(100% + 0.4rem);
  width: 280px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}
.restore-form label {
  font-size: 0.75rem;
}
.restore-safety {
  margin-bottom: 2rem;
}
.settings-card input,
.settings-card select,
.settings-card textarea {
  background: #f7f7f8;
}
html[data-theme='dark'] .settings-card input,
html[data-theme='dark'] .settings-card select,
html[data-theme='dark'] .settings-card textarea {
  background: var(--surface-2);
}
.settings-intro {
  padding-bottom: 0.3rem;
}
.settings-intro .settings-card-head {
  margin-bottom: 0;
}
.settings-content > .tabs {
  margin: -0.4rem 0 0;
  overflow-x: auto;
}
.settings-content > .form-panel {
  margin: 0;
}
.settings-content .table-grid {
  grid-template-columns: 1fr;
}
.editor-grid {
  grid-template-columns: 1fr !important;
}
.editor-grid > .stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

/* Team homepage */
.team-home {
  max-width: 1088px;
  margin: 0 auto;
}
.team-title {
  padding: 0.2rem 0 1.05rem;
  border-bottom: 1px solid var(--line);
}
.team-title h1 {
  margin: 0;
  font-size: 1.8rem;
  letter-spacing: -0.035em;
}
.team-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 2.35rem;
}
.team-search {
  width: 210px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  border: 1px solid #d1d3da;
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
}
.team-search > span:first-child {
  text-align: right;
  font-size: 1.15rem;
  line-height: 1;
}
.team-search input {
  min-width: 0;
  margin: 0;
  padding: 0.62rem 0.6rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.76rem;
}
.team-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.team-actions select {
  width: 160px;
  margin: 0;
  padding: 0.65rem 2rem 0.65rem 0.8rem;
  background-color: var(--surface);
  font-size: 0.78rem;
}
.team-actions .button {
  min-height: 42px;
  padding: 0.65rem 1rem;
  border-radius: 6px;
  font-size: 0.78rem;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 1.3rem;
  align-items: stretch;
}
.team-card {
  min-width: 0;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.team-all-card {
  grid-row: span 2;
  min-height: 439px;
  display: flex;
  flex-direction: column;
  padding: 1.45rem;
}
.team-card-head {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}
.team-card-head h2 {
  min-width: 0;
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.team-globe,
.team-site-icon {
  flex: none;
  display: grid;
  place-items: center;
}
.team-globe {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-2);
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
}
.team-site-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--accent), transparent 86%);
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 800;
}
.team-all-card .team-card-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}
.team-all-card .team-card-head h2 {
  font-size: 1.05rem;
}
.team-all-spark {
  height: 90px;
  margin: 2.15rem 0 1.2rem;
}
.team-sparkline {
  width: 100%;
  height: 100%;
  overflow: visible;
  color: var(--accent-2);
}
.team-spark-area {
  fill: currentColor;
  opacity: 0.055;
}
.team-spark-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.team-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.55rem 1.15rem;
  margin: auto 0 0;
}
.team-metric-grid dt {
  color: var(--muted);
  font-size: 0.76rem;
}
.team-metric-grid dd {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem;
  margin: 0.28rem 0 0;
}
.team-metric-grid strong {
  font-size: 1.18rem;
  letter-spacing: -0.025em;
}
.team-card-date {
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
}
.team-site-card {
  min-height: 209px;
  display: flex;
  flex-direction: column;
  padding: 1.45rem;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}
.team-site-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent), var(--line) 75%);
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.08);
}
.team-card-chart {
  display: block;
  height: 64px;
  margin: 1.25rem 0 0.6rem;
}
.team-card-menu {
  position: relative;
}
.team-card-menu summary {
  width: 24px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}
.team-card-menu summary::-webkit-details-marker {
  display: none;
}
.team-card-menu summary:hover {
  background: var(--surface-2);
  color: var(--text);
}
.team-card-menu > div {
  position: absolute;
  z-index: 5;
  right: 0;
  top: 31px;
  width: 145px;
  display: grid;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.14);
}
.team-card-menu a {
  padding: 0.45rem 0.55rem;
  border-radius: 5px;
  font-size: 0.75rem;
}
.team-card-menu a:hover {
  background: var(--surface-2);
}
.team-site-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
}
.team-site-footer > div {
  display: grid;
}
.team-site-footer strong {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.team-site-footer div span {
  color: var(--muted);
  font-size: 0.73rem;
}
.team-trend {
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 500;
}
.team-trend.up {
  color: #00a56a;
}
.team-trend.down {
  color: #ef5350;
}
.team-trend.neutral {
  color: var(--muted);
}
.team-no-results {
  grid-column: 2 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.team-no-results[hidden] {
  display: none;
}

html[data-theme='dark'] .tone-blue progress::-webkit-progress-value,
html[data-theme='dark'] .tone-orange progress::-webkit-progress-value,
html[data-theme='dark'] .tone-purple progress::-webkit-progress-value,
html[data-theme='dark'] .tone-green progress::-webkit-progress-value,
html[data-theme='dark'] .tone-red progress::-webkit-progress-value {
  background: color-mix(in srgb, var(--accent), transparent 78%);
}

@media (max-width: 1000px) {
  .topbar {
    gap: 0.7rem;
  }
  .topbar nav a {
    padding: 0.45rem;
    font-size: 0.78rem;
  }
  .metrics {
    grid-template-columns: repeat(3, 1fr);
  }
  .site-details dl {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .controls {
    width: 100%;
    justify-content: space-between;
  }
  .table-grid,
  .cards {
    grid-template-columns: 1fr;
  }
  .metric-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .metric-strip article:nth-child(3) {
    border-right: 0;
  }
  .metric-strip article:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
  .settings-layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .journey-grid {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .topbar {
    padding: 0.6rem 1rem;
    flex-wrap: wrap;
  }
  .brand span:last-child {
    display: none;
  }
  .topbar nav {
    order: 3;
    flex-basis: 100%;
  }
  .shell {
    width: min(100% - 1.5rem, 1280px);
    padding-top: 1.4rem;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .metrics article:last-child {
    grid-column: span 2;
  }
  .controls {
    align-items: stretch;
    flex-direction: column;
  }
  .periods a {
    flex: 1;
    text-align: center;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .site-row {
    grid-template-columns: auto 1fr;
  }
  .site-row > .status,
  .row-actions {
    grid-column: 2;
  }
  .site-details dl {
    grid-template-columns: 1fr;
  }
  .chart-wrap {
    height: 220px;
  }
  .plausible-header .admin-label {
    display: none;
  }
  .analytics-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .analytics-toolbar > .toolbar {
    justify-content: space-between;
  }
  .realtime-popover {
    position: fixed;
    top: 4.5rem;
    right: 1rem;
    left: 1rem;
    width: auto;
  }
  .realtime-grid {
    grid-template-columns: 1fr;
    max-height: 65vh;
    overflow-y: auto;
  }
  .revenue-metrics,
  .revenue-breakdowns,
  .performance-metrics,
  .retention-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .plausible-grid {
    grid-template-columns: 1fr;
  }
  .metric-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric-strip article:nth-child(3) {
    border-right: 1px solid var(--line);
  }
  .metric-strip article:nth-child(even) {
    border-right: 0;
  }
  .metric-strip article:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .quality-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .backup-grid {
    grid-template-columns: 1fr;
  }
  .backup-actions {
    flex-direction: column;
  }
  .restore-form {
    position: fixed;
    inset: 1rem;
    width: auto;
    height: max-content;
    margin: auto;
  }
  .settings-nav {
    position: static;
    display: flex;
    overflow-x: auto;
    padding-bottom: 0.4rem;
  }
  .settings-nav a {
    white-space: nowrap;
  }
  .editor-grid > .stack {
    grid-template-columns: 1fr;
  }
  .goal-head,
  .goal-row {
    grid-template-columns: minmax(0, 1fr) 64px 64px 54px;
    gap: 0.45rem;
  }
  .property-head,
  .property-row {
    grid-template-columns: minmax(0, 1fr) 75px 75px;
    gap: 0.45rem;
  }
  .team-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding-bottom: 1.5rem;
  }
  .team-search {
    width: 100%;
  }
  .team-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .team-actions select {
    width: 100%;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
  .team-all-card {
    grid-row: auto;
    min-height: 420px;
  }
  .team-no-results {
    grid-column: 1;
  }
}
