:root {
  --bg:#f5f7f7;
  --paper:#fff;
  --ink:#152824;
  --muted:#61746e;
  --line:#e2e9e6;
  --green:#10644f;
  --mint:#e6f5ee;
  --nav:#102c25;
  --radius:14px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:var(--bg);
  font-synthesis:none
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  font-size:14px;
  line-height:1.5
}
a {
  color:var(--green);
  text-decoration:none
}
a:hover {
  text-decoration:underline
}
button,input,select {
  font:inherit
}
button,a,input,select,summary {
  -webkit-tap-highlight-color:transparent
}
button {
  cursor:pointer
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible {
  outline:3px solid #2a9175;
  outline-offset:4px
}
h1,h2,h3,p {
  margin-top:0
}
h1 {
  font-size:34px;
  font-weight:650;
  line-height:1.15;
  letter-spacing:-1.2px;
  margin-bottom:10px
}
h2 {
  font-size:17px;
  letter-spacing:-.35px;
  font-weight:650;
  margin-bottom:4px
}
h3 {
  font-size:17px
}
small {
  display:block;
  color:var(--muted);
  font-size:12px
}
code {
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:12px;
  overflow-wrap:anywhere
}
.muted {
  color:var(--muted);
  margin-bottom:0
}
.eyebrow,.caption,.nav-caption {
  font-size:10px;
  letter-spacing:1.5px;
  font-weight:650
}
.eyebrow {
  color:var(--green);
  margin-bottom:12px
}
.caption {
  color:var(--muted);
  letter-spacing:1px
}
.sidebar {
  position:fixed;
  inset:0 auto 0 0;
  width:226px;
  background:var(--nav);
  padding:32px 18px;
  color:#edf8f2;
  display:flex;
  flex-direction:column
}
.brand {
  display:flex;
  align-items:center;
  gap:12px;
  color:white;
  font-size:27px;
  font-weight:650;
  letter-spacing:-1px;
  padding:0 14px
}
.brand:hover {
  text-decoration:none
}
.brand-caption {
  font-size:9px;
  letter-spacing:2.6px;
  display:block;
  font-weight:500;
  color:#b2cfc3;
  margin-top:-4px
}
.brand-logo-avalvi {
  display:none
}
.nav-caption {
  color:#9ebfb0;
  margin:57px 16px 15px;
  letter-spacing:1.1px
}
.sidebar nav {
  display:grid;
  gap:8px
}
.sidebar nav a {
  min-height:46px;
  padding:12px 16px;
  border-radius:8px;
  color:#bcd3c8;
  font-size:13px;
  display:flex;
  align-items:center;
  gap:13px
}
.sidebar nav a span {
  font-size:21px;
  line-height:1
}
.sidebar nav a.selected {
  background:#24483c;
  color:#e1ffee;
  box-shadow:inset 3px 0 #69e6b8
}
.sidebar nav a:hover {
  background:#204238;
  text-decoration:none
}
.sidebar-bottom {
  padding:24px 12px 0;
  border-top:1px solid #2b473d
}
.settings-nav {
  margin-top:auto;
  padding-top:24px
}
.owner {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:13px
}
.owner small {
  color:#a7c3b6;
  font-size:11px
}
.avatar {
  width:32px;
  height:32px;
  border-radius:50%;
  background:#365447;
  display:grid;
  place-items:center
}
.logout {
  color:#adc6b9;
  background:transparent;
  border:0;
  min-height:44px;
  text-align:left;
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:14px;
  font-size:12px
}
.workspace {
  margin-left:226px
}
.topbar {
  height:70px;
  background:#fff;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 40px;
  color:var(--muted);
  font-size:12px
}
.crumb {
  padding:0 14px;
  color:#becbc5
}
.private-label {
  display:flex;
  align-items:center;
  gap:8px
}
.status-dot {
  width:7px;
  height:7px;
  background:#278366;
  border-radius:50%;
  display:inline-block
}
.private-label .status-dot {
  background:#398768
}
main {
  max-width:1500px;
  margin:0 auto;
  padding:36px 40px 20px
}
.page-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:30px
}
.page-heading .muted {
  font-size:13px
}
.button {
  min-height:44px;
  border:1px solid var(--green);
  border-radius:8px;
  padding:10px 17px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  background:var(--green);
  color:white;
  font-size:13px;
  font-weight:550;
  white-space:nowrap
}
.button:hover {
  background:#0d5140;
  color:white;
  text-decoration:none
}
.button.secondary {
  background:white;
  color:var(--ink);
  border-color:#d7e1dc
}
.button.secondary:hover {
  background:#f1f6f3
}
.full {
  width:100%
}
.filters {
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px;
  margin-bottom:24px
}
.filter-grid {
  display:grid;
  grid-template-columns:minmax(180px,1.6fr) repeat(4,minmax(130px,1fr));
  align-items:end;
  gap:12px
}
.event-filter-grid {
  grid-template-columns:repeat(5,minmax(130px,1fr))
}
.filter-field {
  min-width:0
}
.filter-field label {
  font-size:11px;
  color:var(--muted);
  margin-bottom:6px;
  min-height:17px
}
.filters .errorlist {
  margin-bottom:0
}
.filters>.errorlist {
  margin-bottom:12px
}
.filters input:not([type=checkbox]),.filters select {
  height:44px;
  min-height:44px
}
.filter-presets {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px
}
.filter-presets>span {
  color:var(--muted);
  font-size:11px;
  font-weight:550
}
.filter-preset-options {
  display:flex;
  flex-wrap:wrap;
  gap:8px
}
.filter-preset {
  min-height:44px;
  padding:6px 12px;
  border:1px solid #d8e2dd;
  border-radius:999px;
  background:#fff;
  color:var(--ink);
  font-size:13px;
  font-weight:550
}
.filter-preset:hover {
  background:#f1f6f3
}
.filter-preset.is-active {
  border-color:#b8d8ca;
  background:var(--mint);
  color:var(--green)
}
.filters[aria-busy=true] {
  opacity:.72
}
label {
  display:block;
  font-weight:550;
  margin-bottom:7px;
  font-size:13px
}
input:not([type=checkbox]),select {
  display:block;
  min-height:44px;
  width:100%;
  padding:10px 12px;
  color:var(--ink);
  background:#fff;
  border:1px solid #d8e2dd;
  border-radius:7px;
  max-width:100%
}
select {
  padding-right:28px
}
input[type=checkbox] {
  width:19px;
  height:19px;
  accent-color:var(--green)
}
.section-meta {
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:11px;
  color:var(--muted);
  margin:0 2px 14px
}
.metrics {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin-bottom:24px
}
.metric {
  appearance:none;
  background:white;
  padding:22px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  color:var(--ink);
  font:inherit;
  text-align:left;
  cursor:pointer;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease
}
.metric:hover {
  border-color:#a8c9ba;
  transform:translateY(-1px)
}
.metric:focus-visible {
  outline:3px solid rgba(22,122,93,.22);
  outline-offset:2px
}
.metric>span {
  font-size:12px;
  font-weight:550;
  color:var(--muted)
}
.metric>strong {
  display:block;
  font-size:38px;
  line-height:1.15;
  font-weight:600;
  letter-spacing:-1.4px;
  margin:18px 0 12px;
  font-variant-numeric:tabular-nums
}
.metric small {
  font-size:10px
}
.metric.featured {
  background:#e8f3ed;
  border-color:#cfe4d8
}
.metric.featured strong {
  color:var(--green)
}
.panel {
  background:white;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:24px;
  margin-bottom:24px;
  min-width:0
}
.panel-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:22px
}
.panel-heading .muted {
  font-size:12px;
  margin-top:4px
}
.panel-heading>a {
  font-size:12px
}
.legend {
  display:flex;
  gap:8px;
  align-items:center;
  color:var(--muted);
  font-size:11px
}
.chart-legend {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px 16px
}
.legend-line {
  width:22px;
  border-top:2px solid #167a5d
}
.legend-line.previous {
  border-color:#83928b;
  border-top-style:dashed
}
.chart {
  position:relative;
  width:100%;
  padding:4px 0 0
}
.chart svg {
  display:block;
  width:100%;
  height:auto;
  max-height:270px;
  overflow:visible
}
.grid-line {
  stroke:#e8eeeb;
  stroke-dasharray:4 6
}
.chart-hover-line {
  stroke:#9aaba3;
  stroke-width:1;
  vector-effect:non-scaling-stroke;
  pointer-events:none
}
.axis {
  fill:#6c7d75;
  font-size:10px
}
.chart-line {
  fill:none;
  stroke:#167a5d;
  stroke-width:2.5;
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke
}
.chart-line.previous {
  stroke:#83928b;
  stroke-width:2;
  stroke-dasharray:7 6
}
.chart-point {
  fill:#fff;
  stroke:#167a5d;
  stroke-width:1.8;
  vector-effect:non-scaling-stroke;
  pointer-events:none
}
.chart-point:focus {
  pointer-events:auto
}
.chart-point:hover {
  fill:#167a5d;
  r:5
}
.chart-point:focus {
  fill:#167a5d;
  outline:none;
  r:5
}
.chart-tooltip {
  position:absolute;
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:center;
  min-width:92px;
  padding:8px 10px;
  border:1px solid rgba(22,122,93,.18);
  border-radius:8px;
  background:#fff;
  box-shadow:0 8px 24px rgba(19,45,36,.16);
  color:var(--ink);
  font-size:10px;
  line-height:1.3;
  pointer-events:none;
  transform:translate(-50%,-100%)
}
.chart-tooltip[hidden] {
  display:none
}
.chart-tooltip strong {
  color:#167a5d;
  font-size:18px;
  line-height:1
}
.chart-tooltip time {
  margin-bottom:5px;
  color:var(--muted);
  font-size:10px;
  font-variant-numeric:tabular-nums
}
.window-metrics {
  display:grid;
  grid-template-columns:repeat(3,1fr) 1.3fr;
  gap:20px;
  margin-top:18px;
  border-top:1px solid var(--line);
  padding-top:20px
}
.window-metrics div {
  display:flex;
  flex-direction:column;
  gap:4px
}
.window-metrics span {
  color:var(--muted);
  font-size:11px
}
.window-metrics strong {
  font-size:23px;
  font-weight:600;
  letter-spacing:-.5px
}
.window-metrics p {
  font-size:11px;
  color:var(--muted);
  align-self:center;
  margin:0;
  text-align:right
}
.data-details {
  margin-top:18px;
  font-size:12px
}
.data-details summary {
  padding:10px 0;
  cursor:pointer;
  color:var(--green);
  min-height:44px
}
.data-details .table-scroll {
  max-height:300px
}
.two-columns {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px
}
.table-scroll {
  overflow-x:auto
}
table {
  width:100%;
  border-collapse:collapse;
  font-size:12px
}
th {
  text-align:left;
  color:var(--muted);
  font-size:10px;
  font-weight:550;
  padding:0 12px 12px;
  border-bottom:1px solid var(--line);
  white-space:nowrap
}
td {
  padding:14px 12px;
  border-bottom:1px solid #edf1ef
}
th:first-child,td:first-child {
  padding-left:0
}
th:last-child,td:last-child {
  padding-right:0;
  text-align:right
}
tr:last-child td {
  border-bottom:0
}
td small {
  display:block;
  margin-top:4px
}
tbody tr:hover {
  background:#fafcfb
}
.country-badge {
  display:inline-flex;
  width:32px;
  height:27px;
  align-items:center;
  justify-content:center;
  border-radius:5px;
  background:#f0f4f2;
  font-size:10px;
  color:var(--muted);
  margin-right:12px
}
.retention {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  padding:14px 0 18px
}
.retention span {
  font-size:12px;
  color:var(--muted)
}
.retention strong {
  display:block;
  font-size:28px;
  font-weight:600;
  letter-spacing:-.7px;
  margin:12px 0 8px
}
.retention small {
  font-size:10px
}
.footnote {
  color:var(--muted);
  font-size:11px;
  line-height:1.65
}
.events-table td {
  vertical-align:top
}
.events-table tbody tr:nth-child(even) {
  background:#f6f9f7
}
.events-table tbody tr:hover {
  background:#edf4f0
}
.events-table td:last-child {
  text-align:left
}
.events-table code {
  overflow-wrap:anywhere
}
.event-properties {
  margin-top:7px;
  max-width:260px
}
.event-properties summary {
  color:var(--green);
  cursor:pointer
}
.event-properties code {
  display:block;
  margin-top:6px;
  color:var(--muted);
  white-space:normal
}
.pagination {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  margin-top:24px;
  color:var(--muted);
  font-size:12px
}
.returning {
  border-top:1px solid var(--line);
  margin-top:20px;
  padding-top:18px;
  display:flex;
  justify-content:space-between;
  font-size:12px
}
.platform-summary>div {
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:22px
}
.platform-summary>div:last-child {
  margin-bottom:0
}
.platform-summary strong {
  margin-left:auto;
  font-size:24px;
  font-weight:550;
  text-align:right
}
.platform-summary small {
  font-size:10px
}
.platform-icon {
  width:42px;
  height:42px;
  border-radius:12px;
  background:#edf5f0;
  color:#31574b;
  display:grid;
  place-items:center;
  font-size:24px;
  font-weight:600
}
.empty {
  text-align:center;
  padding:64px 24px
}
.empty p {
  color:var(--muted);
  font-size:13px;
  line-height:1.8;
  margin:12px 0 25px
}
.empty-symbol {
  display:grid;
  place-items:center;
  font-size:38px;
  width:72px;
  height:72px;
  border-radius:22px;
  background:var(--mint);
  color:var(--green);
  margin:0 auto 25px
}
.empty.compact {
  padding:20px
}
.app-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:24px
}
.app-card {
  margin-bottom:0
}
.app-card h2 {
  margin-bottom:6px;
  font-size:20px
}
.app-card h2 a {
  color:var(--ink)
}
.app-card-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:23px
}
.app-monogram {
  width:48px;
  height:48px;
  border-radius:13px;
  display:grid;
  place-items:center;
  background:#e6f0e9;
  color:var(--green);
  font-size:22px;
  font-weight:600
}
.badge {
  display:inline-block;
  padding:4px 9px;
  background:#e6f5ec;
  color:#246442;
  border-radius:20px;
  font-size:10px;
  white-space:nowrap
}
.badge.neutral {
  background:#f0f1f0;
  color:#626d66
}
.app-id {
  display:block;
  margin:24px 0;
  color:var(--muted);
  font-size:11px
}
.card-link {
  display:flex;
  justify-content:space-between;
  border-top:1px solid var(--line);
  padding-top:17px;
  font-size:12px
}
.form-panel {
  max-width:680px
}
.form-panel form p {
  margin-bottom:22px
}
.helptext {
  display:block;
  color:var(--muted);
  font-size:12px;
  margin-top:7px
}
.form-actions {
  display:flex;
  gap:12px;
  margin-top:28px
}
.back-link {
  display:inline-block;
  margin-bottom:22px;
  font-size:12px
}
.config-panel dl {
  margin:0 0 18px
}
.config-panel dl>div {
  display:grid;
  grid-template-columns:260px 1fr;
  gap:20px;
  padding:13px 0;
  border-bottom:1px solid #edf1ef
}
.config-panel dt {
  color:var(--muted);
  font-size:12px
}
.config-panel dd {
  margin:0;
  font-size:13px;
  overflow-wrap:anywhere
}
.copy-button,.danger-button {
  border:1px solid #dce6e0;
  background:white;
  border-radius:6px;
  padding:9px 12px;
  color:var(--green);
  font-size:11px;
  min-height:44px
}
.copy-button {
  margin-left:12px
}
.danger-button {
  color:#a12c31;
  border-color:#ecd6d7
}
.secret-box {
  display:flex;
  align-items:center;
  gap:16px;
  padding:18px;
  background:#f2f7f4;
  border:1px solid #dce7e0;
  border-radius:8px;
  margin:24px 0
}
.secret-box code {
  flex:1;
  font-size:13px;
  user-select:all
}
.notice {
  background:#eaf5ee;
  border:1px solid #c9e4d3;
  padding:14px 18px;
  border-radius:9px;
  font-size:13px;
  color:#225939
}
.notice.subtle {
  background:#f6f8f7;
  border-color:#e3eae6;
  font-size:11px;
  color:var(--muted)
}
.errorlist,.error {
  color:#a02b32;
  font-size:12px;
  padding:10px 16px;
  background:#fff0f0;
  border-radius:6px;
  list-style:none
}
.errorlist:empty {
  display:none
}
footer {
  max-width:1500px;
  margin:0 auto;
  padding:12px 40px 30px;
  display:flex;
  justify-content:space-between;
  color:#697d72;
  font-size:10px
}
footer span {
  color:#697d72
}
.login-page {
  min-height:100vh;
  display:grid;
  place-items:center;
  background:#edf3ee;
  padding:24px
}
.login-card {
  background:#fff;
  max-width:420px;
  width:100%;
  padding:40px;
  border:1px solid #dae6de;
  border-radius:20px;
  box-shadow:0 20px 70px #173d2310;
  margin:0
}
.login-card .eyebrow {
  margin:24px 0 14px
}
.login-card h1 {
  font-size:28px
}
.login-card .muted {
  font-size:13px;
  line-height:1.7
}
.login-card form {
  margin-top:28px
}
.login-card form label {
  margin-top:18px
}
.login-card .button {
  margin-top:25px
}
.login-note {
  text-align:center;
  color:var(--muted);
  font-size:11px;
  margin:24px 0 0
}
.settings-panel {
  max-width:820px
}
.theme-options {
  border:0;
  padding:0;
  margin:0;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px
}
.theme-option {
  position:relative;
  display:grid;
  grid-template-columns:112px 1fr;
  align-items:center;
  gap:18px;
  min-height:124px;
  margin:0;
  padding:16px;
  border:1px solid var(--line);
  border-radius:12px;
  cursor:pointer
}
.theme-option:hover {
  border-color:#a8c9ba
}
.theme-option:has(input:checked) {
  border-color:var(--green);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--green) 16%,transparent)
}
.theme-option input {
  position:absolute;
  top:12px;
  right:12px;
  accent-color:var(--green)
}
.theme-option strong {
  display:block;
  margin-bottom:6px;
  font-size:15px
}
.theme-option small {
  line-height:1.5
}
.theme-preview {
  position:relative;
  display:block;
  width:112px;
  height:82px;
  overflow:hidden;
  border:1px solid rgba(0,0,0,.08);
  border-radius:9px;
  background:#f5f7f7
}
.theme-preview i {
  position:absolute;
  inset:0 auto 0 0;
  width:30px;
  background:#102c25
}
.theme-preview b,.theme-preview em {
  position:absolute;
  left:40px;
  right:10px;
  height:15px;
  border-radius:4px;
  background:#fff
}
.theme-preview b { top:14px }
.theme-preview em { top:38px;background:#e8f3ed }
.theme-preview-avalvi {
  background:#fafaf9
}
.theme-preview-avalvi::after {
  content:"";
  position:absolute;
  left:40px;
  right:9px;
  bottom:12px;
  height:8px;
  border-radius:999px;
  background:linear-gradient(135deg,#6366f1,#8b5cf6 50%,#ec4899)
}
.theme-preview-avalvi img {
  position:absolute;
  top:9px;
  left:8px;
  width:24px;
  height:24px;
  object-fit:cover
}
.theme-preview-avalvi b { background:#fff;border:1px solid rgba(0,0,0,.08) }
.theme-preview-avalvi em { background:#f4f4f3 }
.theme-status {
  min-height:21px;
  margin:16px 0 0;
  color:var(--muted);
  font-size:12px
}

html[data-theme="avalvi"] {
  --bg:#fafaf9;
  --paper:#fff;
  --ink:#0a0a0f;
  --muted:#52525b;
  --line:rgba(0,0,0,.08);
  --green:#4f46e5;
  --mint:#f3f0ff;
  --nav:#fff
}
html[data-theme="avalvi"] .sidebar {
  color:#0a0a0f;
  border-right:1px solid rgba(0,0,0,.08);
  box-shadow:8px 0 30px rgba(10,10,15,.035)
}
html[data-theme="avalvi"] .brand { color:#0a0a0f }
html[data-theme="avalvi"] .brand-logo-classic { display:none }
html[data-theme="avalvi"] .brand-logo-avalvi { display:block }
html[data-theme="avalvi"] .brand-caption,
html[data-theme="avalvi"] .nav-caption,
html[data-theme="avalvi"] .owner small,
html[data-theme="avalvi"] .logout { color:#71717a }
html[data-theme="avalvi"] .sidebar nav a { color:#52525b }
html[data-theme="avalvi"] .sidebar nav a:hover { background:#f4f4f3 }
html[data-theme="avalvi"] .sidebar nav a.selected {
  color:#0a0a0f;
  background:#f4f4f3;
  box-shadow:inset 3px 0 #8b5cf6
}
html[data-theme="avalvi"] .sidebar-bottom { border-color:rgba(0,0,0,.08) }
html[data-theme="avalvi"] .avatar { color:white;background:linear-gradient(135deg,#6366f1,#8b5cf6 50%,#ec4899) }
html[data-theme="avalvi"] .topbar,
html[data-theme="avalvi"] .panel,
html[data-theme="avalvi"] .filters,
html[data-theme="avalvi"] .metric,
html[data-theme="avalvi"] input:not([type=checkbox]),
html[data-theme="avalvi"] select { background:var(--paper) }
html[data-theme="avalvi"] .metric.featured,
html[data-theme="avalvi"] .filter-preset.is-active,
html[data-theme="avalvi"] .empty-symbol,
html[data-theme="avalvi"] .platform-icon,
html[data-theme="avalvi"] .app-monogram { background:#f3f0ff }
html[data-theme="avalvi"] .metric.featured { border-color:#ddd6fe }
html[data-theme="avalvi"] .button { border-color:transparent;background:linear-gradient(135deg,#6366f1,#8b5cf6 50%,#ec4899) }
html[data-theme="avalvi"] .button:hover { background:linear-gradient(135deg,#4f46e5,#7c3aed 50%,#db2777) }
html[data-theme="avalvi"] .button.secondary { color:var(--ink);background:#fff;border-color:rgba(0,0,0,.12) }
html[data-theme="avalvi"] .status-dot { background:#8b5cf6 }
html[data-theme="avalvi"] .eyebrow { color:#7c3aed }
html[data-theme="avalvi"] a { color:#4f46e5 }
html[data-theme="avalvi"] button:focus-visible,
html[data-theme="avalvi"] a:focus-visible,
html[data-theme="avalvi"] input:focus-visible,
html[data-theme="avalvi"] select:focus-visible,
html[data-theme="avalvi"] summary:focus-visible { outline-color:#8b5cf6 }
html[data-theme="avalvi"] .chart-line,
html[data-theme="avalvi"] .chart-point { stroke:#6366f1 }
html[data-theme="avalvi"] .legend-line { border-color:#6366f1 }
html[data-theme="avalvi"] .chart-tooltip strong { color:#4f46e5 }
html[data-theme="avalvi"] tbody tr:hover { background:#fafaf9 }
.skip-link {
  position:fixed;
  top:-100px;
  left:20px;
  z-index:20;
  background:white;
  padding:12px
}
.skip-link:focus {
  top:10px
}
.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
}
@media(min-width:1600px) {
  main {
    padding-top:45px
  }
  .metrics {
    gap:20px
  }
  .metric {
    padding:25px
  }
  .metric>strong {
    font-size:43px
  }
}
@media(max-width:1100px) {
  .sidebar {
    width:190px;
    padding-left:12px;
    padding-right:12px
  }
  .workspace {
    margin-left:190px
  }
  main {
    padding:28px 24px
  }
  .topbar {
    padding:0 24px
  }
  .metrics {
    gap:12px
  }
  .metric {
    padding:18px 16px
  }
  .metric>strong {
    font-size:32px
  }
  .two-columns {
    gap:16px
  }
  .panel {
    padding:20px
  }
  .config-panel dl>div {
    grid-template-columns:220px 1fr
  }
  .retention strong {
    font-size:24px
  }
}
@media(max-width:800px) {
  .sidebar {
    width:100%;
    position:static;
    padding:16px 20px;
    display:flex;
    flex-direction:row;
    align-items:center;
    gap:20px
  }
  .brand {
    padding:0;
    font-size:22px
  }
  .brand img {
    width:30px;
    height:30px
  }
  .brand-caption {
    font-size:7px
  }
  .nav-caption,.sidebar-bottom {
    display:none
  }
  .settings-nav {
    margin-top:0;
    padding-top:0
  }
  .sidebar nav {
    display:flex;
    margin-left:auto;
    gap:4px
  }
  .sidebar nav a {
    padding:10px;
    font-size:12px
  }
  .sidebar nav a span {
    display:none
  }
  .workspace {
    margin:0
  }
  .topbar {
    height:50px;
    padding:0 20px
  }
  main {
    padding:25px 20px
  }
  .page-heading {
    gap:15px;
    margin-bottom:23px
  }
  h1 {
    font-size:29px
  }
  .page-heading .muted {
    font-size:12px
  }
  .metrics {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .two-columns {
    grid-template-columns:1fr;
    gap:0
  }
  .filter-field {
    flex-basis:calc(50% - 12px)
  }
  .filters .button {
    flex:1
  }
  .config-panel dl>div {
    grid-template-columns:1fr;
    gap:8px
  }
  .secret-box {
    flex-direction:column;
    align-items:stretch
  }
  .section-meta {
    flex-wrap:wrap
  }
  .panel-heading {
    align-items:flex-start
  }
  .legend {
    font-size:10px
  }
  .window-metrics {
    gap:12px
  }
  .window-metrics p {
    font-size:10px
  }
  footer {
    padding:8px 20px 24px
  }
  .copy-button {
    margin-left:0;
    margin-top:8px
  }
  .config-panel dd code {
    display:block
  }
  .login-card {
    padding:32px
  }
}
@media(max-width:450px) {
  .sidebar {
    padding:14px 16px;
    gap:8px
  }
  .sidebar nav a {
    font-size:11px
  }
  .topbar {
    padding:0 16px;
    font-size:10px
  }
  .private-label {
    font-size:10px
  }
  main {
    padding:24px 16px
  }
  .page-heading {
    align-items:flex-start;
    flex-direction:column;
    gap:16px
  }
  .metric>span {
    font-size:11px
  }
  .metric small {
    font-size:9px
  }
  .panel {
    padding:18px
  }
  .legend {
    display:none
  }
  .window-metrics {
    grid-template-columns:repeat(3,1fr)
  }
  .window-metrics p {
    grid-column:1 / -1;
    text-align:left
  }
  .window-metrics p br {
    display:none
  }
  .retention {
    gap:8px
  }
  .retention strong {
    font-size:24px
  }
  .caption {
    font-size:9px
  }
  .chart svg {
    min-height:145px
  }
  .login-page {
    padding:16px
  }
  .login-card {
    padding:28px
  }
  .app-grid {
    grid-template-columns:1fr
  }
  .theme-options {
    grid-template-columns:1fr
  }
  .theme-option {
    grid-template-columns:92px 1fr
  }
  .theme-preview {
    width:92px
  }
  footer span {
    display:none
  }
}
.topbar-actions {
  display:flex;
  align-items:center;
  gap:16px
}
.mobile-logout {
  display:none
}
.mobile-logout button {
  min-height:44px;
  border:0;
  background:none;
  color:var(--green);
  font-size:11px
}
@media(max-width:1300px) {
  .filter-grid,.event-filter-grid {
    grid-template-columns:repeat(3,minmax(0,1fr))
  }
}
@media(max-width:800px) {
  .mobile-logout {
    display:block
  }
  .filter-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
}
@media(prefers-reduced-motion:no-preference) {
  .button,.filter-preset,.sidebar nav a {
    transition:background-color .15s ease
  }
}

.map-country-count {
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--muted);
  font-size:11px;
  white-space:nowrap
}
.map-country-count strong {
  border-radius:6px;
  background:var(--mint);
  color:var(--green);
  padding:4px 10px;
  font-size:14px;
  font-variant-numeric:tabular-nums
}
.country-map-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 230px;
  gap:24px;
  align-items:stretch
}
.country-map-visual {
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  background:#f8faf9;
  border:1px solid #edf1ef;
  border-radius:10px;
  padding:16px 8px
}
.country-map {
  display:block;
  width:100%;
  height:auto;
  overflow:visible
}
.map-region {
  stroke:#fff;
  stroke-width:.6;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke
}
.map-region[data-map-country] {
  cursor:pointer
}
.map-level-0 { fill:#dfe7e3 }
.map-level-1 { fill:#b8decb }
.map-level-2 { fill:#82c3a6 }
.map-level-3 { fill:#4c9f7c }
.map-level-4 { fill:#247e5e }
.map-level-5 { fill:#10644f }
.map-region.is-highlighted,.map-region:focus-visible {
  stroke:#102c25;
  stroke-width:1.8;
  outline:none
}
.map-legend {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
  padding:16px 12px 0;
  color:var(--muted);
  font-size:10px
}
.map-legend-zero,.map-legend-scale {
  display:flex;
  gap:8px;
  align-items:center
}
.map-legend-zero>i {
  width:10px;
  height:10px;
  border-radius:2px;
  background:#dfe7e3
}
.map-swatches {
  display:flex;
  gap:2px;
  border-radius:2px;
  overflow:hidden
}
.map-swatches i {
  display:block;
  width:18px;
  height:8px
}
.map-swatches i:nth-child(1) { background:#b8decb }
.map-swatches i:nth-child(2) { background:#82c3a6 }
.map-swatches i:nth-child(3) { background:#4c9f7c }
.map-swatches i:nth-child(4) { background:#247e5e }
.map-swatches i:nth-child(5) { background:#10644f }
.map-detail {
  display:flex;
  flex-direction:column;
  min-width:0
}
.map-picker label {
  color:var(--muted);
  font-size:11px
}
.map-picker select {
  font-size:12px
}
.map-country-detail {
  padding-top:24px
}
.map-country-detail .eyebrow {
  display:block;
  margin-bottom:8px;
  font-size:9px
}
.map-country-detail h3 {
  font-size:20px;
  font-weight:600;
  letter-spacing:-.5px;
  margin-bottom:20px;
  overflow-wrap:anywhere
}
.map-numbers {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin:0 0 14px
}
.map-numbers dt {
  font-size:10px;
  color:var(--muted)
}
.map-numbers dd {
  margin:6px 0 0;
  font-size:25px;
  line-height:1.2;
  font-weight:600;
  color:var(--green);
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere
}
.map-unknown {
  margin-top:auto;
  border-top:1px solid var(--line);
  padding-top:14px;
  font-size:11px
}
.map-unknown strong,.map-unknown span {
  display:block
}
.map-unknown span {
  color:var(--muted);
  margin-top:4px
}
.map-data-table {
  border-top:1px solid var(--line);
  padding-top:8px
}
.map-footnote {
  margin:8px 0 0
}
@media(max-width:1100px) {
  .country-map-layout {
    grid-template-columns:minmax(0,1fr) 200px;
    gap:16px
  }
}
@media(max-width:650px) {
  .country-map-panel>.panel-heading {
    flex-wrap:wrap;
    gap:10px
  }
  .country-map-layout {
    grid-template-columns:1fr
  }
  .country-map-visual {
    padding:12px 4px
  }
  .map-legend {
    padding:12px 8px 0;
    gap:8px
  }
  .map-country-detail {
    padding-top:20px
  }
  .map-country-detail h3 {
    margin-bottom:14px
  }
}
/* Cztery pozycje nawigacji muszą mieścić się także na telefonie. */
@media(max-width:800px) {
  .sidebar { flex-wrap:wrap }
  .sidebar nav { flex-wrap:wrap }
}
@media(max-width:450px) {
  .sidebar nav { width:100%; margin-left:0; justify-content:space-between }
}
