/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:      #2563eb;
  --brand-dk:   #1d4ed8;
  --green:      #16a34a;
  --green-bg:   #f0fdf4;
  --red:        #dc2626;
  --red-bg:     #fef2f2;
  --amber:      #d97706;
  --amber-bg:   #fffbeb;
  --gray-50:    #f8fafc;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-400:   #94a3b8;
  --gray-600:   #475569;
  --gray-800:   #1e293b;
  --radius:     10px;
  --shadow:     0 2px 12px rgba(0,0,0,.09);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.13);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--gray-800);
  background: var(--gray-50);
}

body { min-height: 100vh; }

/* ── Screen system ─────────────────────────────────────────────────────────── */
.screen { position: absolute; inset: 0; overflow-y: auto; }
.screen.hidden { display: none; }
.screen-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}

/* ── License / Access Screen ───────────────────────────────────────────────── */
.license-card {
  background: #fff;
  border-radius: 18px;
  padding: 48px 44px 40px;
  width: 420px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.logo-block { margin-bottom: 32px; }
.logo-icon  { font-size: 48px; display: block; }
.logo-name  { font-size: 26px; font-weight: 700; color: var(--gray-800); margin-top: 8px; }
.logo-tagline { font-size: 13px; color: var(--gray-400); margin-top: 4px; }

.license-form label { display: block; text-align: left; font-weight: 600; margin-bottom: 8px; }
.license-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 15px;
  letter-spacing: .05em;
  outline: none;
  transition: border-color .15s;
}
.license-form input:focus { border-color: var(--brand); }
.license-help { margin-top: 18px; font-size: 12px; color: var(--gray-400); }
.license-help a { color: var(--brand); text-decoration: none; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: var(--brand-dk); }
.btn-primary:active { transform: scale(.98); }
.btn-full { width: 100%; margin-top: 16px; }
.btn-large { padding: 14px 32px; font-size: 15px; }

.btn-secondary {
  background: #fff;
  color: var(--gray-800);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s;
}
.btn-secondary:hover { border-color: var(--gray-400); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.link-btn {
  background: none;
  border: none;
  color: var(--brand);
  cursor: pointer;
  font-size: inherit;
  padding: 0;
  text-decoration: underline;
}

/* ── App Header ─────────────────────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-left { display: flex; align-items: center; gap: 8px; }
.logo-icon-sm { font-size: 22px; }
.header-title { font-size: 16px; font-weight: 700; color: var(--gray-800); }
.header-right { display: flex; align-items: center; gap: 12px; }

.payer-badge {
  background: var(--brand);
  color: #fff;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
}

/* ── Intake Form ─────────────────────────────────────────────────────────────── */
.intake-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.form-heading {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 28px;
  color: var(--gray-800);
}

.form-group { margin-bottom: 22px; }
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 7px;
  font-size: 13px;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.form-label.required::after { content: ' *'; color: var(--red); }
.optional { font-weight: 400; color: var(--gray-400); text-transform: none; letter-spacing: 0; font-size: 12px; }
.form-hint { font-size: 12px; color: var(--gray-400); margin-top: 5px; }
.form-hint kbd {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
}

.form-row { display: flex; gap: 16px; }
.form-group-grow { flex: 1; }

select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  background: #fff;
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
  color: var(--gray-800);
}
select:focus, textarea:focus { border-color: var(--brand); }
textarea { resize: vertical; }

/* ── Tag Input ──────────────────────────────────────────────────────────────── */
.tag-input-area {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  background: #fff;
  cursor: text;
  min-height: 44px;
  transition: border-color .15s;
}
.tag-input-area:focus-within { border-color: var(--brand); }

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--brand);
  color: #fff;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 600;
}
.tag-chip .remove-tag {
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  opacity: .7;
  background: none;
  border: none;
  color: #fff;
  padding: 0;
}
.tag-chip .remove-tag:hover { opacity: 1; }

.tag-raw-input {
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  min-width: 120px;
  flex: 1;
  color: var(--gray-800);
}

/* ── Guideline source row ───────────────────────────────────────────────────── */
.guideline-source-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 10px 14px;
  background: #eff6ff;
  border-radius: var(--radius);
  border: 1px solid #bfdbfe;
}
.gsource-label { font-size: 13px; font-weight: 600; color: var(--brand); }
.gsource-badge {
  background: var(--brand);
  color: #fff;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 700;
}
.gsource-sep { font-size: 13px; color: var(--gray-400); }

/* Company search input */
.company-input-wrap { position: relative; }

#company-input {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  background: #fff;
  transition: border-color .15s;
}
#company-input:focus { border-color: var(--brand); outline: none; }

#company-other-input {
  width: 100%;
  margin-top: 8px;
  padding: 9px 13px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  background: #fff;
}
#company-other-input:focus { border-color: var(--brand); outline: none; }

/* Custom dropdown */
.company-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 250px;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 1000;
  will-change: scroll-position;
}

.company-dropdown-group {
  padding: 8px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray-400);
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  z-index: 1;
}
.company-dropdown-group:first-child { border-top: none; }

.company-dropdown-item {
  padding: 9px 16px;
  font-size: 14px;
  color: var(--gray-800);
  cursor: pointer;
  transition: background .1s;
}
.company-dropdown-item:hover,
.company-dropdown-item.active {
  background: #eff6ff;
  color: var(--brand);
}

.company-dropdown-empty {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--gray-400);
  text-align: center;
}

/* ── Drop Zone ──────────────────────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-50);
  transition: border-color .15s, background .15s;
  cursor: pointer;
}
.drop-zone.drag-over {
  border-color: var(--brand);
  background: #eff6ff;
}
.drop-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 20px;
  text-align: center;
}
.drop-icon { font-size: 36px; margin-bottom: 10px; }
.drop-primary { font-size: 15px; font-weight: 600; color: var(--gray-600); }
.drop-secondary { font-size: 13px; color: var(--gray-400); margin-top: 4px; }
.drop-types { font-size: 12px; color: var(--gray-400); margin-top: 8px; }

.file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--gray-100);
  border-radius: 8px;
  font-size: 13px;
}
.file-item .file-name { font-weight: 500; }
.file-item .file-size { color: var(--gray-400); font-size: 12px; }
.file-item .remove-file {
  cursor: pointer;
  color: var(--gray-400);
  background: none;
  border: none;
  font-size: 16px;
  padding: 0 4px;
}
.file-item .remove-file:hover { color: var(--red); }

/* ── Form Actions ───────────────────────────────────────────────────────────── */
.form-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; margin-top: 8px; }

/* ── Error message ──────────────────────────────────────────────────────────── */
.error-msg { color: var(--red); font-size: 13px; font-weight: 500; }

/* ── Progress Screen ────────────────────────────────────────────────────────── */
.progress-card {
  background: #fff;
  border-radius: 18px;
  padding: 48px 44px;
  width: 480px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.progress-heading { font-size: 20px; font-weight: 700; margin: 16px 0 6px; }
.progress-subtext { color: var(--gray-400); font-size: 13px; margin-bottom: 32px; }

.progress-steps { text-align: left; display: flex; flex-direction: column; gap: 14px; }

.progress-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--gray-400);
  transition: color .2s;
}
.progress-step.running { color: var(--brand); font-weight: 600; }
.progress-step.done    { color: var(--green); }
.progress-step.error   { color: var(--red); }

.step-icon { font-size: 18px; width: 22px; text-align: center; flex-shrink: 0; }

.progress-step.running .step-icon::before { content: '⟳'; display: inline-block; animation: spin .8s linear infinite; }
.progress-step.done  .step-icon::before { content: '✓'; }
.progress-step.error .step-icon::before { content: '✗'; }
.progress-step:not(.running):not(.done):not(.error) .step-icon::before { content: '○'; }

@keyframes spin { to { transform: rotate(360deg); } }

.progress-error { margin-top: 28px; }

/* ── Results Screen ──────────────────────────────────────────────────────────── */
.results-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* Determination banner */
.determination-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  border-radius: 14px;
  margin-bottom: 28px;
}
.determination-banner.approvable      { background: var(--green-bg); border: 2px solid var(--green); }
.determination-banner.not-approvable  { background: var(--red-bg);   border: 2px solid var(--red); }
.determination-banner.unable          { background: var(--amber-bg);  border: 2px solid var(--amber); }
.determination-banner.action-required { background: #eff6ff; border: 2px solid var(--brand); }

.determination-icon { font-size: 40px; }
.det-label { font-size: 26px; font-weight: 800; line-height: 1; }
.determination-banner.approvable      .det-label { color: var(--green); }
.determination-banner.not-approvable  .det-label { color: var(--red); }
.determination-banner.unable          .det-label { color: var(--amber); }
.determination-banner.action-required .det-label { color: var(--brand); }

.det-payer { font-size: 14px; color: var(--gray-600); margin-top: 4px; }

/* Result cards */
.result-cards { display: flex; flex-direction: column; gap: 16px; }
.result-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 24px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.card-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-400);
  margin-bottom: 10px;
}
.card-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--gray-800);
  white-space: pre-wrap;
}
.guideline-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--brand);
  font-size: 13px;
  text-decoration: none;
  font-weight: 500;
}
.guideline-link:hover { text-decoration: underline; }

/* Meta card */
.meta-card { display: flex; flex-direction: column; gap: 10px; }
.meta-row { display: flex; gap: 12px; }
.meta-key { font-size: 13px; font-weight: 600; color: var(--gray-400); width: 140px; flex-shrink: 0; }
.meta-val { font-size: 13px; color: var(--gray-800); font-weight: 500; }

/* Guideline reference block */
.guideline-ref-block {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #f0f9ff;
  border: 1.5px solid #7dd3fc;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
}
.guideline-ref-icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.guideline-ref-body { flex: 1; min-width: 0; }
.guideline-ref-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #0369a1;
  margin-bottom: 5px;
}
.guideline-ref-text {
  font-size: 14px;
  font-weight: 600;
  color: #0c4a6e;
  line-height: 1.5;
  word-break: break-word;
}
.guideline-ref-copy {
  flex-shrink: 0;
  align-self: center;
  background: #fff;
  border: 1px solid #7dd3fc;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #0369a1;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.guideline-ref-copy:hover { background: #e0f2fe; border-color: #38bdf8; }
.guideline-ref-copy.copied { color: var(--green); border-color: var(--green); }

/* Results actions */
.results-actions { margin-top: 28px; display: flex; justify-content: flex-start; }

/* Auth Summary box */
.auth-summary-block {
  background: var(--green-bg);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
}
.auth-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.auth-summary-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.auth-summary-text {
  font-size: 14px;
  line-height: 1.75;
  color: var(--gray-800);
  white-space: pre-wrap;
}
.btn-copy-summary {
  flex-shrink: 0;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.btn-copy-summary:hover { background: #15803d; }
.btn-copy-summary.copied { background: #166534; }

/* Criteria / bullet lists */
.criteria-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.criteria-item {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--gray-800);
}
.criteria-item::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--gray-400);
  font-weight: 700;
}

.card-not-approvable { border-left: 4px solid var(--red); }
.card-not-approvable .card-title { color: var(--red); }

/* Action required block */
.action-required-block {
  background: #eff6ff;
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  padding: 20px 24px 24px;
  margin-bottom: 16px;
}
.action-required-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.action-required-icon { font-size: 22px; }
.action-required-title { font-size: 15px; font-weight: 700; color: var(--brand); }
.action-required-subtitle { font-size: 13px; color: var(--gray-600); margin-bottom: 14px; }

.action-checklist {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.action-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 10px 14px;
}
.action-checkbox { font-size: 18px; color: var(--brand); flex-shrink: 0; line-height: 1.4; }
.action-text { font-size: 14px; color: var(--gray-800); line-height: 1.5; }

/* ── Paste Documents ────────────────────────────────────────────────────────── */
.paste-section { margin-top: 16px; }

.paste-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--gray-400);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.paste-divider::before,
.paste-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.paste-hint { margin-bottom: 14px; }

.paste-add-btn { margin-top: 10px; }

.paste-doc-block {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: border-color .15s;
}
.paste-doc-block:focus-within { border-color: var(--brand); }

.paste-doc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.paste-label-input {
  flex: 1;
  padding: 5px 9px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
  background: var(--gray-50);
  outline: none;
  transition: border-color .15s;
}
.paste-label-input:focus { border-color: var(--brand); background: #fff; }
.paste-label-input::placeholder { font-weight: 400; color: var(--gray-400); }

.paste-clear-btn,
.paste-remove-btn {
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  color: var(--gray-600);
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.paste-clear-btn:hover  { border-color: var(--amber); color: var(--amber); }
.paste-remove-btn:hover { border-color: var(--red);   color: var(--red); }

.paste-textarea {
  width: 100%;
  min-height: 130px;
  padding: 9px 11px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 13px;
  font-family: ui-monospace, "Cascadia Code", "Fira Mono", monospace;
  line-height: 1.55;
  resize: vertical;
  background: var(--gray-50);
  color: var(--gray-800);
  outline: none;
  transition: border-color .15s;
}
.paste-textarea:focus { border-color: var(--brand); background: #fff; }
.paste-textarea::placeholder { font-family: inherit; color: var(--gray-400); }

.paste-char-count {
  margin-top: 5px;
  font-size: 11px;
  color: var(--gray-400);
  text-align: right;
}

/* ── Redaction Preview Screen ───────────────────────────────────────────────── */
.redact-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.redact-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.redact-subtext {
  font-size: 14px;
  color: var(--gray-600);
  margin-top: 6px;
  line-height: 1.6;
  max-width: 520px;
}

.redact-shield {
  font-size: 13px;
  font-weight: 600;
  color: var(--amber);
}

.redaction-count-badge {
  flex-shrink: 0;
  background: var(--amber-bg);
  border: 1.5px solid var(--amber);
  color: var(--amber);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  margin-top: 4px;
}

/* Individual document block */
.redact-doc-block {
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.redact-doc-block:focus-within {
  border-color: var(--brand);
}

.redact-doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.redact-doc-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
}

.redact-doc-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
  background: var(--amber-bg);
  border-radius: 12px;
  padding: 2px 10px;
}

/* Legend showing what [REDACTED] means */
.redact-legend {
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.redacted-mark {
  background: #fef3c7;
  color: #92400e;
  border-radius: 3px;
  padding: 1px 5px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

/* Editable textarea */
.redact-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--amber);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: ui-monospace, "Cascadia Code", "Fira Mono", monospace;
  line-height: 1.6;
  resize: vertical;
  background: #fffbeb;
  color: var(--gray-800);
  outline: none;
  transition: border-color .15s, background .15s;
}
.redact-textarea:focus {
  border-color: var(--brand);
  background: #fff;
}

.redact-hint {
  margin-top: 7px;
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.5;
}

/* Uploaded files block */
.redact-files-block {
  border-color: var(--gray-200);
}

.redact-file-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.redact-file-list li {
  font-size: 13px;
  color: var(--gray-600);
  padding: 5px 10px;
  background: var(--gray-50);
  border-radius: 6px;
  font-weight: 500;
}
.redact-file-list li::before {
  content: '📄 ';
}

/* Action buttons row */
.redact-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 16px;
}

.btn-confirm {
  background: var(--green);
}
.btn-confirm:hover { background: #15803d; }

.redact-note {
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.6;
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}

/* ── Add Missing Documents & Re-run ────────────────────────────────────────── */
.add-docs-section {
  background: #fff;
  border: 2px solid var(--amber);
  border-radius: var(--radius);
  padding: 20px 24px 24px;
  margin-bottom: 16px;
}
.add-docs-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.add-docs-icon { font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.add-docs-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 4px;
}
.add-docs-subtitle {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.5;
}
.add-docs-dropzone {
  border: 2px dashed var(--amber);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background .15s;
}
.add-docs-dropzone:hover,
.add-docs-dropzone.drag-over { background: var(--amber-bg); }
.add-docs-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

/* ── Guideline Hierarchy Trail Card ─────────────────────────────────────────── */
.trail-card { padding: 16px 20px 20px; }
.trail-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.trail-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
}
.trail-used   { border-color: #bbf7d0; background: #f0fdf4; }
.trail-skipped { border-color: #fed7aa; background: #fff7ed; }
.trail-not-found { border-color: var(--gray-200); background: var(--gray-100); opacity: .75; }

.trail-icon {
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  min-width: 16px;
  text-align: center;
}
.trail-used   .trail-icon { color: var(--green); }
.trail-skipped .trail-icon { color: var(--amber); }
.trail-not-found .trail-icon { color: var(--gray-400); }

.trail-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.trail-level {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-600);
}
.trail-name  { font-size: 13px; color: var(--gray-800); line-height: 1.4; }
.trail-reason {
  font-size: 12px;
  color: var(--gray-600);
  font-style: italic;
}
.trail-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 1px;
  text-transform: capitalize;
}
.trail-used .trail-status-badge        { background: #dcfce7; color: #15803d; }
.trail-skipped .trail-status-badge     { background: #fed7aa; color: #9a3412; }
.trail-not-found .trail-status-badge   { background: var(--gray-200); color: var(--gray-600); }

/* ── Utilities ──────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Print styles ───────────────────────────────────────────────────────────── */
@media print {
  #screen-access, #screen-intake, #screen-progress { display: none !important; }
  #screen-results { position: static; overflow: visible; }
  .app-header { display: none; }
  .results-actions { display: none; }
  .guideline-ref-copy { display: none; }
  .btn-copy-summary { display: none; }
  .add-docs-section { display: none; }
  body { background: #fff; }
}
