:root {
  --ink: #14232f;
  --muted: #667783;
  --line: #dfe7e9;
  --line-strong: #c8d5d8;
  --surface: #ffffff;
  --canvas: #f3f7f6;
  --teal: #087a78;
  --teal-dark: #055e5d;
  --teal-pale: #e7f4f2;
  --blue: #4577b7;
  --violet: #7b66ae;
  --amber: #d99614;
  --danger: #b44747;
  --shadow: 0 14px 35px rgba(27, 58, 63, .09);
  --radius: 13px;
}

* { box-sizing: border-box; }

html { width: 100%; height: 100%; min-width: 1180px; overflow: clip; background: var(--canvas); }

body {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: clip;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

button, input, select { font: inherit; }
button, select, input[type="range"] { cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible, .report-content:focus-visible {
  outline: 3px solid rgba(8, 122, 120, .24);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.app-shell { position: fixed; inset: 0; width: 100vw; height: 100vh; overflow: clip; }

.topbar {
  height: 66px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.case-tools { display: flex; gap: 10px; }
.compact-field { display: flex; align-items: center; gap: 7px; }
.compact-field > span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.compact-field select {
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 31px 0 10px;
  max-width: 190px;
}
.case-picker-field select { width: 170px; }

.header-status { justify-self: end; display: flex; align-items: center; gap: 15px; }
.progress-copy { width: 160px; }
.progress-copy strong { font-size: 12px; display: block; margin-bottom: 6px; text-align: right; white-space: nowrap; }
.progress-track { display: block; height: 5px; border-radius: 5px; background: #e4ecec; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--teal); transition: width .25s; }
.reviewer-chip { display: flex; align-items: center; gap: 9px; border: 0; border-left: 1px solid var(--line); padding: 0 0 0 15px; background: none; color: var(--ink); text-align: left; }
.reviewer-chip small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.reviewer-chip strong { display: block; max-width: 125px; overflow: hidden; text-overflow: ellipsis; }
.account-actions { display: flex; gap: 5px; align-items: center; }
.header-action { min-height: 32px; white-space: nowrap; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); padding: 6px 10px; font-size: 13px; line-height: 1; font-weight: 700; cursor: pointer; }
.header-action:hover { border-color: var(--teal); color: var(--teal); }
.header-action.danger:hover { border-color: #b33; color: #b33; }
.account-actions a { text-decoration: none; }
.client-identity { min-width: 90px; padding-left: 8px; border-left: 1px solid var(--line); }
.client-identity small { display:block; color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.08em; }
.client-identity strong { display:block; max-width:140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #fff; font-size: 12px; font-weight: 800; }

main {
  width: 100%;
  height: calc(100vh - 110px);
  padding: 10px 14px;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: clip;
}
.eyebrow { color: var(--teal); text-transform: uppercase; letter-spacing: .11em; font-size: 10px; font-weight: 800; }
.patient-facts { margin: 0; display: flex; align-items: stretch; justify-content: center; min-width: 0; }
.patient-facts > div { padding: 0 12px; min-width: 75px; border-left: 1px solid var(--line); }
.patient-facts dt { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 9px; font-weight: 800; }
.patient-facts dd { margin: 2px 0 0; max-width: 130px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 700; white-space: nowrap; }
.save-indicator { justify-self: end; max-width: 155px; color: var(--muted); font-size: 10px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #8ca19f; }
.save-indicator[data-state="saving"] .status-dot { background: var(--amber); animation: pulse 1s infinite; }
.save-indicator[data-state="saved"] .status-dot { background: var(--teal); }
.save-indicator[data-state="error"] { color: var(--danger); }
.save-indicator[data-state="error"] .status-dot { background: var(--danger); }

.data-warning { flex: 0 0 auto; margin: 0 3px 8px; padding: 6px 11px; border: 1px solid #ead8ae; border-radius: 8px; background: #fff9e9; color: #705719; font-size: 11px; }

.review-grid {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, .88fr) minmax(430px, 1.22fr) minmax(360px, 1fr);
  gap: 14px;
  align-items: stretch;
  overflow: clip;
}

.workspace-panel { width: 100%; height: 100%; min-width: 0; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 9px rgba(25, 57, 62, .03); overflow: hidden; }
.section-heading { height: 54px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.section-heading > div { display: flex; align-items: baseline; gap: 9px; }
.section-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 500; }
.section-number { color: var(--teal); font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.section-hint { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.image-tools { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; font-weight: 700; white-space: nowrap; }
.image-tools label { display: flex; align-items: center; gap: 4px; }
.image-tools select { height: 25px; padding: 1px 20px 1px 6px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; color: var(--ink); font-size: 9px; }
.sync-control input { width: 13px; height: 13px; margin: 0; accent-color: var(--teal); }

.image-column { display: flex; flex-direction: column; }
.phase-stack { flex: 1 1 auto; height: auto; min-height: 0; padding: 10px; display: grid; grid-auto-rows: 1fr; gap: 10px; }
.mouse-guide { flex: 0 0 auto; border-bottom: 1px solid var(--line); background: #f8fbfa; color: var(--ink); }
.mouse-guide summary { min-height: 27px; padding: 5px 11px; display: flex; align-items: center; gap: 6px; color: var(--teal-dark); font-size: 9px; font-weight: 800; cursor: pointer; list-style: none; user-select: none; }
.mouse-guide summary::-webkit-details-marker { display: none; }
.mouse-guide summary::after { content: "Show"; margin-left: auto; color: var(--muted); font-size: 8px; font-weight: 700; }
.mouse-guide[open] summary::after { content: "Hide"; }
.mouse-guide-icon { width: 15px; height: 15px; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; background: var(--teal); font-size: 9px; font-weight: 900; }
.mouse-guide-content { padding: 0 11px 8px 32px; color: #4f626c; font-size: 9px; line-height: 1.3; }
.mouse-guide-content p { margin: 0 0 3px; font-weight: 700; }
.mouse-guide-content ul { margin: 0; padding-left: 14px; }
.mouse-guide-content li + li { margin-top: 2px; }
.phase-card { min-height: 0; border-radius: 9px; overflow: hidden; border: 1px solid #1e333b; background: #06131a; display: flex; flex-direction: column; }
.phase-card header { height: 25px; padding: 0 8px; display: flex; align-items: center; justify-content: space-between; background: #112630; border-bottom: 1px solid #263f48; color: #edf6f5; }
.phase-card header h3 { margin: 0; font-size: 10px; font-weight: 700; }
.slice-value { color: #9fb3b8; font-variant-numeric: tabular-nums; font-size: 8px; }
.image-stage { min-height: 0; flex: 1; display: grid; place-items: center; position: relative; overflow: hidden; touch-action: none; user-select: none; }
.image-stage img { width: 100%; height: 100%; object-fit: contain; min-height: 0; cursor: ns-resize; transform-origin: center; will-change: transform, filter; -webkit-user-drag: none; user-select: none; }
.image-stage .image-loading { position: absolute; color: #a9bbc0; font-size: 11px; }
.slice-control { min-height: 28px; padding: 4px 9px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; border-top: 1px solid #263f48; background: #112630; color: #b8c8cc; font-size: 9px; font-weight: 700; }
.slice-control input { width: 100%; min-width: 0; accent-color: #35bbb6; }
.no-phase { border: 1px dashed var(--line-strong); border-radius: 9px; color: var(--muted); display: grid; place-items: center; text-align: center; padding: 25px; }

.report-case-info { height: 28px; padding: 4px 10px; display:flex; align-items:center; gap:14px; overflow:hidden; border-bottom:1px solid var(--line); background:#f8fbfa; color:var(--ink); font-size:10px; white-space:nowrap; }
.report-case-info span { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.report-stack { height: calc(100% - 82px); min-height: 0; padding: 7px; display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 6px; }
.report-card { min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; background: #fff; }
.report-card.active-evaluation { border-color: rgba(8, 122, 120, .68); box-shadow: inset 3px 0 0 var(--teal); }
.report-card header { height: 39px; padding: 0 10px 0 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #fafcfc; }
.report-card header > div { display: flex; align-items: center; gap: 7px; }
.report-card header .report-actions { display: flex; align-items: center; gap: 8px; }
.report-card h3 { margin: 0; font-size: 12px; }
.source-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.chatgpt-report .source-dot { background: var(--blue); }
.gemma-report .source-dot { background: var(--violet); }
.reference-badge { padding: 2px 6px; border-radius: 8px; background: var(--teal-pale); color: var(--teal-dark); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.font-control { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.font-control span:first-child { font-size: 9px; }
.font-control span:last-child { font-size: 13px; font-weight: 700; }
.font-control input { width: 62px; height: 3px; accent-color: var(--teal); }
.report-content { flex: 1; min-height: 0; margin: 0; padding: 10px 14px 12px; overflow: auto; white-space: pre-wrap; word-break: normal; font-family: Georgia, "Times New Roman", serif; font-size: 14px; line-height: 1.3; color: #000000; scrollbar-color: #a9bbbb #edf2f2; user-select: text; -webkit-user-select: text; }
.report-content::selection { color: #7a1712; background: #ffc9c5; }
.wrong-highlight { padding: 0 1px; color: #ff0000; color: var(--question-highlight, #ff0000); background: transparent; text-decoration: underline; text-decoration-color: var(--question-highlight, #ff0000); text-decoration-thickness: 2px; text-underline-offset: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; cursor: pointer; }
.wrong-highlight::before { content: attr(data-question-label); margin-right: 2px; padding: 0 2px; border-radius: 2px; color: #fff; background: var(--question-highlight, #ff0000); font: 700 8px/1.2 Inter, sans-serif; text-decoration: none; }
.wrong-highlight.selected-highlight { background: #fff0ef; outline: 1px solid color-mix(in srgb, var(--question-highlight, #ff0000) 45%, transparent); }
.report-section-title { color: #000000; font-family: inherit; font-weight: 800; letter-spacing: .015em; }
.remove-highlight { height: 24px; padding: 0 7px; border: 1px solid #e0aaa6; border-radius: 5px; color: #a51d16; background: #fff5f4; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.remove-highlight:disabled { visibility: hidden; }
.report-content.unavailable { display: grid; place-items: center; color: var(--muted); font-family: inherit; font-size: 12px !important; font-style: italic; }

.evaluation-column { display: flex; flex-direction: column; }
.evaluation-column .section-heading { height:44px; padding:0 11px; }
.evaluation-heading { height: 44px; }
.evaluation-heading h2 { font-size: 16px; }
.completion-badge { min-width: 42px; padding: 3px 7px; text-align: center; border-radius: 11px; background: #eef3f3; color: var(--muted); font-size: 9px; font-weight: 800; }
.completion-badge.complete { color: #fff; background: var(--teal); }
.model-tabs { height: 32px; margin: 4px 7px 0; padding: 2px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: #edf2f2; border-radius: 7px; }
.model-tabs button { min-height:28px; padding:3px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 800; }
.model-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(32, 58, 62, .12); }
.tab-check { display: none; color: var(--teal); margin-left: 4px; }
.model-tabs button.complete .tab-check { display: inline; }
.evaluation-form { flex: 1 1 auto; height: auto; min-height: 0; padding: 2px 7px 5px; overflow-y: auto; overflow-anchor: none; overscroll-behavior: contain; scrollbar-color: #a9bbbb #edf2f2; }
.question-card { padding: 6px 1px 7px; border-bottom: 1px solid var(--line); }
.question-card:last-child { border-bottom: 0; }
.question-card.missing-question-focus { margin: 2px -7px; padding-left: 8px; padding-right: 8px; border-radius: 7px; background: #fff3f1; box-shadow: inset 3px 0 0 #c93028; }
.question-label { display: flex; align-items: flex-start; gap: 5px; margin-bottom: 3px; }
.question-label .q-number { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-pale); color: var(--teal-dark); font-size: 8px; font-weight: 900; }
.question-label label { flex: 1 1 auto; min-width: 0; font-size: 11px; font-weight: 700; line-height: 1.18; }
.metric-help { position: relative; flex: 0 0 auto; width: 17px; height: 17px; padding: 0; display: inline-grid; place-items: center; border: 1px solid #8aa4a7; border-radius: 50%; color: var(--teal-dark); background: #fff; font-size: 9px; font-weight: 900; line-height: 1; cursor: pointer; }
.metric-help:hover, .metric-help.open { border-color: var(--teal); color: #fff; background: var(--teal); }
.metric-help-popup { position: absolute; z-index: 40; right: -6px; top: 22px; width: min(285px, calc(100vw - 40px)); padding: 10px 12px; display: none; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink); background: #fff; box-shadow: 0 8px 24px rgba(15,38,44,.2); font-size: 9px; font-weight: 500; line-height: 1.35; text-align: left; }
.metric-help.open .metric-help-popup { display: grid; gap: 4px; }
.metric-help-popup strong { color: var(--teal-dark); font-size: 10px; }
.rating-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.rating-option, .segment-option { position: relative; }
.rating-option input, .segment-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.rating-option span { min-height: 32px; padding: 3px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); font-size: 11px; line-height: 1.1; text-align: center; transition: .15s; }
.rating-option b { color: #c5cecf; font-size: 11px; letter-spacing: -1px; line-height: 11px; }
.rating-option input:checked + span { border-color: var(--teal); background: var(--teal-pale); color: var(--teal-dark); font-weight: 800; }
.rating-option input:checked + span b { color: var(--amber); }
.segment-group { display: flex; flex-wrap: wrap; gap: 3px; }
.segment-option { flex: 1 1 75px; }
.segment-option span { min-height: 32px; padding: 4px 7px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); font-size: 11px; text-align: center; }
.segment-option input:checked + span { border-color: var(--teal); background: var(--teal-pale); color: var(--teal-dark); font-weight: 800; }
.question-card select { width: 100%; min-height: 32px; padding: 4px 28px 4px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); font-size: 11px; }
.multi-picker { display: grid; gap: 5px; }
.answer-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.answer-tags > span { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 5px 3px 7px; border-radius: 10px; color: var(--teal-dark); background: var(--teal-pale); font-size: 9px; font-weight: 700; }
.answer-tags button { width: 14px; height: 14px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; background: var(--teal); font-size: 11px; line-height: 1; }
.incorrect-answer-comment { margin-top: 5px; }
.incorrect-answer-comment label { display: block; margin-bottom: 3px; color: #a51d16; font-size: 9px; font-weight: 800; }
.incorrect-answer-comment textarea { width: 100%; min-height: 42px; resize: vertical; padding: 5px 7px; border: 1px solid #d7a09c; border-radius: 6px; color: var(--ink); font: 10px/1.3 inherit; }
.incorrect-answer-comment.comment-complete label { color: var(--teal-dark); }
.incorrect-answer-comment.comment-complete textarea { border-color: var(--teal); background: #f7fcfb; }
.incorrect-answer-comment.needs-comment textarea:focus { outline-color: rgba(180, 71, 71, .22); }

.navigation-bar { height: 44px; padding: 0 10px; position: fixed; z-index: 19; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
.nav-button { min-width: 94px; height: 34px; border-radius: 7px; padding: 6px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 750; font-size: 13px; }
.nav-button.secondary { color: var(--ink); border: 1px solid var(--line-strong); background: #fff; }
.nav-button.primary { color: #fff; border: 1px solid var(--teal); background: var(--teal); }
.nav-button:hover:not(:disabled) { transform: translateY(-1px); }
.nav-button:disabled { opacity: .4; cursor: not-allowed; }
.case-dots { display: flex; gap: 5px; align-items: center; }
.case-dots span { width: 5px; height: 5px; border-radius: 50%; background: #c7d1d2; }
.case-dots span.active { width: 18px; border-radius: 5px; background: var(--teal); }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 30px; background: rgba(9, 28, 34, .72); backdrop-filter: blur(8px); }
.reviewer-modal-card { width: min(820px, 95vw); min-height: 420px; display: grid; grid-template-columns: 38% 62%; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 28px 80px rgba(0,0,0,.28); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 12px 0; border-radius: 9px; background: #edf3f3; }
.auth-tabs button { border: 0; border-radius: 7px; padding: 8px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.auth-tabs button.active { background: white; color: var(--teal); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.auth-form { display: grid; gap: 9px; }
.account-notice { border: 1px solid #dfb65d; border-radius: 8px; padding: 9px; background: #fff9e8; font-size: 11px; line-height: 1.35; }
.account-notice p { margin: 4px 0; }
.notice-check { display: flex !important; flex-direction: row !important; gap: 7px; align-items: flex-start; margin-top: 7px; font-weight: 700; }
.notice-check input { width: auto !important; margin-top: 2px; }
.notes-card textarea { width: 100%; resize: vertical; min-height: 52px; border: 1px solid var(--line); border-radius: 7px; padding: 7px; font: inherit; }
.prompt-actions { display:flex; gap:8px; align-items:center; }
#clientForm { display:grid; gap:10px; }
#clientForm label { display:grid; gap:5px; text-align:left; font-weight:700; }
#clientForm input { width:100%; padding:10px; border:1px solid var(--line-strong); border-radius:8px; }
.modal-visual { position: relative; overflow: hidden; display: grid; place-items: center; background: linear-gradient(150deg, #092f36, #075f61); }
.modal-visual::before { content: ""; position: absolute; width: 290px; height: 290px; border-radius: 50%; background: radial-gradient(circle, rgba(72,213,195,.18), transparent 68%); }
.modal-visual svg { position: relative; z-index: 2; width: 148px; fill: none; stroke: #b8e8df; stroke-width: 1.5; filter: drop-shadow(0 0 12px rgba(75,222,200,.25)); }
.scan-ring { position: absolute; border: 1px solid rgba(132, 230, 215, .2); border-radius: 50%; }
.ring-one { width: 200px; height: 200px; }
.ring-two { width: 280px; height: 280px; }
.ring-three { width: 390px; height: 390px; }
.modal-content { padding: 51px 55px 42px; }
.modal-content h2 { margin: 8px 0 13px; font: 500 31px/1.14 Georgia, "Times New Roman", serif; }
.modal-content > p { color: var(--muted); margin: 0 0 27px; }
.modal-content form label { display: block; margin-bottom: 16px; }
.modal-content form label > span { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; color: var(--ink); font-size: 11px; font-weight: 800; }
.modal-content form em { color: var(--teal); font-style: normal; font-size: 8px; text-transform: uppercase; letter-spacing: .07em; }
.modal-content form small { color: var(--muted); font-size: 9px; font-weight: 500; }
.modal-content input { width: 100%; height: 44px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 12px; cursor: text; }
.modal-content input:focus { border-color: var(--teal); }
.form-error { min-height: 19px; margin: -6px 0 6px !important; color: var(--danger) !important; font-size: 11px; }
.enter-button { width: 100%; min-height: 34px; height: 36px; padding: 6px 12px; display: flex; justify-content: space-between; align-items: center; border: 0; border-radius: 8px; color: #fff; background: var(--teal); font-size: 13px; line-height: 1; font-weight: 800; }
.privacy-note { margin: 20px 0 0 !important; color: #83918e !important; font-size: 10px; text-align: center; }
.privacy-note span { color: var(--teal); margin-right: 5px; }

.incomplete-backdrop { z-index: 120; }
.incomplete-modal-card { width: min(540px, 92vw); max-height: min(700px, 86vh); padding: 32px 36px 30px; overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 28px 80px rgba(0,0,0,.28); }
.incomplete-icon { width: 42px; height: 42px; margin-bottom: 16px; display: grid; place-items: center; border-radius: 50%; color: #a51d16; background: #fee9e7; font: 800 22px Georgia, serif; }
.incomplete-modal-card h2 { margin: 6px 0 8px; font: 500 27px/1.15 Georgia, "Times New Roman", serif; }
.incomplete-modal-card > p { margin: 0 0 17px; color: var(--muted); font-size: 12px; }
.missing-list { max-height: 330px; margin-bottom: 20px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #fafcfc; }
.missing-source { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.missing-source:last-child { border-bottom: 0; }
.missing-source strong { display: block; margin-bottom: 6px; color: #a51d16; font-size: 12px; }
.missing-source ul { margin: 0; padding-left: 19px; color: #53646f; font-size: 11px; }
.missing-source li + li { margin-top: 4px; }

.annotation-backdrop { z-index: 122; }
.annotation-modal-card { width: min(470px, 92vw); padding: 31px 34px 29px; border-radius: 16px; background: #fff; box-shadow: 0 28px 80px rgba(0,0,0,.28); }
.annotation-icon { width: 42px; height: 42px; margin-bottom: 15px; display: grid; place-items: center; border-radius: 50%; color: #a51d16; background: #fee9e7; font-size: 21px; font-weight: 800; }
.annotation-modal-card h2 { margin: 6px 0 9px; font: 500 26px/1.15 Georgia, "Times New Roman", serif; }
.annotation-modal-card > p { margin: 0 0 17px; color: var(--muted); font-size: 12px; }
.annotation-example { margin-bottom: 20px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 7px; color: #111; background: #fafcfc; font: 13px/1.4 Georgia, "Times New Roman", serif; }
.annotation-example mark { margin-left: 5px; color: #c21f17; background: transparent; text-decoration: underline 2px #c21f17; text-underline-offset: 2px; }
.report-card.awaiting-annotation { border-color: #c93028; box-shadow: inset 3px 0 0 #c93028, 0 0 0 2px rgba(201, 48, 40, .13); animation: annotationPulse .5s ease-in-out 6; }
.annotation-guidance { margin-left: 7px; color: #c93028; font-size: 10px; font-weight: 800; line-height: 1.1; white-space: nowrap; }

.loading-screen { position: fixed; z-index: 90; inset: 0; background: rgba(243,247,246,.88); display: grid; place-content: center; justify-items: center; color: var(--muted); }
.loader { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #cddcdb; border-top-color: var(--teal); animation: spin .8s linear infinite; }
.toast { position: fixed; z-index: 130; left: 50%; bottom: 82px; max-width: 460px; padding: 10px 15px; border-radius: 8px; color: #fff; background: #183239; box-shadow: var(--shadow); font-size: 12px; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes annotationPulse {
  0%, 100% { border-color: #c93028; box-shadow: inset 3px 0 0 #c93028, 0 0 0 3px rgba(201, 48, 40, .18); }
  50% { border-color: rgba(201, 48, 40, .22); box-shadow: inset 3px 0 0 rgba(201, 48, 40, .18), 0 0 0 1px rgba(201, 48, 40, .04); }
}

@media (min-width: 1650px) {
  .review-grid { grid-template-columns: minmax(360px, .92fr) minmax(540px, 1.35fr) minmax(410px, 1fr); }
  .report-content { padding-left: 19px; padding-right: 19px; }
}
