@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f3f5f8;
  --ink: #162c43;
  --muted: #5c6c7b;
  --line: #d9e1e9;
  --accent: #c5a04e;
  --dark: #0b1f35;
  --green: #003e73;
  --navy: #003e73;
  --surface: #fff;
  --soft-blue: #eaf0f7;
  --gold-wash: #faf5e9;
  --danger: #a2222b;
  --success: #285e4a;
  --shadow: 0 2px 8px #0b1f3505;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 'Public Sans', Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
button, a, input, select, textarea { outline-offset: 4px; }
:focus-visible { outline: 3px solid #b88925; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
aside { position: fixed; inset: 0 auto 0 0; width: 250px; height: 100dvh; overflow-y: auto; background: var(--dark); color: #c9d5e1; padding: 31px 21px 22px; display: flex; flex-direction: column; border-top: 5px solid var(--accent); }
.brand { text-decoration: none; display: flex; align-items: center; gap: 12px; color: white; }
.brand strong { font-weight: 800; font-size: 22px; letter-spacing: 2px; }
.brand strong span { display: block; font-size: 8px; letter-spacing: 1.15px; margin-top: 5px; color: #b6c8d8; }
.mark { color: var(--accent); font-size: 43px; font-weight: 700; line-height: 1; }
.nav-label { font-size: 10px; font-weight: 600; letter-spacing: 1.8px; color: #9aafc2; margin: 37px 13px 12px; }
nav { margin-bottom: 22px; }
nav a { display: flex; align-items: center; gap: 12px; padding: 11px 13px; text-decoration: none; border-radius: 4px; margin: 4px 0; font-size: 18px; border-left: 3px solid transparent; transition: background .15s ease; }
nav a span { font-size: 12px; }
nav a.active { background: #183b5d; border-left-color: var(--accent); color: white; }
nav a.active > span { font-weight: 700; }
nav a:hover { background: #17344f; color: white; }
.side-bottom { margin-top: auto; padding: 21px 12px 0; font-size: 12px; border-top: 1px solid #31465d; }
.live-dot { display: inline-block; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; margin-right: 7px; }
.side-bottom p { font-size: 10px; color: #aabccd; line-height: 1.8; margin-bottom: 0; }
.shell { margin-left: 250px; }
header { min-height: 78px; border-bottom: 1px solid var(--line); padding: 15px 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: white; font-size: 12px; }
.crumb { font-size: 9px; font-weight: 700; letter-spacing: 1.3px; color: var(--muted); }
.divider { margin: 0 15px; color: #9eaab6; }
#crumb { font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 16px; }
#refresh { font-size: 11px; padding: 8px 11px; white-space: nowrap; }
.pill { font-size: 8px; font-weight: 700; letter-spacing: .8px; border: 1px solid #b6c7d9; padding: 6px 9px; border-radius: 3px; color: var(--navy); white-space: nowrap; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; background: var(--soft-blue); border-radius: 50%; font-size: 10px; font-weight: 700; }
main { max-width: 1640px; margin: auto; padding: 38px 40px 22px; }
.page-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; gap: 24px; }
.eyebrow { font-size: 9px; letter-spacing: 1.6px; color: var(--navy); font-weight: 800; }
h1 { font: 700 35px/1.18 'Public Sans', Arial, sans-serif; margin: 14px 0; letter-spacing: -1.3px; }
h1 span { color: #62758a; }
h2, h3, h4 { line-height: 1.4; }
.page-top p { color: var(--muted); font-size: 13px; max-width: 650px; line-height: 1.75; margin-bottom: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
button { border: 0; border-radius: 4px; padding: 11px 15px; font-size: 12px; line-height: 1.4; font-weight: 600; }
.primary { background: var(--navy); color: white; border: 1px solid var(--navy); }
.primary:hover { background: #082d51; border-color: #082d51; }
.secondary { background: white; border: 1px solid #c4d0dd; color: var(--navy); }
.secondary:hover { background: #edf2f7; border-color: #9bb1c6; }
.danger { background: white; border: 1px solid #dcbcc0; color: var(--danger); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 26px; }
.stat, .panel, .company-card, .alert-card { background: white; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.stat { padding: 20px 22px; border-top: 3px solid #afc0d2; }
.stat:first-child { border-top-color: var(--accent); }
.stat-top { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.stat-icon { color: var(--navy); }
.stat strong { display: block; font-size: 31px; font-weight: 700; line-height: 1.25; margin: 9px 0; }
.stat p { font-size: 10px; margin: 0; color: var(--muted); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, 1fr); gap: 22px; }
.panel { min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 23px; border-bottom: 1px solid var(--line); gap: 15px; }
.panel-head h2 { font-size: 15px; font-weight: 700; margin: 0; }
.text-button { padding: 0; background: none; color: var(--navy); font-size: 11px; }
.signal { padding: 22px 23px; border-bottom: 1px solid #e7ecf2; }
.signal:last-child { border: 0; }
.signal-meta { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 10px; flex-wrap: wrap; }
.tag { display: inline-block; padding: 4px 7px; background: var(--soft-blue); color: #234e76; border-radius: 3px; font-size: 9px; font-weight: 700; line-height: 1.5; }
.tag.high, .tag.important, .tag.warning { background: #fbf1d7; color: #735319; }
.tag.critical, .tag.error { background: #fae9ec; color: #8f2430; }
.tag.success { background: #e6f0ea; color: #28563d; }
.signal h3 { font-size: 14px; font-weight: 700; line-height: 1.55; margin: 11px 0 7px; }
.signal p { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 7px 0; }
.signal-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; gap: 15px; flex-wrap: wrap; }
.source-link { font-size: 11px; color: var(--navy); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.source-link:hover { text-decoration: underline; }
.save { background: none; padding: 4px; color: var(--muted); font-size: 11px; }
.save.selected { color: var(--navy); }
.mini-company { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid #e7ecf2; }
.company-initial { width: 35px; height: 35px; border-radius: 4px; display: grid; place-items: center; background: var(--soft-blue); color: var(--navy); font-size: 12px; font-weight: 800; flex-shrink: 0; }
.mini-company strong { font-size: 12px; }
.mini-company p { font-size: 10px; color: var(--muted); margin: 4px 0; }
.mini-company button { margin-left: auto; padding: 5px; background: none; color: var(--navy); }
.focus-panel { margin-top: 21px; background: #e9eff6; border: 1px solid #cedbe9; border-left: 3px solid var(--accent); padding: 23px; border-radius: 4px; }
.focus-panel h3 { font-size: 17px; font-weight: 700; line-height: 1.5; margin: 11px 0; }
.focus-panel p { font-size: 12px; line-height: 1.8; color: #4b6278; }
.focus-panel a { font-size: 11px; }
.notice { font-size: 11px; color: var(--muted); line-height: 1.8; padding: 13px 0 20px; }
.toolbar, .report-toolbar, .alert-controls { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.toolbar input { flex: 1; min-width: 180px; }
input, select, textarea { border: 1px solid #bccbd9; border-radius: 4px; background: white; color: var(--ink); padding: 10px 12px; max-width: 100%; min-width: 0; }
input::placeholder, textarea::placeholder { color: #63768a; }
input[type=checkbox], input[type=radio] { accent-color: var(--navy); width: 16px; height: 16px; flex-shrink: 0; }
textarea { resize: vertical; line-height: 1.65; }
.companies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.company-card { padding: 23px; }
.company-card h2 { font-size: 19px; font-weight: 700; }
.company-card p { font-size: 12px; line-height: 1.8; color: var(--muted); }
.company-card .tags { display: flex; gap: 5px; flex-wrap: wrap; margin: 15px 0; }
.company-card .primary { width: 100%; margin-top: 17px; }
.company-card .source-link { display: block; }
.table-wrap, .import-preview { overflow: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { text-align: left; padding: 17px 18px; border-bottom: 1px solid var(--line); min-width: 130px; vertical-align: top; line-height: 1.65; }
th { background: #edf2f7; color: #3d5873; font-size: 10px; font-weight: 700; letter-spacing: .4px; }
td a { text-decoration: none; color: var(--navy); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fafc; }
.research-row { padding: 22px; display: flex; flex-direction: row; gap: 16px; border-bottom: 1px solid var(--line); align-items: start; margin: 0; }
.research-row input { margin-top: 5px; }
.research-row h3 { font-size: 14px; margin: 7px 0; }
.research-row p { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 0; }
.research-row.done h3 { text-decoration: line-through; color: var(--muted); }
.source-card { padding: 23px; border-bottom: 1px solid var(--line); }
.source-card p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.storage-box { margin-top: 22px; padding: 24px; }
.storage-box h2 { font-size: 18px; }
.storage-box p { font-size: 12px; color: var(--muted); line-height: 1.8; }
.empty { padding: 42px 25px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.8; }
footer { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: .6px; color: #586d82; padding: 30px 0 0; gap: 15px; }
#sync-status { text-align: right; letter-spacing: 0; max-width: 60%; }
dialog { border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 6px; padding: 28px; width: 660px; max-width: calc(100vw - 30px); max-height: 90dvh; color: var(--ink); box-shadow: 0 20px 90px #061a3850; }
dialog::backdrop { background: #061a38a8; }
label { display: flex; flex-direction: column; gap: 7px; margin: 15px 0; font-size: 12px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.dialog-title { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.dialog-title h2 { font-size: 22px; font-weight: 700; margin: 0; }
.close { background: none; font-size: 18px; padding: 7px; color: var(--ink); }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.dialog-actions .close { font-size: 12px; }
.muted, .small { color: var(--muted); line-height: 1.8; }
.small { font-size: 10px; }
#toast { display: none; position: fixed; bottom: 25px; right: 25px; max-width: min(480px, calc(100vw - 40px)); background: var(--dark); color: white; padding: 15px 23px; border-left: 4px solid var(--accent); border-radius: 4px; box-shadow: 0 8px 32px #0b1f3533; z-index: 20; font-size: 12px; line-height: 1.7; }
.detail-section { padding: 15px 0; border-bottom: 1px solid var(--line); }
.detail-section h3 { font-size: 11px; color: var(--navy); letter-spacing: .8px; }
.detail-section p { font-size: 13px; line-height: 1.8; }
.brief-actions { padding: 20px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Alert monitoring */
.alert-list { display: grid; gap: 14px; }
.alert-card { padding: 20px 23px; border-left: 4px solid var(--accent); }
.alert-card.read { border-left-color: #bdcbd9; }
.alert-card h3 { margin: 9px 0; font-size: 15px; }
.alert-card p { font-size: 12px; line-height: 1.8; color: var(--muted); }
.alert-card .actions { margin-top: 15px; }
.alert-controls label { margin: 0; flex-direction: row; align-items: center; gap: 8px; }
.alert-settings, .settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.alert-settings label { margin: 0; }
.status-banner, .sync-banner { padding: 14px 18px; background: var(--soft-blue); color: #284c70; border: 1px solid #c8d8e8; border-radius: 4px; margin: 0 0 20px; font-size: 12px; line-height: 1.8; }
.status-banner.warning, .sync-banner.warning { background: var(--gold-wash); color: #735319; border-color: #dfcc9f; }
.status-banner.error { background: #fbebed; color: #8f2430; border-color: #e4b9c0; }

/* Data management */
.data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.data-grid > .panel { padding: 23px; }
.data-grid h2 { font-size: 17px; margin-top: 0; }
.data-grid p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.upload-zone, .drop-zone { border: 1px dashed #90aac3; background: #f7f9fc; border-radius: 5px; padding: 26px 20px; margin: 16px 0; text-align: center; }
.upload-zone input, .drop-zone input { width: 100%; margin-top: 12px; font-size: 11px; }
.upload-zone:focus-within { border-color: var(--navy); background: #edf3f9; }
.import-preview { border: 1px solid var(--line); border-radius: 4px; margin-top: 18px; max-height: 420px; }
.import-preview th { position: sticky; top: 0; }
.import-summary { display: flex; gap: 14px; flex-wrap: wrap; margin: 16px 0; padding: 14px 16px; background: var(--soft-blue); font-size: 12px; border-radius: 4px; }
.data-table td, .import-preview td { font-size: 11px; overflow-wrap: anywhere; min-width: 120px; max-width: 380px; }
.field-hint, .form-help { color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.8; }
.code-sample, pre { overflow: auto; background: #eef2f7; color: #234567; border: 1px solid var(--line); border-radius: 4px; padding: 15px; font: 11px/1.8 Consolas, monospace; }
.inline-checkbox, .checkbox-label { display: flex; flex-direction: row; align-items: center; gap: 9px; font-weight: 400; }
.full-width { grid-column: 1 / -1; }

/* Reports, briefings and operational-view graphics */
.report-grid { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.5fr); gap: 22px; align-items: start; }
.report-composer { padding: 24px; }
.report-composer h2 { font-size: 17px; margin: 0 0 15px; }
.report-composer label { font-size: 11px; }
.report-composer input, .report-composer select, .report-composer textarea { width: 100%; }
.report-composer .actions { margin-top: 22px; }
.report-preview { background: white; border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: 5px; padding: 27px; min-width: 0; overflow: hidden; box-shadow: var(--shadow); }
.report-preview h2 { font-size: 22px; margin: 9px 0; }
.report-preview h3 { color: var(--navy); font-size: 15px; margin-top: 24px; }
.report-preview p, .report-preview li { font-size: 12px; color: #445b70; line-height: 1.85; }
.report-preview .report-kicker { color: #735319; font-size: 9px; font-weight: 800; letter-spacing: 1.2px; }
.report-preview .report-meta { color: var(--muted); font-size: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.ov1-preview { background: #f7f9fc; border: 1px solid #cbd8e5; border-radius: 4px; overflow: auto; padding: 14px; margin: 18px 0; }
.ov1-preview svg, .report-preview svg { display: block; width: 100%; height: auto; min-width: 480px; }
.report-evidence { padding: 15px 0; border-bottom: 1px solid var(--line); }
.report-evidence:last-child { border-bottom: 0; }
.report-evidence h4 { font-size: 13px; margin: 6px 0; }
.report-evidence .source-link { display: block; font-size: 10px; margin-top: 8px; }
.report-toolbar { padding: 14px 0 0; margin-bottom: 0; }
.metric-row { display: flex; flex-wrap: wrap; gap: 14px; }
.metric-row > div { flex: 1; min-width: 130px; padding: 17px; border: 1px solid var(--line); border-radius: 4px; }
.badge { display: inline-block; padding: 3px 7px; font-size: 10px; font-weight: 700; color: var(--navy); background: var(--soft-blue); border-radius: 3px; }
.subtle-divider { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

@media (min-width: 1500px) {
  h1 { font-size: 42px; }
  .page-top { margin-bottom: 36px; }
}
@media (max-width: 1200px) {
  .report-grid { grid-template-columns: 1fr; }
  .actions { flex-shrink: 1; }
  .header-right { gap: 10px; }
}
@media (max-width: 1100px) {
  aside { width: 218px; padding: 27px 15px 20px; }
  .shell { margin-left: 218px; }
  main { padding: 30px 25px; }
  header { padding: 15px 25px; }
  .page-top { align-items: start; flex-direction: column; }
  .companies { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .stats { gap: 12px; }
  .stat { padding: 17px; }
  .stat-top { font-size: 9px; }
  .header-right .pill { display: none; }
}
@media (max-width: 800px) {
  header { align-items: flex-start; }
  .header-right .avatar { display: none; }
  .data-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alert-settings, .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  aside { position: static; width: auto; height: auto; padding: 17px 18px 9px; overflow: visible; }
  .brand strong { font-size: 18px; }
  .mark { font-size: 36px; }
  .brand strong span { font-size: 7px; }
  .nav-label, .side-bottom { display: none; }
  nav { display: flex; overflow-x: auto; margin: 15px -4px 0; padding-bottom: 5px; gap: 4px; }
  nav a { flex-shrink: 0; padding: 8px 9px; gap: 7px; margin: 0; border-left: 0; border-bottom: 2px solid transparent; border-radius: 3px; }
  nav a.active { border-left: 0; border-bottom-color: var(--accent); }
  nav a span { font-size: 11px; }
  .shell { margin: 0; }
  header { min-height: 58px; padding: 13px 18px; align-items: center; gap: 10px; }
  .crumb { font-size: 8px; }
  .divider { margin: 0 8px; }
  #crumb { font-size: 11px; }
  #refresh { font-size: 10px; padding: 7px 9px; }
  main { padding: 26px 18px 20px; }
  h1 { font-size: 30px; letter-spacing: -.9px; }
  .page-top { margin-bottom: 24px; }
  .page-top p { font-size: 12px; }
  .companies { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  footer { flex-direction: column; font-size: 8px; gap: 8px; }
  #sync-status { text-align: left; max-width: none; }
  .actions button { font-size: 11px; }
  .panel-head, .signal, .company-card, .source-card { padding: 19px; }
  .panel-head h2 { font-size: 14px; }
  .report-preview, .report-composer { padding: 20px; }
  dialog { padding: 22px; }
  #toast { right: 18px; bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  aside, header, .actions, .toolbar, .save, .brief-actions, footer, .report-composer, .report-toolbar, #toast { display: none !important; }
  body { background: white; color: #111; }
  .shell { margin: 0; }
  main { padding: 0; }
  .overview-grid, .report-grid { display: block; }
  .panel, .report-preview, .company-card { box-shadow: none; break-inside: avoid; }
  .page-top h1 { font-size: 25px; }
  .report-preview { border: 0; padding: 0; }
  .ov1-preview svg, .report-preview svg { min-width: 0; }
  a { color: #003e73; }
}


/* Evidence events and decision workflow */
.event-list{display:grid;gap:18px}.event-card{padding:24px}.event-card h2{font-size:20px;line-height:1.4;margin:12px 0}.event-card details{margin-top:16px;border-top:1px solid #d6e0e8;padding-top:12px}.event-source{padding:14px 0;border-bottom:1px solid #e0e6ed}.priority-settings{margin:18px 0;padding:22px}.priority-settings summary,.panel>summary{font-weight:700;cursor:pointer}.priority-settings form{margin-top:20px}.priority-settings select[multiple],.decision-composer select[multiple]{min-height:120px}.finding-card{border-top:1px solid #d6e0e8;padding:20px 0}.finding-card h3{font-size:17px;line-height:1.45}.decision-composer{margin-top:24px}.section-head{display:flex;justify-content:space-between;align-items:center;gap:20px}.filters{display:flex;gap:20px;margin:20px 0;align-items:end}.filters label{flex:1}.panel>label{max-width:400px}.panel table td{vertical-align:top}.panel table td p{margin:8px 0}.panel details p{overflow-wrap:anywhere}@media(max-width:760px){.filters,.section-head{display:block}.event-card{padding:18px}.priority-settings{padding:18px}}
