/* California AB 12 Security Deposit Disposition Statement
   Archetype: executive_legal_redline · Topology: interactive_legal_instrument */

:root {
  --desk: #1C1E21;
  --header: #FCFBF9;
  --header-ink: #18181B;
  --paper: #FCFBF9;
  --ink: #18181B;
  --muted: #3F3F46;
  --crimson: #991B1B;
  --crimson-deep: #7F1D1D;
  --crimson-wash: #FBEAEA;
  --accent: #1E3A8A;
  --hairline: #A1A1AA;
  --rule-soft: #D4D4D8;
  --slot: #F4F1EA;
  --slot-off: #EAE6DC;
  --rail-ink: #F4F4F5;
  --rail-muted: #C4C4CC;
  --rail-tab: #2A2D31;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--desk); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-width: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

.mono, .num, output, .sec-no { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.sr-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

h1, h2, h3 { line-height: 1.18; }

button, select, input { font: inherit; color: inherit; }
button, a, select, label.check, [data-preset-chip] { cursor: pointer; }
button:disabled, select:disabled, input:disabled { cursor: not-allowed; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Masthead: court-filing caption inside the pleading sheet ---------- */

.masthead {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 0 -44px 0 -56px;
  padding: 20px 32px;
  background-color: #FCFBF9;
  color: #18181B;
  border-bottom: 3px double #18181B;
}

.caption-block { min-width: 0; flex: 1 1 320px; }

.caption-cite {
  margin: 0 0 4px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--crimson);
}

.brand {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  color: #18181B;
}

.brand-short { display: none; }

.masthead-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  flex-shrink: 0;
}

.tier-status {
  padding: 5px 9px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tier-status[data-tier="pro"] { border-color: var(--accent); color: var(--accent); }

.util-link {
  min-height: 44px;
  padding: 10px 2px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  white-space: nowrap;
}
.util-link:hover { color: var(--crimson); text-decoration-thickness: 2px; }
.util-link:active { transform: translateY(1px); }

.btn-header {
  min-height: 44px;
  max-height: 50px;
  padding: 10px 16px;
  border: 0;
  background: var(--crimson);
  color: #FFFFFF;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.btn-header:hover { background: #B91C1C; }
.btn-header:active { background: var(--crimson-deep); transform: translateY(1px); }

/* ---------- Desk ---------- */

.desk {
  display: grid;
  grid-template-columns: 220px minmax(0, 920px);
  grid-template-rows: auto minmax(0, 1fr);
  justify-content: center;
  column-gap: 28px;
  row-gap: 28px;
  padding: 24px 24px 64px;
  align-items: start;
}

.docket-files { grid-column: 1; grid-row: 1; }
.docket-status-panel { grid-column: 1; grid-row: 2; }
.sheet-wrap { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }

.docket { color: var(--rail-ink); min-width: 0; }

.docket-heading {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rail-muted);
}

.preset-tabs { display: flex; flex-direction: column; gap: 6px; }

.preset-tab {
  position: relative;
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 60px;
  padding: 10px 12px 10px 14px;
  border: 0;
  border-left: 4px solid #52525B;
  background: var(--rail-tab);
  color: var(--rail-ink);
  text-align: left;
}
.preset-tab:hover { background: #34383D; border-left-color: #A1A1AA; }
.preset-tab:active { background: #3F444A; }
.preset-tab:focus-visible { outline-color: #93C5FD; }
.preset-tab[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
  border-left-color: var(--crimson);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}
.preset-tab[aria-pressed="true"]::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 100%;
  background: repeating-linear-gradient(180deg, var(--crimson) 0 2px, transparent 2px 5px);
}

.tab-no { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; color: #C4C4CC; }
.preset-tab[aria-pressed="true"] .tab-no { color: var(--crimson); font-weight: 600; }
.tab-title { font-size: 15px; font-weight: 600; line-height: 1.25; }

.docket .btn-rail {
  margin-top: 6px;
  width: 100%;
  border-color: #A1A1AA;
  color: var(--rail-ink);
  background: transparent;
}
.docket .btn-rail:hover { background: #2A2D31; }
.docket .btn-rail:active { background: #34383D; }
.docket .btn-rail:focus-visible { outline-color: #93C5FD; }

.docket-status { margin: 0; border-top: 1px solid #3F3F46; }
.ds-row {
  padding: 8px 0 8px 12px;
  border-bottom: 1px solid #3F3F46;
  border-left: 3px solid #52525B;
}
.ds-row dt {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rail-muted);
}
.ds-row dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--rail-ink); }
.ds-row[data-tone="ok"] { border-left-color: #93C5FD; }
.ds-row[data-tone="warn"] { border-left-color: #FCD34D; }
.ds-row[data-tone="alert"] { border-left-color: #F87171; }
.ds-row[data-tone="alert"] dd { color: #FECACA; }

/* ---------- Pleading sheet ---------- */

.sheet {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border-radius: 0;
  border-top: 3px double #18181B;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  padding: 0 44px 32px 56px;
}
.sheet::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 34px;
  width: 4px;
  border-left: 1px solid var(--crimson);
  border-right: 1px solid var(--crimson);
  opacity: 0.55;
  pointer-events: none;
}

.sheet-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}
.toolbar-status {
  flex: 1 1 220px;
  min-height: 22px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 0;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { border: 2px solid var(--crimson); background: var(--crimson); color: #FFFFFF; }
.btn-primary:hover { background: #B91C1C; border-color: #B91C1C; }
.btn-primary:active { background: var(--crimson-deep); border-color: var(--crimson-deep); transform: translateY(1px); }
.btn-secondary { border: 2px solid var(--ink); background: transparent; color: var(--ink); }
.btn-secondary:hover { background: #EFEBE2; }
.btn-secondary:active { background: #E4DFD3; transform: translateY(1px); }
.btn-secondary:disabled { border-style: dashed; color: var(--muted); background: transparent; transform: none; }

.instrument-head { padding: 20px 0 14px; text-align: center; }
.docket-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.docket-ref { color: var(--crimson); font-weight: 600; }
h1 {
  margin: 10px 0 6px;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.005em;
}
.instrument-sub { margin: 0; font-size: 14px; color: var(--muted); }

.clause-section { padding: 20px 0 14px; border-top: 1px solid var(--hairline); }
.clause-section h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}
.sec-no { color: var(--crimson); font-size: 15px; font-weight: 600; flex-shrink: 0; }
.section-lede { margin: -4px 0 12px; font-size: 14.5px; color: var(--muted); max-width: 70ch; }

/* Form grid modernization */
.form-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin-top: 10px;
}
.form-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 8px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.form-field-full {
  grid-column: 1 / -1;
}
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 4px;
}
.field-label .req {
  color: var(--crimson);
  font-weight: 700;
}
.money-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.money-input-wrap .money-sign {
  position: absolute;
  left: 10px;
  font-family: var(--mono);
  font-weight: 600;
  color: #64748B;
  pointer-events: none;
  z-index: 2;
}
.money-input-wrap .slot {
  padding-left: 24px;
}

.clause {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  column-gap: 8px;
  row-gap: 2px;
  margin-bottom: 4px;
}
.ct { padding-top: 10px; line-height: 1.4; }

.slot-wrap { display: inline-flex; flex-direction: column; min-width: 0; max-width: 100%; }
.w-xs { width: 108px; }
.w-sm { width: 196px; }
.w-md { width: 250px; }
.w-lg { width: 290px; }
.w-xl { width: 440px; }
.w-date { width: 184px; }
.w-money { width: 164px; }

.slot {
  display: block;
  width: 100%;
  min-height: 42px;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.35;
  transition: border-color 0.15s, box-shadow 0.15s;
}
select.slot { padding-right: 28px; cursor: pointer; }
textarea.slot {
  resize: vertical;
  min-height: 48px;
  overflow-wrap: anywhere;
  font-family: inherit;
}
.slot::placeholder { color: #64748B; opacity: 1; }
.slot:hover { border-color: #94A3B8; }
.slot:focus-visible { outline: none; border-color: var(--crimson); box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15); background: #FFFFFF; }
.slot[aria-invalid="true"], .slot.slot-alert { border-color: var(--crimson); background: var(--crimson-wash); }
.slot:disabled { background: var(--slot-off); border-style: dashed; color: var(--muted); }
.slot:disabled::placeholder { color: var(--muted); }

.money { position: relative; display: block; }
.money-sign {
  position: absolute;
  left: 8px;
  top: 11px;
  font-family: var(--mono);
  color: var(--muted);
  pointer-events: none;
}
.money .slot { padding-left: 22px; }

.slot-cap { padding-top: 3px; font-size: 13px; line-height: 1.3; color: var(--muted); }
.opt {
  margin-left: 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.validation-cue {
  display: block;
  min-height: 17px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--crimson);
}
.validation-cue[data-tone="success"] { color: var(--accent); }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 0;
  font-size: 15px;
}
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--crimson); flex-shrink: 0; }

.clause-grid { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 20px; align-items: start; }
.clause-main { min-width: 0; }

.declaration {
  margin: 6px 0 0;
  padding: 8px 14px 4px;
  border: 1px dashed var(--hairline);
  min-inline-size: 0;
}
.declaration legend, .proof legend, .pro-proof legend {
  padding: 0 6px;
  font-weight: 700;
  font-size: 14.5px;
}

/* Redline margin annotation */
.annotation {
  min-height: 196px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: #F3F1EB;
}
.annotation[data-tone="alert"] { border-left-color: var(--crimson); background: #FAF0EE; }
.annotation[data-tone="idle"] { border-left-color: var(--hairline); }
.anno-line { display: flex; flex-direction: column; margin: 8px 0 0; font-size: 14px; }
.anno-k { color: var(--muted); }
.anno-v { font-weight: 600; font-size: 15px; }
.anno-note { margin: 10px 0 0; font-size: 13.5px; line-height: 1.4; }

.stamp {
  display: inline-block;
  margin: 0;
  padding: 6px 10px;
  border: 2px solid currentColor;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  transform: rotate(-1.5deg);
}
[data-tone="alert"] > .stamp, .stamp[data-tone="alert"] { color: var(--crimson); }
[data-tone="idle"] > .stamp, .stamp[data-tone="idle"] { color: var(--muted); }
.stamp[data-tone="warn"] { color: #854D0E; }

/* Crimson statutory deadline stamp */
.deadline-stamp {
  min-height: 150px;
  padding: 14px 12px;
  border: 4px double var(--crimson);
  color: var(--crimson);
  text-align: center;
  background: #FDF6F4;
  transform: rotate(-1.2deg);
}
.ds-kicker { margin: 0; font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.ds-date { margin: 6px 0; font-size: 23px; font-weight: 600; line-height: 1.2; }
.ds-state { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.deadline-stamp[data-tone="ok"] .ds-state { color: var(--accent); }
.deadline-stamp[data-tone="alert"] .ds-state { color: var(--crimson); }

/* ---------- Deduction schedule ---------- */

.schedule { min-width: 0; }
.schedule-head, .ded-row {
  display: grid;
  grid-template-columns: 30px 180px minmax(0, 1fr) 124px 150px 44px;
  column-gap: 8px;
}
.schedule-head {
  padding: 6px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.schedule-head .num { text-align: left; }

.ded-row {
  row-gap: 6px;
  margin: 0;
  padding: 10px 0 4px;
  border: 0;
  border-bottom: 1px solid var(--rule-soft);
  min-inline-size: 0;
}
.row-no { grid-column: 1; grid-row: 1; padding-top: 12px; font-size: 13px; color: var(--muted); }
.cell { min-width: 0; }
.cell-cat { grid-column: 2; grid-row: 1; }
.cell-desc { grid-column: 3; grid-row: 1; }
.cell-claimed { grid-column: 4; grid-row: 1; }
.cell-receipt { grid-column: 5; grid-row: 1; }
.cell-remove { grid-column: 6; grid-row: 1; }
.cell-detail { grid-column: 2 / 4; grid-row: 2; display: grid; min-height: 64px; }
.cell-result { grid-column: 4 / 7; grid-row: 2; text-align: right; min-height: 64px; }
.row-cue { grid-column: 2 / 7; grid-row: 3; }

.btn-remove {
  width: 44px;
  height: 44px;
  padding: 6px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}
.btn-remove:hover { border-color: var(--crimson); color: var(--crimson); }
.btn-remove:active { background: var(--crimson-wash); }

.detail-group { grid-area: 1 / 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; min-width: 0; }
.sub { display: flex; flex-direction: column; width: 132px; min-width: 0; }
.sub-narrow { width: 92px; }
.sub::before {
  content: attr(data-label);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.3;
  padding-bottom: 2px;
}
.detail-depr, .detail-labor, .detail-flat { visibility: hidden; }
.ded-row[data-category="paint"] .detail-depr,
.ded-row[data-category="carpet"] .detail-depr,
.ded-row[data-category="landlord_labor"] .detail-labor { visibility: visible; }
.ded-row[data-category=""] .detail-flat,
.ded-row[data-category="unpaid_rent"] .detail-flat,
.ded-row[data-category="cleaning"] .detail-flat,
.ded-row[data-category="repair"] .detail-flat { visibility: visible; }
.detail-flat::before { padding-top: 6px; font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.ded-row[data-category=""] .detail-flat::before { content: 'Choose a category to open its proration or labor fields.'; }
.ded-row[data-category="unpaid_rent"] .detail-flat::before { content: 'Rent through the date possession was returned.'; }
.ded-row[data-category="cleaning"] .detail-flat::before { content: 'Cleaning to the move-in level of cleanliness.'; }
.ded-row[data-category="repair"] .detail-flat::before { content: 'Damage beyond ordinary wear and tear.'; }

.row-amount { display: block; min-height: 26px; font-size: 18px; font-weight: 600; }
.row-note { display: block; font-size: 13px; line-height: 1.35; color: var(--muted); }
.ded-row[data-reduced="true"] .row-note { color: var(--crimson); }
.ded-row[data-reduced="true"] .row-amount { color: var(--crimson); }

.schedule-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; flex-wrap: wrap; }
.schedule-count { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- § 5 Results ---------- */

.results { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.recon { width: 100%; border-collapse: collapse; font-size: 15px; }
.recon caption {
  padding-bottom: 6px;
  text-align: left;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.recon th, .recon td { padding: 7px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: baseline; }
.recon th { text-align: left; font-weight: 400; padding-right: 10px; }
.recon td { text-align: right; white-space: nowrap; }
.recon-sub th, .recon-sub td { border-top: 1px solid var(--ink); font-weight: 700; }
.recon-key th, .recon-key td { font-weight: 700; font-size: 16px; }
.recon-key td { color: var(--accent); }
.recon-owed td { color: var(--crimson); }

.findings { min-width: 0; }
.stamp-outcome { font-size: 14px; padding: 8px 12px; }
.finding-list { margin: 10px 0 0; }
.finding { padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
.finding dt {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.finding dd { margin: 4px 0 0; font-size: 14.5px; line-height: 1.45; min-height: 42px; }
.finding-exposure { padding-left: 12px; border-left: 3px solid var(--crimson); background: #FAF0EE; }
.finding-exposure dt { color: var(--crimson); }

/* ---------- § 6 Attestation and seal ---------- */

.seal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 24px; align-items: start; }
.attest { min-width: 0; }
.attest-text { margin: 0 0 10px; font-size: 15px; }
.signature-rule { display: flex; flex-direction: column; width: min(100%, 340px); margin: 18px 0 14px; }
.sig-line { display: block; height: 30px; border-bottom: 1px solid var(--ink); }
.sig-cap { font-size: 13px; color: var(--muted); padding-top: 3px; }

.proof { margin: 0; padding: 10px 0 0; border: 0; border-top: 1px solid var(--hairline); min-inline-size: 0; }
.proof legend { padding: 0 8px 0 0; font-family: var(--display); font-size: 17px; font-weight: 600; }
.proof-text { margin: 4px 0 8px; font-size: 14.5px; min-height: 42px; }
.pro-proof { margin: 6px 0 0; padding: 8px 12px 8px; border: 1px dashed var(--hairline); background: #F6F4EF; min-inline-size: 0; }
.pro-tag {
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid var(--accent);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
}
.pro-proof-note { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.check-inline { padding-top: 22px; }

.seal { display: grid; }
.seal-layer {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 18px 16px;
  border: 4px double var(--accent);
  background: #F3F1EB;
  text-align: center;
}
.seal-free { border-color: var(--crimson); }
.seal-pro { visibility: hidden; }
.is-pro .seal-pro { visibility: visible; }
.is-pro .seal-free { visibility: hidden; }

.seal-ring {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: 0 auto;
  border: 2px dashed var(--crimson);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--crimson);
  transform: rotate(-12deg);
}
.seal-ring-pro { border: 3px double var(--accent); color: var(--accent); font-size: 11.5px; }
.seal-title { margin: 0; font-family: var(--display); font-size: 18px; font-weight: 600; }
.seal-copy { margin: 0; font-size: 14px; line-height: 1.45; }
.seal-price { margin: 0; font-size: 14px; color: var(--muted); }
.seal-price strong { display: block; font-size: 20px; color: var(--ink); }
.seal-license { margin: 0; font-size: 13px; color: var(--accent); }

.disclaimer { margin-top: 18px; padding-top: 12px; border-top: 3px double var(--ink); }
.disclaimer p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.free-watermark {
  margin: 14px 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.is-pro .free-watermark { visibility: hidden; }

.print-value { display: none; }

/* ---------- Pro modal ---------- */

.modal {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-top: 3px double #18181B;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}
.modal::backdrop { background: rgba(17, 19, 21, 0.74); }
.modal-inner { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 20px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1.2; }
.btn-close {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--hairline);
  background: transparent;
  font-weight: 600;
}
.btn-close:hover { border-color: var(--ink); }
.btn-close:active { background: #EFEBE2; }
.modal-desc { margin: 0; font-size: 15px; color: var(--muted); }
.modal-list { margin: 0; padding-left: 20px; font-size: 15px; }
.modal-list li { margin: 3px 0; }
.modal-price { margin: 0; font-size: 15px; }
.modal-price strong { font-size: 20px; }
.key-form { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.key-form label { font-weight: 600; font-size: 15px; }
.key-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .desk { grid-template-columns: 200px minmax(0, 920px); column-gap: 20px; padding-left: 16px; padding-right: 16px; }
  .sheet { padding-left: 48px; padding-right: 28px; }
  .masthead { margin-left: -48px; margin-right: -28px; }
  .sheet::before { left: 28px; }
  .schedule-head, .ded-row { grid-template-columns: 26px 150px minmax(0, 1fr) 120px 140px 44px; }
}

@media (max-width: 980px) {
  .clause-grid { grid-template-columns: minmax(0, 1fr); }
  .annotation, .deadline-stamp { min-height: 0; }
  .seal-grid { grid-template-columns: minmax(0, 1fr); }
  .results { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .desk {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    row-gap: 14px;
    padding: 24px 10px 40px;
  }
  .docket-files, .docket-status-panel, .sheet-wrap { grid-column: 1; grid-row: auto; }
  .docket-files { order: 1; }
  .sheet-wrap { order: 2; }
  .docket-status-panel { order: 3; }
  .docket-heading { margin-bottom: 6px; }
  .preset-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 6px;
  }
  .preset-tab { min-width: 0; min-height: 58px; }
  .preset-tab[aria-pressed="true"]::after { top: auto; bottom: 0; width: 100%; height: 4px; background: var(--crimson); }
  .docket .btn-rail { grid-column: 1 / -1; width: 100%; margin-top: 0; white-space: normal; }
  .sheet { padding: 0 16px 24px 26px; }
  .masthead { margin: 0 -16px 0 -26px; padding: 16px 20px; }
  .sheet::before { left: 12px; }
  #statement-form { display: flex; flex-direction: column; }
  .sheet-toolbar { order: 99; border-bottom: 0; border-top: 1px solid var(--hairline); margin-top: 8px; }
  .instrument-head { order: 0; padding-top: 16px; }
  .clause-section, .disclaimer, .free-watermark { order: 1; }
  h1 { font-size: 24px; line-height: 1.18; }
  .docket-line { flex-direction: column; align-items: center; gap: 2px; }
  .w-lg, .w-xl, .w-md { width: 100%; }
}

@media (max-width: 720px) {
  .schedule-head { display: none; }
  .ded-row {
    grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr) 44px;
    row-gap: 8px;
    padding: 12px 0 6px;
  }
  .row-no { grid-column: 1; grid-row: 1; }
  .cell-cat { grid-column: 2 / 4; grid-row: 1; }
  .cell-remove { grid-column: 4; grid-row: 1; padding-top: 19px; }
  .cell-desc { grid-column: 2 / 5; grid-row: 2; }
  .cell-claimed { grid-column: 2; grid-row: 3; }
  .cell-receipt { grid-column: 3 / 5; grid-row: 3; }
  .cell-detail { grid-column: 2 / 5; grid-row: 4; min-height: 0; }
  .cell-result { grid-column: 2 / 5; grid-row: 5; text-align: left; min-height: 56px; }
  .row-cue { grid-column: 2 / 5; grid-row: 6; }
  .cell[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    padding-bottom: 2px;
  }
  .sub { width: calc(50% - 4px); }
  .sub-narrow { width: calc(50% - 4px); }
  .detail-flat::before { padding-top: 0; }
  .instrument-head { padding-bottom: 8px; }
  .instrument-sub { font-size: 13px; }
}

@media (max-width: 480px) {
  .masthead { padding: 12px 14px; gap: 6px; }
  .caption-block { flex-basis: 100%; }
  .caption-cite { margin-bottom: 2px; font-size: 11.5px; letter-spacing: 0.06em; }
  .brand { font-size: 17px; }
  .brand-full { display: none; }
  .brand-short { display: inline; }
  .tier-status { display: none; }
  .masthead-actions { flex: 1 1 100%; min-width: 0; flex-wrap: nowrap; justify-content: space-between; gap: 8px; }
  .util-link { font-size: 14.5px; }
  .btn-header { padding: 8px 12px; font-size: 15px; }
  .preset-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preset-tab { min-height: 52px; padding: 7px 10px 7px 12px; }
  .docket .btn-rail { min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
  .w-date, .w-money { width: calc(50% - 4px); min-width: 140px; }
  .w-sm { width: 196px; }
  .w-xs { width: 96px; }
  .ct { padding-top: 6px; }
  .key-row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Print: only the deliverable ---------- */

@media print {
  @page { size: letter; margin: 14mm 12mm 16mm; }
  html, body { background: #FFFFFF !important; color: #111827; font-size: 11pt; }
  .masthead, .docket, .modal, .sheet-toolbar, .schedule-actions, .cell-remove, .btn-remove,
  .validation-cue, .seal-free, .preset-tabs, .opt, .money-sign,
  .deliverable-dock, .no-print, .cockpit-horizon-bar, .mobile-hud { display: none !important; }
  .desk { display: block; padding: 0; }
  .sheet {
    padding: 0;
    background: #FFFFFF;
    box-shadow: none;
    border-top: 3px double #111827;
  }
  .sheet::before { display: none; }
  #executive-deliverable, #executive-deliverable * {
    color: #111827 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  #executive-deliverable .slot { display: none !important; }
  #executive-deliverable *, #executive-deliverable .finding dd { min-height: 0 !important; }
  .print-value {
    display: block;
    min-height: 1.5em;
    padding: 2px 2px 1px;
    border-bottom: 1px solid #111827;
    font-family: var(--body);
  }
  .slot.mono + .print-value, .money .print-value { font-family: var(--mono); }
  .clause-section { padding: 10px 0 8px; border-top-color: #111827; }
  .clause-section h2 { break-after: avoid; font-size: 14pt; }
  h1 { font-size: 18pt; }
  .slot-cap, .sub::before, .row-note, .anno-k, .disclaimer p, .free-watermark { font-size: 8.5pt; }
  .ded-row, .finding, .recon, .annotation, .deadline-stamp, .seal-grid, .declaration, .proof { break-inside: avoid; }
  .ded-row.is-blank { display: none; }
  .check input { display: none !important; }
  .check:not(:has(input:checked)) { display: none !important; }
  .check { min-height: 0; padding: 4px 0; }
  .declaration { border: 0; padding: 0; }
  .detail-flat { display: none; }
  .deadline-stamp, .annotation { transform: none; border-color: #111827; min-height: 0; }
  .stamp { transform: none; }
  .clause-grid { grid-template-columns: minmax(0, 1fr) 200px; }
  .results { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .seal-grid { grid-template-columns: minmax(0, 1fr) 220px; }
  .seal { display: none; }
  .is-pro .seal { display: grid; }
  .is-pro .seal-pro { border-color: #111827; }
  .pro-proof { border: 0; padding: 0; }
  .pro-proof legend .pro-tag, .pro-proof-note { display: none; }
  body:not(.is-pro) .pro-proof { display: none; }
  .is-pro .free-watermark { display: none; }
  body:not(.is-pro) #executive-deliverable::after {
    content: 'FREE DRAFT';
    position: fixed;
    top: 42%;
    left: 8%;
    font-family: var(--mono);
    font-size: 88pt;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: rgba(17, 24, 39, 0.1) !important;
    transform: rotate(-30deg);
    pointer-events: none;
  }
  a[href]::after { content: none; }
}

/* Site Navigation Bar */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 20px;
  background: #18191b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #f4f4f5;
  z-index: 100;
  flex-shrink: 0;
}

.site-nav .caption-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.site-nav .caption-cite {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ef4444;
}

.site-nav .brand {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #f4f4f5;
  line-height: 1.2;
}

.site-nav .masthead-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav .tier-status {
  padding: 3px 8px;
  font-size: 11px;
  border: 1px solid #52525b;
  color: #a1a1aa;
}

.site-nav .util-link {
  min-height: auto;
  padding: 4px 8px;
  font-size: 12px;
  color: #d4d4d8;
  text-decoration: none;
}
.site-nav .util-link:hover {
  color: #ef4444;
}

.site-nav .btn-header {
  min-height: 32px;
  max-height: 32px;
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 4px;
}

/* Unified 46px Flex Toolbar */
.unified-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  padding: 6px 20px;
  background: #18181b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #f4f4f5;
  z-index: 100;
  box-sizing: border-box;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mode-tabs {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 2px;
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #a1a1aa;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.mode-tab.active {
  color: #fff;
  background: #dc2626;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.preset-strip-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.preset-strip-inline .preset-chip {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-strip-inline .preset-chip:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.preset-strip-inline .preset-chip.active,
.preset-strip-inline .preset-chip[aria-pressed="true"] {
  background: rgba(220, 38, 38, 0.25);
  border-color: #dc2626;
  color: #fecaca;
  font-weight: 600;
}

.engine-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono, monospace);
  font-size: 11px;
  color: #4ade80;
}

.engine-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.free-badge {
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 4px;
}

/* Workflow Directional Vector Bar */
.workflow-direction-bar {
  background: #18181b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 20px;
  font-size: 11px;
  color: #a1a1aa;
}

.wf-track {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wf-step strong {
  color: #f4f4f5;
}

.wf-arrow {
  color: #ef4444;
  font-weight: bold;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono, monospace);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  line-height: 1;
  vertical-align: middle;
}

.role-badge-in {
  background: #fef3c7;
  color: #78350f;
  border: 1px solid #f59e0b;
  margin-right: 6px;
}

.role-badge-out {
  background: #d1fae5;
  color: #064e3b;
  border: 1px solid #10b981;
  margin-right: 6px;
}

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline, #d4d4d8);
}

.pane-subtitle {
  font-size: 11px;
  color: var(--muted, #71717a);
  font-family: var(--mono, monospace);
}

/* In-Flow Action Shelf at Form End */
.dock-jump-shelf {
  position: static;
  background: #18181b;
  border: 1px solid rgba(220, 38, 38, 0.5);
  border-radius: 8px;
  padding: 12px;
  margin-top: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dock-jump-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  background: #dc2626 !important;
  color: #fff !important;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dock-jump-btn:hover {
  background: #b91c1c !important;
  transform: translateY(-1px);
}

.dock-scroll-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #d4d4d8 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 4px;
  cursor: pointer;
}

.dock-scroll-cue:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}

/* Action Confirmation Message */
.action-msg {
  display: none;
  font-family: var(--mono, monospace);
  font-size: 12px;
  font-weight: 600;
  color: #fecaca;
  background: rgba(220, 38, 38, 0.25);
  border: 1px solid rgba(220, 38, 38, 0.6);
  border-radius: 4px;
  padding: 6px 12px;
  text-align: center;
}

.action-msg.msg-flash {
  display: block;
  animation: msgFlash 0.3s ease-out;
}

@keyframes msgFlash {
  0% { opacity: 0; transform: translateY(-3px); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0.95; }
}

@keyframes spotlightPulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); outline: 2px solid rgba(220, 38, 38, 0.9); }
  50% { box-shadow: 0 0 0 14px rgba(220, 38, 38, 0); outline: 2px solid rgba(220, 38, 38, 0.9); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); outline: 2px solid transparent; }
}

.spotlight-pulse {
  animation: spotlightPulse 0.9s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Anchored Cockpit Horizon Bar */
.cockpit-horizon-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: #09090b;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 11px;
  color: #71717a;
  z-index: 900;
}

.horizon-left,
.horizon-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.horizon-status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.horizon-link {
  color: #a1a1aa;
  text-decoration: none;
}

.horizon-dim {
  color: #52525b;
}

/* Mobile Sticky HUD */
.mobile-hud {
  display: none;
}

/* Option B+ Desktop Cockpit (100dvh Zero Window Scroll) */
@media screen and (min-width: 901px) {
  html, body {
    height: 100vh;
    height: 100dvh;
    overflow: hidden !important;
  }

  .site-nav {
    height: 48px;
    padding: 0 20px;
    margin: 0;
    max-width: 100%;
    border-radius: 0;
    flex-shrink: 0;
  }

  .page-shell {
    height: calc(100dvh - 48px - 46px - 32px);
    overflow: hidden;
    padding: 0 20px;
    max-width: 1720px;
    margin: 0 auto;
    width: 100%;
  }

  .workbench {
    height: 100%;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(460px, 1.05fr) minmax(500px, 1.25fr);
    gap: 24px;
    padding: 16px 0 34px 0;
    margin: 0;
    max-width: 100%;
  }

  .inspector-pane {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    background: var(--paper, #FCFBF9);
    color: var(--ink, #18181B);
    border-top: 3px double #18181B;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
    position: relative;
    border-radius: 4px;
  }

  .inspector-pane .pane-header {
    flex: 0 0 auto;
    padding: 12px 20px;
    margin: 0;
    border-bottom: 1px solid rgba(24, 24, 27, 0.15);
    background: var(--paper, #FCFBF9);
  }

  .inspector-scroll-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding: 16px 24px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    mask-image: linear-gradient(to bottom, black calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 24px), transparent 100%);
  }

  .dock-jump-shelf {
    flex: 0 0 auto;
    padding: 12px 20px;
    background: var(--paper, #FCFBF9);
    border-top: 1.5px solid rgba(24, 24, 27, 0.15);
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 15;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
  }

  .inspector-pane::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 4px;
    border-left: 1px solid var(--crimson, #991B1B);
    border-right: 1px solid var(--crimson, #991B1B);
    opacity: 0.55;
    pointer-events: none;
  }

  .inspector-pane .pane-subtitle {
    color: #52525b;
  }

  .deliverable-dock {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #18181B;
    padding: 10px 14px;
    margin: 0 0 14px 0;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
  }

  .deliverable-dock .sheet-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .deliverable-dock .primary-action {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    background: #DC2626;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
  }

  .deliverable-dock .primary-action:hover {
    background: #B91C1C;
  }

  .deliverable-dock .compact-action {
    padding: 8px 12px;
    font-size: 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #e4e4e7;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
  }

  .deliverable-dock .compact-action:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  .deliverable-dock .dock-scroll-cue {
    padding: 7px 12px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #a1a1aa;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
  }

  .deliverable-dock .dock-scroll-cue:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
  }

  .deliverable-zone {
    height: 100%;
    overflow-y: auto;
    padding-right: 12px;
  }
}

@media (max-width: 900px) {
  html, body {
    height: auto;
    overflow-y: auto;
  }

  .site-nav {
    height: auto;
    min-height: auto;
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 8px;
  }

  .site-nav .caption-block {
    width: 100%;
  }

  .site-nav .masthead-actions {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  .site-nav .tier-status {
    display: none;
  }

  .site-nav .util-link {
    font-size: 13px;
    padding: 6px 8px;
  }

  .site-nav .btn-header {
    font-size: 13px;
    padding: 6px 12px;
  }

  .unified-toolbar {
    flex-wrap: wrap;
    height: auto;
    min-height: auto;
    padding: 6px 12px;
    gap: 8px;
  }

  .toolbar-left,
  .toolbar-right {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }

  .workflow-direction-bar {
    display: none !important;
  }

  .preset-strip-inline {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
    padding: 2px 0;
  }
  .preset-strip-inline::-webkit-scrollbar {
    display: none;
  }

  .inspector-pane {
    background: var(--paper, #FCFBF9);
    color: var(--ink, #18181B);
    padding: 16px 20px 24px 28px;
    margin-bottom: 24px;
    border-top: 3px double #18181B;
    position: relative;
    height: auto;
    overflow: visible;
  }

  .inspector-scroll-body {
    overflow-y: visible;
    max-height: none;
    min-height: 0;
    padding: 0;
    mask-image: none !important;
    -webkit-mask-image: none !important;
  }

  .dock-jump-shelf {
    display: block;
    margin: 16px 0 20px 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .inspector-pane::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 14px;
    width: 4px;
    border-left: 1px solid var(--crimson, #991B1B);
    border-right: 1px solid var(--crimson, #991B1B);
    opacity: 0.55;
    pointer-events: none;
  }

  .deliverable-dock {
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 12px;
  }

  .workbench {
    display: flex;
    flex-direction: column;
    padding-bottom: 80px;
  }

  .mobile-hud {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #18181b;
    border-top: 1px solid rgba(220, 38, 38, 0.4);
    padding: 8px 16px;
    z-index: 999;
  }

  .mobile-hud-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
  }

  .hud-kpi {
    display: flex;
    flex-direction: column;
  }

  .hud-label {
    font-size: 10px;
    color: #a1a1aa;
    font-family: var(--mono, monospace);
  }

  .hud-value {
    font-size: 16px;
    font-weight: 700;
    color: #f87171;
  }

  .hud-jump-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
}


/* Fleet sweep 2026-10-18 additions */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 6, 23, 0.66);
}
.modal-backdrop[hidden] { display: none; }
.toolbar-clear {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  background: transparent;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.trust-footer {
  padding: 16px 20px;
  font-size: 13px;
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.trust-footer .trust-link { color: #7dd3fc; display: inline-block; padding: 4px 0; }
.mode-tab, .preset-chip { min-height: 44px; }
.preset-strip-inline { flex-wrap: wrap; max-width: 100%; }
/* owner-type select measured 62px wide */
select#owner-type { min-width: 180px; width: 100%; }

/* ---------- Repair pass: calculate action, contrast, hit areas, input widths, print ---------- */

.dock-calc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.dock-calc-btn:hover { border-color: var(--crimson); color: var(--crimson); }
.dock-calc-btn:focus-visible { outline: 2px solid var(--crimson); outline-offset: 2px; }

/* The shelf sits on ivory paper: dark ink, not light rail text. */
.dock-jump-shelf .dock-scroll-cue {
  min-height: 44px;
  color: var(--ink) !important;
  background: transparent !important;
  border: 1px solid rgba(24, 24, 27, 0.35) !important;
}
.dock-jump-shelf .dock-scroll-cue:hover { background: var(--slot) !important; color: var(--crimson) !important; }

/* Output pane header sits on the charcoal desk. */
.deliverable-zone .pane-subtitle { color: var(--rail-muted); }
.cockpit-horizon-bar, .horizon-dim { color: #A1A1AA; }

/* 44px hit areas */
.slot { min-height: 44px; }
.site-nav .util-link,
.site-nav .btn-header {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-height: none;
}
.deliverable-dock .primary-action,
.deliverable-dock .compact-action,
.deliverable-dock .dock-scroll-cue,
.hud-jump-btn { min-height: 44px; }
.trust-footer .trust-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }

.check input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin: -12px -2px -12px -12px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.check input[type="checkbox"]::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1.5px solid #52525B;
  border-radius: 4px;
  background: #FFFFFF;
}
.check input[type="checkbox"]:checked::before { background: var(--crimson); border-color: var(--crimson); }
.check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 18px;
  top: 14px;
  width: 7px;
  height: 12px;
  border: solid #FFFFFF;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.check input[type="checkbox"]:focus-visible::before { outline: 2px solid var(--crimson); outline-offset: 2px; }
.check input[type="checkbox"]:disabled { cursor: not-allowed; }
.check input[type="checkbox"]:disabled::before { background: var(--slot-off); border-style: dashed; }

/* Intake pane is narrower than the full sheet: stack so no control drops below 175px. */
.inspector-pane .clause-grid { grid-template-columns: minmax(0, 1fr); }
.inspector-pane .annotation, .inspector-pane .deadline-stamp { min-height: 0; }
.inspector-pane .declaration .form-grid-3col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inspector-pane .declaration .form-grid-3col > .form-field:first-child { grid-column: 1 / -1; }
.inspector-pane .schedule-head { display: none; }
.inspector-pane .ded-row {
  grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr) 44px;
  row-gap: 8px;
  padding: 12px 0 6px;
}
.inspector-pane .row-no { grid-column: 1; grid-row: 1; }
.inspector-pane .cell-cat { grid-column: 2 / 4; grid-row: 1; }
.inspector-pane .cell-remove { grid-column: 4; grid-row: 1; padding-top: 19px; }
.inspector-pane .cell-desc { grid-column: 2 / 5; grid-row: 2; }
.inspector-pane .cell-claimed { grid-column: 2; grid-row: 3; }
.inspector-pane .cell-receipt { grid-column: 3 / 5; grid-row: 3; }
.inspector-pane .cell-detail { grid-column: 2 / 5; grid-row: 4; min-height: 0; }
.inspector-pane .cell-result { grid-column: 2 / 5; grid-row: 5; text-align: left; min-height: 56px; }
.inspector-pane .row-cue { grid-column: 2 / 5; grid-row: 6; }
.inspector-pane .cell[data-label]::before {
  content: attr(data-label);
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  padding-bottom: 2px;
}
.inspector-pane .sub,
.inspector-pane .sub-narrow { width: calc(50% - 4px); }

@media (max-width: 600px) {
  .form-grid-2col { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .site-nav, .unified-toolbar, .workflow-direction-bar, .inspector-pane,
  .deliverable-zone > .pane-header, .deliverable-dock, .trust-footer, .cockpit-horizon-bar,
  .mobile-hud, .modal-backdrop, dialog, button, .toolbar-status { display: none !important; }
  html, body { height: auto !important; overflow: visible !important; }
  .page-shell, .workbench, .deliverable-zone {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* Keep the workbench toolbar on one row on desktop now that "Clear form" is visible. */
@media screen and (min-width: 901px) {
  .unified-toolbar .toolbar-left { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; }
  .unified-toolbar .preset-strip-inline { flex-wrap: nowrap; }
  .unified-toolbar .toolbar-right { flex: 0 1 auto; min-width: 0; flex-direction: column; align-items: flex-end; gap: 4px; }
}
@media screen and (min-width: 901px) {
  .dock-jump-shelf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .dock-jump-shelf .dock-scroll-cue, .dock-jump-shelf .action-msg { grid-column: 1 / -1; }
}
.toolbar-clear[hidden] { display: none; }
.toolbar-undo { border-style: solid; border-color: rgba(248, 113, 113, 0.7); color: #FECACA; }
.toolbar-undo:hover { background: rgba(220, 38, 38, 0.2); color: #FFFFFF; }

/* Free-core reassurance bar at the top of the intake column. */
.free-reassurance {
  margin: 0 0 10px;
  padding: 7px 10px;
  border: 1px solid var(--ink);
  border-left: 4px solid var(--crimson);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}
.free-reassurance strong { color: var(--crimson); }

/* Free vs Pro matrix in the Pro dialog. */
.free-vs-pro { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--ink); }
.free-vs-pro caption { text-align: left; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-bottom: 4px; }
.free-vs-pro th, .free-vs-pro td { padding: 6px 8px; border-bottom: 1px solid var(--rule-soft); text-align: left; vertical-align: top; }
.free-vs-pro thead th { border-bottom: 2px solid var(--ink); font-weight: 700; }
.free-vs-pro thead th:last-child { color: var(--crimson); }
.free-vs-pro tbody th { font-weight: 600; }

/* Keep the workbench toolbar pinned above scrolling content on desktop. */
@media screen and (min-width: 901px) {
  .unified-toolbar { position: sticky; top: 0; z-index: 200; background: #18181b; }
}

/* Mobile: stack declaration fields so numeric values never clip. */
@media (max-width: 640px) {
  .form-grid-2col,
  .form-grid-3col,
  .inspector-pane .declaration .form-grid-3col { grid-template-columns: minmax(0, 1fr); }
  .inspector-pane .declaration .form-grid-3col > .form-field:first-child { grid-column: auto; }
}

@media (max-width: 900px) {
  input[id*="amount_claimed"], input[data-row-field="amount_claimed"] { min-width: 150px; }
}

/* Mobile chrome budget + sticky dock clearance (reviewer 2026-10-18) */
@media (max-width: 900px) {
  .site-nav { padding: 4px 12px !important; max-height: 96px; overflow: hidden; }
  .site-nav .caption-block { font-size: 12px !important; line-height: 1.1 !important; max-height: 17px !important; overflow: hidden !important; }
  .site-nav .caption-block { display: none !important; }
  .site-nav .masthead-actions, .site-nav .btn-header { min-height: 44px; height: 44px; }
  h2, h3, legend, .field label { scroll-margin-top: 64px; }
  [data-dock-jump], .review-dock, .mobile-dock { background: #FFFFFF; z-index: 40; }
}
