:root {
  --canvas: #f9f9f5;
  --surface: #ffffff;
  --surface-muted: #f1f2ee;
  --ink: #111317;
  --ink-secondary: #59616d;
  --ink-tertiary: #7a828e;
  --navy: #1c2b49;
  --berry: #c63f5a;
  --berry-soft: #f8e8ec;
  --border: #d9dde3;
  --success: #177245;
  --success-soft: #e7f4ed;
  --warning: #9a6700;
  --warning-soft: #fff3d6;
  --danger: #b42318;
  --shadow: 0 14px 40px rgba(17, 19, 23, 0.08);
  --radius: 8px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { max-width: 100%; overflow-x: hidden; }

body { max-width: 100%; margin: 0; min-width: 320px; overflow-x: hidden; background: var(--canvas); }

button, input, textarea, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }

.shell { min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 12px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--border);
  background: rgba(249, 249, 245, 0.96);
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark {
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}
.brand-name { font-size: 17px; font-weight: 720; }
.brand-caption { color: var(--ink-secondary); font-size: 12px; margin-top: 2px; }

.balance { text-align: right; }
.balance-label { color: var(--ink-tertiary); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.balance-value { margin-top: 2px; font-weight: 720; }
.profile {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  font-weight: 700;
}
.header-action {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--navy);
  background: var(--surface);
  cursor: pointer;
  font-weight: 700;
}

.main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 52px 0 80px; }
.main.narrow { width: min(820px, calc(100% - 48px)); }

.eyebrow { color: var(--berry); font-size: 12px; font-weight: 760; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 820px; margin-bottom: 16px; font-size: clamp(32px, 4vw, 52px); line-height: 1.08; font-weight: 730; }
h2 { font-size: 25px; line-height: 1.2; }
h3 { font-size: 16px; line-height: 1.35; }
.lead { max-width: 760px; color: var(--ink-secondary); font-size: 18px; line-height: 1.55; }
.muted { color: var(--ink-secondary); }
.small { font-size: 13px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 680;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, .task-option:focus-visible {
  outline: 3px solid rgba(198, 63, 90, 0.24);
  outline-offset: 2px;
}
.button.primary { color: #fff; background: var(--navy); }
.button.secondary { color: var(--ink); border-color: var(--border); background: var(--surface); }
.button.berry { color: #fff; background: var(--berry); }
.button.danger { color: #fff; background: var(--danger); }
.button.ghost { color: var(--navy); background: transparent; }
.button:disabled { cursor: wait; opacity: 0.55; transform: none; }

.rule { height: 1px; margin: 40px 0; background: var(--border); }
.three-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 46px; border-block: 1px solid var(--border); }
.step { min-height: 190px; padding: 28px; border-right: 1px solid var(--border); }
.step:last-child { border-right: 0; }
.step-number { color: var(--berry); font-size: 13px; font-weight: 800; }
.step h3 { margin: 38px 0 8px; font-size: 18px; }
.step p { margin-bottom: 0; color: var(--ink-secondary); line-height: 1.55; }

.task-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 32px; }
.task-option {
  width: 100%;
  min-height: 126px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.task-option:hover { border-color: var(--navy); }
.task-option strong { display: block; margin-bottom: 8px; font-size: 17px; }
.task-option span { color: var(--ink-secondary); line-height: 1.45; }
.task-option.compact { min-height: 108px; padding: 18px; }
.task-option.custom { border-style: dashed; }

.form-panel { margin-top: 32px; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
label { display: block; margin-bottom: 8px; font-weight: 690; }
textarea, input[type="text"], input[type="email"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
}
textarea { min-height: 210px; padding: 16px; resize: vertical; line-height: 1.55; }
input[type="text"], input[type="email"] { min-height: 46px; padding: 10px 14px; }
.hint { margin: 9px 0 0; color: var(--ink-tertiary); font-size: 13px; line-height: 1.45; }

.case-meta { margin-top: 6px; color: var(--ink-secondary); font-size: 13px; overflow-wrap: anywhere; }
.status { width: fit-content; padding: 5px 8px; border-radius: 6px; color: var(--warning); background: var(--warning-soft); font-size: 12px; font-weight: 700; }
.case-files { color: var(--ink-secondary); font-size: 13px; text-align: right; }

.case-layout { display: grid; grid-template-columns: 1fr 300px; gap: 34px; margin-top: 34px; }
.case-heading h1 { max-width: 900px; margin-bottom: 0; }
.case-heading p { max-width: 760px; margin: 10px 0 0; color: var(--ink-secondary); line-height: 1.45; }
.lead.compact { max-width: 760px; margin-bottom: 26px; }
.case-task p { margin: 10px 0 0; white-space: pre-wrap; }
.explanation-editor { margin-top: 0; }
.explanation-editor textarea:disabled { color: var(--ink-secondary); background: var(--surface-muted); }
.case-side { border-left: 1px solid var(--border); padding-left: 28px; }
.stage-list { margin: 0; padding: 0; list-style: none; }
.stage-list li { margin: 0 0 6px; }
.stage-button { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; min-height: 42px; padding: 8px 10px; border: 0; border-radius: var(--radius); color: var(--ink-secondary); background: transparent; text-align: left; cursor: pointer; }
.stage-button:hover:not(:disabled) { color: var(--ink); background: var(--surface-muted); }
.stage-button:focus-visible { outline: 3px solid rgba(198, 63, 90, 0.24); outline-offset: 2px; }
.stage-button:disabled { cursor: not-allowed; opacity: 0.48; }
.stage-dot { width: 10px; height: 10px; border: 2px solid var(--border); border-radius: 50%; background: var(--canvas); }
.stage-list li.complete .stage-dot { border-color: var(--navy); background: var(--navy); box-shadow: inset 0 0 0 2px var(--canvas); }
.stage-list li.active .stage-button { color: var(--ink); background: var(--surface-muted); font-weight: 750; }
.stage-list li.active .stage-dot { border-color: var(--berry); background: var(--berry); box-shadow: none; }
.case-navigation { display: grid; grid-template-columns: minmax(140px, auto) 1fr minmax(180px, auto); gap: 18px; align-items: center; margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--border); }
.case-navigation span { color: var(--ink-tertiary); font-size: 13px; text-align: center; }
.case-navigation .button:last-child { justify-self: end; }

.upload-zone {
  display: grid;
  place-items: center;
  min-height: 210px;
  margin-top: 24px;
  padding: 32px;
  border: 1px dashed #aeb5bf;
  border-radius: var(--radius);
  background: var(--surface-muted);
  text-align: center;
}
.upload-zone input { max-width: 100%; }
.file-list { margin-top: 24px; border-top: 1px solid var(--border); }
.file-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.file-row-main { min-width: 0; }
.file-name { overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.select-control { display: grid; width: 22px; min-height: 22px; place-items: center; margin: 0; cursor: pointer; }
.select-control input { width: 17px; height: 17px; margin: 0; accent-color: var(--navy); }

.notice { padding: 14px 16px; border-radius: var(--radius); color: var(--ink-secondary); background: var(--surface-muted); line-height: 1.45; }
.notice.error { color: var(--danger); background: #fff0ee; }
.notice.success { color: var(--success); background: var(--success-soft); }
.notice.warning { color: var(--warning); background: var(--warning-soft); }
.notice > strong + span { margin-left: 8px; }
.retention-note > strong + span { margin-left: 0; }
.processing-notice { display: flex; align-items: center; gap: 12px; }
.processing-spinner { width: 18px; height: 18px; flex: 0 0 18px; border: 2px solid var(--border); border-top-color: var(--berry); border-radius: 50%; animation: processing-spin 800ms linear infinite; }
.participant-list { display: grid; gap: 12px; margin-top: 22px; }
.participant-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px 240px 90px; gap: 20px; align-items: center; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.participant-row.protected-data-row { grid-template-columns: minmax(0, 1fr) 170px 240px; }
.participant-row.needs-review { background: var(--warning-soft); }
.participant-person { display: grid; gap: 5px; min-width: 0; }
.participant-person strong { overflow-wrap: anywhere; }
.participant-person span, .participant-token, .participant-role span, .participant-number span { color: var(--ink-secondary); font-size: 12px; }
.participant-person .participant-link-note { color: var(--berry); font-weight: 700; }
.participant-token { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.participant-role, .participant-number { display: grid; gap: 5px; margin: 0; }
.participant-role select, .participant-number select { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.boundary-editor-cell { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: start; padding-top: 14px; border-top: 1px solid var(--border); }
.selected-fragments { display: grid; gap: 8px; min-width: 0; }
.selected-fragments-label { color: var(--ink-secondary); font-size: 12px; font-weight: 700; }
.selected-fragments-list { display: grid; gap: 6px; }
.selected-fragment { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 8px 10px; border-left: 3px solid var(--berry); background: var(--surface-muted); overflow-wrap: anywhere; }
.selected-fragment small { color: var(--success); font-size: 11px; font-weight: 700; }
.boundary-editor { justify-self: end; }
.boundary-editor summary { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--navy); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 700; list-style-position: inside; }
.boundary-editor summary small { color: var(--ink-secondary); font-size: 11px; font-weight: 500; }
.boundary-editor[open] { grid-column: 1 / -1; width: 100%; }
.boundary-editor[open] summary { width: fit-content; margin-left: auto; }
.boundary-editor-content { margin-top: 12px; padding: 0 14px 4px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-muted); }
.boundary-editor-content > .muted { margin: 12px 0 14px; }
.occurrence-editor { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--border); }
.occurrence-heading, .occurrence-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.occurrence-context { width: 100%; min-height: 112px; resize: vertical; border: 1px solid var(--border); border-radius: var(--radius); background: white; color: var(--ink); padding: 12px; font: 15px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.occurrence-context::selection { color: white; background: var(--berry); }
.occurrence-preview { min-width: 0; color: var(--ink-secondary); font-size: 13px; overflow-wrap: anywhere; }
.protected-summary { display: flex; justify-content: space-between; gap: 20px; margin-top: 22px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.protected-summary span { color: var(--ink-secondary); text-align: right; }
.protected-data-list { margin-top: 12px; }
.manual-entity { margin-top: 22px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.manual-entity summary { cursor: pointer; font-weight: 700; }
.manual-entity-form { display: grid; grid-template-columns: minmax(260px, 1fr) 240px 90px auto; gap: 12px; align-items: end; margin-top: 16px; }
.manual-entity-form label { display: grid; gap: 7px; color: var(--ink-secondary); font-size: 13px; }
.manual-entity-form input,
.manual-entity-form select { width: 100%; min-height: 44px; border: 1px solid var(--border); background: white; color: var(--ink); padding: 8px 10px; font: inherit; }
@keyframes processing-spin { to { transform: rotate(360deg); } }

.access-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, auto) auto;
  gap: 18px;
  align-items: end;
  margin: 32px 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.checkbox-field, .switch-field { display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; }
.checkbox-field input, .switch-field input { width: 18px; height: 18px; accent-color: var(--navy); }
.checkbox-field span { display: grid; gap: 2px; }
.checkbox-field small { color: var(--ink-secondary); font-weight: 400; }
.access-table { border-top: 1px solid var(--border); }
.access-row { display: grid; grid-template-columns: minmax(260px, 1fr) 180px 180px; gap: 24px; align-items: center; min-height: 72px; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.access-head { min-height: 42px; color: var(--ink-tertiary); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.access-person { display: grid; gap: 5px; min-width: 0; }
.access-person strong { overflow-wrap: anywhere; }
.access-person span { color: var(--ink-secondary); font-size: 13px; }
.switch-field input:disabled { cursor: not-allowed; }
.switch-field span { color: var(--ink-secondary); font-size: 13px; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr); }
.login-story { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 8vw; background: var(--navy); color: #fff; }
.login-story h1 { font-size: clamp(36px, 5vw, 66px); }
.login-story .lead { color: rgba(255,255,255,0.72); }
.login-points { margin-top: 48px; border-top: 1px solid rgba(255,255,255,0.2); }
.login-point { padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,0.2); }
.login-point strong { display: block; margin-bottom: 4px; }
.login-point span { color: rgba(255,255,255,0.68); }
.login-form { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 8vw; background: var(--surface); }
.login-form h2 { margin-bottom: 12px; font-size: 30px; }

@media (max-width: 820px) {
  .topbar { padding-inline: 16px; }
  .brand-caption, .balance-label { display: none; }
  .main, .main.narrow { width: min(100% - 28px, 720px); padding-top: 34px; }
  .three-steps, .task-grid, .case-layout, .login-page { grid-template-columns: 1fr; }
  .step { min-height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .step:last-child { border-bottom: 0; }
  .step h3 { margin-top: 16px; }
  .case-side { border-left: 0; border-top: 1px solid var(--border); padding: 24px 0 0; }
  .case-navigation { grid-template-columns: 1fr 1fr; }
  .case-navigation span { display: none; }
  .case-navigation .button { width: 100%; }
  .case-files { text-align: left; }
  .login-story { min-height: 360px; padding: 48px 28px; }
  .login-story h1 { max-width: 100%; font-size: 34px; overflow-wrap: anywhere; }
  .login-story .lead, .login-point span { overflow-wrap: anywhere; }
  .login-form { min-height: 420px; padding: 48px 28px; }
  .login-form h2 { max-width: 100%; font-size: 28px; overflow-wrap: anywhere; }
  .header-action { margin-left: auto; }
  .balance { display: none; }
  .access-form, .access-row { grid-template-columns: 1fr; }
  .participant-row { grid-template-columns: 1fr; gap: 10px; }
  .participant-row.protected-data-row { grid-template-columns: 1fr; }
  .boundary-editor-cell { grid-template-columns: 1fr; }
  .boundary-editor { justify-self: stretch; }
  .boundary-editor summary { justify-content: space-between; }
  .boundary-editor[open] summary { width: 100%; margin-left: 0; }
  .selected-fragment { grid-template-columns: 1fr; gap: 4px; }
  .occurrence-heading, .occurrence-actions { align-items: stretch; flex-direction: column; }
  .manual-entity-form { grid-template-columns: 1fr; }
  .protected-summary { flex-direction: column; }
  .protected-summary span { text-align: left; }
  .access-head { display: none; }
  .access-row { gap: 12px; padding-block: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .processing-spinner { animation: none; }
}

/* Pencil-aligned product shell */
.app-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: 100vh;
  min-width: 0;
  flex-direction: column;
  padding: 24px 18px 18px;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.sidebar-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 760;
  white-space: nowrap;
}

.sidebar-brand .brand-mark { width: 34px; height: 34px; flex-basis: 34px; }
.sidebar-new { width: 100%; margin-top: 22px; }
.sidebar-new span { margin-right: 5px; font-size: 20px; font-weight: 400; }
.sidebar-nav { min-height: 0; margin-top: 24px; overflow-y: auto; }
.sidebar-section-label { margin: 0 10px 7px; color: var(--ink-tertiary); font-size: 10px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
.cabinet-label { margin-top: 24px; }
.admin-label { margin-top: 24px; }
.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  margin: 2px 0;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink-secondary);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color 160ms ease, background 160ms ease;
}
.sidebar-link:hover { color: var(--ink); background: var(--surface-muted); }
.sidebar-link.active { color: var(--ink); background: var(--surface-muted); font-weight: 750; }
.sidebar-link:focus-visible, .mobile-menu:focus-visible, .profile-exit:focus-visible, .icon-close:focus-visible, .status-tab:focus-visible, .work-row:focus-visible, .back-link:focus-visible {
  outline: 3px solid rgba(198, 63, 90, 0.24);
  outline-offset: 2px;
}
.sidebar-count { display: grid; min-width: 24px; height: 24px; place-items: center; border-radius: 50%; color: var(--ink-secondary); background: #e8eae7; font-size: 11px; font-weight: 700; }
.sidebar-link.active .sidebar-count { color: var(--berry); background: var(--berry-soft); }
.sidebar-footer { margin-top: auto; padding-top: 18px; }
.access-summary { display: grid; gap: 7px; padding: 16px 14px; border-radius: var(--radius); background: var(--surface-muted); }
.access-summary strong { color: var(--success); font-size: 11px; letter-spacing: 0; text-transform: uppercase; }
.access-summary span { color: var(--ink-secondary); font-size: 12px; line-height: 1.4; }
.sidebar-profile { display: grid; grid-template-columns: 34px minmax(0, 1fr) 32px; gap: 10px; align-items: center; margin-top: 16px; }
.profile-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--berry); background: var(--berry-soft); font-size: 12px; font-weight: 760; }
.profile-copy { display: grid; min-width: 0; gap: 2px; }
.profile-copy strong, .profile-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { font-size: 13px; }
.profile-copy small { color: var(--ink-secondary); font-size: 10px; }
.profile-exit, .mobile-menu, .icon-close {
  display: grid;
  place-items: center;
  border: 0;
  color: var(--ink-secondary);
  background: transparent;
  cursor: pointer;
}
.profile-exit { width: 32px; height: 32px; font-size: 18px; }
.workspace { min-width: 0; }
.mobile-topbar { display: none; }
.sidebar-scrim { display: none; }

.app-shell .main {
  width: min(1180px, calc(100% - 72px));
  margin: 0 auto;
  padding: 32px 0 72px;
}
.app-shell .main.narrow { width: min(860px, calc(100% - 72px)); }
.app-shell h1 { margin-bottom: 8px; font-size: 38px; line-height: 1.12; }
.app-shell h2 { font-size: 22px; }
.app-shell .lead { font-size: 16px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.registry-header, .page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.registry-header p, .page-header p { max-width: 680px; margin: 0; color: var(--ink-secondary); line-height: 1.5; }
.registry-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.search-field { margin: 0; }
.search-field input { width: 248px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.registry-summary { display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px 0; border-bottom: 1px solid var(--border); }
.registry-summary div { display: grid; gap: 3px; padding: 0 16px; border-right: 1px solid var(--border); }
.registry-summary div:first-child { padding-left: 0; }
.registry-summary div:last-child { border-right: 0; }
.registry-summary strong { font-size: 18px; }
.registry-summary span { color: var(--ink-tertiary); font-size: 11px; }
.registry-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 20px 0; }
.status-tabs { display: flex; padding: 4px; border-radius: var(--radius); background: var(--surface-muted); }
.status-tab { min-height: 34px; padding: 7px 12px; border: 0; border-radius: 6px; color: var(--ink-secondary); background: transparent; cursor: pointer; font-size: 12px; }
.status-tab.active { color: var(--ink); background: var(--surface); box-shadow: 0 1px 5px rgba(17, 19, 23, 0.07); font-weight: 700; }
.registry-sort { color: var(--ink-secondary); font-size: 12px; }
.work-registry { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.registry-head, .work-row { display: grid; grid-template-columns: 22px minmax(280px, 1.6fr) minmax(120px, .75fr) minmax(120px, .75fr) 116px 82px 18px; gap: 12px; align-items: center; }
.registry-head { min-height: 42px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--ink-tertiary); background: var(--surface-muted); font-size: 10px; font-weight: 750; }
.work-row { width: 100%; min-height: 74px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface); text-align: left; }
.work-row:last-child { border-bottom: 0; }
.work-row:hover { background: #fbfbf8; }
.work-row[hidden] { display: none; }
.work-open-button { display: grid; min-width: 0; gap: 4px; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.work-main { display: grid; min-width: 0; gap: 4px; }
.work-main strong, .work-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-main strong { font-size: 13px; }
.work-main small, .work-type, .work-updated { color: var(--ink-secondary); font-size: 11px; }
.work-open { color: var(--ink-tertiary); font-size: 22px; text-align: right; }
.status.progress { color: var(--ink-secondary); background: var(--surface-muted); }
.status.ready { color: var(--success); background: var(--success-soft); }
.status.attention { color: var(--berry); background: var(--berry-soft); }
.registry-empty { display: grid; gap: 7px; padding: 34px 24px; color: var(--ink-secondary); text-align: center; }
.registry-empty strong { color: var(--ink); }

.notification-strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-bottom: 22px; padding: 14px 16px; border: 1px solid #ecd99e; border-radius: var(--radius); background: var(--warning-soft); }
.notification-strip span { color: var(--ink-secondary); line-height: 1.4; }
.bulk-bar { display: none; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.bulk-bar.visible { display: flex; }
.bulk-bar > span { margin-right: auto; color: var(--ink-secondary); }
.retention-note { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; margin-top: 24px; }
.retention-note span { color: var(--ink-secondary); }
.trash-list { margin-top: 28px; border-top: 1px solid var(--border); }
.trash-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 4px; border-bottom: 1px solid var(--border); }
.trash-row > div:first-child { display: grid; gap: 6px; }
.trash-row span, .trash-row small { color: var(--ink-secondary); }
.trash-actions { display: flex; flex: 0 0 auto; gap: 10px; }
.storage-tariff { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 30px; align-items: center; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.storage-tariff h2 { margin: 5px 0 8px; }
.storage-tariff p { margin: 0; color: var(--ink-secondary); line-height: 1.5; }
.storage-usage { display: grid; gap: 5px; padding-left: 24px; border-left: 1px solid var(--border); }
.storage-usage span, .storage-usage small { color: var(--ink-secondary); }
.storage-usage strong { font-size: 26px; }
.case-retention { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 22px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.case-retention > div:first-child { display: grid; gap: 5px; }
.case-retention span { color: var(--ink-secondary); font-size: 13px; line-height: 1.45; }
.case-retention-actions { display: flex; flex: 0 0 auto; gap: 9px; }
.danger-modal { width: min(560px, 100%); }
.danger-modal h2 { color: var(--danger); }

.modal-backdrop { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: rgba(17, 19, 23, 0.52); }
.task-modal { position: relative; width: min(760px, 100%); padding: 28px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.task-modal h2 { margin-bottom: 6px; font-size: 28px; }
.task-modal > p { max-width: 630px; color: var(--ink-secondary); line-height: 1.5; }
.icon-close { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: var(--radius); background: var(--surface-muted); font-size: 22px; }
.modal-task-grid { gap: 10px; margin-top: 20px; }
.modal-task-grid .task-option { min-height: 84px; padding: 14px; }
.modal-task-grid .task-option strong { font-size: 14px; }
.modal-task-grid .task-option span { font-size: 12px; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; color: var(--ink-tertiary); font-size: 11px; }

.page-header { align-items: center; }
.page-header.split { align-items: stretch; }
.balance-panel { display: grid; min-width: 220px; gap: 8px; align-content: center; padding: 18px; border-radius: var(--radius); color: var(--surface); background: var(--navy); }
.balance-panel span { color: rgba(249, 249, 245, 0.72); font-size: 12px; }
.balance-panel strong { font-size: 22px; }
.document-list, .tariff-section, .ledger-section, .help-steps { margin-top: 28px; }
.document-summary { display: grid; min-width: 210px; gap: 5px; align-content: center; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.document-summary span, .document-summary small { color: var(--ink-secondary); font-size: 12px; }
.document-summary strong { font-size: 21px; }
.documents-page .bulk-bar { position: sticky; z-index: 4; top: 10px; box-shadow: 0 6px 18px rgba(17, 29, 52, 0.08); }
.document-list { display: grid; gap: 18px; }
.document-group { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.document-group-header { display: grid; grid-template-columns: 22px minmax(200px, .9fr) minmax(330px, 1.2fr) 120px; gap: 16px; align-items: center; padding: 18px; background: var(--surface-muted); }
.document-group-title { display: grid; min-width: 0; gap: 4px; }
.document-group-title > span { color: var(--berry); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.document-group-title h2 { margin: 0; overflow-wrap: anywhere; font-size: 17px; }
.document-group-title small { color: var(--ink-secondary); }
.document-retention-facts { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 16px; margin: 0; }
.document-retention-facts div { display: grid; gap: 4px; min-width: 0; }
.document-retention-facts dt { color: var(--ink-tertiary); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.document-retention-facts dd { margin: 0; color: var(--ink-secondary); font-size: 12px; line-height: 1.35; }
.document-group-actions { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.document-group-actions .button { width: 100%; }
.document-files { padding: 0 18px; }
.document-file-row { display: grid; grid-template-columns: 22px 42px minmax(0, 1fr) 34px; gap: 12px; align-items: center; min-height: 68px; border-bottom: 1px solid var(--border); }
.document-file-row:last-child { border-bottom: 0; }
.document-file-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 6px; color: var(--navy); background: #e9edf4; font-size: 9px; font-weight: 850; }
.document-file-main { display: grid; min-width: 0; gap: 5px; }
.document-file-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-file-main span { color: var(--ink-secondary); font-size: 12px; }
.tariff-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tariff-item { display: grid; min-height: 170px; gap: 10px; align-content: start; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.tariff-item strong { font-size: 18px; }
.tariff-item span { color: var(--ink-secondary); }
.tariff-item .button { align-self: end; margin-top: auto; }
.ledger-section { padding-top: 24px; border-top: 1px solid var(--border); }
.help-steps { border-top: 1px solid var(--border); }
.help-steps article { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.help-steps article > span { color: var(--berry); font-size: 12px; font-weight: 800; }
.help-steps h2 { margin-bottom: 6px; }
.help-steps p { margin: 0; color: var(--ink-secondary); }

.back-link { margin: 0 0 18px; padding: 0; border: 0; color: var(--navy); background: transparent; cursor: pointer; font-weight: 700; }
.case-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.case-heading h1 { margin: 5px 0 8px; font-size: 42px; }
.case-heading p { margin: 0; }
.case-kind { flex: 0 0 auto; padding: 7px 10px; border-radius: 6px; color: var(--ink-secondary); background: var(--surface-muted); font-size: 11px; font-weight: 700; }
.case-layout { grid-template-columns: minmax(0, 1fr) 286px; gap: 34px; margin-top: 28px; }
.stage-intro { margin-bottom: 24px; }
.stage-intro .lead { margin-bottom: 0; }
.task-summary { display: grid; gap: 6px; padding: 16px; border-radius: var(--radius); background: var(--surface-muted); }
.task-summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-summary span { color: var(--ink-secondary); line-height: 1.45; }
.case-side { padding-left: 24px; }
.case-side h3 { margin-bottom: 14px; }
.stage-help { display: grid; gap: 10px; margin-top: 22px; }
.stage-help-item { display: grid; gap: 5px; padding: 13px; border-radius: var(--radius); background: var(--surface-muted); }
.stage-help-item strong { font-size: 12px; }
.stage-help-item span { color: var(--ink-secondary); font-size: 11px; line-height: 1.45; }
.upload-zone { min-height: 230px; background: var(--surface); transition: border-color 160ms ease, background 160ms ease; }
.upload-zone.dragging { border-color: var(--berry); background: var(--berry-soft); }
.upload-copy { display: grid; justify-items: center; gap: 8px; }
.upload-copy h3, .upload-copy p { margin: 0; }
.upload-copy small { color: var(--ink-tertiary); font-size: 11px; }
.upload-symbol { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--navy); background: var(--surface-muted); font-size: 20px; }
.upload-button { margin-top: 3px; }
.file-list > .muted { padding: 16px 0; border-bottom: 1px solid var(--border); }
.file-row .status { flex: 0 0 auto; }
.file-row-actions { display: flex; align-items: center; gap: 10px; }
.icon-action { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--border); border-radius: var(--radius); color: var(--ink-secondary); background: var(--surface); font-size: 20px; line-height: 1; cursor: pointer; }
.icon-action:hover { border-color: var(--danger); color: var(--danger); background: #fff0ee; }
.stage-actions { justify-content: flex-end; }
.case-navigation { position: sticky; bottom: 0; z-index: 8; margin-top: 26px; padding: 14px 0; background: rgba(249, 249, 245, 0.96); backdrop-filter: blur(10px); }
.model-auth-panel { max-width: 760px; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.status-line { display: flex; gap: 10px; align-items: center; margin-bottom: 22px; }
.status-line span { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-tertiary); }
.status-line.success span { background: #198754; }
.status-line.warning span { background: #b77b0c; }
.status-line.danger span { background: var(--berry); }
.model-auth-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0 0 24px; }
.model-auth-facts div { padding-top: 14px; border-top: 1px solid var(--border); }
.model-auth-facts dt { margin-bottom: 5px; color: var(--ink-secondary); font-size: 12px; }
.model-auth-facts dd { margin: 0; font-weight: 700; }
.model-auth-session { margin: 0 0 22px; padding: 20px; border-radius: var(--radius); background: var(--surface-muted); }
.device-code-row { display: flex; gap: 18px; align-items: center; justify-content: space-between; margin: 18px 0; }
.device-code-row code { font-size: 28px; font-weight: 800; letter-spacing: 0; }
.device-code-row span { color: var(--ink-secondary); font-variant-numeric: tabular-nums; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.dialogue-preview { min-height: 330px; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.assistant-message { max-width: 560px; padding: 16px; border-radius: var(--radius); background: var(--surface-muted); }
.assistant-message p { margin: 7px 0 0; color: var(--ink-secondary); line-height: 1.5; }
.dialogue-composer { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 8px 8px 8px 14px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--ink-tertiary); }
.dialogue-composer button { width: 34px; height: 34px; border: 0; border-radius: var(--radius); color: var(--surface); background: var(--navy); }
.draft-preview { display: flex; min-height: 240px; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.draft-preview > div { display: grid; gap: 10px; }
.draft-preview span { color: var(--berry); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.draft-preview strong { font-size: 22px; }
.draft-preview p { max-width: 540px; margin: 0; color: var(--ink-secondary); }
.stage-context { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.stage-context > span { padding: 6px 9px; border-radius: 6px; color: var(--navy); background: var(--surface-muted); font-size: 12px; font-weight: 700; }
.stage-context small { color: var(--ink-tertiary); }
.case-dialogue { display: flex; min-height: 360px; max-height: 58vh; flex-direction: column; gap: 18px; overflow-y: auto; padding: 4px 2px 20px; }
.assistant-turn { display: flex; align-items: flex-start; gap: 12px; }
.user-turn { display: flex; justify-content: flex-end; }
.assistant-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 7px; color: white; background: var(--navy); font-size: 14px; font-weight: 800; }
.message-bubble { max-width: min(650px, 82%); padding: 15px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.message-bubble strong { display: block; margin-bottom: 7px; }
.message-bubble p { margin: 0; line-height: 1.55; white-space: pre-wrap; }
.message-bubble time { display: block; margin-top: 7px; color: var(--ink-tertiary); font-size: 10px; text-align: right; }
.user-turn .message-bubble { color: white; border-color: var(--navy); background: var(--navy); }
.user-turn .message-bubble time { color: rgba(255,255,255,.65); }
.dialogue-form { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 8px; align-items: end; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.dialogue-form textarea { min-height: 48px; max-height: 150px; padding: 12px 10px; border: 0; resize: vertical; }
.dialogue-form textarea:focus { outline: 0; }
.dialogue-form button { display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: var(--radius); color: white; background: var(--navy); font-size: 20px; cursor: pointer; }
.dialogue-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.result-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.result-toolbar > div { display: grid; gap: 5px; }
.result-toolbar span { color: var(--berry); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.result-toolbar strong { font-size: 20px; }
.result-document { min-height: 390px; padding: 36px 42px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 12px 32px rgba(17, 27, 48, .06); }
.result-text { color: var(--ink); font-family: Georgia, 'Times New Roman', serif; font-size: 16px; line-height: 1.75; white-space: pre-wrap; }
.result-edit-form { margin-top: 16px; }
.mobile-bottom-nav { display: none; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 232px minmax(0, 1fr); }
  .sidebar { padding-inline: 14px; }
  .registry-head, .work-row { grid-template-columns: 22px minmax(220px, 1.4fr) minmax(100px, .7fr) minmax(110px, .7fr) 100px 68px 16px; gap: 9px; }
  .case-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; }
  .participant-row { grid-template-columns: minmax(0, 1fr) 150px 190px 78px; gap: 12px; }
  .document-group-header { grid-template-columns: 22px minmax(200px, 1fr) minmax(280px, 1.2fr); }
  .document-group-actions { grid-column: 2 / -1; justify-content: flex-start; }
  .document-group-actions .button { width: auto; }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; transform: translateX(-102%); width: min(320px, 88vw); transition: transform 200ms cubic-bezier(.22, 1, .36, 1); }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 20; border: 0; background: rgba(17, 19, 23, 0.42); }
  body.sidebar-open .sidebar-scrim { display: block; }
  .mobile-topbar { position: sticky; top: 0; z-index: 15; display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: rgba(249, 249, 245, 0.96); backdrop-filter: blur(12px); }
  .mobile-topbar .sidebar-brand { font-size: 15px; }
  .mobile-topbar .brand-mark { width: 30px; height: 30px; flex-basis: 30px; }
  .mobile-menu { width: 40px; height: 40px; font-size: 22px; }
  .app-shell .main, .app-shell .main.narrow { width: min(100% - 28px, 760px); padding-top: 24px; }
  .registry-header, .page-header, .case-heading { align-items: flex-start; flex-direction: column; }
  .registry-actions { width: 100%; }
  .search-field { flex: 1; }
  .search-field input { width: 100%; }
  .registry-summary { grid-template-columns: repeat(2, 1fr); }
  .registry-summary div:nth-child(2) { border-right: 0; }
  .registry-summary div { padding: 10px 12px; }
  .registry-summary div:first-child { padding-left: 12px; }
  .registry-tools { align-items: stretch; flex-direction: column; }
  .status-tabs { overflow-x: auto; }
  .status-tab { flex: 0 0 auto; }
  .registry-sort { display: none; }
  .registry-head { display: none; }
  .work-row { grid-template-columns: 22px minmax(0, 1fr) auto; min-height: 96px; gap: 8px 12px; }
  .work-row > .select-control { grid-column: 1; grid-row: 1 / span 2; }
  .work-main { grid-column: 2; }
  .work-type, .work-updated { display: none; }
  .work-row .status { grid-column: 2; }
  .work-row .case-files { grid-column: 3; grid-row: 2; }
  .work-open { grid-column: 3; grid-row: 1; }
  .modal-task-grid, .tariff-grid { grid-template-columns: 1fr; }
  .task-modal { max-height: calc(100vh - 28px); padding: 24px 18px; overflow-y: auto; }
  .modal-footer { align-items: stretch; flex-direction: column; }
  .case-layout { display: flex; flex-direction: column; }
  .case-side { order: -1; border-top: 0; border-bottom: 1px solid var(--border); border-left: 0; padding: 0 0 16px; }
  .case-side h3, .case-side > .hint, .case-side .stage-help { display: none; }
  .stage-list { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
  .stage-list li { flex: 0 0 auto; }
  .stage-button { min-height: 38px; padding: 7px 9px; border: 1px solid var(--border); background: var(--surface); }
  .stage-list li.active .stage-button { border-color: var(--berry); background: var(--berry-soft); }
  .stage-help { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-navigation { grid-template-columns: 1fr 1fr; }
  .case-navigation > span { display: none; }
  .page-header.split { align-items: stretch; }
  .balance-panel { width: 100%; }
  .notification-strip { grid-template-columns: 1fr auto; }
  .notification-strip strong { grid-column: 1 / -1; }
  .case-retention { align-items: stretch; flex-direction: column; }
  .case-retention-actions { flex-wrap: wrap; }
  .document-group-header { grid-template-columns: 22px minmax(0, 1fr); }
  .document-group-header > .select-control { grid-row: 1 / span 3; align-self: start; margin-top: 2px; }
  .document-retention-facts { grid-column: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .document-group-actions { grid-column: 2; }
  .document-group-actions { flex-direction: row; flex-wrap: wrap; }
  .document-group-actions .button { width: auto; }
  .storage-tariff { grid-template-columns: 1fr; }
  .storage-usage { padding: 18px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .workspace { padding-bottom: 70px; }
  .mobile-bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 16; display: grid; grid-template-columns: repeat(4, 1fr); min-height: 64px; padding: 5px 8px max(5px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: rgba(255,255,255,.98); }
  .mobile-bottom-nav button { display: grid; min-width: 0; gap: 2px; place-items: center; border: 0; color: var(--ink-secondary); background: transparent; font-size: 10px; font-weight: 700; }
  .mobile-bottom-nav button span { font-size: 18px; line-height: 1; }
  .app-shell.case-page .mobile-bottom-nav { display: none; }
  .app-shell.case-page .workspace { padding-bottom: 0; }
}

@media (max-width: 560px) {
  .app-shell h1, .case-heading h1 { font-size: 30px; }
  .registry-actions { align-items: stretch; flex-direction: column; }
  .registry-actions .button { width: 100%; }
  .registry-summary { font-size: 12px; }
  .stage-help { grid-template-columns: 1fr; }
  .case-kind { display: none; }
  .case-navigation { gap: 8px; }
  .case-navigation .button { min-width: 0; padding-inline: 10px; font-size: 13px; }
  .model-auth-panel { padding: 20px; }
  .model-auth-facts { grid-template-columns: 1fr; }
  .device-code-row { align-items: flex-start; flex-direction: column; }
  .upload-zone { min-height: 210px; padding: 24px 14px; }
  .task-summary span { font-size: 13px; }
  .draft-preview { align-items: stretch; flex-direction: column; }
  .stage-context { align-items: flex-start; flex-direction: column; }
  .case-dialogue { min-height: 320px; max-height: none; }
  .message-bubble { max-width: 90%; }
  .dialogue-actions, .result-toolbar { align-items: stretch; flex-direction: column; }
  .dialogue-actions .button, .result-toolbar .button { width: 100%; }
  .result-document { min-height: 320px; padding: 24px 18px; }
  .document-summary { width: 100%; }
  .document-group-header { grid-template-columns: 22px minmax(0, 1fr); }
  .document-group-header > .select-control { grid-row: 1 / span 3; }
  .document-retention-facts { grid-column: 2; grid-template-columns: 1fr; gap: 8px; }
  .document-group-actions { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; }
  .document-files { padding-inline: 12px; }
  .document-file-row { grid-template-columns: 22px 36px minmax(0, 1fr) 34px; gap: 8px; }
  .document-file-icon { width: 32px; height: 32px; }
  .bulk-bar { align-items: stretch; flex-wrap: wrap; }
  .bulk-bar > span { width: 100%; }
  .trash-row { align-items: stretch; flex-direction: column; }
  .trash-actions { flex-wrap: wrap; }
  .retention-note { grid-template-columns: 1fr; gap: 7px; }
  .file-row { grid-template-columns: 22px minmax(0, 1fr); }
  .file-row-actions { grid-column: 2; justify-content: space-between; }
}
