@font-face { font-family: Switzer; src: url('./Switzer-Regular.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Switzer; src: url('./Switzer-Medium.otf') format('opentype'); font-weight: 500 800; font-display: swap; }

:root {
  --ink: #14212a;
  --ink-2: #273341;
  --muted: #687083;
  --muted-2: #9096a5;
  --canvas: #f4f6f7;
  --panel: #ffffff;
  --line: #e1e3ea;
  --line-strong: #d1d4de;
  --accent: #294f63;
  --accent-dark: #153344;
  --accent-soft: #edf3f5;
  --green: #138a62;
  --green-soft: #eaf8f1;
  --amber: #b57408;
  --amber-soft: #fff6df;
  --red: #b93643;
  --red-soft: #fff0f2;
  --blue: #2c78a9;
  --blue-soft: #eaf5fb;
  --sidebar: #14212a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--canvas); color: var(--ink); font-family: Switzer, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, a { color: inherit; font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { display: block; max-width: 100%; }
.app-icon { width: 17px; height: 17px; flex: 0 0 auto; }
.mobile-gate { display: none; }
.desktop-experience { height: 100vh; overflow: hidden; }

.tour-header {
  height: 58px;
  margin: 12px 20px 0;
  padding: 0 10px 0 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  border: 1px solid rgb(219 221 228 / .96);
  border-radius: 16px;
  background: rgb(255 255 255 / .94);
  box-shadow: 0 12px 32px -28px rgb(23 35 43 / .55);
  backdrop-filter: blur(18px);
}
.site-brand, .gate-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.site-brand img, .gate-brand img { width: 23px; height: 22px; object-fit: contain; }
.site-brand span, .gate-brand span { display: flex; flex-direction: column; line-height: 1; }
.site-brand strong, .gate-brand strong { font-size: 15px; font-weight: 500; letter-spacing: .01em; }
.site-brand small, .gate-brand small { margin-top: 3px; font-size: 6px; letter-spacing: .18em; text-transform: uppercase; }
.tour-header-context { display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--muted); font-size: 11px; }
.tour-header-context strong { color: var(--ink); font-weight: 500; }
.tour-header-context > span:last-child { padding-left: 9px; border-left: 1px solid var(--line); }
.tour-header-actions { display: flex; align-items: center; gap: 7px; }
.tour-header-actions > a:not(.nav-exit) { width: 38px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); font-size: 11px; font-weight: 500; text-decoration: none; }
.tour-header-actions > a:not(.nav-exit):hover { background: #f2f4f5; color: var(--ink); }
.nav-exit { min-height: 38px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 11px; background: var(--ink); color: white; font-size: 11px; font-weight: 500; text-decoration: none; }

.tour-layout {
  height: calc(100vh - 70px);
  min-height: 610px;
  padding: 14px 20px 18px;
  display: grid;
  grid-template-columns: clamp(250px, 21.5vw, 292px) minmax(760px, 1fr);
  gap: 16px;
}
.tour-story {
  min-height: 0;
  padding: 28px 24px 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 20px 52px -44px rgb(23 35 43 / .55);
}
.tour-kicker { display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.tour-kicker span:first-child { padding-right: 10px; border-right: 1px solid var(--line); color: var(--ink); letter-spacing: .04em; }
.tour-story h1 { margin: 22px 0 0; font-size: clamp(31px, 2.6vw, 40px); line-height: 1; letter-spacing: -.047em; font-weight: 500; }
.tour-story .story-top > p { margin: 18px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.tour-step-nav { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; position: relative; }
.tour-step-nav::before { position: absolute; top: 34px; bottom: 17px; left: 17px; width: 1px; background: var(--line); content: ''; }
.tour-step-nav button { min-height: 42px; padding: 4px 6px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 16px; align-items: center; gap: 8px; position: relative; border: 0; border-radius: 10px; background: transparent; color: var(--muted); text-align: left; }
.tour-step-nav button:hover { background: #f7f7f9; color: var(--ink); }
.tour-step-nav button .stage-icon { width: 30px; height: 30px; display: grid; place-items: center; z-index: 1; border: 1px solid var(--line); border-radius: 9px; background: white; color: #858b99; }
.tour-step-nav button .stage-icon .app-icon { width: 15px; height: 15px; }
.tour-step-nav button > span:nth-child(2) { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.tour-step-nav button small { color: #a3a7b2; font-size: 9px; letter-spacing: .05em; }
.tour-step-nav button strong { color: inherit; font-size: 11px; font-weight: 500; }
.tour-step-nav button > i { opacity: 0; display: grid; place-items: center; }
.tour-step-nav button > i .app-icon { width: 14px; height: 14px; }
.tour-step-nav button.active { background: #edf3f5; color: var(--ink); }
.tour-step-nav button.active .stage-icon { border-color: var(--ink); background: var(--ink); color: white; box-shadow: 0 5px 12px -8px var(--ink); }
.tour-step-nav button.active > i { opacity: 1; color: var(--accent); }
.tour-step-nav button.complete .stage-icon { border-color: #d3dbe0; background: #f2f5f6; color: #526575; }
.tour-controls { margin-top: 16px; display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 9px; }
.tour-control { height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 11px; background: white; font-size: 11px; font-weight: 500; }
.tour-control .app-icon { width: 15px; height: 15px; }
.tour-control:disabled { opacity: .35; cursor: default; }
.tour-progress { height: 3px; overflow: hidden; border-radius: 99px; background: #ececf1; }
.tour-progress span { width: 16.67%; height: 100%; display: block; border-radius: inherit; background: var(--accent); transition: width .35s ease; }

.product-frame { min-width: 0; min-height: 0; overflow: hidden; border: 1px solid #d9dfe3; border-radius: 18px; background: white; box-shadow: 0 20px 52px -40px rgb(23 35 43 / .58); }
.app-shell { height: 100%; display: grid; grid-template-columns: 182px minmax(0, 1fr); }
.app-sidebar { min-height: 0; padding: 20px 12px 14px; display: flex; flex-direction: column; position: relative; overflow: hidden; background: var(--sidebar); color: white; }
.app-sidebar::after { position: absolute; inset: 0; background: linear-gradient(155deg, rgb(255 255 255 / .035), transparent 36%, rgb(0 0 0 / .08)); content: ''; pointer-events: none; }
.app-mark { padding: 0 9px 24px; display: flex; align-items: center; gap: 8px; z-index: 1; }
.app-mark img { width: 21px; height: 19px; object-fit: contain; filter: brightness(0) invert(1); }
.app-mark > span { display: flex; flex-direction: column; line-height: 1; }
.app-mark strong { font-size: 14px; font-weight: 500; }
.app-mark small { margin-top: 3px; font-size: 5px; letter-spacing: .18em; }
.app-sidebar nav { display: flex; flex-direction: column; gap: 3px; z-index: 1; }
.app-sidebar nav button { min-height: 39px; padding: 0 10px; display: grid; grid-template-columns: 19px minmax(0, 1fr); align-items: center; gap: 9px; border: 0; border-radius: 9px; background: transparent; color: rgb(255 255 255 / .6); text-align: left; }
.app-sidebar nav button b { overflow: hidden; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.app-sidebar nav button .app-icon { width: 17px; height: 17px; }
.app-sidebar nav button:hover { background: rgb(255 255 255 / .08); color: white; }
.app-sidebar nav button.active { background: rgb(255 255 255 / .14); color: white; }
.app-nav-divider { margin: 11px 8px; border-top: 1px solid rgb(255 255 255 / .11); }
.app-sidebar-foot { margin-top: auto; padding: 13px 8px 0; display: flex; align-items: center; gap: 8px; z-index: 1; border-top: 1px solid rgb(255 255 255 / .1); }
.app-sidebar-foot > span { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; background: rgb(255 255 255 / .13); font-size: 9px; }
.app-sidebar-foot div { min-width: 0; display: flex; flex-direction: column; }
.app-sidebar-foot strong { overflow: hidden; font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.app-sidebar-foot small { margin-top: 2px; color: rgb(255 255 255 / .45); font-size: 7px; }

.app-workspace { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; background: #f8f9fa; }
.workspace-header { min-height: 52px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); background: white; }
.workspace-identity { min-width: 0; display: flex; align-items: center; gap: 8px; }
.workspace-identity button { width: 27px; height: 27px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #7f8594; }
.workspace-identity button:hover { background: #f0f1f4; color: var(--ink); }
.workspace-identity button .app-icon { width: 15px; height: 15px; }
.workspace-identity > span { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; background: #eef2f4; color: var(--ink); }
.workspace-identity > span .app-icon { width: 15px; height: 15px; }
.workspace-identity strong { overflow: hidden; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.workspace-user { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #bc3d0c; color: white; font-size: 9px; font-weight: 500; }
.evolution-strip { min-height: 48px; padding: 0 12px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); background: white; box-shadow: 0 4px 14px -14px rgb(23 35 43 / .5); }
.evolution-strip > strong { color: #8e94a2; font-size: 9px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.period-picker { min-width: 0; padding: 3px; display: flex; align-items: center; gap: 2px; overflow: hidden; border-radius: 9px; background: #f2f4f5; }
.period-picker button, .evolution-actions button { min-height: 29px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: 6px; background: transparent; color: #656c7b; font-size: 9px; font-weight: 500; white-space: nowrap; }
.period-picker button[data-evolution-period] { flex: 1 1 0; }
.period-picker button.active { background: var(--ink); color: white; box-shadow: 0 3px 7px rgb(23 35 43 / .16); }
.period-picker button.period-step { flex: 0 0 24px; padding: 0; color: #9ba0ad; }
.period-picker button.period-step .app-icon { width: 13px; height: 13px; }
.period-picker .evolution-detail-button { flex: 0 0 28px; width: 28px; padding: 0; border-left: 1px solid #d7d8df; border-radius: 0 6px 6px 0; color: var(--ink); }
.period-picker .evolution-detail-button .app-icon { width: 13px; height: 13px; }
.evolution-actions { display: flex; align-items: center; gap: 4px; }
.evolution-actions button { min-height: 30px; border: 1px solid var(--line); background: white; color: #444a58; }
.evolution-actions button .app-icon { width: 13px; height: 13px; }
.evolution-actions button:last-child { width: 30px; padding: 0; }

.tour-screen { min-height: 0; flex: 1; position: relative; overflow: auto; scrollbar-width: thin; scrollbar-color: #d2d4dc transparent; }
.screen-view { min-height: 100%; padding: 18px; animation: screen-in .28s ease both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.screen-header { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.screen-header > div { min-width: 0; }
.screen-header p { margin: 0; color: var(--muted-2); font-size: 10px; font-weight: 500; letter-spacing: .075em; text-transform: uppercase; }
.screen-header h2 { margin: 3px 0 0; font-size: 21px; line-height: 1.18; font-weight: 500; letter-spacing: -.025em; }
.screen-header > div > span { margin-top: 4px; display: block; color: var(--muted); font-size: 11px; line-height: 1.45; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 8px 22px -22px rgb(23 35 43 / .4); }
.app-button { min-height: 34px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 9px; background: white; font-size: 11px; font-weight: 500; text-decoration: none; }
.app-button .app-icon { width: 14px; height: 14px; }
.app-button.primary { border-color: var(--ink); background: var(--ink); color: white; }
.app-button.primary:hover { background: #1b2c3d; }
.scope-pill, .evidence-count, .ready-pill { padding: 6px 0; display: inline-flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line-strong); color: #596071; font-size: 10px; white-space: nowrap; }
.ready-pill { color: var(--green); }
.evidence-count .app-icon, .ready-pill .app-icon { width: 14px; height: 14px; }
.screen-next { margin-top: 12px; padding: 12px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); }
.screen-next > div { display: flex; align-items: center; gap: 9px; }
.screen-next > div > .app-icon { width: 19px; height: 19px; color: var(--green); }
.screen-next > div span { display: flex; flex-direction: column; }
.screen-next strong { font-size: 11px; font-weight: 500; }
.screen-next small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.screen-next.compact { margin-top: 14px; }

/* Sources */
.coverage-summary { margin-bottom: 12px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 13px; background: white; }
.coverage-summary > div { min-width: 0; padding: 13px 14px; display: grid; grid-template-columns: 20px 1fr; grid-template-rows: auto auto; column-gap: 8px; border-right: 1px solid var(--line); }
.coverage-summary > div:last-child { border-right: 0; }
.coverage-summary > div > span { grid-row: 1 / 3; width: 20px; height: 30px; display: grid; place-items: center; color: var(--accent); }
.coverage-summary .app-icon { width: 15px; height: 15px; }
.coverage-summary strong { font-size: 17px; line-height: 1; font-weight: 500; }
.coverage-summary small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.source-panel { overflow: hidden; }
.source-panel > header { min-height: 54px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.source-panel > header p { margin: 0; color: var(--muted-2); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.source-panel > header h3 { margin: 3px 0 0; font-size: 13px; font-weight: 500; }
.source-panel > header > span { color: var(--muted); font-size: 10px; }
.source-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.source-tabs button { min-height: 49px; padding: 6px 5px; display: flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-right: 1px solid var(--line); border-bottom: 2px solid transparent; background: white; color: #707787; font-size: 9px; white-space: nowrap; }
.source-tabs button:last-child { border-right: 0; }
.source-tabs button .app-icon { width: 14px; height: 14px; }
.source-tabs button b { min-width: 13px; padding: 0 2px; color: #737987; font-size: 8px; font-weight: 500; }
.source-tabs button.active { border-bottom-color: var(--ink); background: #f2f6f7; color: var(--ink); }
.source-tabs button.active b { color: var(--accent-dark); }
.source-list { display: flex; flex-direction: column; }
.source-row { min-height: 48px; padding: 7px 12px; display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(105px, auto) 62px 15px; align-items: center; gap: 9px; border: 0; border-bottom: 1px solid #eeeff3; background: white; text-align: left; }
.source-row:last-child { border-bottom: 0; }
.source-row:hover { background: #fafafd; }
.source-row > .app-icon { width: 14px; height: 14px; color: #a0a5b1; }
.source-logo, .evidence-logo, .citation-logo, .mini-logo { display: grid; place-items: center; overflow: hidden; border: 1px solid #e0e2e8; border-radius: 9px; background: white; }
.source-logo { width: 32px; height: 32px; }
.source-logo img { width: 22px; height: 22px; object-fit: contain; }
.source-logo .app-icon { width: 16px; height: 16px; color: #596071; }
.source-name { min-width: 0; display: flex; align-items: center; gap: 7px; }
.source-name strong { overflow: hidden; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.source-name small { padding: 3px 5px; border-radius: 4px; background: #f0f1f4; color: #757c8b; font-size: 8px; letter-spacing: .05em; text-transform: uppercase; }
.source-volume { color: var(--muted); font-size: 10px; text-align: right; }
.source-state { display: flex; align-items: center; gap: 5px; color: var(--green); font-size: 9px; }
.source-state i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.empty-state { min-height: 165px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: var(--muted); font-size: 11px; }
.empty-state .app-icon { width: 25px; height: 25px; color: #a7abb6; }

/* Detect */
.detect-top { display: grid; grid-template-columns: 1.08fr .92fr; gap: 10px; }
.executive-summary { padding: 14px; }
.executive-summary > header { display: flex; align-items: center; gap: 7px; }
.executive-summary > header > span { width: 19px; height: 25px; display: grid; place-items: center; color: var(--accent); }
.executive-summary > header .app-icon { width: 14px; height: 14px; }
.executive-summary > header strong { font-size: 12px; font-weight: 500; }
.executive-summary > p { margin: 11px 0 0; color: #4f5666; font-size: 11px; line-height: 1.52; }
.stat-row { margin-top: 13px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.stat-row > div { padding: 11px 9px 0; border-right: 1px solid var(--line); }
.stat-row > div:first-child { padding-left: 0; }
.stat-row > div:last-child { border-right: 0; }
.stat-row span, .stat-row small { display: block; color: var(--muted); font-size: 9px; }
.stat-row strong { margin-top: 4px; display: block; font-size: 18px; font-weight: 500; }
.stat-row small { margin-top: 3px; }
.stat-row small.down { color: var(--red); }
.trend-panel { padding: 14px; }
.trend-panel > header { display: flex; justify-content: space-between; align-items: center; }
.trend-panel > header p { margin: 0; color: var(--muted-2); font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.trend-panel > header h3 { margin: 3px 0 0; font-size: 13px; font-weight: 500; }
.trend-panel > header > .app-icon { color: var(--accent); }
.trend-chart { height: 130px; margin-top: 5px; padding-left: 25px; position: relative; }
.trend-chart svg { width: 100%; height: 100px; overflow: visible; }
.trend-chart svg circle { fill: white; stroke: var(--accent); stroke-width: 2; cursor: pointer; }
.trend-chart svg circle.active { fill: var(--accent); stroke: white; stroke-width: 3; filter: drop-shadow(0 0 4px rgb(41 79 99 / .32)); }
.chart-y { position: absolute; top: 8px; bottom: 32px; left: 0; display: flex; flex-direction: column; justify-content: space-between; color: #a0a5b1; font-size: 8px; }
.chart-x { display: grid; grid-template-columns: repeat(8, 1fr); }
.chart-x button { padding: 0; border: 0; background: transparent; color: #979ca9; font-size: 7px; }
.chart-x button.active { color: var(--accent); font-weight: 500; }
.theme-panel { margin-top: 10px; overflow: hidden; }
.theme-panel > header { min-height: 47px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.analysis-tabs { align-self: stretch; display: flex; }
.analysis-tabs button { padding: 0 13px; display: flex; align-items: center; gap: 6px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 10px; }
.analysis-tabs button.active { border-bottom-color: var(--ink); color: var(--ink); font-weight: 500; }
.analysis-tabs .app-icon { width: 14px; height: 14px; }
.text-button { display: flex; align-items: center; gap: 5px; border: 0; background: transparent; color: #7b8190; font-size: 9px; }
.text-button .app-icon { width: 13px; height: 13px; }
.theme-list { padding: 7px 10px 9px; display: flex; flex-direction: column; gap: 6px; }
.theme-row { min-height: 48px; padding: 7px 10px; display: grid; grid-template-columns: 4px 17px minmax(0, 1fr) auto auto auto 14px; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 9px; background: white; text-align: left; }
.theme-row:hover { border-color: #c8d2d7; box-shadow: 0 7px 18px -17px var(--ink); }
.theme-row > .app-icon { width: 14px; height: 14px; color: #676e7c; }
.theme-signal { width: 3px; height: 28px; border-radius: 1px; background: var(--red); }
.theme-signal.amber { background: #e1a719; }
.theme-signal.green { background: #35b778; }
.theme-row > span:nth-child(3) { min-width: 0; display: flex; flex-direction: column; }
.theme-row strong { font-size: 11px; font-weight: 500; }
.theme-row small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.theme-row em { padding: 3px 5px; border: 1px solid var(--line); border-radius: 4px; color: #727987; font-size: 8px; font-style: normal; }
.theme-row > b { color: #555c6c; font-size: 9px; font-weight: 500; }
.trend-badge { padding: 3px 0; color: var(--red); font-size: 9px; }
.trend-badge.neutral { color: var(--amber); }
.trend-badge.positive { color: var(--green); }

/* Explain */
.theme-breadcrumb { margin-bottom: 10px; padding: 9px 11px; display: flex; align-items: center; gap: 7px; border: 1px solid #d5dde1; border-radius: 10px; background: #f5f7f8; color: #667483; font-size: 10px; }
.theme-breadcrumb .app-icon { width: 13px; height: 13px; }
.theme-breadcrumb strong { color: var(--ink); font-weight: 500; }
.rising-label { margin-left: auto; padding: 3px 0; display: flex; align-items: center; gap: 4px; color: var(--red); }
.explain-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 10px; }
.finding-card { padding: 16px; }
.finding-card > p, .segment-card > header p { margin: 0; color: var(--muted-2); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.finding-card > h3 { max-width: 670px; margin: 7px 0 0; font-size: 20px; line-height: 1.18; font-weight: 500; letter-spacing: -.025em; }
.finding-metrics { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.finding-metrics > div { min-width: 0; padding: 12px 10px; border-right: 1px solid var(--line); }
.finding-metrics > div:first-child { padding-left: 0; }
.finding-metrics > div:last-child { border-right: 0; }
.finding-metrics > div > span { width: 20px; height: 24px; display: grid; place-items: center; color: var(--accent); }
.finding-metrics .app-icon { width: 14px; height: 14px; }
.finding-metrics strong { margin-top: 9px; display: block; font-size: 21px; font-weight: 500; }
.finding-metrics strong small { color: var(--muted); font-size: 12px; }
.finding-metrics p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.35; }
.evidence-basis { margin-top: 13px; padding: 8px 0 8px 10px; display: flex; align-items: center; gap: 8px; border-left: 2px solid var(--green); color: var(--green); }
.evidence-basis .app-icon { width: 16px; height: 16px; }
.evidence-basis span { display: flex; flex-direction: column; }
.evidence-basis strong { font-size: 10px; font-weight: 500; }
.evidence-basis small { margin-top: 2px; color: #477b69; font-size: 9px; }
.segment-card { padding: 15px; }
.segment-card > header { display: flex; align-items: center; justify-content: space-between; }
.segment-card > header h3 { margin: 3px 0 0; font-size: 13px; font-weight: 500; }
.segment-card > header > .app-icon { color: var(--accent); }
.segment-bar { margin-top: 13px; display: grid; grid-template-columns: 85px 1fr 28px; align-items: center; gap: 8px; font-size: 9px; }
.segment-bar > i { height: 7px; overflow: hidden; border-radius: 99px; background: #eceff1; }
.segment-bar > i b { height: 100%; display: block; border-radius: inherit; background: var(--accent); }
.segment-bar > i b.muted { background: #6f8898; }
.segment-bar > i b.light { background: #9caebb; }
.segment-bar strong { text-align: right; font-size: 9px; font-weight: 500; }
.location-rank { margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); }
.location-rank > p { margin: 0 0 8px; color: var(--muted); font-size: 9px; }
.location-rank > div { margin-top: 7px; display: grid; grid-template-columns: 28px 1fr 22px; align-items: center; gap: 7px; font-size: 9px; }
.location-rank i { height: 5px; border-radius: 99px; background: #5e789f; }
.location-rank strong { font-size: 9px; font-weight: 500; }
.explain-footer { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.source-convergence { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.source-convergence strong { color: var(--ink); font-weight: 500; }
.mini-logo { width: 25px; height: 25px; margin-left: -3px; border-radius: 7px; }
.mini-logo img { width: 17px; height: 17px; object-fit: contain; }

/* Verify */
.verify-grid { display: grid; grid-template-columns: 1.03fr .97fr; gap: 10px; }
.ask-card { min-height: 354px; padding: 14px; display: flex; flex-direction: column; }
.ask-card > header { display: flex; align-items: center; gap: 9px; }
.ask-card > header > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: var(--ink); color: white; }
.ask-card > header .app-icon { width: 15px; height: 15px; }
.ask-card > header div { display: flex; flex-direction: column; }
.ask-card > header strong { font-size: 12px; font-weight: 500; }
.ask-card > header small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.user-question { max-width: 88%; margin: 17px 0 0 auto; padding: 10px 12px; border-radius: 12px 12px 3px 12px; background: var(--ink); color: white; font-size: 11px; line-height: 1.4; }
.ai-response { margin-top: 15px; }
.ai-response > p { margin: 0; color: #4f5666; font-size: 11px; line-height: 1.52; }
.citation-buttons { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.citation-buttons button { min-height: 31px; padding: 4px 7px 4px 4px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; background: white; color: #626979; font-size: 9px; }
.citation-buttons button.active { border-color: #b8c8d0; background: #eef4f6; color: var(--ink); box-shadow: 0 0 0 2px rgb(41 79 99 / .07); }
.citation-logo { width: 22px; height: 22px; border-radius: 6px; }
.citation-logo img { width: 15px; height: 15px; object-fit: contain; }
.ask-input { min-height: 38px; margin-top: auto; padding: 0 7px 0 11px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; color: #9a9fab; font-size: 10px; }
.ask-input .app-icon { width: 26px; height: 26px; padding: 6px; border-radius: 7px; background: var(--ink); color: white; }
.evidence-card { min-height: 354px; padding: 14px; }
.evidence-card-title { padding-bottom: 11px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.evidence-card-title > span { display: flex; flex-direction: column; }
.evidence-card-title strong { font-size: 12px; font-weight: 500; }
.evidence-card-title small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.evidence-card-title button { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--muted); }
.evidence-card-title .app-icon { width: 14px; height: 14px; }
.evidence-detail { padding-top: 12px; }
.evidence-detail > header { display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.evidence-logo { width: 31px; height: 31px; }
.evidence-logo img { width: 21px; height: 21px; object-fit: contain; }
.evidence-detail > header > span { display: flex; flex-direction: column; }
.evidence-detail > header strong { font-size: 10px; font-weight: 500; }
.evidence-detail > header small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.evidence-detail > header em { display: flex; align-items: center; gap: 4px; color: var(--green); font-size: 8px; font-style: normal; }
.evidence-detail > header em .app-icon { width: 12px; height: 12px; }
.evidence-detail blockquote { min-height: 82px; margin: 15px 0 0; padding: 0; color: var(--ink); font-size: 18px; line-height: 1.25; letter-spacing: -.02em; }
.metadata { margin-top: 13px; display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: 9px; }
.metadata > div { min-width: 0; padding: 8px 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metadata > div:nth-child(2n) { border-right: 0; }
.metadata > div:nth-last-child(-n+2) { border-bottom: 0; }
.metadata span { display: block; color: var(--muted-2); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.metadata strong { margin-top: 3px; display: block; overflow: hidden; font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.lineage-mini { margin-top: 11px; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; }
.lineage-mini .app-icon { width: 11px; height: 11px; }
.lineage-mini strong { color: var(--ink); font-weight: 500; }

/* Monitor */
.monitor-difference { margin-bottom: 10px; display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--line); }
.monitor-difference > div { padding: 10px 12px; display: grid; grid-template-columns: 20px 1fr; column-gap: 7px; border-right: 1px solid var(--line); color: var(--muted); }
.monitor-difference > div:last-child { border-right: 0; }
.monitor-difference > div.active { border-bottom: 2px solid var(--ink); color: var(--ink); background: #f7f9fa; }
.monitor-difference .app-icon { grid-row: 1 / 3; width: 15px; height: 15px; margin-top: 1px; }
.monitor-difference strong { font-size: 10px; font-weight: 500; }
.monitor-difference small { grid-column: 2; margin-top: 2px; font-size: 8px; color: var(--muted); }
.monitor-results { overflow: hidden; }
.monitor-results > header { min-height: 52px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.monitor-results > header p { margin: 0; color: var(--muted-2); font-size: 8px; letter-spacing: .07em; text-transform: uppercase; }
.monitor-results > header h3 { margin: 3px 0 0; font-size: 12px; font-weight: 500; }
.monitor-results > header button { display: flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--muted); font-size: 9px; }
.monitor-results > header button .app-icon { width: 13px; height: 13px; }
.monitor-result-row { min-height: 62px; padding: 8px 12px; display: grid; grid-template-columns: 19px minmax(0, 1fr) 80px 52px 55px 13px; align-items: center; gap: 9px; border-bottom: 1px solid #eceef2; background: white; }
.monitor-result-row:last-child { border-bottom: 0; }
.monitor-result-row > .app-icon { width: 13px; height: 13px; color: #a1a6b2; }
.monitor-result-icon { color: var(--accent); }
.monitor-result-icon .app-icon { width: 15px; height: 15px; }
.monitor-result-copy { min-width: 0; display: flex; flex-direction: column; }
.monitor-result-copy strong { font-size: 10px; font-weight: 500; }
.monitor-result-copy small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.monitor-result-scope { color: var(--muted); font-size: 8px; }
.monitor-bars { height: 24px; display: flex; align-items: end; gap: 2px; }
.monitor-bars i { width: 4px; display: block; background: #c9d5db; }
.monitor-bars i.latest { background: var(--accent); }
.monitor-result-count { font-size: 12px; font-weight: 500; text-align: right; }
.monitor-result-count small { display: block; color: var(--muted); font-size: 7px; font-weight: 400; }
.monitor-alert-summary { margin-top: 10px; padding: 10px 0; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 9px; border-block: 1px solid var(--line); }
.monitor-alert-summary > .app-icon { width: 15px; height: 15px; color: var(--accent); }
.monitor-alert-summary span { display: flex; flex-direction: column; }
.monitor-alert-summary strong { font-size: 10px; font-weight: 500; }
.monitor-alert-summary small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.monitor-alert-summary button { border: 0; background: transparent; color: var(--accent-dark); font-size: 9px; font-weight: 500; }

/* Act */
.act-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 10px; }
.action-card { padding: 17px; background: linear-gradient(145deg, white, #f2f6f7); }
.action-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--green); font-size: 9px; }
.action-status > span { display: flex; align-items: center; gap: 6px; }
.action-status .app-icon { width: 14px; height: 14px; }
.action-status em { padding: 3px 0; border-bottom: 1px solid #a6d8c6; font-style: normal; }
.action-card > p { margin: 24px 0 0; color: #8f94a2; font-size: 8px; letter-spacing: .08em; }
.action-card > h3 { max-width: 570px; margin: 7px 0 0; font-size: 25px; line-height: 1.05; letter-spacing: -.04em; font-weight: 500; }
.action-copy { max-width: 620px; margin-top: 11px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.action-meta { margin-top: 19px; display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.action-meta > div { min-width: 0; padding: 11px 8px; display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; gap: 7px; border-right: 1px solid var(--line); }
.action-meta > div:first-child { padding-left: 0; }
.action-meta > div:last-child { border-right: 0; }
.action-meta > div > .app-icon { width: 15px; height: 15px; color: var(--accent); }
.action-meta span { min-width: 0; display: flex; flex-direction: column; }
.action-meta small { color: var(--muted); font-size: 8px; }
.action-meta strong { margin-top: 3px; overflow: hidden; font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.report-card { padding: 15px; }
.report-card > header { display: flex; align-items: center; gap: 9px; }
.report-card > header > span { width: 22px; height: 31px; display: grid; place-items: center; color: var(--accent); }
.report-card > header .app-icon { width: 16px; height: 16px; }
.report-card > header div { display: flex; flex-direction: column; }
.report-card > header strong { font-size: 11px; font-weight: 500; }
.report-card > header small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.report-preview { min-height: 112px; margin-top: 13px; padding: 12px; display: flex; flex-direction: column; border: 1px solid #d8e1e5; border-radius: 9px; background: linear-gradient(135deg, white, #edf3f5); }
.report-preview > div { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 8px; }
.report-preview em { padding: 3px 5px; border-radius: 4px; background: var(--ink); color: white; font-style: normal; }
.report-preview > strong { max-width: 250px; margin-top: auto; font-size: 13px; line-height: 1.25; font-weight: 500; }
.report-preview > small { margin-top: 5px; color: var(--muted); font-size: 8px; }
.report-options { margin-top: 9px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.report-options span { min-height: 42px; padding: 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 7px; text-align: center; }
.report-options .app-icon { width: 13px; height: 13px; color: var(--accent); }
.app-button.full { width: 100%; margin-top: 10px; }
.app-button.success { border-color: var(--green); background: var(--green); }
.report-card > p { margin: 8px 0 0; color: var(--muted); font-size: 8px; line-height: 1.35; }
.lineage { margin-top: 11px; padding: 10px 12px; display: grid; grid-template-columns: 1fr 15px 1.25fr 15px 1fr 15px 1fr 15px 1fr; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.lineage > .app-icon { width: 12px; height: 12px; color: #b1b4bd; }
.lineage > div { min-width: 0; display: grid; grid-template-columns: 25px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; column-gap: 7px; }
.lineage > div > span { grid-row: 1 / 3; width: 20px; height: 25px; display: grid; place-items: center; color: var(--accent); }
.lineage > div .app-icon { width: 13px; height: 13px; }
.lineage small { color: var(--muted); font-size: 7px; }
.lineage strong { overflow: hidden; font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.final-cta { margin-top: 11px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-radius: 11px; background: var(--ink); color: white; }
.final-cta > span { display: flex; flex-direction: column; }
.final-cta > span strong { font-size: 12px; font-weight: 500; }
.final-cta > span small { margin-top: 3px; color: rgb(255 255 255 / .62); font-size: 9px; }
.final-cta .app-button { border-color: white !important; background: white !important; color: var(--ink) !important; }

/* Source drawer */
.drawer-backdrop { position: absolute; inset: 0; z-index: 15; background: rgb(23 35 43 / .18); backdrop-filter: blur(1px); animation: fade-in .18s ease; }
.source-drawer { width: min(550px, 82%); position: absolute; top: 0; right: 0; bottom: 0; z-index: 16; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: white; box-shadow: -24px 0 54px -40px rgb(23 35 43 / .65); animation: drawer-in .25s ease both; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes drawer-in { from { transform: translateX(22px); opacity: .6; } }
.source-drawer > header { min-height: 60px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.source-drawer > header > div { display: flex; flex-direction: column; }
.source-drawer > header span { display: flex; flex-direction: column; }
.source-drawer > header strong { font-size: 14px; font-weight: 500; }
.source-drawer > header small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.source-drawer > header button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: white; color: var(--muted); }
.source-drawer > header button .app-icon { width: 14px; height: 14px; }
.drawer-body { min-height: 0; flex: 1; padding: 10px 15px 12px; overflow: auto; }
.add-source-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.add-source-actions > button { min-height: 60px; padding: 8px 9px; display: grid; grid-template-columns: 18px minmax(0, 1fr) 13px; align-items: start; gap: 7px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); text-align: left; }
.add-source-actions > button:hover { border-color: #b7c5cd; background: #f7f9fa; }
.add-source-actions > button > .app-icon { width: 15px; height: 15px; margin-top: 1px; color: var(--accent); }
.add-source-actions > button > .app-icon:last-child { width: 12px; height: 12px; color: #9da2ae; }
.add-source-actions span { display: flex; flex-direction: column; }
.add-source-actions strong { font-size: 10px; font-weight: 500; }
.add-source-actions small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.drawer-source-section { margin-top: 10px; }
.drawer-source-section > header { min-height: 22px; display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.drawer-source-section > header > span { display: flex; align-items: baseline; gap: 6px; }
.drawer-source-section > header strong { font-size: 10px; font-weight: 500; }
.drawer-source-section > header b { color: var(--muted); font-size: 9px; font-weight: 400; }
.drawer-source-section > header small { color: var(--muted); font-size: 8px; }
.drawer-search { min-height: 26px; margin-bottom: 5px; padding: 0 8px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 6px; color: #9ba0ab; font-size: 8px; }
.drawer-search .app-icon { width: 12px; height: 12px; }
.drawer-source-row { min-height: 41px; padding: 4px 7px; display: grid; grid-template-columns: 27px minmax(0, 1fr) auto auto; align-items: center; gap: 7px; border: 1px solid #eceef2; border-bottom: 0; background: white; }
.drawer-source-row:first-of-type { border-radius: 7px 7px 0 0; }
.drawer-source-row:last-child { border-bottom: 1px solid #eceef2; border-radius: 0 0 7px 7px; }
.drawer-source-row:only-of-type { border: 1px solid #eceef2; border-radius: 7px; }
.drawer-source-row .source-logo { width: 27px; height: 27px; }
.drawer-source-row .source-logo img { width: 17px; height: 17px; }
.drawer-source-row > span { min-width: 0; display: flex; flex-direction: column; }
.drawer-source-row > span strong { overflow: hidden; font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.drawer-source-row > span small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.drawer-source-row > em { padding-left: 8px; border-left: 1px solid var(--line); color: var(--green); font-size: 8px; font-style: normal; }
.drawer-source-row > button { min-height: 25px; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; background: white; color: #596071; font-size: 8px; }
.source-drawer > footer { min-height: 39px; padding: 7px 15px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); background: #fafafd; }
.source-drawer > footer span { display: flex; align-items: center; gap: 6px; color: var(--green); font-size: 8px; }
.source-drawer > footer span .app-icon { width: 13px; height: 13px; }

/* Monitoring drawer */
.monitoring-backdrop { position: absolute; inset: 0; z-index: 17; background: rgb(23 35 43 / .14); backdrop-filter: blur(1px); animation: fade-in .18s ease; }
.monitoring-drawer { width: min(520px, 80%); position: absolute; inset: 0 0 0 auto; z-index: 18; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: white; box-shadow: -24px 0 54px -40px rgb(23 35 43 / .65); animation: drawer-in .25s ease both; }
.monitoring-drawer > header { min-height: 64px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.monitoring-drawer > header > div:first-child { min-width: 0; display: grid; grid-template-columns: 19px minmax(0, 1fr); align-items: start; gap: 8px; }
.monitoring-drawer > header > div:first-child > .app-icon { width: 16px; height: 16px; margin-top: 2px; color: var(--accent); }
.monitoring-drawer > header span { min-width: 0; display: flex; flex-direction: column; }
.monitoring-drawer > header strong { font-size: 13px; font-weight: 500; }
.monitoring-drawer > header small { max-width: 350px; margin-top: 2px; color: var(--muted); font-size: 7px; line-height: 1.3; }
.monitoring-drawer > header > div:last-child { display: flex; align-items: center; gap: 4px; }
.monitoring-drawer > header button { min-height: 28px; padding: 0 6px; display: flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--muted); font-size: 8px; }
.monitoring-drawer > header button .app-icon { width: 13px; height: 13px; }
.monitoring-drawer > header button:last-child { width: 27px; justify-content: center; }
.monitoring-body { min-height: 0; flex: 1; padding: 9px 14px; overflow: auto; }
.new-monitor-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.new-monitor-heading > span { display: flex; flex-direction: column; }
.new-monitor-heading strong { font-size: 11px; font-weight: 500; }
.new-monitor-heading small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.new-monitor-heading > button { display: flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--muted); font-size: 8px; }
.new-monitor-heading > button .app-icon { width: 12px; height: 12px; }
.monitor-kind-tabs { margin-top: 7px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.monitor-kind-tabs button { min-height: 27px; padding: 0 11px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 9px; }
.monitor-kind-tabs button.active { border-bottom-color: var(--ink); color: var(--ink); font-weight: 500; }
.monitor-kind-tabs > span { margin-left: auto; color: var(--muted-2); font-size: 8px; }
.monitor-definition { margin-top: 7px; }
.monitor-definition > label { color: #555c6c; font-size: 9px; font-weight: 500; }
.definition-input { min-height: 45px; margin-top: 4px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; color: #3f4655; font-size: 8px; line-height: 1.38; }
.monitor-definition > small { margin-top: 5px; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; }
.monitor-definition > small .app-icon { width: 12px; height: 12px; color: var(--accent); }
.score-definition { min-height: 48px; margin-top: 10px; padding: 8px 9px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 9px; }
.score-definition strong { padding: 5px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); font-size: 9px; font-weight: 500; }
.score-note { margin: 5px 0 0; color: var(--muted); font-size: 8px; }
.monitor-source-picker { margin-top: 7px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.monitor-source-picker > header { min-height: 34px; padding: 4px 8px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #fafafd; }
.monitor-source-picker > header span { display: flex; flex-direction: column; }
.monitor-source-picker > header strong { font-size: 9px; font-weight: 500; }
.monitor-source-picker > header small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.monitor-source-picker > header button { border: 0; background: transparent; color: var(--accent); font-size: 8px; }
.monitor-source-picker label { min-height: 25px; padding: 2px 8px; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 6px; border-bottom: 1px solid #eff0f3; color: var(--ink); }
.monitor-source-picker label:last-child { border-bottom: 0; }
.monitor-source-picker input, .auto-cover input { width: 11px; height: 11px; accent-color: var(--accent); }
.monitor-source-picker label > span { min-width: 0; display: flex; align-items: center; gap: 6px; }
.monitor-source-logo { width: 19px; height: 19px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: white; }
.monitor-source-logo img { width: 12px; height: 12px; object-fit: contain; }
.monitor-source-logo .app-icon { width: 12px; height: 12px; }
.monitor-source-picker label strong { overflow: hidden; font-size: 8px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.monitor-source-picker label > small { color: var(--muted-2); font-size: 7px; }
.auto-cover { min-height: 34px; margin-top: 5px; display: grid; grid-template-columns: 12px 14px minmax(0, 1fr); align-items: center; gap: 6px; color: #4d5463; }
.auto-cover > .app-icon { width: 12px; height: 12px; color: var(--accent); }
.auto-cover > span { display: flex; flex-direction: column; }
.auto-cover strong { font-size: 8px; font-weight: 500; }
.auto-cover small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.monitor-create-actions { margin-top: 6px; display: flex; align-items: center; gap: 9px; }
.monitor-create-actions > button:not(.app-button) { border: 0; background: transparent; color: var(--muted); font-size: 8px; }
.monitor-create-actions > span { margin-left: auto; color: var(--muted-2); font-size: 7px; }
.monitor-created-note { margin-top: 8px; padding: 8px 0 0; display: grid; grid-template-columns: 15px 1fr; gap: 7px; border-top: 1px solid var(--line); color: var(--green); }
.monitor-created-note > .app-icon { width: 13px; height: 13px; }
.monitor-created-note span { display: flex; flex-direction: column; }
.monitor-created-note strong { font-size: 8px; font-weight: 500; }
.monitor-created-note small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.monitoring-drawer > footer { min-height: 40px; padding: 6px 14px; display: grid; grid-template-columns: 1fr 12px 1fr 12px 1fr 12px 1fr; align-items: center; gap: 4px; border-top: 1px solid var(--line); background: #fafafd; }
.monitoring-drawer > footer > .app-icon { width: 10px; height: 10px; color: #b0b4bf; }
.monitoring-drawer > footer > div { display: flex; align-items: center; gap: 5px; }
.monitoring-drawer > footer span { color: var(--accent); font-size: 8px; }
.monitoring-drawer > footer strong { color: #596071; font-size: 7px; font-weight: 500; }

@media (max-width: 1260px) {
  .tour-header { margin-inline: 14px; }
  .tour-layout { padding-inline: 14px; grid-template-columns: 252px minmax(760px, 1fr); gap: 12px; }
  .tour-story { padding-inline: 20px; }
  .tour-story h1 { font-size: 34px; }
  .app-shell { grid-template-columns: 178px minmax(0, 1fr); }
  .evolution-actions button { padding-inline: 6px; font-size: 8px; }
  .period-picker button { padding-inline: 5px; font-size: 8px; }
  .source-name small { display: none; }
  .finding-card > h3 { font-size: 18px; }
}

@media (max-height: 760px) {
  .tour-story { padding: 18px 18px 14px; }
  .tour-kicker { font-size: 9px; }
  .tour-story h1 { margin-top: 14px; font-size: 30px; }
  .tour-story .story-top > p { margin-top: 12px; font-size: 12.5px; line-height: 1.45; }
  .tour-step-nav { padding-top: 10px; }
  .tour-step-nav button { min-height: 34px; }
  .tour-step-nav button .stage-icon { width: 27px; height: 27px; }
  .tour-step-nav button > span:nth-child(2) { gap: 5px; }
  .tour-step-nav button strong { font-size: 10px; }
  .tour-controls { margin-top: 10px; }
  .tour-control { height: 38px; }
  .screen-view { padding: 14px; }
  .screen-header { margin-bottom: 10px; }
  .coverage-summary > div { padding-block: 10px; }
  .source-row { min-height: 44px; }
}

/* Full-screen product tour with anchored coachmarks. */
@media (min-width: 1100px) {
  .desktop-experience { height: 100vh; position: relative; overflow: hidden; background: #f8f9fa; }
  .tour-header {
    height: 48px;
    margin: 0;
    padding: 0 10px 0 16px;
    grid-template-columns: minmax(280px, 1fr) auto minmax(280px, 1fr);
    gap: 16px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: rgb(255 255 255 / .97);
    box-shadow: 0 8px 24px -24px rgb(23 35 43 / .5);
    backdrop-filter: blur(14px);
  }
  .tour-header-context { justify-content: flex-start; font-size: 10px; }
  .tour-header-actions { justify-content: flex-end; }
  .tour-header-actions > a:not(.nav-exit) { width: 32px; height: 31px; font-size: 9px; }
  .nav-exit { min-height: 31px; padding: 0 12px; border-radius: 8px; font-size: 9px; }

  .tour-step-nav { margin: 0; padding: 0; display: flex; flex-direction: row; align-items: center; gap: 6px; }
  .tour-step-nav::before { display: none; }
  .tour-step-nav button { width: 29px; min-height: 29px; padding: 0; display: grid; grid-template-columns: 1fr; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: white; color: #8c94a0; text-align: center; }
  .tour-step-nav button:hover { border-color: #b8c5cc; background: #f4f7f8; color: var(--ink); }
  .tour-step-nav button > span { display: block; font-size: 7px; font-weight: 600; letter-spacing: .03em; }
  .tour-step-nav button.active { border-color: var(--ink); background: var(--ink); color: white; box-shadow: none; }
  .tour-step-nav button.complete { border-color: #cbd8dd; background: #edf3f5; color: #466171; }

  .tour-layout { height: calc(100vh - 48px); min-height: 0; padding: 0; display: block; }
  .product-frame { width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
  .app-shell { height: 100%; grid-template-columns: 202px minmax(0, 1fr); }
  .app-sidebar { padding-inline: 15px; }

  .tour-guidance { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
  .tour-focus-ring { position: fixed; z-index: 51; border: 2px solid #5f8191; border-radius: 12px; background: transparent; box-shadow: 0 0 0 9999px rgb(20 33 42 / .16), 0 0 0 4px rgb(95 129 145 / .12); opacity: 0; pointer-events: none; transition: left .22s ease, top .22s ease, width .22s ease, height .22s ease, opacity .16s ease; }
  .tour-action-ring { position: fixed; z-index: 52; border: 2px solid #365f72; border-radius: 10px; background: rgb(255 255 255 / .08); box-shadow: 0 0 0 9999px rgb(20 33 42 / .12), 0 0 0 4px rgb(72 111 128 / .2), 0 8px 24px -14px rgb(20 33 42 / .65); opacity: 0; pointer-events: none; transition: left .22s ease, top .22s ease, width .22s ease, height .22s ease, opacity .16s ease; }
  .tour-action-ring::after { position: absolute; inset: -3px; border: 2px solid rgb(72 111 128 / .48); border-radius: inherit; box-shadow: 0 0 0 0 rgb(72 111 128 / .34); content: ''; opacity: 0; pointer-events: none; }
  .tour-guidance.is-action .tour-action-ring::after { animation: tour-action-pulse 1.9s ease-out infinite; }
  .tour-action-target { cursor: pointer !important; }
  .tour-coachmark { width: min(370px, calc(100vw - 28px)); padding: 16px; position: fixed; z-index: 53; border: 1px solid #d9e0e4; border-radius: 15px; background: rgb(255 255 255 / .985); box-shadow: 0 24px 64px -32px rgb(20 33 42 / .55); pointer-events: auto; transition: left .22s ease, top .22s ease, opacity .16s ease, visibility .16s ease; }
  .tour-coachmark::after { width: 12px; height: 12px; position: absolute; border: 1px solid #d9e0e4; background: white; content: ''; transform: rotate(45deg); }
  .tour-coachmark[data-placement="left"]::after { top: var(--arrow-y, calc(50% - 7px)); right: -7px; border-bottom: 0; border-left: 0; }
  .tour-coachmark[data-placement="right"]::after { top: var(--arrow-y, calc(50% - 7px)); left: -7px; border-top: 0; border-right: 0; }
  .tour-coachmark[data-placement="top"]::after { left: var(--arrow-x, calc(50% - 7px)); bottom: -7px; border-top: 0; border-left: 0; }
  .tour-coachmark[data-placement="bottom"]::after { top: -7px; left: var(--arrow-x, calc(50% - 7px)); border-right: 0; border-bottom: 0; }
  .coachmark-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .tour-coachmark .tour-kicker { gap: 8px; color: #7e8794; font-size: 8px; letter-spacing: .08em; }
  .tour-coachmark .tour-kicker span:first-child { padding-right: 8px; color: var(--ink); }
  .coachmark-collapse { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; background: #f3f5f6; color: #74808b; }
  .coachmark-collapse:hover { background: #eaf0f2; color: var(--ink); }
  .coachmark-collapse .app-icon { width: 13px; height: 13px; }
  .tour-coachmark h1 { margin: 12px 0 0; font-size: 25px; line-height: 1.04; letter-spacing: -.04em; font-weight: 500; }
  .coachmark-explanation { margin-top: 12px; }
  .coachmark-explanation p { margin: 0; color: #606b76; font-size: 11px; line-height: 1.45; }
  .tour-coachmark footer { margin-top: 10px; padding-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #edf0f2; }
  .coachmark-back, .coachmark-next, .coachmark-restart, .coachmark-exit { min-height: 31px; padding: 0 9px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 8px; background: white; color: #53606d; font-size: 9px; text-decoration: none; }
  .coachmark-next { margin-left: auto; }
  .coachmark-restart { margin-left: auto; }
  .coachmark-next, .coachmark-exit { border-color: var(--ink); background: var(--ink); color: white; }
  .coachmark-back .app-icon, .coachmark-next .app-icon, .coachmark-restart .app-icon, .coachmark-exit .app-icon { width: 12px; height: 12px; }
  .coachmark-back:disabled { opacity: .35; cursor: default; }
  .tour-guidance.is-action .tour-coachmark { width: min(315px, calc(100vw - 28px)); padding: 14px; }
  .tour-guidance.is-action .tour-coachmark h1 { margin-top: 10px; font-size: 21px; line-height: 1.08; }
  .tour-guidance.is-action .coachmark-explanation { margin-top: 9px; }
  .tour-guidance.is-action .coachmark-explanation p { font-size: 10px; }
  .tour-guidance.is-action .tour-coachmark footer { margin-top: 9px; padding-top: 8px; }
  .tour-guide-pill { width: min(360px, calc(100vw - 32px)); min-height: 52px; padding: 8px 10px; position: fixed; left: 218px; bottom: 14px; z-index: 54; display: grid; grid-template-columns: auto minmax(0, 1fr) 28px; align-items: center; gap: 10px; border: 1px solid #cbd7dd; border-radius: 12px; background: rgb(255 255 255 / .98); box-shadow: 0 18px 50px -28px rgb(20 33 42 / .65); color: var(--ink); text-align: left; pointer-events: auto; }
  .tour-guide-pill > span:first-child { padding-right: 10px; border-right: 1px solid #e2e7ea; color: #657580; font-size: 8px; font-weight: 600; letter-spacing: .04em; }
  .tour-guide-pill > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
  .tour-guide-pill strong { overflow: hidden; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
  .tour-guide-pill small { margin-top: 2px; overflow: hidden; color: #687580; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .tour-guide-pill > span:last-child { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #edf3f5; color: #4b6877; transform: rotate(180deg); }
  .tour-guide-pill .app-icon { width: 13px; height: 13px; }
  .tour-guidance.is-minimized .tour-coachmark { opacity: 0 !important; visibility: hidden; pointer-events: none; }
  .tour-guidance.is-minimized .tour-focus-ring { box-shadow: 0 0 0 4px rgb(95 129 145 / .14); }
  .tour-guidance.is-minimized .tour-action-ring { box-shadow: 0 0 0 4px rgb(72 111 128 / .2); }

  @keyframes tour-action-pulse {
    0%, 62%, 100% { box-shadow: 0 0 0 0 rgb(72 111 128 / 0); opacity: 0; }
    10% { box-shadow: 0 0 0 0 rgb(72 111 128 / .34); opacity: 1; }
    46% { box-shadow: 0 0 0 8px rgb(72 111 128 / 0); opacity: 0; }
  }

  body:has(.tour-action-target:hover) .tour-action-ring::after { animation-play-state: paused; opacity: 0; }
}

@media (max-width: 1099px) {
  .desktop-experience { display: none; }
  .mobile-gate { min-height: 100vh; padding: 26px; display: flex; flex-direction: column; background: linear-gradient(180deg, white 0%, #f3f5f6 100%); }
  .gate-brand { align-self: flex-start; }
  .gate-copy { width: min(100%, 620px); margin: auto; padding: 60px 0; }
  .eyebrow { margin: 0 0 18px; color: #676d7b; font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
  .gate-copy h1 { margin: 0; font-size: clamp(48px, 11vw, 76px); line-height: .96; letter-spacing: -.06em; font-weight: 500; }
  .gate-copy > p:not(.eyebrow) { max-width: 540px; margin: 24px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
  .gate-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 9px; }
  .button { min-height: 45px; padding: 0 18px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 500; text-decoration: none; }
  .button.primary { border-color: var(--ink); background: var(--ink); color: white; }
  .button.secondary { background: white; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Product tour v2: the guide owns the narrative, the product owns the work. */
.app-page { min-height: 100%; padding: 16px; animation: screen-in .24s ease both; }
.overview-page, .monitoring-page { display: flex; flex-direction: column; gap: 10px; }

.overview-stat-strip {
  min-height: 54px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.overview-stat-strip > div { min-height: 32px; padding: 0 16px; display: flex; align-items: center; gap: 6px; border-right: 1px solid var(--line); }
.overview-stat-strip > div:first-child { padding-left: 0; }
.overview-stat-strip > div:last-child { flex: 1; border-right: 0; }
.overview-stat-strip .app-icon { width: 14px; height: 14px; color: #95a0b2; }
.overview-stat-strip strong { font-size: 14px; font-weight: 600; }
.overview-stat-strip small { color: #8a91a0; font-size: 9px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; }
.status-dot.amber { background: #e6aa10; }
.sentiment-meter > span { width: 138px; height: 8px; display: flex; overflow: hidden; border-radius: 99px; background: #e8eaf0; }
.sentiment-meter i { height: 100%; display: block; }
.sentiment-meter i:nth-child(1) { background: #169856; }
.sentiment-meter i:nth-child(2) { background: #78bd4b; }
.sentiment-meter i:nth-child(3) { background: #efb711; }
.sentiment-meter i:nth-child(4) { background: #ee7621; }
.sentiment-meter i:nth-child(5) { background: #ce2c33; }

.executive-summary {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.executive-summary > strong { font-size: 11px; font-weight: 600; }
.executive-summary > p { margin: 6px 0 0; color: #535b6b; font-size: 10.5px; line-height: 1.48; }

.analysis-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.analysis-tabs { height: 43px; padding: 0 10px; display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.analysis-tabs button { padding: 0 13px; display: flex; align-items: center; gap: 6px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #777f8f; font-size: 10px; }
.analysis-tabs button.active { border-bottom-color: var(--ink); color: var(--ink); font-weight: 600; }
.analysis-tabs .app-icon { width: 14px; height: 14px; }
.theme-list-heading { min-height: 34px; padding: 0 13px; display: flex; align-items: center; gap: 8px; color: #8a91a0; font-size: 8.5px; }
.theme-list-heading b { padding: 3px 6px; border-radius: 99px; background: #f0f1f4; color: #636a79; font-weight: 500; }
.theme-list { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.theme-row {
  min-height: 45px;
  padding: 6px 9px;
  display: grid;
  grid-template-columns: 4px 17px minmax(0, 1fr) auto auto 42px 14px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  text-align: left;
}
.theme-row:hover { border-color: #b9c6cc; background: #f8fafb; box-shadow: none; }
.theme-row > .app-icon { width: 13px; height: 13px; color: #626a7a; }
.theme-row > .app-icon:last-child { color: #9ca2af; }
.theme-signal { width: 3px; height: 27px; border-radius: 2px; }
.theme-signal.red { background: #d12d38; }
.theme-signal.amber { background: #e4a90b; }
.theme-signal.green { background: #28b66f; }
.theme-row > span:nth-of-type(1) { min-width: 0; display: flex; flex-direction: column; }
.theme-row strong { overflow: hidden; color: #303648; font-size: 10.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.theme-row small { margin-top: 2px; overflow: hidden; color: #818899; font-size: 8.25px; text-overflow: ellipsis; white-space: nowrap; }
.theme-row em { padding: 3px 6px; border-radius: 99px; background: #f0f1f5; color: #737a88; font-size: 7px; font-style: normal; }
.theme-row > b { color: #687082; font-size: 8px; font-weight: 500; }
.theme-trend { font-size: 8px; font-weight: 600; text-align: right; }
.theme-trend.red { color: #bd2837; }
.theme-trend.amber { color: #aa7000; }
.theme-trend.green { color: #14875c; }

.metrics-section { border: 1px solid var(--line); border-radius: 12px; background: white; }
.metrics-section > header { min-height: 34px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.metrics-section > header strong { font-size: 10px; font-weight: 600; }
.metrics-section > header span { color: #9096a4; font-size: 8px; }
.metric-cards { display: grid; grid-template-columns: repeat(3, 1fr); }
.metric-cards article { min-width: 0; padding: 9px 11px 8px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; column-gap: 8px; border-right: 1px solid var(--line); }
.metric-cards article:last-child { border-right: 0; }
.metric-cards article > span { grid-column: 1 / 3; color: #737b8c; font-size: 8px; }
.metric-cards article > strong { margin-top: 3px; font-size: 17px; font-weight: 600; }
.metric-cards article > small { margin-top: 7px; font-size: 7px; text-align: right; }
.metric-cards .down { color: #bb3540; }
.mini-bars { width: 100%; height: 31px; margin-top: 6px; display: flex; align-items: flex-end; gap: 3px; }
.mini-bars i { min-width: 3px; flex: 1; border-radius: 2px 2px 0 0; background: #c9d5db; }
.mini-bars i.latest { background: var(--accent); }
.mini-bars.down i { background: #d6dee2; }
.mini-bars.down i.latest { background: #b93643; }
.mini-bars.muted i { background: #d8dbe2; }

/* Source management opens first and behaves like a real product drawer. */
.drawer-backdrop { background: rgb(23 35 43 / .2); backdrop-filter: blur(1px); }
.source-drawer { width: min(720px, 88%); }
.source-drawer > header { min-height: 58px; padding: 0 16px; }
.source-drawer > header strong { font-size: 13px; }
.source-drawer > header small { font-size: 8px; }
.source-drawer-layout { min-height: 0; flex: 1; display: grid; grid-template-columns: 295px minmax(0, 1fr); }
.managed-source-list { min-height: 0; padding: 11px; overflow: auto; border-right: 1px solid var(--line); background: #fafafd; }
.source-add-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.source-add-actions button { min-height: 55px; padding: 8px; display: grid; grid-template-columns: 17px minmax(0, 1fr); align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 8px; background: white; text-align: left; }
.source-add-actions button:hover { border-color: #b9c6cc; }
.source-add-actions .app-icon { width: 14px; height: 14px; margin: auto; display: block; color: var(--accent); }
.source-add-actions span { display: flex; flex-direction: column; }
.source-add-actions strong { font-size: 9px; font-weight: 600; }
.source-add-actions small { margin-top: 3px; color: var(--muted); font-size: 7px; line-height: 1.3; }
.managed-source-list > section { margin-top: 12px; }
.managed-source-list > section > header { height: 24px; display: flex; align-items: center; gap: 6px; }
.managed-source-list > section > header strong { color: #656d7e; font-size: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.managed-source-list > section > header b { min-width: 17px; padding: 2px 5px; border-radius: 99px; background: #ececf1; color: #7b8290; font-size: 7px; font-weight: 500; }
.managed-source-row { width: 100%; min-height: 46px; padding: 6px 7px; display: grid; grid-template-columns: 30px minmax(0, 1fr) 13px; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; text-align: left; }
.managed-source-row:hover { background: white; }
.managed-source-row.active { border-color: #c8d5db; background: white; box-shadow: 0 6px 16px -16px var(--ink); }
.managed-source-row .source-logo { width: 30px; height: 30px; border-radius: 8px; }
.managed-source-row .source-logo img { width: 19px; height: 19px; }
.managed-source-row .source-logo > .app-icon { margin: auto; display: block; }
.managed-source-row > span { min-width: 0; display: flex; flex-direction: column; }
.managed-source-row strong { overflow: hidden; font-size: 9.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.managed-source-row small { margin-top: 2px; overflow: hidden; color: #89909e; font-size: 7.5px; text-overflow: ellipsis; white-space: nowrap; }
.managed-source-row > .app-icon { width: 12px; height: 12px; color: #a5aab5; }
.managed-source-detail { min-width: 0; padding: 22px; overflow: auto; }
.source-detail-identity { display: grid; grid-template-columns: 46px minmax(0, 1fr) 28px; align-items: start; gap: 11px; }
.source-detail-logo { width: 46px; height: 46px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.source-detail-logo img { width: 30px; height: 30px; object-fit: contain; }
.source-detail-logo .app-icon { width: 22px; height: 22px; color: #596071; }
.source-detail-logo > .app-icon { margin: auto; display: block; }
.multi-source-logo { padding: 3px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 1px; }
.multi-source-logo img { width: 100% !important; height: 100% !important; min-width: 0; object-fit: contain; border-radius: 2px; }
.multi-source-logo b { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 2px; background: #eef2f4; color: #526575; font-size: 6px; line-height: 1; font-weight: 600; }
.source-detail-logo.multi-source-logo { padding: 5px; gap: 2px; }
.source-detail-logo.multi-source-logo b { font-size: 8px; }
.managed-source-row .multi-source-logo { padding: 0; display: block; position: relative; overflow: hidden; }
.managed-source-row .multi-source-logo img { width: 12px !important; height: 12px !important; position: absolute; border-radius: 3px; background: white; box-shadow: 0 0 0 1px white; }
.managed-source-row .multi-source-logo img:nth-child(1) { top: 4px; left: 3px; }
.managed-source-row .multi-source-logo img:nth-child(2) { top: 4px; right: 3px; }
.managed-source-row .multi-source-logo img:nth-child(3) { bottom: 3px; left: 9px; }
.managed-source-row .multi-source-logo b { display: none; }
.source-detail-identity > span { min-width: 0; }
.source-detail-identity small { display: block; color: #8d94a2; font-size: 8px; text-transform: uppercase; letter-spacing: .07em; }
.source-detail-identity h2 { margin: 3px 0 0; overflow: hidden; font-size: 17px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.source-detail-identity em { margin-top: 6px; display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 8px; font-style: normal; }
.source-detail-identity em i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.source-detail-identity > button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 7px; background: #f5f5f8; color: #7a8190; }
.source-detail-identity > button .app-icon { width: 13px; height: 13px; }
.managed-source-detail > p { margin: 17px 0 0; color: #5f6777; font-size: 10px; line-height: 1.5; }
.source-platform-list { margin: 11px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.source-platform-list > span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; border: 1px solid var(--line); border-radius: 999px; background: white; color: #414859; font-size: 9px; font-weight: 500; }
.source-platform-list img { width: 14px; height: 14px; border-radius: 4px; object-fit: cover; }
.managed-source-detail dl { margin: 17px 0 0; border-block: 1px solid var(--line); }
.managed-source-detail dl > div { min-height: 38px; padding: 7px 0; display: grid; grid-template-columns: 105px 1fr; align-items: center; border-bottom: 1px solid #eff0f3; }
.managed-source-detail dl > div:last-child { border-bottom: 0; }
.managed-source-detail dt { color: #8b92a0; font-size: 8px; }
.managed-source-detail dd { margin: 0; color: #353b4b; font-size: 9px; font-weight: 500; }
.source-period-history { margin-top: 18px; }
.source-period-history > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.source-period-history > header strong { font-size: 10px; font-weight: 600; }
.source-period-history > header span { color: #8a91a0; font-size: 7px; }
.source-period-history .mini-bars { height: 72px; margin-top: 12px; gap: 8px; }
.source-period-history > div:last-child, .theme-evolution > div:last-child, .monitor-trend-card > div, .monitor-total-chart > div { margin-top: 5px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; color: #9a9fab; font-size: 6px; text-align: center; }
.source-detail-actions { margin-top: 17px; display: flex; gap: 6px; }
.source-detail-actions button { min-height: 31px; padding: 0 9px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 7px; background: white; color: #545b6a; font-size: 8px; }
.source-detail-actions .app-icon { width: 12px; height: 12px; }

/* Theme and monitor detail pages mirror the real grouped-detail structure. */
.detail-page { padding: 0; background: #fafbfc; }
.detail-back { min-height: 38px; padding: 0 16px; display: flex; align-items: center; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .88); }
.detail-back button { max-width: 420px; padding: 0; display: flex; align-items: center; gap: 6px; overflow: hidden; border: 0; background: transparent; color: #71798a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.detail-back .app-icon { width: 13px; height: 13px; }
.detail-hero { padding: 16px 20px 12px; display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.detail-hero > div { min-width: 0; flex: 1; }
.detail-kind { display: inline-flex; align-items: center; gap: 5px; color: #4e6877; font-size: 8.5px; font-weight: 600; }
.detail-kind .app-icon { width: 12px; height: 12px; }
.detail-hero h1 { margin: 5px 0 0; font-size: 24px; line-height: 1.05; font-weight: 600; letter-spacing: -.035em; }
.detail-hero p { max-width: 770px; margin: 7px 0 0; color: #626a7a; font-size: 10.5px; line-height: 1.48; }
.detail-stats { margin-top: 10px; display: flex; gap: 6px; }
.detail-stats > span { padding: 4px 7px; border-radius: 99px; background: #eff0f3; color: #707887; font-size: 7px; }
.detail-stats strong { color: #353b4b; font-size: 8px; font-weight: 600; }
.detail-stats span.negative { background: #fff0f2; color: #b93643; }
.detail-stats span.negative strong { color: #b93643; }
.detail-stats span.positive { background: var(--green-soft); color: var(--green); }
.detail-stats span.positive strong { color: var(--green); }
.secondary-action { min-height: 31px; padding: 0 9px; display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 7px; background: white; color: #596071; font-size: 8px; white-space: nowrap; }
.secondary-action .app-icon { width: 12px; height: 12px; }
.detail-source-block { padding: 0 20px 12px; }
.detail-source-block > span { display: block; margin-bottom: 6px; color: #9399a6; font-size: 7px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.detail-source-block > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.detail-source-block button { min-height: 35px; padding: 4px 6px; display: grid; grid-template-columns: 25px minmax(0, 1fr) 12px; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 7px; background: white; text-align: left; }
.chip-logo { width: 25px; height: 25px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: white; }
.chip-logo img { width: 16px; height: 16px; object-fit: contain; }
.chip-logo .app-icon { width: 13px; height: 13px; }
.chip-logo > .app-icon { margin: auto; display: block; }
.detail-source-block button > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; overflow: hidden; font-size: 8.5px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.detail-source-block button small { margin-top: 2px; color: #9399a5; font-size: 6.5px; font-weight: 400; }
.detail-source-block button > .app-icon { width: 11px; height: 11px; color: #a1a6b0; }
.detail-tabs { min-height: 39px; padding: 0 18px; display: flex; align-items: stretch; gap: 2px; border-bottom: 1px solid var(--line); background: #fbfbfd; }
.detail-tabs button { padding: 0 11px; position: relative; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #7b8291; font-size: 9px; }
.detail-tabs button.active { border-bottom-color: var(--ink); color: var(--ink); font-weight: 600; }
.detail-tabs b { margin-left: 4px; padding: 2px 5px; border-radius: 99px; background: #e8eef1; font-size: 7px; font-weight: 600; }
.theme-summary-content { padding: 12px 20px 0; display: grid; grid-template-columns: 1.35fr .65fr; gap: 10px; }
.summary-narrative, .subtheme-list, .theme-evolution, .monitor-trend-card, .monitor-definition-card, .monitor-matches { border: 1px solid var(--line); border-radius: 11px; background: white; }
.summary-narrative { padding: 13px; }
.summary-narrative > header { display: flex; align-items: center; justify-content: space-between; }
.summary-narrative > header strong, .subtheme-list > header strong { font-size: 10px; font-weight: 600; }
.summary-narrative > header span { display: flex; align-items: center; gap: 4px; color: #527182; font-size: 7px; }
.summary-narrative > header .app-icon { width: 11px; height: 11px; }
.summary-narrative > p { margin: 8px 0 0; color: #555d6d; font-size: 9.5px; line-height: 1.48; }
.summary-callout { margin-top: 10px; padding: 9px; display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 8px; border-radius: 8px; background: #eef4f6; }
.summary-callout > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: white; color: var(--accent); }
.summary-callout .app-icon { width: 13px; height: 13px; }
.summary-callout div { display: flex; flex-direction: column; }
.summary-callout strong { font-size: 8px; font-weight: 600; }
.summary-callout small { margin-top: 2px; color: #667986; font-size: 7px; }
.subtheme-list { overflow: hidden; }
.subtheme-list > header { height: 34px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.subtheme-list > header span { padding: 2px 5px; border-radius: 99px; background: #eff0f3; color: #777e8c; font-size: 7px; }
.subtheme-list > div { min-height: 36px; padding: 6px 9px; display: grid; grid-template-columns: 3px minmax(0, 1fr) auto; align-items: center; gap: 7px; border-bottom: 1px solid #eff0f3; }
.subtheme-list > div:last-child { border-bottom: 0; }
.subtheme-list i { width: 3px; height: 22px; border-radius: 2px; background: #a8adba; }
.subtheme-list i.red { background: #d12d38; }
.subtheme-list i.amber { background: #e0a609; }
.subtheme-list > div span { display: flex; flex-direction: column; }
.subtheme-list > div strong { font-size: 8px; font-weight: 600; }
.subtheme-list > div small { margin-top: 2px; color: #8b92a0; font-size: 7px; }
.subtheme-list > div b { color: #616879; font-size: 8px; font-weight: 600; }
.theme-evolution { margin: 10px 20px 16px; padding: 11px 13px 8px; }
.theme-evolution > header { display: flex; align-items: baseline; justify-content: space-between; }
.theme-evolution > header strong { font-size: 9px; font-weight: 600; }
.theme-evolution > header span { color: #8b92a0; font-size: 7px; }
.theme-evolution .mini-bars { height: 45px; gap: 8px; }

/* Evidence view */
.evidence-page .detail-hero { padding-bottom: 13px; }
.evidence-layout { min-height: 350px; padding: 12px 18px 16px; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 9px; }
.subcategory-rail, .evidence-results { border: 1px solid var(--line); border-radius: 10px; background: white; }
.subcategory-rail { align-self: start; overflow: hidden; }
.subcategory-rail > header { min-height: 36px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.subcategory-rail > header strong { font-size: 9px; font-weight: 600; }
.subcategory-rail > header span { color: #8b92a0; font-size: 7px; }
.subcategory-rail button { width: 100%; min-height: 34px; padding: 6px 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; border-bottom: 1px solid #eff0f3; background: white; color: #676f80; font-size: 8px; text-align: left; }
.subcategory-rail button:last-child { border-bottom: 0; }
.subcategory-rail button.active { background: #edf3f5; color: var(--ink); font-weight: 600; }
.subcategory-rail button b { color: #9298a5; font-size: 7px; font-weight: 500; }
.evidence-results { min-width: 0; overflow: hidden; }
.evidence-results > header { min-height: 46px; padding: 7px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.evidence-results > header > div { display: flex; flex-direction: column; }
.evidence-results > header strong { font-size: 9px; font-weight: 600; }
.evidence-results > header span { margin-top: 2px; color: #8a91a0; font-size: 7px; }
.evidence-results label { width: 150px; min-height: 28px; padding: 0 7px; display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 7px; color: #9ba0ab; }
.evidence-results label .app-icon { width: 11px; height: 11px; }
.evidence-results input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 8px; }
.sentiment-filters { padding: 7px 9px; display: flex; gap: 5px; border-bottom: 1px solid var(--line); }
.sentiment-filters button { min-height: 23px; padding: 0 8px; border: 1px solid var(--line); border-radius: 99px; background: white; color: #717888; font-size: 7px; }
.sentiment-filters button.active { border-color: var(--ink); background: var(--ink); color: white; }
.evidence-list { max-height: 320px; padding: 8px; display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.evidence-row { width: 100%; padding: 9px 10px 9px 12px; position: relative; border: 1px solid var(--line); border-radius: 8px; background: white; text-align: left; }
.evidence-row > i { width: 3px; position: absolute; inset: 8px auto 8px 5px; border-radius: 2px; background: #c8303a; }
.evidence-row.active { border-color: #b9cad2; background: #fbfcfd; box-shadow: 0 0 0 2px rgb(41 79 99 / .05); }
.evidence-source { display: flex; align-items: center; gap: 6px; }
.evidence-source > span { width: 20px; height: 20px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: white; }
.evidence-source img { width: 13px; height: 13px; object-fit: contain; }
.evidence-source .app-icon { width: 13px; height: 13px; color: #526575; }
.evidence-source strong { font-size: 8px; font-weight: 600; }
.evidence-source em { margin-left: auto; padding: 2px 5px; border-radius: 99px; background: #fff0f2; color: #b93643; font-size: 6px; font-style: normal; }
.evidence-row blockquote { margin: 7px 0 0; color: #303648; font-size: 10.5px; line-height: 1.35; }
.evidence-meta { margin-top: 8px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #eceef2; }
.evidence-meta span { min-width: 0; padding: 6px 6px 0; display: flex; flex-direction: column; color: #9a9fac; font-size: 6px; text-transform: uppercase; letter-spacing: .05em; }
.evidence-meta span:first-child { padding-left: 0; }
.evidence-meta strong { margin-top: 2px; overflow: hidden; color: #515868; font-size: 7px; font-weight: 500; text-transform: none; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }

/* Custom Monitoring is a sibling app view, not an explanatory interstitial. */
.monitoring-panel { flex: 0 0 auto; }
.monitor-list-heading { min-height: 49px; padding: 7px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.monitor-list-heading > div { display: flex; flex-direction: column; }
.monitor-list-heading strong { font-size: 11px; font-weight: 600; }
.monitor-list-heading span { margin-top: 2px; color: #89909f; font-size: 8px; }
.monitor-list-heading > button { min-height: 29px; padding: 0 9px; display: flex; align-items: center; gap: 5px; border: 1px solid var(--ink); border-radius: 7px; background: var(--ink); color: white; font-size: 8px; }
.monitor-list-heading > button .app-icon { width: 12px; height: 12px; }
.monitor-list { display: flex; flex-direction: column; }
.monitor-row { min-height: 53px; padding: 7px 11px; display: grid; grid-template-columns: 26px minmax(0, 1fr) 46px 46px 64px 54px 44px 13px; align-items: center; gap: 8px; border: 0; border-bottom: 1px solid #eceef2; background: white; text-align: left; }
.monitor-row:last-child { border-bottom: 0; }
.monitor-row:hover { background: #f7f9fa; }
.monitor-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: #eaf1f4; color: var(--accent); }
.monitor-icon .app-icon { width: 13px; height: 13px; }
.monitor-row > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.monitor-row > span:nth-child(2) strong { overflow: hidden; font-size: 9.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.monitor-row > span:nth-child(2) small { margin-top: 2px; overflow: hidden; color: #878e9d; font-size: 7.5px; text-overflow: ellipsis; white-space: nowrap; }
.monitor-row em { padding: 3px 5px; border-radius: 99px; background: #eff0f3; color: #747b89; font-size: 7px; font-style: normal; text-align: center; }
.monitor-coverage { color: #767e8e; font-size: 7px; }
.monitor-row .mini-bars { height: 24px; margin: 0; gap: 2px; }
.monitor-row > b { font-size: 10px; font-weight: 600; text-align: right; }
.monitor-row > b small { display: block; color: #9298a5; font-size: 6px; font-weight: 400; }
.alert-state { display: flex; align-items: center; gap: 3px; color: #9a9fab; font-size: 7px; }
.alert-state.on { color: var(--green); }
.alert-state .app-icon { width: 10px; height: 10px; }
.monitor-row > .app-icon { width: 12px; height: 12px; color: #a0a5b1; }
.metrics-section.compact { padding-bottom: 7px; }
.monitor-total-chart { padding: 3px 12px 0; }
.monitor-total-chart .mini-bars { height: 52px; gap: 12px; }

/* Monitor detail uses the same grouped-detail pattern as a theme. */
.monitor-detail-grid { padding: 12px 20px 0; display: grid; grid-template-columns: 1.18fr .82fr; gap: 10px; }
.monitor-trend-card, .monitor-definition-card { padding: 12px; }
.monitor-trend-card > header { display: flex; align-items: start; justify-content: space-between; }
.monitor-trend-card > header > div { display: flex; flex-direction: column; }
.monitor-trend-card > header strong, .monitor-definition-card > header strong { font-size: 9px; font-weight: 600; }
.monitor-trend-card > header span { margin-top: 2px; color: #8b92a0; font-size: 7px; }
.monitor-trend-card > header > b { color: var(--green); font-size: 11px; font-weight: 600; text-align: right; }
.monitor-trend-card > header > b small { display: block; font-size: 6px; font-weight: 400; }
.monitor-trend-card .mini-bars { height: 70px; gap: 8px; }
.monitor-definition-card > header { display: flex; align-items: center; justify-content: space-between; }
.monitor-definition-card > header span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: #f2f4f5; color: #7f8694; }
.monitor-definition-card > header .app-icon { width: 11px; height: 11px; }
.monitor-definition-card > p { margin: 9px 0 0; color: #5c6474; font-size: 8.5px; line-height: 1.45; }
.monitor-definition-card dl { margin: 9px 0 0; }
.monitor-definition-card dl > div { min-height: 28px; padding: 5px 0; display: grid; grid-template-columns: 55px 1fr; align-items: center; border-top: 1px solid #eceef2; }
.monitor-definition-card dt { color: #8d94a2; font-size: 7px; }
.monitor-definition-card dd { margin: 0; color: #4f5665; font-size: 7.5px; font-weight: 500; }
.monitor-matches { margin: 10px 20px 16px; overflow: hidden; }
.monitor-matches > header { min-height: 40px; padding: 6px 11px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.monitor-matches > header > div { display: flex; flex-direction: column; }
.monitor-matches > header strong { font-size: 9px; font-weight: 600; }
.monitor-matches > header span { margin-top: 2px; color: #8c93a1; font-size: 7px; }
.monitor-matches > header button { border: 0; background: transparent; color: var(--accent-dark); font-size: 8px; font-weight: 600; }
.monitor-match-grid { display: grid; grid-template-columns: 1fr 1fr; }
.monitor-match-grid article { min-width: 0; padding: 10px; display: grid; grid-template-columns: 25px 1fr; gap: 7px; border-right: 1px solid var(--line); }
.monitor-match-grid article:last-child { border-right: 0; }
.monitor-match-grid article > span { width: 25px; height: 25px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; }
.monitor-match-grid article img { width: 16px; height: 16px; object-fit: contain; }
.monitor-match-grid article > div { min-width: 0; }
.monitor-match-grid small { color: #8d94a2; font-size: 6px; }
.monitor-match-grid blockquote { margin: 5px 0 0; color: #343a4a; font-size: 8px; line-height: 1.4; }
.monitor-match-grid em { margin-top: 6px; display: block; color: #7f8694; font-size: 6px; font-style: normal; }

@media (max-height: 760px) {
  .app-page { padding: 12px; }
  .overview-page, .monitoring-page { gap: 7px; }
  .overview-stat-strip { min-height: 46px; }
  .executive-summary { padding-block: 9px; }
  .executive-summary > p { margin-top: 4px; line-height: 1.38; }
  .analysis-tabs { height: 38px; }
  .theme-list-heading { min-height: 28px; }
  .theme-row { min-height: 40px; }
  .metrics-section > header { min-height: 30px; }
  .metric-cards article { padding-block: 6px; }
  .metric-cards .mini-bars { height: 23px; }
  .detail-hero { padding-block: 12px 9px; }
  .detail-hero h1 { font-size: 21px; }
  .detail-source-block { padding-bottom: 8px; }
  .theme-summary-content, .monitor-detail-grid { padding-top: 8px; }
  .theme-evolution { margin-top: 7px; }
  .source-drawer-layout { grid-template-columns: 280px minmax(0, 1fr); }
  .managed-source-detail { padding: 17px; }
}
