/* Consumer self-serve pages — ONE shared stylesheet for billing/ pay/ what-you-have/
 * upload/ processing/ records/ export/ check-email/.
 *
 * Built ON TOP of the shared tokens in _client.css (:root) and the wordmark in
 * ../_brand.css — no new palette, no new fonts. The signed-out bar + centered card
 * mirror the approved get-started/ look exactly; the rail mirrors cw-source-rail.
 * Numeric figures render in the system mono stack (counts, credits, digests). */

/* Consumer-only accessible variants of the shared palette.  The original slate and cobalt
 * fall just below 4.5:1 on the cloud page background; these preserve the visual family while
 * keeping normal-size help, progress, and link text above the WCAG AA boundary. */
:root {
  --cw-cobalt: #405bdc;
  --cw-slate: #607083;
  --cw-slate-light: #637286;
}

[hidden] { display: none !important; }

.cw-skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--cw-ink);
  color: var(--cw-white);
  font-weight: 700;
}

.cw-skip-link:focus { transform: translateY(0); }

/* ---------- signed-out top bar (the approved Step-1 pattern) ---------- */
.cw-consumer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--cw-line-soft);
  background: var(--cw-white);
}

.cw-consumer-bar .cw-text-wordmark {
  font-size: 20px;
}

.cw-consumer-bar-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.cw-consumer-bar-actions a,
.cw-consumer-bar-actions button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--cw-ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.cw-form { display: flex; flex-direction: column; gap: 18px; }

.cw-button { min-height: 44px; }

:focus-visible {
  outline: 3px solid var(--cw-cobalt);
  outline-offset: 3px;
}

.cw-consumer-bar-actions a.cw-signin {
  color: var(--cw-cobalt);
}

/* ---------- the slim progress rail (mirrors cw-source-rail) ---------- */
.cw-consumer-rail {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px 10px;
  align-items: center;
  overflow-x: auto;
  width: min(1180px, calc(100% - 48px));
  margin: 18px auto 0;
  padding-bottom: 4px;
  font-size: 12px;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.cw-consumer-rail span {
  color: var(--cw-slate-light);
  font-weight: 650;
  flex: 0 0 auto;
}

.cw-consumer-rail span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  margin-left: 10px;
  vertical-align: middle;
  background: rgba(9, 26, 45, 0.18);
}

.cw-consumer-rail .is-done {
  color: var(--cw-slate);
}

.cw-consumer-rail .is-current {
  color: var(--cw-cobalt-deep);
  font-weight: 760;
}

/* ---------- page shell ---------- */
.cw-consumer-main {
  min-height: calc(100vh - 62px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: var(--cw-cloud);
  padding: 40px 24px 40px;
}

.cw-consumer-card {
  width: 100%;
  max-width: 452px;
}

.cw-consumer-card.is-wide {
  max-width: 620px;
}

.cw-consumer-card.is-work {
  max-width: 760px;
}

.cw-consumer-card.is-records {
  max-width: 960px;
}

.cw-consumer-eyebrow {
  color: var(--cw-cobalt);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.cw-consumer-card h1 {
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.022em;
  color: var(--cw-ink);
  font-weight: 800;
  margin: 0 0 14px;
}

.cw-consumer-lede {
  color: var(--cw-slate);
  font-size: 15.5px;
  line-height: 1.5;
  margin: 0 0 26px;
  max-width: 56ch;
}

.cw-consumer-lede b {
  color: var(--cw-ink-soft);
  font-weight: 650;
}

/* numeric figures are mono everywhere on these pages */
.cw-num {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* the corner chip that marks baked sample content */
.cw-preview-chip {
  position: fixed;
  z-index: 40;
  right: 14px;
  bottom: 14px;
  padding: 5px 9px;
  color: var(--cw-slate);
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.055em;
  line-height: 1;
  text-transform: uppercase;
}

.cw-preview-chip[hidden] {
  display: none;
}

/* the cobalt-wash info note (approved billing-note look) */
.cw-consumer-note {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin: 22px 0 0;
  padding: 14px 16px;
  background: var(--cw-cobalt-wash);
  border: 1px solid var(--cw-cobalt-pale);
  border-radius: 12px;
  color: var(--cw-ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.cw-consumer-note svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  stroke: var(--cw-cobalt);
  fill: none;
  stroke-width: 1.8;
  margin-top: 1px;
}

.cw-consumer-actions {
  margin-top: 26px;
}

.cw-consumer-actions .cw-button-primary {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 15px;
}

.cw-consumer-actions .cw-button-primary svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.cw-consumer-alt {
  color: var(--cw-slate);
  font-size: 14px;
  text-align: center;
  margin: 20px 0 0;
}

.cw-consumer-alt a {
  color: var(--cw-cobalt);
  font-weight: 650;
  text-decoration: none;
}

.cw-label {
  display: block;
  margin: 0 0 7px;
  color: var(--cw-ink);
  font-size: 13px;
  font-weight: 650;
}

.cw-input {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid var(--cw-line);
  border-radius: 10px;
  background: var(--cw-white);
  color: var(--cw-ink);
  font: 16px/1.25 var(--cw-sans);
}

.cw-input:focus {
  outline: none;
  border-color: var(--cw-cobalt);
  box-shadow: 0 0 0 4px var(--cw-cobalt-wash);
}

.cw-input:focus-visible {
  outline: 3px solid var(--cw-cobalt);
  outline-offset: 2px;
}

select.cw-input {
  height: 44px;
}

.cw-consumer-error {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid #e2a6a6;
  border-radius: 10px;
  background: #fff4f4;
  color: #8a2020;
  font-size: 14px;
  line-height: 1.45;
}

/* a button that reads exactly like the cw-consumer-alt link (real button element,
   so keyboard + JS-off semantics are honest) */
.cw-linklike {
  min-height: 44px;
  padding: 8px 2px;
  background: transparent;
  border: 0;
  color: var(--cw-cobalt);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

/* ---------- billing: the four fact cards ---------- */
.cw-fact-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cw-fact-card {
  padding: 15px 17px;
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 12px;
}

.cw-fact-card b {
  display: block;
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}

.cw-fact-card p {
  margin: 0;
  color: var(--cw-slate);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- pay: order summary ---------- */
.cw-order-card {
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 14px;
  padding: 18px 20px;
}

.cw-order-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  font-size: 13.5px;
}

.cw-order-row + .cw-order-row {
  border-top: 1px solid var(--cw-line-soft);
}

.cw-order-row span {
  color: var(--cw-slate);
}

.cw-order-row b {
  font-weight: 720;
}

.cw-order-total {
  font-size: 15px;
}

.cw-order-refund {
  margin: 12px 0 0;
  color: var(--cw-ink-soft);
  font-size: 12.5px;
  line-height: 1.5;
}

.cw-check {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 13px 15px;
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 11px;
  cursor: pointer;
}

.cw-check input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--cw-cobalt);
}

.cw-check span {
  font-size: 13px;
  line-height: 1.45;
  color: var(--cw-ink-soft);
}

.cw-check span b {
  display: block;
  font-weight: 700;
  color: var(--cw-ink);
  margin-bottom: 2px;
}

.cw-referral {
  margin-top: 16px;
}

.cw-referral summary {
  color: var(--cw-cobalt-deep);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.cw-referral summary::-webkit-details-marker {
  display: none;
}

.cw-referral[open] summary {
  margin-bottom: 9px;
}

.cw-referral input {
  width: 100%;
  font: 15px/1.2 var(--cw-sans);
  color: var(--cw-ink);
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 10px;
  padding: 12px 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cw-referral input:focus {
  outline: none;
  border-color: var(--cw-cobalt);
  box-shadow: 0 0 0 4px var(--cw-cobalt-wash);
}

/* ---------- what-you-have: constrained choice cards ---------- */
.cw-choice-group {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
}

.cw-choice-group legend {
  padding: 0;
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 720;
  color: var(--cw-ink);
}

.cw-choice-group legend small {
  display: block;
  margin-top: 2px;
  color: var(--cw-slate);
  font-size: 12px;
  font-weight: 520;
}

.cw-own-opt {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 15px;
  background: var(--cw-white);
  border: 1.5px solid rgba(9, 26, 45, 0.12);
  border-radius: 11px;
  cursor: pointer;
}

.cw-own-opt + .cw-own-opt {
  margin-top: 9px;
}

.cw-own-opt.is-selected {
  border-color: var(--cw-cobalt);
  background: rgba(73, 103, 242, 0.05);
}

.cw-own-opt input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--cw-cobalt);
}

.cw-own-opt > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cw-own-opt b {
  font-size: 14px;
  font-weight: 720;
  letter-spacing: -0.01em;
}

.cw-own-opt small {
  color: var(--cw-slate);
  font-size: 12px;
  line-height: 1.4;
}

.cw-wizard-stage {
  margin-top: 24px;
}

.cw-wizard-stage[hidden] {
  display: none;
}

.cw-block-panel {
  margin-top: 14px;
  padding: 15px 17px;
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-left: 3px solid var(--cw-cobalt);
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--cw-ink-soft);
}

.cw-block-panel[hidden] {
  display: none;
}

.cw-block-panel b {
  display: block;
  color: var(--cw-ink);
  font-weight: 720;
  margin-bottom: 4px;
}

/* ---------- upload ---------- */
.cw-message-guide {
  margin: 20px 0;
  padding: 18px;
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 14px;
}

.cw-message-guide h2,
.cw-message-review h2 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: -0.015em;
}

.cw-message-guide > p,
.cw-message-review > p {
  margin: 0 0 12px;
  color: var(--cw-slate);
  font-size: 13px;
  line-height: 1.55;
}

.cw-message-guide details {
  border-top: 1px solid var(--cw-line-soft);
}

.cw-message-guide summary {
  min-height: 44px;
  padding: 12px 2px;
  cursor: pointer;
  color: var(--cw-ink);
  font-size: 14px;
  font-weight: 720;
}

.cw-message-guide details > ol,
.cw-message-guide details > ul,
.cw-message-guide details > p {
  margin: 0 0 14px 24px;
  color: var(--cw-ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.cw-message-guide details > ol,
.cw-message-guide details > ul {
  padding-left: 16px;
}

.cw-message-guide details li + li {
  margin-top: 5px;
}

.cw-ocr-truth {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  padding: 12px 14px;
  color: #66460b;
  background: #fff7e8;
  border: 1px solid #eed9ab;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
}

.cw-ocr-truth.is-warning {
  color: #7a271a;
  background: #fff0ed;
  border-color: #efb8ad;
}

.cw-message-review {
  margin-top: 18px;
  padding: 17px;
  background: var(--cw-white);
  border: 1px solid rgba(73, 103, 242, 0.3);
  border-radius: 13px;
}

.cw-message-review[hidden] {
  display: none;
}

.cw-message-review-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.cw-message-choices {
  max-height: 320px;
  margin: 0 0 14px;
  padding: 0;
  overflow: auto;
  list-style: none;
  border-block: 1px solid var(--cw-line-soft);
}

.cw-message-choice {
  padding: 10px 2px;
  border-top: 1px solid var(--cw-line-soft);
}

.cw-message-choice:first-child {
  border-top: 0;
}

.cw-message-choice label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 3px 10px;
  align-items: start;
  cursor: pointer;
}

.cw-message-choice input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--cw-cobalt);
}

.cw-message-choice b {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.cw-message-choice small {
  grid-column: 2;
  color: var(--cw-slate);
  font-size: 11.5px;
  line-height: 1.4;
}

.cw-message-coverage {
  margin: -3px 0 12px;
  color: var(--cw-ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.cw-drop {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 220px;
  padding: 30px 20px;
  background: var(--cw-white);
  border: 2px dashed rgba(73, 103, 242, 0.45);
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.cw-drop.is-over {
  border-color: var(--cw-cobalt);
  background: rgba(73, 103, 242, 0.05);
}

/* keyboard: the file input inside is visually hidden, so the zone itself
   carries the visible focus ring when tabbing lands on that input */
.cw-drop:focus-within {
  border-color: var(--cw-cobalt);
  box-shadow: 0 0 0 4px var(--cw-cobalt-wash);
}

.cw-drop svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--cw-cobalt);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cw-drop b {
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.015em;
}

.cw-drop small {
  color: var(--cw-slate);
  font-size: 12.5px;
  line-height: 1.45;
}

.cw-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.cw-received-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 700;
}

.cw-received-bar[hidden] {
  display: none;
}

.cw-received-track {
  flex: 1;
  height: 8px;
  background: rgba(9, 26, 45, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.cw-received-fill {
  height: 100%;
  width: 0;
  background: var(--cw-cobalt);
  border-radius: 999px;
  transition: width 200ms ease;
}

.cw-file-rows {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.cw-file-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 2px;
  border-top: 1px solid var(--cw-line-soft);
}

.cw-file-row > div {
  min-width: 0;
  flex: 1;
}

.cw-file-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
  white-space: normal;
}

.cw-file-why {
  display: block;
  margin-top: 3px;
  color: var(--cw-slate);
  font-size: 12px;
  line-height: 1.45;
}

.cw-upload-row-action {
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 0;
  text-align: left;
}

.cw-chip {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.cw-chip-process {
  color: var(--cw-success);
  background: var(--cw-success-pale);
}

.cw-chip-hold {
  color: #7a5209;
  background: #fff3df;
}

.cw-chip-skip {
  color: var(--cw-slate);
  background: rgba(9, 26, 45, 0.06);
}

.cw-chip-sending {
  color: var(--cw-cobalt-deep);
  background: var(--cw-cobalt-pale);
}

.cw-chip-refused {
  color: var(--cw-danger);
  background: rgba(166, 64, 54, 0.08);
}

.cw-upload-checklist {
  margin: 22px 0 0;
  padding: 15px 17px;
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 12px;
}

.cw-upload-checklist > b {
  display: block;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--cw-ink-soft);
  margin-bottom: 9px;
}

.cw-upload-checklist ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.cw-upload-checklist li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--cw-slate);
}

.cw-upload-checklist li::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 1.5px solid var(--cw-line);
  border-radius: 50%;
  background: var(--cw-white);
}

.cw-upload-checklist li.is-ticked {
  color: var(--cw-ink);
  font-weight: 650;
}

.cw-upload-checklist li.is-ticked::before {
  border-color: var(--cw-success);
  background: var(--cw-success) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round"><path d="m5 13 4 4 10-10"/></svg>') center/10px no-repeat;
}

/* ---------- processing ---------- */
.cw-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.cw-stat-card {
  padding: 14px 16px;
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 12px;
}

.cw-stat-card small {
  display: block;
  color: var(--cw-slate);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.cw-stat-card b {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cw-stat-card b .cw-num {
  font-size: 22px;
}

.cw-overall {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 12px;
}

.cw-overall-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 720;
}

.cw-overall-head span {
  color: var(--cw-slate);
  font-weight: 600;
  font-size: 12.5px;
}

.cw-kind-counts {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.cw-kind-counts li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--cw-ink-soft);
}

.cw-kind-counts li b {
  font-weight: 720;
}

.cw-paused-card {
  margin-top: 18px;
  padding: 18px 20px;
  background: #fff8ec;
  border: 1px solid rgba(216, 135, 37, 0.35);
  border-radius: 13px;
}

.cw-paused-card[hidden] {
  display: none;
}

.cw-paused-card > b {
  display: block;
  font-size: 15px;
  font-weight: 760;
  margin-bottom: 5px;
}

.cw-paused-card p {
  margin: 0 0 12px;
  color: #7a5209;
  font-size: 13px;
  line-height: 1.5;
}

.cw-paused-figures {
  display: flex;
  gap: 22px;
  margin: 0 0 14px;
  font-size: 13px;
}

.cw-paused-figures span {
  color: var(--cw-slate);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.cw-state-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  color: var(--cw-slate);
  font-size: 13px;
}

.cw-state-line .cw-pulse {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cw-cobalt);
  animation: cw-pulse 1.4s ease-in-out infinite;
}

@keyframes cw-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* ---------- records ---------- */
.cw-trust-banner {
  margin: 0 0 20px;
  padding: 14px 17px;
  background: var(--cw-cobalt-wash);
  border: 1px solid var(--cw-cobalt-pale);
  border-radius: 12px;
  color: var(--cw-ink-soft);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.cw-records-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 22px;
  font-size: 12.5px;
  color: var(--cw-slate);
}

.cw-records-counts b {
  color: var(--cw-ink);
  font-weight: 750;
}

.cw-records-section {
  margin-top: 30px;
}

.cw-records-section > h2 {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.cw-records-section > p.cw-section-sub {
  margin: 0 0 14px;
  color: var(--cw-slate);
  font-size: 12.5px;
  line-height: 1.5;
}

.cw-records-section > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
}

.cw-month {
  margin-top: 18px;
}

.cw-month > h3 {
  margin: 0 0 8px;
  color: var(--cw-slate);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cw-tl-entry {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 11px 2px;
  border-top: 1px solid var(--cw-line-soft);
}

.cw-tl-when {
  flex: 0 0 92px;
  color: var(--cw-slate);
  font-size: 11.5px;
  padding-top: 2px;
}

.cw-tl-body {
  min-width: 0;
  flex: 1;
}

.cw-tl-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cw-tl-src {
  display: inline-block;
  max-width: 100%;
  margin-top: 5px;
  padding: 2px 8px;
  color: var(--cw-ink-soft);
  background: rgba(9, 26, 45, 0.05);
  border: 1px solid rgba(9, 26, 45, 0.1);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.cw-group-card {
  margin-top: 10px;
  padding: 13px 15px;
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 11px;
  font-size: 13px;
}

.cw-group-card p {
  margin: 0 0 8px;
  line-height: 1.5;
  color: var(--cw-ink-soft);
  overflow-wrap: anywhere;
}

.cw-group-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.cw-group-card li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--cw-slate);
  font-size: 12px;
  min-width: 0;
}

.cw-group-card li > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cw-group-card li .cw-num {
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-complete-notice {
  margin: 20px 0 0;
  padding: 13px 15px;
  color: #66460b;
  background: #fff7e8;
  border: 1px solid #eed9ab;
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.5;
}

.cw-complete-counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.cw-complete-count {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 14px;
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 11px;
}

.cw-complete-count strong {
  color: var(--cw-ink);
  font-size: 19px;
}

.cw-complete-count span {
  color: var(--cw-slate);
  font-size: 11.5px;
  line-height: 1.35;
  text-transform: capitalize;
}

.cw-complete-section {
  margin-top: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--cw-line);
  border-radius: 13px;
}

.cw-complete-section > h3,
.cw-group-card > h3,
.cw-group-card > h4 {
  margin: 0 0 7px;
  color: var(--cw-ink);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cw-complete-section > .cw-consumer-eyebrow,
.cw-group-card > .cw-consumer-eyebrow {
  margin-bottom: 4px;
}

.cw-complete-review { border-left: 3px solid #d6972d; }

.cw-complete-gap { border-left: 3px solid var(--cw-danger); }

.cw-complete-citation {
  margin-inline: 0;
  border-left: 3px solid var(--cw-cobalt);
}

.cw-complete-citation small {
  color: var(--cw-slate);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.cw-complete-page + .cw-section-sub {
  margin: 11px 0 7px;
}

.cw-evaluation {
  border-color: rgba(73, 103, 242, 0.35);
  background: linear-gradient(180deg, rgba(239, 243, 255, 0.82), rgba(255, 255, 255, 0.65));
}

.cw-evaluation-binding {
  margin: 12px 0 0;
  color: var(--cw-slate);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.cw-evaluation-panel {
  margin-top: 18px;
  padding: 17px;
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 13px;
  box-shadow: 0 9px 24px rgba(26, 39, 72, 0.055);
}

.cw-evaluation-panel > h3,
.cw-evaluation-heading h3,
.cw-evaluation-record > h4,
.cw-evaluation-secondary-export h2 {
  margin: 0 0 7px;
  color: var(--cw-ink);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cw-evaluation-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.cw-evaluation-badge {
  flex: none;
  padding: 5px 8px;
  color: var(--cw-slate);
  background: var(--cw-cloud);
  border: 1px solid var(--cw-line);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 760;
  line-height: 1.25;
}

.cw-evaluation-badge.is-selected {
  color: #155b3a;
  background: #eaf8f0;
  border-color: #b7dfc8;
}

.cw-evaluation-record {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--cw-line-soft);
}

.cw-evaluation-record:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.cw-evaluation-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.cw-evaluation-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 11px;
  background: var(--cw-cloud);
  border: 1px solid var(--cw-line-soft);
  border-radius: 9px;
}

.cw-evaluation-metric strong {
  color: var(--cw-ink);
  font-size: 13px;
}

.cw-evaluation-metric span {
  color: var(--cw-slate);
  font-size: 10.5px;
  line-height: 1.35;
}

.cw-exact-record {
  min-width: 0;
  margin-top: 12px;
}

.cw-exact-record-label {
  margin: 0 0 6px;
  color: var(--cw-slate);
  font-size: 10.5px;
  font-weight: 780;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.cw-exact-json {
  width: 100%;
  margin: 0;
  padding: 13px;
  color: #24324a;
  background: #f7f9fd;
  border: 1px solid var(--cw-line-soft);
  border-radius: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#v2-blind-review-attestations {
  box-sizing: border-box;
  width: 100%;
  min-height: 12rem;
  margin: 8px 0 12px;
  padding: 12px;
  color: var(--cw-ink);
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
  resize: vertical;
}

.cw-evaluation-secondary-export {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--cw-line);
}

@media (max-width: 520px) {
  .cw-evaluation-heading {
    display: block;
  }

  .cw-evaluation-badge {
    display: inline-block;
    margin: 3px 0 9px;
  }

  .cw-evaluation-panel,
  .cw-exact-json {
    padding: 12px;
  }
}

@media (forced-colors: active) {
  .cw-evaluation,
  .cw-evaluation-panel,
  .cw-evaluation-badge,
  .cw-evaluation-metric,
  .cw-exact-json {
    border: 1px solid CanvasText;
  }
}

.cw-intake-wrap {
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid var(--cw-line);
  border-radius: 11px;
  background: var(--cw-white);
}

.cw-intake-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.cw-intake-table th {
  padding: 10px 14px;
  text-align: left;
  color: var(--cw-slate);
  font-size: 10.5px;
  font-weight: 780;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--cw-line-soft);
  white-space: nowrap;
}

.cw-intake-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--cw-line-soft);
  vertical-align: top;
}

.cw-intake-table tr:last-child td {
  border-bottom: 0;
}

.cw-intake-table td.cw-intake-why {
  color: var(--cw-slate);
  line-height: 1.45;
  min-width: 260px;
}

.cw-records-empty {
  padding: 40px 20px;
  text-align: center;
  background: var(--cw-white);
  border: 1px dashed var(--cw-line);
  border-radius: 14px;
}

.cw-records-empty b {
  display: block;
  font-size: 16px;
  font-weight: 750;
  margin-bottom: 6px;
}

.cw-records-empty p {
  margin: 0 0 14px;
  color: var(--cw-slate);
  font-size: 13px;
  line-height: 1.5;
}

.cw-records-state[hidden],
.cw-records-ready[hidden] {
  display: none;
}

/* ---------- export ---------- */
.cw-folder-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.cw-folder-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--cw-ink-soft);
}

.cw-folder-list li svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--cw-cobalt);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cw-folder-list li small {
  color: var(--cw-slate);
  font-size: 12px;
  font-weight: 520;
}

.cw-integrity-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  color: var(--cw-slate);
  font-size: 12.5px;
  line-height: 1.5;
}

.cw-integrity-line svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
  fill: none;
  stroke: var(--cw-success);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- check-email ---------- */
.cw-code-boxes {
  display: flex;
  gap: 9px;
  justify-content: space-between;
  margin: 6px 0 0;
}

.cw-code-boxes input {
  width: 100%;
  max-width: 62px;
  height: 62px;
  text-align: center;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--cw-ink);
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 10px;
}

.cw-code-boxes input:focus {
  outline: none;
  border-color: var(--cw-cobalt);
  box-shadow: 0 0 0 4px var(--cw-cobalt-wash);
}

.cw-resend {
  margin: 18px 0 0;
  color: var(--cw-slate);
  font-size: 13px;
  text-align: center;
}

.cw-resend button {
  min-height: 44px;
  padding: 8px 2px;
  background: transparent;
  border: 0;
  color: var(--cw-cobalt);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(73, 103, 242, 0.3);
  text-underline-offset: 3px;
}

.cw-resend button:disabled {
  color: var(--cw-slate-light);
  cursor: default;
  text-decoration: none;
}

.cw-mode-block[hidden] {
  display: none;
}

.cw-link-sent {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 26px 18px;
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 13px;
  text-align: center;
}

.cw-link-sent svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--cw-cobalt);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 4px;
}

.cw-link-sent b {
  font-size: 15px;
  font-weight: 750;
}

.cw-link-sent small {
  color: var(--cw-slate);
  font-size: 12.5px;
  line-height: 1.5;
  max-width: 38ch;
}

/* ---------- account and close-out ---------- */
.cw-account-section {
  margin-top: 18px;
  padding: 20px;
  background: var(--cw-white);
  border: 1px solid var(--cw-line);
  border-radius: 14px;
}

.cw-account-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.cw-account-heading .cw-consumer-eyebrow { margin-bottom: 5px; }

.cw-account-heading h2 {
  margin: 0;
  color: var(--cw-ink);
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.018em;
}

.cw-account-state {
  flex: 0 0 auto;
  padding: 5px 9px;
  color: var(--cw-ink-soft);
  background: var(--cw-cloud);
  border: 1px solid var(--cw-line-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 720;
}

.cw-account-grid,
.cw-account-list {
  margin: 0;
}

.cw-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cw-account-grid > div {
  min-width: 0;
  padding: 13px 14px;
  background: var(--cw-cloud);
  border-radius: 10px;
}

.cw-account-grid dt,
.cw-account-list dt {
  color: var(--cw-slate);
  font-size: 12px;
  font-weight: 680;
}

.cw-account-grid dd {
  margin: 5px 0 0;
  color: var(--cw-ink);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.cw-account-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-top: 1px solid var(--cw-line-soft);
}

.cw-account-list > div:first-child { border-top: 0; }

.cw-account-list dd {
  margin: 0;
  color: var(--cw-ink);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.cw-account-actions {
  display: flex;
  margin-top: 16px;
}

.cw-referral-copy {
  color: var(--cw-slate);
  font-size: 13px;
  line-height: 1.5;
}

.cw-referral-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.cw-danger-zone {
  border-color: rgba(166, 64, 54, 0.32);
}

.cw-danger-zone > p {
  color: var(--cw-slate);
  font-size: 13px;
  line-height: 1.55;
}

.cw-danger-zone > p a {
  color: var(--cw-cobalt);
  font-weight: 680;
}

.cw-close-confirm {
  display: grid;
  gap: 15px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--cw-line-soft);
}

.cw-button-danger {
  min-height: 44px;
  color: var(--cw-white);
  background: var(--cw-danger);
  border-color: var(--cw-danger);
}

.cw-button-danger:hover:not(:disabled) { background: #882f28; }

.cw-account-result {
  margin: 16px 0 0;
  padding: 13px 14px;
  color: var(--cw-ink-soft);
  background: var(--cw-success-pale);
  border: 1px solid rgba(34, 116, 82, 0.28);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- consumer footer (product-level, no firm line) ---------- */
.cw-consumer-footer {
  align-items: center;
  font-size: 12px;
}

.cw-consumer-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--cw-slate);
  font-size: inherit;
}

/* ---------- responsive ---------- */
@media (max-width: 560px) {
  .cw-consumer-bar {
    padding: 16px 20px;
  }

  .cw-header-secondary { display: none !important; }

  .cw-account-grid { grid-template-columns: 1fr; }

  .cw-account-list > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .cw-account-list dd { text-align: left; }

  .cw-referral-link-row { grid-template-columns: 1fr; }

  .cw-consumer-main {
    padding: 28px 18px 32px;
  }

  .cw-consumer-card h1 {
    font-size: 28px;
  }

  .cw-consumer-rail {
    width: calc(100% - 36px);
  }

  .cw-folder-list li {
    display: grid;
    grid-template-columns: 17px minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 1px;
    align-items: start;
  }

  .cw-folder-list li small {
    grid-column: 2;
    display: block;
  }

  .cw-stat-grid {
    grid-template-columns: 1fr;
  }

  .cw-tl-entry {
    flex-direction: column;
    gap: 4px;
  }

  .cw-tl-when {
    flex: none;
  }

  .cw-code-boxes {
    gap: 6px;
  }

  .cw-code-boxes input {
    height: 52px;
    font-size: 20px;
  }

  .cw-drop {
    min-height: 170px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- verified v2 visual system ----------
 *
 * Portal pages reuse the wide legaltech _client shell. The organized record reuses the
 * current legaltech _workspace information architecture and the evidence heatmap geometry.
 * These rules are scoped because the production consumer static allowlist deliberately serves
 * only the shared client styles; no parallel product language or third-party asset is loaded.
 */

.cw-v2-portal-body .cw-client-bar {
  position: sticky;
  z-index: 40;
  top: 0;
}

.cw-v2-header-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--cw-cobalt-deep);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.cw-v2-header-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cw-v2-portal-body .cw-client-help {
  min-height: 44px;
  padding-right: 4px;
  padding-left: 4px;
}

.cw-v2-portal-main {
  padding-top: 24px;
  padding-bottom: 48px;
}

.cw-v2-portal-card {
  min-width: 0;
  padding: 34px 38px 38px;
  background: var(--cw-white);
  border: 1px solid var(--cw-line-soft);
  border-radius: 16px;
  box-shadow: var(--cw-shadow);
}

.cw-v2-portal-card > .cw-consumer-eyebrow:first-child {
  margin-top: 0;
}

.cw-v2-portal-card > h1 {
  max-width: 820px;
  margin: 5px 0 0;
  color: var(--cw-ink);
  font-size: clamp(32px, 3.5vw, 42px);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.cw-v2-portal-card > .cw-consumer-lede {
  max-width: 850px;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.58;
}

.cw-v2-portal-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.cw-v2-export-card {
  max-width: 900px;
  margin-right: auto;
  margin-left: auto;
}

.cw-v2-workspace-body {
  --cw-ink: #081625;
  --cw-ink-soft: #13253a;
  --cw-cobalt-pale: #e8ecff;
  --cw-cobalt-wash: rgba(73, 103, 242, 0.08);
  --cw-saffron: #d88725;
  --cw-saffron-deep: #a45d08;
  --cw-saffron-pale: #fff3df;
  --cw-cloud-deep: #e8edf5;
  --cw-slate: #657487;
  --cw-slate-deep: #4d5d6f;
  --cw-slate-light: #8d9aab;
  --cw-line: rgba(8, 22, 37, 0.14);
  --cw-line-soft: rgba(8, 22, 37, 0.08);
  --cw-line-faint: rgba(8, 22, 37, 0.05);
  --cw-success: #247a52;
  --cw-success-pale: #e9f5ef;
  --cw-danger: #a73d32;
  --cw-danger-pale: #fbecea;
  --cw-shadow: 0 1px 2px rgba(8, 22, 37, 0.04),
    0 14px 34px -26px rgba(8, 22, 37, 0.42);
  --cw-shadow-high: 0 24px 70px -30px rgba(8, 22, 37, 0.46);
  --cw-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --cw-bar-height: 64px;
  --cw-sidebar-width: 256px;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  color: var(--cw-ink);
  background: var(--cw-cloud);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

.cw-v2-workspace-body .cw-app {
  min-height: 100vh;
}

.cw-v2-workspace-body .cw-global-bar {
  position: relative;
  z-index: 40;
  height: var(--cw-bar-height);
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--cw-line-soft);
}

.cw-v2-workspace-body .cw-brand {
  min-width: calc(var(--cw-sidebar-width) - 24px);
  display: inline-flex;
  align-items: center;
  color: var(--cw-midnight);
  text-decoration: none;
}

.cw-v2-workspace-body .cw-global-context {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cw-slate);
  font-size: 13px;
}

.cw-v2-workspace-body .cw-global-context strong {
  overflow: hidden;
  color: var(--cw-ink);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-v2-workspace-body .cw-global-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.cw-v2-workspace-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  color: var(--cw-slate-deep);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.cw-v2-workspace-action:hover {
  color: var(--cw-ink);
  background: var(--cw-cloud);
  border-color: var(--cw-line-soft);
}

.cw-v2-workspace-body .cw-icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--cw-slate-deep);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
}

.cw-v2-workspace-body .cw-icon-button svg {
  width: 18px;
  height: 18px;
}

.cw-v2-workspace-body .cw-mobile-menu {
  display: none;
}

.cw-v2-workspace-body .cw-frame {
  height: calc(100vh - var(--cw-bar-height));
  display: grid;
  grid-template-columns: var(--cw-sidebar-width) minmax(0, 1fr);
}

.cw-v2-workspace-body .cw-sidebar {
  position: relative;
  z-index: 30;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: rgba(255, 255, 255, 0.72);
  border-right: 1px solid var(--cw-line-soft);
}

.cw-v2-workspace-body .cw-side-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 16px;
}

.cw-v2-workspace-body .cw-side-back {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  color: var(--cw-slate-deep);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
}

.cw-v2-workspace-body .cw-side-back:hover {
  color: var(--cw-ink);
  background: var(--cw-white);
}

.cw-v2-workspace-body .cw-side-back svg {
  width: 14px;
  height: 14px;
}

.cw-v2-workspace-body .cw-side-matter {
  margin: 8px 6px 20px;
  padding: 14px 4px 16px;
  border-bottom: 1px solid var(--cw-line-soft);
}

.cw-v2-workspace-body .cw-side-matter strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-v2-workspace-body .cw-side-matter small {
  display: block;
  margin-top: 3px;
  color: var(--cw-slate);
  font-size: 11px;
}

.cw-v2-workspace-body .cw-side-nav {
  display: grid;
  gap: 2px;
}

.cw-v2-workspace-body .cw-nav-label {
  margin: 18px 10px 6px;
  color: var(--cw-slate-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.cw-v2-workspace-body .cw-side-link {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  color: var(--cw-slate-deep);
  background: transparent;
  border: 0;
  border-radius: 4px;
  text-align: left;
  text-decoration: none;
}

.cw-v2-workspace-body .cw-side-link:hover {
  color: var(--cw-ink);
  background: rgba(255, 255, 255, 0.82);
}

.cw-v2-workspace-body .cw-side-link[aria-current="page"] {
  color: var(--cw-ink);
  background: var(--cw-white);
  box-shadow: inset 3px 0 0 var(--cw-cobalt);
}

.cw-v2-workspace-body .cw-side-link svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke-width: 1.7;
}

.cw-v2-workspace-body .cw-side-link span {
  min-width: 0;
  flex: 1;
  font-size: 13px;
  font-weight: 600;
}

.cw-v2-workspace-body .cw-side-trust {
  margin: auto 6px 0;
  padding: 14px 10px 2px;
  color: var(--cw-slate);
  border-top: 1px solid var(--cw-line-soft);
}

.cw-v2-workspace-body .cw-side-trust strong {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--cw-success);
  font-size: 12px;
}

.cw-v2-workspace-body .cw-side-trust svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.cw-v2-workspace-body .cw-side-trust p {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.55;
}

.cw-v2-workspace-body .cw-main {
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #f6f8fb;
  scroll-behavior: smooth;
}

.cw-v2-analysis-page {
  width: min(1240px, calc(100% - 72px));
  margin: 0 auto;
  padding: 44px 0 88px;
}

.cw-v2-workspace-body .cw-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 26px;
}

.cw-v2-workspace-body .cw-page-head-copy {
  min-width: 0;
}

.cw-v2-workspace-body .cw-kicker {
  margin: 0 0 8px;
  color: var(--cw-cobalt-deep);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.cw-v2-workspace-body .cw-page-head h1 {
  max-width: 920px;
  margin: 0;
  color: var(--cw-ink);
  font-family: var(--cw-serif);
  font-size: clamp(46px, 4.2vw, 58px);
  font-weight: 430;
  letter-spacing: -0.025em;
  line-height: 1.06;
}

.cw-v2-workspace-body .cw-page-head p:not(.cw-kicker) {
  max-width: 780px;
  margin: 12px 0 0;
  color: var(--cw-slate-deep);
  font-size: 16px;
  line-height: 1.55;
}

.cw-v2-workspace-body .cw-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.cw-v2-workspace-body .cw-button {
  min-height: 40px;
  border-radius: 3px;
  font-size: 13px;
}

.cw-v2-workspace-body .cw-panel {
  background: var(--cw-white);
  border: 1px solid rgba(8, 22, 37, 0.13);
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(8, 22, 37, 0.035);
}

.cw-v2-workspace-body .cw-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.cw-v2-workspace-body .cw-section-head h2,
.cw-v2-workspace-body .cw-v2-view-subsection > h3 {
  margin: 0;
  color: var(--cw-ink);
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.cw-v2-workspace-body .cw-section-head p:not(.cw-kicker) {
  max-width: 760px;
  margin: 5px 0 0;
  color: var(--cw-slate);
  font-size: 14px;
  line-height: 1.45;
}

.cw-v2-workspace-status {
  margin: 0 0 14px;
  padding: 12px 14px;
  color: var(--cw-slate-deep);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--cw-line-soft);
  border-radius: 4px;
  font-size: 13px;
}

.cw-v2-workspace-view {
  min-width: 0;
  max-width: 100%;
  margin-top: 24px;
  padding: 28px 30px 32px;
  overflow: hidden;
  scroll-margin-top: 18px;
}

.cw-v2-view-subsection {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--cw-line-soft);
}

.cw-v2-view-subsection > h3 {
  font-size: 21px !important;
}

.cw-v2-workspace-details {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--cw-line-soft);
}

.cw-v2-workspace-details > summary {
  min-height: 40px;
  cursor: pointer;
  color: var(--cw-ink);
  font-size: 15px;
  font-weight: 720;
}

.cw-v2-workspace-body .cw-complete-notice {
  border-radius: 4px;
}

.cw-v2-workspace-body .cw-complete-section,
.cw-v2-workspace-body .cw-group-card,
.cw-v2-workspace-body .cw-evaluation-panel {
  border-radius: 4px;
  box-shadow: none;
}

.cw-v2-workspace-body .cw-evaluation {
  background: var(--cw-white);
  border-color: rgba(73, 103, 242, 0.28);
}

.cw-v2-workspace-body .cw-exact-json {
  border-radius: 3px;
}

.cw-v2-workspace-footer {
  padding: 30px 0 0;
  color: var(--cw-slate);
  font-size: 11px;
  text-align: center;
}

/* Chronology density geometry copied from the current legaltech evidence view. */
.cw-v2-workspace-body .cw-heat {
  max-width: 100%;
  margin-top: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
}

#v2-chronology-heatmap {
  min-width: 0;
  max-width: 100%;
}

.cw-v2-workspace-body .cw-heat-row {
  min-width: 560px;
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: center;
  gap: 18px;
  padding: 4px 0;
}

.cw-v2-workspace-body .cw-heat-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(48px, 1fr);
  gap: 8px;
}

.cw-v2-workspace-body .cw-heat-label {
  color: var(--cw-slate-deep);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}

.cw-v2-workspace-body .cw-heat-headrow {
  padding-bottom: 4px;
}

.cw-v2-workspace-body .cw-heat-year {
  color: var(--cw-slate-light);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-align: center;
}

.cw-v2-workspace-body .cw-heat-cell {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cw-white);
  background: var(--cw-cobalt);
  border-radius: 6px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.cw-v2-workspace-body .cw-heat-cell.empty {
  color: var(--cw-slate);
  background: var(--cw-line-soft);
  opacity: 0.5;
}

.cw-v2-workspace-body .cw-heat-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 0 4px;
  color: var(--cw-slate);
  font-size: 12px;
}

.cw-v2-workspace-body .cw-heat-key {
  width: 11px;
  height: 11px;
  display: inline-block;
  background: var(--cw-cobalt);
  border-radius: 3px;
}

@media (max-width: 900px) {
  .cw-v2-workspace-body {
    overflow: auto;
  }

  .cw-v2-workspace-body .cw-global-bar {
    position: sticky;
    top: 0;
    padding: 0 14px;
  }

  .cw-v2-workspace-body .cw-brand {
    min-width: 0;
  }

  .cw-v2-workspace-body .cw-global-context {
    display: none;
  }

  .cw-v2-workspace-body .cw-mobile-menu {
    display: inline-grid;
  }

  .cw-v2-workspace-body .cw-frame {
    height: auto;
    min-height: calc(100vh - var(--cw-bar-height));
    display: block;
  }

  .cw-v2-workspace-body .cw-sidebar {
    position: fixed;
    z-index: 180;
    top: var(--cw-bar-height);
    bottom: 0;
    left: 0;
    width: min(300px, 88vw);
    border-right-color: var(--cw-line);
    box-shadow: var(--cw-shadow-high);
    transform: translateX(-105%);
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .cw-v2-workspace-body .cw-sidebar[data-open="true"] {
    transform: translateX(0);
  }

  .cw-v2-workspace-body .cw-main {
    min-height: calc(100vh - var(--cw-bar-height));
    overflow: visible;
  }

  .cw-v2-analysis-page {
    width: min(100% - 32px, 760px);
    padding-top: 34px;
  }

  .cw-v2-workspace-body .cw-page-head {
    display: grid;
    gap: 18px;
  }

  .cw-v2-workspace-body .cw-page-head h1 {
    font-size: 48px;
  }

  .cw-v2-workspace-body .cw-page-actions {
    justify-content: flex-start;
  }

  .cw-v2-workspace-view {
    padding: 24px;
  }
}

@media (max-width: 680px) {
  .cw-v2-portal-main {
    width: calc(100% - 24px);
    padding-top: 16px;
  }

  .cw-v2-portal-card {
    padding: 24px 20px 28px;
    border-radius: 12px;
  }

  .cw-v2-portal-footer {
    width: calc(100% - 24px);
  }

  .cw-v2-workspace-body {
    --cw-bar-height: 60px;
  }

  .cw-v2-workspace-body .cw-global-bar {
    gap: 6px;
  }

  .cw-v2-workspace-body .cw-brand .cw-text-wordmark {
    font-size: 15px;
  }

  .cw-v2-workspace-action {
    min-width: 38px;
    padding: 0 6px;
    font-size: 11px;
  }

  .cw-v2-workspace-action[href$="account/"] {
    display: none;
  }

  .cw-v2-analysis-page {
    width: calc(100% - 24px);
    padding: 28px 0 60px;
  }

  .cw-v2-workspace-body .cw-page-head h1 {
    font-size: 40px;
    line-height: 1.08;
  }

  .cw-v2-workspace-body .cw-page-head p:not(.cw-kicker) {
    font-size: 14px;
  }

  .cw-v2-workspace-view {
    padding: 20px 16px 24px;
  }

  .cw-v2-workspace-body .cw-section-head {
    display: grid;
  }

  .cw-v2-workspace-body .cw-section-head h2 {
    font-size: 23px;
  }

  .cw-v2-workspace-body .cw-heat-row {
    grid-template-columns: 145px 1fr;
  }
}

@media (forced-colors: active) {
  .cw-v2-portal-card,
  .cw-v2-workspace-body .cw-sidebar,
  .cw-v2-workspace-body .cw-panel,
  .cw-v2-workspace-body .cw-heat-cell {
    border: 1px solid CanvasText;
  }
}
