/* Classic login (owner 2026-10-20: «вход не просил менять, вход должен был быть старый»).
   Exact 1.2.0 cascade for /login only: styles.css + admin.css + auth-workspace.css of release 1.2.0, unchanged and in the
   same order. Other pages use the current kit files; do not edit this file to match the kit. */
@font-face {
  font-family: "Inter";
  src: url("/assets/inter-v081.woff2?v=aTt31PMu6bi_yZVY") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Kumar&Solo: quiet work surfaces and one blue action color. */
  --accent: #1967d2;
  --accent-deep: #1459b6;
  --accent-soft: #edf4ff;
  --accent-wash: #c5dafa;
  --accent-row-hover: #fbfcfd;

  --workspace: #ffffff;
  --surface: #ffffff;
  --header: #f7f8fa;
  --ink: #222936;
  --ink-2: #354052;
  --ink-3: #657080;
  --ink-4: #657080;
  --line: #e5e8ed;
  --line-2: #f1f3f6;
  --line-strong: #d7dce4;

  /* Error and factual performance semantics. */
  --bad: #a83a3f;
  --bad-soft: #fbefef;
  --bad-line: #dfb4b6;
  --perf-excellent: #276746;
  --perf-excellent-soft: #e9f5ed;
  --perf-good: #4c715a;
  --perf-good-soft: #f0f6f2;
  --perf-warning: #805d12;
  --perf-warning-soft: #fff4da;
  --perf-bad: #963d42;
  --perf-bad-soft: #fbecee;

  --font-ui: "Inter", "Segoe UI", Arial, sans-serif;
  --font-display: "Inter", "Segoe UI", Arial, sans-serif;
  --font-mono: "Cascadia Mono", Consolas, ui-monospace, monospace;

  --r-panel: 6px;
  --r-filter: 6px;
  --r-control: 5px;
  --sidebar-width: 192px;
  --content-max: 1600px;
  --content-gutter: var(--space-6);
  --shadow-popover: 0 10px 24px rgba(34, 41, 54, .11);
  --z-topbar: 15;
  --z-sidebar: 20;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --text-body: .875rem;
  --text-label: .8125rem;
  --text-caption: .75rem;
  --control-height: 40px;
  --control-border: #8795a8;
}

* { box-sizing: border-box; }
html { min-width: 0; background: var(--workspace); scrollbar-gutter: stable; scroll-padding-top: 76px; }
html.calendar-open { overflow: hidden; }
body { margin: 0; min-height: 100vh; background: var(--workspace); color: var(--ink); font-family: var(--font-ui); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { color: inherit; font-family: var(--font-ui); font-size: var(--text-body); line-height: 20px; }
input, select, button { border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface); }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { border-color: var(--control-border); }
button, select { cursor: pointer; }
button:disabled, select:disabled, input:disabled { cursor: default; opacity: .55; }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline: 12px 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='m3.75 5.25 3.25 3.25 3.25-3.25' stroke='%23657080' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 14px 14px;
}
a { color: inherit; }
[hidden] { display: none !important; }
.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; }
.skip-link { position: fixed; inset: 10px auto auto 10px; z-index: 200; padding: 8px 12px; border: 1px solid var(--accent); border-radius: var(--r-control); background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; transform: translateY(-150%); transition: transform 140ms cubic-bezier(.16, 1, .3, 1); }
.skip-link:focus { transform: translateY(0); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Persistent navigation is shared across every authenticated workspace. */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: var(--z-sidebar);
  width: var(--sidebar-width);
  overflow: hidden;
  border-inline-end: 1px solid var(--line);
  background: #f8f9fb;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  padding: 0 20px;
  border-block-end: 1px solid var(--line);
  text-decoration: none;
}
.brand-mark img { display: block; width: 140px; max-width: 100%; height: auto; object-fit: contain; }
.sidebar nav { display: grid; gap: 4px; width: 100%; padding: 16px 10px; }
.side-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 5px;
  color: var(--ink-3);
  text-decoration: none;
  transition: color 120ms ease-out, background 120ms ease-out;
}
.side-link svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; }
.nav-label {
  color: inherit;
  font-size: 13px;
  font-weight: 520;
  line-height: 20px;
  opacity: 1;
  white-space: nowrap;
}
.side-link:hover { color: var(--ink); background: #eef1f5; }
.side-link.active { color: var(--accent-deep); background: var(--accent-soft); }

.app-shell { min-height: 100vh; min-width: 0; padding-inline-start: var(--sidebar-width); }
.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 8px var(--content-gutter);
  padding-inline-end: calc(var(--content-gutter) + max(0px, 100% - var(--content-max)));
  border-block-end: 1px solid var(--line);
  background: var(--surface);
}
.topbar p { margin: 0; color: var(--ink-3); font-size: 12px; }
.topbar-mark { display: none; }
.topbar-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.topbar p span { padding-inline: 7px; color: var(--line-strong); }
.topbar p strong { color: var(--ink); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.refresh-state { color: var(--ink-3); font-family: var(--font-ui); font-size: 12px; font-variant-numeric: tabular-nums; letter-spacing: .004em; }
.refresh-state.stale { color: var(--bad); font-weight: 600; }

.workspace { width: min(100%, var(--content-max)); min-width: 0; padding: var(--space-6) var(--content-gutter) 48px; }
.workspace > h1 { margin: 0; font-family: var(--font-display); font-size: 24px; line-height: 32px; font-weight: 650; letter-spacing: -.025em; }

/* Filters remain a single compact row; only the inputs carry depth. */
.filter-disclosure { margin: 18px 0 18px; }
.filter-disclosure > summary { display: none; }
.filters {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-filter);
  background: var(--surface);
}
.filter-block {
  display: grid;
  grid-template-rows: 20px var(--control-height);
  align-content: stretch;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: var(--ink-4);
}
.filter-dates { grid-column: span 3; }
.filter-pipeline, .filter-utm, .filter-manager { grid-column: span 2; }
.filter-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; min-height: 20px; }
.filter-label { display: block; color: var(--ink-2); font-size: var(--text-label); font-weight: 550; line-height: 20px; }
.filter-block > .filter-label { display: flex; align-items: center; min-height: 20px; }
.filter-block > select, .filter-block > .date-fields { align-self: stretch; }
.filter-block select, .filter-block input { min-width: 0; width: 100%; height: var(--control-height); color: var(--ink); font-size: var(--text-body); font-weight: 400; line-height: 20px; text-transform: none; }
.filter-block select { overflow: hidden; padding-block: 8px; padding-inline: 11px 38px; text-overflow: ellipsis; white-space: nowrap; }
.filter-block select:disabled { border-color: var(--line); background-color: var(--header); color: var(--ink-4); opacity: 1; }
.filter-block input { padding: 8px 11px; }
.multi-filter { position: relative; }
.multi-filter-trigger {
  position: relative;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  height: var(--control-height);
  padding: 8px 34px 8px 11px;
  overflow: hidden;
  color: var(--ink);
  font-size: var(--text-body);
  line-height: 20px;
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.multi-filter-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ink-4);
  border-bottom: 1.5px solid var(--ink-4);
  transform: translateY(-70%) rotate(45deg);
}
.multi-filter-trigger { border-color: var(--control-border); }
.multi-filter-trigger:hover { border-color: var(--ink-3); }
.multi-filter-trigger[aria-expanded="true"] { border-color: var(--accent); }
.multi-filter-trigger:disabled { background: var(--header); color: var(--ink-4); opacity: 1; }
.multi-filter-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 35;
  display: grid;
  width: max(100%, 280px);
  max-width: min(380px, calc(100vw - 32px));
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-filter);
  background: var(--surface);
  box-shadow: var(--shadow-popover);
}
.filter-utm .multi-filter-menu, .filter-manager .multi-filter-menu { right: 0; left: auto; }
.multi-filter-toolbar { padding: 2px 2px 8px; }
.multi-filter-toolbar input { width: 100%; min-height: var(--control-height); padding: 8px 12px; }
.multi-filter-list { display: grid; gap: 1px; max-height: 280px; overflow-y: auto; overscroll-behavior: contain; }
.multi-filter-choice { display: flex; align-items: center; gap: 8px; min-height: var(--control-height); padding: 8px; border-radius: var(--r-control); color: var(--ink-2); font-size: var(--text-body); line-height: 20px; cursor: pointer; }
.multi-filter-choice:hover { background: var(--header); }
.multi-filter-choice input { flex: 0 0 16px; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent-deep); }
.multi-filter-choice input:disabled + span { color: var(--ink-4); }
.multi-filter-choice span { overflow-wrap: anywhere; }
.multi-filter-empty { margin: 10px 8px; color: var(--ink-3); font-size: 13px; }
.multi-filter-actions { display: flex; justify-content: space-between; gap: 8px; padding: 8px 2px 2px; border-top: 1px solid var(--line); }
.multi-filter-actions button { min-height: var(--control-height); padding: 8px 12px; font-size: var(--text-body); font-weight: 600; }
.multi-filter-all { border-color: transparent; color: var(--accent-deep); }
.multi-filter-all:hover { background: var(--accent-soft); }
.multi-filter-apply { border-color: var(--accent); background: var(--accent); color: #fff; }
.multi-filter-apply:hover { border-color: var(--accent-deep); }
body.plan-unavailable [data-plan-column] { display: none; }
.date-fields { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 6px; }
.date-field { position: relative; display: block; min-width: 0; min-height: 38px; color: var(--ink-3); font-size: 12px; font-weight: 400; line-height: 16px; text-transform: none; }
.date-field > span { position: absolute; inset: 50% auto auto 11px; z-index: 1; color: var(--ink-4); font-size: 11px; font-weight: 600; line-height: 16px; pointer-events: none; transform: translateY(-50%); }
.date-field input { padding-inline: 34px 12px; }
.date-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: var(--control-height); padding: 8px 11px 8px 34px; border-color: var(--control-border); color: var(--ink); font-size: var(--text-body); line-height: 20px; text-align: start; }
.date-trigger-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-trigger.placeholder { color: var(--ink-4); }
.date-trigger svg { display: block; width: 17px; height: 17px; flex: 0 0 17px; align-self: center; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.date-trigger:hover, select:hover, input:hover { border-color: var(--ink-3); }
.date-trigger:hover { background: var(--header); }
.filter-reset { min-height: 24px; padding: 2px 4px; border-color: transparent; border-radius: var(--r-control); background: transparent; color: var(--ink-3); font-size: var(--text-caption); font-weight: 500; line-height: 18px; }
.filter-reset:hover { background: var(--accent-soft); color: var(--accent-deep); }

.date-popover {
  position: fixed;
  inset: auto;
  z-index: 100;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-popover);
  visibility: hidden;
}
.date-popover::backdrop { background: transparent; }
.date-calendar-header { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 4px; margin-block-end: 8px; }
.date-calendar-header strong { text-align: center; font-family: var(--font-display); font-size: 14px; font-weight: 600; text-transform: none; }
.date-nav { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-color: transparent; }
.date-nav:hover { border-color: var(--line); background: var(--header); }
.date-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.date-weekdays, .date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.date-weekdays { margin-block-end: 4px; color: var(--ink-4); font-size: 11px; font-weight: 650; line-height: 16px; text-align: center; }
.date-weekdays span { display: grid; place-items: center; height: 24px; }
.date-day { display: grid; place-items: center; aspect-ratio: 1; min-width: 0; padding: 0; border-color: transparent; border-radius: 6px; background: transparent; font-size: 13px; font-variant-numeric: tabular-nums; }
.date-day:hover:not(:disabled) { border-color: var(--line); background: var(--header); }
.date-day.outside { color: var(--ink-4); }
.date-day[aria-current="date"] { border-color: var(--accent); }
.date-day.selected { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 600; }
.date-day:disabled { color: var(--line-strong); opacity: .45; }
.date-calendar-actions { display: flex; justify-content: space-between; gap: 8px; margin-block-start: 8px; padding-block-start: 8px; border-block-start: 1px solid var(--line); }
.date-calendar-actions button { min-height: 32px; padding: 4px 10px; border-color: transparent; border-radius: var(--r-control); background: transparent; color: var(--accent-deep); font-size: 12px; font-weight: 600; }
.date-calendar-actions button:hover { border-color: var(--line); background: var(--accent-soft); }

.quiet-button { min-height: var(--control-height); padding: 8px 12px; border-radius: var(--r-control); font-size: var(--text-body); line-height: 20px; }
.quiet-button:hover { border-color: var(--ink-3); background: var(--header); }
.data-notice { margin-block: 10px; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-filter); background: var(--surface); color: var(--ink-2); font-size: 13px; }
.data-notice.error { border-color: var(--bad-line); background: var(--bad-soft); color: var(--bad); font-weight: 600; }

.panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); }
.panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 18px 20px 8px; }
.panel-heading h2 { margin: 0; font-family: var(--font-display); font-size: 16px; line-height: 24px; font-weight: 620; letter-spacing: -.012em; }
.panel-heading span { color: var(--ink-3); font-size: 12px; }
.plan-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 20px 8px; padding: 8px 0 10px; border-block-end: 1px solid var(--line); }
.plan-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 9px; min-width: 0; margin: 0; font-size: 12px; }
.plan-summary strong { color: var(--ink); font-size: 13px; font-weight: 600; }
#planContext { color: var(--ink-3); }
.plan-status { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-4); white-space: nowrap; }
.plan-status::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--line-strong); }
.plan-status.pinned { color: var(--accent-deep); font-weight: 600; }
.plan-status.pinned::before { background: var(--accent); }
.plan-status.draft { color: var(--ink); }
.plan-action { flex: 0 0 auto; }
.applied-slice { margin: 0 0 16px; font-size: 13px; line-height: 20px; color: var(--ink-3); overflow-wrap: anywhere; }
.plan-disclosure { margin: 0 20px 12px; border-bottom: 1px solid var(--line); }
.plan-disclosure > summary { display: grid; grid-template-columns: auto minmax(0,1fr) 20px; align-items: center; gap: 8px 16px; min-height: 44px; cursor: pointer; font-size: 13px; }
.plan-disclosure > summary strong { font-weight: 500; }
.plan-disclosure > summary::marker { content: ""; }
.plan-disclosure > summary::-webkit-details-marker { display: none; }
.plan-disclosure > summary svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.plan-disclosure[open] > summary svg { transform: rotate(180deg); }
.plan-disclosure .plan-bar { margin: 0; padding-top: 4px; border: 0; }
body[data-page="analytics"][data-active-tab="utm"] .plan-disclosure,
body[data-page="analytics"][data-active-tab="cohorts"] .plan-disclosure,
body[data-page="analytics"][data-active-tab="compare"] .plan-disclosure { display: none; }
body[data-page="analytics"][data-active-tab="utm"] .analytics-panel .plan-bar,
body[data-page="analytics"][data-active-tab="cohorts"] .analytics-panel .plan-bar,
body[data-page="analytics"][data-active-tab="compare"] .analytics-panel .plan-bar { display: none; }
.inner-tabs { display: flex; width: auto; max-width: calc(100% - 40px); gap: 24px; margin: 0 20px 12px; padding: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scroll-padding-inline: 12px; scroll-snap-type: inline proximity; border-bottom: 1px solid var(--line); background: var(--surface); scrollbar-width: none; }
.inner-tabs::-webkit-scrollbar { display: none; width: 0; height: 0; }
.inner-tabs button { position: relative; flex: 0 0 auto; min-height: 42px; padding: 9px 0 8px; scroll-snap-align: start; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--ink-3); font-size: 13px; font-weight: 500; white-space: nowrap; }
.inner-tabs button:hover { color: var(--ink); }
.inner-tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; }
.tab-panel { min-width: 0; padding: 8px 20px 20px; }

.table-scroll { min-width: 0; max-width: 100%; contain: inline-size layout; overflow-x: auto; scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }
.table-scroll::-webkit-scrollbar { height: 8px; }
.table-scroll::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.table-scroll::-webkit-scrollbar-track { background: transparent; }
.table-scroll::-webkit-scrollbar-thumb { border: 2px solid var(--surface); border-radius: 8px; background: var(--line-strong); }
.table-scroll-hint { display: none; }
.table-scroll[tabindex="0"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.funnel-scroll { overflow: visible; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { border: 0; }
thead tr { border-block-end: 1px solid var(--line); }
tbody tr { border-block-end: 1px solid var(--line); }
tbody tr:last-child { border-block-end: 0; }
tbody tr:hover { background: var(--accent-row-hover); }
thead th { height: 40px; padding: 8px 12px; background: var(--header); color: var(--ink-3); font-size: var(--text-label); font-weight: 500; line-height: 20px; text-align: end; }
thead th:first-child { text-align: start; }
tbody th, tbody td { height: 40px; padding: 8px 12px; font-size: var(--text-body); line-height: 20px; }
tbody th { text-align: start; font-weight: 600; }
tbody td { text-align: end; }

.metric-table { table-layout: fixed; }
.metric-table thead th:first-child { width: 46%; }
.metric-table thead th:not(:first-child) { width: 18%; }
.metric-name { display: block; }
.metric-description { display: block; margin-block-start: 2px; color: var(--ink-4); font-size: 12px; font-weight: 400; line-height: 16px; }
.metric-value { font-weight: 600; }
.empty-value { color: var(--ink-4); font-weight: 400; }
.attainment-excellent { background: var(--perf-excellent-soft); color: var(--perf-excellent); }
.attainment-good { background: var(--perf-good-soft); color: var(--perf-good); }
.attainment-warning { background: var(--perf-warning-soft); color: var(--perf-warning); }
.attainment-bad { background: var(--perf-bad-soft); color: var(--perf-bad); }
.plan-input { width: min(100%, 96px); height: var(--control-height); padding: 8px; border-radius: var(--r-control); text-align: end; font-variant-numeric: tabular-nums; }
.plan-input[readonly] { border-color: var(--line); background: var(--header); cursor: default; }
.lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.metric-group { min-width: 0; }
.metric-group h3 { margin: 0 0 10px; color: var(--ink-2); font-family: var(--font-display); font-size: 13px; font-weight: 620; line-height: 20px; }
.source-note { margin: 16px 0 0; padding-block-start: 12px; border-block-start: 1px solid var(--line); color: var(--ink-3); font-size: 12px; line-height: 1.55; }
.method-details { margin-top: var(--space-4); color: var(--ink-3); font-size: var(--text-caption); }
.method-details > summary { min-height: var(--control-height); display: list-item; padding-block: var(--space-2); color: var(--accent-deep); cursor: pointer; }
.method-details .source-note { max-width: 75ch; margin: 0; border: 0; padding: var(--space-2) 0; }
.data-retry { margin-bottom: var(--space-4); }

.analysis-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-block-end: 12px; }
.analysis-toolbar label { display: grid; gap: 4px; min-width: 220px; color: var(--ink-2); font-size: var(--text-label); font-weight: 600; }
.analysis-toolbar select { width: 100%; min-height: var(--control-height); padding-block: 8px; font-size: var(--text-body); }
.analysis-summary { margin: 0 0 6px; color: var(--ink-2); font-size: 13px; line-height: 20px; }
.analysis-filter-note { margin: 8px 0; padding: 8px 10px; border-inline-start: 1px solid var(--accent); background: var(--accent-soft); color: var(--ink-2); font-size: 12px; line-height: 18px; }
.analysis-interaction-note { margin: 4px 0 12px; color: var(--ink-4); font-size: 12px; line-height: 18px; }
.analysis-breakdown-panel .table-scroll-hint { display: block; margin: 0 0 7px; color: var(--ink-3); font-size: 12px; line-height: 16px; }
.analysis-table-scroll { max-height: min(66vh, 720px); overflow: auto; overscroll-behavior: contain; scroll-padding-block: 72px; }
.analysis-table { min-width: 1120px; }
.cohort-table { min-width: 1040px; }
.analysis-table thead th { position: sticky; top: 32px; z-index: 2; white-space: normal; }
.analysis-table thead .analysis-group-row th { top: 0; z-index: 3; height: 32px; padding-block: 4px; border-block-end: 1px solid var(--line-2); color: var(--ink-4); font-size: 11px; }
.analysis-table thead .analysis-key-column { left: 0; z-index: 4; width: 220px; max-width: 220px; }
.analysis-table th:not(.analysis-key-column), .analysis-table td { min-width: 112px; }
.analysis-table tbody tr, .analysis-table tbody tr:hover { background: var(--surface); cursor: default; }
.analysis-table tbody .analysis-row-preliminary, .analysis-table tbody .analysis-row-preliminary:hover { color: var(--ink-3); }
.analysis-table tbody .analysis-key-column { position: sticky; left: 0; z-index: 1; width: 220px; max-width: 220px; border-inline-end: 1px solid var(--line); background: var(--surface); }
.analysis-key-value { display: block; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.analysis-key-meta, .analysis-cell-secondary { display: block; margin-block-start: 1px; color: var(--ink-4); font-size: 12px; font-weight: 400; line-height: 16px; white-space: normal; }
.analysis-cell-primary, .analysis-status { display: block; color: var(--ink); font-weight: 600; }
.analysis-unavailable { display: inline-grid; justify-items: end; color: var(--ink-4); }
.analysis-unavailable small { margin-block-start: 1px; font-size: 12px; font-weight: 400; line-height: 16px; white-space: nowrap; }
.analysis-section-row th { position: static; height: 32px; padding: 6px 10px; background: var(--header); color: var(--ink-3); font-size: 11px; font-weight: 600; line-height: 16px; }
.analysis-empty { height: 96px; padding: 24px; color: var(--ink-4); text-align: center; white-space: normal; }

.compare-controls { display: flex; align-items: end; gap: 12px; margin-block-end: 12px; }
.compare-controls label { display: grid; gap: 4px; min-width: 220px; color: var(--ink-2); font-size: var(--text-label); font-weight: 600; }
.compare-controls select { width: 100%; height: var(--control-height); padding-block: 8px; padding-inline: 12px 38px; font-size: var(--text-body); line-height: 20px; }
.compare-table { table-layout: fixed; }
.compare-table thead th:first-child { width: 40%; }
.compare-table thead th:nth-child(2), .compare-table thead th:nth-child(3) { width: 22%; }
.compare-table thead th:last-child { width: 16%; }
.comparison-section th { height: 32px; padding: 6px 10px; background: var(--header); color: var(--ink-3); font-size: 11px; font-weight: 600; line-height: 16px; }
.comparison-context { margin: 0 0 16px; color: var(--ink-3); font-size: 13px; line-height: 20px; }
.comparison-sample { display: block; margin-top: 6px; color: var(--ink-3); font-size: 12px; line-height: 18px; font-weight: 400; overflow-wrap: anywhere; }
.comparison-progress { display: block; width: 100%; height: 6px; margin-top: 8px; appearance: none; border: 0; border-radius: 2px; overflow: hidden; background: var(--header); }
.comparison-progress::-webkit-progress-bar { background: var(--header); }
.comparison-progress::-webkit-progress-value { background: var(--accent); }
.comparison-progress::-moz-progress-bar { background: var(--accent); }
.comparison-winner { color: var(--perf-excellent); box-shadow: inset 2px 0 0 var(--perf-excellent); background: rgba(39, 103, 70, .035); }
.comparison-loser { color: var(--perf-bad); box-shadow: inset 2px 0 0 var(--perf-bad); background: rgba(150, 61, 66, .035); }
.comparison-delta-good { color: var(--perf-excellent); font-weight: 650; }
.comparison-delta-bad { color: var(--perf-bad); font-weight: 650; }
.comparison-neutral { color: var(--ink); }
.comparison-empty { padding: 24px 12px; color: var(--ink-4); text-align: center; }
.mobile-cell-label { display: none; }

.funnel-table { table-layout: fixed; }
.funnel-table thead th:nth-child(1) { width: 24%; }
.funnel-table thead th:nth-child(2) { width: 16%; }
.funnel-table thead th:nth-child(3) { width: 42%; }
.funnel-table thead th:nth-child(4) { width: 18%; }
.bar-cell { text-align: start; white-space: nowrap; }
.stage-name { display: block; }
progress.funnel-progress { appearance: none; display: inline-block; inline-size: calc(100% - 60px); block-size: 7px; vertical-align: middle; border: 0; border-radius: 9999px; background: var(--line-2); color: var(--accent); }
progress.funnel-progress::-webkit-progress-bar { border-radius: 6px; background: var(--line-2); }
progress.funnel-progress::-webkit-progress-value { border-radius: 6px; background: var(--accent); }
progress.funnel-progress::-moz-progress-bar { border-radius: 6px; background: var(--accent); }
.bar-label { display: inline-block; min-inline-size: 52px; margin-inline-start: 8px; vertical-align: middle; color: var(--ink-2); font-size: 13px; font-weight: 500; text-align: end; }
tr.funnel-drop { box-shadow: inset 2px 0 0 var(--bad); }
tr.funnel-drop th, tr.funnel-drop td { background: #fff8f8; }
.drop-note { display: block; margin-block-start: 1px; color: var(--bad); font-size: 11px; font-weight: 600; line-height: 15px; white-space: nowrap; }
.funnel-panel .panel-heading { padding-block: 16px 6px; }
.funnel-panel .inner-tabs { margin-block-end: 6px; }
.funnel-panel .tab-panel { padding-block: 0 16px; }
.funnel-table thead th { height: 40px; padding-block: 8px; }
.funnel-table tbody th, .funnel-table tbody td { height: 40px; padding-block: 8px; }
.funnel-compare-table thead th:first-child { width: 40%; }
.funnel-compare-table thead th:nth-child(2), .funnel-compare-table thead th:nth-child(3) { width: 22%; }
.funnel-compare-table thead th:last-child { width: 16%; }

/* The shared login stylesheet follows the same white and blue controls. */
.login-page { display: grid; place-items: center; padding: 32px; background: var(--workspace); }
.login-shell { display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: center; gap: 88px; width: min(100%, 1000px); }
.login-brand { display: flex; align-items: center; min-width: 0; padding-inline-start: 24px; }
.login-brand img { display: block; width: 100%; max-width: 420px; height: auto; object-fit: contain; }
.login-panel { padding: 34px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); }
.login-panel h1 { margin: 0 0 8px; font-family: var(--font-display); font-size: 22px; line-height: 30px; font-weight: 650; letter-spacing: -.025em; }
.login-panel > p { margin: 0 0 26px; color: var(--ink-3); font-size: 14px; }
.login-panel > .admin-error { color: var(--bad); font-weight: 600; }
.login-panel form { display: grid; gap: 9px; }
.login-panel label { font-size: 13px; font-weight: 600; }
.login-panel input { min-height: 44px; padding: 10px 12px; }
.login-panel button { min-height: 44px; margin-block-start: 8px; border-color: var(--accent); border-radius: var(--r-control); background: var(--accent); color: #fff; font-weight: 600; }
.login-panel button:hover { border-color: var(--accent-deep); background: var(--accent-deep); }
.form-error { margin-block-end: 16px; padding: 10px 12px; border: 1px solid var(--bad-line); border-radius: var(--r-control); background: var(--bad-soft); color: var(--bad); font-size: 13px; font-weight: 600; }

@media (max-width: 1240px) {
  :root { --content-gutter: 22px; }
  .workspace { padding: 24px var(--content-gutter) 40px; }
  .filters { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .filter-dates { grid-column: span 3; }
  .filter-pipeline, .filter-utm, .filter-manager { grid-column: span 2; }
  .lead-grid { grid-template-columns: 1fr; }
  .compare-controls { align-items: stretch; flex-wrap: wrap; }
}

/* Keep both date values and calendar icons readable through narrow desktop widths. */
@media (min-width: 1241px) and (max-width: 1699px) {
  .filters { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .filter-dates { grid-column: span 3; }
  .filter-pipeline, .filter-utm, .filter-manager { grid-column: span 2; }
}

@media (min-width: 821px) and (max-width: 959px) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-block { grid-column: span 1; }
  .filter-dates, .filter-manager { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-block { grid-column: span 1; }
  .filter-dates, .filter-manager { grid-column: 1 / -1; }

  .compare-panel .table-scroll { overflow: visible; }
  .compare-table, .compare-table tbody { display: block; min-width: 0; }
  .compare-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .compare-table tbody { display: block; }
  .compare-table tr { display: grid; grid-template-columns: 1fr 1fr; border-block-end: 1px solid var(--line); background: var(--surface); }
  .compare-table tbody th { grid-column: 1 / -1; height: auto; min-height: 40px; padding: 7px 10px; border-block-end: 1px solid var(--line-2); background: var(--header); }
  .compare-table .comparison-section { display: grid; grid-template-columns: 1fr; }
  .compare-table .comparison-section th { min-height: 30px; border-block-end: 0; }
  .compare-table tbody td { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 8px; height: auto; min-height: 38px; padding: 7px 10px; text-align: end; }
  .compare-table tbody td:nth-of-type(1) { border-inline-end: 1px solid var(--line); }
  .compare-table tbody td:nth-of-type(3) { grid-column: 1 / -1; border-block-start: 1px solid var(--line-2); }
  .compare-table .mobile-cell-label { display: block; color: var(--ink-4); font-size: 11px; text-align: start; }
  .compare-table .comparison-sample, .compare-table .comparison-progress, .compare-table .metric-unavailable { grid-column: 1 / -1; }

  .login-shell { grid-template-columns: 1fr 380px; gap: 36px; }
  .login-brand { padding-inline-start: 0; }
}

@media (max-width: 700px) {
  :root { --content-gutter: var(--space-3); }
  html { scroll-padding-bottom: 72px; }
  body:not(.login-page) { padding-block-end: 62px; }

  .sidebar { inset: auto 0 0; width: auto; height: 62px; overflow: visible; border: 0; border-block-start: 1px solid var(--line); background: var(--surface); }
  .sidebar > .brand-mark { display: none; }
  .sidebar nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; width: auto; padding: 5px 4px; }
  .side-link { flex-direction: column; justify-content: center; gap: 3px; width: 100%; min-height: 49px; padding: 3px 2px; border-radius: 5px; font-size: 11px; }
  .side-link svg { width: 19px; height: 19px; flex-basis: 19px; }
  .nav-label { max-width: 100%; overflow: hidden; opacity: 1; font-size: 11px; line-height: 15px; text-overflow: ellipsis; }
  .side-link.active { background: var(--accent-soft); }

  .app-shell { padding-inline-start: 0; }
  .topbar { position: sticky; min-height: 52px; padding: 6px var(--content-gutter); gap: 8px; }
  .topbar > p { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 650; }
  .topbar-mark { display: block; width: 96px; height: 36px; flex: 0 0 96px; object-fit: contain; }
  .topbar > p span, .topbar > p strong { display: none; }
  .topbar-actions { gap: 7px; min-width: 0; margin-inline-start: auto; }
  .refresh-state { max-width: min(44vw, 190px); overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions .quiet-button { min-width: 44px; min-height: 44px; padding: 8px 12px; font-size: var(--text-caption); }

  .workspace { padding: 20px var(--content-gutter) 28px; }
  .workspace > h1 { font-size: 21px; line-height: 29px; }

  .filter-disclosure { margin-block: 12px; }
  .filter-disclosure > summary { display: grid; grid-template-columns: auto 1fr 18px; align-items: center; gap: 9px; min-height: 48px; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--r-filter); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 600; list-style: none; }
  .filter-disclosure > summary::-webkit-details-marker { display: none; }
  .filter-disclosure > summary::marker { content: ""; }
  .filter-disclosure-copy { color: var(--ink-3); font-size: 11px; font-weight: 400; text-align: end; }
  .filter-disclosure > summary svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-4); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform 140ms ease-out; }
  .filter-disclosure[open] > summary svg { transform: rotate(180deg); }
  .filter-disclosure:not([open]) > .filters { display: none; }
  .filters { grid-template-columns: 1fr; gap: 14px; margin-block-start: 8px; padding: 15px; }
  .filter-block, .filter-dates, .filter-pipeline, .filter-utm, .filter-manager { grid-column: auto; }
  .filter-block { grid-template-rows: auto auto; align-content: start; }
  .filter-block > .filter-label { min-height: 0; }
  .filter-head { min-height: 44px; }
  .filter-label { font-size: 12px; }
  .date-fields { grid-template-columns: 1fr 1fr; }
  .filter-reset { min-width: 44px; min-height: 44px; margin: 0; padding: 7px 10px; }
  .filter-block select, .filter-block input, .date-trigger { min-height: 44px; height: 44px; }
  .multi-filter-trigger { min-height: 44px; height: 44px; }
  .filter-block .multi-filter-menu {
    position: fixed;
    top: var(--filter-menu-top, 8px);
    right: 10px;
    left: 10px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    width: auto;
    max-width: none;
    max-height: var(--filter-menu-max-height, calc(100dvh - 16px));
    overflow: hidden;
  }
  .multi-filter-list { min-height: 0; max-height: none; overflow-y: auto; }
  .multi-filter-toolbar input { min-height: 44px; height: 44px; }
  .multi-filter-actions button, .method-details > summary, .data-retry { min-height: 44px; }
  .plan-input { height: 44px; }
  .multi-filter-choice { min-height: 44px; align-items: center; }
  .multi-filter-choice input { margin-top: 0; }
  .date-popover { padding: 5px; }
  .date-calendar-header { grid-template-columns: 44px 1fr 44px; margin-block-end: 4px; }
  .date-nav { width: 44px; height: 44px; }
  .date-weekdays, .date-grid { gap: 0; }
  .date-day { min-width: 44px; min-height: 44px; aspect-ratio: auto; }
  .date-calendar-actions { margin-block-start: 4px; padding-block-start: 4px; }
  .date-calendar-actions button { min-width: 44px; min-height: 44px; padding: 8px; }

  .panel { border-radius: var(--r-panel); }
  .panel-heading { padding: 16px 14px 8px; }
  .panel-heading h2 { font-size: 16px; line-height: 24px; }
  .plan-bar { align-items: stretch; flex-direction: column; gap: 10px; margin: 0 14px 12px; padding-block: 7px 12px; }
  .plan-summary { align-items: baseline; font-size: 11px; }
  .plan-action { width: 100%; min-height: 44px; }
  .inner-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: max-content; gap: 18px; max-width: calc(100% - 28px); margin: 0 14px 12px; padding: 0; }
  .inner-tabs button { min-height: 44px; padding: 9px 0; font-size: 12px; }
  .tab-panel { padding: 8px 12px 18px; }
  .analysis-breakdown-panel { padding-block-end: 26px; }
  .analysis-toolbar { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .analysis-toolbar label { min-width: 0; width: 100%; }
  .analysis-toolbar select { min-height: 44px; height: 44px; }
  .analysis-table-scroll { max-height: min(68dvh, 620px); }
  .analysis-table thead .analysis-key-column,
  .analysis-table tbody .analysis-key-column { width: 132px; max-width: 132px; }
  .analysis-table th:not(.analysis-key-column), .analysis-table td { min-width: 104px; }

  thead th, tbody th, tbody td { height: auto; min-height: 40px; padding: 6px 8px; font-size: 12px; }
  .metric-table thead th:first-child { width: 40%; }
  .metric-table thead th:not(:first-child) { width: 20%; }
  .table-scroll { scrollbar-width: none; }
  .table-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .table-scroll-hint { display: block; margin: 0 0 7px; color: var(--ink-3); font-size: 11px; line-height: 15px; }
  .metric-description { font-size: 11px; }
  .plan-input { width: 100%; height: 44px; padding: 8px; font-size: 16px; }
  .compare-controls label { min-width: 0; width: 100%; }

  /* Funnel is one ledger, not a stack of nested cards. */
  .funnel-scroll { overflow: visible; }
  .funnel-table, .funnel-table tbody { display: block; }
  .funnel-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .funnel-table tbody { display: block; }
  .funnel-table tr { display: grid; grid-template-columns: 1fr auto auto; gap: 3px 10px; min-height: 80px; padding: 8px 10px; border-block-end: 1px solid var(--line); background: var(--surface); }
  .funnel-table tr:last-child { border-block-end: 0; }
  .funnel-table tbody th { display: flex; grid-column: 1 / -1; grid-row: 1; align-items: baseline; justify-content: space-between; gap: 8px; height: 18px; min-height: 18px; padding: 0; background: transparent; font-size: 13px; }
  .funnel-table tbody td { display: flex; align-items: baseline; gap: 5px; height: 18px; min-height: 18px; padding: 0; text-align: end; }
  .funnel-table tbody td .mobile-cell-label { display: block; color: var(--ink-4); font-size: 11px; font-weight: 500; line-height: 15px; }
  .funnel-table tbody td:nth-of-type(1) { grid-column: 1; grid-row: 2; justify-self: start; }
  .funnel-table tbody td:nth-of-type(3) { grid-column: 2 / -1; grid-row: 2; }
  .funnel-table td.bar-cell { display: grid; grid-template-columns: auto 1fr auto; grid-column: 1 / -1; grid-row: 3; align-items: center; gap: 7px; height: 20px; min-height: 20px; white-space: normal; }
  .funnel-table td.bar-cell .mobile-cell-label { grid-column: 1; }
  .funnel-table progress.funnel-progress { grid-column: 2; inline-size: 100%; }
  .funnel-table .bar-label { grid-column: 3; min-inline-size: 32px; margin: 0; font-size: 11px; }
  .funnel-table .drop-note { margin: 0; overflow-wrap: anywhere; color: var(--bad); font-size: 11px; line-height: 14px; text-align: end; white-space: normal; }

  .login-page { padding: 18px; }
  .login-shell { grid-template-columns: 1fr; gap: 22px; width: min(100%, 400px); }
  .login-brand { justify-content: center; padding: 0; }
  .login-brand img { max-width: 320px; }
  .login-panel { padding: 28px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media (forced-colors: active) {
  select { appearance: auto; -webkit-appearance: auto; padding-inline: 12px; background-image: none; }
  progress.funnel-progress { border: 1px solid CanvasText; }
  tr.funnel-drop { border-inline-start: 2px solid CanvasText; box-shadow: none; }
}

/* Source analysis: four questions, one honest scale per comparison. */
.insight-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 32px; }
.insight-section { min-width: 0; padding-block: 16px 8px; border-top: 1px solid var(--line); }
.insight-section h3 { margin: 0 0 8px; font-size: 18px; line-height: 26px; font-weight: 600; }
.insight-section h4 { margin: 0 0 8px; font-size: 16px; line-height: 24px; }
.insight-note { margin: 0 0 16px; font-size: 13px; line-height: 20px; color: var(--ink-3); overflow-wrap: anywhere; }
.insight-ranking, .insight-funnel, .insight-quality, .insight-money-ranking { display: grid; gap: 4px; list-style: none; margin: 0; padding: 0; }
.insight-ranking, .insight-money-ranking { max-block-size: min(55vh, 480px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scroll-padding-block: 8px; }
.insight-ranking:focus-visible, .insight-money-ranking:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.insight-money-ranking > ul { display: grid; gap: 4px; list-style: none; margin: 0; padding: 0; }
.insight-source, .insight-funnel li, .insight-quality li, .insight-money-ranking li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 8px; align-items: start; padding: 10px 8px; text-align: left; }
.insight-source { width: 100%; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; }
.insight-source:hover { background: var(--header); }
.insight-source[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.insight-row-label { font-size: 14px; line-height: 21px; overflow-wrap: anywhere; min-width: 0; }
.insight-row-value { font-size: 16px; line-height: 22px; font-weight: 600; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.insight-row-label small, .insight-row-value small { display: block; font-size: 12px; line-height: 18px; font-weight: 400; color: var(--ink-3); }
.insight-bar, .insight-no-chart { grid-column: 1 / -1; width: 100%; height: 8px; display: block; }
.insight-bar-track { fill: #eef1f6; }
.insight-bar-fill { fill: var(--accent); }
.insight-bar.secondary .insight-bar-fill { fill: #64748b; }
.insight-reset { margin-bottom: 8px; }
.insight-show-all { margin-top: 12px; }
.insight-money-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; margin: 16px 0; }
.insight-money-summary dt { color: var(--ink-3); font-size: 13px; line-height: 20px; }
.insight-money-summary dd { margin: 4px 0 0; font-size: 20px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.insight-reconciliation { margin: 16px 0 8px; font-size: 13px; line-height: 20px; }
.insight-empty { padding: 24px 0; color: var(--ink-3); }
.insight-details { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 12px; }
.insight-details > summary { cursor: pointer; padding: 8px 0; color: var(--accent); font-size: 14px; }
.insight-details .table-scroll { margin-top: 12px; }
.insight-cohort-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.insight-cohort-table thead th { color: var(--ink-3); font-size: 12px; font-weight: 500; text-align: left; padding: 12px 10px; background: var(--header); }
.insight-cohort-table th:first-child { width: 26%; }
.insight-cohort-table td, .insight-cohort-table tbody th { padding: 14px 10px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.insight-cohort-table strong { font-size: 16px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.insight-cohort-table small { display: block; margin-top: 4px; color: var(--ink-3); font-size: 12px; line-height: 18px; font-weight: 400; }
.insight-cohort-table .insight-bar { margin-top: 8px; }
.insight-cohort-group th { background: var(--header); font-size: 13px; font-weight: 600; }
.insight-week { border: 0; padding: 0; background: transparent; text-align: left; color: var(--accent); font: inherit; font-weight: 600; line-height: 22px; cursor: pointer; }
.insight-week[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 4px; }
.insight-week-detail { padding: 16px 0; }
.insight-week-detail h4 { margin: 0; font-size: 16px; line-height: 24px; }
.insight-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.insight-detail-heading button { flex: 0 0 auto; min-height: 44px; }
.insight-detail-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; }
.insight-detail-row > td { text-align: left; }
.metric-records { width: 100%; min-width: 0; table-layout: fixed; }
.metric-records thead th:first-child { width: 38%; }
.metric-records thead th:not(:first-child) { width: auto; }
.lag-records thead th:first-child { width: 28%; }
.metric-records th, .metric-records td { padding: 12px 10px; height: auto; vertical-align: middle; white-space: normal; overflow-wrap: anywhere; }
.metric-records .metric-name { font-size: 14px; line-height: 21px; font-weight: 600; }
.metric-records .metric-description { font-size: 12px; line-height: 18px; margin-top: 4px; }
.metric-records .metric-value { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.metric-unavailable { display: block; margin-top: 4px; color: var(--ink-3); font-size: 12px; line-height: 18px; font-weight: 400; }
.metric-records .plan-input { max-width: 130px; width: 100%; }
.lead-grid .metric-group { padding: 12px 0 0; border-top: 1px solid var(--line); }
.lead-grid .metric-group h3 { margin: 0 0 12px; font-size: 18px; line-height: 26px; }
@media (max-width: 700px) {
  .metric-records, .metric-records tbody { display: block; }
  .metric-records thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .metric-records tbody tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .metric-records tbody th { width: auto; grid-column: 1 / -1; }
  .metric-records tbody th, .metric-records tbody td { padding: 0; border: 0; text-align: left; }
  .metric-records .mobile-cell-label { display: block; margin-bottom: 4px; font-size: 12px; line-height: 18px; color: var(--ink-3); }
  .metric-records .plan-input { max-width: none; height: 44px; font-size: 16px; }
  .metric-records .metric-value { font-size: 18px; line-height: 26px; }
  .metric-records tbody tr > td:nth-of-type(1) { grid-column: 1; }
  body.plan-unavailable .metric-records tbody tr { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 900px) { .insight-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
@media (max-width: 700px) {
  .insight-section { padding-top: 12px; }
  .insight-section h3 { font-size: 17px; line-height: 24px; }
  .insight-source { min-height: 64px; }
  .insight-note { margin-bottom: 12px; }
  .insight-cohort-table, .insight-cohort-table tbody { display: block; }
  .insight-cohort-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .insight-cohort-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .insight-cohort-table td, .insight-cohort-table tbody th { width: auto; padding: 0; border: 0; }
  .insight-cohort-table th { grid-column: 1 / -1; }
  .insight-cohort-table tbody th:first-child { width: auto; }
  .insight-cohort-table td::before { content: attr(data-label); display: block; color: var(--ink-3); font-size: 12px; line-height: 18px; margin-bottom: 4px; }
  .insight-cohort-table tr.insight-cohort-group { display: block; background: var(--header); padding: 10px 8px; }
  .insight-week { min-height: 44px; }
  .plan-disclosure { margin-inline: 14px; }
  .plan-disclosure > summary { grid-template-columns: minmax(0,1fr) 20px; padding-block: 8px; gap: 4px 12px; }
  .plan-disclosure .plan-status { grid-column: 1; grid-row: 2; }
  .plan-disclosure > summary svg { grid-column: 2; grid-row: 1 / 3; }
  .filter-disclosure > summary { grid-template-columns: 1fr 18px; }
  .filter-disclosure-copy { grid-row: 2; grid-column: 1; text-align: left; font-size: 12px; line-height: 18px; }
  .filter-disclosure > summary svg { grid-row: 1 / 3; grid-column: 2; }
  .compare-table .metric-description { font-size: 12px; line-height: 18px; }
  .funnel-compare-table .comparison-sample, .funnel-compare-table .comparison-progress { grid-column: 1 / -1; }
  .insight-cohort-table tr.insight-detail-row { display: block; padding-block: 0; }
  .insight-detail-row > td { display: block; width: 100%; }
  .insight-detail-row > td::before { display: none; }
  .insight-detail-heading { align-items: flex-start; flex-direction: column; gap: 0; }
  .insight-detail-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .insight-reset, .insight-show-all, .insight-details > summary { min-height: 44px; }
}

body[data-page="admin"] .app-shell { --content-max: 1200px; }
.admin-workspace { max-width: var(--content-max); }
.admin-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4,16px); margin-bottom: var(--space-6,24px); }
.admin-title-group { display: grid; gap: var(--space-2,8px); min-width: 0; }
.admin-back { justify-self: start; min-height: var(--control-height,40px); padding: 5px 0; border: 0; background: none; color: var(--accent-deep); font-size: var(--text-label,13px); }
.admin-back:hover { text-decoration: underline; text-underline-offset: 3px; }
.admin-heading h1 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 650; letter-spacing: -.025em; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; }
.admin-heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.admin-toolbar .admin-heading-actions { margin-inline-start: auto; }
.admin-workspace:has(#invitationsTab[aria-selected="true"]) .admin-search { display: none; }
.admin-primary, .admin-secondary, .admin-danger { min-height: var(--control-height,40px); padding: 7px 12px; border-radius: var(--r-control); font-size: var(--text-label,13px); font-weight: 600; }
.admin-primary { color: #fff; border-color: var(--accent); background: var(--accent); }
.admin-primary:hover { background: var(--accent-deep); }
.admin-secondary { color: var(--ink); background: var(--surface); }
.admin-secondary:hover { background: var(--header); }
.admin-danger { color: var(--bad); border-color: var(--bad-line); background: var(--surface); }
.admin-danger:hover { background: var(--bad-soft); }
.admin-error { margin: 10px 0; color: var(--bad); font-size: 13px; overflow-wrap: anywhere; }
.admin-hint { margin: 8px 0; color: var(--ink-3); font-size: 12px; overflow-wrap: anywhere; }
.admin-tabs { display: flex; gap: 22px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.admin-tabs button { min-height: 40px; padding: 7px 0 10px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--ink-3); font-weight: 500; }
.admin-tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--ink); font-weight: 600; }
.admin-field { display: grid; align-content: start; align-items: start; gap: var(--space-2,8px); min-width: 0; color: var(--ink-3); font-size: var(--text-label,13px); font-weight: 500; }
.admin-field input, .admin-field select { width: 100%; min-width: 0; height: var(--control-height,40px); min-height: var(--control-height,40px); padding: 7px 10px; color: var(--ink); font-size: var(--text-label,13px); font-weight: 400; }
.admin-field input[readonly] { background: var(--header); }
.admin-field-hint { color: var(--ink-3); font-size: 12px; line-height: 1.5; font-weight: 400; }
.admin-search { flex: 1 1 220px; max-width: 330px; }
.admin-table-wrap { max-width: 100%; overflow-x: auto; border-block: 1px solid var(--line); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { padding: 11px 12px; background: var(--header); color: var(--ink-3); text-align: left; font-size: 12px; font-weight: 500; }
.admin-table td { padding: 16px 12px; vertical-align: middle; border-top: 1px solid var(--line); overflow-wrap: anywhere; text-align: left; }
.admin-table th:first-child, .admin-table td:first-child { width: 36%; }
.admin-table th:nth-child(2), .admin-table td:nth-child(2) { width: 32%; }
.admin-table tr:hover td { background: #fafbfd; }
.admin-table th:last-child { text-align: right; }
.admin-table td:last-child { width: 240px; text-align: right; }
#usersRows > tr > td:last-child > .admin-hint { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
#usersRows > tr > td:last-child:not(:has(button)) > .admin-profile-link { margin-inline-end: 0; }
@media (min-width: 761px) {
  .admin-table td:last-child button { white-space: nowrap; }
  .admin-table td:last-child > button { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
}
@media (min-width: 761px) and (max-width: 1050px) {
  #usersRows .admin-profile-link { display: flex; width: max-content; margin-inline: auto 0; }
}
.admin-person { display: grid; gap: 4px; line-height: 20px; }
.admin-person strong { font-weight: 600; }
.admin-person small { color: var(--ink-3); font-size: 13px; }
.admin-cell-label { display: none; }
.admin-status { display: inline-block; font-size: 12px; color: var(--ink-3); }
.admin-status.active { color: #276746; }
.admin-empty { margin: 0; padding: 24px 14px; color: var(--ink-3); font-size: 13px; }
.admin-editor { padding-top: 4px; }
.admin-editor form { max-width: 980px; }
.admin-form-section { margin-bottom: 28px; }
.admin-form-section.admin-permissions { margin-bottom: 0; }
.admin-form-section .admin-hint:empty { display: none; }
.admin-form-section h3 { margin: 0 0 var(--space-4,16px); font-size: 15px; line-height: 22px; font-weight: 600; }
.admin-permissions-heading { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: var(--space-3,12px); }
.admin-editor h2, .invite-result h2 { margin: 0 0 18px; font-size: 18px; font-weight: 600; }
.admin-form-grid { display: grid; align-items: start; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.admin-permissions { padding-top: 24px; border-top: 1px solid var(--line); }
.admin-preset { width: 330px; max-width: 100%; margin-bottom: var(--space-4,16px); }
.permission-matrix { max-height: none; overflow: visible; padding-inline-end: var(--space-2,8px); border-block: 1px solid var(--line); scroll-padding-block: var(--space-3,12px); }
.permission-section { min-width: 0; margin: 0; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); }
.permission-section:last-child { border-bottom: 0; }
.permission-section legend { float: left; width: 170px; padding: 4px var(--space-4,16px) 0 0; font-size: 14px; line-height: 20px; font-weight: 600; }
.permission-controls { display: grid; grid-template-columns: minmax(170px,.8fr) minmax(0,2fr); align-items: start; gap: var(--space-3,12px); margin-left: 170px; }
.permission-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: var(--space-2,8px) var(--space-4,16px); }
.permission-prerequisite { grid-column: 1 / -1; margin: 0; color: var(--ink-3); font-size: 12px; line-height: 20px; }
.permission-label { display: flex; align-items: start; gap: var(--space-2,8px); min-height: var(--control-height,40px); padding-block: 4px; color: var(--ink); font-size: var(--text-label,13px); line-height: 20px; }
.permission-label.permission-read { font-weight: 600; }
.permission-label input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); }
.permission-label small { display: block; margin-top: 3px; color: var(--ink-3); font-size: 12px; }
.permission-unavailable { grid-column: 1 / -1; color: var(--ink-3); font-size: 12px; }
.admin-editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.admin-editor-actions .admin-danger { margin-left: auto; }
.admin-editor-footer { margin-top: 20px; padding-top: var(--space-4,16px); border-top: 1px solid var(--line); }
.admin-editor-footer .admin-editor-actions { margin: 0; }
.admin-editor-footer .admin-error { margin: 0 0 var(--space-3,12px); }
.invite-result { max-width: 760px; padding: 18px 0; }
.admin-dialog { width: min(440px,calc(100vw - 32px)); padding: 22px; border: 1px solid var(--line-strong); border-radius: var(--r-panel); background: var(--surface); color: var(--ink); }
.admin-dialog::backdrop { background: rgba(34,41,54,.28); }
.admin-dialog h2 { margin: 0 0 12px; font-size: 18px; }
.admin-dialog p { font-size: 13px; overflow-wrap: anywhere; }
.admin-dialog .admin-editor-actions { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; }
.admin-dialog .admin-editor-actions > button { width: 100%; min-height: 44px; margin-left: 0; white-space: normal; }
.login-modes { display: flex; gap: 18px; margin: 20px 0; border-bottom: 1px solid var(--line); }
.login-modes button { min-height: 38px; padding: 6px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--ink-3); }
.login-modes button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.activation-form { display: grid; gap: 12px; }
.activation-form label { font-size: 13px; }
.activation-form input { width: 100%; min-height: 42px; padding: 9px 11px; }
.activation-form button { width: 100%; min-height: 42px; }
@media (max-width: 760px) {
  .admin-workspace { padding: 18px var(--content-gutter) 90px; }
  .admin-heading { align-items: start; gap: 12px; }
  .admin-heading h1 { font-size: 22px; line-height: 30px; }
  .admin-heading { flex-wrap: wrap; }
  .admin-heading-actions { width: 100%; justify-content: flex-end; }
  .admin-toolbar { gap: 12px; }
  .admin-heading > button { max-width: 170px; }
  .admin-form-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .admin-back, .admin-primary, .admin-secondary, .admin-danger, .admin-tabs button { min-height: 44px; }
  .admin-field input, .admin-field select { height: 44px; min-height: 44px; font-size: 16px; }
  .admin-search { max-width: none; }
  .admin-preset { width: 100%; max-width: none; }
  .admin-permissions-heading { display: block; }
  .admin-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table td:first-child, .admin-table td:nth-child(2) { width: 100%; }
  .admin-table tr + tr { border-top: 1px solid var(--line-strong); }
  .admin-table td { height: auto; min-height: 0; padding: 5px 12px; border: 0; }
  .admin-cell-label { display: inline; color: var(--ink-3); font-size: var(--text-caption,12px); }
  .admin-table td button { min-height: 44px; }
  .admin-table td:first-child { padding-top: 14px; }
  .admin-table td:last-child { width: 100%; text-align: left; padding-bottom: 14px; }
  .permission-section legend { float: none; width: auto; padding: 0 0 10px; }
  .permission-controls { grid-template-columns: minmax(0,1fr); margin-left: 0; gap: var(--space-2,8px); }
  .permission-actions { grid-template-columns: minmax(0,1fr); padding-inline-start: var(--space-6,24px); }
  .permission-label { min-height: 44px; }
  .admin-editor-actions .admin-danger { margin-left: 0; }
  .admin-editor-actions > button { min-height: 44px; }
  .admin-dialog .admin-editor-actions { justify-content: flex-start; }
  .activation-form input { font-size: 16px; }
}
@media (pointer: coarse) {
  .admin-primary, .admin-secondary, .admin-danger, .admin-back, .admin-tabs button, .login-modes button, .admin-field input, .admin-field select { min-height: 44px; }
  .permission-label { min-height: 44px; align-items: center; }
}

/* Stripe's single-column sign-in anatomy; existing authentication flows stay intact. */
.login-page { display: grid; place-items: center; min-height: 100dvh; padding: 40px 24px; background: var(--surface); }
.login-page .login-shell { display: grid; grid-template-columns: minmax(0,1fr); gap: 28px; width: min(100%,420px); }
.login-page .login-brand { justify-content: center; padding: 0; }
.login-page .login-brand img { display: block; width: 160px; max-width: 100%; height: auto; }
.login-page .login-panel { min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.login-page .login-panel h1 { margin: 0; color: var(--ink); font-size: 22px; line-height: 30px; font-weight: 650; letter-spacing: -.02em; text-align: center; }
.login-page .login-panel > p { margin: 8px 0 0; color: var(--ink-3); font-size: 14px; line-height: 21px; text-align: center; }
.login-page .login-modes { display: flex; justify-content: center; gap: 24px; margin: 24px 0 20px; border-bottom: 1px solid var(--line); }
.login-page .login-modes button { width: auto; min-height: 44px; margin: 0; padding: 8px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--ink-3); font-size: 13px; font-weight: 500; }
.login-page .login-modes button[aria-pressed="true"] { border-bottom-color: var(--accent); color: var(--ink); font-weight: 600; }
.login-page .login-modes button:hover { color: var(--ink); background: transparent; }
.login-page .login-panel form { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; margin: 0; }
.login-page .login-panel form > .admin-hint { margin: 0 0 8px; font-size: 13px; line-height: 20px; }
.login-page .login-panel label { display: block; margin: 8px 0 0; color: var(--ink-2); font-size: 13px; line-height: 20px; font-weight: 500; }
.login-page .login-panel input { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; background: var(--surface); font-size: 14px; }
.login-page .login-panel form > button { width: 100%; min-height: 44px; margin-top: 16px; padding: 10px 16px; font-size: 14px; font-weight: 600; }
.login-page .login-panel .form-error { margin: 0 0 12px; overflow-wrap: anywhere; }
.login-page .login-panel .activation-form { margin-top: 24px; }
.login-page .login-panel > .admin-error { color: var(--bad-ink,#b42318); }
.login-page .login-panel > .activation-recovery { margin-top: 24px; }
.activation-recovery .admin-primary { display: flex; align-items: center; justify-content: center; min-height: 44px; text-decoration: none; }
@media (max-width: 760px) {
  .login-page { padding: 32px 24px; }
  .login-page .login-shell { gap: 24px; }
  .login-page .login-brand img { width: 144px; }
  .login-page .login-panel input { font-size: 16px; }
}

/* Login Form glass/underline structure: https://21st.dev/@minhxthanh/components/login-form
   Aurora layers adapted from Aceternity UI (MIT): https://ui.aceternity.com/components/aurora-background
   Only login changes; activation retains the shared rules above. */
html:has(.login-page[data-page="login"]) { background: #18181b; color-scheme: dark; scrollbar-gutter: auto; }
.login-page[data-page="login"] { position: relative; isolation: isolate; padding: max(32px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(32px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left)); background: #18181b; color: #f8fafc; color-scheme: dark; }
.login-page[data-page="login"] .login-aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.login-page[data-page="login"] .login-aurora-lights { --aurora: repeating-linear-gradient(100deg,#3b82f6 10%,#a5b4fc 15%,#93c5fd 20%,#ddd6fe 25%,#60a5fa 30%); --dark-gradient: repeating-linear-gradient(100deg,#000 0%,#000 7%,transparent 10%,transparent 12%,#000 16%); position: absolute; inset: -10px; background-image: var(--dark-gradient),var(--aurora); background-size: 300%,200%; background-position: 50% 50%,50% 50%; filter: blur(10px); opacity: .5; }
.login-page[data-page="login"] .login-aurora-lights::after { content: ""; position: absolute; inset: 0; background-image: var(--dark-gradient),var(--aurora); background-size: 200%,100%; background-attachment: fixed; mix-blend-mode: difference; animation: login-aurora 60s linear infinite; }
/* Bounds foreground contrast even at the lightest point of the moving bands. */
.login-page[data-page="login"] .login-aurora::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center,rgb(0 0 0 / .6) 0%,rgb(0 0 0 / .12) 80%); }
.login-page[data-page="login"] .login-shell { position: relative; z-index: 1; grid-template-columns: minmax(0,1fr); gap: 0; width: min(100%,384px); }
.login-page[data-page="login"] .login-panel { padding: 32px; border: 0; border-radius: 16px; background: rgb(255 255 255 / .1); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.login-page[data-page="login"] .login-content { min-width: 0; width: 100%; }
.login-page[data-page="login"] .login-wordmark { margin: 0 0 28px; color: #f8fafc; font-size: 28px; line-height: 36px; font-weight: 700; letter-spacing: -.03em; text-align: center; }
.login-page[data-page="login"] .login-modes { justify-content: center; margin: 0 0 24px; border-color: rgb(255 255 255 / .2); }
.login-page[data-page="login"] .login-modes button { color: #e2e8f0; background: transparent; }
.login-page[data-page="login"] .login-modes button[aria-pressed="true"] { color: #fff; border-bottom-color: #93c5fd; }
.login-page[data-page="login"] .login-modes button:hover { color: #fff; background: transparent; }
.login-page[data-page="login"] .login-panel form { gap: 24px; }
.login-page[data-page="login"] .login-field { position: relative; min-width: 0; padding-top: 16px; }
.login-page[data-page="login"] .login-field input { width: 100%; min-height: 48px; padding: 12px 0 8px; border: 0; border-bottom: 2px solid #cbd5e1; border-radius: 0; appearance: none; background: transparent; color: #f8fafc; caret-color: #93c5fd; font-size: 16px; line-height: 24px; box-shadow: none; transition: border-color 160ms ease; }
.login-page[data-page="login"] .login-field label { position: absolute; top: 29px; left: 0; margin: 0; color: #e2e8f0; font-size: 16px; line-height: 24px; pointer-events: none; transform-origin: left top; transition: transform 160ms ease,color 160ms ease; }
.login-page[data-page="login"] .login-field input:not(:placeholder-shown) + label,
.login-page[data-page="login"] .login-field input:focus + label,
.login-page[data-page="login"] .login-field input:autofill + label { transform: translateY(-27px) scale(.8125); }
.login-page[data-page="login"] .login-field input:hover { border-bottom-color: #f8fafc; }
.login-page[data-page="login"] .login-field input:focus { border-bottom-color: #93c5fd; }
.login-page[data-page="login"] .login-field input:focus + label { color: #bfdbfe; }
.login-page[data-page="login"] .login-field input:focus-visible { outline: none; border-bottom-width: 3px; border-bottom-color: #93c5fd; }
.login-page[data-page="login"] button:focus-visible { outline: 2px solid #93c5fd; outline-offset: 4px; }
/* Clip the browser's autofill background to the glyphs so the glass stays transparent. */
.login-page[data-page="login"] .login-field input:is(:autofill, :-webkit-autofill) { -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: #f8fafc; caret-color: #93c5fd; box-shadow: none; }
.login-page[data-page="login"] .login-panel form > button { min-height: 48px; margin: 8px 0 0; padding: 12px 16px; border-color: #1967d2; border-radius: 8px; background: #1967d2; color: #fff; font-size: 16px; line-height: 24px; touch-action: manipulation; transition: background-color 160ms ease; }
.login-page[data-page="login"] .login-panel form > button:hover:not(:disabled) { border-color: #1459b6; background: #1459b6; }
.login-page[data-page="login"] .login-panel .form-error { margin: 0; padding: 12px; border-color: #fda4af; background: rgb(69 10 10 / .9); color: #ffe4e6; font-size: 14px; line-height: 20px; }
@keyframes login-aurora { from { background-position: 50% 50%,50% 50%; } to { background-position: 350% 50%,350% 50%; } }
@media (max-width: 640px) {
  .login-page[data-page="login"] { padding: max(24px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left)); }
  .login-page[data-page="login"] .login-panel { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .login-page[data-page="login"] .login-aurora-lights::after { animation: none; }
  .login-page[data-page="login"] .login-field input,
  .login-page[data-page="login"] .login-field label,
  .login-page[data-page="login"] button { transition: none; }
}
@media (forced-colors: active) {
  .login-page[data-page="login"] .login-aurora { display: none; }
  .login-page[data-page="login"] .login-field input { border-bottom-color: CanvasText; }
  .login-page[data-page="login"] .login-field input:is(:autofill, :-webkit-autofill) { -webkit-background-clip: border-box; background-clip: border-box; -webkit-text-fill-color: CanvasText; caret-color: CanvasText; box-shadow: none; }
}
/* 1.3.4 (A4 F7, WCAG 2.2.2 level A): the aurora must not move forever. login-legacy.js adds .login-aurora-paused to
   <body> 5 s after load; the animation stops on its current frame, so the page at rest keeps the same look. */
.login-page[data-page="login"].login-aurora-paused .login-aurora-lights::after { animation-play-state: paused; }
