:root {
  color-scheme: light;
  --ink: #17233d;
  --muted: #68738a;
  --line: #e4e9f2;
  --surface: #ffffff;
  --canvas: #f5f7fb;
  --navy: #14213d;
  --blue: #2667ff;
  --blue-soft: #eaf0ff;
  --green: #12805c;
  --green-soft: #e7f7f0;
  --amber: #a76a00;
  --amber-soft: #fff5dd;
  --red: #b73d48;
  --red-soft: #fff0f1;
  --shadow: 0 16px 44px rgba(20, 33, 61, 0.07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: radial-gradient(circle at top right, #edf3ff 0, transparent 33rem), var(--canvas);
}

button, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, textarea:focus-visible { outline: 3px solid rgba(38, 103, 255, 0.28); outline-offset: 2px; }

.app-shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 30px 0 44px; }
.topbar, .brand-lockup, .runtime-badges, .brief-actions, .footer-actions, .action-row { display: flex; align-items: center; }
.topbar { justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.brand-lockup { gap: 13px; }
.brand-mark { width: 38px; height: 38px; display: flex; gap: 4px; align-items: end; padding: 8px; border-radius: 12px; background: var(--navy); box-shadow: 0 8px 20px rgba(20, 33, 61, 0.18); }
.brand-mark span { display: block; width: 6px; border-radius: 4px; background: #70a0ff; }
.brand-mark span:nth-child(1) { height: 11px; }.brand-mark span:nth-child(2) { height: 17px; background: #b3c9ff; }.brand-mark span:nth-child(3) { height: 23px; background: white; }
.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .14em; line-height: 1.2; text-transform: uppercase; }
.eyebrow.accent { color: var(--blue); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(20px, 2vw, 26px); letter-spacing: -.035em; }
h2 { margin-bottom: 9px; font-size: clamp(19px, 2.5vw, 29px); letter-spacing: -.04em; line-height: 1.08; }
h3 { margin-bottom: 7px; font-size: 19px; letter-spacing: -.025em; }
.runtime-badges { gap: 8px; flex-wrap: wrap; justify-content: end; }
.badge, .mini-label { border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .08em; line-height: 1; }
.badge { padding: 9px 11px; }
.badge-offline { color: var(--green); background: var(--green-soft); }.badge-pending { color: var(--amber); background: var(--amber-soft); }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--green); vertical-align: 1px; }
.notice { display: flex; align-items: center; gap: 13px; margin-bottom: 30px; padding: 14px 16px; border: 1px solid #d9e4ff; border-radius: 14px; background: rgba(237, 243, 255, .82); color: var(--ink); }
.notice-icon { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; border-radius: 50%; color: white; background: var(--blue); font-weight: 900; }
.notice strong { display: block; margin-bottom: 3px; font-size: 13px; }.notice p { margin: 0; color: #52617e; font-size: 12px; }.notice-meta { margin-left: auto; color: var(--blue); font-size: 11px; font-weight: 800; white-space: nowrap; }
.intro-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: end; margin-bottom: 24px; }.intro-grid h2 { max-width: 620px; }.lede { max-width: 670px; margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.brief-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }.brief-card label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 800; }.brief-card textarea { display: block; width: 100%; resize: vertical; min-height: 76px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fbfcfe; font-size: 13px; line-height: 1.45; }.brief-card textarea::placeholder { color: #98a2b5; }.brief-actions { justify-content: space-between; gap: 10px; margin-top: 11px; }.field-hint { color: var(--muted); font-size: 10px; line-height: 1.4; }
.button { border: 0; border-radius: 9px; padding: 10px 13px; font-size: 12px; font-weight: 800; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }.button:hover { transform: translateY(-1px); }.button-primary { color: white; background: var(--blue); box-shadow: 0 7px 15px rgba(38, 103, 255, .18); }.button-secondary { color: var(--ink); background: #eef1f7; }.button:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.summary-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 12px; margin-bottom: 36px; }.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }.score-card { display: flex; align-items: center; gap: 22px; min-height: 156px; padding: 22px; }.score-ring { --score-angle: 266deg; display: grid; width: 104px; height: 104px; flex: 0 0 104px; place-items: center; border-radius: 50%; background: conic-gradient(var(--blue) var(--score-angle), #e9eef8 0); transform: rotate(-35deg); }.score-ring-inner { display: grid; width: 80px; height: 80px; place-content: center; border-radius: 50%; background: var(--surface); text-align: center; transform: rotate(35deg); }.score-ring-inner strong { font-size: 30px; letter-spacing: -.07em; line-height: 1; }.score-ring-inner span { margin-top: 3px; color: var(--muted); font-size: 10px; }.score-copy h2 { margin-bottom: 5px; font-size: 20px; }.score-copy p:last-child { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }.stat-card { display: flex; min-height: 156px; flex-direction: column; justify-content: center; padding: 19px; }.stat-label { color: var(--muted); font-size: 11px; font-weight: 800; }.stat-card strong { margin: 9px 0 3px; font-size: 36px; letter-spacing: -.07em; line-height: 1; }.stat-note { color: var(--muted); font-size: 10px; line-height: 1.35; }.stat-success strong { color: var(--green); }.stat-warning strong { color: var(--amber); }.stat-danger strong { color: var(--red); }
.section-heading, .panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }.section-heading { margin-bottom: 15px; }.section-heading h2, .panel-heading h2 { margin-bottom: 0; }.source-chip { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface); font-size: 11px; font-weight: 700; }
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 25px; }.kpi-card { display: flex; min-height: 355px; flex-direction: column; padding: 20px; }.kpi-card-header { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }.kpi-card-header h3 { max-width: 220px; margin-bottom: 0; }.status-pill { padding: 7px 8px; border-radius: 6px; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }.status-success { color: var(--green); background: var(--green-soft); }.status-warning { color: var(--amber); background: var(--amber-soft); }.status-danger { color: var(--red); background: var(--red-soft); }.kpi-definition { min-height: 42px; margin-bottom: 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }.kpi-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }.meta-cell { padding: 9px; border-radius: 8px; background: #f7f9fc; }.meta-cell span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }.meta-cell strong { display: block; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.confidence-row { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }.confidence-row > span { color: var(--muted); font-size: 10px; font-weight: 800; }.confidence-track { height: 7px; flex: 1; overflow: hidden; border-radius: 10px; background: #edf0f6; }.confidence-fill { height: 100%; border-radius: inherit; background: var(--blue); }.confidence-value { min-width: 32px; color: var(--ink) !important; text-align: right; }.evidence-title { margin: 0 0 7px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }.evidence-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }.evidence-list li { position: relative; padding-left: 14px; color: #53617a; font-size: 11px; line-height: 1.35; }.evidence-list li::before { position: absolute; top: 4px; left: 0; width: 6px; height: 6px; border-radius: 50%; background: #9db8ff; content: ""; }.blocker-list { margin: 9px 0 0; padding: 8px 9px 8px 25px; border-radius: 8px; color: var(--red); background: var(--red-soft); font-size: 10px; line-height: 1.35; }.kpi-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 17px; }.kpi-footer-note { color: var(--muted); font-size: 10px; }.review-button { padding: 7px 9px; color: var(--ink); border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 10px; font-weight: 800; }.review-button:hover { border-color: #aebfff; background: var(--blue-soft); }
.lower-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; margin-bottom: 28px; }.evidence-panel, .boundary-panel { padding: 20px; }.mini-label { padding: 7px 8px; color: var(--green); background: var(--green-soft); }.mini-label-pending { color: var(--amber); background: var(--amber-soft); }.signal-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 20px 0 16px; }.signal { padding: 11px; border-radius: 9px; background: #f7f9fc; }.signal span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }.signal strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.signal small { display: block; margin-top: 5px; color: var(--blue); font-size: 10px; font-weight: 800; }.warning-box { padding: 13px 15px; border: 1px solid #f3e1af; border-radius: 10px; color: #795915; background: #fffaf0; font-size: 11px; line-height: 1.45; }.warning-box strong { display: block; margin-bottom: 5px; }.warning-box ul { margin: 0; padding-left: 16px; }.boundary-list { margin: 20px 0 14px; }.boundary-list div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #edf0f5; }.boundary-list div:last-child { border-bottom: 0; }.boundary-list dt { color: var(--muted); font-size: 11px; }.boundary-list dd { margin: 0; color: var(--ink); font-size: 11px; font-weight: 800; text-align: right; }.value-success { color: var(--green) !important; }.value-pending { color: var(--amber) !important; }.boundary-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.footer-actions { justify-content: space-between; gap: 16px; padding-top: 22px; border-top: 1px solid var(--line); }.footer-note { margin: 0; color: var(--muted); font-size: 11px; }.action-row { gap: 9px; }.error-state { display: flex; gap: 8px; margin-top: 18px; padding: 13px; border: 1px solid #f3c4c7; border-radius: 10px; color: var(--red); background: var(--red-soft); font-size: 12px; }

@media (max-width: 980px) { .summary-grid { grid-template-columns: 2fr repeat(2, 1fr); }.score-card { grid-row: span 2; }.kpi-grid { grid-template-columns: 1fr; }.kpi-card { min-height: auto; }.lower-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .app-shell { width: min(100% - 24px, 620px); padding-top: 18px; }.topbar, .intro-grid, .footer-actions { align-items: stretch; flex-direction: column; }.runtime-badges { justify-content: start; }.notice { align-items: start; flex-wrap: wrap; }.notice-meta { width: 100%; margin-left: 39px; }.intro-grid { display: flex; gap: 18px; }.summary-grid { grid-template-columns: repeat(2, 1fr); }.score-card { grid-column: 1 / -1; grid-row: auto; }.score-ring { width: 88px; height: 88px; flex-basis: 88px; }.score-ring-inner { width: 68px; height: 68px; }.score-ring-inner strong { font-size: 25px; }.signal-list { grid-template-columns: 1fr; }.section-heading, .panel-heading { align-items: start; flex-direction: column; }.source-chip { align-self: stretch; }.footer-actions { gap: 14px; }.action-row { justify-content: stretch; }.action-row .button { flex: 1; } }

.role-analysis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 0 0 16px; }
.role-analysis > div { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; }
.role-analysis strong { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.role-analysis ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.role-analysis li { color: var(--ink); font-size: 10px; line-height: 1.35; }
.role-analysis li::before { display: inline-block; width: 5px; height: 5px; margin: 0 6px 1px 0; border-radius: 50%; background: var(--muted); content: ""; }
.role-analysis .analysis-positive::before { background: var(--green); }
.role-analysis .analysis-negative::before { background: var(--red); }
.role-analysis .analysis-warning::before { background: var(--amber); }
.role-analysis .analysis-muted { color: var(--muted); }
.analysis-confidence { margin-left: 5px; color: var(--blue); font-size: 9px; font-weight: 800; }

@media (max-width: 700px) { .role-analysis { grid-template-columns: 1fr; } }
