/* EPCRA Tier II Fieldbook -- precision_agronomy_fieldbook / stepped_inspector_workbench */

:root {
  --canvas: #E7E5E4;
  --paper: #FAFAF9;
  --card: #FFFFFF;
  --header-bg: #292524;
  --header-ink: #FAFAF9;
  --ink: #1C1917;
  --muted: #44403C;
  --primary: #15803D;
  --primary-ink: #FFFFFF;
  --primary-press: #166534;
  --accent: #B45309;
  --accent-deep: #92400E;
  --stone: #A8A29E;
  --stone-soft: #E7E5E4;
  --stone-wash: #F5F5F4;
  --error: #B91C1C;
  --radius: 4px;
  --rule: 1.5px solid var(--stone);
  --font-display: "Bitter", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Victor Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --focus: 0 0 0 3px #FAFAF9, 0 0 0 5px #15803D;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

html.modal-lock {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.18;
  margin: 0;
  color: inherit;
}

p {
  margin: 0;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

.mono,
code {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.num {
  font-variant-numeric: tabular-nums;
}

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

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.index-mark {
  display: inline-block;
  margin-right: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}

/* ---------- masthead: left-rail brand spine ---------- */

.masthead {
  background-color: #292524;
  color: #FAFAF9;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  border-bottom: 3px solid var(--accent);
}

.spine {
  padding: 14px 16px 14px 18px;
  border-right: 1.5px solid #57534E;
  background-image: repeating-linear-gradient(180deg, transparent 0 23px, rgba(250, 250, 249, 0.07) 23px 24px);
  display: grid;
  gap: 4px;
  align-content: start;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
  white-space: nowrap;
  max-height: 52px;
  color: #FAFAF9;
  margin-bottom: 6px;
}

.wordmark-mark {
  color: #FBBF24;
  margin-right: 6px;
}

.spine-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #E7E5E4;
}

.spine-select {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  background: #1C1917;
  color: #FAFAF9;
  border: 1.5px solid #A8A29E;
  border-radius: var(--radius);
  cursor: pointer;
}

.spine-select option,
.spine-select optgroup {
  background: #1C1917;
  color: #FAFAF9;
}

.masthead-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title cta"
    "status status";
  gap: 10px 24px;
  padding: 14px 22px;
  align-items: center;
}

.masthead-title {
  grid-area: title;
}

.masthead h1 {
  font-size: 24px;
  line-height: 1.18;
  font-weight: 700;
  color: #FAFAF9;
}

.masthead-sub {
  font-size: 14px;
  color: #E7E5E4;
  margin-top: 2px;
}

.agency-status {
  grid-area: status;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agency-status div {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 4px 10px;
  border: 1.5px solid #78716C;
  border-radius: var(--radius);
}

.agency-status dt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #D6D3D1;
}

.agency-status dd {
  margin: 0;
  font-size: 14px;
  color: #FAFAF9;
  font-variant-numeric: tabular-nums;
}

.btn-header {
  grid-area: cta;
  white-space: nowrap;
  min-height: 44px;
  max-height: 50px;
  padding: 10px 18px;
  background: var(--primary);
  color: var(--primary-ink);
  border: 1.5px solid #4ADE80;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
}

.btn-header:hover {
  background: var(--primary-press);
}

.btn-header:active {
  transform: translateY(1px);
}

/* ---------- Unified 46px Toolbar ---------- */
.unified-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px 12px;
  padding: 6px 14px;
  background: var(--stone-wash);
  border-bottom: var(--rule);
  border-left: var(--rule);
  border-right: var(--rule);
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  min-height: 46px;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 60;
}
.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
.unified-toolbar .mode-switch-deck {
  width: auto;
  margin: 0;
  flex-direction: row;
  align-items: center;
}
.unified-toolbar .mode-tabs {
  background: var(--stone-soft, #e7e5e4);
  border: var(--rule);
  border-radius: var(--radius);
  padding: 2px 4px;
  gap: 2px;
  display: flex;
  width: auto;
  margin: 0;
}
.unified-toolbar .mode-tab {
  min-height: 28px !important;
  height: 28px !important;
  padding: 3px 10px !important;
  font-size: 11.5px !important;
  font-weight: 700;
  color: var(--muted);
  border-radius: calc(var(--radius) - 1px);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}
.unified-toolbar .mode-tab:hover {
  color: var(--ink);
}
.unified-toolbar .mode-tab.is-active {
  background: var(--card, #ffffff);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.unified-toolbar .preset-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: auto;
}
.unified-toolbar .preset-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}
.unified-toolbar .preset-stack {
  display: flex;
  flex-direction: row;
  gap: 4px;
  width: auto;
}
.unified-toolbar .preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  height: 28px;
  padding: 3px 8px;
  font-size: 11.5px;
  border: var(--rule);
  border-left: 3px solid var(--stone);
  border-radius: var(--radius);
  background: var(--card);
  width: auto;
  white-space: nowrap;
}
.unified-toolbar .chip-key {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  background: var(--stone);
  color: #fff;
  border-radius: 2px;
}
.unified-toolbar .chip-name {
  font-size: 12px;
  font-weight: 600;
}
.unified-toolbar .case-status-bar {
  margin: 0;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: var(--radius);
  gap: 6px;
}
.unified-toolbar .trust-reassurance-bar {
  margin: 0;
  padding: 4px 8px;
  background: transparent;
  border: 0;
  gap: 6px;
}
.unified-toolbar .trust-badge {
  padding: 2px 6px;
  font-size: 10.5px;
}
.unified-toolbar .trust-text {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- workbench topology ---------- */

.workbench {
  display: grid;
  grid-template-columns: minmax(430px, 480px) minmax(0, 1fr);
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  background: var(--paper);
  border-left: var(--rule);
  border-right: var(--rule);
  border-bottom: var(--rule);
  align-items: stretch;
}

.inventory {
  grid-column: 1;
  border-right: var(--rule);
  min-width: 0;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  position: static;
  mask-image: none !important;
  -webkit-mask-image: none !important;
}

.deliverable-zone {
  grid-column: 2;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  position: relative;
}

.deliverable-dock {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- Workflow Direction Bar & Role Badges ---------- */
.workflow-direction-bar {
  max-width: 1440px;
  margin: 0 auto;
  background: #11281E;
  border-left: var(--rule);
  border-right: var(--rule);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #A3B899;
}
.wf-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.wf-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #F1F5F9;
}
.wf-step-input {
  color: #52B788;
  font-weight: 700;
}
.wf-step-input .wf-sub {
  font-size: 10px;
  font-weight: 400;
  color: #A3B899;
}
.wf-step-engine {
  color: #FBBF24;
}
.wf-step-output {
  color: #74C69D;
  font-weight: 700;
}
.wf-arrow {
  color: #406343;
  font-weight: 700;
}
@media (max-width: 768px) {
  .workflow-direction-bar { padding: 5px 8px; font-size: 10px; }
  .wf-track { gap: 6px; justify-content: flex-start; }
  .wf-arrow { display: none; }
}

.role-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  line-height: 1;
}
.role-badge-in {
  background: var(--primary, #1b4332);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.role-badge-out {
  background: #059669;
  color: #FFFFFF;
  border: 1px solid #047857;
  margin-right: 6px;
}
/* Tier 1: Pinned Left Inventory Top Dock */
.inventory-sticky-dock {
  flex: 0 0 auto;
  position: static;
  background: #FFFFFF;
  padding: 10px 16px;
  margin: 0;
  border-bottom: 1.5px solid var(--stone);
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  z-index: 10;
}
.inventory-sticky-dock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.inventory-dock-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.inventory-dock-subcue {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Tier 2: Independently Scrollable Form Canvas */
.inventory-scroll-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 14px 18px 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  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%);
  transition: mask-image 0.2s ease, -webkit-mask-image 0.2s ease;
}
.inventory-scroll-body::-webkit-scrollbar {
  width: 8px;
}
.inventory-scroll-body::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-left: 1px solid #CBD5E1;
}
.inventory-scroll-body::-webkit-scrollbar-thumb {
  background: #94A3B8;
  border-radius: 4px;
  border: 2px solid #F1F5F9;
}
.inventory-scroll-body::-webkit-scrollbar-thumb:hover {
  background: #64748B;
}

/* Tier 3: Pinned Bottom Action Shelf */
.inventory-bottom-shelf {
  flex: 0 0 auto;
  padding: 14px 18px 18px 18px;
  background: #FFFFFF;
  border-top: 1.5px solid var(--stone);
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.06);
  z-index: 15;
  display: flex;
  align-items: center;
}
.btn-dock-jump--shelf {
  width: 100%;
  height: 42px;
  padding: 0 16px;
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary, #15803D);
  border: 1.5px solid #166534;
  border-radius: var(--radius);
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(21, 128, 61, 0.25);
  transition: all 0.15s ease;
}
.btn-dock-jump--shelf:hover {
  background: #166534;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(21, 128, 61, 0.35);
  transform: translateY(-1px);
}
.btn-dock-jump-icon {
  font-size: 15px;
}
.btn-dock-jump-text {
  flex: 1;
  text-align: left;
  margin-left: 8px;
}
.btn-dock-jump-arrow {
  font-weight: 900;
  font-size: 16px;
  transition: transform 0.15s ease;
}
.btn-dock-jump--shelf:hover .btn-dock-jump-arrow {
  transform: translateX(4px);
}


.inventory-head {
  padding: 10px 16px 4px;
}

.inventory-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.inventory-subcue {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin: 3px 0 0;
  width: 100%;
}

.desktop-engine-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(45, 106, 79, 0.09);
  border: 1px solid rgba(45, 106, 79, 0.35);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #1B4332;
  border-radius: 2px;
  margin-top: 8px;
}
.status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2D6A4F;
  box-shadow: 0 0 0 2px rgba(45, 106, 79, 0.3);
  flex-shrink: 0;
}
.mobile-jump-btn { display: none; }
@media (max-width: 900px) {
  .desktop-engine-status { display: none; }
  .mobile-jump-btn { display: block; }
}

details.prop-collapsible {
  border: 0;
  margin: 0;
  padding: 0;
}
details.prop-collapsible > summary.step-tab {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
details.prop-collapsible > summary.step-tab::-webkit-details-marker {
  display: none;
}
details.prop-collapsible > summary.step-tab:hover {
  background: var(--stone-wash);
}
details.prop-collapsible > summary.step-tab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
details.prop-collapsible .legend-toggle-icon {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: none;
  letter-spacing: 0;
}
details.prop-collapsible > summary .toggle-caret {
  display: inline-block;
  transition: transform 0.2s ease;
}
details.prop-collapsible[open] > summary .toggle-caret {
  transform: rotate(180deg);
}

/* Click-to-Edit Bridge Interactive Affordances */
.det-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.det-row:hover td {
  background-color: rgba(27, 67, 50, 0.06);
}
.sheet-grid dd, .tally dd {
  cursor: default;
}

.rail-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rail-note {
  font-size: 12.5px;
  color: var(--muted);
  margin: -2px 0 2px;
  line-height: 1.35;
}

.preset-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.preset-chip {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-areas: "key name" "key meta";
  gap: 0 6px;
  align-items: start;
  text-align: left;
  width: 100%;
  min-height: 60px;
  padding: 8px 10px 8px 8px;
  background: var(--card);
  border: var(--rule);
  border-left: 5px solid var(--stone);
  border-radius: var(--radius);
  cursor: pointer;
}

.preset-chip:hover {
  border-left-color: var(--accent);
}

.preset-chip:active {
  background: var(--stone-wash);
}

.preset-chip[aria-pressed="true"] {
  border-color: var(--primary);
  border-left-color: var(--primary);
  background: #F0FDF4;
  box-shadow: inset 0 0 0 1px var(--primary);
}

.preset-chip[aria-pressed="true"] .chip-key {
  background: var(--primary);
  color: var(--primary-ink);
}

.chip-key {
  grid-area: key;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 0;
  text-align: center;
  border-radius: 2px;
  background: var(--stone-soft);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.chip-name {
  grid-area: name;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}

.chip-meta {
  grid-area: meta;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.step-index {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  list-style: none;
  margin: 4px 0 0;
  padding: 6px 0 0;
  border-top: 1px dashed var(--stone);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.rail-reset {
  margin: 0;
  width: 100%;
}

/* ---------- controls ---------- */

.btn-primary,
.btn-secondary,
.tool-btn,
.mode-tab,
.record-tab,
.modal-close {
  min-height: 44px;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  line-height: 1.25;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
  border: 1.5px solid var(--primary);
}

.btn-primary:hover {
  background: var(--primary-press);
  border-color: var(--primary-press);
}

.btn-primary:active {
  transform: translateY(1px);
  background: #14532D;
}

.btn-secondary {
  background: var(--card);
  color: var(--ink);
  border: var(--rule);
}

.btn-secondary:hover {
  border-color: var(--muted);
  background: var(--stone-wash);
}

.btn-secondary:active {
  background: var(--stone-soft);
}

.btn-primary:disabled,
.btn-secondary:disabled {
  cursor: not-allowed;
  background: var(--stone-wash);
  color: #57534E;
  border-color: var(--stone);
  transform: none;
}

/* ---------- inventory column ---------- */

.inventory {
  min-width: 0;
  border-right: var(--rule);
}

.req-note {
  font-size: 13px;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: var(--rule);
  border-radius: var(--radius);
}

.step-card {
  margin: 0;
  padding: 8px 14px 10px;
  min-width: 0;
}

.step-tab {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  padding: 6px 12px;
  margin-left: -4px;
  background: var(--stone-wash);
  border: var(--rule);
  border-radius: var(--radius) var(--radius) 0 0;
  line-height: 1.25;
}

.grid-facility {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
  align-items: end;
}
.grid-facility .field-facility-name {
  grid-column: span 2;
}
.grid-facility .field-facility-state {
  grid-column: span 1;
}
.grid-facility .field-reporting-year {
  grid-column: span 1;
}
.grid-facility .field-days-late {
  grid-column: span 2;
}

.grid-record {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 8px 14px;
  align-items: end;
}

.grid-record .span-2 {
  grid-column: span 2;
}

.field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.field label,
.check-row label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.3;
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
}

.is-required::after {
  content: " *";
  color: var(--error);
  white-space: pre;
}

.field input[type="text"],
.field input[type="number"],
.field input[type="date"],
.field select {
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid #D6D3D1;
  border-radius: var(--radius);
  background: #FFFFFF;
  color: var(--ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field select {
  cursor: pointer;
  appearance: auto;
}

.field input::placeholder {
  color: #78716C;
  opacity: 1;
}

.field input:focus-visible,
.field select:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(27, 67, 50, 0.2);
  background: #FFFFFF;
}

.field input:disabled,
.field select:disabled {
  background: var(--stone-wash);
  color: #57534E;
  border-bottom-style: dashed;
  cursor: not-allowed;
}

.field [aria-invalid="true"] {
  border-bottom: 2.5px solid var(--error);
  background: #FEF2F2;
}

.validation-cue {
  min-height: 18px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--error);
  font-weight: 700;
  padding-top: 2px;
}

.validation-cue:empty {
  min-height: 0;
  padding: 0;
}

.validation-cue:not(:empty)::before {
  content: "! ";
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
  padding-top: 2px;
}

.field-wide {
  min-width: 0;
}

.field-check {
  grid-column: span 1;
  justify-content: flex-end;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.check-row input {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 44px;
  margin: 0;
  flex: none;
  border-radius: var(--radius);
  background: var(--card) center / 20px 20px no-repeat;
  box-shadow: inset 0 0 0 10px var(--card), inset 0 0 0 11.5px var(--muted);
  cursor: pointer;
}

.check-row input:checked {
  background-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='%23FFFFFF' stroke-width='2.6'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 0 10px var(--card);
}

.check-row input:focus-visible {
  box-shadow: inset 0 0 0 10px var(--card), inset 0 0 0 11.5px var(--muted), var(--focus);
}

.check-row input[aria-invalid="true"] {
  box-shadow: inset 0 0 0 10px #FEF2F2, inset 0 0 0 12px var(--error);
}

.check-row label {
  min-height: 0;
  padding: 0;
  cursor: pointer;
}


/* mode tabs and panels */

.mode-tabs {
  display: flex;
  justify-content: flex-start;
  gap: 0;
  border-bottom: var(--rule);
  margin: 4px 0 12px 0;
  width: 100%;
}

.mode-tab {
  background: transparent;
  border: var(--rule);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-right: -1.5px;
  color: var(--muted);
  font-size: 14px;
}

.mode-tab:hover {
  color: var(--ink);
  background: var(--stone-wash);
}

.mode-tab:active {
  background: var(--stone-soft);
}

.mode-tab[aria-selected="true"] {
  color: var(--ink);
  background: var(--card);
  box-shadow: inset 0 3px 0 var(--accent);
  position: relative;
  top: 1.5px;
}

.mode-tab[aria-selected="true"]:focus-visible {
  box-shadow: inset 0 3px 0 var(--accent), var(--focus);
}

.mode-panels {
  display: grid;
  min-height: 0;
}

.mode-panel,
.type-group,
.tool-panel {
  grid-area: 1 / 1;
  display: none;
  min-width: 0;
}

.mode-panel.is-active,
.type-group.is-active,
.tool-panel.is-active {
  display: grid;
  visibility: visible;
  opacity: 1;
}

.type-stack {
  display: grid;
}

.type-note {
  grid-column: span 2;
  font-size: 13px;
  color: var(--muted);
  align-self: center;
  padding: 18px 0 0;
}

.record-bar-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 6px;
}

.record-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  min-height: 36px;
  margin-bottom: 4px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--stone);
}

.record-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 0 1 auto;
}

.record-tab {
  flex: 0 1 auto;
  justify-content: flex-start;
  text-align: left;
  gap: 0 5px;
  padding: 4px 8px;
  min-height: 32px;
  height: 32px;
  font-size: 12px;
  background: var(--stone-wash);
  border: var(--rule);
  font-weight: 400;
}

.record-tab:hover {
  background: var(--card);
}

.record-tab:active {
  background: var(--stone-soft);
}

.record-tab[aria-selected="true"] {
  background: var(--card);
  border-color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--primary);
}

.record-tab[aria-selected="true"]:focus-visible {
  box-shadow: inset 0 -3px 0 var(--primary), var(--focus);
}

.rt-ref {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-deep);
}

.rt-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.rt-flag {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--error);
}

.record-tab.has-errors {
  border-color: var(--error);
}

.btn-add {
  padding: 4px 10px;
  min-height: 32px;
  height: 32px;
  font-size: 12px;
}

.inspector {
  min-width: 0;
}

.grid-sds {
  border-top: 1px dashed var(--stone);
  margin-top: 6px;
  padding-top: 2px;
}

/* upload panel */

.dropzone {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
  padding: 18px 14px;
  border: 1.5px dashed var(--muted);
  border-radius: var(--radius);
  background: var(--stone-wash);
  cursor: pointer;
  min-height: 108px;
}

.dropzone:hover,
.dropzone.is-drag {
  border-color: var(--primary);
  background: #F0FDF4;
}

.dropzone:active {
  background: var(--stone-soft);
}

.dropzone:focus-within {
  box-shadow: var(--focus);
}

.dropzone-title {
  font-weight: 700;
}

.dropzone-sub {
  font-size: 13px;
  color: var(--muted);
}

.file-input {
  font-size: 14px;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 0;
  cursor: pointer;
}

.template-block {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  justify-items: start;
}

.template-label {
  font-size: 13px;
  color: var(--muted);
}

.template-code {
  display: block;
  width: 100%;
  font-size: 12px;
  padding: 8px 10px;
  background: var(--stone-wash);
  border: var(--rule);
  border-radius: var(--radius);
  overflow-wrap: anywhere;
  color: var(--ink);
}

.upload-report {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.upload-summary {
  font-weight: 700;
  min-height: 1.5em;
}

.upload-summary[data-tone="bad"] {
  color: var(--error);
}

.upload-summary[data-tone="warn"] {
  color: var(--accent-deep);
}

.upload-summary[data-tone="ok"] {
  color: var(--primary-press);
}

.upload-table-wrap {
  width: 100%;
  min-height: 96px;
  max-height: 180px;
  overflow: auto;
  border: var(--rule);
  border-radius: var(--radius);
}

.upload-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.upload-table th,
.upload-table td {
  text-align: left;
  padding: 5px 8px;
  border-bottom: 1px solid var(--stone-soft);
  vertical-align: top;
}

.upload-table th {
  background: var(--stone-wash);
  position: sticky;
  top: 0;
}

.row-flag {
  font-weight: 700;
}

.is-bad .row-flag {
  color: var(--error);
}

.is-ok .row-flag {
  color: var(--primary-press);
}

.calc-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.btn-calc {
  padding: 11px 20px;
}

.calc-status {
  font-size: 14px;
  color: var(--muted);
  min-height: 1.5em;
}

/* ---------- deliverable column ---------- */

.deliverable-zone {
  padding: 14px 18px 18px;
  min-width: 0;
  display: block;
  background: #F5F5F4;
}

.cert-toolbar {
  border: var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.toolbar-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tier-pill {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  border: 1.5px solid var(--accent);
  color: var(--accent-deep);
  background: #FFFBEB;
}

.is-pro .tier-pill {
  border-color: var(--primary);
  color: var(--primary-press);
  background: #F0FDF4;
}

.toolbar-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.tool-btn {
  background: var(--stone-wash);
  border: var(--rule);
  color: var(--ink);
  font-size: 13.5px;
  padding: 8px 10px;
  text-align: center;
}

.is-free .tool-btn::after {
  content: "Pro";
  font-size: 11px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
  background: #292524;
  color: #FAFAF9;
}

.tool-btn:hover {
  background: var(--card);
  border-color: var(--muted);
}

.tool-btn:active {
  background: var(--stone-soft);
}

.tool-btn[aria-pressed="true"] {
  background: var(--card);
  border-color: var(--primary);
  box-shadow: inset 0 -3px 0 var(--primary);
}

.tool-drawer {
  display: grid;
  min-height: 0;
  border-top: 1px dashed var(--stone);
  padding-top: 8px;
}

.tool-panel {
  gap: 8px;
  align-content: start;
  font-size: 14px;
}

.grid-signoff {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.tool-msg,
.action-msg {
  font-size: 13.5px;
  color: var(--primary-press);
  font-weight: 700;
}

@keyframes spotlightPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.7);
    outline: 2px solid #15803D;
  }
  50% {
    box-shadow: 0 0 16px 4px rgba(21, 128, 61, 0.45);
    outline: 2px solid #22C55E;
  }
  100% {
    box-shadow: none;
    outline: 2px solid transparent;
  }
}

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

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

.action-msg.msg-flash {
  display: inline-block;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 600;
  color: #15803D;
  background: #DCFCE7;
  border: 1px solid #86EFAC;
  border-radius: var(--radius);
  padding: 4px 10px;
  animation: msgFlash 0.3s ease-out;
}

.tool-msg-head {
  font-weight: 700;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 13.5px;
}

.check-list li {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px;
}

.check-flag {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.check-ok .check-flag {
  color: var(--primary-press);
}

.check-open .check-flag {
  color: var(--accent-deep);
}

.results {
  display: block;
  min-height: 0;
}

.result-state {
  border: var(--rule);
  border-left: 6px solid var(--stone);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: var(--card);
  min-height: 58px;
  position: static;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.result-state-title {
  font-weight: 700;
  font-family: var(--font-display);
}

.result-state-msg {
  font-size: 14px;
  color: var(--muted);
}

.result-state[data-state="success"] {
  border-left-color: var(--primary);
}

.result-state[data-state="warning"] {
  border-left-color: var(--accent);
  background: #FFFBEB;
}

.result-state[data-state="validation"],
.result-state[data-state="error"] {
  border-left-color: var(--error);
  background: #FEF2F2;
}

.result-state[data-state="validation"] .result-state-title::before,
.result-state[data-state="error"] .result-state-title::before {
  content: "Stopped · ";
  color: var(--error);
}

.result-state[data-state="warning"] .result-state-title::before {
  content: "Review · ";
  color: var(--accent-deep);
}

.result-state[data-state="success"] .result-state-title::before {
  content: "Complete · ";
  color: var(--primary-press);
}

.sheet {
  background: var(--card);
  border: var(--rule);
  border-radius: var(--radius);
  padding: 14px 16px 12px;
  position: relative;
}

.sheet.is-stale {
  outline: 2px dashed var(--accent);
  outline-offset: -6px;
}

.sheet-head {
  border-bottom: 3px double var(--stone);
  padding-bottom: 8px;
  display: grid;
  gap: 4px;
}

.sheet-kind {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.sheet-head h2 {
  font-size: 20px;
  line-height: 1.18;
}

.sheet-ids {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 2px 0 0;
  font-size: 13px;
}

.sheet-ids div,
.sheet-grid div,
.tally div {
  min-width: 0;
}

.sheet-ids dt {
  display: inline;
  color: var(--muted);
  font-weight: 700;
  margin-right: 6px;
}

.sheet-ids dd {
  display: inline;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.sheet-pair-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

.sheet-section {
  padding: 8px 0 4px;
  border-bottom: 1px solid var(--stone-soft);
}

.sheet-h3 {
  font-size: 14.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet-h3::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--accent);
  border-radius: 1px;
  flex: none;
}

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  margin: 0;
}

.sheet-grid .span-2 {
  grid-column: span 2;
}

.sheet-grid dt,
.tally dt {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sheet-grid dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.tally {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.tally div {
  border: var(--rule);
  border-radius: var(--radius);
  padding: 6px 8px;
  background: var(--paper);
}

.tally dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  width: 100%;
}

.det-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.det-table th:nth-child(1) {
  width: 10%;
}

.det-table th:nth-child(2) {
  width: 26%;
}

.det-table th:nth-child(3) {
  width: 18%;
}

.det-table th:nth-child(4) {
  width: 13%;
}

.det-table th:nth-child(5) {
  width: 12%;
}

.det-table th:nth-child(6) {
  width: 21%;
}

.det-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 6px;
  border-bottom: 1.5px solid var(--ink);
  vertical-align: bottom;
  line-height: 1.3;
}

.det-table td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--stone-soft);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.det-table .num {
  text-align: right;
}

.det-table td span {
  display: block;
}

.row-empty td {
  color: var(--muted);
  font-style: italic;
  padding: 10px 6px;
}

.ref {
  font-weight: 600;
}

.pct,
.c-basis .qty,
.c-thr .qty {
  white-space: nowrap;
}

.det-table th:nth-child(4) {
  padding-right: 10px;
}

.sub {
  font-size: 12px;
  color: var(--muted);
}

.chem-name {
  font-weight: 700;
}

.tag {
  display: inline-block !important;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  padding: 0 5px;
  border: 1px solid var(--muted);
  border-radius: 2px;
}

.qty {
  font-weight: 700;
}

.meter {
  height: 6px;
  margin-top: 5px;
  background: var(--stone-soft);
  border-radius: 1px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: var(--muted);
}

.badge {
  display: inline-flex !important;
  gap: 5px;
  align-items: center;
  padding: 3px 7px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  border: 1.5px solid transparent;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.badge-at_above {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

.badge-approaching {
  background: #FFFBEB;
  color: var(--accent-deep);
  border-color: var(--accent);
}

.badge-below {
  background: #F0FDF4;
  color: #14532D;
  border-color: var(--primary);
}

.notice {
  margin-top: 4px;
}

.legend-note {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}

.actions,
.assumptions {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
  font-size: 13.5px;
  line-height: 1.38;
}

.notes-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.notes-table th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  padding: 4px 6px;
  border-bottom: 1.5px solid var(--ink);
}

.notes-table th:first-child {
  width: 12%;
}

.notes-table th:nth-child(2) {
  width: 50%;
}

.notes-table td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--stone-soft);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.notes-table td span {
  display: block;
}

.note-gap {
  color: var(--accent-deep);
  font-weight: 700;
  font-size: 12.5px;
}

.mono-soft {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.note-empty {
  color: var(--muted);
  font-style: italic;
}

.penalty {
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.cert-block p {
  font-size: 13.5px;
}

.sign-line {
  display: grid;
  grid-template-columns: auto minmax(0, 2fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: end;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.sign-rule {
  border-bottom: 1.5px solid var(--ink);
  height: 16px;
}

.sheet-foot {
  padding-top: 8px;
  display: grid;
  gap: 4px;
}

.free-watermark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.sheet-disclaimer {
  font-size: 12px;
  color: var(--muted);
}

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

/* ---------- site footer ---------- */

.site-foot {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 20px 28px;
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(28, 25, 23, 0.62);
  visibility: hidden;
  opacity: 0;
}

.modal-backdrop.is-open {
  visibility: visible;
  opacity: 1;
}

.modal {
  width: min(580px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  background: var(--paper);
  border: var(--rule);
  border-top: 6px solid var(--accent);
  border-radius: var(--radius);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.modal:focus-visible {
  box-shadow: var(--focus);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: var(--rule);
}

.modal-head h2 {
  font-size: 20px;
  line-height: 1.2;
}

.modal-close {
  min-width: 44px;
  padding: 8px 12px;
  background: var(--card);
  border: var(--rule);
  font-size: 16px;
}

.modal-close:hover {
  background: var(--stone-wash);
}

.modal-close:active {
  background: var(--stone-soft);
}

.modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 16px;
  display: grid;
  gap: 12px;
  justify-items: start;
}

.trust-reassurance-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(22, 101, 52, 0.08);
  border: 1px solid rgba(22, 101, 52, 0.3);
  padding: 6px 12px;
  margin-bottom: 8px;
  border-radius: 4px;
}
.trust-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--primary);
  color: #FFFFFF;
  padding: 3px 8px;
  border-radius: 3px;
  white-space: nowrap;
}
.trust-text {
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.35;
}

.modal-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 4px;
}

.modal-pricing-callout {
  width: 100%;
  border: var(--rule);
  border-left: 6px solid var(--primary);
  background: #FFFFFF;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}
.modal-pricing-callout .price-val {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 26px;
  color: var(--primary);
}
.modal-pricing-callout .price-cadence {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  text-transform: uppercase;
}
.modal-pricing-callout .price-sub {
  font-size: 12px;
  color: var(--ink);
}

.modal-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: var(--rule);
  background: #FFFFFF;
}
.free-vs-pro-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.free-vs-pro-table th,
.free-vs-pro-table td {
  padding: 10px 12px;
  border-bottom: var(--rule);
}
.free-vs-pro-table thead th {
  background: var(--stone-wash);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.free-vs-pro-table thead .th-free {
  color: var(--muted);
  width: 32%;
}
.free-vs-pro-table thead .th-pro {
  color: var(--primary);
  background: rgba(22, 101, 52, 0.06);
  width: 38%;
}
.free-vs-pro-table tbody th {
  font-weight: 600;
  color: var(--ink);
}
.free-vs-pro-table tbody td {
  color: var(--muted);
}
.free-vs-pro-table tbody td strong {
  color: var(--primary);
}
.badge-free {
  color: var(--muted);
}
.badge-pro {
  color: var(--primary);
  font-weight: 700;
}

.license-form {
  width: 100%;
  border-top: var(--rule);
  padding-top: 12px;
  display: grid;
  gap: 6px;
}

.license-head {
  font-size: 16px;
}

.license-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.license-status {
  font-weight: 700;
  font-size: 14px;
}

.license-note {
  font-size: 12.5px;
  color: var(--muted);
}

.modal-foot {
  padding: 10px 16px 14px;
  border-top: var(--rule);
  display: flex;
  justify-content: flex-end;
}

/* ---------- responsive ---------- */

@media screen and (max-width: 1500px) {
  .unified-toolbar .recalc-timestamp {
    display: none;
  }
}

@media screen and (max-width: 1350px) {
  .unified-toolbar .trust-text {
    display: none;
  }
}

@media screen and (max-width: 1180px) {
  .unified-toolbar {
    position: static;
    flex-wrap: wrap;
    padding: 6px 12px;
    gap: 6px 10px;
  }
  .toolbar-left, .toolbar-right {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }
  .unified-toolbar .trust-reassurance-bar {
    margin-left: auto;
  }
}

/* Option B+ Statutory Desktop Cockpit (100dvh Dual-Scrollpane) */
@media screen and (min-width: 901px) {
  html, body {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
  body {
    display: flex;
    flex-direction: column;
  }
  .app-header-stack {
    flex: 0 0 auto;
    width: 100%;
    z-index: 100;
  }
  .workbench {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    border-bottom: 1.5px solid var(--rule);
  }
  .inventory {
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    position: static;
    mask-image: none !important;
    -webkit-mask-image: none !important;
  }
  .deliverable-zone {
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    mask-image: linear-gradient(to bottom, black calc(100% - 36px), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 36px), transparent 100%);
    position: relative;
    padding: 0 18px 56px;
    transition: mask-image 0.2s ease, -webkit-mask-image 0.2s ease;
  }
  .deliverable-zone::-webkit-scrollbar {
    width: 9px;
  }
  .deliverable-zone::-webkit-scrollbar-track {
    background: #F5F5F4;
    border-left: 1px solid #E7E5E4;
  }
  .deliverable-zone::-webkit-scrollbar-thumb {
    background: #A8A29E;
    border-radius: 4.5px;
    border: 2px solid #F5F5F4;
  }
  .deliverable-zone::-webkit-scrollbar-thumb:hover {
    background: #78716C;
  }

  /* Cockpit Horizon Sill (Anchored 28px bottom shelf) */
  .cockpit-horizon-bar {
    flex: 0 0 28px;
    height: 28px;
    width: 100%;
    background: #1C1917;
    border-top: 1.5px solid #44403C;
    display: flex;
    align-items: center;
    z-index: 100;
    user-select: none;
  }
  .cockpit-horizon-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 18px;
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
    font-size: 11px;
    color: #A8A29E;
  }
  .horizon-telemetry {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .horizon-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
  }
  .horizon-title {
    color: #E7E5E4;
    font-weight: 600;
  }
  .horizon-cue {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #FBBF24;
    font-weight: 600;
    letter-spacing: 0.01em;
  }
  .horizon-privacy {
    color: #A8A29E;
  }

  /* Pinned Dock Scroll Cue Button */
  .dock-scroll-cue {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono, monospace);
    font-size: 11.5px;
    font-weight: 600;
    color: #44403C;
    background: #E7E5E4;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #D6D3D1;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .dock-scroll-cue:hover {
    background: #D6D3D1;
    color: #1C1917;
    border-color: #A8A29E;
    transform: translateY(-1px);
  }
  .dock-scroll-arrow {
    font-size: 13px;
    transition: transform 0.15s ease;
  }
  .dock-scroll-cue:hover .dock-scroll-arrow {
    transform: translateY(2px);
  }

  .deliverable-dock {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #F5F5F4;
    padding: 12px 18px 12px 18px;
    margin: 0 -18px 14px -18px;
    border-bottom: 1.5px solid var(--stone);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.10);
  }
  .deliverable-dock .result-state {
    position: static;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
  }
}

/* Mobile & Tablet Flow (<= 900px) */
@media screen and (max-width: 900px) {
  html, body {
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }
  body {
    display: block;
  }
  .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;
  }
  .app-header-stack {
    position: static;
  }
  .workbench {
    display: flex;
    flex-direction: column;
    border-left: 0;
    border-right: 0;
    height: auto;
    overflow: visible;
  }
  .inventory,
  .deliverable-zone {
    height: auto;
    max-height: none;
    overflow-y: visible;
    border-right: 0;
    position: static;
    padding-bottom: 18px;
    mask-image: none !important;
    -webkit-mask-image: none !important;
  }
  .cockpit-horizon-bar,
  .dock-scroll-cue {
    display: none !important;
  }
  .deliverable-dock {
    position: static;
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    padding: 0;
    margin-bottom: 12px;
  }
  .deliverable-dock .result-state {
    position: static;
  }
}

@media screen and (max-width: 860px) {
  .unified-toolbar {
    padding: 6px 10px;
    gap: 6px 10px;
    border-left: 0;
    border-right: 0;
  }
  .toolbar-left, .toolbar-right {
    width: 100%;
    gap: 8px;
  }
  .unified-toolbar .mode-switch-deck {
    width: 100%;
  }
  .unified-toolbar .mode-tabs {
    width: 100%;
  }
  .unified-toolbar .mode-tab {
    flex: 1;
    text-align: center;
    padding: 6px 8px;
    font-size: 12px;
  }
  .unified-toolbar .preset-controls {
    width: 100%;
    flex-wrap: wrap;
  }
  .unified-toolbar .preset-stack {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .unified-toolbar .rail-reset { flex: 1 0 100%; margin-top: 4px; }
  .unified-toolbar .preset-chip {
    min-height: 32px;
    font-size: 11.5px;
    padding: 4px 6px;
    justify-content: center;
  }
  .unified-toolbar .case-status-bar {
    width: 100%;
    font-size: 11.5px;
  }
  .unified-toolbar .trust-reassurance-bar {
    display: none;
  }

  .grid-facility {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-facility .field-wide {
    grid-column: span 2;
  }
}

@media screen and (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .masthead {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "word cta"
      "title title"
      "status status";
    gap: 6px 10px;
    padding: 8px 14px 10px;
    background-image: repeating-linear-gradient(180deg, transparent 0 23px, rgba(250, 250, 249, 0.06) 23px 24px);
  }

  .spine,
  .masthead-body {
    display: contents;
  }

  .wordmark {
    grid-area: word;
    margin: 0;
    font-size: 15px;
    align-self: center;
  }

  .spine-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .spine-select {
    grid-area: select;
    min-width: 0;
  }

  .masthead h1 {
    font-size: 17px;
  }

  .masthead-sub {
    display: none;
  }

  .agency-status {
    gap: 6px;
  }

  .agency-status div {
    padding: 2px 7px;
    gap: 6px;
  }

  .agency-status dt {
    font-size: 11px;
  }

  .agency-status dd {
    font-size: 13px;
  }

  .agency-status div:nth-child(2) {
    display: none;
  }

  .btn-header {
    padding: 8px 10px;
    font-size: 13px;
  }

  .workbench {
    display: flex;
    flex-direction: column;
    border-left: 0;
    border-right: 0;
  }

  .deliverable-zone,
  .results {
    display: contents;
  }

  .rail {
    order: -2;
    border-right: 0;
    border-bottom: var(--rule);
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  #result-state {
    order: 1;
    margin: 8px 12px 0;
  }

  .inventory {
    order: 0;
    display: block;
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
    border-right: 0;
    padding: 8px 12px 12px;
  }
  .inventory-scroll-body {
    overflow-y: visible !important;
    max-height: none !important;
    min-height: 0;
    padding: 0;
    mask-image: none !important;
    -webkit-mask-image: none !important;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .inventory-bottom-shelf {
    display: block;
    margin: 16px 0 20px 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .inventory-bottom-shelf .btn-dock-jump--shelf {
    height: 44px;
    font-size: 14px;
  }

  .sheet-actions,
  .sheet,
  .cert-toolbar {
    order: 2;
    margin-left: 12px;
    margin-right: 12px;
  }

  .cert-toolbar {
    margin-bottom: 12px;
  }

  .rail-title {
    font-size: 14px;
    margin: 2px 0;
  }

  .step-index {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 11.5px;
    color: var(--muted);
  }

  .rail-note,
  .chip-meta {
    display: none;
  }

  .preset-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .preset-chip {
    min-height: 38px;
    grid-template-areas: "key name";
    align-items: center;
    padding: 4px 6px;
  }

  .chip-name {
    font-size: 12px;
  }

  .rail-reset {
    display: none;
  }

  .btn-update-calc {
    display: none;
  }


  .grid-facility,
  .grid-record,
  .grid-signoff {
    grid-template-columns: minmax(0, 1fr);
  }


  .mode-panels {
    min-height: 0;
  }

  .mode-tabs {
    margin: 0 0 10px;
    width: auto;
  }

  .grid-facility .field-wide,
  .grid-record .span-2,
  .field-check,
  .type-note {
    grid-column: auto;
  }

  .record-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .toolbar-buttons {
    grid-template-columns: minmax(0, 1fr);
  }

  .tool-drawer {
    min-height: 0;
  }

  .tally {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sheet {
    padding: 14px 12px;
  }

  .sheet-grid,
  .sheet-pair-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sheet-grid .span-2 {
    grid-column: auto;
  }

  .det-table,
  .det-table tbody,
  .det-table tr,
  .det-table td {
    display: block;
    width: 100%;
  }

  .det-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .det-table tr {
    border: var(--rule);
    border-radius: var(--radius);
    margin-bottom: 8px;
    padding: 4px 8px;
  }

  .det-table td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 8px;
    border-bottom: 1px solid var(--stone-soft);
    text-align: left;
  }

  .det-table .num {
    text-align: left;
  }

  .det-table td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
  }

  .det-table td > span {
    grid-column: 2;
  }

  .det-table .row-empty td {
    display: block;
  }

  .det-table .row-empty td::before {
    content: none;
  }

  .notes-table th:first-child {
    width: 18%;
  }

  .notes-table th:nth-child(2) {
    width: 46%;
  }

  .results {
    min-height: 0;
  }

  .calc-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .sign-line {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .preset-chip,
  .btn-primary,
  .btn-secondary,
  .tool-btn,
  .mode-tab,
  .record-tab {
    transition: background-color 120ms ease, border-color 120ms ease;
  }
}

/* ---------- Mode Switch Deck & Case Status Bar ---------- */
.mode-switch-deck {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-bottom: 8px;
}
.mode-switch-deck .mode-tabs {
  display: flex;
  gap: 4px;
  background: var(--stone-soft, #e7e5e4);
  padding: 4px;
  border: var(--rule);
  width: 100%;
  border-radius: var(--radius);
}
.mode-switch-deck .mode-tab {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  text-align: center;
  justify-content: center;
}
.preset-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.mode-switch-deck .mode-tab:hover {
  color: var(--ink);
}
.mode-switch-deck .mode-tab.is-active {
  background: var(--card, #ffffff);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.case-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(46, 125, 50, 0.08);
  border: 1px solid rgba(46, 125, 50, 0.3);
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 8px;
  border-radius: var(--radius);
}
.case-status-bar.is-blank {
  background: rgba(120, 113, 108, 0.1);
  border-color: rgba(120, 113, 108, 0.3);
  color: var(--muted);
}
.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary, #1b4332);
  flex-shrink: 0;
}
.case-status-bar.is-blank .status-indicator-dot {
  background: var(--muted);
}
.recalc-timestamp {
  margin-left: auto;
  font-size: 11px;
  color: var(--primary, #1b4332);
  font-family: var(--font-mono);
}
.btn-update-calc {
  display: none;
  width: 100%;
  padding: 10px 14px;
  margin-top: 10px;
  background: var(--primary, #1b4332);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13.5px;
  text-align: center;
  border: var(--rule);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
@media (max-width: 900px) {
  .btn-update-calc {
    display: block;
  }
}
.btn-update-calc:hover {
  background: #0d281e;
}

.req-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--primary, #1b4332);
  margin-left: 6px;
  text-transform: none;
  letter-spacing: 0;
}

.sds-drawer {
  margin-top: 12px;
  border-top: 1px dashed var(--stone);
  padding-top: 8px;
}
.sds-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 8px;
  background: var(--stone-wash);
  border: var(--rule);
  border-radius: var(--radius);
  user-select: none;
  list-style: none;
  transition: background 0.15s ease;
}
.sds-summary::-webkit-details-marker { display: none; }
.sds-summary:hover {
  background: #E7E5E4;
  color: var(--ink);
}
.sds-drawer[open] .toggle-caret {
  transform: rotate(180deg);
}
.sds-drawer[open] .grid-sds {
  margin-top: 10px;
}
@keyframes flashGlow {
  0% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.6); }
  50% { box-shadow: 0 0 14px 2px rgba(46, 125, 50, 0.35); }
  100% { box-shadow: none; }
}
.flash-recalc {
  animation: flashGlow 0.4s ease-out;
}

/* Mobile Sticky Result HUD */
.mobile-hud {
  display: none;
}
@media (max-width: 900px) {
  .mobile-hud {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: rgba(28, 25, 23, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 2px solid var(--primary, #1b4332);
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .mobile-hud.is-hud-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
  }
  .hud-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
  }
  .hud-metric-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
  }
  .hud-value {
    font-size: 16px;
    font-weight: 800;
    color: #FFFFFF;
    font-family: var(--font-display);
  }
  .hud-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-mono);
    border-radius: 2px;
  }
  .hud-badge--ok {
    background: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.5);
  }
  .hud-badge--alarm {
    background: rgba(220, 38, 38, 0.25);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.5);
  }
  .hud-jump-btn {
    flex-shrink: 0;
    background: #FFFFFF;
    color: #1c1917;
    border: 1px solid #d6d3d1;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    font-family: var(--font-mono);
    border-radius: 4px;
  }
  .hud-jump-btn:active {
    background: #e7e5e4;
  }
}

/* ---------- print: agency deliverable only ---------- */

@media print {
  @page {
    size: letter;
    margin: 0.6in;
  }

  html,
  body {
    background: #FFFFFF !important;
    color: #111827 !important;
    font-size: 11pt;
  }

  .masthead,
  .rail,
  .inventory,
  .site-foot,
  .modal-backdrop,
  .cert-toolbar,
  .sheet-actions,
  .result-state,
  button,
  input,
  select,
  nav,
  [data-tab],
  [data-upload-panel] {
    display: none !important;
  }

  .workbench {
    display: block;
    border: 0;
    background: #FFFFFF;
    max-width: none;
  }

  #executive-deliverable {
    display: block;
    padding: 0;
    background: #FFFFFF;
  }

  .results,
  .sheet {
    min-height: 0 !important;
  }

  .results {
    display: block;
  }

  .sheet {
    border: 0;
    padding: 0;
    color: #111827;
    background: #FFFFFF;
    outline: none !important;
  }

  .sheet *,
  .sheet .sub,
  .sheet-grid dt,
  .tally dt,
  .legend-note,
  .sheet-disclaimer,
  .free-watermark,
  .sheet-kind {
    color: #111827 !important;
  }

  .badge {
    background: #FFFFFF !important;
    color: #111827 !important;
    border: 1.5px solid #111827 !important;
  }

  .meter {
    display: none !important;
  }

  .det-table thead {
    display: table-header-group;
  }

  .det-table tr,
  .notes-table tr,
  .tally div,
  .cert-block,
  .sheet-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .sheet-h3 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .is-free .sheet::before {
    content: "DRAFT · NOT CERTIFIED";
    position: fixed;
    top: 42%;
    left: 0;
    right: 0;
    text-align: center;
    transform: rotate(-24deg);
    font-family: var(--font-display);
    font-size: 54pt;
    font-weight: 700;
    color: rgba(17, 24, 39, 0.08);
    z-index: 0;
    pointer-events: none;
  }

  .is-free .free-watermark {
    display: block !important;
    border-top: 1px solid #111827;
    padding-top: 6px;
  }

  .is-pro .free-watermark {
    display: none !important;
  }
}

[hidden] {
  display: none !important;
}

/* 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; }
#reset-btn.rail-reset { display: inline-flex; min-height: 44px; align-items: center; }
.trust-footer {
  padding: 16px 20px;
  font-size: 13px;
  color: #44403C;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.trust-footer .trust-link { color: #166534; text-decoration: underline; display: inline-block; padding: 4px 0; min-height: 44px; line-height: 36px; }
.mode-tab, .preset-chip { min-height: 44px; }
select#facility-state, input#reporting-year { width: 100%; min-width: 0; }

/* Repair pass: hit areas, control widths, print isolation */
@media (max-width: 760px) {
  .unified-toolbar .mode-tab,
  .unified-toolbar .preset-chip,
  .mode-switch-deck .mode-tab {
    min-height: 44px !important;
    height: auto !important;
  }
  .grid-facility .field-facility-state,
  .grid-facility .field-reporting-year {
    grid-column: 1 / -1;
  }
  select#facility-state, input#reporting-year { min-width: 150px; }
  .workbench button,
  .workbench select,
  .workbench input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  #hud-jump {
    min-height: 44px;
  }
}
@media (min-width: 761px) {
  .grid-facility {
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  }
  .grid-facility .field-facility-name,
  .grid-facility .field-days-late {
    grid-column: span 2;
  }
  select#facility-state, input#reporting-year { min-width: 175px; }
}
@media print {
  .trust-footer,
  .trust-reassurance-bar,
  .workflow-direction-bar,
  .cockpit-horizon-bar,
  .unified-toolbar,
  .preset-bar,
  form,
  fieldset,
  dialog,
  [role="dialog"],
  [role="tablist"],
  footer:not(.sheet footer) {
    display: none !important;
  }
}

/* Mobile: keep the masthead within the 100px chrome budget */
@media (max-width: 900px) {
  .agency-status { display: none; }
  .spine-label { display: none; }
  .spine .wordmark { display: none; }
  .masthead-title { font-size: 14px; line-height: 1.15; }
  .masthead { padding: 4px 12px; row-gap: 2px; }
}

/* Touch floors + control padding (reviewer 2026-10-19) */
.mode-tab, .unified-toolbar .preset-chip { min-height: 44px !important; height: auto !important; padding-top: 8px !important; padding-bottom: 8px !important; }

/* Reviewer 2026-10-19 round 2: tabs/chips touch floors + container padding */
.unified-toolbar .mode-tab { min-height: 44px !important; height: auto !important; padding: 8px 10px !important; }
fieldset.card.step-card { padding: 16px !important; }

/* Reviewer round 3: dock jump interior padding */
#btn-dock-jump-deliverable.btn-dock-jump { min-height: 44px !important; padding-top: 10px !important; padding-bottom: 10px !important; }
