.cw-shell {
  --cw-ink: #162b40;
  --cw-muted: #607286;
  --cw-line: #d5dfe7;
  --cw-paper: #f7f9fa;
  --cw-card: #fff;
  --cw-navy: #0d2943;
  --cw-blue: #2f7197;
  --cw-teal: #2c7777;
  --cw-amber: #a56720;
  --cw-red: #a44743;
  color: var(--cw-ink);
  background: var(--cw-card);
  border: 1px solid var(--cw-line);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(13, 41, 67, .07);
  padding: clamp(20px, 3vw, 34px);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  width: 100%;
  animation: cw-enter .24s ease both;
}
.cw-shell *, .cw-shell *::before, .cw-shell *::after { box-sizing: border-box; }
.cw-shell h2, .cw-shell h3, .cw-shell p { margin-top: 0; }
.cw-shell h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.035em; line-height: 1.15; margin: 6px 0 10px; color: var(--cw-navy); }
.cw-shell h3 { color: var(--cw-navy); font-size: 16px; letter-spacing: -.02em; margin: 0 0 5px; }
.cw-kicker, .cw-overline { color: var(--cw-blue); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.cw-intro { color: var(--cw-muted); font-size: 13px; line-height: 1.65; max-width: 690px; margin-bottom: 22px; }
.cw-label, .cw-field label { display: block; color: var(--cw-ink); font-size: 12px; font-weight: 700; margin-bottom: 7px; }
.cw-choice-set, .cw-reference-form fieldset { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
.cw-choice-set legend, .cw-reference-form legend { margin-bottom: 10px; }
.cw-choice { align-items: center; border: 1px solid var(--cw-line); border-radius: 10px; cursor: pointer; display: flex; gap: 12px; margin: 8px 0; padding: 14px 16px; transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.cw-choice:hover { background: #f5f9fb; border-color: #9bb6c8; transform: translateY(-1px); }
.cw-choice:has(input:checked) { border-color: var(--cw-blue); background: #f0f7fa; box-shadow: inset 3px 0 0 var(--cw-blue); }
.cw-choice input { accent-color: var(--cw-blue); width: 16px; height: 16px; flex: 0 0 auto; }
.cw-choice span { display: grid; gap: 4px; }
.cw-choice strong { font-size: 13px; }
.cw-choice small { color: var(--cw-muted); font-size: 11px; line-height: 1.5; }
.cw-choice-compact { padding: 10px 12px; font-size: 12px; }
.cw-field { min-width: 0; }
.cw-field input, .cw-field select, .cw-field textarea, .cw-inline-reference input, .cw-inline-reference select, .cw-report-controls select {
  appearance: none; background: #fbfcfd; border: 1px solid #cbd7e0; border-radius: 8px; color: var(--cw-ink);
  font: inherit; font-size: 13px; min-height: 42px; outline: none; padding: 10px 12px; width: 100%; transition: border-color .15s ease, box-shadow .15s ease;
}
.cw-field textarea { line-height: 1.6; resize: vertical; }
.cw-shell input:focus, .cw-shell textarea:focus, .cw-shell select:focus, .cw-shell button:focus-visible { border-color: var(--cw-blue); box-shadow: 0 0 0 3px rgba(47, 113, 151, .16); outline: none; }
.cw-field input:disabled, .cw-field textarea:disabled { color: #697b8b; background: #f1f4f6; }
.cw-date-field { margin: 0 0 18px; max-width: 320px; }
.cw-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.cw-button { align-items: center; border: 1px solid transparent; border-radius: 8px; cursor: pointer; display: inline-flex; font: inherit; font-size: 12px; font-weight: 750; justify-content: center; min-height: 40px; padding: 10px 15px; text-align: center; transition: background-color .16s ease, border-color .16s ease, transform .16s ease, opacity .16s ease; }
.cw-button:hover:not(:disabled) { transform: translateY(-1px); }
.cw-button:disabled { cursor: not-allowed; opacity: .52; }
.cw-button-primary { background: var(--cw-navy); color: #fff; }
.cw-button-primary:hover:not(:disabled) { background: #1a4566; }
.cw-button-outline { background: #fff; border-color: #9eb3c1; color: var(--cw-navy); }
.cw-button-outline:hover:not(:disabled) { background: #f1f7fa; border-color: var(--cw-blue); }
.cw-button-quiet, .cw-text-button { background: transparent; border-color: transparent; color: var(--cw-muted); }
.cw-button-small { min-height: 34px; padding: 7px 11px; white-space: nowrap; }
.cw-text-button { cursor: pointer; font: inherit; font-size: 11px; text-decoration: underline; }
.cw-error { align-items: flex-start; background: #fff2f0; border: 1px solid #e7b5ad; border-left: 4px solid var(--cw-red); border-radius: 8px; color: #713b36; display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 16px 0; padding: 12px 14px; font-size: 12px; }
.cw-error strong { color: #853b35; }
.cw-error span { flex: 1 1 220px; line-height: 1.5; }
.cw-access-note { background: #fff7e9; border: 1px solid #ecd8b3; border-left: 4px solid #b17b2e; border-radius: 8px; color: #765624; font-size: 11px; line-height: 1.55; margin: 0 0 16px; padding: 11px 13px; }
.cw-inline-error { color: var(--cw-red); font-size: 11px; margin: 6px 0; }
.cw-warning { background: #fff8ec; border-left: 3px solid #bb8438; color: #785222; font-size: 11px; line-height: 1.55; margin: 12px 0; padding: 10px 12px; }
.cw-success { background: #edf7f3; border: 1px solid #b5d8c8; border-radius: 8px; color: #266049; font-size: 12px; padding: 11px 13px; }
.cw-invoice-note { background: #f4f6f7; border-left: 3px solid #8298a6; color: #566a78; font-size: 10px; line-height: 1.55; margin: 0; padding: 9px 11px; }
.cw-panel-header { align-items: flex-start; border-bottom: 1px solid var(--cw-line); display: flex; gap: 18px; justify-content: space-between; margin: -2px 0 23px; padding-bottom: 19px; }
.cw-panel-header .cw-intro { margin-bottom: 0; }
.cw-review-badge, .cw-status { background: #edf2f5; border: 1px solid #d3dde4; border-radius: 999px; color: #496174; display: inline-flex; font-size: 10px; font-weight: 750; padding: 6px 9px; white-space: nowrap; }
.cw-review-pending { background: #fff6e7; border-color: #ecd6aa; color: #855c1d; }
.cw-review-ready { background: #edf7f3; border-color: #b9dacc; color: #2f6b56; }
.cw-section-heading { align-items: flex-start; display: flex; gap: 12px; margin-bottom: 16px; position: relative; }
.cw-section-heading p { color: var(--cw-muted); font-size: 11px; line-height: 1.5; margin: 0; }
.cw-step { align-items: center; background: var(--cw-navy); border-radius: 7px; color: #fff; display: inline-flex; flex: 0 0 30px; font-size: 10px; font-weight: 800; height: 28px; justify-content: center; }
.cw-reference-box, .cw-documents, .cw-draft-section, .cw-output-section { border-bottom: 1px solid var(--cw-line); padding: 22px 0; }
.cw-reference-box { background: #f3f7f9; border: 1px solid #d9e3e9; border-radius: 10px; margin-bottom: 8px; padding: 18px; }
.cw-reference-form { padding-left: 42px; }
.cw-reference-form fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.cw-reference-form legend { grid-column: 1 / -1; }
.cw-reference-form .cw-button { margin-top: 12px; }
.cw-reference-summary { align-items: end; background: #f1f6f8; border: 1px solid #d9e4e9; border-radius: 10px; display: grid; gap: 16px; grid-template-columns: minmax(150px, .7fr) minmax(150px, .7fr) minmax(280px, 1.6fr); padding: 15px; }
.cw-reference-summary > div { display: grid; gap: 6px; }
.cw-reference-summary strong { color: var(--cw-navy); font-size: 13px; }
.cw-inline-reference { align-items: end; display: flex; flex-wrap: wrap; gap: 7px; }
.cw-inline-reference label { color: var(--cw-muted); font-size: 10px; font-weight: 700; flex-basis: 100%; }
.cw-inline-reference input, .cw-inline-reference select { min-width: 135px; width: auto; }
.cw-inline-reference select { flex: 1; }
.cw-upload-grid { display: grid; gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cw-upload-tile { align-items: flex-start; background: #f8fafb; border: 1px dashed #aebfca; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; min-height: 112px; padding: 12px; position: relative; transition: border-color .15s ease, background-color .15s ease, transform .15s ease; }
.cw-upload-tile:hover { background: #f0f7fa; border-color: var(--cw-blue); transform: translateY(-2px); }
.cw-upload-tile strong { color: var(--cw-navy); font-size: 11px; line-height: 1.4; }
.cw-upload-tile > span:last-of-type { color: var(--cw-muted); font-size: 10px; }
.cw-upload-tile input { cursor: pointer; inset: 0; opacity: 0; position: absolute; width: 100%; }
.cw-upload-icon { align-items: center; background: #e6eff3; border-radius: 7px; color: var(--cw-blue); display: flex; font-size: 18px; font-weight: 400; height: 26px; justify-content: center; width: 26px; }
.cw-busy-label { color: var(--cw-blue); font-size: 10px; font-weight: 700; margin-left: auto; }
.cw-doc-list { border-top: 1px solid var(--cw-line); margin-top: 15px; }
.cw-doc-row { align-items: center; border-bottom: 1px solid #e7edf0; display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 4px; }
.cw-doc-mark { align-items: center; background: #eaf1f4; border-radius: 5px; color: #476a7d; display: inline-flex; font-size: 8px; font-weight: 800; height: 26px; justify-content: center; width: 32px; }
.cw-doc-main { display: grid; flex: 1; gap: 3px; min-width: 140px; }
.cw-doc-main strong { font-size: 11px; overflow-wrap: anywhere; }
.cw-doc-main span { color: var(--cw-muted); font-size: 10px; }
.cw-doc-message { background: #f1f6f8; border-radius: 6px; color: #526b7c; flex-basis: 100%; font-size: 10px; line-height: 1.5; margin: 0 0 0 42px; padding: 8px 10px; }
.cw-empty { align-items: center; background: #f7f9fa; border: 1px dashed #c9d6de; border-radius: 10px; color: var(--cw-muted); display: flex; flex-direction: column; margin-top: 15px; padding: 25px 16px; text-align: center; }
.cw-empty p { font-size: 11px; line-height: 1.6; margin: 5px 0 0; max-width: 380px; }
.cw-empty strong { color: var(--cw-navy); font-size: 12px; }
.cw-empty-mark { color: #8296a3; font-size: 22px; margin-bottom: 5px; }
.cw-intelligence { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px 0; }
.cw-evidence-group { background: #f8fafb; border: 1px solid #e0e8ed; border-radius: 9px; min-width: 0; padding: 13px; }
.cw-evidence-group h3 { font-size: 12px; margin-bottom: 10px; }
.cw-evidence-list { display: grid; gap: 8px; }
.cw-evidence-card { background: var(--cw-card); border: 1px solid #e2e9ed; border-radius: 7px; padding: 10px; }
.cw-evidence-head { align-items: flex-start; display: flex; gap: 8px; justify-content: space-between; }
.cw-evidence-head strong { font-size: 11px; line-height: 1.5; }
.cw-evidence-meta { color: var(--cw-muted); display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 6px 0; font-size: 9px; }
.cw-evidence-card p { color: #526679; font-size: 10px; line-height: 1.5; margin: 5px 0; }
.cw-document-proposals { background: #f7fafb; border: 1px solid #dce6eb; border-radius: 8px; flex-basis: 100%; margin: 6px 0 0 42px; padding: 11px; }
.cw-document-proposals > h3 { font-size: 11px; margin: 0 0 7px; }
.cw-doc-evidence-group { border-top: 1px solid #e2e9ed; margin-top: 8px; padding-top: 8px; }
.cw-doc-evidence-group h4 { color: #526b7c; font-size: 9px; letter-spacing: .07em; margin: 0 0 6px; text-transform: uppercase; }
.cw-doc-evidence-card { background: white; border: 1px solid #e1e8ec; border-radius: 6px; margin: 5px 0; padding: 8px; }
.cw-doc-evidence-card > strong { color: var(--cw-ink); font-size: 10px; }
.cw-doc-evidence-card > p, .cw-evidence-line { color: #586d7d; font-size: 9px; line-height: 1.55; margin: 4px 0; overflow-wrap: anywhere; }
.cw-period-warning { background: #fff5e8; border-left: 3px solid #b57a32; color: #785323 !important; padding: 7px 8px; }
.cw-source-text { border-top: 1px solid #e1e8ec; margin-top: 9px; padding-top: 8px; }
.cw-source-text summary { color: var(--cw-blue); cursor: pointer; font-size: 10px; font-weight: 700; }
.cw-source-text pre { background: #f0f3f5; border-radius: 6px; color: #475b6a; font: 10px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; max-height: 320px; overflow: auto; padding: 9px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cw-proposal-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; margin: 8px 0 0; }
.cw-proposal-fields div { min-width: 0; }
.cw-proposal-fields dt { color: var(--cw-muted); font-size: 9px; text-transform: capitalize; }
.cw-proposal-fields dd { color: var(--cw-ink); font-size: 10px; margin: 2px 0 0; overflow-wrap: anywhere; }
.cw-conflicts { background: #fff6ee; border: 1px solid #efd6bc; border-radius: 8px; color: #785532; grid-column: 1 / -1; padding: 12px 14px; }
.cw-conflicts h3 { color: #815b2e; font-size: 12px; }
.cw-conflicts p { font-size: 10px; line-height: 1.5; margin: 5px 0 0; }
.cw-permission-note { background: #f0f4f6; border-radius: 7px; color: var(--cw-muted); font-size: 11px; padding: 10px 12px; }
.cw-field-grid { display: grid; gap: 13px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cw-field-wide { grid-column: span 1; }
.cw-model-row { align-items: end; display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.cw-model-field { flex: 1 1 260px; }
.cw-notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.cw-review-actions { border-top: 1px solid var(--cw-line); padding-top: 14px; }
.cw-validation-ok { background: #edf7f3; border-radius: 7px; color: #2e6854; font-size: 11px; padding: 10px 12px; }
.cw-validation-list { background: #fff7eb; border-radius: 7px; color: #795c2d; display: grid; font-size: 10px; gap: 5px; padding: 11px 13px; }
.cw-validation-list strong { font-size: 11px; }
.cw-redaction-date { background: #eef2f4; border-radius: 6px; color: #52697b; font-size: 9px; margin-left: auto; padding: 7px 9px; }
.cw-report-controls { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.cw-report-controls > label { color: var(--cw-muted); font-size: 11px; font-weight: 700; }
.cw-report-controls select { max-width: 110px; }
.cw-report-options { display: flex; flex: 1 1 100%; flex-wrap: wrap; gap: 9px; }
.cw-report-choice { align-items: flex-start; flex: 1 1 190px; }
.cw-signature-warning { font-size: 9px; margin: 0 0 7px; }
.cw-button-report { background: #f1f6f8; border-color: #cbd8df; color: var(--cw-navy); width: 100%; }
.cw-button-report:hover:not(:disabled) { background: #e4eff3; border-color: var(--cw-blue); }
.cw-print-button { font-size: 11px; margin-top: 10px; text-decoration: underline; }
.cw-skeleton { animation: cw-shimmer 1.4s ease-in-out infinite; background: linear-gradient(90deg, #edf1f3 25%, #f7f9fa 48%, #edf1f3 72%); background-size: 200% 100%; border-radius: 8px; height: 58px; margin: 12px 0; }
.cw-skeleton-title { height: 28px; max-width: 280px; }
.cw-skeleton-wide { height: 180px; }
.cw-user-list { border-top: 1px solid var(--cw-line); }
.cw-user-row { align-items: center; border-bottom: 1px solid #e6ecef; display: flex; gap: 12px; padding: 13px 4px; }
.cw-user-avatar { align-items: center; background: #e5eef2; border-radius: 50%; color: #315c74; display: flex; flex: 0 0 36px; font-size: 14px; font-weight: 800; height: 36px; justify-content: center; }
.cw-user-info { display: grid; flex: 1; gap: 3px; min-width: 0; }
.cw-user-info strong { color: var(--cw-navy); font-size: 12px; }
.cw-user-info span, .cw-user-info small { color: var(--cw-muted); font-size: 10px; overflow-wrap: anywhere; }
.cw-toggle { align-items: center; background: #e8ecef; border: 1px solid #d2dce2; border-radius: 999px; color: #536777; cursor: pointer; display: inline-flex; font: inherit; font-size: 9px; font-weight: 700; gap: 7px; min-width: 112px; padding: 5px 9px 5px 5px; }
.cw-toggle.is-on { background: #e8f3ee; border-color: #b9d9cb; color: #2e6c54; }
.cw-toggle input { height: 1px; opacity: 0; padding: 0; position: absolute; width: 1px; }
.cw-toggle:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(47, 113, 151, .18); }
.cw-toggle:has(input:disabled) { cursor: not-allowed; opacity: .6; }
.cw-toggle-knob { background: white; border: 1px solid #c5d0d6; border-radius: 50%; height: 18px; width: 18px; }
.cw-toggle.is-on .cw-toggle-knob { background: #43886c; border-color: #43886c; }
.cw-user-skeletons .cw-skeleton { height: 54px; }
.cw-access-denied { background: #f7f9fa; }
.cw-print-base { display: none; }
@keyframes cw-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cw-shimmer { to { background-position: -200% 0; } }
@media (max-width: 760px) {
  .cw-shell { border-radius: 10px; padding: 18px; }
  .cw-panel-header { align-items: flex-start; flex-direction: column; }
  .cw-reference-summary { grid-template-columns: 1fr 1fr; }
  .cw-inline-reference { grid-column: 1 / -1; }
  .cw-upload-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cw-intelligence { grid-template-columns: 1fr; }
  .cw-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cw-field-wide { grid-column: span 1; }
  .cw-reference-form { padding-left: 0; }
  .cw-report-options { flex-direction: column; }
}
@media (max-width: 480px) {
  .cw-shell { padding: 15px; }
  .cw-reference-summary { grid-template-columns: 1fr; }
  .cw-inline-reference { grid-column: auto; }
  .cw-reference-form fieldset { grid-template-columns: 1fr; }
  .cw-upload-grid { grid-template-columns: 1fr 1fr; }
  .cw-field-grid, .cw-notes-grid { grid-template-columns: 1fr; }
  .cw-field-wide { grid-column: auto; }
  .cw-doc-row { align-items: flex-start; }
  .cw-report-controls { align-items: flex-start; }
  .cw-user-row { align-items: flex-start; flex-wrap: wrap; }
  .cw-toggle { margin-left: 48px; }
}
@media print {
  body * { visibility: hidden !important; }
  .cw-print-base, .cw-print-base * { visibility: visible !important; }
  .cw-print-base { background: #fff; color: #182b3a; display: block; font: 12pt Georgia, serif; left: 0; padding: 16mm; position: absolute; top: 0; width: 100%; }
  .cw-print-base h2 { border-bottom: 1px solid #9daab2; font: 700 19pt "Plus Jakarta Sans", sans-serif; padding-bottom: 8mm; }
  .cw-print-base dl div { border-bottom: 1px solid #e0e5e8; display: grid; grid-template-columns: 1fr 2fr; gap: 12px; padding: 7px 0; }
  .cw-print-base dt { color: #536779; font: 700 9pt "Plus Jakarta Sans", sans-serif; text-transform: capitalize; }
  .cw-print-base dd { margin: 0; white-space: pre-wrap; }
}
