:root {
  --teal: #159b70;
  --teal-dark: #126c55;
  --teal-soft: rgba(21, 155, 112, .12);
  --amber: #c97a1f;
  --amber-soft: rgba(201, 122, 31, .13);
  --ink: #20242c;
  --muted: #747c8a;
  --bg: #f7f8fa;
  --line: #e7e9ed;
  --glass: rgba(255, 255, 255, .68);
  --glass-strong: rgba(255, 255, 255, .86);
  --shadow: 0 18px 45px -34px rgba(32, 54, 67, .46), inset 0 1px rgba(255,255,255,.78);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); font-family: "IBM Plex Sans", sans-serif; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid rgba(30,143,133,.35); outline-offset: 3px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: "IBM Plex Mono", monospace; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--teal-dark); font: 500 10px/1.4 "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px var(--teal-soft); }
.brand { width: auto; height: 40px; display: inline-flex; align-items: center; flex: none; color: var(--ink); text-decoration: none; }
.brand-word { font: 600 25px/1 "Unbounded",sans-serif;letter-spacing:-.08em; }
.brand-word>span { color:var(--teal); }
.btn { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink); font-weight: 500; text-decoration: none; transition: transform .18s, background .18s, border-color .18s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, #173c34, #102b27); color: white; box-shadow: 0 10px 28px -18px rgba(16,43,39,.8); }
.btn-secondary { border-color: rgba(255,255,255,.9); background: rgba(255,255,255,.60); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.btn-teal { background: var(--teal); color: white; }
.btn-quiet { min-height: 34px; padding: 6px 10px; border-color: var(--line); color: var(--muted); font-size: 12px; }
.btn-danger { color: #9c4b37; border-color: rgba(156,75,55,.2); }
.icon { width: 18px; height: 18px; display: inline-block; flex: none; }
.glass { border: 1px solid rgba(255,255,255,.83); background: linear-gradient(135deg, rgba(255,255,255,.79), rgba(255,255,255,.48)); box-shadow: var(--shadow); backdrop-filter: blur(24px) saturate(125%); }

/* Landing */
.landing-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 18px 0 56px; }
.landing-minimal { min-height:100vh;display:flex;flex-direction:column;padding-bottom:18px; }
.landing-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.landing-nav .brand { height: 42px; }
.nav-actions { display: flex; gap: 8px; }
.hero { padding: 76px 0 42px; text-align: center; }
.hero .eyebrow { justify-content: center; }
.hero h1 { max-width: 850px; margin: 18px auto; font: 500 clamp(38px, 5.7vw, 70px)/1.08 "Unbounded", sans-serif; letter-spacing: -.055em; }
.hero h1 span { color: var(--teal); }
.hero > p { max-width: 670px; margin: 0 auto 28px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.hero-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.landing-minimal .hero { flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:80px 0 120px; }
.landing-minimal .hero h1 { max-width:780px; }
.landing-minimal .hero>p { margin-bottom:24px; }
.landing-minimal .hero-actions .btn { min-width:145px; }
.signal-preview { max-width: 880px; margin: 0 auto 74px; padding: 27px 30px 22px; border-radius: 26px; }
.preview-head, .preview-bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.preview-head .section-label { margin: 0; }
.preview-badge { padding: 6px 9px; border: 1px solid rgba(21,155,112,.18); border-radius: 8px; background: rgba(255,255,255,.48); color: var(--teal-dark); font: 500 9px "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.preview-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 42px; align-items: center; margin: 25px 0; }
.preview-score-block > span { color: var(--muted); font-size: 13px; }
.preview-score-block > strong { display: block; margin-top: 7px; color: var(--teal-dark); font: 500 45px "IBM Plex Mono", monospace; letter-spacing: -.06em; }
.preview-score-block > strong small { margin-left: 9px; color: var(--muted); font: 400 12px "IBM Plex Sans", sans-serif; letter-spacing: 0; }
.preview-bars { height: 45px; display: flex; align-items: end; gap: 6px; margin-top: 12px; }
.preview-bars i { flex: 1; height: 48%; border-radius: 4px 4px 1px 1px; background: rgba(21,155,112,.30); }
.preview-bars i:nth-child(2n) { height: 67%; }.preview-bars i:nth-child(3n) { height: 84%; background: rgba(21,155,112,.56); }.preview-bars i:last-child { height: 100%; background: var(--teal); }
.preview-insight { padding-left: 32px; border-left: 1px solid var(--line); }
.preview-insight h2 { margin: 15px 0 8px; font: 500 25px/1.32 "Unbounded", sans-serif; letter-spacing: -.04em; }
.preview-insight p { margin: 0; color: var(--muted); font-size: 12px; }
.preview-bottom { padding-top: 17px; border-top: 1px solid var(--line); }
.source-row { display: flex; gap: 7px; flex-wrap: wrap; }.source-row span { padding: 5px 8px; border-radius: 7px; background: rgba(255,255,255,.54); color: var(--muted); font: 10px "IBM Plex Mono", monospace; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 70px 0; }
.feature { padding: 24px; border-radius: var(--radius); }
.feature-number { margin-bottom: 20px; color: var(--teal-dark); font: 500 10px "IBM Plex Mono", monospace; letter-spacing: .08em; }
.feature .feature-icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 11px; background: var(--teal-soft); color: var(--teal-dark); }
.feature:nth-child(2) .feature-icon { color: var(--amber); background: var(--amber-soft); }
.feature h3 { margin: 0 0 9px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.language-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center; padding: 40px; border-radius: 24px; }
.language-demo h2 { margin: 0 0 12px; font: 500 clamp(26px, 3vw, 40px)/1.25 "Unbounded", sans-serif; letter-spacing: -.04em; }
.analysis-output { padding: 24px; border-radius: 16px; background: rgba(255,255,255,.58); }
.quote { margin: 0 0 22px; font-size: 18px; line-height: 1.55; }
.analysis-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13px; }
.landing-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 55px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

/* Opening screen */
.opening-screen { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; position: relative; background: #f7faf7; }
.opening-screen::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(#d7e2da 1px, transparent 1px); background-size: 28px 28px; mask-image: radial-gradient(ellipse at center, #000 8%, transparent 68%); }
.opening-header, .opening-footer { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 48px; }
.opening-header { min-height: 100px; border-bottom: 1px solid #e3eae3; }
.opening-edition { color: #6f8177; font: 400 9px/1.5 "IBM Plex Mono", monospace; letter-spacing: .16em; }
.opening-content { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 20px 64px; text-align: center; }
.opening-art { position: relative; width: 340px; height: 280px; margin-bottom: 18px; }
.opening-halo { position: absolute; inset: -25px -35px; border-radius: 50%; background: radial-gradient(ellipse, #d4efdd 0%, #e8f3e8 40%, transparent 70%); }
.opening-ring { position: absolute; top: 50%; left: 50%; border: 1px solid #ccdfd0; border-radius: 50%; transform: translate(-50%, -50%); }
.opening-ring-outer { width: 260px; height: 260px; border-style: dashed; animation: opening-orbit 50s linear infinite; }
.opening-ring-inner { width: 184px; height: 184px; border-color: #d3e3d6; }
.opening-ring-inner::after { content: ""; position: absolute; width: 6px; height: 6px; top: 24px; right: 24px; border-radius: 50%; background: #87b794; box-shadow: 0 0 0 5px #e3eee2; }
.opening-mark { position: absolute; top: 50%; left: 50%; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; padding: 0 5px 8px 0; border: 1px solid #356b55; border-radius: 28px; background: linear-gradient(145deg, #234c3d, #123427); color: #f3f9ed; font: 500 58px/1 "Unbounded", sans-serif; letter-spacing: -.12em; box-shadow: 0 18px 38px -15px #16442a57, inset 0 1px #ffffff20; transform: translate(-50%, -50%) rotate(-8deg); animation: opening-mark-float 6s ease-in-out infinite; }
.opening-mark>span { color: #b7e695; }
.opening-chip { position: absolute; display: flex; align-items: center; gap: 9px; padding: 12px 15px; border: 1px solid #e1e9e0; border-radius: 13px; background: #fffffff2; box-shadow: 0 9px 25px -15px #355f3540; color: #47634e; font-size: 12px; animation: opening-float 5s ease-in-out infinite; }
.opening-chip .icon { width: 16px; height: 16px; }
.opening-chip>i { width: 5px; height: 5px; margin-left: 6px; border-radius: 50%; background: #a4ca99; }
.opening-chip-reviews { top: 40px; left: 8px; transform: rotate(-6deg); }
.opening-chip-mentions { top: 100px; right: -2px; transform: rotate(5deg); animation-delay: -1.7s; }
.opening-chip-insights { bottom: 25px; left: 31px; transform: rotate(-3deg); animation-delay: -3.2s; }
.opening-spark { position: absolute; color: #84aa80; font: 300 22px/1 "IBM Plex Mono", monospace; }
.opening-spark-one { right: 55px; top: 20px; }.opening-spark-two { right: 43px; bottom: 29px; font-size: 14px; }
.opening-kicker { margin: 0 0 17px; color: #748674; font: 400 9px/1.5 "IBM Plex Mono", monospace; letter-spacing: .17em; }
.opening-content h1 { margin: 0; color: #243b2e; font: 500 clamp(28px, 4vw, 42px)/1.3 "Unbounded", sans-serif; letter-spacing: -.055em; }
.opening-content h1>span { color: #759774; }
.opening-status { display: flex; align-items: center; gap: 10px; margin-top: 32px; color: #788477; font-size: 12px; }
.opening-dots { display: flex; gap: 3px; }.opening-dots i { width: 4px; height: 4px; border-radius: 50%; background: #558866; animation: opening-pulse 1.5s ease-in-out infinite; }.opening-dots i:nth-child(2) { animation-delay: .18s; }.opening-dots i:nth-child(3) { animation-delay: .36s; }
.opening-footer { min-height: 66px; border-top: 1px solid #e3eae3; color: #839080; font-size: 11px; }.opening-footer>span:last-child { font: 400 9px "IBM Plex Mono", monospace; letter-spacing: .1em; }.opening-footer>span:last-child>span { margin-left: 8px; }
@keyframes opening-orbit { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes opening-mark-float { 50% { transform: translate(-50%, calc(-50% - 7px)) rotate(-4deg); } }
@keyframes opening-float { 50% { translate: 0 -7px; } }
@keyframes opening-pulse { 0%, 80%, 100% { opacity: .35; } 40% { opacity: 1; } }
@media (max-width: 600px) {
  .opening-header, .opening-footer { margin: 0 22px; }.opening-header { min-height: 80px; }.opening-edition { max-width: 112px; text-align: right; font-size: 8px; }
  .opening-content { padding-bottom: 44px; }.opening-art { width: 290px; height: 250px; margin-bottom: 22px; }.opening-ring-outer { width: 236px; height: 236px; }.opening-chip { padding: 10px 12px; font-size: 11px; }.opening-chip-reviews { left: 0; }.opening-chip-mentions { right: -2px; }.opening-chip-insights { left: 14px; bottom: 12px; }
  .opening-kicker { font-size: 8px; }.opening-footer { min-height: 60px; font-size: 10px; }.opening-footer>span:first-child { max-width: 155px; line-height: 1.5; }
}
@media (prefers-reduced-motion: reduce) { .opening-screen *, .opening-screen *::before, .opening-screen *::after { animation: none !important; } }

/* Auth and onboarding */
.center-shell { min-height: 100vh; width: min(1040px, calc(100% - 40px)); margin: auto; display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 80px; padding: 40px 0; }
.auth-story h1 { margin: 22px 0 14px; font: 500 40px/1.18 "Unbounded", sans-serif; letter-spacing: -.045em; }
.auth-story .brand { height: 44px; margin-left: 0; }
.auth-story p { color: var(--muted); line-height: 1.7; }
.auth-points { display: grid; gap: 12px; margin-top: 32px; }
.auth-point { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.auth-point i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.form-card { padding: 32px; border-radius: 22px; }
.form-card h2 { margin: 0 0 8px; font: 500 24px "Unbounded", sans-serif; letter-spacing: -.04em; }
.form-card > p { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { color: #4d5360; font-size: 12px; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid rgba(27,30,39,.12); border-radius: 11px; background: rgba(255,255,255,.74); color: var(--ink); }
.field textarea { min-height: 90px; resize: vertical; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.form-link { border: 0; background: none; color: var(--teal-dark); font-size: 13px; }
.auth-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; font-size: 12px; color: var(--muted); }
.auth-toggle .form-link { font-size: 12px; }
.form-note { margin-top: 18px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.stepper { display: flex; gap: 7px; margin: 20px 0 28px; }
.step { height: 5px; flex: 1; border-radius: 5px; background: rgba(27,30,39,.10); }
.step.active { background: var(--teal); }
.source-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.source-choice label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.5); }
.source-choice small { display: block; color: var(--muted); }
.source-search-panel { padding: 14px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.38); }
.source-search-panel .field { margin-bottom: 8px; }
.source-search-panel .form-note { margin: 2px 0 0; }
.source-search-panel > .btn { width: 100%; margin-top: 4px; }
.onboarding-sources label { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; }
.onboarding-sources label > input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); }
.onboarding-sources label > input[type="url"] { grid-column: 2 / -1; width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid rgba(27,30,39,.12); border-radius: 10px; background: rgba(255,255,255,.75); color: var(--ink); }
.onboarding-sources .btn { padding: 8px 11px; }

/* Application shell */
.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 14; padding: 10px 18px 0; }
.topbar-inner { width: min(1440px, 100%); min-height: 68px; display: grid; grid-template-columns: auto minmax(450px, 1fr) auto; align-items: center; gap: 20px; margin: 0 auto; padding: 9px 12px; border: 1px solid rgba(255,255,255,.83); border-radius: 17px; background: rgba(247,249,251,.78); box-shadow: 0 16px 45px -34px rgba(32,54,67,.5); backdrop-filter: blur(28px) saturate(130%); }
.topbar-start { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar .brand { width: 94px; height: 33px; }
.workspace-switcher { min-width: 0; max-width: 190px; display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.48); color: var(--ink); text-align: left; }
.workspace-switcher span { grid-column: 1; color: var(--muted); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.workspace-switcher strong { max-width: 145px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
.workspace-switcher i { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--muted); font-style: normal; }
.top-nav { min-width: 0; display: flex; justify-content: center; gap: 3px; }
.top-link { position: relative; min-width: 42px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 0; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; transition: color .18s, background .18s, gap .2s, padding .2s; }
.top-link .icon { width: 16px; height: 16px; }
.top-link > span { max-width: 0; overflow: hidden; opacity: 0; transform: translateX(-4px); transition: max-width .24s ease, opacity .16s ease, transform .24s ease; }
.top-link:hover, .top-link:focus-visible { gap: 7px; padding-inline: 12px; }
.top-link:hover > span, .top-link:focus-visible > span { max-width: 88px; opacity: 1; transform: translateX(0); }
.top-link:hover { color: var(--ink); background: rgba(255,255,255,.62); }
.top-link.active { color: var(--ink); background: white; box-shadow: 0 6px 18px -13px rgba(27,30,39,.5); }
.top-link.active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--teal); }
.top-badge { min-width: 17px; height: 17px; display: grid; place-items: center; border-radius: 8px; background: var(--amber-soft); color: var(--amber); font: 9px "IBM Plex Mono", monospace; }
.topbar-user { display: flex; align-items: center; gap: 9px; }
.locale-toggle { min-width: 38px; height: 32px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.62); color: var(--ink); font: 700 10px "IBM Plex Mono", monospace; cursor: pointer; }
.locale-toggle:hover { background: white; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--ink); font-size: 11px; }
.user-copy strong, .user-copy small { display: block; max-width: 110px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-copy strong { font-size: 11px; }.user-copy small { color: var(--muted); font-size: 9px; }
.logout-button { white-space: nowrap; }
.app-main { width: min(1380px, calc(100% - 64px)); min-width: 0; margin: 0 auto; padding: 40px 0 60px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin: 2px 0 24px; }
.page-head h1 { margin: 0 0 6px; font: 500 27px/1.25 "Unbounded", sans-serif; letter-spacing: -.045em; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.date-select { min-height: 42px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.8); border-radius: 11px; background: rgba(255,255,255,.58); color: var(--ink); }
.grid { display: grid; gap: 15px; }
.metric-grid { grid-template-columns: repeat(4, 1fr); }
.metric-card { padding: 21px 22px; border-radius: 14px; }
.metric-label { color: var(--muted); font-size: 12px; }
.metric-value { margin: 13px 0 8px; font: 500 29px "IBM Plex Mono", monospace; }
.metric-change { font: 11px "IBM Plex Mono", monospace; color: var(--muted); }
.good { color: var(--teal-dark); }.warning { color: var(--amber); }.danger { color: #a34936; }
.overview-hero { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:28px;align-items:center;margin-bottom:18px;padding:30px 34px;border-radius:16px;background:linear-gradient(105deg,rgba(255,247,232,.94),rgba(255,255,255,.78) 68%,rgba(222,241,235,.74)); }
.overview-hero h2 { margin:0 0 10px;font:500 30px/1.22 "Unbounded",sans-serif; }
.overview-hero p { max-width:760px;margin:0;color:#4d5360;font-size:15px;line-height:1.6; }
.hero-review { margin-top:18px; }
.overview-hero-risk .risk-score strong { font-size:42px; }
.overview-hero-risk { min-width:145px; }
.overview-split { grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr);margin-top:15px; }
.overview-card-primary,.overview-card-side { min-height:170px; }
.signal-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 25px; align-items: center; margin: 15px 0; padding: 24px; border-radius: 18px; background: linear-gradient(120deg, rgba(255,255,255,.80), rgba(225,185,121,.18)); }
.signal-card::after { content: ""; position: absolute; width: 220px; height: 220px; right: -115px; top: -115px; border: 1px solid rgba(201,122,31,.15); border-radius: 50%; box-shadow: 0 0 0 32px rgba(201,122,31,.04), 0 0 0 64px rgba(201,122,31,.03); }
.signal-card h2 { margin: 0 0 6px; font-size: 16px; }.signal-card p { margin: 0; color: var(--muted); font-size: 13px; }
.risk-score { z-index: 1; text-align: right; }.risk-score strong { display: block; color: var(--amber); font: 500 28px "IBM Plex Mono", monospace; }.risk-score small { display:block;color:var(--muted);font-size:11px; }
.content-split { grid-template-columns: minmax(0, 1.45fr) minmax(290px, .8fr); }
.card { padding: 21px; border-radius: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 17px; }
.card-head h2 { margin: 0 0 4px; font-size: 14px; }.card-head p { margin: 0; color: var(--muted); font-size: 11px; }
.chart { height: 190px; display: flex; align-items: end; gap: 9px; padding: 15px 3px 0; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0 46px, rgba(27,30,39,.045) 47px 48px); }
.bar-group { flex: 1; height: 100%; display: flex; align-items: end; justify-content: center; gap: 3px; }
.bar { width: min(12px, 38%); border-radius: 5px 5px 1px 1px; background: rgba(30,143,133,.72); }.bar.neg { background: rgba(201,122,31,.62); }
.chart-labels { display: flex; justify-content: space-around; margin-top: 8px; color: var(--muted); font: 9px "IBM Plex Mono", monospace; }
.legend { display: flex; gap: 15px; margin-top: 13px; color: var(--muted); font-size: 10px; }.legend i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 2px; background: var(--teal); }.legend i.neg { background: var(--amber); }
.summary { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.56); color:#343946; font-size: 13px; line-height: 1.65; }
.evidence { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 15px; }.evidence div { padding: 11px; border-radius: 8px; background: rgba(255,255,255,.62); }.evidence strong { display: block; font: 500 15px "IBM Plex Mono", monospace; }.evidence span { display:block;overflow:hidden;text-overflow:ellipsis;color: var(--muted); font-size: 9px; white-space:nowrap; }

/* Data surfaces */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.search { min-width: 240px; flex: 1; min-height: 42px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.83); border-radius: 11px; background: rgba(255,255,255,.65); }
.filter { min-height: 42px; padding: 9px 10px; border: 1px solid rgba(255,255,255,.83); border-radius: 11px; background: rgba(255,255,255,.65); }
.mention-list, .alert-list { display: grid; gap: 10px; }
.mention-card { padding: 18px; border-radius: 16px; }
.mention-top { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.source-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.66); color: var(--teal-dark); }
.mention-meta strong, .mention-meta small { display: block; }.mention-meta strong { font-size: 12px; }.mention-meta small { color: var(--muted); font-size: 10px; }
.risk-pill { margin-left: auto; padding: 6px 9px; border-radius: 9px; background: var(--amber-soft); color: var(--amber); font: 500 10px "IBM Plex Mono", monospace; }
.risk-pill.low { background: var(--teal-soft); color: var(--teal-dark); }
.mention-text { margin: 0 0 13px; font-size: 14px; line-height: 1.6; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }.tag { padding: 4px 7px; border-radius: 6px; background: rgba(107,113,128,.10); color: var(--muted); font: 10px "IBM Plex Mono", monospace; }.tag.pos { background: var(--teal-soft); color: var(--teal-dark); }.tag.neg { background: var(--amber-soft); color: var(--amber); }
.mention-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.status { padding: 4px 7px; border-radius: 6px; background: rgba(107,113,128,.10); color: var(--muted); font: 10px "IBM Plex Mono", monospace; }.status.live { background: var(--teal-soft); color: var(--teal-dark); }.status.high { background: var(--amber-soft); color: var(--amber); }
.table-wrap { overflow: auto; border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; } th { color: var(--muted); text-align: left; font-weight: 500; } th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; } tr:last-child td { border-bottom: 0; }
.mentions-table-wrap { border:1px solid rgba(255,255,255,.88); background:rgba(255,255,255,.46); box-shadow:var(--shadow); }
.mentions-table { min-width:900px; table-layout:fixed; }
.mentions-table thead th {
  padding: 18px 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #69737d;
  white-space: nowrap;
}

.table-sort {
  border: 0;
  background: transparent;
  padding: 6px 8px;
  border-radius: 8px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: .15s ease;
}

.table-sort:hover {
  background: rgba(18, 93, 76, .07);
  color: #123f35;
}

.table-sort.active {
  background: rgba(18, 93, 76, .1);
  color: #123f35;
  font-weight: 600;
}

/* Secondary Filters Floating Popover */
.popover-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.filter-popover-btn {
  background: rgba(30, 143, 133, .08);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  transition: background .15s, color .15s;
}

.filter-popover-btn.active {
  background: rgba(30, 143, 133, .12);
  color: var(--teal-dark);
  border-color: rgba(30, 143, 133, .28);
}

.filters-popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 200;
  max-width: 200px;
  max-height: 250px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 20px -5px rgba(27, 30, 39, .2), 0 0 0 1px rgba(27, 30, 39, .05);
  backdrop-filter: blur(16px);
}

.popover-title {
  font: 600 13px "Unbounded", sans-serif;
  color: var(--ink);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.popover-section {
  margin-bottom: 12px;
}

.popover-section:last-of-type {
  margin-bottom: 8px;
}

.popover-label {
  font: 600 10px/1.4 "IBM Plex Mono", monospace;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 5px;
}

.popover-item, .header-filter-menu .menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font: 400 12px "IBM Plex Sans", sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.popover-item:hover, .header-filter-menu .menu-item:hover {
  background: rgba(27, 30, 39, .05);
}

.popover-item.active, .header-filter-menu .menu-item.active {
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 500;
}

.popover-item .check, .header-filter-menu .menu-item .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal-dark);
}

.popover-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.popover-clear-btn {
  width: 100%;
  padding: 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: 500 11px "IBM Plex Sans", sans-serif;
  cursor: pointer;
  text-align: center;
  transition: color .15s ease, background .15s ease;
}

.popover-clear-btn:hover {
  color: var(--ink);
  background: rgba(27, 30, 39, .04);
}

/* Header filter anchors and menus */
.th-filter-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.th-filter-btn {
  background: none;
  border: none;
  padding: 6px 8px;
  margin: 0;
  border-radius: 8px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: .15s ease;
  white-space: nowrap;
}

.th-filter-btn:hover {
  background: rgba(18, 93, 76, .07);
  color: #123f35;
}

.th-filter-btn.active {
  background: rgba(18, 93, 76, .1);
  color: #123f35;
  font-weight: 600;
}

.header-filter-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 200;
  min-width: 160px;
  max-width: 200px;
  max-height: 250px;
  overflow-y: auto;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 20px -5px rgba(27, 30, 39, .2), 0 0 0 1px rgba(27, 30, 39, .05);
  backdrop-filter: blur(16px);
}

/* Table empty row */
.table-empty-cell {
  padding: 48px 16px !important;
  text-align: center;
}

.table-empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.table-empty-text {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.table-empty-actions {
  display: flex;
  gap: 8px;
}
.mentions-table .review-col { width:33%; }.mentions-table .sentiment-col{width:13%}.mentions-table .confidence-col{width:18%}.mentions-table .summary-col{width:36%}
.mentions-table thead { background:rgba(242,247,245,.82); }
.mentions-table th { padding:14px 16px; color:#7a808c; font:500 9px "IBM Plex Mono",monospace; letter-spacing:.09em; text-transform:uppercase; }
.mentions-table td { padding:17px 16px; white-space:normal; vertical-align:middle; }
.mentions-table tbody tr { transition:background .18s ease; }.mentions-table tbody tr:hover{background:rgba(255,255,255,.52)}
.review-cell strong,.review-cell small { display:block; }.review-cell strong{color:var(--ink);font-size:13px;line-height:1.5}.review-cell small{margin-top:6px;color:var(--muted);font-size:9px}
.sentiment-pill { width:max-content;display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid transparent;border-radius:999px;font:500 10px "IBM Plex Mono",monospace;text-transform:capitalize; }
.sentiment-pill i { width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 0 4px currentColor;opacity:.72; }
.sentiment-pill.positive { color:#087a56;background:rgba(21,155,112,.13);border-color:rgba(21,155,112,.16) }
.sentiment-pill.negative { color:#a64335;background:rgba(163,73,54,.12);border-color:rgba(163,73,54,.15) }
.sentiment-pill.neutral { color:#5e6675;background:rgba(107,113,128,.11);border-color:rgba(107,113,128,.12) }
.sentiment-pill.mixed { color:#a86116;background:var(--amber-soft);border-color:rgba(201,122,31,.16) }
.confidence-cell { display:grid;gap:8px;min-width:120px; }.confidence-cell>div{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.confidence-cell strong{font:600 14px "IBM Plex Mono",monospace}.confidence-cell span{color:var(--muted);font-size:9px}.confidence-cell>b{height:7px;overflow:hidden;border-radius:8px;background:rgba(27,30,39,.07)}.confidence-cell>b>i{display:block;height:100%;border-radius:inherit;background:currentColor}
.confidence-cell.high{color:var(--teal-dark)}.confidence-cell.medium{color:var(--amber)}.confidence-cell.low{color:#a34936}
.mention-summary { margin:0;color:#4d5360;font-size:12px;line-height:1.55; }
.trend-up { color: var(--amber); }.trend-down { color: var(--teal-dark); }
.source-grid { grid-template-columns: 1fr; }
.source-card { width:100%; min-height: 230px; display: flex; flex-direction: column; padding: 20px; border-radius: 17px; }
.source-head { display: flex; align-items: center; gap: 10px; }.source-head .status { margin-left: auto; }
.source-card h3 { margin: 17px 0 4px; font-size: 14px; }.source-card > p { margin: 0 0 16px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.source-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }.source-stats div { padding: 9px; border-radius: 9px; background: rgba(255,255,255,.45); }.source-stats span, .source-stats strong { display: block; }.source-stats span { color: var(--muted); font-size: 9px; }.source-stats strong { margin-top: 2px; font-size: 11px; }
.collection-progress{height:7px;margin:14px 0 2px;overflow:hidden;border-radius:999px;background:rgba(27,30,39,.08)}.collection-progress i{display:block;height:100%;width:var(--progress,0%);border-radius:inherit;background:linear-gradient(90deg,var(--teal),#56d9aa);transition:width .35s ease}
.radar-strip { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 15px; padding: 17px; border-radius: 16px; }.radar-stat span, .radar-stat strong { display: block; }.radar-stat span { color: var(--muted); font-size: 10px; }.radar-stat strong { margin-top: 4px; font: 500 17px "IBM Plex Mono", monospace; }
.empty { padding: 50px 20px; text-align: center; }.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 15px; background: var(--teal-soft); color: var(--teal-dark); }.empty h3 { margin: 0 0 5px; font-size: 14px; }.empty p { margin: 0; color: var(--muted); font-size: 12px; }
.settings-grid { grid-template-columns: 180px minmax(0, 1fr); }.settings-nav { align-self: start; display: grid; gap: 3px; padding: 7px; border-radius: 14px; }.settings-nav button { padding: 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); text-align: left; font-size: 12px; }.settings-nav button.active { color: var(--ink); background: rgba(255,255,255,.70); }.settings-panel { padding: 24px; border-radius: 18px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }.toggle-row:last-child { border-bottom: 0; }.toggle-row strong, .toggle-row small { display: block; }.toggle-row strong { font-size: 13px; }.toggle-row small { margin-top: 2px; color: var(--muted); font-size: 10px; }.switch { position: relative; width: 40px; height: 23px; border: 0; border-radius: 20px; background: rgba(107,113,128,.25); }.switch.on { background: var(--teal); }.switch::after { content: ""; position: absolute; width: 17px; height: 17px; top: 3px; left: 3px; border-radius: 50%; background: white; transition: transform .2s; }.switch.on::after { transform: translateX(17px); }
.provider-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 20px 0; }.provider-card { min-height: 118px; display: flex; flex-direction: column; align-items: flex-start; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.5); }.provider-card strong { margin: 15px 0 4px; font: 500 17px "Unbounded", sans-serif; }.provider-card small { color: var(--muted); font-size: 10px; line-height: 1.5; }.provider-arrow { color: var(--muted); }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(27,30,39,.28); backdrop-filter: blur(6px); }.modal { width: min(510px, 100%); max-height: 85vh; overflow: auto; padding: 25px; border-radius: 20px; background: rgba(244,247,249,.94); box-shadow: 0 30px 70px -35px rgba(0,0,0,.55); }.modal-head { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 18px; }.modal h2 { margin: 0 0 4px; font: 500 20px "Unbounded", sans-serif; }.modal p { margin: 0; color: var(--muted); font-size: 12px; }.close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.6); }
.extraction-input { min-height: 220px !important; font: 11px/1.55 "IBM Plex Mono",monospace; }
.extraction-rules { display: flex; gap: 7px; flex-wrap: wrap; margin: -2px 0 18px; }.extraction-rules span { padding: 6px 8px; border-radius: 7px; background: var(--teal-soft); color: var(--teal-dark); font-size: 10px; }
.extracted-list { display: grid; gap: 9px; max-height: 55vh; overflow: auto; margin: 0 -4px 18px 0; padding-right: 4px; }
.extracted-review { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: start; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.56); cursor: pointer; }.extracted-review > input { margin-top: 3px; accent-color: var(--teal); }.extracted-review strong,.extracted-review small { display: block; }.extracted-review strong { font-size: 12px; }.extracted-review small { margin-top: 3px; color: var(--muted); font-size: 9px; }.extracted-review p { margin: 9px 0 0; color: var(--ink); font-size: 12px; line-height: 1.5; }.extracted-review em { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; font-style: normal; }.extracted-review .status { white-space: nowrap; }
.toast-region { position: fixed; z-index: 50; right: 20px; top: 20px; display: grid; gap: 8px; }.toast { width: min(350px, calc(100vw - 40px)); padding: 13px 15px; border: 1px solid rgba(255,255,255,.9); border-radius: 12px; background: rgba(255,255,255,.9); box-shadow: 0 15px 40px -25px rgba(0,0,0,.5); font-size: 12px; animation: toast-in .2s ease; }.toast strong { display: block; margin-bottom: 2px; }.toast small { color: var(--muted); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
.loading { opacity: .55; pointer-events: none; }.skeleton { height: 90px; border-radius: 15px; background: linear-gradient(90deg, rgba(255,255,255,.35), rgba(255,255,255,.72), rgba(255,255,255,.35)); background-size: 200% 100%; animation: shimmer 1.2s infinite; } @keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 980px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .source-grid { grid-template-columns: 1fr; }
  .topbar-inner { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
  .workspace-switcher, .user-copy { display: none; }
  .top-link { padding: 8px; }
  .top-link .icon { width: 18px; height: 18px; }
}

@media (max-width: 720px) {
  .landing-shell, .center-shell { width: min(100% - 28px, 620px); }
  .landing-nav .nav-actions { gap:6px; }
  .landing-nav .btn { min-height:39px;padding:8px 11px;font-size:12px; }
  .hero { padding: 68px 0 48px; }.hero h1 { font-size: 40px; }.hero > p { font-size: 15px; }
  .signal-preview { padding: 22px; margin-bottom: 48px; }.preview-grid { grid-template-columns: 1fr; gap: 24px; }.preview-insight { padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--line); }.preview-bottom { align-items: flex-start; flex-direction: column; }
  .features { grid-template-columns: 1fr; margin: 45px 0; }.feature { padding: 20px; }.feature .feature-icon { margin-bottom: 20px; }
  .language-demo { grid-template-columns: 1fr; padding: 25px; }
  .pricing-section { margin-top: 65px; }.pricing-grid { grid-template-columns: 1fr; }.plan.featured { transform: none; }
  .center-shell { display: block; padding: 20px 0 40px; }.auth-story { padding: 10px 4px 28px; }.auth-story h1 { font-size: 29px; }.auth-points { display: none; }.field-grid, .source-choice { grid-template-columns: 1fr; }
  .topbar { padding: 8px 8px 0; }
  .topbar-inner { grid-template-columns: 1fr auto; gap: 8px; padding: 9px 10px 6px; border-radius: 15px; }
  .topbar-start .brand { font-size: 16px; }.topbar-start .brand-mark { width: 32px; height: 32px; }
  .topbar-user .avatar, .logout-button { display: none; }
  .locale-toggle { min-width: 36px; height: 30px; }
  .top-nav { grid-column: 1 / -1; justify-content: flex-start; order: 3; padding-top: 5px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); }
  .top-nav::-webkit-scrollbar { display: none; }
  .top-link { min-width: 76px; min-height: 39px; padding: 7px 8px; gap: 5px; font-size: 9px; }
  .top-link { gap: 5px; }
  .top-link > span, .top-link:hover > span, .top-link:focus-visible > span { display: inline; max-width: 88px; opacity: 1; transform: none; }
  .top-link .icon { width: 15px; height: 15px; }
  .top-link.active::after { left: 12px; right: 12px; bottom: 2px; }
  .app-main { width: calc(100% - 28px); padding: 44px 0 45px; }
  .page-head { align-items: flex-start; flex-direction: column; }.page-head h1 { font-size: 22px; }.head-actions { width: 100%; }.head-actions .date-select { flex: 1; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }.metric-card { padding: 15px; }.metric-value { font-size: 23px; }
  .signal-card { grid-template-columns: 1fr; }.risk-score { text-align: left; }
  .content-split, .source-grid, .settings-grid { grid-template-columns: 1fr; }.evidence { grid-template-columns: 1fr 1fr 1fr; }
  .toolbar { align-items: stretch; }.search { width: 100%; min-width: 0; flex-basis: 100%; }.filter { flex: 1; }
  .radar-strip { grid-template-columns: 1fr 1fr; }.radar-strip .btn { grid-column: 1 / -1; }
  .settings-nav { grid-template-columns: repeat(3, 1fr); overflow: auto; }.settings-nav button { white-space: nowrap; text-align: center; }
  .provider-grid { grid-template-columns: 1fr; }.provider-arrow { transform: rotate(90deg); text-align: center; }
  .landing-footer { flex-direction: column; }
}

@media (max-width: 420px) {
  .nav-actions .btn { padding: 9px 11px; font-size: 12px; }.hero h1 { font-size: 34px; }.metric-label { min-height: 30px; }.metric-change { min-height: 24px; }.evidence { grid-template-columns: 1fr; }
  .onboarding-sources label { grid-template-columns: auto minmax(0,1fr); }
  .onboarding-sources label .btn, .onboarding-sources label > input[type="url"] { grid-column: 1 / -1; }
}

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

/* Functional surfaces added after the original visual design. */
.section-label { display:flex; align-items:center; gap:8px; margin:0 0 12px; color:var(--teal-dark); font:500 10px/1.4 "IBM Plex Mono",monospace; letter-spacing:.12em; text-transform:uppercase; }
.section-label::before { content:""; width:6px; height:6px; border-radius:50%; background:var(--teal); box-shadow:0 0 0 5px var(--teal-soft); }
.sentiment-stack { display:flex; height:16px; margin:52px 0 24px; overflow:hidden; border-radius:9px; background:rgba(27,30,39,.07); }
.sentiment-stack.compact { margin:34px 0 18px;height:18px; }
.sentiment-stack i { display:block; }.sentiment-stack .positive{background:var(--teal)}.sentiment-stack .negative{background:var(--amber)}.sentiment-stack .neutral{background:rgba(107,113,128,.35)}
.progress-row { margin:15px 0; }.progress-row>div{display:flex;justify-content:space-between;font-size:12px;text-transform:capitalize}.progress-row strong{color:var(--muted);font:500 10px "IBM Plex Mono",monospace}.progress-row>i{display:block;height:7px;margin-top:7px;overflow:hidden;border-radius:8px;background:rgba(27,30,39,.07)}.progress-row b{display:block;height:100%;border-radius:8px}
.empty .btn { margin-top:18px; }
.admin-section { margin-top:15px; }
.health-row { display:flex;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid var(--line) }.health-row:last-child{border:0}.health-row strong,.health-row small{display:block}.health-row small{margin-top:2px;color:var(--muted);font-size:10px}
.metric-value.danger,.danger { color:#a34936; }
.overview-section { margin-top:28px; }
.overview-section-head { display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:0 0 14px;padding:0 2px; }
.overview-section-head .section-label { margin-bottom:8px; }
.overview-section-head h2 { margin:0 0 4px;font:500 18px "Unbounded",sans-serif;letter-spacing:-.03em; }
.overview-section-head p { margin:0;color:var(--muted);font-size:11px; }
.sentiment-donut { width:174px;height:174px;margin:18px auto 20px;border-radius:50%;background:conic-gradient(var(--teal) 0 var(--positive),#a34936 var(--positive) var(--negative),var(--amber) var(--negative) 100%);display:grid;place-items:center;box-shadow:inset 0 0 0 1px rgba(255,255,255,.65); }
.sentiment-donut>div { width:108px;height:108px;border-radius:50%;display:grid;place-content:center;text-align:center;background:rgba(247,250,250,.94);box-shadow:0 12px 30px -22px rgba(17,56,53,.55); }
.sentiment-donut strong,.sentiment-donut small { display:block; }.sentiment-donut strong{font:500 23px "IBM Plex Mono",monospace}.sentiment-donut small{margin-top:3px;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.08em}
.recommendations-card { margin-top:0; }
.recommendation-columns { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:15px; }
.recommendation-column { min-width:0; }
.recommendation-column h3 { margin:0 0 10px;color:#343946;font:600 12px "IBM Plex Sans",sans-serif;text-transform:none; }
.recommendation-row { display:grid;gap:8px;margin-bottom:9px;padding:13px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.58); }
.recommendation-row strong { display:block;color:var(--ink);font-size:12px;line-height:1.35; }
.recommendation-row small { display:block;margin-top:4px;color:var(--muted);font:500 9px "IBM Plex Mono",monospace;text-transform:uppercase;letter-spacing:.06em; }
.recommendation-row p { margin:0;color:#4d5360;font-size:11px;line-height:1.5; }
.recommendation-row b { color:var(--teal-dark);font-size:11px;line-height:1.45; }
@media (max-width:980px){.topbar-inner{grid-template-columns:auto minmax(0,1fr) auto}.top-nav{overflow-x:auto;justify-content:flex-start;scrollbar-width:none}.top-nav::-webkit-scrollbar{display:none}}
@media (max-width:720px){.overview-section-head,.overview-hero{align-items:flex-start;grid-template-columns:1fr;flex-direction:column}.overview-split,.recommendation-columns{grid-template-columns:1fr}}

/* Compact onboarding and source management */
.setup-summary { display:flex; gap:13px; align-items:flex-start; padding:16px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.45); }
.setup-summary strong { display:block; margin:2px 0 5px; font-size:13px; }
.setup-summary p { margin:0; color:var(--muted); font-size:11px; line-height:1.55; }
.onboarding-source-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:18px; }
.source-grid { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
.source-card { min-height:0; padding:15px; }
.source-card > p { min-height:34px; margin:11px 0; display:-webkit-box; overflow:hidden; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.source-head small { display:block; margin-top:2px; color:var(--muted); font-size:9px; }
.source-stats { grid-template-columns:90px minmax(0,1fr); margin:0; }
.source-stats strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.source-actions { display:flex; justify-content:flex-end; gap:5px; margin-top:11px; padding-top:10px; border-top:1px solid var(--line); }
.source-actions .btn { padding:8px 10px; }
.source-method-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.source-method { text-align:left; padding:15px; border:1px solid var(--line); border-radius:8px; background:rgba(255,255,255,.55); color:var(--ink); cursor:pointer; }
.source-method strong, .source-method small { display:block; }
.source-method small { margin-top:5px; color:var(--muted); line-height:1.35; }
.toggle-inline { display:flex; align-items:center; gap:8px; margin:10px 0; color:var(--muted); font-size:11px; }
.import-preview-empty { padding:14px; border:1px dashed var(--line); border-radius:8px; color:var(--muted); }
.import-preview table { font-size:10px; }
.import-preview + .field-grid .field select + select { margin-top:6px; }
@media (max-width:760px){.source-grid,.onboarding-source-actions{grid-template-columns:1fr}}

/* Mention intelligence table */
.mentions-table tbody tr{cursor:pointer}.mentions-table td{font-size:12px}
.mention-detail-text{padding:15px;margin-bottom:14px;border-radius:12px;background:rgba(255,255,255,.55);font-size:13px;line-height:1.6}
.detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px}.detail-grid>div{padding:10px;border-radius:10px;background:rgba(255,255,255,.45)}.detail-grid span,.detail-grid strong{display:block}.detail-grid span{color:var(--muted);font-size:9px}.detail-grid strong{margin-top:3px;font-size:11px}.reply-editor{min-height:180px!important}
@media(max-width:760px){.detail-grid{grid-template-columns:1fr 1fr}.mention-filters .filter{flex:1 1 44%}}

.mentions-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.mentions-table thead tr,
.mentions-table tbody tr {
  display: table-row;
}

.mentions-table th,
.mentions-table td {
  display: table-cell;
  vertical-align: middle;
  text-align: left;
  box-sizing: border-box;
}

/* одинаковая ширина header и body */
.mentions-table th:nth-child(1),
.mentions-table td:nth-child(1) {
  width: 32%;
}

.mentions-table th:nth-child(2),
.mentions-table td:nth-child(2) {
  width: 9%;
}

.mentions-table th:nth-child(3),
.mentions-table td:nth-child(3) {
  width: 10%;
}

.mentions-table th:nth-child(4),
.mentions-table td:nth-child(4) {
  width: 14%;
}

.mentions-table th:nth-child(5),
.mentions-table td:nth-child(5) {
  width: 8%;
}

.mentions-table th:nth-child(6),
.mentions-table td:nth-child(6) {
  width: 8%;
}

.mentions-table th:nth-child(7),
.mentions-table td:nth-child(7) {
  width: 13%;
}


/* SARAP summary-last hotfix */
.mentions-table th:first-child,
.mentions-table td:first-child {
  width: auto !important;
  min-width: 90px !important;
}

.mentions-table th:last-child,
.mentions-table td:last-child {
  width: 34% !important;
  min-width: 300px !important;
}

/* ===== Mentions table final layout ===== */

.mentions-table-wrap {
  overflow-x: auto;
}

.mentions-table {
  width: 100%;
  min-width: 1400px;
  table-layout: fixed;
}

/* Review */
.mentions-table th:nth-child(1),
.mentions-table td:nth-child(1) {
  width: 26%;
}

/* Source */
.mentions-table th:nth-child(2),
.mentions-table td:nth-child(2) {
  width: 8%;
}

/* Type */
.mentions-table th:nth-child(3),
.mentions-table td:nth-child(3) {
  width: 7%;
}

/* Sentiment */
.mentions-table th:nth-child(4),
.mentions-table td:nth-child(4) {
  width: 11%;
}

/* Rating */
.mentions-table th:nth-child(5),
.mentions-table td:nth-child(5) {
  width: 7%;
}

/* Risk */
.mentions-table th:nth-child(6),
.mentions-table td:nth-child(6) {
  width: 6%;
}

/* Published date */
.mentions-table th:nth-child(7),
.mentions-table td:nth-child(7) {
  width: 12%;
  white-space: nowrap;
}

/* Summary */
.mentions-table th:nth-child(8),
.mentions-table td:nth-child(8) {
  width: 23%;
}

.mentions-table th,
.mentions-table td {
  box-sizing: border-box;
}

.mentions-table th:nth-child(1),
.mentions-table td:nth-child(1) {
  width: 28% !important;
}

.mentions-table th:nth-child(2),
.mentions-table td:nth-child(2) {
  width: 9% !important;
}

.mentions-table th:nth-child(3),
.mentions-table td:nth-child(3) {
  width: 8% !important;
}

.mentions-table th:nth-child(4),
.mentions-table td:nth-child(4) {
  width: 11% !important;
}

.mentions-table th:nth-child(5),
.mentions-table td:nth-child(5) {
  width: 7% !important;
  white-space: nowrap;
}

.mentions-table th:nth-child(6),
.mentions-table td:nth-child(6) {
  width: 9% !important;
  min-width: 112px;
}

.mentions-table th:nth-child(7),
.mentions-table td:nth-child(7) {
  width: 12% !important;
  white-space: nowrap;
}

.mentions-table th:nth-child(8),
.mentions-table td:nth-child(8) {
  width: 16% !important;
  min-width: 220px !important;
}

.risk-bar {
  display: inline-grid;
  grid-template-columns: 64px 3ch;
  align-items: center;
  gap: 8px;
  width: 96px;
  color: var(--teal-dark);
  vertical-align: middle;
}

.risk-cell {
  vertical-align: middle;
  white-space: nowrap;
}

.risk-bar span {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(27,30,39,.08);
}

.risk-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
}

.risk-bar strong {
  font: 600 11px "IBM Plex Mono", monospace;
  text-align: right;
  color: var(--ink);
}

.risk-bar.moderate {
  color: #b7872b;
}

.risk-bar.elevated {
  color: var(--amber);
}

.risk-bar.high,
.risk-bar.critical {
  color: #a34936;
}

.mentions-table th {
  white-space: nowrap;
  overflow: visible;
}

.mentions-table th button {
  white-space: nowrap;
}

.mention-review-text {
  white-space: normal;
  line-height: 1.45;
  font-weight: 500;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mention-date {
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: clip;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0;
  user-select: text;
  -webkit-user-select: text;
}

.review-cell {
  white-space: normal;
}

.review-cell strong,
.review-cell small {
  display: block;
}

.review-cell small {
  margin-top: 7px;
}

/* ===== FINAL Mentions table fit ===== */

.mentions-table-wrap {
  width: 100%;
  overflow-x: hidden !important;
}

.mentions-table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}

/* Review */
.mentions-table th:nth-child(1),
.mentions-table td:nth-child(1) {
  width: 22% !important;
}

/* Source */
.mentions-table th:nth-child(2),
.mentions-table td:nth-child(2) {
  width: 8% !important;
}

/* Type */
.mentions-table th:nth-child(3),
.mentions-table td:nth-child(3) {
  width: 8% !important;
}

/* Sentiment */
.mentions-table th:nth-child(4),
.mentions-table td:nth-child(4) {
  width: 12% !important;
}

/* Rating */
.mentions-table th:nth-child(5),
.mentions-table td:nth-child(5) {
  width: 7% !important;
}

/* Risk */
.mentions-table th:nth-child(6),
.mentions-table td:nth-child(6) {
  width: 7% !important;
}

/* Published date */
.mentions-table th:nth-child(7),
.mentions-table td:nth-child(7) {
  width: 13% !important;
}

/* Summary */
.mentions-table th:nth-child(8),
.mentions-table td:nth-child(8) {
  width: 23% !important;
  min-width: 0 !important;
}

.mentions-table th,
.mentions-table td {
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: normal;
}

.mentions-table th {
  white-space: normal !important;
  font-size: 14px;
}

.mentions-table td {
  white-space: normal;
}

.mention-review-text,
.review-cell {
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.review-cell strong {
  white-space: normal !important;
  display: block;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Stable mentions grid: keep date and risk from colliding on narrower screens. */
.mentions-table-wrap {
  overflow-x: auto !important;
}

.mentions-table {
  min-width: 1180px !important;
  width: 100% !important;
  table-layout: fixed !important;
}

.mentions-table th:nth-child(1),
.mentions-table td:nth-child(1) { width: 24% !important; }
.mentions-table th:nth-child(2),
.mentions-table td:nth-child(2) { width: 9% !important; }
.mentions-table th:nth-child(3),
.mentions-table td:nth-child(3) { width: 8% !important; }
.mentions-table th:nth-child(4),
.mentions-table td:nth-child(4) { width: 13% !important; }
.mentions-table th:nth-child(5),
.mentions-table td:nth-child(5) { width: 7% !important; }
.mentions-table th:nth-child(6),
.mentions-table td:nth-child(6) { width: 9% !important; }
.mentions-table th:nth-child(7),
.mentions-table td:nth-child(7) { width: 13% !important; }
.mentions-table th:nth-child(8),
.mentions-table td:nth-child(8) { width: 17% !important; }

.risk-cell {
  min-width: 0;
  overflow: hidden;
}

.risk-bar {
  grid-template-columns: minmax(34px, 1fr) 2.5ch !important;
  gap: 6px !important;
  width: min(84px, 100%) !important;
  max-width: 84px;
}

.risk-bar strong {
  min-width: 2ch;
}

.mention-date {
  display: inline-block;
  min-width: 10ch;
  max-width: 100%;
}

/* Compact overview panels inspired by the command-center reference */
.overview-command-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr); gap: 12px; }

.compact-panel {
  min-height: 260px;
}

.mini-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mini-card-head h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.mini-card-head p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.recommendation-columns.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

.recommendation-columns.compact .recommendation-row {
  min-height: 270px;
  margin-bottom: 0;
  padding: 20px;
  grid-template-rows: 24px 54px minmax(72px,1fr) 54px;
  align-content: stretch;
  gap: 12px;
}

.recommendation-columns.compact .recommendation-row .recommendation-copy { min-width:0;overflow:hidden; }
.recommendation-columns.compact .recommendation-row strong { display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:16px;line-height:1.4; }
.recommendation-columns.compact .recommendation-row small { margin-top:3px;font-size:10px; }
.recommendation-columns.compact .recommendation-row b { display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;align-self:start;font-size:13px;line-height:1.45; }

.recommendation-columns.compact .recommendation-row p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.6;
}

.priority-grid { grid-template-columns: repeat(3,minmax(0,1fr));align-items:stretch; }
.recommendation-kind { width: fit-content; padding: 5px 8px; border-radius: 5px; background: rgba(201,122,31,.12); color: #87500f; font: 600 10px/1.3 "IBM Plex Mono",monospace; text-transform: uppercase; }
.recommendation-row.fix { border-top: 3px solid #c97a1f; }
.recommendation-row.fix .recommendation-kind { background:rgba(201,122,31,.12);color:#87500f; }
.recommendation-row.keep { border-top: 3px solid #17846f; }
.recommendation-row.keep .recommendation-kind { background: rgba(23,132,111,.12); color: #126b5b; }
.recommendation-row.watch { border-top: 3px solid #7b8290; }
.recommendation-row.watch .recommendation-kind { background: rgba(107,113,128,.12); color: #565c68; }
.recommendation-empty { align-content: start; }
.theme-clusters-section { margin-top: 18px; padding: 20px 22px; border: 1px solid rgba(255,255,255,.75); border-radius: 14px; background: rgba(255,255,255,.32); }
.theme-clusters-section .mini-card-head { margin-bottom: 16px; }
.theme-clusters-section .mini-card-head h3 { font-size: 16px; }
.theme-clusters-section .mini-card-head p { font-size: 12px; }

.theme-cluster-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.theme-cluster-grid .theme-cluster-card {
  min-width: 0;
  display:grid;
  gap:12px;
  padding: 14px;
  border: 1px solid #e7e9ed;
  border-top:3px solid #a8afb8;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.theme-cluster-card.strong,.theme-cluster-card.positive { border-top-color:#16a36f; }
.theme-cluster-card.needs-attention { border-top-color:#d97706; }
.theme-cluster-card.mixed { border-top-color:#a8afb8; }
.theme-cluster-heading { min-width:0;display:flex;align-items:flex-start;justify-content:space-between;gap:10px; }
.theme-cluster-heading strong {
  min-width:0;
  color:#20242c;
  font-size:14px;
  line-height:1.4;
  overflow-wrap:anywhere;
}
.theme-cluster-status {
  flex:none;
  padding:4px 6px;
  border-radius:5px;
  background:#f0f2f4;
  color:#626b78;
  font-size:10px;
  line-height:1.25;
  white-space:nowrap;
}
.theme-cluster-card.strong .theme-cluster-status,.theme-cluster-card.positive .theme-cluster-status { background:#e7f5ee;color:#13734f; }
.theme-cluster-card.needs-attention .theme-cluster-status { background:#fff3e1;color:#9a5a08; }
.theme-cluster-counts { display:flex;flex-wrap:wrap;gap:8px 14px; }
.theme-cluster-counts span { display:inline-flex;align-items:center;gap:6px;color:#747c8a;font-size:11px; }
.theme-cluster-counts i { width:7px;height:7px;border-radius:50%;background:#16a36f; }
.theme-cluster-counts i.issue { background:#d97706; }
.theme-cluster-bar { height:6px;display:flex;overflow:hidden;border-radius:999px;background:#eef0f2; }
.theme-cluster-bar b { height:100%; }
.theme-cluster-bar b.positive { background:#16a36f; }
.theme-cluster-bar b.issue { background:#d97706; }
.incident-label { color:#59616d; }
.incident-label::before { background:#dc5a5a;box-shadow:0 0 0 4px #fce8e8; }
.incident-settings { min-height:34px;padding:7px 10px;border:1px solid #e7e9ed;border-radius:8px;background:rgba(255,255,255,.72);color:#59616d;font-size:11px; }
.incident-settings:hover { background:#fff;color:#20242c; }
.incident-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px; }
.priority-incident-card { min-width:0;min-height:245px;display:grid;grid-template-rows:auto auto 1fr auto;gap:16px;padding:22px 24px;border:1px solid #e7e9ed;border-radius:16px;background:#fff;box-shadow:0 3px 12px rgba(32,36,44,.035); }
.priority-incident-top { display:flex;align-items:center;justify-content:space-between;gap:12px; }
.incident-severity { padding:5px 8px;border-radius:6px;font:600 10px "IBM Plex Mono",monospace;text-transform:uppercase; }
.incident-severity.high { background:#fef2f2;color:#b42318; }
.incident-severity.critical { background:#fee8e7;color:#b42318; }
.incident-risk { color:#b42318;font:600 12px "IBM Plex Mono",monospace; }
.priority-incident-source { display:grid;gap:3px; }
.priority-incident-source strong { color:#20242c;font-size:14px;font-weight:600; }
.priority-incident-source span { color:#747c8a;font-size:12px; }
.incident-quote { align-self:start;display:-webkit-box;margin:0;color:#3b424d;font-size:13px;line-height:1.6;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden; }
.incident-review { justify-self:start;padding:3px 0;border:0;background:transparent;color:#343b46;font-size:12px;font-weight:500;text-align:left; }
.incident-review:hover { color:#b42318; }
.incident-section-head .incident-settings { align-self:center; }

@media (max-width: 980px) {
  .theme-cluster-heading { flex-wrap:wrap; }
}

.mentions-table tr.incident-target td { background: rgba(221,241,234,.88); }
.mentions-table tr.incident-target td:first-child { box-shadow: inset 4px 0 var(--teal); }
.risk-score .risk-level { display:block;margin-top:5px;color:#87500f;font-size:12px;font-weight:600; }

.overview-card-primary {
  --sentiment-positive: #16a36f;
  --sentiment-negative: #dc5a5a;
  --sentiment-neutral: #a8afb8;
  min-height: 0;
  padding: 22px 24px;
  border: 1px solid #e7e9ed;
  background: #fff;
  box-shadow: 0 3px 12px rgba(32,36,44,.045);
  backdrop-filter: none;
  color: #20242c;
}
.overview-card-primary .card-head { margin-bottom: 0; }
.overview-card-primary .card-head h2 { margin-bottom: 5px; font-size: 18px; }
.overview-card-primary .card-head p { color: #747c8a; font-size: 12px; }
.sentiment-stack.compact {
  height: 20px;
  margin: 24px 0 0;
  gap: 0;
  border-radius: 10px;
  background: var(--sentiment-neutral, #a8afb8);
}
.sentiment-stack.compact i { flex: 0 0 auto; border-radius: 0; }
.sentiment-stack.compact .positive { background: var(--sentiment-positive, #16a36f); }
.sentiment-stack.compact .neutral { background: var(--sentiment-neutral, #a8afb8); }
.sentiment-legend { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:18px; }
.sentiment-metric { min-width:0;display:grid;grid-template-columns:8px minmax(0,1fr);align-items:center;gap:5px 8px; }
.sentiment-dot { width:8px;height:8px;border-radius:50%;background:var(--sentiment-positive,#16a36f); }
.sentiment-dot.negative { background:var(--sentiment-negative,#dc5a5a); }
.sentiment-dot.neutral { background:var(--sentiment-neutral,#a8afb8); }
.sentiment-name { overflow:hidden;color:#4d5360;font-size:12px;text-overflow:ellipsis;white-space:nowrap; }
.sentiment-values { grid-column:2;display:flex;align-items:baseline;justify-content:space-between;gap:8px;color:#747c8a;font:11px "IBM Plex Mono",monospace; }
.sentiment-values strong { color:#20242c;font-size:14px;font-weight:600; }

.source-volume-list { display:grid;gap:14px; }
.source-volume-row { display:grid;grid-template-columns:minmax(90px,1.2fr) minmax(70px,2fr) 54px;align-items:center;gap:12px; }
.source-volume-row strong { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500; }
.source-volume-row i { display:block;height:8px;overflow:hidden;border-radius:6px;background:rgba(27,30,39,.08); }
.source-volume-row i b { display:block;height:100%;border-radius:inherit;background:var(--teal); }
.source-volume-row span { text-align:right;font:500 12px "IBM Plex Mono",monospace; }
.source-overflow { padding-top:10px;border-top:1px solid var(--line); }
.source-overflow summary { width:fit-content;color:var(--teal-dark);font-size:12px;cursor:pointer; }
.source-overflow > .source-volume-row { margin-top:13px; }
.legend i.neutral-dot { background:rgba(107,113,128,.55); }

@media (max-width: 980px) {
  .app-main { width: min(calc(100% - 40px), 900px); }
  .overview-command-grid,
  .recommendation-columns.compact {
    grid-template-columns: 1fr;
  }

  .recommendation-columns.compact.priority-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .priority-grid .recommendation-row:last-child { grid-column: 1 / -1; }
  .theme-cluster-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }

}

@media (max-width: 720px) {
  .app-main { width: calc(100% - 28px); }
  .overview-hero { padding:22px; }
  .overview-hero h2 { font-size:24px; }
  .overview-hero-risk { min-width:0; }
  .recommendation-columns.compact.priority-grid,.theme-cluster-grid { grid-template-columns:1fr; }
  .priority-grid .recommendation-row:last-child { grid-column:auto; }
  .recommendation-columns.compact .recommendation-row { min-height:0;grid-template-rows:auto auto auto auto; }
  .incident-grid { grid-template-columns:1fr; }
  .priority-incident-card { min-height:220px;padding:20px;gap:14px; }
  .overview-split { grid-template-columns:1fr; }
}

@media (max-width: 480px) {
  .sentiment-legend { grid-template-columns:1fr;gap:11px; }
  .sentiment-metric { grid-template-columns:8px minmax(85px,1fr) minmax(0,1fr); }
  .sentiment-values { grid-column:3; }
}

/* Keep the existing Mentions table geometry; only update the sentiment pills. */
.mentions-table .sentiment-pill { padding: 6px 12px; border: 1px solid; border-radius: 999px; }
.mentions-table .sentiment-pill i { box-shadow: none; opacity: 1; }
.mentions-table .sentiment-pill.positive { color: #16a34a; border-color: #22c55e; background: #f0fdf4; }
.mentions-table .sentiment-pill.positive i { background: #16a34a; }
.mentions-table .sentiment-pill.negative { color: #dc2626; border-color: #ef4444; background: #fef2f2; }
.mentions-table .sentiment-pill.negative i { background: #dc2626; }
.mentions-table .sentiment-pill.neutral { color: #667085; border-color: #aeb7c4; background: #f8fafc; }
.mentions-table .sentiment-pill.neutral i { background: #667085; }
.mentions-table .rating-star { color: #c18a23; }
.mentions-table .risk-cell { vertical-align: middle; white-space: nowrap; }
.mentions-table .risk-zero { color: #737b89; font-weight: 500; }
.mentions-table .risk-bar { display: inline-grid; width: min(76px,100%) !important; max-width: 76px !important; grid-template-columns: minmax(18px,1fr) 2.5ch !important; gap: 5px !important; align-items: center; vertical-align: middle; }
.mentions-table .risk-bar span { height: 8px; overflow: hidden; border-radius: 999px; background: #dfe4e8; }
.mentions-table .risk-bar i { display: block; height: 100%; border-radius: inherit; background: currentColor; }
.mentions-table .risk-bar strong { color: currentColor; font-size: 11px; font-weight: 600; }
.mentions-table .risk-bar.low { color: #667085; }
.mentions-table .risk-bar.moderate, .mentions-table .risk-bar.elevated { color: #b7791f; }
.mentions-table .risk-bar.high, .mentions-table .risk-bar.critical { color: #c24141; }
.source-url-link { display: block; max-width: 100%; overflow: hidden; margin: 10px 0 14px; color: #276c60; font-size: 12px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.source-url-link:hover { color: #174a40; text-decoration: underline; }
.source-description { margin: -7px 0 10px; color: #737b89; font-size: 11px; line-height: 1.4; }

/* Keep analysis progress visible between polling updates and align sentiment counts. */
.analysis-progress { display:flex; flex-wrap:wrap; align-items:center; gap:8px 24px; padding:18px 24px; margin-bottom:22px; border-left:4px solid var(--teal); }
.analysis-progress span { color:var(--muted); font-size:14px; }
.sentiment-legend { grid-template-columns:1fr; gap:0; }
.sentiment-metric { grid-template-columns:8px minmax(90px,1fr) minmax(100px,1fr); padding:12px 0; border-bottom:1px solid #e7e9ed; }
.sentiment-metric:last-child { border-bottom:0; }
.sentiment-name { font-size:14px; }
.sentiment-values { grid-column:3; font-size:13px; gap:20px; }
.sentiment-values strong { min-width:3ch; text-align:right; font-size:16px; }
.priority-task-list{display:flex;flex-direction:column;gap:14px}.priority-task{background:rgba(255,255,255,.8);border:1px solid var(--line,#e3e7e5);border-radius:20px;scroll-margin-top:145px;overflow:hidden}
.priority-task-main{display:grid;grid-template-columns:38px minmax(0,1fr) 190px;gap:18px;padding:24px;align-items:start}.task-rank{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:#fff0d4;color:#996911;font-weight:700}
.task-copy h3{font-size:18px;line-height:1.4;margin:0 0 8px}.task-conclusion{font-size:15px;line-height:1.6;margin:0 0 10px}.task-numbers,.task-trend,.task-fallback,.task-owner small{font-size:12px;line-height:1.7;color:var(--muted,#74808a);margin:6px 0}.task-owner{display:flex;flex-direction:column;align-items:flex-end;text-align:right;gap:5px}.task-owner small{margin:0}
.task-badge{display:inline-block;padding:5px 10px;border-radius:999px;font-size:11px;font-weight:700;white-space:nowrap;background:#fff0d4;color:#996911}.urgent .task-badge,.urgent .task-rank{background:#fbe7e3;color:#b64737}.strength .task-badge,.strength .task-rank{background:#e3f3eb;color:#28734f}.insufficient .task-badge,.insufficient .task-rank{background:#edf0f2;color:#77818a}
.task-evidence{padding:0 24px 8px 80px}.task-evidence summary{font-size:13px;font-weight:600;cursor:pointer;padding:6px 0 14px}.task-quote{border-left:2px solid #d7e4dd;margin:12px 0 20px;padding-left:14px}.task-quote p{font-size:14px;line-height:1.65;margin:0 0 6px}.task-quote footer,.task-action small,.task-full-review small{font-size:12px;color:var(--muted,#74808a);line-height:1.7}.task-quote a{color:inherit;text-decoration:underline}.task-action{padding:16px;background:#f3f7f5;border-radius:12px;margin:16px 0}.task-action p{font-size:14px;line-height:1.6}.task-full-review{padding:16px 0;border-top:1px solid #e3e7e5}.task-full-review p{font-size:14px;line-height:1.7;white-space:pre-wrap}.task-full-review small{display:block}.task-generation{border-left:3px solid #449570;padding:14px;background:#f1f8f4;font-size:13px}
.task-theme{text-decoration:none;color:inherit}.task-theme-counts{display:block;font-size:12px;color:var(--muted,#74808a);line-height:1.8;margin:14px 0}.task-theme-bar{display:flex;overflow:hidden;height:7px;border-radius:6px;background:#edf0ef}.task-theme-bar b{display:block;height:100%;flex-shrink:0}.task-theme-bar .positive{background:#4d9c78}.task-theme-bar .negative{background:#c16b5e}.task-theme-bar .mixed{background:#c59b55}.task-theme-bar .neutral{background:#a8b1b7}
@media(max-width:650px){.priority-task-main{grid-template-columns:30px minmax(0,1fr);gap:12px;padding:18px}.task-owner{grid-column:2;align-items:flex-start;text-align:left}.task-evidence{padding-left:60px;padding-right:18px}.task-rank{width:28px;height:28px}.task-copy h3{font-size:16px}}
