:root {
  --font-display: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  --font-brand: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  --secondary: #1e5f97;
  --secondary-soft: #eef5fb;
  --slate: #1e293b;
  --slate-strong: #0f172a;
  --ink: var(--text, #0f172a);
  --radius: var(--radius-md, 12px);
  --shadow: var(--shadow-md, 0 4px 12px -2px rgba(15, 23, 42, 0.08));
  --surface-solid: var(--surface, #ffffff);
}

.page-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.smart-fold-bar {
  display: none !important;
}

.returning-user .site-header {
  display: flex;
}

.returning-user .smart-fold-bar {
  display: none !important;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge .mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #ea580c;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  font-size: 14.5px;
  color: #ffffff;
  line-height: 1.2;
}

.brand-text span {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.2;
}

.header-status {
  display: flex;
  align-items: center;
}

.compliance-tag {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

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

.header-actions .pro-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  background: #ea580c;
  color: #ffffff !important;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.3);
  transition: all 0.15s ease;
}

.header-actions .pro-link:hover {
  background: #c2410c;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.btn-primary,
.jump-tool-btn,
[data-jump-tool],
header nav a.btn-primary,
header nav a.jump-tool-btn,
.smart-fold-bar a.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--primary) !important;
  color: var(--on-primary, #ffffff) !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(196, 81, 31, 0.24);
}

.btn-primary:active,
.jump-tool-btn:active,
[data-jump-tool]:active {
  transform: translateY(1px) scale(0.99);
}

.triage-nav-submit,
.triage-card-submit {
  height: 38px !important;
  padding: 0 14px !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(30, 95, 151, 0.3);
  border-radius: 999px;
  background: var(--secondary-soft);
  color: var(--secondary);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.mobile-jump {
  display: none;
}

[data-layer="marketing"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  margin: 12px 0 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.marketing-strip-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
  justify-content: space-between;
}

.marketing-strip-content p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}

.marketing-strip-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compact-btn {
  height: 36px !important;
  padding: 0 14px !important;
  font-size: 0.85rem !important;
}

.pro-chip-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--secondary);
  text-decoration: none;
}

.pro-chip-link:hover {
  text-decoration: underline;
}

.proof-card,
.pricing-card,
.panel,
.metric-card {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.proof-card,
.pricing-card {
  padding: var(--space-3, 24px);
}

.pricing-card [data-checkout="pro"],
.pricing-card .btn-primary {
  display: inline-flex;
  margin-bottom: 16px;
}

.proof-card h2,
.pricing-card h2,
.panel h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.mini-estimate {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.mini-row:last-child {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--secondary-soft);
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 800;
}

.price-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.price-switch button,
[data-preset-chip],
.segmented label {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--slate);
  font-weight: 800;
  cursor: pointer;
}

.price-switch button[aria-pressed="true"],
[data-preset-chip].active,
.segmented input:checked + span {
  background: var(--secondary);
  color: #ffffff;
  border-color: var(--secondary);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(500px, 1.15fr) minmax(440px, 1fr);
  gap: 24px;
  align-items: start;
  padding: 8px 0 42px;
}

.workspace-column {
  display: grid;
  gap: 20px;
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

[data-layer="utility"] {
  scroll-margin-top: 72px;
}

.workspace-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(100%, 430px);
}

.clear-preview-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #991b1b;
  font-weight: 600;
}
.clear-preview-btn:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.local-state-status {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
}

#workspace-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.workspace-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.state-stack {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.state-message {
  display: none;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(30, 95, 151, 0.1);
  color: var(--slate);
  font-weight: 800;
}

body[data-state="loading"] [data-state-message="loading"],
body[data-state="empty"] [data-state-message="empty"],
body[data-state="error"] [data-state-message="error"],
body[data-state="invalid"] [data-state-message="invalid"] {
  display: block;
}

body[data-state="loaded"] [data-state-message="loaded"] {
  display: none !important;
}

.validation-error-cue {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #f87171;
  color: #991b1b;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

#form-validation-cue:not([hidden]) {
  display: flex !important;
}

body[data-state="invalid"] [data-state-message="invalid"] {
  display: flex !important;
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
  background-color: #fffafb !important;
}

.panel {
  padding: var(--space-3, 24px);
}

.panel form,
.line-items {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 14px;
}

.form-grid > .full-width,
.form-grid > .quick-deltas,
.form-grid > .segmented,
.form-grid > .field-label,
.form-grid > .triage-submit {
  grid-column: 1 / -1;
}

@media (max-width: 580px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

label,
.field-label {
  display: grid;
  gap: 7px;
  color: var(--slate);
  font-size: 0.88rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  min-width: 180px;
  border: 1px solid rgba(23, 33, 43, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
  box-sizing: border-box;
}

textarea {
  min-height: 82px;
  resize: vertical;
}

.quick-deltas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-deltas button,
.icon-btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--secondary);
  font-weight: 900;
  cursor: pointer;
}

.quick-deltas button {
  padding: 0 12px;
}

.triage-submit {
  width: 100%;
  margin-top: 4px;
}

.preset-row,
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented label {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  padding: 0;
}

.segmented input {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 999px;
}

.line-item {
  display: grid;
  grid-template-columns: 1fr 78px 92px;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.54);
}

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

.metric-card {
  padding: var(--space-3, 24px);
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  color: var(--slate);
  font-size: 1.7rem;
  font-family: var(--font-display);
}

.photo-well {
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(30, 95, 151, 0.1);
  color: var(--slate);
  line-height: 1.5;
}

.local-disclosure {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  line-height: 1.5;
}

.pricing-card .btn-primary + .local-disclosure,
.pricing-card [data-checkout] + .local-disclosure {
  margin-top: 0;
}

.triage-result {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  margin: 14px 0;
  padding: var(--space-3, 24px);
  border: 1px solid rgba(196, 81, 31, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
}

.triage-result.is-ready {
  background: rgba(196, 81, 31, 0.08);
}

.triage-score-card {
  display: grid;
  align-content: center;
  min-height: 120px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--secondary-soft, #eef5fb);
  border: 1px solid rgba(30, 95, 151, 0.2);
  color: var(--slate-strong, #0f172a);
}

.triage-score-card span,
.triage-score-card b {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
  color: var(--secondary);
}

.triage-score-card strong {
  display: block;
  margin: 4px 0;
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 1;
  color: var(--slate-strong);
}

.triage-output h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

.triage-output ul {
  margin: 0 0 12px 18px;
  padding: 0;
  color: var(--slate);
  line-height: 1.45;
}

#triage-follow-up {
  min-height: 118px;
  background: #ffffff;
}

.deliverable-wrapper {
  position: static;
  padding: 0;
  margin: 0;
}

[data-deliverable="sheet"] {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

#executive-deliverable {
  background: #ffffff;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  padding: 24px;
  margin: 0;
  color: #16202a;
}

.deliverable-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--slate);
}

.deliverable-logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--slate);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 900;
}

.deliverable-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.meta-date,
.meta-time {
  white-space: nowrap;
}

.sheet-section {
  margin-top: 14px;
}

.sheet-section h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.sheet-table td,
.sheet-table th {
  padding: 8px 0;
  border-bottom: 1px solid rgba(23, 33, 43, 0.14);
  text-align: left;
  vertical-align: top;
}

.sheet-table td:last-child,
.sheet-table th:last-child {
  text-align: right;
}

.free-watermark {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: rgba(23, 33, 43, 0.5);
  font-size: 0.82rem;
  text-align: center;
}

.pro-active .free-watermark {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(23, 33, 43, 0.48);
}

.modal.is-open {
  display: flex;
}

.modal-panel {
  width: min(460px, 100%);
  border-radius: var(--radius);
  background: var(--surface-solid);
  padding: 20px;
  box-shadow: var(--shadow);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .page-shell {
    width: min(100% - 20px, 720px);
  }

  [data-layer="marketing"],
  .workspace {
    grid-template-columns: 1fr;
  }

  .deliverable-wrapper {
    position: static;
  }

  .mobile-jump {
    display: inline-flex;
    position: sticky;
    top: 8px;
    z-index: 25;
    margin-left: auto;
  }

  .site-header nav {
    display: none;
  }

  .workspace-heading {
    display: block;
  }

  .workspace-actions {
    justify-content: stretch;
    margin-top: 14px;
  }

  .local-state-status {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .hero-copy h1 {
    font-size: 2.45rem;
  }

  .hero-actions,
  .price-switch,
  .metric-grid,
  .line-item,
  .triage-result {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .btn-primary,
  .btn-secondary,
  .jump-tool-btn {
    width: 100%;
  }
}

@page {
  margin: 10mm;
}

@media print {
  body,
  main,
  .page-shell,
  .workspace,
  .deliverable-wrapper {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  table,
  tr,
  td,
  th,
  .sheet-section,
  .deliverable-top,
  article,
  [data-deliverable="sheet"],
  .sheet-signatures {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  form,
  nav,
  header,
  footer,
  button,
  [data-layer="marketing"],
  [data-action="print-deliverable"],
  .workspace-heading,
  .panel,
  .metric-card,
  .smart-fold-bar,
  .deliverable-dock,
  .no-print,
  .triage-appendix,
  .cockpit-horizon-bar,
  .mobile-hud {
    display: none !important;
  }

  [data-deliverable="sheet"],
  #executive-deliverable {
    display: block !important;
    width: 100% !important;
    border: 0 !important;
    box-shadow: none !important;
  }
}

/* ==========================================================================
   Option B+ Statutory Desktop Cockpit & Usability Enhancement (100dvh Zero Window Scroll)
   ========================================================================== */

/* Unified 46px Flex Toolbar */
.unified-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  padding: 6px 20px;
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  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: #94a3b8;
  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: #c2410c;
  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: #cbd5e1;
  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(194, 65, 12, 0.3);
  border-color: #c2410c;
  color: #ffedd5;
  font-weight: 600;
}

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

.engine-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ea580c;
  box-shadow: 0 0 6px rgba(234, 88, 12, 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: #fdba74;
  background: rgba(234, 88, 12, 0.15);
  border: 1px solid rgba(234, 88, 12, 0.3);
  border-radius: 4px;
}

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

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

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

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

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

.role-badge-in {
  background: rgba(245, 158, 11, 0.2);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.5);
  margin-right: 6px;
}

.role-badge-out {
  background: rgba(194, 65, 12, 0.15);
  color: #c2410c;
  border: 1px solid rgba(194, 65, 12, 0.4);
  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(--border, #cbd5e1);
}

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

/* In-Flow Action Shelf at Form End */
.dock-jump-shelf {
  position: static;
  background: #ffffff;
  border: 1.5px solid rgba(194, 65, 12, 0.4);
  border-radius: 8px;
  padding: 14px;
  margin-top: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

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

.dock-scroll-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  padding: 6px 12px;
  background: transparent;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dock-scroll-cue:hover {
  background: rgba(0, 0, 0, 0.03);
  color: #0f172a;
  border-color: #94a3b8;
}

.action-msg {
  min-height: 18px;
  font-size: 11px;
  font-weight: 600;
  color: #15803d;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.action-msg.msg-flash {
  opacity: 1;
}

/* Spotlight Pulse Animation */
@keyframes spotlightPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(194, 65, 12, 0.7);
  }
  50% {
    box-shadow: 0 0 24px 8px rgba(194, 65, 12, 0.9);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(194, 65, 12, 0);
  }
}

.spotlight-pulse {
  animation: spotlightPulse 0.9s cubic-bezier(0.25, 1, 0.5, 1);
  border-color: #c2410c !important;
}

/* Anchored Cockpit Horizon Bar */
.cockpit-horizon-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: #0f172a;
  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: #94a3b8;
  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: #e2e8f0;
  text-decoration: none;
}

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

/* 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-header {
    height: 48px;
    min-height: 48px;
    padding: 0 20px;
    margin: 0;
    max-width: 100%;
    border-radius: 0;
    flex-shrink: 0;
  }

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

  .workspace {
    height: 100%;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(500px, 1.15fr) minmax(440px, 1fr);
    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;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--border, #cbd5e1);
    box-shadow: var(--shadow);
  }

  .inspector-pane .pane-header {
    flex: 0 0 auto;
    padding: 10px 16px;
    margin: 0;
    border-bottom: 1px solid var(--border, #cbd5e1);
    background: #ffffff;
  }

  .inspector-scroll-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding: 16px;
    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%);
  }

  .inspector-scroll-body .panel {
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: none;
    margin: 0;
  }

  .dock-jump-shelf {
    flex: 0 0 auto;
    padding: 12px 16px;
    background: #ffffff;
    border-top: 1.5px solid var(--border, #cbd5e1);
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.06);
    z-index: 15;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    border-radius: 0 0 8px 8px;
  }

  .deliverable-dock {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #ffffff;
    padding: 10px 14px;
    margin: 0 0 12px 0;
    border-radius: 8px;
    border: 1px solid var(--border, #cbd5e1);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    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;
  }

  .deliverable-dock .compact-action {
    padding: 8px 12px;
    font-size: 12px;
  }

  .deliverable-dock .dock-scroll-cue {
    padding: 7px 12px;
    font-size: 12px;
    background: #f8fafc;
    border: 1px solid var(--border, #cbd5e1);
    color: var(--muted, #64748b);
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .deliverable-dock .dock-scroll-cue:hover {
    background: #f1f5f9;
    color: var(--text, #0f172a);
  }

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

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

  .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;
  }

  .page-shell {
    height: auto;
    overflow: visible;
  }

  .workspace {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
    padding-bottom: 80px;
  }

  .inspector-pane {
    height: auto;
    overflow: visible;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
  }

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

  .deliverable-zone {
    height: auto;
    overflow: visible;
    padding-right: 0;
  }

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

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

  .mobile-hud {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0f172a;
    border-top: 1px solid rgba(194, 65, 12, 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: #94a3b8;
    font-family: var(--font-mono, monospace);
    text-transform: uppercase;
  }

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

  .hud-jump-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    background: #c2410c;
    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%; }
.brand-badge .mark { color: #fecaca; }
a.upgrade-btn, .upgrade-btn { color: #fde68a; }

a.nav-tools-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  line-height: 1.2;
}

a.nav-tools-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  line-height: 1.2;
}

a.nav-tools-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 12px;
  line-height: 1.2;
}

a.nav-tools-link,
.nav-tools-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  height: 44px;

/* accessibility-guard:2026-10-22 */
@media (max-width: 900px) {
  button,
  a.btn,
  [role="button"],
  select,
  input[type="button"],
  input[type="submit"],
  .masthead .nav-tools-link,
  a.nav-tools-link,
  .nav-tools-link,
  a.jump-tool-btn,
  .jump-tool-btn,
  .preset-chip,
  [data-preset-chip],
  .step-chip,
  .pro-link,
  a.pro-link,
  .checkout-btn,
  a.checkout-btn,
  .masthead-actions button,
  .masthead-actions a,
  .masthead-actions .btn,
  [class*="cookie"] button,
  [id*="cookie"] button,
  .header-brand,
  a.header-brand,
  .skip-link,
  .btn-remove-row,
  .icon-btn {
    min-height: 44px !important;
  }
  .btn-remove-row,
  .icon-btn {
    min-width: 44px !important;
  }
}

/* accessibility-guard: round2 */
@media (max-width: 900px) {
  a.btn-primary, .btn-primary, a.wordmark, .wordmark { min-height: 44px !important; }
  a.wordmark, .wordmark { min-width: 44px !important; }
}
