

:root {
  --ink: #172238;
  --muted: #69758b;
  --line: #dfe5ee;
  --canvas: #f3f6fa;
  --panel: #ffffff;
  --navy: #101a2d;
  --blue: #315bea;
  --cyan: #32c0af;
  --amber: #d78623;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); }

body { font-family: var(--font-geist-sans), Arial, sans-serif; }

button, select { font: inherit; }
button { color: inherit; }
button:disabled { cursor: not-allowed; opacity: .55; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }

.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 24px 16px 18px;
  display: flex; flex-direction: column; color: #dbe2ee;
  background: radial-gradient(circle at 30% -10%, #263c65 0, #121e34 34%, #0e1729 72%);
  border-right: 1px solid #25334b;
}

.brand { height: 48px; display: flex; align-items: center; gap: 11px; padding: 0 9px; }
.brand strong { display: block; color: white; font-size: 14px; letter-spacing: .16em; line-height: 1.25; }
.brand span:not(.logo-mark) { display: block; margin-top: 2px; color: #92a0b7; font-size: 11px; letter-spacing: .06em; }

.logo-mark { position: relative; width: 30px; height: 30px; border: 1px solid #5478ff; border-radius: 50%; box-shadow: inset 0 0 0 5px rgba(49, 91, 234, .11); }
.logo-mark::before, .logo-mark::after, .logo-mark span { content: ""; position: absolute; border: 1px solid #7c9cff; border-radius: 50%; }
.logo-mark::before { inset: 7px 3px; }
.logo-mark::after { inset: 3px 7px; }
.logo-mark span { width: 4px; height: 4px; top: 12px; left: 12px; background: #9eb3ff; border: 0; }

.primary-nav { margin-top: 32px; display: flex; flex-direction: column; gap: 5px; }
.primary-nav p { margin: 20px 10px 7px; color: #62718a; font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.nav-item { position: relative; width: 100%; height: 44px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: #9ca9bc; display: flex; align-items: center; gap: 11px; cursor: pointer; font-size: 14px; text-align: left; }
.nav-item:hover { background: #172641; color: #eef3fb; }
.nav-item.active { color: white; background: linear-gradient(90deg, rgba(49,91,234,.3), rgba(49,91,234,.08)); box-shadow: inset 2px 0 #6384ff; }
.tiny-icon { width: 18px; color: #71829c; font-family: var(--font-geist-mono); font-size: 15px; }
.nav-item.active .tiny-icon { color: #83a0ff; }
.nav-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 11px; background: #25334d; font-size: 11px; }
.sidebar-foot { margin-top: auto; }
.system-row { margin: 0 7px 16px; padding-bottom: 15px; border-bottom: 1px solid #26334a; color: #7f8da2; font-size: 12px; display: flex; gap: 8px; align-items: center; }
.pulse, .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #31c999; box-shadow: 0 0 0 4px rgba(49,201,153,.1); }
.identity { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 7px; color: #cfd9ff; background: #263654; font-size: 10px; font-weight: 700; }
.identity strong, .identity span { display: block; }
.identity strong { color: #d8dfeb; font-size: 12px; font-weight: 600; }
.identity div span { margin-top: 3px; color: #65738a; font-size: 10px; }

.workspace { min-width: 0; }
.topbar { height: 70px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); }
.crumbs { color: #263249; font-size: 14px; font-weight: 600; }
.crumbs span, .crumbs b { color: #96a0af; font-weight: 400; margin-right: 8px; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.source-switch { height: 35px; padding: 3px; display: flex; align-items: center; gap: 2px; border: 1px solid #d6dde8; border-radius: 7px; background: #f1f4f8; }
.source-switch button { height: 29px; padding: 0 11px; border: 0; border-radius: 4px; background: transparent; color: #788499; cursor: pointer; font-size: 11px; font-weight: 650; }
.source-switch button.active { background: white; color: #294fcf; box-shadow: 0 1px 3px rgba(28,45,74,.12); }
.icon-button, .secondary-button, .primary-button { height: 38px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 650; }
.icon-button { width: 35px; border: 1px solid var(--line); background: white; color: #8792a4; }
.secondary-button { padding: 0 14px; border: 1px solid #cfd7e3; background: #fff; color: #37445a; }
.primary-button { padding: 0 15px; border: 1px solid #244cd8; background: #315bea; color: white; box-shadow: 0 2px 5px rgba(49,91,234,.22); }
.secondary-button:hover, .icon-button:hover { background: #f7f9fc; }
.primary-button:hover { background: #244ed5; }

.content { padding: 23px 30px 18px; }
.demo-banner { min-height: 38px; padding: 8px 13px; display: flex; align-items: center; gap: 13px; border: 1px solid #e5d19a; border-radius: 6px; background: #fff9e9; color: #695626; }
.demo-banner span { flex: 0 0 auto; padding: 4px 7px; border-radius: 3px; background: #f4e0a8; color: #765c17; font: 700 10px/1.2 var(--font-geist-mono); letter-spacing: .1em; }
.demo-banner p { margin: 0; font-size: 12px; line-height: 1.45; }
.live-banner { border-color: #a8ddd2; background: #effbf8; color: #285d54; }
.live-banner span { background: #c8eee6; color: #176e5e; }
.connection-banner { border-color: #cbd8ef; background: #f2f6fd; color: #425c88; }
.connection-banner span { background: #dce7f9; color: #36588f; }
.connection-banner.error { border-color: #e8b9b5; background: #fff3f2; color: #8d433d; }
.connection-banner.error span { background: #f5d5d1; color: #963e36; }

.page-heading { padding: 25px 2px 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.eyebrow { margin-bottom: 8px; display: flex; align-items: center; gap: 8px; color: #667389; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
.live-dot { width: 6px; height: 6px; }
.mode-dot { width: 6px; height: 6px; border-radius: 50%; background: #9aa6b7; }
h1 { margin: 0; color: #142039; font-size: 31px; line-height: 1.2; letter-spacing: -.025em; }
.page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.filters { display: flex; gap: 8px; }
.filters label { position: relative; }
.filters label > span { position: absolute; top: -19px; left: 2px; color: #8792a4; font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.filters select { min-width: 142px; height: 38px; padding: 0 30px 0 11px; border: 1px solid #d4dce7; border-radius: 6px; background: white; color: #435069; font-size: 12px; font-weight: 550; outline: none; }
.filters select:focus { border-color: #6d8aff; box-shadow: 0 0 0 3px rgba(49,91,234,.1); }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric-card { min-height: 126px; padding: 18px 19px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: 0 1px 2px rgba(20,32,57,.03); }
.alert-card { border-top: 2px solid #e3a546; }
.metric-label { display: flex; justify-content: space-between; color: #67748a; font-size: 12px; font-weight: 600; }
.metric-icon { color: #9aa5b5; font-size: 13px; }
.metric-value { margin-top: 12px; color: #16223a; font-size: 31px; font-weight: 700; letter-spacing: -.03em; }
.metric-foot { margin-top: 9px; color: #5f6c81; font-size: 11px; }
.metric-foot b { color: #334058; }
.metric-foot span { color: #9aa4b2; margin-left: 3px; }
.metric-foot.positive { color: #149572; font-weight: 650; }
.metric-foot.warning { color: #bd761b; font-weight: 650; }

.insight-grid { margin-top: 13px; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(270px, .75fr); gap: 12px; }
.panel { position: relative; min-height: 276px; padding: 17px 18px 14px; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: 0 1px 2px rgba(20,32,57,.03); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; }
.panel-head h2, .section-head h2 { margin: 0; color: #253148; font-size: 15px; font-weight: 700; }
.panel-head p, .section-head p { margin: 5px 0 0; color: #7c8899; font-size: 12px; line-height: 1.4; }
.legend { display: flex; align-items: center; gap: 6px; color: #818c9e; font-size: 10px; }
.legend span { width: 8px; height: 8px; border-radius: 2px; background: #5f7ff0; }
.legend i { width: 14px; border-top: 1px dashed #aeb6c4; margin-left: 6px; }
.legend b { font-weight: 500; }
.chart { position: absolute; left: 18px; right: 18px; top: 61px; bottom: 15px; padding: 0 0 21px 33px; }
.y-axis { position: absolute; left: 0; top: 0; bottom: 21px; display: flex; flex-direction: column; justify-content: space-between; color: #9da6b3; font: 10px var(--font-geist-mono); }
.bars { position: relative; height: 100%; border-bottom: 1px solid #e7ebf1; background: repeating-linear-gradient(to bottom, #fff 0, #fff calc(25% - 1px), #edf0f4 25%); display: flex; align-items: flex-end; gap: 2px; overflow: hidden; }
.bars > span { z-index: 2; flex: 1; min-width: 2px; max-width: 8px; border-radius: 2px 2px 0 0; background: #a9b8ec; opacity: .82; }
.bars > span.hot { background: #4f70e3; opacity: 1; }
.baseline { position: absolute; z-index: 1; left: 0; right: 0; bottom: 39%; border-top: 1px dashed #9aa5b5; }
.x-axis { position: absolute; left: 33px; right: 0; bottom: 0; display: flex; justify-content: space-between; color: #9ca6b4; font: 10px var(--font-geist-mono); }
.chart-callout { position: absolute; right: 7%; top: 38%; display: flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid #d9e1f6; border-radius: 5px; background: rgba(255,255,255,.94); box-shadow: 0 3px 10px rgba(36,54,91,.1); }
.chart-callout strong { color: #315bea; font-size: 14px; }
.chart-callout span { color: #7e8a9d; font-size: 10px; line-height: 1.35; }

.donut-wrap { margin-top: 22px; display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 14px; }
.donut { width: 100px; height: 100px; border-radius: 50%; background: conic-gradient(#4f7cff 0 44%, #33c3aa 44% 67%, #f6a84b 67% 86%, #a78bfa 86% 100%); display: grid; place-items: center; }
.donut::before { content: ""; grid-area: 1 / 1; width: 66px; height: 66px; border-radius: 50%; background: white; }
.donut div { z-index: 1; grid-area: 1 / 1; text-align: center; }
.donut strong { display: block; color: #263249; font-size: 21px; }
.donut span { display: block; color: #8f99a8; font-size: 9px; text-transform: uppercase; }
.language-list { display: flex; flex-direction: column; gap: 4px; }
.language-list button { width: 100%; padding: 5px 2px; border: 0; background: transparent; display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 7px; cursor: pointer; text-align: left; }
.language-list button:hover { background: #f6f8fb; }
.swatch { width: 6px; height: 6px; border-radius: 2px; }
.language-list b { color: #536077; font-size: 12px; font-weight: 600; }
.language-list i { color: #7e8999; font: 11px var(--font-geist-mono); font-style: normal; }
.text-button { margin-top: 14px; padding: 0; border: 0; background: transparent; color: #4464ce; font-size: 12px; cursor: pointer; }

.cluster-section { margin-top: 13px; padding: 17px 18px 0; border: 1px solid var(--line); border-radius: 7px; background: white; }
.section-head { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.section-head .secondary-button { height: 34px; font-size: 12px; }
.cluster-table { margin: 0 -18px; border-top: 1px solid #e7ebf1; }
.table-head, .cluster-row { display: grid; grid-template-columns: minmax(250px, 1.9fr) 1fr .8fr 1fr .75fr 25px; align-items: center; gap: 10px; }
.table-head { min-height: 38px; padding: 0 18px; background: #f8f9fb; color: #7f8a9a; font-size: 10px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.cluster-row { width: 100%; min-height: 78px; padding: 0 18px; border: 0; border-top: 1px solid #edf0f4; background: white; cursor: pointer; text-align: left; }
.cluster-row:hover { background: #fafbfe; }
.candidate-cell b, .candidate-cell i, .score-cell b, .score-cell i, .scale-cell b, .scale-cell i { display: block; }
.candidate-cell b { color: #2b374e; font-size: 13px; font-weight: 680; }
.candidate-cell i, .score-cell i, .scale-cell i { margin-top: 6px; color: #8490a1; font-size: 10px; font-style: normal; }
.score-cell { display: flex; align-items: center; gap: 9px; }
.score-cell b { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font: 700 13px var(--font-geist-mono); }
.score-cell i { margin: 0; }
.high-score { color: #a96114; background: #fff1d9; border: 1px solid #f5d39f; }
.review-score { color: #526983; background: #edf2f8; border: 1px solid #d7e0eb; }
.scale-cell b, .signal-cell, .time-cell { color: #556278; font-size: 12px; font-weight: 570; }
.arrow-cell { color: #9ba5b3; font-size: 19px; }
.empty-state { padding: 30px 18px; color: #8792a3; font-size: 11px; text-align: center; }
.data-foot { height: 48px; display: flex; align-items: center; gap: 25px; color: #8e99a8; font: 10px var(--font-geist-mono); }
.data-foot span::before { content: ""; width: 4px; height: 4px; display: inline-block; margin: 0 6px 1px 0; border-radius: 50%; background: #b6bec9; }
.live-section { margin-top: 13px; padding: 17px 18px 18px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.live-section-head { margin-bottom: 14px; }
.source-stamp { color: #7f8b9d; font: 10px var(--font-geist-mono); }
.narrative-map-section { padding: 22px; border: 1px solid #b9c8f5; border-top: 5px solid #315bea; border-radius: 10px; background: linear-gradient(145deg, #f7f9ff 0, #fff 46%); box-shadow: 0 6px 22px rgba(38,70,166,.08); }
.section-kicker { display: block; margin-bottom: 5px; color: #4967cc; font: 750 10px var(--font-geist-mono); letter-spacing: .11em; }
.narrative-map-section .section-head h2 { color: #182945; font-size: 21px; }
.narrative-map-section .section-head p { max-width: 720px; font-size: 13px; }
.narrative-count { padding: 8px 11px; border: 1px solid #cdd7f2; border-radius: 16px; background: white; color: #435d9f; font-size: 11px; font-weight: 700; white-space: nowrap; }
.narrative-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.narrative-card { min-width: 0; min-height: 314px; padding: 18px; border: 1px solid #d5ddef; border-radius: 9px; background: white; box-shadow: 0 2px 8px rgba(25,43,79,.04); cursor: pointer; text-align: left; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.narrative-card:hover { transform: translateY(-2px); border-color: #7f98e8; box-shadow: 0 10px 24px rgba(41,70,145,.11); }
.narrative-card:focus-visible { outline: 3px solid rgba(49,91,234,.25); outline-offset: 2px; }
.narrative-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.narrative-card-top > span { color: #536fca; font: 750 10px var(--font-geist-mono); letter-spacing: .09em; }
.momentum-badge { padding: 5px 8px; border-radius: 11px; background: #edf1f7; color: #627087; font-size: 10px; font-weight: 750; }
.momentum-badge.accelerating, .momentum-badge.new-activity { background: #e3f5ef; color: #19735e; }
.momentum-badge.declining { background: #f2f3f5; color: #7e8796; }
.narrative-card h3 { margin: 15px 0 0; color: #1c2c47; font-size: 18px; line-height: 1.28; letter-spacing: -.01em; }
.narrative-card > p { min-height: 42px; margin: 8px 0 0; color: #66748a; font-size: 13px; line-height: 1.55; }
.narrative-card-metrics { margin-top: 15px; display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; border: 1px solid #e0e5ef; border-radius: 6px; background: #f8faff; }
.narrative-card-metrics span { padding: 10px 8px; border-right: 1px solid #e0e5ef; color: #7b8799; font-size: 9px; }
.narrative-card-metrics span:last-child { border-right: 0; }
.narrative-card-metrics strong { display: block; margin-bottom: 3px; color: #263a5e; font: 730 16px var(--font-geist-mono); }
.narrative-card blockquote { min-height: 56px; margin: 13px 0 0; padding: 10px 11px; overflow: hidden; border-left: 3px solid #9cb0ea; background: #f7f9fd; color: #526078; font-size: 11px; font-style: normal; line-height: 1.45; }
.narrative-card blockquote small { display: block; margin-top: 5px; color: #8994a4; font-size: 9px; }
.narrative-card-foot { margin-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.narrative-card-foot span { overflow: hidden; color: #7a879b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.narrative-card-foot b { flex: 0 0 auto; color: #315bea; font-size: 12px; }
.live-pattern-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.live-pattern { min-height: 210px; padding: 14px; border: 1px solid #dfe5ed; border-left: 3px solid #8a9ab2; border-radius: 6px; background: #fbfcfd; }
.live-pattern.candidate { border-left-color: #d89132; background: #fffcf6; }
.live-pattern-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.live-pattern-head span { color: #8894a5; font: 700 9px var(--font-geist-mono); letter-spacing: .07em; }
.live-pattern.candidate .live-pattern-head span { color: #a56c22; }
.live-pattern-head h3 { margin: 6px 0 0; color: #2d3a51; font-size: 14px; }
.live-pattern-head > strong { min-width: 48px; color: #253653; font: 720 24px var(--font-geist-mono); text-align: right; }
.live-pattern-head small { display: block; color: #929cac; font: 10px var(--font-geist-sans); }
.live-signal-chips { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 5px; }
.live-signal-chips span { padding: 5px 7px; border: 1px solid #d8e0ec; border-radius: 3px; background: white; color: #59677e; font-size: 10px; font-weight: 650; }
.pattern-sources { margin-top: 11px; display: flex; flex-direction: column; gap: 5px; }
.pattern-sources a { min-width: 0; padding: 7px 8px; display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 8px; border: 1px solid #e5e9ef; border-radius: 4px; background: white; text-decoration: none; }
.pattern-sources a:hover { border-color: #9db0ee; }
.pattern-sources b { overflow: hidden; color: #41516c; font-size: 10px; text-overflow: ellipsis; }
.pattern-sources span { overflow: hidden; color: #68758a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pattern-caveat { margin: 10px 0 0; color: #7c6956; font-size: 10px; line-height: 1.5; }
.pattern-open { margin-top: 12px; padding: 0; border: 0; background: transparent; color: #3f60cc; cursor: pointer; font-size: 11px; font-weight: 700; }
.pattern-open:hover { color: #254ac8; text-decoration: underline; }
.live-empty { min-height: 130px; display: grid; place-content: center; padding: 25px; border: 1px dashed #cfd8e4; border-radius: 6px; background: #f9fbfd; text-align: center; }
.live-empty strong { color: #47566e; font-size: 14px; }
.live-empty p { max-width: 620px; margin: 7px auto 0; color: #7b8799; font-size: 12px; line-height: 1.5; }
.live-post-table { border: 1px solid #e2e7ee; border-radius: 6px; overflow: hidden; }
.live-post-head, .live-post-row { display: grid; grid-template-columns: minmax(150px, .65fr) minmax(320px, 2.1fr) 72px minmax(150px, .75fr) 55px; gap: 14px; align-items: center; }
.live-post-head { min-height: 36px; padding: 0 13px; background: #f6f8fb; color: #7f8a9b; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.live-post-row { min-height: 104px; padding: 14px 13px; border-top: 1px solid #e8ecf1; background: white; }
.live-post-row:first-of-type { border-top: 0; }
.live-account b, .live-account span, .live-account small { display: block; }
.live-account b { overflow: hidden; color: #34435c; font-size: 12px; text-overflow: ellipsis; }
.live-account b i { margin-left: 4px; color: #315bea; font-style: normal; }
.live-account span { margin-top: 5px; color: #7f8a9c; font-size: 10px; }
.live-account small { margin-top: 4px; overflow: hidden; color: #926f43; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.live-post-copy p { display: -webkit-box; overflow: hidden; margin: 0; color: #46536a; font-size: 12px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.live-post-copy span { display: block; margin-top: 6px; color: #8290a3; font: 10px var(--font-geist-mono); }
.live-engagement { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.live-engagement span { color: #7e899a; font-size: 10px; }
.live-engagement span:last-child { grid-column: 1 / -1; }
.live-engagement b { color: #4c5a70; font: 680 11px var(--font-geist-mono); }
.source-link { color: #4164d6; font-size: 11px; font-weight: 650; text-decoration: none; }
.source-link:hover { text-decoration: underline; }
.collection-planner { margin-bottom: 14px; padding: 21px; border: 1px solid #cad6e7; border-radius: 9px; background: linear-gradient(140deg, #f8faff 0, #fff 62%); box-shadow: 0 3px 14px rgba(28,48,87,.05); }
.planner-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.planner-kicker { color: #4764c5; font: 750 10px var(--font-geist-mono); letter-spacing: .12em; }
.planner-head h2 { margin: 6px 0 0; color: #1d2b44; font-size: 20px; letter-spacing: -.015em; }
.planner-head p { max-width: 670px; margin: 7px 0 0; color: #6b788d; font-size: 13px; line-height: 1.5; }
.planner-actions { display: flex; gap: 8px; }
.planner-run { min-width: 190px; }
.search-mode-grid { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.search-mode-grid button { min-height: 76px; padding: 12px 14px; display: grid; grid-template-columns: 1fr; align-content: center; gap: 4px; border: 1px solid #d5deea; border-radius: 8px; background: white; color: #637087; cursor: pointer; text-align: left; }
.search-mode-grid button:hover { border-color: #93a7e7; background: #fbfcff; }
.search-mode-grid button.active { border-color: #5575e6; background: #f2f5ff; box-shadow: inset 0 0 0 1px #5575e6; }
.search-mode-grid span { color: #6679bd; font: 730 9px var(--font-geist-mono); letter-spacing: .1em; }
.search-mode-grid strong { color: #293a58; font-size: 13px; }
.search-mode-grid small { color: #758297; font-size: 10px; line-height: 1.4; }
.planner-grid { margin-top: 20px; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.4fr); gap: 22px; }
.planner-label { margin-bottom: 9px; display: flex; justify-content: space-between; color: #56647a; font-size: 12px; font-weight: 720; }
.planner-label span { color: #8b95a5; font-weight: 550; }
.profile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.profile-card { min-height: 92px; padding: 11px 9px; border: 1px solid #d6deea; border-radius: 7px; background: white; cursor: pointer; text-align: left; }
.profile-card:hover { border-color: #91a5e7; background: #fbfcff; }
.profile-card.active { border-color: #5575e6; background: #f2f5ff; box-shadow: inset 0 0 0 1px #5575e6; }
.profile-card strong, .profile-card span, .profile-card small { display: block; }
.profile-card strong { color: #22324e; font: 760 20px var(--font-geist-mono); }
.profile-card span { margin-top: 5px; color: #41516b; font-size: 11px; font-weight: 720; }
.profile-card small { margin-top: 4px; color: #8893a4; font-size: 9px; line-height: 1.3; }
.area-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.area-option { min-height: 60px; padding: 10px 11px; display: flex; gap: 9px; border: 1px solid #dbe2ec; border-radius: 7px; background: white; cursor: pointer; }
.area-option.active { border-color: #8fa5ed; background: #f6f8ff; }
.area-option input { width: 15px; height: 15px; flex: 0 0 auto; margin: 2px 0 0; accent-color: #315bea; }
.area-option span, .area-option strong, .area-option small { display: block; }
.area-option strong { color: #35445d; font-size: 11px; }
.area-option small { margin-top: 4px; color: #7d899b; font-size: 9px; line-height: 1.35; }
.keyword-explainer > div { min-height: 92px; padding: 15px 16px; border: 1px solid #d5deea; border-radius: 8px; background: #f7f9fd; }
.keyword-explainer strong { color: #35445d; font-size: 13px; }
.keyword-explainer p { margin: 7px 0 0; color: #6f7c91; font-size: 11px; line-height: 1.5; }
.focus-row { margin-top: 17px; display: grid; grid-template-columns: minmax(360px, 1.2fr) minmax(360px, .8fr); gap: 18px; align-items: end; }
.focus-row > label > span { display: block; margin-bottom: 7px; color: #56647a; font-size: 11px; font-weight: 720; }
.focus-row > label > input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid #cfd9e7; border-radius: 6px; background: white; color: #35445e; font-size: 13px; outline: none; }
.focus-row > label > input:focus { border-color: #6581e5; box-shadow: 0 0 0 3px rgba(49,91,234,.09); }
.focus-row > label > small { display: block; margin-top: 5px; color: #8a95a5; font-size: 10px; }
.query-preview { margin-top: 8px; padding: 7px 9px; display: block; overflow: hidden; border-radius: 5px; background: #edf1f8; color: #50627f; font: 10px var(--font-geist-mono); text-overflow: ellipsis; white-space: nowrap; }
.volume-note { min-height: 61px; padding: 11px 13px; border: 1px solid #dbe2ec; border-radius: 7px; background: #f8fafc; }
.volume-note.visible { border-color: #e2c892; background: #fffaed; }
.volume-note p { margin: 0; color: #647187; font-size: 11px; line-height: 1.45; }
.volume-note p strong { display: block; color: #35445b; font-size: 12px; }
.volume-note label { display: flex; gap: 10px; cursor: pointer; }
.volume-note label input { width: 16px; height: 16px; margin-top: 2px; accent-color: #315bea; }
.volume-note label span { color: #75633e; font-size: 11px; line-height: 1.45; }
.volume-note label strong { display: block; color: #5e4b25; font-size: 12px; }
.collection-receipt { margin: 0 0 14px; padding: 18px 20px; border: 1px solid #bad8cf; border-left: 5px solid #31a98c; border-radius: 8px; background: linear-gradient(100deg, #f1fbf8, #fff 70%); }
.receipt-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.receipt-head > div > span { color: #33806d; font: 740 9px var(--font-geist-mono); letter-spacing: .1em; }
.receipt-head h2 { margin: 4px 0 0; color: #24443e; font-size: 16px; }
.completion-badge { padding: 6px 9px; border-radius: 12px; background: #d8f3eb; color: #21705e; font-size: 10px; font-weight: 720; }
.completion-badge.partial { background: #fff0d6; color: #9b641a; }
.receipt-stats { margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.receipt-stats div { min-height: 64px; padding: 10px 12px; border: 1px solid #d7e8e3; border-radius: 6px; background: rgba(255,255,255,.82); }
.receipt-stats strong, .receipt-stats span { display: block; }
.receipt-stats strong { color: #1f3e39; font: 730 19px var(--font-geist-mono); }
.receipt-stats span { margin-top: 4px; color: #71817e; font-size: 10px; }
.coverage-grid { margin-top: 13px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; }
.coverage-grid > div span { display: flex; justify-content: space-between; }
.coverage-grid b { color: #54665f; font-size: 10px; }
.coverage-grid i { color: #81908b; font: 9px var(--font-geist-mono); font-style: normal; }
.coverage-grid em { height: 6px; margin-top: 6px; display: block; overflow: hidden; border-radius: 4px; background: #e4ece9; }
.coverage-grid u { height: 100%; display: block; border-radius: 4px; background: #58b49d; text-decoration: none; }
.query-receipt { margin-top: 13px; padding: 10px 12px; display: grid; grid-template-columns: auto minmax(220px, .7fr) minmax(320px, 1.3fr); align-items: center; gap: 10px; border: 1px solid #d6e7e2; border-radius: 6px; background: rgba(255,255,255,.72); }
.query-receipt span { color: #438171; font: 740 9px var(--font-geist-mono); letter-spacing: .09em; }
.query-receipt strong { color: #50645e; font-size: 10px; }
.query-receipt code { overflow: hidden; padding: 6px 8px; border-radius: 4px; background: #edf4f2; color: #48645d; font: 9px var(--font-geist-mono); text-overflow: ellipsis; white-space: nowrap; }
.receipt-focus, .receipt-warning { margin: 11px 0 0; color: #66766f; font-size: 10px; }
.receipt-warning { padding: 8px 10px; border-radius: 5px; background: #fff4df; color: #8b641f; }
.post-toolbar { margin: -2px 0 12px; padding: 10px; display: grid; grid-template-columns: minmax(250px, 1fr) 210px; gap: 9px; border: 1px solid #e0e6ee; border-radius: 6px; background: #f8fafc; }
.post-toolbar label span { display: block; margin-bottom: 5px; color: #778397; font-size: 9px; font-weight: 720; text-transform: uppercase; letter-spacing: .06em; }
.post-toolbar input, .post-toolbar select { width: 100%; height: 36px; padding: 0 10px; border: 1px solid #cfd8e5; border-radius: 5px; background: white; color: #43516a; font-size: 12px; outline: none; }
.post-area-chips { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 4px; }
.post-area-chips b { padding: 3px 5px; border-radius: 3px; background: #eef2fa; color: #60729a; font-size: 8px; font-weight: 650; }
.relevance-score { display: flex; align-items: baseline; gap: 2px; color: #66758d; }
.relevance-score strong { font: 740 20px var(--font-geist-mono); }
.relevance-score span { font: 9px var(--font-geist-mono); }
.relevance-score.high { color: #19866e; }
.live-filter-empty { padding: 28px; color: #7d899b; font-size: 12px; text-align: center; }
.load-more { width: 100%; height: 40px; margin-top: 9px; border: 1px solid #d3dce8; border-radius: 6px; background: #f8fafc; color: #506079; cursor: pointer; font-size: 12px; font-weight: 650; }
.load-more:hover { background: #f1f5fa; }
.collection-history { margin-top: 13px; padding: 17px 18px 18px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.history-table { overflow: hidden; border: 1px solid #e1e6ed; border-radius: 6px; }
.history-head, .history-row { display: grid; grid-template-columns: 1fr 1.5fr 1fr .5fr .65fr; gap: 12px; align-items: center; }
.history-head { min-height: 35px; padding: 0 12px; background: #f6f8fb; color: #7c8899; font-size: 9px; font-weight: 720; text-transform: uppercase; letter-spacing: .06em; }
.history-row { min-height: 58px; padding: 9px 12px; border-top: 1px solid #e8ecf1; color: #56647a; font-size: 11px; }
.history-row > span b, .history-row > span small { display: block; }
.history-row > span b { color: #35445d; font-size: 12px; }
.history-row > span small { margin-top: 4px; color: #8a95a5; font-size: 9px; }
.history-complete, .history-partial { width: fit-content; padding: 4px 7px; border-radius: 10px; font-size: 9px; font-weight: 700; }
.history-complete { background: #e2f5ef; color: #24745f; }
.history-partial { background: #fff1db; color: #96621c; }
.live-start-state { min-height: 155px; margin-top: 13px; padding: 25px; display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 18px; border: 1px dashed #bdc9d9; border-radius: 7px; background: #f8fafc; }
.live-start-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #111827; color: white; font: 700 16px var(--font-geist-mono); }
.live-start-state h2 { margin: 0; color: #334157; font-size: 16px; }
.live-start-state p { margin: 7px 0 0; color: #6f7d91; font-size: 12px; line-height: 1.5; }
.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; max-width: 380px; padding: 13px 16px; border: 1px solid #cfd8e7; border-radius: 7px; background: #17243a; color: white; box-shadow: 0 10px 30px rgba(13,25,45,.25); font-size: 13px; }

.back-button { height: 38px; padding: 0; border: 0; background: transparent; color: #58667d; cursor: pointer; font-size: 13px; font-weight: 650; }
.back-button:hover { color: #315bea; }
.case-status { padding: 6px 9px; border: 1px solid #efd399; border-radius: 4px; background: #fff7e7; color: #a66513; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.detail-content { padding: 23px 30px 40px; }
.case-heading { padding: 27px 2px 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.case-heading > div:first-child { max-width: 760px; }
.priority-kicker { width: fit-content; margin: 0 0 10px; padding: 5px 9px; display: block; border-radius: 5px; background: #fff0d7; color: #a85f0b; font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.priority-kicker.review { background: #eaf0f7; color: #516983; }
.case-heading h1 { font-size: 34px; line-height: 1.12; }
.case-heading p { max-width: 820px; margin: 11px 0 0; color: #5e6a7f; font-size: 15px; line-height: 1.6; }
.case-score { width: 116px; height: 116px; flex: 0 0 auto; display: grid; place-content: center; border: 8px solid #e9ad50; border-radius: 50%; background: #fffaf2; text-align: center; box-shadow: 0 8px 25px rgba(183,109,18,.12), inset 0 0 0 1px white; }
.case-score strong { color: #a95d0b; font: 760 36px/1 var(--font-geist-mono); }
.case-score span { margin-top: 5px; color: #8d683e; font-size: 9px; font-weight: 750; letter-spacing: .1em; }
.case-score small { margin-top: 2px; color: #a08b73; font-size: 9px; }
.live-case-signal { width: 136px; height: 116px; flex: 0 0 auto; padding: 18px 12px; display: grid; place-content: center; border: 1px solid #a9d7cb; border-top: 5px solid #31aa8d; border-radius: 10px; background: linear-gradient(145deg, #effbf7, white); text-align: center; box-shadow: 0 8px 25px rgba(35,123,102,.08); }
.live-case-signal strong { color: #177862; font: 760 29px/1 var(--font-geist-mono); }
.live-case-signal span { margin-top: 7px; color: #47786e; font-size: 9px; font-weight: 750; letter-spacing: .09em; }
.live-case-signal small { margin-top: 4px; color: #819d97; font-size: 8px; }
.narrative-status { border-color: #b7c7f5; background: #f1f4ff; color: #395dc8; }
.narrative-kicker { background: #e7f4f0; color: #217461; }
.narrative-share { width: 148px; min-height: 120px; flex: 0 0 auto; padding: 19px 13px; display: grid; place-content: center; border: 1px solid #b8c8f2; border-top: 5px solid #315bea; border-radius: 10px; background: linear-gradient(145deg, #f2f5ff, white); text-align: center; box-shadow: 0 8px 25px rgba(49,91,234,.09); }
.narrative-share strong { color: #244cc7; font: 760 32px/1 var(--font-geist-mono); }
.narrative-share span { margin-top: 8px; color: #536ba7; font-size: 9px; font-weight: 750; letter-spacing: .09em; }
.narrative-share small { margin-top: 5px; color: #8794ad; font-size: 9px; }
.narrative-reason-strip { border-left-color: #31a98c; background: linear-gradient(90deg, #f1faf7, #fff); }
.narrative-workspace-grid { grid-template-columns: minmax(0, 1.75fr) minmax(330px, .7fr); }
.narrative-evidence-panel { min-height: 560px !important; }
.narrative-post-list { margin-top: 17px; display: flex; flex-direction: column; gap: 8px; }
.narrative-post { padding: 14px; display: grid; grid-template-columns: 150px minmax(260px, 1fr) 110px 54px; align-items: start; gap: 13px; border: 1px solid #dfe5ed; border-radius: 7px; background: #fbfcfd; }
.narrative-post:hover { border-color: #b2c0e9; background: #f9faff; }
.narrative-post-account b, .narrative-post-account span, .narrative-post-account small { display: block; overflow: hidden; text-overflow: ellipsis; }
.narrative-post-account b { color: #30415e; font-size: 12px; white-space: nowrap; }
.narrative-post-account b i { margin-left: 4px; color: #315bea; font-style: normal; }
.narrative-post-account span { margin-top: 5px; color: #7e899b; font-size: 10px; }
.narrative-post-account small { margin-top: 4px; color: #8a704f; font-size: 9px; white-space: nowrap; }
.narrative-post-copy p { margin: 0; color: #43516a; font-size: 13px; line-height: 1.55; }
.narrative-post-copy > span { display: block; margin-top: 7px; color: #8190a4; font: 9px var(--font-geist-mono); }
.narrative-post-stats { display: flex; flex-direction: column; gap: 6px; }
.narrative-post-stats span { color: #7b8799; font-size: 9px; }
.narrative-post-stats b { color: #45566f; font: 680 10px var(--font-geist-mono); }
.narrative-composition { margin-top: 17px; }
.narrative-composition h3 { margin: 17px 0 8px; color: #788397; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.narrative-composition h3:first-child { margin-top: 0; }
.composition-row { margin-top: 8px; }
.composition-row > span { display: flex; align-items: center; justify-content: space-between; }
.composition-row b { color: #465770; font-size: 11px; }
.composition-row i { color: #8390a2; font: 9px var(--font-geist-mono); font-style: normal; }
.composition-row em { height: 6px; margin-top: 5px; display: block; overflow: hidden; border-radius: 4px; background: #e8edf4; }
.composition-row u { height: 100%; display: block; border-radius: 4px; background: #5c7ae0; text-decoration: none; }
.narrative-term-cloud { display: flex; flex-wrap: wrap; gap: 5px; }
.narrative-term-cloud span { padding: 6px 8px; border: 1px solid #d7e0ef; border-radius: 4px; background: #f5f8fd; color: #4f638d; font-size: 10px; }
.narrative-term-cloud small, .narrative-domain-list small { color: #8894a5; font-size: 10px; line-height: 1.4; }
.narrative-domain-list, .leading-account-list { display: flex; flex-direction: column; }
.narrative-domain-list span, .leading-account-list span { padding: 8px 1px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #edf0f4; }
.narrative-domain-list b, .leading-account-list b { overflow: hidden; color: #42536d; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.narrative-domain-list i, .leading-account-list i { flex: 0 0 auto; color: #8390a2; font: 9px var(--font-geist-mono); font-style: normal; }
.leading-account-list { margin-top: 13px; }
.case-impact-grid { margin-bottom: 15px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.case-impact-grid article { min-height: 124px; padding: 17px 18px; border: 1px solid #dbe2eb; border-top: 4px solid #7f96c8; border-radius: 8px; background: white; box-shadow: 0 3px 12px rgba(20,32,57,.04); }
.case-impact-grid article.impact-alert { border-top-color: #dc932f; background: linear-gradient(145deg, #fffaf1, white 75%); }
.case-impact-grid span, .case-impact-grid strong, .case-impact-grid p { display: block; }
.case-impact-grid span { color: #6b778b; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.case-impact-grid strong { margin-top: 10px; color: #1f2d45; font: 740 28px/1 var(--font-geist-mono); }
.case-impact-grid p { margin: 7px 0 0; color: #7d899a; font-size: 12px; }
.reason-strip { min-height: 92px; padding: 15px 17px; display: grid; grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(165px, 1fr)); align-items: center; gap: 11px; border: 1px solid #cdd8ea; border-left: 5px solid #5275e8; border-radius: 8px; background: linear-gradient(90deg, #f3f6fd, #fff); }
.reason-title span, .reason-title strong { display: block; }
.reason-title span { color: #25324a; font-size: 15px; font-weight: 720; }
.reason-title strong { margin-top: 5px; color: #778398; font-size: 10px; font-weight: 550; }
.reason-chip { min-height: 54px; padding: 10px 11px; display: flex; align-items: center; gap: 9px; border: 1px solid #dce3ed; border-radius: 6px; background: white; box-shadow: 0 2px 7px rgba(35,51,80,.04); }
.reason-chip b { color: #5974d5; font: 720 10px var(--font-geist-mono); }
.reason-chip span { color: #4d5b72; font-size: 12px; font-weight: 620; line-height: 1.35; }
.case-grid { margin-top: 13px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(315px, .85fr); gap: 12px; }
.case-grid .panel { min-height: 288px; }
.signal-bars { margin-top: 23px; display: flex; flex-direction: column; gap: 18px; }
.signal-bars > div { display: grid; grid-template-columns: 150px minmax(100px, 1fr) 35px; align-items: center; gap: 12px; }
.signal-bars span b, .signal-bars span i { display: block; }
.signal-bars span b { color: #3f4d64; font-size: 13px; }
.signal-bars span i { margin-top: 4px; color: #8b96a7; font-size: 10px; font-style: normal; }
.signal-bars em { height: 11px; overflow: hidden; border-radius: 6px; background: #edf1f6; }
.signal-bars u { height: 100%; display: block; border-radius: 4px; background: linear-gradient(90deg, #87a1f4, #4166df); text-decoration: none; }
.signal-bars > div > strong { color: #35445d; font: 700 13px var(--font-geist-mono); text-align: right; }
.score-equation { margin-top: 21px; padding-top: 14px; border-top: 1px solid #e7ebf1; color: #929cab; font: 11px var(--font-geist-mono); text-align: right; }
.score-equation span { color: #637087; }
.score-equation b { color: #315bea; font-size: 15px; }
.network-panel { overflow: hidden; }
.network { width: 100%; height: 190px; margin-top: 5px; }
.network-legend { position: absolute; left: 18px; right: 18px; bottom: 12px; display: flex; gap: 18px; color: #6f7c8f; font-size: 11px; }
.network-legend span { display: flex; align-items: center; gap: 6px; }
.network-legend i { width: 7px; height: 7px; display: block; border-radius: 50%; }
.account-dot { background: #dce5ff; border: 1px solid #5f7fe8; }
.artifact-dot { background: #1d3154; }
.lower-grid { grid-template-columns: minmax(0, 1.55fr) minmax(315px, .85fr); align-items: start; }
.lower-grid .timeline-panel { min-height: 505px; }
.count-pill { padding: 5px 8px; border-radius: 11px; background: #edf1f6; color: #68758a; font-size: 10px; }
.timeline-list { margin-top: 20px; }
.live-case-timeline { margin-top: 17px; display: flex; flex-direction: column; gap: 8px; }
.live-case-timeline a { padding: 12px 13px; display: grid; grid-template-columns: 120px minmax(0, 1fr) 52px; gap: 12px; align-items: start; border: 1px solid #dfe5ed; border-radius: 6px; background: #fbfcfd; text-decoration: none; }
.live-case-timeline a:hover { border-color: #9eafe8; background: #f8faff; }
.live-case-timeline time { color: #7f8c9f; font: 9px var(--font-geist-mono); }
.live-case-timeline b { color: #33435d; font-size: 12px; }
.live-case-timeline p { margin: 6px 0 0; color: #4c5a70; font-size: 12px; line-height: 1.5; }
.live-case-timeline div > span { display: block; margin-top: 7px; color: #8591a3; font: 9px var(--font-geist-mono); }
.live-case-timeline i { color: #4968cf; font-size: 10px; font-style: normal; text-align: right; }
.timeline-item { position: relative; min-height: 96px; display: grid; grid-template-columns: 58px 16px 1fr; gap: 9px; }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; left: 72px; top: 17px; bottom: -9px; border-left: 1px solid #d9e0ea; }
.timeline-item time { padding-top: 9px; color: #6f7c8f; font: 11px var(--font-geist-mono); }
.timeline-node { z-index: 1; width: 9px; height: 9px; margin-top: 9px; border: 2px solid white; border-radius: 50%; background: #5979e5; box-shadow: 0 0 0 1px #91a6ea; }
.post-card { min-height: 78px; margin-bottom: 10px; padding: 11px 12px; border: 1px solid #e1e6ed; border-radius: 6px; background: #fbfcfd; }
.post-card > div { display: flex; align-items: center; gap: 7px; }
.post-card b { color: #2f3f58; font-size: 13px; }
.post-card span { padding: 3px 5px; border-radius: 3px; background: #e8edfa; color: #536aa9; font: 10px var(--font-geist-mono); }
.post-card i { margin-left: auto; color: #4f8879; font-size: 10px; font-style: normal; }
.post-card p { margin: 9px 0 0; color: #536177; font-size: 13px; line-height: 1.55; }
.case-aside { display: flex; flex-direction: column; gap: 12px; }
.case-aside .panel { min-height: 0; }
.cohort-stats { margin-top: 17px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.cohort-stats div { min-height: 78px; padding: 13px; border: 1px solid #dce3ec; border-radius: 6px; background: #f8fafc; }
.cohort-stats strong, .cohort-stats span { display: block; }
.cohort-stats strong { color: #24334b; font: 720 23px var(--font-geist-mono); }
.cohort-stats span { margin-top: 6px; color: #778498; font-size: 11px; line-height: 1.35; }
.caution-note { margin: 13px 0 0; padding: 10px 11px; border-radius: 5px; background: #fff7e6; color: #7e6028; font-size: 11px; line-height: 1.5; }
.decision-card label { margin-top: 16px; display: block; color: #5e6c82; font-size: 11px; font-weight: 680; }
.decision-card select, .decision-card textarea { width: 100%; margin-top: 6px; border: 1px solid #cfd8e5; border-radius: 5px; background: #fff; color: #3d4c64; font-size: 13px; outline: none; }
.decision-card select { height: 34px; padding: 0 9px; }
.decision-card textarea { height: 92px; padding: 10px; resize: vertical; line-height: 1.5; }
.decision-card select:focus, .decision-card textarea:focus { border-color: #6d8aff; box-shadow: 0 0 0 3px rgba(49,91,234,.09); }
.save-button { width: 100%; margin-top: 10px; }

.dossier-screen { min-height: 100vh; padding: 24px 20px 60px; background: #e9edf3; }
.dossier-toolbar { width: min(920px, 100%); margin: 0 auto 14px; display: flex; align-items: center; justify-content: space-between; }
.dossier { width: min(920px, 100%); min-height: 1180px; margin: 0 auto; padding: 44px 54px 34px; background: white; box-shadow: 0 12px 40px rgba(30,43,67,.14); }
.dossier-head { padding-bottom: 20px; display: flex; justify-content: space-between; border-bottom: 2px solid #20365d; }
.dossier-brand { display: flex; align-items: center; gap: 10px; }
.dossier-brand strong, .dossier-brand span { display: block; }
.dossier-brand strong { color: #1b2f51; font-size: 12px; letter-spacing: .14em; }
.dossier-brand span { margin-top: 2px; color: #778397; font-size: 8px; }
.dossier-head > div:last-child { text-align: right; }
.dossier-head > div:last-child span, .dossier-head > div:last-child b { display: block; }
.dossier-head > div:last-child span { color: #315bea; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.dossier-head > div:last-child b { margin-top: 5px; color: #67758a; font: 8px var(--font-geist-mono); }
.dossier-title { padding: 35px 0 24px; }
.dossier-title p { color: #315bea; font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.dossier-title h1 { max-width: 680px; margin-top: 7px; font-size: 27px; }
.dossier-title h2 { max-width: 700px; margin: 10px 0 0; color: #5f6c81; font-size: 13px; font-weight: 480; line-height: 1.5; }
.dossier-summary { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #dce3ed; }
.dossier-summary div { padding: 13px 15px; border-right: 1px solid #dce3ed; }
.dossier-summary div:last-child { border-right: 0; }
.dossier-summary span, .dossier-summary strong { display: block; }
.dossier-summary span { color: #8b96a5; font-size: 7px; text-transform: uppercase; letter-spacing: .08em; }
.dossier-summary strong { margin-top: 5px; color: #273852; font: 650 13px var(--font-geist-mono); }
.dossier-section { margin-top: 26px; }
.dossier-section h3 { margin: 0 0 9px; padding-bottom: 7px; border-bottom: 1px solid #dce3ed; color: #263854; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.dossier-section p { margin: 0; color: #58667c; font-size: 10px; line-height: 1.7; }
.dossier-section table { width: 100%; border-collapse: collapse; }
.dossier-section th, .dossier-section td { padding: 8px 9px; border-bottom: 1px solid #e6eaf0; text-align: left; font-size: 9px; }
.dossier-section th { background: #f5f7fa; color: #6f7c90; font-size: 7px; text-transform: uppercase; }
.dossier-section td { color: #526077; }
.dossier-section th:last-child, .dossier-section td:last-child { text-align: right; }
.dossier-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.dossier-section dl { display: grid; grid-template-columns: 95px 1fr; margin: 0; }
.dossier-section dt, .dossier-section dd { margin: 0; padding: 6px 0; border-bottom: 1px solid #edf0f4; font-size: 8px; }
.dossier-section dt { color: #8994a4; }
.dossier-section dd { color: #4e5b70; }
.evidence-ids { display: flex; flex-wrap: wrap; gap: 6px; }
.evidence-ids code { padding: 5px 7px; border: 1px solid #dfe5ed; border-radius: 3px; background: #f7f9fb; color: #59677d; font-size: 7px; }
.live-evidence-list { display: flex; flex-direction: column; gap: 5px; }
.live-evidence-list a { padding: 7px 8px; display: grid; grid-template-columns: 180px 1fr; gap: 12px; border: 1px solid #e1e6ed; border-radius: 4px; color: #53627a; font-size: 8px; text-decoration: none; }
.live-evidence-list code { color: #2f58cb; font-size: 8px; }
.limitations { padding: 13px 14px; border: 1px solid #e8ddbd; background: #fffbef; }
.limitations h3 { border-color: #eadfbe; color: #7a612d; }
.limitations p { color: #716445; font-size: 8px; }
.dossier-foot { margin-top: 30px; padding-top: 12px; display: flex; justify-content: space-between; border-top: 1px solid #dce3ed; color: #99a2af; font: 7px var(--font-geist-mono); }

.quality-controls { margin-top: 18px; padding: 18px; border: 1px solid #d3dceb; border-radius: 8px; background: #f8faff; }
.quality-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.quality-head span { color: #4967cc; font: 750 10px var(--font-geist-mono); letter-spacing: .11em; }
.quality-head h3 { margin: 5px 0 0; color: #263854; font-size: 16px; }
.quality-head p { max-width: 470px; margin: 0; color: #718096; font-size: 11px; line-height: 1.5; }
.quality-grid { margin-top: 15px; display: grid; grid-template-columns: 1.1fr 1fr 1.1fr; gap: 12px; }
.quality-grid fieldset, .quality-selects, .engagement-controls, .exclusion-control { min-width: 0; margin: 0; padding: 13px; border: 1px solid #dce3ed; border-radius: 7px; background: white; }
.quality-grid legend, .quality-label, .exclusion-control > span, .quality-selects label > span { color: #54647b; font-size: 11px; font-weight: 720; }
.post-type-controls { display: flex; flex-direction: column; gap: 8px; }
.post-type-controls legend { padding: 0 5px; }
.post-type-controls label { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.post-type-controls input { width: 15px; height: 15px; margin: 2px 0 0; accent-color: #315bea; }
.post-type-controls b, .post-type-controls small { display: block; }
.post-type-controls b { color: #3b4a62; font-size: 11px; }
.post-type-controls small { margin-top: 2px; color: #8792a2; font-size: 9px; line-height: 1.35; }
.quality-selects { display: grid; grid-template-columns: 1fr; gap: 8px; }
.quality-selects label { display: grid; grid-template-columns: 105px minmax(0, 1fr); align-items: center; gap: 8px; }
.quality-selects select, .engagement-controls input, .exclusion-control input { width: 100%; border: 1px solid #cfd9e7; border-radius: 5px; background: #fff; color: #3f4f68; font-size: 11px; outline: none; }
.quality-selects select { height: 34px; padding: 0 8px; }
.quality-selects select:focus, .engagement-controls input:focus, .exclusion-control input:focus { border-color: #6581e5; box-shadow: 0 0 0 3px rgba(49,91,234,.08); }
.engagement-controls > div { margin-top: 9px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.engagement-controls label span { display: block; margin-bottom: 4px; color: #7b8798; font-size: 9px; }
.engagement-controls input { height: 34px; padding: 0 8px; font: 11px var(--font-geist-mono); }
.engagement-controls > small, .exclusion-control small { display: block; margin-top: 7px; color: #8a95a5; font-size: 9px; line-height: 1.35; }
.exclusion-control { grid-column: 1 / -1; display: grid; grid-template-columns: 125px minmax(0, 1fr); align-items: center; gap: 9px 12px; }
.exclusion-control input { height: 36px; padding: 0 10px; }
.exclusion-control small { grid-column: 2; margin-top: -4px; }
.receipt-controls { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.receipt-controls span { padding: 5px 8px; border: 1px solid #cfe1dc; border-radius: 12px; background: rgba(255,255,255,.72); color: #557069; font-size: 9px; font-weight: 650; }
.case-register { margin-top: 13px; padding: 18px 18px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: white; }
.workspace-status { padding: 7px 10px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #cfe1dc; border-radius: 14px; background: #f2faf7; color: #3e7568; font-size: 10px; font-weight: 700; white-space: nowrap; }
.workspace-status i { width: 7px; height: 7px; border-radius: 50%; background: #32ad8d; box-shadow: 0 0 0 3px rgba(50,173,141,.12); }
.workspace-status.loading { color: #617087; border-color: #dbe2ec; background: #f7f9fc; }
.workspace-status.loading i { background: #8090a6; box-shadow: none; }
.workspace-status.unavailable { color: #8b652b; border-color: #ead8b3; background: #fff9ec; }
.workspace-status.unavailable i { background: #cf8b2f; box-shadow: none; }
.case-register-table { margin: 0 -18px; border-top: 1px solid #e4e9f0; }
.case-register-head, .case-register-row { display: grid; grid-template-columns: minmax(260px, 1.6fr) minmax(180px, 1fr) 120px 135px 150px; align-items: center; gap: 14px; }
.case-register-head { min-height: 38px; padding: 0 18px; background: #f7f9fc; color: #7d899a; font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.case-register-row { width: 100%; min-height: 78px; padding: 12px 18px; border: 0; border-top: 1px solid #e9edf2; background: #fff; color: #4d5c73; cursor: pointer; text-align: left; }
.case-register-row:hover { background: #fafbfe; }
.case-register-row span { min-width: 0; }
.case-register-row b, .case-register-row small { display: block; }
.case-register-row b { overflow: hidden; color: #31415a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.case-register-row small { margin-top: 5px; overflow: hidden; color: #8792a3; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.case-register-row strong { display: block; color: #2f4f9e; font: 740 17px var(--font-geist-mono); }
.case-decision { width: max-content; max-width: 125px; padding: 6px 8px; overflow: hidden; border-radius: 4px; background: #e7f5ef; color: #27705d; font-size: 10px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.case-decision.unreviewed { background: #edf1f6; color: #66758a; }
.case-register-empty { margin: 0 -18px; padding: 28px 18px 32px; border-top: 1px solid #e6eaf0; text-align: center; }
.case-register-empty strong { color: #495970; font-size: 13px; }
.case-register-empty p { margin: 6px 0 0; color: #8792a2; font-size: 11px; }

.nav-count.alert { background: #8f5520; color: #fff2db; }
.section-workspace { padding: 28px 30px 40px; }
.workspace-hero { min-height: 156px; padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 26px; border: 1px solid #cfd9ec; border-radius: 12px; background: radial-gradient(circle at 88% 10%, rgba(94,129,235,.17), transparent 32%), linear-gradient(135deg, #f8faff, #fff); box-shadow: 0 5px 18px rgba(37,54,91,.05); }
.workspace-hero > div { max-width: 760px; }
.workspace-hero > div > span { color: #506bc5; font: 760 11px var(--font-geist-mono); letter-spacing: .12em; }
.workspace-hero h1 { margin-top: 8px; font-size: 32px; }
.workspace-hero p { margin: 9px 0 0; color: #68778e; font-size: 14px; line-height: 1.55; }
.narrative-hero { border-color: #badcd6; background: radial-gradient(circle at 88% 10%, rgba(50,192,175,.15), transparent 32%), linear-gradient(135deg, #f7fcfb, #fff); }
.narrative-hero > div > span { color: #267f70; }
.tracking-alert-count { min-width: 130px; padding: 10px 14px; border: 1px solid #e2c38e; border-radius: 18px; background: #fff7e8; color: #926019; font-size: 12px; font-weight: 750; text-align: center; }
.operations-metrics { margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.operations-metrics article { min-height: 120px; padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.operations-metrics span { display: block; color: #6f7c91; font-size: 12px; font-weight: 650; }
.operations-metrics strong { display: block; margin-top: 10px; color: #1f304c; font: 760 28px var(--font-geist-mono); letter-spacing: -.04em; }
.operations-metrics p { margin: 7px 0 0; color: #8b96a6; font-size: 11px; }

.watchlist-editor { overflow: hidden; border: 1px solid #cfd9e8; border-radius: 11px; background: #fff; box-shadow: 0 6px 22px rgba(27,45,79,.06); }
.watchlist-editor-head { padding: 24px 25px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-bottom: 1px solid #e2e7ee; background: #f8faff; }
.watchlist-editor-head > div > span { color: #506bc5; font: 750 10px var(--font-geist-mono); letter-spacing: .11em; }
.watchlist-editor-head h2 { margin: 6px 0 0; color: #1e2f4b; font-size: 22px; }
.watchlist-editor-head p { margin: 7px 0 0; color: #6d7a8f; font-size: 13px; line-height: 1.5; }
.watchlist-form-grid { padding: 22px 25px 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.watchlist-form-grid label { display: flex; flex-direction: column; gap: 6px; }
.watchlist-form-grid label.wide { grid-column: 1 / -1; }
.watchlist-form-grid label > span, .watchlist-area-picker > span, .watchlist-quality-row label > span { color: #536178; font-size: 12px; font-weight: 700; }
.watchlist-form-grid input, .watchlist-form-grid select, .watchlist-quality-row input[type="number"] { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #cdd7e4; border-radius: 6px; background: #fff; color: #34435d; font-size: 13px; outline: none; }
.watchlist-form-grid input:focus, .watchlist-form-grid select:focus, .watchlist-quality-row input[type="number"]:focus { border-color: #5d7be5; box-shadow: 0 0 0 3px rgba(49,91,234,.09); }
.watchlist-form-grid small { color: #8893a4; font-size: 11px; line-height: 1.4; }
.watchlist-area-picker { margin: 8px 25px 0; padding: 16px; border: 1px solid #dce3ec; border-radius: 8px; background: #fafbfd; }
.watchlist-area-picker > div { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.watchlist-area-picker label { padding: 8px 10px; display: flex; align-items: center; gap: 7px; border: 1px solid #d5deea; border-radius: 6px; background: #fff; color: #657287; cursor: pointer; font-size: 11px; }
.watchlist-area-picker label.selected { border-color: #6f88df; background: #f1f5ff; color: #3854a8; }
.watchlist-area-picker input, .watchlist-quality-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: #315bea; }
.watchlist-quality-row { margin: 15px 25px 0; padding: 16px; display: grid; grid-template-columns: repeat(3, auto) minmax(120px, 1fr) auto; align-items: center; gap: 16px; border: 1px solid #dce3ec; border-radius: 8px; }
.watchlist-quality-row label { display: flex; align-items: center; gap: 7px; color: #536178; font-size: 12px; }
.watchlist-quality-row label:nth-child(4) { justify-self: end; }
.watchlist-quality-row label:nth-child(4) input { width: 78px; }
.watchlist-active { padding-left: 16px; border-left: 1px solid #e0e5ec; }
.watchlist-editor-foot { margin-top: 20px; padding: 19px 25px; display: flex; align-items: center; justify-content: space-between; gap: 28px; border-top: 1px solid #e2e7ee; background: #fbfcfe; }
.watchlist-editor-foot p { max-width: 780px; margin: 0; color: #778397; font-size: 12px; line-height: 1.5; }
.watchlist-editor-foot .primary-button { flex: 0 0 auto; }

.watchlist-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.watchlist-card { min-width: 0; padding: 21px; border: 1px solid #d6deea; border-top: 4px solid #315bea; border-radius: 10px; background: #fff; box-shadow: 0 3px 12px rgba(34,50,84,.04); }
.watchlist-card.paused { border-top-color: #99a5b5; background: #fbfcfd; }
.watchlist-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.monitor-state { display: inline-flex; align-items: center; gap: 7px; color: #24765f; font-size: 11px; font-weight: 750; }
.monitor-state i { width: 7px; height: 7px; border-radius: 50%; background: #2db38b; box-shadow: 0 0 0 3px rgba(45,179,139,.12); }
.monitor-state.paused { color: #778397; }
.monitor-state.paused i { background: #96a1af; box-shadow: none; }
.watchlist-card h2 { margin: 9px 0 0; color: #1d2d48; font-size: 19px; }
.watchlist-card header p { min-height: 38px; margin: 7px 0 0; color: #748095; font-size: 12px; line-height: 1.5; }
.icon-edit { width: 36px; height: 32px; border: 1px solid #d8dfe8; border-radius: 6px; background: #fff; color: #65738a; cursor: pointer; }
.icon-edit:hover { border-color: #9daee0; background: #f7f9fe; }
.watchlist-scope { margin-top: 17px; padding: 13px; border: 1px solid #e0e5ed; border-radius: 7px; background: #f8faff; }
.watchlist-scope span, .watchlist-scope b { display: block; }
.watchlist-scope span { color: #77849a; font-size: 10px; font-weight: 720; text-transform: uppercase; letter-spacing: .06em; }
.watchlist-scope b { margin-top: 6px; overflow: hidden; color: #3c4e70; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.watchlist-stats { margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #e0e5ed; border-radius: 7px; overflow: hidden; }
.watchlist-stats > div { min-width: 0; padding: 12px; border-right: 1px solid #e0e5ed; }
.watchlist-stats > div:last-child { border-right: 0; }
.watchlist-stats strong, .watchlist-stats span { display: block; }
.watchlist-stats strong { overflow: hidden; color: #243653; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.watchlist-stats span { margin-top: 4px; color: #8994a5; font-size: 10px; }
.checkpoint-row { margin-top: 14px; padding: 0 2px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkpoint-row > div:last-child { text-align: right; }
.checkpoint-row span, .checkpoint-row strong { display: block; }
.checkpoint-row span { color: #8994a4; font-size: 10px; }
.checkpoint-row strong { margin-top: 4px; color: #4a5a72; font-size: 11px; }
.watchlist-card footer { margin-top: 18px; display: flex; justify-content: flex-end; gap: 8px; }
.watchlist-empty { min-height: 330px; margin-top: 14px; padding: 35px; display: grid; place-content: center; border: 1px dashed #cbd5e2; border-radius: 10px; background: #fafbfd; text-align: center; }
.watchlist-empty > span { color: #5673d5; font-size: 30px; }
.watchlist-empty h2 { margin: 10px 0 0; color: #2d3e58; font-size: 20px; }
.watchlist-empty p { max-width: 560px; margin: 8px auto 17px; color: #788599; font-size: 13px; line-height: 1.55; }
.watchlist-empty .primary-button { justify-self: center; }

.tracker-table { margin-top: 14px; overflow: hidden; border: 1px solid #d7e0e9; border-radius: 10px; background: #fff; }
.tracker-head, .tracker-row { display: grid; grid-template-columns: minmax(280px, 1.7fr) minmax(145px, .7fr) 120px 150px 145px; align-items: center; gap: 18px; }
.tracker-head { min-height: 42px; padding: 0 20px; background: #f5f8fa; color: #778598; font-size: 10px; font-weight: 760; letter-spacing: .07em; text-transform: uppercase; }
.tracker-row { min-height: 116px; padding: 18px 20px; border-top: 1px solid #e5eaf0; }
.tracker-row > div { min-width: 0; }
.tracker-row > div:first-child > span { color: #278070; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.tracker-row h2 { margin: 6px 0 0; overflow: hidden; color: #283a56; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.tracker-row p { margin: 6px 0 0; overflow: hidden; color: #8390a2; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.tracker-volume strong, .tracker-volume span, .tracker-history strong, .tracker-history span, .tracker-history small { display: block; }
.tracker-volume strong { color: #243755; font: 760 24px var(--font-geist-mono); }
.tracker-volume span { margin-top: 2px; color: #8994a4; font-size: 10px; }
.tracker-volume em { height: 5px; margin-top: 9px; display: block; overflow: hidden; border-radius: 3px; background: #e5ebef; }
.tracker-volume i { height: 100%; display: block; border-radius: inherit; background: #44a997; }
.tracker-change strong { color: #5f6d82; font: 750 17px var(--font-geist-mono); }
.tracker-change.up strong { color: #ba6d18; }
.tracker-change.down strong { color: #2e8874; }
.tracker-change span { display: block; margin-top: 4px; color: #8b95a5; font-size: 10px; }
.tracker-history strong { color: #475871; font-size: 12px; }
.tracker-history span, .tracker-history small { margin-top: 5px; color: #8793a4; font-size: 10px; }
.tracker-alert { width: max-content; max-width: 140px; padding: 7px 9px; display: block; border-radius: 5px; background: #edf1f5; color: #66758a; font-size: 10px; font-weight: 750; }
.tracker-alert.high { background: #fff0de; color: #a85e0b; }
.tracker-alert.watch { background: #fff7df; color: #8b6814; }
.tracker-alert.new { background: #e9f6f1; color: #24725f; }
.tracker-seen { display: block; margin-top: 8px; color: #8b96a6; font-size: 9px; }

@media print {
  @page { size: A4; margin: 10mm; }
  body { background: white; }
  .dossier-screen { padding: 0; background: white; }
  .dossier-toolbar { display: none; }
  .dossier { width: 100%; min-height: auto; padding: 20px; box-shadow: none; }
}

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { padding: 24px 10px; }
  .brand { justify-content: center; padding: 0; }
  .brand > div, .primary-nav p, .nav-item:not(.active) { font-size: 0; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item.active { font-size: 0; }
  .tiny-icon { width: auto; font-size: 16px; }
  .nav-count { display: none; }
  .system-row, .identity div { display: none; }
  .identity { justify-content: center; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .insight-grid { grid-template-columns: 1fr; }
  .case-grid, .lower-grid { grid-template-columns: 1fr; }
  .narrative-workspace-grid { grid-template-columns: 1fr; }
  .case-impact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .narrative-post { grid-template-columns: 135px minmax(260px, 1fr) 95px 48px; }
  .live-post-head, .live-post-row { grid-template-columns: minmax(135px, .7fr) minmax(280px, 2fr) 55px; }
  .live-post-head span:nth-child(3), .live-post-head span:nth-child(4), .relevance-score, .live-engagement { display: none; }
  .planner-grid, .focus-row { grid-template-columns: 1fr; }
  .quality-grid { grid-template-columns: 1fr 1fr; }
  .engagement-controls { grid-column: 1 / -1; }
  .receipt-stats { grid-template-columns: repeat(2, 1fr); }
  .case-register { overflow-x: auto; }
  .case-register .section-head, .case-register-table { min-width: 820px; }
  .operations-metrics { grid-template-columns: repeat(2, 1fr); }
  .watchlist-grid { grid-template-columns: 1fr; }
  .watchlist-quality-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watchlist-quality-row label:nth-child(4) { justify-self: stretch; }
  .watchlist-active { padding-left: 0; border-left: 0; }
  .tracker-table { overflow-x: auto; }
  .tracker-head, .tracker-row { min-width: 900px; }
}

@media (max-width: 720px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: 60px; padding: 0 15px; flex-direction: row; align-items: center; }
  .brand { justify-content: flex-start; }
  .brand > div { display: block; }
  .primary-nav { margin: 0 0 0 auto; flex-direction: row; }
  .primary-nav p, .primary-nav .nav-item:not(.active), .sidebar-foot { display: none; }
  .nav-item.active { width: 42px; }
  .topbar { height: 58px; padding: 0 16px; }
  .crumbs { display: none; }
  .top-actions { width: 100%; justify-content: flex-end; }
  .icon-button, .secondary-button { display: none; }
  .source-switch { margin-right: auto; }
  .content { padding: 15px 12px; }
  .section-workspace { padding: 15px 12px 30px; }
  .section-workspace .secondary-button { display: inline-block; }
  .workspace-hero { min-height: 0; padding: 20px; align-items: flex-start; flex-direction: column; }
  .workspace-hero h1 { font-size: 26px; }
  .workspace-hero > .primary-button { width: 100%; }
  .tracking-alert-count { min-width: 0; }
  .operations-metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .operations-metrics article { min-height: 102px; padding: 14px; }
  .operations-metrics strong { font-size: 22px; }
  .watchlist-editor-head { padding: 19px; }
  .watchlist-form-grid { padding: 18px 19px 6px; grid-template-columns: 1fr; }
  .watchlist-form-grid label.wide { grid-column: auto; }
  .watchlist-area-picker, .watchlist-quality-row { margin-left: 19px; margin-right: 19px; }
  .watchlist-quality-row { grid-template-columns: 1fr; align-items: flex-start; }
  .watchlist-editor-foot { padding: 18px 19px; align-items: stretch; flex-direction: column; }
  .watchlist-editor-foot .primary-button { width: 100%; }
  .watchlist-card { padding: 17px; }
  .watchlist-stats { grid-template-columns: 1fr 1fr; }
  .watchlist-stats > div:nth-child(2) { border-right: 0; }
  .watchlist-stats > div:last-child { grid-column: 1 / -1; border-top: 1px solid #e0e5ed; }
  .checkpoint-row { grid-template-columns: 1fr; }
  .checkpoint-row > div:last-child { text-align: left; }
  .demo-banner { align-items: flex-start; flex-direction: column; gap: 5px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .filters { width: 100%; }
  .filters label { flex: 1; }
  .filters select { width: 100%; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-card { min-height: 102px; padding: 14px; }
  .metric-value { font-size: 22px; }
  .panel { min-height: 250px; }
  .language-panel { min-height: 235px; }
  .cluster-section { overflow: hidden; }
  .table-head { display: none; }
  .cluster-row { min-height: 82px; grid-template-columns: 1fr 75px 16px; }
  .scale-cell, .signal-cell, .time-cell { display: none; }
  .data-foot { justify-content: space-between; gap: 6px; }
  .data-foot span:nth-child(2) { display: none; }
  .detail-content { padding: 15px 12px 30px; }
  .case-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
  .case-score { width: 100px; height: 100px; border-width: 7px; }
  .case-score strong { font-size: 31px; }
  .reason-strip { grid-template-columns: 1fr; }
  .reason-chip { min-height: 34px; }
  .signal-bars > div { grid-template-columns: 120px 1fr 30px; }
  .dossier-screen { padding: 12px 8px 30px; }
  .dossier { padding: 28px 24px; }
  .dossier-summary { grid-template-columns: 1fr 1fr; }
  .dossier-summary div:nth-child(2) { border-right: 0; }
  .dossier-summary div:nth-child(-n+2) { border-bottom: 1px solid #dce3ed; }
  .dossier-columns { grid-template-columns: 1fr; gap: 0; }
  .live-pattern-grid { grid-template-columns: 1fr; }
  .narrative-grid { grid-template-columns: 1fr; }
  .narrative-map-section { padding: 16px; }
  .narrative-map-section .section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .narrative-count { white-space: normal; }
  .narrative-card-metrics { grid-template-columns: 1fr 1fr; }
  .narrative-card-metrics span:nth-child(2) { border-right: 0; }
  .narrative-card-metrics span:nth-child(-n+2) { border-bottom: 1px solid #e0e5ef; }
  .narrative-post { grid-template-columns: 1fr 48px; }
  .narrative-post-account, .narrative-post-copy { grid-column: 1 / -1; }
  .narrative-post-stats { grid-column: 1; flex-direction: row; flex-wrap: wrap; }
  .narrative-post > .source-link { grid-column: 2; grid-row: 3; text-align: right; }
  .collection-planner { padding: 16px; }
  .planner-head { flex-direction: column; }
  .planner-actions { width: 100%; }
  .planner-run { width: 100%; }
  .search-mode-grid, .query-receipt { grid-template-columns: 1fr; }
  .query-receipt code { white-space: normal; }
  .profile-grid { grid-template-columns: 1fr 1fr; }
  .quality-head { flex-direction: column; gap: 8px; }
  .quality-grid { grid-template-columns: 1fr; }
  .engagement-controls { grid-column: auto; }
  .exclusion-control { grid-column: auto; grid-template-columns: 1fr; }
  .exclusion-control small { grid-column: auto; margin-top: 0; }
  .area-grid { grid-template-columns: 1fr; }
  .coverage-grid { grid-template-columns: 1fr 1fr; }
  .post-toolbar { grid-template-columns: 1fr; }
  .history-table { overflow-x: auto; }
  .history-head, .history-row { min-width: 700px; }
  .case-register .section-head { min-width: 0; align-items: flex-start; flex-direction: column; gap: 9px; }
  .case-register-table { min-width: 760px; }
  .live-post-head { display: none; }
  .live-post-row { grid-template-columns: 1fr 45px; gap: 8px; }
  .live-account { grid-column: 1 / 2; }
  .live-post-copy { grid-column: 1 / -1; }
  .source-link { grid-column: 2; grid-row: 1; text-align: right; }
  .live-start-state { grid-template-columns: 45px 1fr; }
  .live-start-state .primary-button { grid-column: 1 / -1; width: 100%; }
  .live-case-timeline a { grid-template-columns: 1fr 45px; }
  .live-case-timeline time { grid-column: 1 / -1; }
  .live-case-timeline i { grid-column: 2; grid-row: 2; }
  .live-evidence-list a { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 430px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 90px; }
  .case-impact-grid { grid-template-columns: 1fr; }
  .donut-wrap { grid-template-columns: 104px 1fr; }
  .top-actions .primary-button { width: 100%; }
  .top-actions { flex-wrap: wrap; }
  .source-switch { width: 100%; }
  .source-switch button { flex: 1; }
  .profile-grid, .receipt-stats, .coverage-grid { grid-template-columns: 1fr; }
}
