/* Stride & Glide — design tokens and shared styles for every screen. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --ink: #0f1e33;
  --ink-2: #4b5a6e;
  --ink-3: #6b7a8f;
  --canvas: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #f1f2ef;
  --line: #e5e6e2;
  --line-2: #cfd3cd;
  --blue: #1e4fd6;
  --blue-deep: #173fb0;
  --blue-bright: #4f8bff;
  --blue-tint: #e8eefc;
  --green: #1b7f4f;
  --green-tint: #e6f4ec;
  --amber: #8a5a0e;
  --amber-tint: #fff4df;
  --rose: #b42348;
  --rose-tint: #fdeaf0;
  --violet: #5b4fcf;
  --violet-tint: #eeedfb;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 30, 51, 0.05), 0 1px 1px rgba(15, 30, 51, 0.03);
  --sidebar-width: 248px;
  --font:
    "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 500 14.5px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  background: var(--blue);
  color: #fff;
  padding: 0 16px;
  min-height: 40px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
button:hover {
  background: var(--blue-deep);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
.table-wrap:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
img {
  max-width: 100%;
}
.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
a {
  color: var(--blue);
  text-underline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin-bottom: 6px;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.015em;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 8px;
}
h3 {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.muted,
.fine-print {
  color: var(--ink-2);
}
.small,
.fine-print {
  font-size: 12.5px;
  line-height: 1.6;
}
.fine-print {
  color: var(--ink-3);
}
.eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--ink-2);
  padding: 5px 9px;
  border-radius: 999px;
  line-height: 1.2;
}
.pill.ok {
  background: var(--green-tint);
  color: var(--green);
}
.text-button {
  padding: 4px 0;
  min-height: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  gap: 6px;
  border-radius: 4px;
  justify-content: flex-start;
}
.text-button:hover {
  background: transparent;
  color: var(--blue-deep);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.secondary,
.icon-button {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-2);
}
.secondary:hover,
.icon-button:hover {
  background: var(--surface-2);
  border-color: var(--line-2);
}
.quiet {
  background: transparent;
  color: var(--ink-2);
  padding: 0 10px;
  min-height: 34px;
  font-size: 13px;
}
.quiet:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.danger {
  color: var(--rose);
}
.light-button {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}
.light-button:hover {
  background: #e8eefc;
  color: var(--ink);
}
.icon-button {
  padding: 0;
  width: 40px;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.offline {
  background: var(--line-2);
}
.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;
  z-index: 20;
  left: 20px;
  top: -80px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
}
.skip-link:focus {
  top: 10px;
}
[hidden] {
  display: none !important;
}

/* Identity */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  line-height: 1;
}
.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}
.brand-amp {
  color: var(--blue);
  font-weight: 500;
  margin: 0 0.22em;
}
.brand.on-dark {
  color: #fff;
}
.brand.on-dark .brand-amp {
  color: var(--blue-bright);
}

/* Welcome and sign-in */
.welcome {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--surface);
}
.welcome-story {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  padding: 44px clamp(32px, 6vw, 88px) 40px;
  display: flex;
  flex-direction: column;
  min-height: 700px;
}
.welcome-copy {
  position: relative;
  z-index: 1;
  margin: auto 0;
  padding: 64px 0 80px;
  max-width: 520px;
}
.welcome-copy h1 {
  font-size: clamp(40px, 4.4vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin-bottom: 20px;
}
.welcome-copy h1 em {
  font-style: normal;
  color: var(--blue-bright);
}
.welcome-copy > p {
  font-size: 16px;
  line-height: 1.65;
  color: #b6c2d4;
  max-width: 440px;
  margin-bottom: 30px;
}
.welcome-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.welcome-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #dfe6f0;
}
.welcome-points svg {
  width: 32px;
  height: 32px;
  padding: 7px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--blue-bright);
}
.welcome-art {
  position: absolute;
  right: -60px;
  bottom: -70px;
  width: 400px;
  height: 400px;
  opacity: 0.14;
  pointer-events: none;
}
.welcome-art svg {
  width: 100%;
  height: 100%;
  stroke-width: 8;
}
.welcome-foot {
  position: relative;
  z-index: 1;
  font-size: 12.5px;
  color: #8a98ad;
  margin: 0;
}
.welcome-access {
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 440px;
  padding: 56px 32px;
}
.welcome-access .pill {
  margin-bottom: 22px;
}
.welcome-access h2 {
  font-size: 28px;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 8px;
}
.welcome-access > .muted {
  font-size: 14.5px;
  margin-bottom: 0;
}
.welcome-access form {
  margin: 26px 0 18px;
}
.welcome-access form button[type="submit"] {
  width: 100%;
  justify-content: space-between;
  margin-top: 14px;
  min-height: 46px;
}
.welcome-access #change-email {
  width: 100%;
  justify-content: center;
  font-size: 12.5px;
  margin-top: 10px;
  padding: 8px;
}
.welcome-access input {
  min-height: 46px;
}
#email-code {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.25em;
  font-variant-numeric: tabular-nums;
}
#email-code::placeholder {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}
.welcome-access .fine-print + .fine-print {
  margin-top: 10px;
}

/* App frame */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 22px 14px 18px;
  display: flex;
  flex-direction: column;
  z-index: 4;
}
.sidebar .brand {
  margin: 2px 8px 26px;
}
.main-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.main-nav button {
  justify-content: flex-start;
  background: transparent;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 13.5px;
  padding: 0 12px;
  min-height: 40px;
  gap: 11px;
  border-radius: 10px;
}
.main-nav button:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.main-nav button[aria-current="page"] {
  background: var(--surface-2);
  color: var(--ink);
}
.main-nav button[aria-current="page"] svg {
  color: var(--blue);
}
.main-nav svg {
  width: 18px;
  height: 18px;
  color: var(--ink-3);
}
.sidebar-bottom {
  margin-top: auto;
  padding: 0 8px;
}
.sidebar-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
}
.sidebar-status .status-dot {
  width: 6px;
  height: 6px;
}
.version {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.app-main {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-width: 0;
}
.topbar {
  min-height: 60px;
  border-bottom: 1px solid var(--line);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
}
.mobile-brand {
  display: none;
}
#identity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
}
.avatar {
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}
#logout {
  margin-left: 2px;
}
.source-switch {
  display: inline-flex;
  align-items: center;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}
.source-switch button {
  background: transparent;
  color: var(--ink-2);
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 8px;
  gap: 7px;
  min-height: 32px;
}
.source-switch button:hover {
  color: var(--ink);
}
.source-switch button[aria-pressed="true"] {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}
.source-switch .status-dot {
  width: 6px;
  height: 6px;
}
main {
  padding: 30px 32px 0;
  max-width: 1400px;
  margin: 0 auto;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.page-head .eyebrow {
  margin-bottom: 6px;
}
.page-head .muted {
  font-size: 14px;
  margin: 0;
}
.toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.toolbar select {
  width: 148px;
  min-height: 40px;
  padding: 0 32px 0 12px;
  font-size: 13px;
  font-weight: 600;
}
.toolbar button svg {
  width: 16px;
  height: 16px;
}
.sync-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 600;
}
.sync-meta small {
  font-size: 12.5px;
  font-weight: 500;
}
.sync-meta small:not(:empty)::before {
  content: "·";
  margin: 0 6px 0 2px;
}
.notice {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13px;
}
.sample {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--amber-tint);
  border-color: #f0dfb8;
  color: var(--amber);
}
.sample .pill {
  background: #fff;
  color: var(--amber);
}
.sample .text-button {
  margin-left: auto;
  color: var(--amber);
}
.sync-notice > div {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.sync-notice progress {
  display: block;
  width: 100%;
  height: 6px;
  margin: 10px 0;
  accent-color: var(--blue);
}
.sync-notice .small {
  color: var(--ink-3);
}

/* Overview */
.overview-grid,
.overview-bottom {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.daily-brief {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: 28px;
  min-height: 220px;
  color: #fff;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
.brief-content {
  position: relative;
  z-index: 1;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.daily-brief .eyebrow {
  color: #8fa3c0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.daily-brief .status-dot {
  background: var(--blue-bright);
}
.daily-brief h2 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: #fff;
}
.daily-brief p:not(.eyebrow) {
  color: #c3cddc;
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0 0 20px;
}
.daily-brief .light-button {
  align-self: flex-start;
  margin-top: auto;
  font-size: 13px;
  padding: 0 14px;
  min-height: 38px;
}
.brief-art {
  position: absolute;
  right: -34px;
  top: -24px;
  width: 250px;
  height: 250px;
  opacity: 0.16;
  pointer-events: none;
}
.brief-art svg {
  width: 100%;
  height: 100%;
  stroke-width: 8;
}
.baseline-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.card-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
}
.card-kicker svg {
  width: 15px;
  height: 15px;
  color: var(--blue);
}
.baseline-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}
.baseline-card > p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 18px;
}
.baseline-values {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}
.baseline-values > div + div {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.baseline-values span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 2px;
}
.baseline-values strong {
  display: block;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.baseline-values small {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0;
}
.baseline-card .text-button {
  margin-top: auto;
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-heading h2 {
  margin: 0;
  font-size: 17px;
}
.section-subtitle {
  color: var(--ink-3);
  font-size: 13px;
  margin: 3px 0 0;
}
.date-tag {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  position: relative;
}
.metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}
.metric-label {
  font-size: 12.5px;
  color: var(--ink-2);
  margin: 0;
  font-weight: 600;
  letter-spacing: 0;
}
.metric-icon {
  display: grid;
  place-items: center;
  background: var(--blue-tint);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  color: var(--blue);
  flex-shrink: 0;
}
.metric-icon svg {
  width: 15px;
  height: 15px;
}
.metric[data-tone="violet"] .metric-icon {
  color: var(--violet);
  background: var(--violet-tint);
}
.metric[data-tone="rose"] .metric-icon {
  color: var(--rose);
  background: var(--rose-tint);
}
.metric[data-tone="gold"] .metric-icon {
  color: var(--amber);
  background: var(--amber-tint);
}
.metric[data-tone="green"] .metric-icon {
  color: var(--green);
  background: var(--green-tint);
}
.metric-value {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.metric-unit {
  font-size: 12px;
  margin-left: 4px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-3);
}
.metric-foot {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
}
.metric-foot .status-dot {
  width: 5px;
  height: 5px;
}
.metric .sparkline {
  width: 52px;
  height: 20px;
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: var(--blue);
}
.metric-foot.has-spark {
  padding-right: 56px;
}
#quality-note {
  margin: 12px 0 28px;
}

/* Panels, charts, tables */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  min-width: 0;
}
.chart-panel {
  margin-bottom: 28px;
}
.chart-panel select {
  font-size: 13px;
  font-weight: 600;
  width: auto;
  min-width: 170px;
  min-height: 38px;
  padding: 0 32px 0 12px;
}
.chart-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.chart-summary > strong {
  font-size: 26px;
  letter-spacing: -0.025em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.chart-summary > span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
}
.chart-summary .coverage {
  margin-left: auto;
}
.trend-chart {
  height: 220px;
  position: relative;
}
.trend-chart > svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart-grid {
  stroke: var(--line);
  stroke-width: 1;
}
.chart-label {
  fill: var(--ink-3);
  stroke: none;
  font: 600 11px var(--font);
  font-variant-numeric: tabular-nums;
}
.chart-line {
  stroke: var(--blue);
  stroke-width: 2.25;
  fill: none;
}
.chart-point {
  fill: #fff;
  stroke: var(--blue);
  stroke-width: 2;
}
.chart-point:focus {
  outline: none;
  fill: var(--blue);
  stroke-width: 6;
  stroke: rgba(30, 79, 214, 0.25);
}
.chart-point:hover {
  fill: var(--blue);
}
.chart-average-line {
  stroke: var(--ink-3);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}
.chart-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 43px,
    var(--line) 44px,
    var(--line) 45px
  );
  text-align: center;
}
.chart-empty svg {
  width: 30px;
  height: 30px;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.chart-empty p {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}
.chart-empty small {
  font-size: 12.5px;
  color: var(--ink-3);
}
.chart-panel > .fine-print {
  margin: 12px 0 0;
}
.chart-tooltip {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  z-index: 1;
}
.recent-panel {
  margin: 0;
}
.activity-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.activity-row:first-child {
  border-top: 0;
  padding-top: 2px;
}
.activity-icon {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--ink-2);
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex-shrink: 0;
}
.activity-info {
  flex: 1;
  min-width: 0;
}
.activity-info strong {
  font-size: 14px;
  font-weight: 700;
}
.activity-info small,
.activity-distance small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
}
.activity-distance {
  text-align: right;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.empty-state {
  text-align: center;
  padding: 30px 14px;
  color: var(--ink-3);
}
.empty-state svg {
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
}
.empty-state h3 {
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 6px;
}
.empty-state p {
  font-size: 13px;
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.6;
}
.conversation-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.conversation-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--blue-tint);
  color: var(--blue);
  margin-bottom: 16px;
}
.conversation-card h2 {
  font-size: 18px;
}
.conversation-card > p:not(.eyebrow) {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.6;
}
.prompt-example {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-2);
  border-radius: 12px 12px 12px 4px;
  padding: 10px 14px;
  margin: 4px 0 18px;
  align-self: flex-start;
}
.conversation-card .text-button {
  margin-top: auto;
}
.tabs {
  display: flex;
  gap: 4px;
  margin: 4px 0 16px;
  border-bottom: 1px solid var(--line);
  overflow: auto;
}
.tabs button {
  background: transparent;
  color: var(--ink-2);
  padding: 0 10px;
  min-height: 40px;
  border-radius: 0;
  font-size: 13px;
  white-space: nowrap;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs button[aria-pressed="true"] {
  color: var(--ink);
  border-bottom-color: var(--blue);
}
.tabs button:hover {
  color: var(--ink);
}
.results {
  overflow: hidden;
}
.table-wrap {
  overflow: auto;
  max-height: 580px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
th {
  text-align: left;
  color: var(--ink-3);
  background: var(--surface-2);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
}
th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fafaf8;
}
td:first-child {
  font-weight: 700;
  color: var(--ink);
}
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.comparison > div {
  background: var(--surface-2);
  padding: 22px;
  border-radius: 12px;
}
.comparison strong {
  font-size: 32px;
  display: block;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.comparison-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.comparison + p {
  margin: 16px 0 0;
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.status-grid > div {
  padding: 18px 20px;
  background: var(--surface-2);
  border-radius: 12px;
}
.status-grid span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  display: block;
}
.status-grid strong {
  font-size: 20px;
  display: block;
  line-height: 1.4;
  margin-top: 6px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
details {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
summary {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
}
pre {
  font:
    12px/1.65 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  background: var(--ink);
  color: #e3ebf7;
  padding: 18px 20px;
  border-radius: 12px;
  max-height: 350px;
  overflow: auto;
}

/* Connections and forms */
.connection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.connection-card {
  padding: 26px;
  margin: 0;
}
.connection-card .section-heading {
  align-items: center;
}
.integration-logo {
  display: grid;
  place-items: center;
  font-size: 18px;
  letter-spacing: -0.02em;
  font-weight: 800;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
}
.integration-logo svg {
  width: 20px;
  height: 20px;
}
.chat-logo {
  background: var(--surface-2);
  color: var(--ink);
}
.connection-card > p {
  font-size: 13.5px;
}
.connection-facts {
  margin: 20px 0;
}
.connection-facts > div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
  font-size: 13px;
  gap: 12px;
}
.connection-facts dt {
  color: var(--ink-3);
  font-weight: 600;
}
.connection-facts dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}
.connection-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0 12px;
}
.connection-card .fine-print {
  margin-bottom: 0;
}
.setup-steps {
  padding-left: 20px;
  font-size: 13.5px;
  color: var(--ink-2);
  margin: 18px 0 20px;
}
.setup-steps li {
  padding-left: 4px;
  margin-bottom: 10px;
}
.setup-steps li::marker {
  color: var(--ink);
  font-weight: 800;
}
.copy-field {
  background: var(--surface-2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 4px 4px 4px 12px;
  gap: 8px;
  margin-bottom: 14px;
}
.copy-field code {
  font: 600 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
  flex: 1;
  min-width: 0;
  color: var(--ink);
}
.copy-field button {
  border: 0;
  background: transparent;
  color: var(--blue);
  width: 36px;
  min-height: 36px;
  flex-shrink: 0;
}
.copy-field button:hover {
  background: #fff;
}
.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 24px 4px;
  color: var(--ink-2);
  max-width: 760px;
}
.privacy-note svg {
  color: var(--green);
  margin-top: 2px;
}
.privacy-note strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.privacy-note p {
  font-size: 13px;
  margin: 4px 0 0;
}
.onboarding {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 28px;
  margin-bottom: 28px;
}
.onboarding h2 {
  font-size: 22px;
  letter-spacing: -0.025em;
  font-weight: 800;
}
.onboarding > div > p {
  max-width: 420px;
  font-size: 14px;
}
.onboarding > div > .fine-print {
  margin: 18px 0 0;
}
.icon-tile {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  margin-bottom: 18px;
}
.benefit-list {
  padding-left: 0;
  margin: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--ink-2);
  display: grid;
  gap: 8px;
}
.benefit-list li {
  display: flex;
  align-items: center;
  gap: 9px;
}
.benefit-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}
.onboarding form > button {
  width: 100%;
  margin-top: 16px;
  min-height: 44px;
}
.onboarding form > label:first-child {
  margin-top: 0;
}
label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  margin: 14px 0 6px;
  color: var(--ink);
}
input,
select {
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  min-height: 42px;
  font-size: 14px;
  font-weight: 500;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%234b5a6e' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
input::placeholder {
  color: #8a97aa;
  font-weight: 500;
}
input:focus,
select:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  margin-top: 16px;
  line-height: 1.6;
}
.check input {
  width: 16px;
  height: 16px;
  min-height: 0;
  flex-shrink: 0;
  margin: 3px 0 0;
  accent-color: var(--blue);
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  padding: 22px 0;
  margin-top: 36px;
}
.footer-dot {
  margin: 0 6px;
}
#message {
  position: fixed;
  bottom: 24px;
  left: calc(50% + var(--sidebar-width) / 2);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(640px, 90vw);
  padding: 12px 14px 12px 18px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 30, 51, 0.25);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
}
body:has(#workspace[hidden]) #message {
  left: 50%;
}
#message.error {
  background: #8c1f3d;
}
#dismiss-message {
  background: transparent;
  padding: 0 6px;
  min-height: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  color: inherit;
  flex-shrink: 0;
}
#dismiss-message:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* OAuth consent page */
.auth-card {
  max-width: 520px;
  margin: 8vh auto;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.auth-card .brand {
  margin-bottom: 30px;
}
.auth-card h1 {
  font-size: 26px;
}
.auth-card p {
  color: var(--ink-2);
}
.auth-card form {
  margin: 24px 0 16px;
}
.auth-card button {
  width: 100%;
  min-height: 44px;
}

@media (min-width: 1650px) {
  main {
    padding-top: 40px;
  }
}
@media (max-width: 1250px) {
  :root {
    --sidebar-width: 220px;
  }
  .topbar {
    padding: 0 24px;
  }
  main {
    padding: 26px 24px 0;
  }
  .page-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .toolbar {
    align-items: flex-start;
  }
  .overview-grid,
  .overview-bottom {
    grid-template-columns: 1.35fr 1fr;
  }
  .brief-art {
    right: -110px;
    opacity: 0.1;
  }
  .metric .sparkline {
    display: none;
  }
  .metric-foot.has-spark {
    padding-right: 0;
  }
  .metric-value {
    font-size: 24px;
  }
  .onboarding {
    gap: 28px;
  }
}
@media (max-width: 1000px) {
  :root {
    --sidebar-width: 72px;
  }
  .sidebar {
    padding: 20px 12px;
    align-items: center;
  }
  .sidebar .brand {
    margin: 0 0 24px;
    gap: 0;
  }
  .sidebar .brand > span:last-child,
  .main-nav button span,
  .sidebar-bottom {
    display: none;
  }
  .main-nav {
    width: 100%;
  }
  .main-nav button {
    justify-content: center;
    padding: 0;
  }
  .main-nav svg {
    width: 20px;
    height: 20px;
  }
  .status-grid {
    grid-template-columns: 1fr 1fr;
  }
  .welcome-story {
    padding: 36px;
  }
  .welcome-copy h1 {
    font-size: 44px;
  }
  .welcome-access {
    padding: 40px 28px;
  }
}
@media (max-width: 760px) {
  :root {
    --sidebar-width: 0px;
  }
  .sidebar {
    width: auto;
    right: 0;
    top: auto;
    bottom: 0;
    height: calc(64px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-right: 0;
    border-top: 1px solid var(--line);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    z-index: 8;
    align-items: stretch;
  }
  .sidebar > .brand,
  .sidebar-bottom {
    display: none;
  }
  .main-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  .main-nav button {
    flex-direction: column;
    gap: 3px;
    padding: 4px 0;
    min-height: 0;
    border-radius: 9px;
    min-width: 0;
  }
  .main-nav button span {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
  }
  .main-nav button[aria-current="page"] {
    background: transparent;
    color: var(--blue);
  }
  .main-nav svg {
    width: 20px;
    height: 20px;
  }
  .app-main {
    width: 100%;
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
  .topbar {
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px;
    min-height: 56px;
  }
  .mobile-brand {
    display: inline-flex;
    font-size: 16px;
  }
  .mobile-brand .brand-mark {
    width: 28px;
    height: 28px;
  }
  .source-switch {
    order: 3;
    width: 100%;
    display: flex;
  }
  .source-switch button {
    flex: 1;
  }
  #identity {
    gap: 4px;
  }
  #identity #user-label {
    display: none;
  }
  #logout {
    font-size: 12.5px;
    padding: 0 8px;
  }
  .avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
  main {
    padding: 22px 16px 0;
  }
  .page-head {
    display: block;
    margin-bottom: 20px;
  }
  .page-head h1 {
    font-size: 24px;
  }
  .toolbar {
    margin-top: 16px;
    align-items: stretch;
  }
  .toolbar-actions {
    width: 100%;
  }
  .toolbar select {
    flex: 1;
    min-width: 0;
    width: auto;
  }
  .toolbar #sync {
    padding: 0 12px;
  }
  .sample {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
  }
  .sample .text-button {
    margin: 0;
  }
  .overview-grid,
  .overview-bottom {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
  }
  .daily-brief {
    min-height: 0;
    padding: 24px;
  }
  .daily-brief h2 {
    font-size: 22px;
  }
  .brief-art {
    right: -120px;
    top: auto;
    bottom: -90px;
    opacity: 0.12;
  }
  .baseline-card {
    padding: 22px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .metric {
    padding: 14px 14px 12px;
  }
  .metric-top {
    margin-bottom: 12px;
  }
  .metric-value {
    font-size: 24px;
  }
  .metric-icon {
    width: 26px;
    height: 26px;
  }
  .section-heading {
    gap: 10px;
  }
  .panel {
    padding: 20px;
  }
  .chart-panel .section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .chart-panel select {
    min-width: 0;
    width: 170px;
  }
  .chart-summary {
    flex-wrap: wrap;
    gap: 6px;
  }
  .chart-summary .coverage {
    width: 100%;
    margin: 0;
  }
  .trend-chart {
    height: 200px;
    overflow: hidden;
  }
  .chart-label {
    font-size: 12px;
  }
  .conversation-card {
    padding: 22px;
  }
  .comparison,
  .status-grid,
  .connection-grid,
  .onboarding {
    grid-template-columns: 1fr;
  }
  .comparison > div {
    padding: 18px;
  }
  .onboarding {
    gap: 22px;
    padding: 22px;
  }
  .onboarding form {
    border-top: 1px solid var(--line);
    padding-top: 20px;
  }
  .tabs {
    gap: 0;
  }
  .tabs button {
    font-size: 12.5px;
    padding: 0 9px;
  }
  .welcome {
    grid-template-columns: 1fr;
  }
  .welcome-story {
    min-height: 0;
    padding: 26px 22px 28px;
  }
  .welcome-copy {
    padding: 36px 0 20px;
  }
  .welcome-copy h1 {
    font-size: 38px;
  }
  .welcome-copy > p {
    font-size: 14.5px;
    margin-bottom: 22px;
  }
  .welcome-points {
    gap: 8px;
  }
  .welcome-points li {
    font-size: 13px;
  }
  .welcome-art {
    width: 300px;
    height: 300px;
    right: -120px;
    bottom: -120px;
    opacity: 0.1;
  }
  .welcome-foot {
    display: none;
  }
  .welcome-access {
    max-width: 480px;
    padding: 34px 22px 44px;
  }
  .welcome-access h2 {
    font-size: 26px;
  }
  footer {
    font-size: 11.5px;
    display: block;
    padding: 20px 0;
    margin-top: 28px;
  }
  footer > span {
    display: block;
    margin-bottom: 6px;
  }
  #message {
    left: 50%;
    bottom: 80px;
    max-width: calc(100vw - 24px);
    font-size: 13px;
  }
  body:has(#workspace[hidden]) #message {
    bottom: 20px;
  }
  .auth-card {
    margin: 20px 14px;
    padding: 24px;
  }
}
@media (max-width: 360px) {
  .mobile-brand {
    font-size: 14px;
  }
  .avatar {
    display: none;
  }
  .metric-value {
    font-size: 22px;
  }
  .metric-icon {
    display: none;
  }
  .welcome-copy h1 {
    font-size: 33px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
