/* Fire doors configurator and job workspace */

.fd-page-toast-host,
.fd-toast-host {
  position: fixed;
  z-index: 10090;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
}

.fd-page-toast-host {
  right: 18px;
  bottom: 88px;
}

.fd-toast-host {
  right: 18px;
  bottom: 88px;
}

.fd-page-toast {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  border-radius: 12px;
  background: #dcfce7;
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.18);
}

.fd-toast {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  border-radius: 12px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.18);
}

.fd-toast--success {
  background: #dcfce7;
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.fd-toast--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid rgba(220, 38, 38, 0.22);
}

.fd-toast--info,
.fd-toast--warning {
  background: #fffaf0;
  color: #7c2d12;
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.fd-page-toast__message {
  line-height: 1.45;
}

.fd-toast__message {
  line-height: 1.45;
}

.fd-page-toast__actions,
.fd-toast__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fd-page-toast__actions .btn,
.fd-toast__actions .btn {
  white-space: nowrap;
  text-decoration: none;
}

/* Dark mode: toast notifications */
html[data-theme="dark"] .fd-toast-host {
  background: #065f46;
  color: #dcfce7;
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .fd-toast--success {
  background: #065f46;
  color: #dcfce7;
  border-color: rgba(16, 185, 129, 0.45);
}

html[data-theme="dark"] .fd-toast--error {
  background: #7f1d1d;
  color: #fee2e2;
  border-color: rgba(220, 38, 38, 0.4);
}

html[data-theme="dark"] .fd-toast--info,
html[data-theme="dark"] .fd-toast--warning {
  background: #78350f;
  color: #fef3c7;
  border-color: rgba(251, 191, 36, 0.4);
}

/* ── My Jobs page (inspector work view) ─────────────────────────────── */

.my-jobs-page.page-section {
  padding-top: 0;
  padding-bottom: 0;
}

/* Overdue stat — red tone */
.my-jobs-page .ipi-stat--overdue .ipi-stat-icon {
  background: var(--ipi-red-bg);
  color: var(--ipi-red);
}

.my-jobs-page .ipi-stat--overdue .ipi-stat-num,
.my-jobs-page .ipi-stat--overdue .ipi-stat-foot {
  color: var(--ipi-red);
}

/* Clickable stat cards */
.my-jobs-page a.ipi-stat {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.my-jobs-page a.ipi-stat:hover {
  box-shadow: var(--ipi-shadow-md);
  border-color: var(--ipi-rule-h);
}

/* Filter form — search button hidden on desktop (selects auto-submit) */
.my-jobs-page .mj-search-btn {
  display: none;
}

/* Filter actions inline */
.my-jobs-page .mj-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Empty state help */
.my-jobs-page .mj-empty-state {
  padding: 0 var(--ipi-page-gutter) 16px;
}

.my-jobs-page .mj-empty-help ul {
  padding-left: 18px;
  margin: 0 0 12px;
}

/* Remedial detail modal (read-only) */
.my-jobs-page .mj-rmd-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.my-jobs-page .mj-rmd-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.my-jobs-page .mj-rmd-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ipi-ink-4);
  min-width: 80px;
  flex-shrink: 0;
}

.my-jobs-page .mj-rmd-value {
  font-size: 14px;
  color: var(--ipi-ink);
}

@media (max-width: 900px) {
  .my-jobs-page .mj-search-btn {
    display: inline-flex;
  }

  .my-jobs-page .mj-filter-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .my-jobs-page .mj-filter-actions > *:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  /* ── Table card-ification ────────────────────────────────────────── */
  .my-jobs-page .ipi-table-wrap {
    overflow-x: visible;
  }

  .my-jobs-page .ipi-table {
    min-width: 0;
  }

  .my-jobs-page .ipi-table,
  .my-jobs-page .ipi-table thead,
  .my-jobs-page .ipi-table tbody,
  .my-jobs-page .ipi-table tr,
  .my-jobs-page .ipi-table th,
  .my-jobs-page .ipi-table td {
    display: block;
    width: 100%;
  }

  .my-jobs-page .ipi-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .my-jobs-page .ipi-table tbody {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .my-jobs-page .ipi-table tr {
    border: 1px solid rgba(26, 24, 21, 0.1);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    padding: 6px 0;
  }

  .my-jobs-page .ipi-table td {
    position: relative;
    padding: 7px 14px 7px 110px;
    border-bottom: 1px solid rgba(26, 24, 21, 0.06);
    text-align: left !important;
    white-space: normal;
  }

  .my-jobs-page .ipi-table td:last-child {
    border-bottom: none;
  }

  .my-jobs-page .ipi-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 14px;
    top: 7px;
    width: 82px;
    color: #9a9188;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  /* Actions cell: no pseudo-label, flexed right */
  .my-jobs-page .ipi-table td.ipi-actions {
    padding-left: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
  }

  .my-jobs-page .ipi-table td.ipi-actions::before {
    display: none;
  }
}

/* ── Dark mode: mobile table cards ─────────────────────────────────── */
@media (max-width: 900px) {
  html[data-theme="dark"] .my-jobs-page .ipi-table tr {
    background: var(--card);
    border-color: var(--border);
    box-shadow: none;
  }

  html[data-theme="dark"] .my-jobs-page .ipi-table td {
    border-bottom-color: rgba(71, 85, 105, 0.4);
  }

  html[data-theme="dark"] .my-jobs-page .ipi-table td::before {
    color: var(--text-muted);
  }
}

.fire-doors-page-section.page-section {
  padding-top: 0;
  padding-bottom: 0;
}

html[data-theme="dark"] .fire-doors-page .fd-step-card,
html[data-theme="dark"] .fire-doors-page .basket-item {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] .fire-doors-page .fd-step-card__header h3,
html[data-theme="dark"] .fire-doors-page .info-callout strong,
html[data-theme="dark"] .fire-doors-page .preset-card__copy strong,
html[data-theme="dark"] .fire-doors-page .architrave-profile-panel h4 {
  color: var(--text);
}

html[data-theme="dark"] .fire-doors-page .fd-step-card__header p,
html[data-theme="dark"] .fire-doors-page .config-description,
html[data-theme="dark"] .fire-doors-page .config-eyebrow,
html[data-theme="dark"] .fire-doors-page .fd-preview-note,
html[data-theme="dark"] .fire-doors-page .modal__list li div span,
html[data-theme="dark"] .fire-doors-page .info-callout p,
html[data-theme="dark"] .fire-doors-page .preset-modal-heading,
html[data-theme="dark"] .fire-doors-page .preset-card__copy p,
html[data-theme="dark"] .fire-doors-page .architrave-profile-panel p {
  color: var(--text-muted);
}

html[data-theme="dark"] .fire-doors-page .basket-row__title,
html[data-theme="dark"] .fire-doors-page .basket-row__subtotal {
  color: rgba(248, 250, 252, 0.96);
}

html[data-theme="dark"] .fire-doors-page .basket-row__toggle {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.55);
  color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] .fire-doors-page .basket-actions--secondary {
  border-top-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .fire-doors-page .fd-section-title__icon,
html[data-theme="dark"] .fire-doors-page .info-callout__icon {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .fire-doors-page .text-muted {
  color: var(--text-muted);
}

html[data-theme="dark"] .fire-doors-page .btn.fd-action-subtle {
  color: rgba(148, 163, 184, 0.92);
}

html[data-theme="dark"] .fire-doors-page .ipi-page-header {
  background: rgba(15, 23, 42, 0.72);
  border-bottom-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .fire-doors-page .ipi-ph-title {
  color: rgba(248, 250, 252, 0.96);
}

html[data-theme="dark"] .fire-doors-page .ipi-ph-sub {
  color: rgba(148, 163, 184, 0.9);
}

html[data-theme="dark"] .fire-doors-page .btn.btn-secondary {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.22);
  color: rgba(248, 250, 252, 0.94);
}

html[data-theme="dark"] .fire-doors-page .btn.btn-secondary:hover,
html[data-theme="dark"] .fire-doors-page .btn.btn-secondary:focus-visible {
  background: rgba(30, 41, 59, 0.85);
}

html[data-theme="dark"] .fire-doors-page .btn.btn-primary {
  background: rgba(248, 250, 252, 0.95);
  color: #111827;
}

html[data-theme="dark"] .fire-doors-page .btn.btn-primary:hover,
html[data-theme="dark"] .fire-doors-page .btn.btn-primary:focus-visible {
  background: #fff;
}

html[data-theme="dark"] .fire-doors-page .summary-total {
  color: rgba(148, 163, 184, 0.92);
}

html[data-theme="dark"] .fire-doors-page .summary-total strong {
  color: rgba(248, 250, 252, 0.96);
}

html[data-theme="dark"] .fire-doors-page .fd-preset {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.28);
}

html[data-theme="dark"] .fire-doors-page .fd-preset strong {
  color: rgba(248, 250, 252, 0.96);
}

html[data-theme="dark"] .fire-doors-page .fd-preset > span:not(.fd-preset__heading),
html[data-theme="dark"] .fire-doors-page .fd-preset__reason {
  color: rgba(148, 163, 184, 0.92);
}

html[data-theme="dark"] .fire-doors-page .fd-preset.active {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.48);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .fire-doors-page .fd-preset--ghost {
  background: rgba(2, 6, 23, 0.45);
  border-color: rgba(148, 163, 184, 0.28);
}

html[data-theme="dark"] .fire-doors-page .preset-banner {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
}

html[data-theme="dark"] .fire-doors-page .preset-banner__label {
  color: #93c5fd;
}

html[data-theme="dark"] .fire-doors-page .preset-banner__action {
  color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] .fire-doors-page :where(.fd-size-grid label, .fd-note-field, .fd-form-grid label) {
  color: rgba(148, 163, 184, 0.92);
}

html[data-theme="dark"] .fire-doors-page :where(
  .fd-size-grid input,
  .fd-note-field textarea,
  .basket-inline-fields input,
  .basket-inline-fields textarea,
  .fd-ral-panel__input,
  .fd-ral-panel__swatch
) {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.36);
  color: var(--text);
}

html[data-theme="dark"] .fire-doors-page .basket-inline-fields label {
  color: rgba(148, 163, 184, 0.92);
}

html[data-theme="dark"] .fire-doors-page .config-section {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .fire-doors-page .fd-pricing-section {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .fire-doors-page .fd-pricing-section__title {
  color: rgba(248, 250, 252, 0.96);
}

html[data-theme="dark"] .fire-doors-page .fd-pricing-item {
  background: rgba(2, 6, 23, 0.55);
  border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .fire-doors-page .fd-pricing-item dt {
  color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] .fire-doors-page .fd-pricing-item dd {
  color: rgba(248, 250, 252, 0.96);
}

html[data-theme="dark"] .fire-doors-page .fd-pricing-included {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.22);
  color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] .fire-doors-page .fd-pricing-missing {
  color: rgba(148, 163, 184, 0.92);
}

html[data-theme="dark"] .fire-doors-page .fd-pricing-unit {
  color: rgba(148, 163, 184, 0.92);
}

html[data-theme="dark"] .fire-doors-page .fd-pill {
  border-color: rgba(148, 163, 184, 0.28);
  color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] .fire-doors-page :where(.info-callout, .preset-card) {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
}

html[data-theme="dark"] .fire-doors-page .preset-tag {
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
}

html[data-theme="dark"] .fire-doors-page .architrave-profile-tablist {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .fire-doors-page .architrave-profile-tab {
  background: rgba(2, 6, 23, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
  color: rgba(226, 232, 240, 0.9);
}

html[data-theme="dark"] .fire-doors-page .architrave-profile-tab.is-active {
  border-color: rgba(226, 232, 240, 0.35);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .fire-doors-page .architrave-icon {
  border-color: rgba(148, 163, 184, 0.22);
  background-color: rgba(15, 23, 42, 0.65);
}

html[data-theme="dark"] .fire-doors-page .architrave-profile-panel {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
}

html[data-theme="dark"] .fire-doors-page .architrave-profile-panel img {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.55);
}

html[data-theme="dark"] .fire-doors-page .architrave-profile-image-fallback {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.55);
  color: rgba(148, 163, 184, 0.92);
}

html[data-theme="dark"] .fire-doors-page .fd-step-card__status {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.55);
}

html[data-theme="dark"] .fire-doors-page .config-option {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.55);
}

html[data-theme="dark"] .fire-doors-page .config-option strong {
  color: rgba(248, 250, 252, 0.96);
}

html[data-theme="dark"] .fire-doors-page .config-option span {
  color: rgba(148, 163, 184, 0.92);
}

html[data-theme="dark"] .fire-doors-page .config-selected {
  color: rgba(148, 163, 184, 0.92);
}

html[data-theme="dark"] .fire-doors-page .option-price {
  color: rgba(248, 250, 252, 0.92);
}

html[data-theme="dark"] .fire-doors-page .option-price--included {
  color: #4ade80;
}

html[data-theme="dark"] .fire-doors-page .config-option::after {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.75);
}

html[data-theme="dark"] .fire-doors-page .config-option.active {
  border-color: rgba(59, 130, 246, 0.48);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .fire-doors-page .config-mode-tag {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
}

html[data-theme="dark"] .fire-doors-page .fd-narrative-status,
html[data-theme="dark"] .fire-doors-page .fd-narrative {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.55);
  color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] .fire-doors-page .fd-narrative-status.is-busy {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
}

html[data-theme="dark"] .fire-doors-page .fd-narrative.is-busy::after {
  background:
    linear-gradient(110deg, rgba(15, 23, 42, 0.95) 8%, rgba(2, 6, 23, 0.55) 18%, rgba(15, 23, 42, 0.95) 33%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.68));
}

html[data-theme="dark"] .fire-doors-page .fd-editing-banner {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.14);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] .fire-doors-page .fd-editing-banner__label {
  color: rgba(248, 250, 252, 0.96);
}

html[data-theme="dark"] .fire-doors-page .fd-narrative__door + .fd-narrative__door {
  border-top-color: rgba(148, 163, 184, 0.18);
}

/* Fire doors configurator page (app/Views/fire_doors/index.php) */
.content--fire-doors {
  padding-bottom: 0;
}

.content--fire-doors .page-layout--fire-doors {
  flex: 1 1 auto;
  min-height: 100%;
}

.content--fire-doors .page-main--fire-doors {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.fire-doors-page-section {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.fire-doors-page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* v2: 3-column page grid.
   Row 1 = phase header spans all 3 columns.
   Row 2 = side tabs (flush left, no inner padding) | options pane | live workspace.
   .fd-shell already extends past the page-section padding via margin-inline: -28px,
   so the side tabs sit flush against the app's left nav. */
.fd-shell {
  margin-inline: -28px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 310px;
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: 0;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}

.fd-shell > .fd-phase-header { grid-column: 1 / -1; grid-row: 1; }
.fd-shell > .fd-side-tabs    { grid-column: 1; grid-row: 2; }
.fd-shell > .fd-options-pane { grid-column: 2; grid-row: 2; }
.fd-shell > .fd-workspace    { grid-column: 3; grid-row: 2; }

/* fd-main / fd-layout / fd-config-column / fd-builder were dropped in v2 —
   leave a no-op safety net in case any cached partial still ships them. */
.fd-main, .fd-layout, .fd-config-column, .fd-builder { display: contents; }

.fd-page-header {
  margin-inline: -28px;
}

.fire-doors-page .ipi-page-header {
  padding: 24px 28px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  background: #fff;
  color: #1a1815;
}

.fire-doors-page .ipi-ph-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c49510;
  margin-bottom: 4px;
}

.fire-doors-page .ipi-ph-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #1a1815;
  letter-spacing: -0.025em;
  margin: 0 0 4px;
  max-width: 24ch;
}

.fire-doors-page .ipi-ph-sub {
  font-size: 13px;
  font-weight: 300;
  color: var(--ipi-ink-4, #9a9188);
  line-height: 1.45;
  max-width: 620px;
}

.fire-doors-page .ipi-ph-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.fire-doors-page .btn svg {
  width: 13px;
  height: 13px;
}

.fire-doors-page .btn.btn-secondary {
  background: #fff;
  color: #3d3a34;
  border-color: rgba(0, 0, 0, 0.11);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.fire-doors-page .btn.btn-secondary:hover {
  background: #f2efe9;
}

.fd-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--hero-eyebrow, #c49510);
  margin: 0 0 6px 0;
  font-weight: 700;
}

.fire-doors-page .btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fire-doors-page .btn__icon {
  display: inline-flex;
  align-items: center;
}

.fire-doors-page .btn__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.fire-doors-page .btn.btn-secondary {
  background: rgba(255, 255, 255, 0.96);
  color: #1a1815;
  border-color: rgba(15, 23, 42, 0.14);
}

.fd-layout {
  margin-top: 0;
  display: grid;
  row-gap: 24px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
}

.fd-config-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 28px;
  min-width: 0;
  grid-column: 1;
  grid-row: 2;
}

.fd-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.fd-phase-header {
  position: sticky;
  top: 0;
  z-index: 60;
  grid-column: 1;
  grid-row: 1;
  margin-inline: 0;
  background: #fff;
  border-top: none;
  border-right: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  border-left: none;
  border-radius: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.fd-step-strip-shell {
  display: flex;
  justify-content: flex-start;
  padding: 0 24px;
  overflow: visible;
}

.fd-phase-tracks {
  display: flex;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.fd-phase-track {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 20px 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #6b6458;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  text-align: left;
}

.fd-phase-track + .fd-phase-track {
  border-left: 1px solid rgba(0, 0, 0, 0.07);
}

.fd-phase-track:hover {
  background: #f2efe9;
}

.fd-phase-track.is-current {
  border-bottom-color: #c49510;
  color: #1a1815;
}

.fd-phase-track.is-complete {
  border-bottom-color: #c49510;
}

.fd-phase-track__num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  border: 1.5px solid rgba(0, 0, 0, 0.11);
  background: #edeae3;
  color: #9a9188;
  flex-shrink: 0;
  transition: all .15s;
}

.fd-phase-track.is-current .fd-phase-track__num {
  background: rgba(196, 149, 16, 0.12);
  border-color: rgba(196, 149, 16, 0.38);
  color: #a97807;
}

.fd-phase-track.is-complete .fd-phase-track__num {
  background: rgba(30, 122, 69, 0.08);
  border-color: rgba(30, 122, 69, 0.2);
  color: #1e7a45;
}

.fd-phase-track__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.fd-phase-track__label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9a9188;
}

.fd-phase-track.is-current .fd-phase-track__label {
  color: #c49510;
}

.fd-phase-track.is-complete .fd-phase-track__label {
  color: #a97807;
}

.fd-phase-track__title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1815;
  margin-top: 1px;
}

.fd-phase-track__sub {
  font-size: 11.5px;
  font-weight: 300;
  color: #9a9188;
}

.fd-phase-track__progress {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.fd-phase-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #edeae3;
  border: 1px solid rgba(0, 0, 0, 0.11);
  transition: all .15s;
}

.fd-phase-dot.is-complete {
  background: #1e7a45;
  border-color: #1e7a45;
}

.fd-phase-dot.is-active {
  background: #c49510;
  border-color: #c49510;
}

.fd-step-strip {
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: auto;
  min-width: max-content;
  max-width: none;
  margin-inline: 0;
  vertical-align: top;
}

.fd-step-strip::-webkit-scrollbar {
  display: none;
}

.fd-step-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #9a9188;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  font-size: 12.5px;
  font-weight: 500;
}

.fd-step-strip__item:hover {
  color: #3d3a34;
}

.fd-step-strip__item.is-active {
  color: #1a1815;
  border-bottom-color: #c49510;
}

.fd-step-strip__item.is-complete {
  color: #1a1815;
}

.fd-step-strip__num {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.11);
  background: #edeae3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #9a9188;
  flex-shrink: 0;
  transition: all .15s;
}

.fd-step-strip__item.is-active .fd-step-strip__num {
  background: rgba(196, 149, 16, 0.12);
  border-color: rgba(196, 149, 16, 0.38);
  color: #a97807;
}

.fd-step-strip__item.is-complete .fd-step-strip__num {
  background: rgba(26, 24, 21, 0.08);
  border-color: rgba(26, 24, 21, 0.18);
  color: #1a1815;
}

.fd-step-strip__sep {
  width: 16px;
  height: 1px;
  background: rgba(0, 0, 0, 0.11);
  flex-shrink: 0;
}

.fd-editing-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: rgba(239, 246, 255, 0.92);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}

.fd-editing-banner__label {
  font-size: 0.92rem;
  font-weight: 750;
  color: #0f172a;
}

.fd-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.fd-step-card {
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  padding: 0;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.fd-step-card__status {
  display: none;
}

.fd-step-card.is-complete .fd-step-card__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(30, 122, 69, 0.2);
  background: rgba(30, 122, 69, 0.08);
  color: #1e7a45;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  flex: 0 0 auto;
}

.fd-step-card.is-complete .fd-step-card__status::before {
  content: '✓';
  font-size: 10px;
  font-weight: 700;
}

.fd-step-card.is-complete .fd-step-card__status::after {
  content: 'Complete';
}

.fd-step-card__header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: nowrap;
  align-items: center;
  margin-bottom: 0;
}

.fd-accordion__header.fd-step-card__header {
  flex-wrap: nowrap;
  align-items: center;
  margin-bottom: 0;
  gap: 14px;
}

.fd-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
}

.fd-section-title__icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, 0.11);
  background: #edeae3;
  color: #9a9188;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}

.fd-section-title__icon svg {
  width: 16px;
  height: 16px;
}

.fd-step-card__header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1a1815;
  line-height: 1.2;
}

.fd-step-card__header p {
  margin: 2px 0 0 0;
  color: #9a9188;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.45;
}

.fd-accordion {
  padding: 0;
}

.fd-accordion__header {
  width: 100%;
  border: none;
  background: transparent;
  padding: 15px 20px;
  border-radius: 0;
  text-align: left;
  cursor: pointer;
  user-select: none;
  transition: background .12s;
}

.fd-accordion__header:hover {
  background: #f2efe9;
}

.fd-accordion__header:focus-visible {
  outline: 2px solid rgba(196, 149, 16, 0.45);
  outline-offset: 2px;
}

.fd-accordion__body {
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding: 20px;
}

[data-fd-accordion]:not([data-fd-accordion-open]) {
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

[data-fd-accordion]:not([data-fd-accordion-open]) .fd-section-title__icon {
  background: #edeae3;
  border-color: rgba(0, 0, 0, 0.11);
  color: #9a9188;
}

[data-fd-accordion]:not([data-fd-accordion-open]) .fd-step-card__header h3 {
  font-size: 14px;
}

[data-fd-accordion]:not([data-fd-accordion-open]) .fd-step-card__header .fd-section-title > div > p:not(.fd-eyebrow) {
  display: none;
}

[data-fd-accordion-open] .fd-section-title__icon {
  border-color: rgba(196, 149, 16, 0.22);
  background: rgba(196, 149, 16, 0.08);
  color: #c49510;
}

.fd-accordion__body[hidden] {
  display: none !important;
}

.fd-step-nav {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.fd-step-nav--split {
  justify-content: space-between;
}

.fd-step-nav :where(.btn, a.btn) {
  min-width: 120px;
  min-height: 40px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.fd-accordion__chevron {
  margin-left: auto;
  color: #9a9188;
  font-size: 16px;
  transform: rotate(0deg);
  transition: transform 0.18s ease-out;
}

[data-fd-accordion-open] .fd-accordion__chevron {
  transform: rotate(180deg);
}

.fd-step1-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fd-step1-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fd-step1-block__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.fd-step1-block__eyebrow {
  margin: 0 0 4px 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c49510;
}

.fd-step1-block__copy {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #9a9188;
}

.fd-size-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.fd-presets-grid {
  display: grid;
  gap: 8px;
}

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

.fd-preset {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 11px 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  min-width: 0;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.fd-preset:hover {
  border-color: rgba(196, 149, 16, 0.22);
  box-shadow: 0 6px 18px rgba(26, 24, 21, 0.06);
  transform: translateY(-1px);
}

.fd-preset__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fd-preset__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #c49510;
  background: rgba(196, 149, 16, 0.08);
  border: 1px solid rgba(196, 149, 16, 0.2);
  white-space: nowrap;
}

.fd-preset__reason {
  display: none;
}

.preset-card__headline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.fd-preset strong {
  font-size: 0.92rem;
  line-height: 1.25;
  color: #1a1815;
}

.fd-preset > span:not(.fd-preset__heading) {
  font-size: 0.82rem;
  line-height: 1.4;
  color: #6f675f;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fd-preset.active {
  border-color: rgba(196, 149, 16, 0.35);
  background: #fcfaf5;
  box-shadow: 0 10px 20px rgba(196, 149, 16, 0.08);
}

.fd-preset--ghost {
  border-style: dashed;
  border-color: rgba(0, 0, 0, 0.14);
  background: var(--surface-subtle, #f2efe9);
}

.fd-preset--ghost strong {
  color: var(--ink-3, #6b6458);
}

.fd-size-grid label,
.fd-note-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: #0f172a;
}

.preset-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(196, 149, 16, 0.18);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: #fcfaf5;
  font-size: 0.9rem;
}

.preset-banner__label {
  font-weight: 600;
  color: #1a1815;
}

.preset-banner__action {
  border: none;
  background: transparent;
  color: #c49510;
  font-weight: 500;
  cursor: pointer;
  font-size: 0.85rem;
}

.fd-step1-loaded__copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.fd-step1-loaded__eyebrow {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c49510;
}

.fd-step1-size-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr) minmax(0, 0.8fr);
}

.fd-step1-size-field {
  gap: 8px;
}

.fd-step1-size-field > span,
.fd-step1-notes__label {
  font-size: 0.84rem;
  font-weight: 600;
  color: #1a1815;
}

.fd-step1-size-field small {
  font-size: 0.76rem;
  line-height: 1.4;
  color: #9a9188;
}

.fd-size-grid input,
.fd-note-field textarea {
  border: 1px solid #ddd7ce;
  border-radius: 10px;
  padding: 12px 13px;
  font: inherit;
  background: #fff;
}

.fd-step1-notes textarea {
  min-height: 82px;
  border-radius: 12px;
}

.fd-step1-footer {
  margin-top: 2px;
}

.fd-step1-footer__note {
  font-size: 0.82rem;
  color: #9a9188;
  line-height: 1.45;
}

.fd-phase-two {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fd-phase-panel[data-fd-phase-panel="1"] {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fd-phase-two-form {
  display: contents;
}

.fire-doors-page .fd-phase-two .phase-complete-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(30, 122, 69, 0.18);
  background: rgba(30, 122, 69, 0.08);
}

.fire-doors-page .fd-phase-two .pcb-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.fire-doors-page .fd-phase-two .pcb-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: rgba(30, 122, 69, 0.08);
  border: 1px solid rgba(30, 122, 69, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #1e7a45;
}

.fire-doors-page .fd-phase-two .pcb-icon svg {
  width: 18px;
  height: 18px;
}

.fire-doors-page .fd-phase-two .pcb-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1e7a45;
  margin-bottom: 2px;
}

.fire-doors-page .fd-phase-two .pcb-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1815;
}

.fire-doors-page .fd-phase-two .pcb-sub {
  font-size: 12px;
  font-weight: 300;
  color: #9a9188;
  margin-top: 2px;
}

.fire-doors-page .fd-phase-two .pcb-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.fire-doors-page .fd-phase-two .pcb-btn svg {
  width: 14px;
  height: 14px;
}

.fire-doors-page .fd-phase-two .step-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  border: none;
}

.fire-doors-page .fd-phase-two .fd-step-card__status {
  display: none !important;
}

.fire-doors-page .fd-phase-two .step-head {
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}

.fire-doors-page .fd-phase-two .step-head:hover {
  background: #f2efe9;
}

.fire-doors-page .fd-phase-two .step-ico {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, 0.11);
  background: #edeae3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #9a9188;
}

.fire-doors-page .fd-phase-two .step-ico svg {
  width: 16px;
  height: 16px;
}

.fire-doors-page .fd-phase-two [data-fd-accordion-open] .step-ico {
  border-color: rgba(196, 149, 16, 0.18);
  background: rgba(196, 149, 16, 0.08);
  color: #c49510;
}

.fire-doors-page .fd-phase-two .step-title-group {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.fire-doors-page .fd-phase-two .step-eyebrow {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9a9188;
  margin-bottom: 2px;
}

.fire-doors-page .fd-phase-two [data-fd-accordion-open] .step-eyebrow {
  color: #c49510;
}

.fire-doors-page .fd-phase-two .step-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1815;
}

.fire-doors-page .fd-phase-two .step-desc {
  font-size: 12px;
  font-weight: 300;
  color: #9a9188;
  margin-top: 2px;
}

.fire-doors-page .fd-phase-two .step-chev {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: #9a9188;
  transition: transform 0.15s;
}

.fire-doors-page .fd-phase-two [data-fd-accordion-open] .step-chev {
  transform: rotate(180deg);
}

.fire-doors-page .fd-phase-two .step-body {
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding: 20px;
}

.fire-doors-page .fd-phase-two .step-body[hidden] {
  display: none !important;
}

.fire-doors-page .fd-phase-two .qs-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.fire-doors-page .fd-phase-two .qs-section-ico {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(196, 149, 16, 0.18);
  background: rgba(196, 149, 16, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #c49510;
}

.fire-doors-page .fd-phase-two .qs-section-ico svg {
  width: 15px;
  height: 15px;
}

.fire-doors-page .fd-phase-two .qs-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1815;
}

.fire-doors-page .fd-phase-two .qs-section-sub {
  font-size: 12px;
  font-weight: 300;
  color: #9a9188;
  margin-top: 2px;
}

.fire-doors-page .fd-phase-two .qs-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.fire-doors-page .fd-phase-two .qs-fields-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.fire-doors-page .fd-phase-two .qs-fields-2.qs-fields-2--spaced {
  margin-bottom: 20px;
}

.fire-doors-page .fd-phase-two .qs-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fire-doors-page .fd-phase-two .qs-field-lbl {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a9188;
}

.fire-doors-page .fd-phase-two .qs-inp,
.fire-doors-page .fd-phase-two .qs-textarea,
.fire-doors-page .fd-phase-two .qs-select {
  width: 100%;
  padding: 9px 12px;
  background: #f7f4ef;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #1a1815;
  outline: none;
  transition: border-color 0.15s;
}

.fire-doors-page .fd-phase-two .qs-inp:focus,
.fire-doors-page .fd-phase-two .qs-textarea:focus,
.fire-doors-page .fd-phase-two .qs-select:focus {
  border-color: rgba(196, 149, 16, 0.24);
  box-shadow: 0 0 0 3px rgba(196, 149, 16, 0.08);
}

.fire-doors-page .fd-phase-two .qs-inp::placeholder,
.fire-doors-page .fd-phase-two .qs-textarea::placeholder {
  color: #9a9188;
  font-weight: 300;
}

.fire-doors-page .fd-phase-two .qs-textarea {
  resize: vertical;
  min-height: 80px;
}

.fire-doors-page .fd-phase-two .qs-textarea.qs-textarea--billing {
  min-height: 60px;
}

.fire-doors-page .fd-phase-two .qs-field.qs-field--site-address {
  margin-bottom: 14px;
}

.fire-doors-page .fd-phase-two .qs-select {
  appearance: none;
  cursor: pointer;
  color: #6f675f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%239A9188' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
  padding-right: 28px;
}

.fire-doors-page .fd-phase-two .qs-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.07);
  margin: 4px 0 20px;
}

.fire-doors-page .fd-phase-two .step-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fire-doors-page .fd-phase-two .sf-note {
  font-size: 12px;
  font-weight: 300;
  color: #9a9188;
}

.fire-doors-page .fd-phase-two .sf-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.fire-doors-page .fd-phase-two .sf-btn svg {
  width: 13px;
  height: 13px;
}

.fire-doors-page .fd-phase-two .review-spec {
  background: #f7f4ef;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.fire-doors-page .fd-phase-two .rs-head {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fire-doors-page .fd-phase-two .rs-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1815;
}

.fire-doors-page .fd-phase-two .rs-print {
  font-size: 12px;
  font-weight: 500;
  color: #c49510;
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
}

.fire-doors-page .fd-phase-two .rs-row {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
}

.fire-doors-page .fd-phase-two .rs-row:last-child {
  border-bottom: none;
}

.fire-doors-page .fd-phase-two .rs-label {
  color: #6f675f;
  font-weight: 300;
}

.fire-doors-page .fd-phase-two .rs-value {
  color: #1a1815;
  font-weight: 500;
  text-align: right;
  max-width: 60%;
}

.fire-doors-page .fd-phase-two .rs-value--price {
  color: #c49510;
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.fire-doors-page .fd-phase-two .save-quote-wrap {
  padding: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  background: #fcfaf5;
}

.fire-doors-page .fd-phase-two .save-quote-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.fire-doors-page .fd-phase-two .save-quote-btn svg {
  width: 16px;
  height: 16px;
}

.fire-doors-page .fd-phase-two .save-quote-note {
  font-size: 12px;
  font-weight: 300;
  color: #9a9188;
  text-align: center;
  margin-top: 8px;
}

@media (max-width: 860px) {
  .fd-step1-presets-grid,
  .fd-step1-size-grid {
    grid-template-columns: 1fr;
  }

  .fd-step1-footer {
    align-items: flex-start;
  }

  .fire-doors-page .fd-phase-two .phase-complete-banner,
  .fire-doors-page .fd-phase-two .step-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .fire-doors-page .fd-phase-two .qs-fields-grid,
  .fire-doors-page .fd-phase-two .qs-fields-2 {
    grid-template-columns: 1fr;
  }
}

.field-error {
  display: none;
  margin-top: 6px;
  font-size: 0.82rem;
  color: #b91c1c;
}

.field-error.is-visible {
  display: block;
}

.basket-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 6px 0;
}

.basket-inline-fields {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  margin-top: 8px;
}

.basket-inline-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: #475569;
}

.basket-inline-fields input,
.basket-inline-fields textarea {
  border: 1px solid #d0d7e5;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

.basket-inline-fields textarea {
  resize: vertical;
  min-height: 42px;
}

.fd-option-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.fd-option-grid .fd-step-nav {
  grid-column: 1 / -1;
}

@media (min-width: 981px) {
  .fd-step-card[data-fd-step="5"] .config-section {
    grid-column: 1 / -1;
  }

  .fd-step-card[data-fd-step="5"] .config-options {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .fd-step-card[data-fd-step="4"] .fd-option-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.config-section {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 15px;
  background: #fcfbf8;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.config-eyebrow {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #1a1815;
  margin: 0;
  flex: 1 1 auto;
}

.config-description {
  color: #9a9188;
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0;
}

.config-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
}

.config-header-row__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  align-self: flex-start;
}

.config-selected {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(196, 149, 16, 0.18);
  background: rgba(196, 149, 16, 0.07);
  font-size: 0.72rem;
  font-weight: 600;
  color: #8f6920;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.config-most-common {
  display: flex;
  justify-content: flex-start;
  margin-top: -2px;
}

.config-mode-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(196, 149, 16, 0.08);
  border: 1px solid rgba(196, 149, 16, 0.18);
  color: #c49510;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 750;
}

.config-info {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: #9a9188;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.config-info:hover {
  border-color: rgba(196, 149, 16, 0.2);
  color: #c49510;
  background: #fcfaf5;
}

.config-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.config-options--scrollable {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.config-options--scrollable.is-expanded {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.config-options--scrollable::-webkit-scrollbar {
  width: 6px;
}

.config-options--scrollable::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.2);
  border-radius: 999px;
}

.config-option {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 12px 40px 12px 13px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
  min-height: 86px;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.config-option[disabled] {
  opacity: 1;
  background: #edeae3;
  border-color: rgba(0, 0, 0, 0.16);
  color: #6b6458;
  cursor: not-allowed;
  box-shadow: none;
}

.config-option::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 13px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(154, 145, 136, 0.45);
  background: #fff;
}

.config-option.active::after {
  content: '';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(196, 149, 16, 0.45);
  background:
    radial-gradient(circle at center, #c49510 0 4px, transparent 4.5px),
    #fff;
}

.config-option strong {
  font-size: 0.93rem;
  line-height: 1.3;
  color: #1a1815;
}

.config-option span {
  color: #6f675f;
  font-size: 0.78rem;
  line-height: 1.4;
}

.option-price {
  margin-top: auto;
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 4px;
  font-weight: 600;
  color: #1a1815;
  font-size: 0.82rem;
}

.option-price--included {
  font-weight: 500;
  color: #1e7a45;
}

.config-option.active {
  border-color: rgba(196, 149, 16, 0.35);
  background: #fcfaf5;
  box-shadow: 0 10px 16px rgba(196, 149, 16, 0.08);
}

.config-option:hover:not([disabled]) {
  border-color: rgba(196, 149, 16, 0.22);
  box-shadow: 0 8px 14px rgba(26, 24, 21, 0.05);
  transform: translateY(-1px);
}

.config-note {
  font-size: 0.82rem;
  color: var(--ink-4, #9a9188);
  margin: 4px 0 0 0;
}

.config-note--warning {
  padding: 10px 12px;
  border-radius: var(--radius-sm, 8px);
  background: rgba(176, 48, 48, 0.08);
  border: 1px solid rgba(176, 48, 48, 0.22);
  color: var(--danger, #b03030);
}
.config-note--warning strong {
  color: var(--danger, #b03030);
}

html[data-theme="dark"] .config-note--warning {
  background: rgba(176, 48, 48, 0.18);
  border-color: rgba(176, 48, 48, 0.42);
  color: #f4a7a7;
}
html[data-theme="dark"] .config-note--warning strong {
  color: #f4a7a7;
}

.fd-thickness-panel,
.fd-uvalue-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--radius-sm, 8px);
  background: var(--surface-inset, #edeae3);
  border: 1px solid var(--rule, rgba(26, 24, 21, 0.08));
}
.fd-thickness-panel__field,
.fd-uvalue-panel__field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fd-thickness-panel__input,
.fd-uvalue-panel__input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(26, 24, 21, 0.14);
  background: var(--surface-card, #fff);
  font-size: 13.5px;
}
.fd-thickness-panel__unit,
.fd-uvalue-panel__unit {
  font-size: 0.8rem;
  color: var(--ink-4, #9a9188);
}

html[data-theme="dark"] .fd-thickness-panel,
html[data-theme="dark"] .fd-uvalue-panel {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
}
html[data-theme="dark"] .fd-thickness-panel__input,
html[data-theme="dark"] .fd-uvalue-panel__input {
  background: rgba(2, 6, 23, 0.42);
  border-color: rgba(71, 85, 105, 0.58);
  color: inherit;
}

.fd-hardware-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fd-hardware-stage__intro {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #9a9188;
}

.fd-hardware-rows,
.fd-hardware-accessories,
.fd-spec-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fd-hardware-row {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: #fcfbf8;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.fd-hardware-row__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
}

.fd-spec-row .fd-hardware-row__summary {
  align-items: flex-start;
}

.fd-hardware-row__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fd-hardware-row__label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a1815;
}

.fd-hardware-row__currentline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.fd-hardware-row__current {
  font-size: 0.82rem;
  color: #6f675f;
}

.fd-hardware-row__price {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(196, 149, 16, 0.08);
  border: 1px solid rgba(196, 149, 16, 0.16);
  font-size: 0.72rem;
  font-weight: 600;
  color: #8f6920;
}

.fd-hardware-row__price.is-included {
  background: rgba(30, 122, 69, 0.08);
  border-color: rgba(30, 122, 69, 0.16);
  color: #1e7a45;
}

.fd-hardware-row__toggle {
  flex: 0 0 auto;
  white-space: nowrap;
}

.fd-spec-row__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.fd-hardware-row__detail {
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding: 14px 16px 16px;
  background: #fff;
}

.fd-hardware-row__detailcopy {
  margin: 0 0 10px 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #9a9188;
}

.fd-hardware-row__options {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.fd-spec-row__options {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.fd-spec-row__options--dense {
  gap: 8px;
}

.fd-spec-row__options--dense .config-option--dense {
  min-height: 72px;
  padding: 10px 36px 10px 12px;
  gap: 3px;
}

.fd-spec-row__options--dense .config-option--dense strong {
  font-size: 0.88rem;
  line-height: 1.25;
}

.fd-spec-row__options--dense .config-option--dense span:not(.option-price) {
  font-size: 0.74rem;
  line-height: 1.32;
  color: #8a8178;
}

.fd-spec-row__options--dense .config-option--dense .option-price {
  font-size: 0.78rem;
}

.fd-spec-row__options--dense .config-option--dense .option-price--included {
  font-size: 0.76rem;
}

.fd-spec-row .config-note {
  margin-top: 10px;
}

.fd-hardware-row.is-open {
  border-color: rgba(196, 149, 16, 0.18);
  box-shadow: 0 10px 16px rgba(196, 149, 16, 0.06);
}

.fd-hardware-accessories-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f7f4ef;
  color: #1a1815;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.fd-hardware-accessories-toggle__icon {
  width: 18px;
  text-align: center;
  color: #c49510;
}

.fd-hardware-accessories-toggle.is-open {
  border-color: rgba(196, 149, 16, 0.2);
  background: #fcfaf5;
}

.fd-hardware-row--accessory {
  background: #fff;
}

.fd-ral-panel__row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.fd-ral-panel__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fd-ral-panel__field--code {
  min-width: 180px;
}

.fd-ral-panel__input {
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  border-radius: 10px;
  background: #fff;
  width: 100%;
}

.fd-ral-panel__swatch {
  width: 56px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.6);
  border-radius: 10px;
  background: #fff;
}

.fd-ral-panel__help {
  display: block;
  margin-top: 8px;
}

.fd-workspace {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  margin-top: 0;
  min-height: 0;
  height: auto;
  max-height: none;
  padding: 0;
  border-left: 1px solid rgba(0, 0, 0, 0.07);
  background: #ffffff;
  overflow: visible;
}

.fd-workspace__mobile-close,
.fd-workspace__mobile-backdrop {
  display: none;
}

/* Mobile-only fixed entry; hidden on desktop (see max-width: 768px rules). */
.fd-mobile-workspace-launch {
  display: none;
}

.fd-workspace__mobile-close {
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: #1a1815;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.fd-workspace__mobile-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.44);
  opacity: 0;
  pointer-events: none;
  z-index: 10050;
  transition: opacity 0.18s ease;
}

body.fd-mobile-workspace-open {
  overflow: hidden;
}

.fd-workspace__header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.fd-workspace__headcopy {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.fd-workspace__eyebrow {
  margin: 0;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9a9188;
  margin-bottom: 6px;
}

.fd-workspace__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #1a1815;
  margin-bottom: 4px;
}

.fd-workspace__sub {
  margin: 0;
  font-size: 12px;
  font-weight: 300;
  color: #9a9188;
  line-height: 1.45;
}

.fd-workspace__stats {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
}

.fd-workspace__stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 7px;
  background: #F7F5F0;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.fd-workspace__stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9a9188;
}

.fd-workspace__stat-value {
  font-size: 13px;
  font-weight: 600;
  color: #1a1815;
}

.fd-workspace__stat-value.is-accent {
  color: #c49510;
}

.fd-workspace__tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  flex-shrink: 0;
  min-width: 0;
  padding: 0;
  background: transparent;
}

.fd-workspace__tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #9a9188;
  font: inherit;
  font-weight: 500;
  font-size: 12px;
  padding: 12px 10px 11px;
  min-width: 0;
  flex: 1 1 0;
  cursor: pointer;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
  border: none;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}

.fd-workspace__tab:hover {
  color: #6f675f;
}

.fd-workspace__tab:focus-visible {
  outline: 2px solid rgba(26, 24, 21, 0.32);
  outline-offset: 2px;
}

.fd-workspace__tab.is-active {
  border-bottom-color: #1a1815;
  color: #1a1815;
}

.fd-workspace__panes {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  background: #fff;
  overflow: visible;
}

.fd-workspace-pane {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  gap: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.fd-workspace-pane__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
}

.fd-workspace-pane__footer {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding-bottom: 18px;
}

.fd-workspace-pane[hidden] {
  display: none !important;
}

.fd-animate {
  opacity: 0;
  transition: opacity 260ms ease-out;
}

.fd-animate.is-visible {
  opacity: 1;
}

.fd-workspace-pane__visual-label {
  margin: 0 0 12px 0;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-4);
  text-align: center;
}

.fd-workspace-pane__preview-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.fd-workspace-pane__preview-actions .btn {
  flex: 0 0 auto;
  margin: 0 auto;
  min-width: 180px;
}

.fd-summary-panel__body {
  display: block;
  min-height: 0;
  padding: 14px 18px 0;
  overflow: visible;
}

.fire-doors-page .fd-summary-panel__body {
  display: block;
}

.fire-doors-page .fd-summary-panel__body > * {
  width: 100%;
  min-width: 0;
}

.fd-summary-sheet {
  border: 1px solid rgba(26, 24, 21, 0.08);
  border-radius: 12px;
  background: #faf8f3;
  overflow: hidden;
}

.fd-summary-sheet__section + .fd-summary-sheet__section {
  border-top: 1px solid rgba(26, 24, 21, 0.08);
}

.fd-rp-summary {
  display: flex;
  flex-direction: column;
  padding: 2px 14px;
  overflow: visible;
  flex: 0 0 auto;
  min-height: auto;
}

.fd-rp-summary--extended {
  margin-top: 0;
  padding-top: 0;
}

.fd-rp-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.fd-rp-summary .fd-rp-line:last-child {
  border-bottom: none;
}

.fd-rp-line__label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #9a9188;
}

.fd-rp-line__value {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a1815;
  text-align: right;
}

.summary-total {
  margin: 14px 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #6f675f;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(196, 149, 16, 0.22);
  background: rgba(196, 149, 16, 0.08);
}

.summary-total strong {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #c49510;
  letter-spacing: -0.02em;
}

.summary-actions {
  margin-top: 0;
  padding: 10px 18px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.summary-actions .btn-primary {
  width: 100%;
  justify-content: center;
}

.fd-workspace-pane--basket [data-basket],
.fd-workspace-pane--narrative .fd-preview-layout,
.fd-workspace-pane--summary .fd-summary-panel__body {
  flex: 1 1 auto;
  min-height: 0;
}

.fd-workspace-pane--summary,
.fd-workspace-pane--basket,
.fd-workspace-pane--narrative {
  background: #fff;
}

.fd-workspace-pane--basket [data-basket] {
  padding: 16px 18px 0;
  overflow: visible;
}

.fd-workspace-pane--narrative .fd-preview-layout {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 18px 18px;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.fd-workspace-pane--preview {
  padding: 14px 18px 18px;
  background: #F7F5F0;
  overflow: hidden;
}

.fd-rp-visual {
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0 18px 18px;
  background: #F7F5F0;
  position: relative;
}

.fire-doors-page .btn.fd-action-subtle {
  color: #6f675f;
  font-weight: 600;
  font-size: 0.76rem;
}

.fire-doors-page .text-muted {
  color: #475569;
}

.fire-doors-page .ipi-ph-sub {
  color: var(--ipi-ink-4, #9a9188);
}

.basket-item {
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0;
  padding: 12px 0;
  background: transparent;
  margin-bottom: 0;
  font-size: 0.84rem;
}

.basket-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.basket-row__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.basket-row__title {
  font-weight: 750;
  color: #1a1815;
}

.basket-row__summary {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #6f675f;
}

.basket-row__meta-line {
  font-size: 0.76rem;
  color: #9a9188;
}

.basket-row__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.basket-row__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.basket-row__qty input {
  width: 84px;
  padding: 8px 10px;
  border-radius: 10px;
}

.basket-row__qty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.76rem;
  color: #9a9188;
}

.basket-row__subtotal {
  font-weight: 800;
  color: #1a1815;
  white-space: nowrap;
  min-width: 92px;
  text-align: right;
}

.basket-row__toggle {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fcfbf8;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 900;
  color: #6f675f;
  line-height: 1;
}

.basket-row__toggle:hover {
  border-color: rgba(196, 149, 16, 0.24);
  background: rgba(196, 149, 16, 0.06);
}

.basket-details {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

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

.basket-actions--secondary {
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
  justify-content: flex-start;
}

.basket-item.is-editing {
  border-bottom-color: rgba(196, 149, 16, 0.3);
  box-shadow: inset 3px 0 0 rgba(196, 149, 16, 0.85);
}

.fd-form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.fd-form-grid--stacked {
  grid-template-columns: 1fr;
}

.fd-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: #0f172a;
}

.fd-form-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.fd-loading-backdrop {
  background: rgba(26, 24, 21, 0.5);
  backdrop-filter: blur(6px);
}

.fd-loading-modal {
  padding: 24px;
}

.fd-loading-modal__dialog {
  width: min(620px, 100%);
  border-radius: 22px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.3);
}

.fd-loading-modal__header {
  align-items: flex-start;
  padding: 20px 22px 16px;
}

.fd-loading-modal__header-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fd-loading-modal__header-copy h3 {
  margin: 0;
}

.fd-loading-modal__intro {
  margin: 0;
  max-width: 58ch;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #6f675f;
}

.fd-loading-modal__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 22px;
}

.fd-loading-modal__hero {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(247, 245, 240, 0.98) 0%, rgba(252, 250, 246, 0.98) 100%);
  border: 1px solid rgba(26, 24, 21, 0.08);
}

.fd-loading-modal__hero-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #c49510;
  border: 1px solid rgba(196, 149, 16, 0.18);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  flex: 0 0 auto;
}

.fd-loading-modal__hero-icon svg {
  width: 22px;
  height: 22px;
}

.fd-loading-modal__hero-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fd-loading-modal__hero-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1815;
}

.fd-loading-modal__hero-subtitle {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #6f675f;
}

.fd-loading-modal__status {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(196, 149, 16, 0.18);
  background: rgba(196, 149, 16, 0.08);
}

.fd-loading-modal__spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(196, 149, 16, 0.16);
  border-top-color: #c49510;
  animation: importPdfLoadingSpin 0.9s linear infinite;
  flex: 0 0 auto;
}

.fd-loading-modal__status-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fd-loading-modal__status-copy strong {
  font-size: 0.92rem;
  color: #1a1815;
}

.fd-loading-modal__status-copy span {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #6f675f;
}

.fd-loading-modal__glance {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fd-loading-modal__glance-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(26, 24, 21, 0.08);
  background: #fffdfa;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.fd-loading-modal__glance-item span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a9188;
}

.fd-loading-modal__glance-item strong {
  font-size: 0.86rem;
  line-height: 1.35;
  color: #1a1815;
}

@media (max-width: 640px) {
  .fd-loading-modal {
    padding: 16px;
  }

  .fd-loading-modal__dialog {
    width: min(100%, 100%);
    border-radius: 18px;
  }

  .fd-loading-modal__header {
    padding: 18px 18px 14px;
  }

  .fd-loading-modal__body {
    padding: 16px 18px 20px;
  }

  .fd-loading-modal__hero,
  .fd-loading-modal__status {
    padding: 14px;
  }

  .fd-loading-modal__glance {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
 * Reference Pricing modal — rebuilt 2026-04-15 for searchable, collapsible
 * navigation across 220+ priced rows. Migrated to canonical .fd-modal chrome
 * (uses .fd-modal__dialog--wide, .fd-modal__header, .fd-modal__body,
 * .fd-modal__footer); only the in-body content (rail / chips / sections)
 * carries bespoke .fd-pricing-modal__* styling.
 * ════════════════════════════════════════════════════════════════════════════ */

/* Body inherits canonical fd-modal__body padding/gap; just stack tightly */
.fd-pricing-modal__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Filter rail (search + match count + expand/collapse all) ───────────── */
.fd-pricing-modal__rail {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 10px;
  margin: -4px 0 0;
  background: var(--surface-card, #ffffff);
  border-bottom: 1px solid var(--rule, rgba(26, 24, 21, 0.08));
}

.fd-pricing-modal__search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.fd-pricing-modal__search > svg {
  position: absolute;
  left: 12px;
  width: 14px;
  height: 14px;
  color: var(--ink-4, #9a9188);
  pointer-events: none;
}

/* Compound selector ('.fd-pricing-modal .fd-pricing-modal__search-input',
   specificity 0,2,0) beats the canonical `.fd-modal :where(input[type="search"]…)`
   block lower in the file (specificity 0,1,0) so our padding-left of 38px
   wins and the inline search icon never overlaps the placeholder. */
.fd-pricing-modal .fd-pricing-modal__search-input {
  width: 100%;
  min-height: 36px;
  padding: 8px 32px 8px 38px;
  border: 1px solid rgba(26, 24, 21, 0.14);
  border-radius: 8px;
  background: var(--surface-card, #ffffff);
  color: var(--ink, #1a1815);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

/* Suppress the native UA-rendered search icon / clear button so they
   don't double up with our custom inline search icon and clear button. */
.fd-pricing-modal .fd-pricing-modal__search-input::-webkit-search-decoration,
.fd-pricing-modal .fd-pricing-modal__search-input::-webkit-search-cancel-button,
.fd-pricing-modal .fd-pricing-modal__search-input::-webkit-search-results-button,
.fd-pricing-modal .fd-pricing-modal__search-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.fd-pricing-modal .fd-pricing-modal__search-input::placeholder {
  color: var(--ink-4, #9a9188);
}

.fd-pricing-modal .fd-pricing-modal__search-input:focus {
  outline: none;
  border-color: var(--accent, #c49510);
  box-shadow: 0 0 0 3px rgba(196, 149, 16, 0.18);
}

.fd-pricing-modal__search-clear {
  position: absolute;
  right: 6px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: rgba(26, 24, 21, 0.06);
  color: var(--ink-3, #6b6458);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.fd-pricing-modal__search-clear:hover {
  background: rgba(26, 24, 21, 0.12);
  color: var(--ink, #1a1815);
}

.fd-pricing-modal__rail-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.fd-pricing-modal__match-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3, #6b6458);
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-inset, #edeae3);
}

.fd-pricing-modal__rail-btn {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(26, 24, 21, 0.14);
  border-radius: 7px;
  background: var(--surface-card, #ffffff);
  color: var(--ink-2, #3d3a34);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.fd-pricing-modal__rail-btn:hover,
.fd-pricing-modal__rail-btn:focus-visible {
  border-color: var(--accent, #c49510);
  color: var(--ink, #1a1815);
  background: rgba(196, 149, 16, 0.06);
  outline: none;
}

/* ── Jump menu (chip row) ───────────────────────────────────────────────── */
.fd-pricing-modal__jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.fd-pricing-modal__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(26, 24, 21, 0.1);
  border-radius: 9px;
  background: var(--surface-card, #ffffff);
  color: var(--ink-2, #3d3a34);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.fd-pricing-modal__chip:hover,
.fd-pricing-modal__chip:focus-visible {
  border-color: var(--accent, #c49510);
  background: rgba(196, 149, 16, 0.05);
  outline: none;
  transform: translateY(-1px);
}

.fd-pricing-modal__chip-eyebrow {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent, #c49510);
}

.fd-pricing-modal__chip-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink, #1a1815);
}

.fd-pricing-modal__chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-inset, #edeae3);
  color: var(--ink-3, #6b6458);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.fd-pricing-modal__chip--alert {
  border-style: dashed;
  border-color: rgba(176, 48, 48, 0.45);
}

.fd-pricing-modal__chip--alert .fd-pricing-modal__chip-eyebrow {
  color: var(--danger, #b03030);
}

.fd-pricing-modal__chip--alert .fd-pricing-modal__chip-count {
  background: rgba(176, 48, 48, 0.12);
  color: var(--danger, #b03030);
}

/* ── Sections (collapsible) ─────────────────────────────────────────────── */
.fd-pricing-modal__sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fd-pricing-section {
  background: var(--surface-card, #ffffff);
  border: 1px solid var(--rule, rgba(26, 24, 21, 0.08));
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.fd-pricing-section[open] {
  border-color: rgba(26, 24, 21, 0.12);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.fd-pricing-section__summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: var(--surface-card, #ffffff);
  transition: background 150ms ease;
}

.fd-pricing-section__summary::-webkit-details-marker {
  display: none;
}

.fd-pricing-section__summary:hover {
  background: rgba(196, 149, 16, 0.04);
}

.fd-pricing-section__summary-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.fd-pricing-section__summary-text .fd-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent, #c49510);
  margin: 0;
}

.fd-pricing-section__title {
  font-family: var(--font-display, "Space Grotesk", system-ui, sans-serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink, #1a1815);
  line-height: 1.3;
}

.fd-pricing-section__count {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-inset, #edeae3);
  color: var(--ink-3, #6b6458);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.fd-pricing-section__count-divider {
  color: var(--ink-4, #9a9188);
  margin: 0 1px;
  font-weight: 400;
}

.fd-pricing-section__chevron {
  width: 14px;
  height: 14px;
  color: var(--ink-3, #6b6458);
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.fd-pricing-section[open] .fd-pricing-section__chevron {
  transform: rotate(180deg);
}

.fd-pricing-section--alert {
  border-color: rgba(176, 48, 48, 0.4);
  border-style: dashed;
}

.fd-pricing-section--alert .fd-pricing-section__summary-text .fd-eyebrow {
  color: var(--danger, #b03030);
}

.fd-pricing-section__alert-note {
  margin: 0;
  padding: 12px 18px;
  background: rgba(176, 48, 48, 0.04);
  border-top: 1px dashed rgba(176, 48, 48, 0.3);
  border-bottom: 1px dashed rgba(176, 48, 48, 0.3);
  color: var(--ink-3, #6b6458);
  font-size: 12px;
  line-height: 1.55;
}

.fd-pricing-section__alert-note code {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(26, 24, 21, 0.06);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--ink-2, #3d3a34);
}

/* ── Empty state ────────────────────────────────────────────────────────── */
.fd-pricing-modal__empty {
  margin: 12px 0 0;
  padding: 28px 20px;
  background: var(--surface-inset, #edeae3);
  border: 1px dashed rgba(26, 24, 21, 0.18);
  border-radius: 10px;
  color: var(--ink-3, #6b6458);
  font-size: 13px;
  text-align: center;
  line-height: 1.55;
}

.fd-pricing-modal__empty strong {
  color: var(--ink, #1a1815);
  font-weight: 600;
}

.fd-pricing-list {
  margin: 0;
  padding: 4px 18px 14px;
  display: grid;
  gap: 0;
}

.fd-pricing-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 2px;
  border-bottom: 1px solid rgba(26, 24, 21, 0.07);
}

.fd-pricing-list .fd-pricing-item:last-child {
  border-bottom: none;
}

.fd-pricing-list .fd-pricing-item:first-child {
  padding-top: 6px;
}

.fd-pricing-item dt {
  margin: 0;
  font-size: 0.85rem;
  color: #6f675f;
}

.fd-pricing-item dd {
  margin: 0;
  font-weight: 600;
  color: #1a1815;
  text-align: right;
  white-space: nowrap;
}

.fd-pricing-included {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #dbe3f0;
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  font-size: 0.82rem;
}

.fd-pricing-missing {
  color: #94a3b8;
  font-weight: 600;
}

.fd-pricing-unit {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
}

.fd-pill {
  border: 1px solid #d0d7e5;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  color: #475569;
}

.fd-flash {
  margin: 16px 0;
}

.fd-page-toast-host .fd-flash {
  margin: 0;
  width: min(420px, calc(100vw - 36px));
}

.fd-page-toast-host .fd-flash.flash-success {
  background: #dcfce7;
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

html[data-theme="dark"] .fd-page-toast-host .fd-flash.flash-success {
  background: #065f46;
  color: #dcfce7;
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.45);
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
}

/* Legacy .fd-pricing-modal-footer rules removed in 2026-04-15 rebuild —
   the modal now uses the canonical .fd-modal__footer chrome instead. */

.fd-preset-modal__dialog {
  width: min(1040px, 96%);
}

.fd-preset-modal__header-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fd-preset-modal__header-copy h3 {
  margin: 0;
}

.fd-preset-modal__intro {
  margin: 0;
  max-width: 62ch;
}

.fd-preset-modal__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fd-preset-modal__hero {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(247, 245, 240, 0.98) 0%, rgba(252, 250, 246, 0.98) 100%);
  border: 1px solid rgba(26, 24, 21, 0.08);
}

.fd-preset-modal__hero-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #c49510;
  border: 1px solid rgba(196, 149, 16, 0.18);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  flex: 0 0 auto;
}

.fd-preset-modal__hero-icon svg {
  width: 22px;
  height: 22px;
}

.fd-preset-modal__hero-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fd-preset-modal__hero-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: #1a1815;
}

.fd-preset-modal__hero-subtitle {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #6f675f;
  max-width: 62ch;
}

.fd-preset-modal__section {
  padding: 16px;
}

.fd-preset-modal__footer {
  margin-top: 0;
}

.fd-preset-modal .btn {
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 7px;
  text-decoration: none;
}

/* ----------------------------------------------------------------------------
   Confirm modal — shared confirm dialog (reset config / clear draft / save preset)
   Uses the canonical .fd-modal chrome with the --narrow dialog variant.
   ---------------------------------------------------------------------------- */
.fd-confirm-modal .fd-modal__body {
  gap: 8px;
  padding: 18px 22px 20px;
}

.fd-confirm-modal__message {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2, #3d3a34);
}

html[data-theme="dark"] .fd-confirm-modal__message {
  color: rgba(226, 232, 240, 0.86);
}

.modal__list {
  padding-left: 0;
  margin: 10px 0 0 0;
  list-style: none;
}

.modal__list li {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0;
}

.modal__list li strong {
  display: block;
  margin: 0;
}

.modal__list li div span {
  display: block;
  font-size: 0.85rem;
  color: #475569;
}

.modal__list--profiles li {
  justify-content: flex-start;
}

.info-callouts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.info-callout {
  display: flex;
  gap: 12px;
  border: 1px solid #dbe3f0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fbff;
  align-items: center;
}

.info-callout__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.15);
  color: #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
}

.info-callout strong {
  margin: 0;
  color: #0f172a;
}

.info-callout p {
  margin: 2px 0 0 0;
  color: #475569;
  font-size: 0.88rem;
}

.preset-modal-heading {
  margin: 4px 0 0 0;
  font-size: 0.98rem;
  letter-spacing: 0;
  text-transform: none;
  color: #1a1815;
}

.preset-card-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 14px;
}

.preset-card {
  border: 1px solid rgba(26, 24, 21, 0.08);
  border-radius: 16px;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fffdfa;
  min-height: 0;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.preset-card__copy strong {
  font-size: 0.98rem;
  margin: 0;
  display: block;
  color: #1a1815;
}

.preset-card__copy p {
  margin: 4px 0 0 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #6f675f;
}

.preset-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.preset-tag {
  background: rgba(196, 149, 16, 0.08);
  color: #8f6920;
  border: 1px solid rgba(196, 149, 16, 0.16);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
}

.preset-card__actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
}

.preset-card__actions .btn {
  min-width: 128px;
  justify-content: center;
}

.architrave-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid #cbd5f5;
  background-color: #e2e8f0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}

.architrave-icon--chamfered {
  background-image: url("../images/fire-doors/architrave/chamfered.png");
}

.architrave-icon--ogee {
  background-image: url("../images/fire-doors/architrave/ogee.png");
}

.architrave-icon--torus {
  background-image: url("../images/fire-doors/architrave/torus.png");
}

.architrave-icon--ovolo {
  background-image: url("../images/fire-doors/architrave/ovolo.png");
}

.architrave-icon--bullnose {
  background-image: url("../images/fire-doors/architrave/bullnose.png");
}

.architrave-profile-tabs {
  margin-top: 12px;
}

.architrave-profile-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.architrave-profile-tab {
  appearance: none;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #0f172a;
  font-size: 0.85rem;
  transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
}

.architrave-profile-tab:active {
  transform: translateY(1px);
}

.architrave-profile-tab.is-active {
  border-color: rgba(15, 23, 42, 0.25);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
}

.architrave-profile-tab .architrave-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border-color: rgba(203, 213, 245, 0.9);
}

.architrave-profile-panel {
  margin-top: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  padding: 12px;
  background: #ffffff;
}

.architrave-profile-panel h4 {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  color: #0f172a;
}

.architrave-profile-panel p {
  margin: 0 0 10px 0;
  color: #475569;
  font-size: 0.88rem;
}

.architrave-profile-panel figure {
  margin: 0;
}

.architrave-profile-panel img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #f8fafc;
}

.architrave-profile-panel.is-missing img {
  display: none;
}

.architrave-profile-image-fallback {
  display: none;
  border-radius: 14px;
  border: 1px dashed rgba(226, 232, 240, 0.95);
  background: #f8fafc;
  padding: 14px;
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
}

.architrave-profile-panel.is-missing .architrave-profile-image-fallback {
  display: block;
}

.fd-preview-layout {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: stretch;
}

.fd-preview-copy {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.fd-narrative-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: #fff;
  color: #6f675f;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.fd-narrative-status.is-busy {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.fd-narrative {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  background: #fcfbf8;
  padding: 12px 14px;
  min-height: 160px;
  flex: 1 1 auto;
  max-height: none;
  overflow: auto;
  position: relative;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #1a1815;
}

.fd-narrative.is-busy {
  overflow: hidden;
}

.fd-narrative.is-busy::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(226, 232, 240, 0.9) 8%, rgba(241, 245, 249, 0.55) 18%, rgba(226, 232, 240, 0.9) 33%),
    linear-gradient(0deg, rgba(248, 250, 252, 0.75), rgba(248, 250, 252, 0.75));
  background-size: 240% 100%, 100% 100%;
  background-position: 0 0, 0 0;
  animation: fd-narrative-shimmer 1.15s linear infinite;
  opacity: 0.82;
}

@keyframes fd-narrative-shimmer {
  0% {
    background-position: 100% 0, 0 0;
  }
  100% {
    background-position: -120% 0, 0 0;
  }
}

.fd-narrative :where(h4) {
  margin: 0 0 6px 0;
  font-size: 0.95rem;
}

.fd-narrative :where(ul) {
  margin: 6px 0 0 0;
  padding-left: 18px;
}

.fd-narrative__door + .fd-narrative__door {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.fd-preview-note {
  margin: 0;
  font-size: 0.78rem;
  color: #9a9188;
}

.fd-rp-action .btn.btn-primary {
  width: 100%;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
}

.fd-rp-action .btn.btn-secondary {
  width: 100%;
  justify-content: center;
}

.fd-rp-utilities {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  padding: 14px 18px 0;
  flex-shrink: 0;
}

.fd-rp-utilities--basket,
.fd-rp-utilities--narrative {
  justify-content: flex-end;
}

.fd-summary-utilities {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 18px 18px;
  flex-shrink: 0;
}

.fd-summary-utilities__line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.fd-summary-utility-clear.btn {
  align-self: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
}

.fd-summary-utility.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
  flex: 0 0 auto;
}

.fd-summary-utility-clear.btn:hover {
  background: #fff1f1;
  color: #8f2d2d;
}

.fd-rp-visual {
  padding: 10px 12px;
  background: #f7f4ef;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

@media (max-width: 980px) {
  .fd-shell {
    margin-inline: -16px;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .fd-config-column {
    padding-left: 16px;
    padding-right: 16px;
  }

  .fd-workspace {
    grid-column: 1;
    grid-row: auto;
    position: static;
    margin-top: 0;
    min-height: 0;
    height: auto;
  }
}

@media (max-width: 1360px) {
  .fd-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
}

@media (max-width: 980px) {
  .fd-phase-header {
    position: static;
  }

  .fd-workspace {
    position: static;
    margin-top: 0;
    min-height: 0;
    height: auto;
  }
}

@media (max-width: 900px) {
  .fd-step-strip-shell {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding-left: 0;
    padding-right: 0;
  }

  .fd-step-strip-shell::-webkit-scrollbar {
    display: none;
  }

  .fd-step-strip {
    display: inline-flex;
    margin-inline: 0;
  }

  .fd-phase-tracks {
    flex-direction: column;
  }

  .fd-phase-track + .fd-phase-track {
    border-left: none;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
  }

  .fd-workspace {
    padding: 16px;
    margin-top: 0;
    min-height: 0;
    height: auto;
  }

  .fd-workspace__tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .fd-workspace__tabs::-webkit-scrollbar {
    display: none;
  }

  .fd-workspace__tab {
    white-space: nowrap;
  }

  .fd-workspace__tab[data-fd-workspace-tab="preview"] {
    display: none;
  }

  .fd-workspace-pane {
    padding: 12px;
  }

  .fd-rp-line {
    gap: 10px;
  }

  .fd-rp-line__value {
    max-width: 58%;
  }

  .fd-workspace-pane--preview {
    display: none !important;
  }

  .fire-doors-page {
    padding-bottom: 86px;
  }
}

.floating-door-preview {
  position: relative;
  bottom: auto;
  right: auto;
  width: 100%;
  max-width: 220px;
  background: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  color: #1a1815;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  z-index: 1;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.floating-door-preview.is-collapsed {
  transform: translateY(140%);
  opacity: 0;
  pointer-events: none;
}

.floating-door-preview.expanded {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 520px);
  max-height: none;
  z-index: 11000;
}

.floating-door-preview canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  background: transparent;
}

.preview-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.floating-door-preview[data-preview-draggable="1"] .preview-header {
  cursor: grab;
}

.floating-door-preview.is-dragging .preview-header {
  cursor: grabbing;
}

.floating-door-preview.is-dragging {
  user-select: none;
}

.preview-header strong {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: #9a9188;
}

.preview-header [data-preview-toggle] {
  color: #9a9188;
  font-size: 0.72rem;
}

@media (min-width: 901px) {
  .fd-workspace-pane--preview [data-preview-home] {
    min-width: 0;
  }

  .fd-workspace-pane--preview .floating-door-preview {
    min-height: 0;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
  }

  .fd-workspace-pane--preview .floating-door-preview canvas {
    min-height: 320px;
  }

  .fd-workspace-pane--preview .preview-header [data-preview-toggle] {
    display: none;
  }
}

/* SVG preview host container */
[data-svg-preview-host] {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

[data-svg-preview-host] svg {
  width: 100%;
  height: auto;
  max-height: 100%;
}

@media (max-width: 900px) {
  .floating-door-preview {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: min(240px, calc(100% - 48px));
    max-width: none;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 12px;
    background: #f7f4ef;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
    z-index: 11000;
  }

  .preview-header {
    display: flex;
  }
}

@media (max-width: 900px) {
  .fire-doors-page .ipi-page-header {
    margin-inline: -18px;
    padding: 18px 18px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .fire-doors-page .ipi-ph-sub {
    max-width: none;
    font-size: 12.5px;
  }

  .fire-doors-page .ipi-ph-right {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    padding-top: 0;
  }

  .fire-doors-page .btn {
    width: auto;
    justify-content: flex-start;
  }

  .fd-layout {
    row-gap: 14px;
  }

  .fd-config-column {
    gap: 16px;
    padding-left: 16px;
    padding-right: 16px;
    /* Clear fixed “Open quote builder” (left) and support FAB (right). */
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  }

  .fd-steps {
    padding-bottom: 28px;
  }

  .fd-mobile-workspace-launch {
    position: fixed;
    left: calc(12px + env(safe-area-inset-left, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 1310;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    max-width: min(220px, calc(100vw - 120px));
    margin: 0;
    padding: 10px 14px 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(26, 24, 21, 0.12);
    background: #1a1815;
    color: #fff;
    text-align: left;
    cursor: pointer;
    font: inherit;
    box-shadow:
      0 4px 14px rgba(15, 23, 42, 0.2),
      0 0 0 1px color-mix(in srgb, var(--brand, #e6561e) 28%, transparent);
    transition:
      background 0.15s ease,
      transform 0.15s ease,
      box-shadow 0.15s ease;
  }

  .fd-mobile-workspace-launch:focus-visible {
    outline: none;
    box-shadow:
      0 0 0 2px #fff,
      0 0 0 4px rgba(196, 149, 16, 0.55);
  }

  .fd-mobile-workspace-launch:active {
    transform: scale(0.98);
  }

  .fd-mobile-workspace-launch__title {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.25;
  }

  .fd-mobile-workspace-launch__meta {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.78);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  body.fd-mobile-workspace-open .fd-mobile-workspace-launch {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
  }

  html[data-theme="dark"] .fd-mobile-workspace-launch {
    background: var(--button-primary, #2d2a26);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
      0 4px 18px rgba(0, 0, 0, 0.45),
      0 0 0 1px color-mix(in srgb, var(--brand, #e6561e) 36%, transparent);
  }

  html[data-theme="dark"] .fd-mobile-workspace-launch__meta {
    color: rgba(255, 255, 255, 0.72);
  }

  .fd-phase-track {
    padding: 10px 14px;
  }

  .fd-phase-track__sub {
    display: none;
  }

  .fd-phase-track__title {
    font-size: 12.5px;
  }

  .fd-phase-track__progress {
    gap: 4px;
  }

  .fd-step-strip-shell {
    padding-left: 0;
    padding-right: 0;
  }

  .fd-step-strip__item {
    padding: 10px 12px;
    font-size: 11.5px;
  }

  .fd-accordion__header,
  .fire-doors-page .fd-phase-two .step-head {
    padding: 14px 16px;
  }

  .fd-accordion__body,
  .fire-doors-page .fd-phase-two .step-body {
    padding: 16px;
  }

  .fd-section-title,
  .fire-doors-page .fd-phase-two .step-title-group {
    gap: 12px;
  }

  .fd-section-title__icon,
  .fire-doors-page .fd-phase-two .step-ico {
    width: 34px;
    height: 34px;
  }

  .fd-section-title__icon svg,
  .fire-doors-page .fd-phase-two .step-ico svg {
    width: 15px;
    height: 15px;
  }

  .fd-workspace {
    position: fixed;
    inset: auto 0 0 0;
    grid-column: auto;
    grid-row: auto;
    margin: 0;
    min-height: 0;
    height: min(86vh, 760px);
    max-height: min(86vh, 760px);
    padding: 0;
    border-left: none;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.18);
    transform: translateY(calc(100% + 24px));
    transition: transform 0.22s ease;
    z-index: 10060;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .fd-workspace.is-mobile-open {
    transform: translateY(0);
  }

  .fd-workspace.is-mobile-open + .fd-workspace__mobile-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .fd-workspace__mobile-close {
    display: inline-flex;
  }

  .fd-workspace__header {
    padding: 16px 18px 12px;
  }

  /* Eyebrow matches canonical `.tnt-filter-drawer__eyebrow`: 10px gold. */
  .fd-workspace__eyebrow {
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--accent-strong, #a97807);
  }

  /* Stats strip hidden on mobile — not a canonical drawer pattern;
     saves ~120px of vertical space for the tabbed workspace below. */
  .fd-workspace__stats {
    display: none;
  }

  /* Canonical .ipi-tabs pill pattern on mobile. */
  .fd-workspace__tabs {
    display: flex;
    margin: 12px 18px;
    padding: 4px;
    gap: 4px;
    background: var(--canvas, #f7f5f0);
    border: 1px solid rgba(26, 24, 21, 0.11);
    border-radius: 9px;
    box-shadow: 0 1px 3px rgba(26, 24, 21, 0.06), 0 1px 2px rgba(26, 24, 21, 0.04);
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
  }

  .fd-workspace__tabs::-webkit-scrollbar {
    display: none;
  }

  .fd-workspace__tab {
    flex: 0 0 auto;
    padding: 7px 16px;
    border-radius: 6px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    background: none;
    color: var(--ink-4, #9a9188);
    white-space: nowrap;
  }

  .fd-workspace__tab.is-active,
  .fd-workspace__tab[aria-selected="true"] {
    background: var(--surface-card, #ffffff);
    color: var(--ink, #1a1815);
    box-shadow: 0 1px 3px rgba(26, 24, 21, 0.06), 0 1px 2px rgba(26, 24, 21, 0.04);
    border-bottom-color: transparent;
  }

  .fd-workspace__tab[data-fd-workspace-tab="preview"] {
    display: inline-flex;
  }

  /* Do not override [hidden] — same-specificity .fd-workspace-pane--preview { flex } was winning over display:none. */
  .fd-workspace-pane.fd-workspace-pane--preview:not([hidden]) {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 14px 0 0;
  }

  .fd-workspace__panes {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    position: relative;
  }

  .fd-workspace-pane:not([hidden]) {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .fd-workspace-pane:not([hidden]) .fd-workspace-pane__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
  }

  .fd-workspace-pane:not([hidden]) .fd-workspace-pane__footer {
    flex-shrink: 0;
  }

  .fd-summary-panel__body,
  .fd-workspace-pane--basket [data-basket],
  .fd-workspace-pane--narrative .fd-preview-layout {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Canonical foot chrome matching `.tnt-filter-drawer__foot`:
     sticky white bar, border-top divider, uniform 18px padding,
     12px gap between sub-sections (meta line → actions).
     Individual sub-sections (.summary-total, .summary-actions,
     .fd-summary-utilities) zero their own horizontal margin/padding
     below so the foot's 18px is the single owner of the inset. */
  .fd-workspace-pane__footer--summary,
  .fd-workspace-pane__footer--basket {
    background: var(--surface-card, #ffffff);
    border-top: 1px solid rgba(26, 24, 21, 0.08);
    padding: 14px 18px calc(16px + env(safe-area-inset-bottom, 0px));
    gap: 12px;
  }

  /* Zero inner insets so the foot's 18px padding is authoritative. */
  .fd-workspace-pane__footer--summary .summary-total,
  .fd-workspace-pane__footer--basket .summary-total {
    margin: 0;
  }

  /* Hide the desktop utilities row on mobile — Save preset moved into
     .summary-actions; remaining utility buttons are already hidden. */
  .fd-workspace-pane__footer--summary .fd-summary-utilities {
    display: none;
  }

  /* Door visual (preview) pane — Drop-into-basket row gets the same
     canonical foot chrome as summary/basket footers so the drawer's
     bottom bar is visually consistent across every tab. */
  .fd-workspace-pane__preview-actions {
    background: var(--surface-card, #ffffff);
    border-top: 1px solid rgba(26, 24, 21, 0.08);
    padding: 14px 18px calc(16px + env(safe-area-inset-bottom, 0px));
    margin: 0;
    flex-shrink: 0;
    justify-content: stretch;
  }

  .fd-workspace-pane__preview-actions .btn {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    justify-content: center;
  }

  .fd-rp-visual {
    padding: 0 16px 16px;
  }

  .fd-workspace-pane.fd-workspace-pane--preview:not([hidden]) .fd-rp-visual {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .fd-workspace-pane__visual-label {
    margin-bottom: 10px;
  }

  .fd-workspace-pane--preview:not([hidden]) .floating-door-preview {
    position: relative;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100%;
    max-width: 240px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    z-index: 1;
  }

  .fd-summary-utilities {
    padding: 0 16px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .fd-summary-utilities__line {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    flex-wrap: initial;
  }

  .fd-summary-utilities__line > *:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .fd-summary-utility[data-copy-spec],
  .fd-summary-utility[data-copy-quote],
  .fd-summary-utility[data-jump-active-step],
  .fd-summary-utility[data-refresh-quote] {
    display: none;
  }

  /* Quote builder Drop-into-basket + Save preset row:
     2-col grid with canonical odd-last-child rule.
     Padding zeroed — parent `.fd-workspace-pane__footer--summary`
     owns the horizontal inset. */
  .fd-workspace .summary-actions,
  .fd-workspace .summary-actions.fd-rp-action {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 10px;
    padding: 0;
    margin: 0;
    flex-wrap: initial;
  }

  .fd-workspace .summary-actions > *:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .fd-workspace .summary-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .fd-summary-utility.btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
    min-height: 40px;
    padding: 8px 12px;
  }

  .preview-header {
    display: none;
  }

  .fire-doors-page {
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }
}

/* Row summary only at desktop widths; avoids cramped split view on phones / small tablets. */
@media (min-width: 901px) {
  .fd-summary-panel__body {
    flex-direction: row;
  }
}

@media (max-width: 900px) {

  .fd-page-header {
    margin-inline: -18px;
  }

  .fire-doors-page .ipi-page-header {
    padding-left: 18px;
    padding-right: 18px;
    flex-direction: column;
    align-items: stretch;
  }

  .fire-doors-page .ipi-ph-right {
    justify-content: flex-start;
  }

  .fd-layout {
    grid-template-columns: 1fr;
  }

  .fd-option-grid {
    grid-template-columns: 1fr;
  }

  .fd-preview-layout {
    flex-direction: column;
  }
}

/* ============================================================================
   Fire doors canonical modal primitives — `.fd-modal*`
   ----------------------------------------------------------------------------
   Canonical modal chrome for fire-doors modals. Every fire-doors modal
   shares the same shell, inputs, footer slots and mobile bottom-sheet
   behaviour. Values lifted from settings-shell.css `.set-modal` block
   (~line 6320). This block is appended last so it overrides any older
   chrome via source order. Existing `.fd-loading-modal`, `.fd-pricing-modal`
   and `.fd-preset-modal` rules are untouched — they coexist via the
   umbrella class pattern.
   ============================================================================ */

.fd-modal {
    --fd-accent: var(--accent, #c49510);
    --fd-accent-soft: var(--accent-soft, rgba(196, 149, 16, 0.1));
    --fd-accent-strong: rgba(196, 149, 16, 0.34);
    --fd-ink: var(--ink, #1a1815);
    --fd-ink-muted: var(--ink-3, #6b6458);
    --fd-ink-faint: var(--ink-4, #9a9188);
    --fd-border: var(--rule, rgba(26, 24, 21, 0.08));
    --fd-border-rule: rgba(26, 24, 21, 0.07);
    --fd-border-input: rgba(26, 24, 21, 0.14);
    --fd-bg-warm: #f7f5f0;
    --fd-surface: var(--surface-card, #ffffff);
    --fd-surface-soft: #fcfaf4;

    /* --ipi-* token aliases so canonical primitives (.ipi-tabs, .ipi-tab,
       .ipi-filter-search) render correctly inside the modal scope. */
    --ipi-bg: var(--canvas, #f7f5f0);
    --ipi-bg-inset: var(--surface-inset, #edeae3);
    --ipi-bg-card: var(--surface-card, #ffffff);
    --ipi-bg-hover: rgba(26, 24, 21, 0.04);
    --ipi-rule: var(--rule, rgba(26, 24, 21, 0.08));
    --ipi-rule-h: rgba(26, 24, 21, 0.11);
    --ipi-ink: var(--ink, #1a1815);
    --ipi-ink-2: #3d3a34;
    --ipi-ink-3: var(--ink-3, #6b6458);
    --ipi-ink-4: var(--ink-4, #9a9188);
    --ipi-accent: var(--accent, #c49510);
    --ipi-accent-bg: rgba(196, 149, 16, 0.08);
    --ipi-accent-border: rgba(196, 149, 16, 0.34);
    --ipi-shadow-sm: 0 1px 3px rgba(26, 24, 21, 0.06), 0 1px 2px rgba(26, 24, 21, 0.04);
    --ipi-shadow-card: 0 1px 4px rgba(26, 24, 21, 0.06), 0 0 0 1px rgba(26, 24, 21, 0.05);
}

/* Default dialog: content-driven height. Use --stable on tabbed/multi-state modals. */
.fd-modal .fd-modal__dialog {
    width: min(880px, calc(100vw - 32px));
    max-height: min(90vh, 960px);
    border-radius: 16px;
    border: 1px solid var(--fd-border);
    background: var(--fd-surface);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.18),
        0 4px 16px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.fd-modal .fd-modal__dialog--stable {
    height: min(85vh, 760px);
    min-height: min(60vh, 520px);
}

.fd-modal .fd-modal__dialog--narrow {
    width: min(560px, calc(100vw - 32px));
}

.fd-modal .fd-modal__dialog--wide {
    width: min(1280px, calc(100vw - 32px));
}

/* Form wrapping body+footer must be flex so body's overflow-y:auto has a
   constrained parent. */
.fd-modal form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    width: 100%;
}

.fd-modal .fd-modal__header {
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--fd-border-rule);
    flex-shrink: 0;
    background: var(--fd-surface);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.fd-modal .fd-modal__header > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.fd-modal .fd-modal__header-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.fd-modal .fd-modal__header .eyebrow {
    margin: 0;
    color: var(--fd-accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.fd-modal .fd-modal__header .modal__title,
.fd-modal .fd-modal__header h3 {
    margin: 0;
    font-family: var(--font-display, 'Space Grotesk', system-ui, sans-serif);
    font-size: 1.28rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--fd-ink);
}

.fd-modal .fd-modal__header .text-muted,
.fd-modal .fd-modal__header > div > p:not(.eyebrow) {
    margin: 4px 0 0;
    max-width: 60ch;
    color: var(--fd-ink-muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
}

.fd-modal .modal__close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--surface-inset, #edeae3);
    border: none;
    color: var(--fd-ink-muted);
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.fd-modal .modal__close:hover {
    background: rgba(26, 24, 21, 0.1);
    color: var(--fd-ink);
}

.fd-modal .fd-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 20px 22px 22px;
    background: var(--fd-bg-warm);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fd-modal .fd-modal__footer {
    padding: 13px 22px 14px;
    border-top: 1px solid var(--fd-border-rule);
    background: var(--fd-surface);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.fd-modal .fd-modal__footer-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.fd-modal .fd-modal__footer-copy strong {
    font-family: var(--font-display, 'Space Grotesk', system-ui, sans-serif);
    font-size: 13px;
    font-weight: 700;
    color: var(--fd-ink);
}

.fd-modal .fd-modal__footer-copy p {
    margin: 0;
    font-size: 12px;
    color: var(--fd-ink-faint);
}

.fd-modal .fd-modal__footer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.fd-modal .fd-modal__footer .btn {
    min-height: 40px;
    padding: 8px 18px;
}

/* Form controls */
.fd-modal :where(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input[type="url"], input[type="search"], input[type="date"], input[type="time"], input[type="datetime-local"], select, textarea) {
    min-height: 40px;
    padding: 10px 13px;
    border-radius: 9px;
    border: 1px solid var(--fd-border-input);
    background: var(--fd-surface);
    font-family: var(--font-sans, inherit);
    font-size: 13.5px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    color: var(--fd-ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    width: 100%;
}

.fd-modal :where(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input[type="url"], input[type="search"], input[type="date"], input[type="datetime-local"], select, textarea):focus {
    border-color: var(--fd-accent-strong);
    box-shadow: 0 0 0 3px var(--fd-accent-soft);
    outline: none;
}

.fd-modal textarea {
    min-height: 72px;
    resize: vertical;
    line-height: 1.5;
}

.fd-modal select {
    padding-right: 34px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%239a9188' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    cursor: pointer;
}

/* Dark mode */
html[data-theme="dark"] .fd-modal {
    --fd-surface: #0f172a;
    --fd-surface-soft: rgba(15, 23, 42, 0.6);
    --fd-bg-warm: #0b1220;
    --fd-ink: #e2e8f0;
    --fd-ink-muted: #94a3b8;
    --fd-ink-faint: #94a3b8;
    --fd-border: rgba(148, 163, 184, 0.22);
    --fd-border-rule: rgba(148, 163, 184, 0.18);
    --fd-border-input: rgba(148, 163, 184, 0.28);
    --fd-accent: #e3b008;
    --fd-accent-soft: rgba(227, 176, 8, 0.18);
    --fd-accent-strong: rgba(244, 217, 139, 0.5);

    --ipi-bg: rgba(15, 23, 42, 0.55);
    --ipi-bg-inset: rgba(15, 23, 42, 0.62);
    --ipi-bg-card: rgba(15, 23, 42, 0.7);
    --ipi-bg-hover: rgba(148, 163, 184, 0.08);
    --ipi-rule: rgba(148, 163, 184, 0.22);
    --ipi-rule-h: rgba(148, 163, 184, 0.28);
    --ipi-ink: #e2e8f0;
    --ipi-ink-2: #cbd5e1;
    --ipi-ink-3: #94a3b8;
    --ipi-ink-4: #94a3b8;
    --ipi-accent: #e3b008;
    --ipi-accent-bg: rgba(227, 176, 8, 0.18);
    --ipi-accent-border: rgba(244, 217, 139, 0.5);
    --ipi-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --ipi-shadow-card: 0 1px 4px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(148, 163, 184, 0.1);
}

html[data-theme="dark"] .fd-modal .fd-modal__dialog {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] .fd-modal .modal__close {
    background: rgba(148, 163, 184, 0.16);
    color: rgba(226, 232, 240, 0.92);
}

html[data-theme="dark"] .fd-modal .modal__close:hover {
    background: rgba(148, 163, 184, 0.28);
}

/* Mobile modal behaviour (≤900px) — canonical full-screen rule lives in style.css */
@media (max-width: 900px) {
    /* Header, body, footer chrome + footer-copy hidden owned by canonical + gold-spec. */

    .fd-modal .fd-modal__body {
        gap: 12px;
    }

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

    .fd-modal .fd-modal__footer-actions > *:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .fd-modal .fd-modal__footer-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        font-size: 13px;
        padding-left: 6px;
        padding-right: 6px;
    }
}


/* ============================================================
   v2 — page-level 3-column layout: side tabs / options / workspace
   ============================================================ */

/* Left column: side tabs flush against the app's left nav.
   White surface (kanban-style) with a visible hairline divider
   between this column and the options pane.
   Sticky so it stays in view as the centre column scrolls.
   Custom thin scrollbar — never the browser default. */
.fd-side-tabs {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 14px 28px;
    background: var(--surface-card, #ffffff);
    border-right: 1px solid var(--rule-strong, rgba(26, 24, 21, 0.14));
    position: sticky;
    top: 0;
    align-self: start;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    overscroll-behavior: contain;
    min-width: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(26, 24, 21, 0.18) transparent;
}
.fd-side-tabs::-webkit-scrollbar { width: 6px; height: 6px; }
.fd-side-tabs::-webkit-scrollbar-track { background: transparent; }
.fd-side-tabs::-webkit-scrollbar-thumb {
    background: rgba(26, 24, 21, 0.12);
    border-radius: 999px;
}
.fd-side-tabs:hover::-webkit-scrollbar-thumb { background: rgba(26, 24, 21, 0.22); }

.fd-side-tab-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fd-side-tab-group__label {
    margin: 0;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.fd-side-tab-group__num {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-4, #9a9188);
}

.fd-side-tab-group__title {
    font-family: var(--font-display, "Space Grotesk");
    font-size: 13px;
    font-weight: 600;
    color: var(--ink, #1a1815);
    letter-spacing: -0.01em;
}

.fd-side-tab-group.is-complete .fd-side-tab-group__title::after {
    content: " ✓";
    color: var(--success, #1e7a45);
    font-weight: 700;
}

.fd-side-tab-group__pills {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fd-side-tab {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    width: 100%;
    padding: 9px 10px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-3, #6b6458);
    font-family: var(--font-sans, "Inter", system-ui);
    text-align: left;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
    position: relative;
    min-height: 40px;
}

.fd-side-tab[hidden] { display: none !important; }

.fd-side-tab:hover {
    background: var(--surface-card, #ffffff);
    color: var(--ink, #1a1815);
}

.fd-side-tab:focus-visible {
    outline: 2px solid var(--accent, #c49510);
    outline-offset: 2px;
}

.fd-side-tab.is-active {
    background: var(--surface-card, #ffffff);
    color: var(--ink, #1a1815);
    border-color: var(--rule-strong, rgba(26, 24, 21, 0.14));
    box-shadow: 0 1px 3px rgba(26, 24, 21, 0.06);
}

.fd-side-tab.is-active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 2px;
    background: var(--accent, #c49510);
}

.fd-side-tab__dot {
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    border: 1.5px solid var(--ink-4, #9a9188);
    background: transparent;
    flex: 0 0 auto;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.fd-side-tab.is-active .fd-side-tab__dot {
    background: var(--accent, #c49510);
    border-color: var(--accent, #c49510);
}

.fd-side-tab__copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1 1 auto;
}

.fd-side-tab__title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.fd-side-tab__summary {
    font-size: 11px;
    line-height: 1.3;
    color: var(--ink-4, #9a9188);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fd-side-tab__summary:empty { display: none; }

.fd-side-tab.is-active .fd-side-tab__summary {
    color: var(--ink-3, #6b6458);
}

.fd-side-tab__warning {
    color: var(--danger, #b03030);
    font-size: 12px;
    line-height: 1;
    flex: 0 0 auto;
    margin-top: 4px;
}

/* Centre column: options pane.
   Holds the editing banner + all 18 panes + sticky Next-button footer.
   Each .fd-pane is hidden by default; .is-active reveals it.
   We deliberately use a class — NOT [hidden] — so style.css's
   :where([hidden]) { display: none !important } can never fight us. */
.fd-options-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 0;
    background: var(--surface-card, #ffffff);
}

.fd-options-pane > .fd-phase-panel {
    flex: 1 1 auto;
    min-height: 0;
    padding: 24px 28px 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(26, 24, 21, 0.18) transparent;
}
.fd-options-pane > .fd-phase-panel::-webkit-scrollbar { width: 6px; height: 6px; }
.fd-options-pane > .fd-phase-panel::-webkit-scrollbar-track { background: transparent; }
.fd-options-pane > .fd-phase-panel::-webkit-scrollbar-thumb {
    background: rgba(26, 24, 21, 0.12);
    border-radius: 999px;
}
.fd-options-pane > .fd-phase-panel:hover::-webkit-scrollbar-thumb { background: rgba(26, 24, 21, 0.22); }

.fd-options-pane > .fd-phase-panel[hidden] { display: none; }

.fd-pane {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.fd-pane.is-active { display: flex; }

.fd-pane__header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--rule, rgba(26, 24, 21, 0.08));
}

.fd-pane__eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent, #c49510);
    margin: 0;
}

.fd-pane__title {
    font-family: var(--font-display, "Space Grotesk");
    font-size: 19px;
    font-weight: 700;
    color: var(--ink, #1a1815);
    letter-spacing: -0.015em;
    margin: 0;
}

.fd-pane__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fd-pane__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.fd-pane__cards > .config-section { margin: 0; }

/* Sticky Next button at the bottom of the options pane */
.fd-options-pane__footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 28px;
    background: var(--surface-card, #ffffff);
    border-top: 1px solid var(--rule, rgba(26, 24, 21, 0.08));
    box-shadow: 0 -2px 8px rgba(26, 24, 21, 0.04);
}

.fd-options-pane__footer-note {
    font-size: 12px;
    color: var(--ink-4, #9a9188);
}

.fd-options-pane__footer-note:empty { display: none; }

.fd-options-next { min-height: 38px; }

/* Phase 2: hide side-tab rail (linear form gets the side column too).
   .fd-shell--phase-2 is toggled on the shell when the user crosses
   into Phase 2. */
.fd-shell--phase-2 .fd-side-tabs { display: none; }
.fd-shell--phase-2 { grid-template-columns: minmax(0, 1fr) 310px; }
.fd-shell--phase-2 > .fd-options-pane { grid-column: 1; }
.fd-shell--phase-2 > .fd-workspace    { grid-column: 2; }
.fd-shell--phase-2 > .fd-phase-header { grid-column: 1 / -1; }
/* Phase 2 has its own per-step Next / Save buttons inside the form;
   hide the Phase-1 sticky Next so the two systems don't collide. */
.fd-shell--phase-2 .fd-options-pane__footer { display: none; }

/* Dark mode */
html[data-theme="dark"] .fd-side-tabs {
    background: rgba(15, 23, 42, 0.6);
    border-right-color: rgba(71, 85, 105, 0.42);
}
html[data-theme="dark"] .fd-side-tab-group__num,
html[data-theme="dark"] .fd-side-tab__summary {
    color: rgba(203, 213, 225, 0.65);
}
html[data-theme="dark"] .fd-side-tab-group__title { color: #f8fafc; }
html[data-theme="dark"] .fd-side-tab { color: rgba(203, 213, 225, 0.8); }
html[data-theme="dark"] .fd-side-tab:hover,
html[data-theme="dark"] .fd-side-tab.is-active {
    background: rgba(2, 6, 23, 0.42);
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.32);
}
html[data-theme="dark"] .fd-side-tab.is-active::before { background: var(--accent-on-dark, #e3b008); }
html[data-theme="dark"] .fd-side-tab__warning { color: #f4a7a7; }
html[data-theme="dark"] .fd-options-pane { background: rgba(15, 23, 42, 0.4); }
html[data-theme="dark"] .fd-options-pane__footer {
    background: rgba(15, 23, 42, 0.85);
    border-top-color: rgba(148, 163, 184, 0.28);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.32);
}
html[data-theme="dark"] .fd-pane__title { color: #f8fafc; }
html[data-theme="dark"] .fd-pane__eyebrow { color: var(--accent-on-dark, #e3b008); }
html[data-theme="dark"] .fd-pane__header { border-bottom-color: rgba(148, 163, 184, 0.22); }

/* Mobile (<= 900px): collapse to single column.
   Side tabs become a horizontal scroll pill bar at the top of the
   options pane (matches the existing .fd-step-strip language).
   Live workspace already hides at this width and is reachable via
   the existing "Open quote builder" floating launcher. */
@media (max-width: 900px) {
    .fd-shell {
        margin-inline: 0;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto minmax(0, 1fr);
    }
    .fd-shell > .fd-phase-header { grid-column: 1; grid-row: 1; }
    .fd-shell > .fd-side-tabs    { grid-column: 1; grid-row: 2; }
    .fd-shell > .fd-options-pane { grid-column: 1; grid-row: 3; }

    .fd-side-tabs {
        position: static;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding: 10px 14px 12px;
        border-right: 0;
        border-bottom: 1px solid var(--rule, rgba(26, 24, 21, 0.08));
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
    }
    .fd-side-tab-group {
        flex: 0 0 auto;
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }
    .fd-side-tab-group__label {
        flex-direction: row;
        align-items: baseline;
        gap: 6px;
        padding: 0;
    }
    .fd-side-tab-group__title { font-size: 12px; }
    .fd-side-tab-group__pills {
        flex-direction: row;
        gap: 6px;
    }
    .fd-side-tab {
        flex: 0 0 auto;
        scroll-snap-align: center;
        padding: 7px 12px;
        min-height: 36px;
        border: 1px solid var(--rule, rgba(26, 24, 21, 0.08));
        background: var(--surface-card, #ffffff);
        border-radius: 999px;
    }
    .fd-side-tab.is-active::before { display: none; }
    .fd-side-tab.is-active {
        background: var(--ink, #1a1815);
        color: var(--surface-card, #ffffff);
        border-color: var(--ink, #1a1815);
    }
    .fd-side-tab__copy { flex-direction: row; gap: 6px; align-items: baseline; }
    .fd-side-tab__title { font-size: 12px; }
    .fd-side-tab__summary { display: none; }
    .fd-side-tab__dot { display: none; }
    .fd-side-tab.is-active .fd-side-tab__warning { color: #f4a7a7; }

    .fd-options-pane > .fd-phase-panel { padding: 14px 16px 0; }
    .fd-pane__cards { grid-template-columns: 1fr; }
    .fd-pane__title { font-size: 17px; }

    .fd-options-pane__footer {
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    }

    /* Phase 2 mobile inherits the single-column rules above */
    .fd-shell--phase-2 { grid-template-columns: minmax(0, 1fr); }
    .fd-shell--phase-2 > .fd-options-pane { grid-column: 1; }
}

/* ============================================================
   Flat options layout inside .fd-pane.
   Overrides the default .config-section / .config-options /
   .config-option styles (which are full cards-on-cards) so the
   options column reads as a long flat list of pill-button rows
   on a white surface. Other pages that use .config-section
   keep their existing card chrome — these overrides are scoped
   to the new fire-door panes only.
   ============================================================ */
.fd-pane .config-section {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 14px 0;
    box-shadow: none;
    margin: 0;
    border-bottom: 1px solid var(--rule, rgba(26, 24, 21, 0.08));
}
.fd-pane .config-section:last-child { border-bottom: 0; }

.fd-pane .config-section header { padding: 0; margin: 0 0 10px; }

.fd-pane .config-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.fd-pane .config-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3, #6b6458);
    margin: 0;
}

.fd-pane .config-header-row__meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fd-pane .config-selected {
    font-size: 12px;
    color: var(--ink-3, #6b6458);
    font-weight: 500;
}
.fd-pane .config-selected:empty { display: none; }

.fd-pane .config-info {
    width: 22px;
    height: 22px;
    border: 1px solid var(--rule, rgba(26, 24, 21, 0.08));
    border-radius: 999px;
    background: transparent;
    color: var(--ink-4, #9a9188);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.fd-pane .config-info:hover {
    color: var(--accent, #c49510);
    border-color: var(--accent-soft, rgba(196, 149, 16, 0.35));
    background: var(--accent-soft, rgba(196, 149, 16, 0.08));
}

.fd-pane .config-description {
    font-size: 12.5px;
    color: var(--ink-4, #9a9188);
    margin: 4px 0 0;
}

/* Drop the "Most common" tag inside the flat layout — the
   list scrolls naturally so the tag adds noise. */
.fd-pane .config-most-common { display: none; }

/* Stacked list rows — one row per choice, vertical column.
   [radio dot] [label / supporting text stacked] [price chip]
   Active row = accent left-border + soft accent tint background.
   Reads top-to-bottom like a settings form; scales from 2 to 12+
   choices without losing hierarchy or breaking on supporting text. */
.fd-pane .config-options,
.fd-pane .config-options.config-options--scrollable {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: none;
    overflow: visible;
    padding: 0;
}

.fd-pane .config-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    grid-template-areas:
        "radio label price"
        "radio supporting price";
    align-items: center;
    column-gap: 14px;
    row-gap: 2px;
    width: 100%;
    min-height: 52px;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--rule, rgba(26, 24, 21, 0.08));
    border-radius: 10px;
    background: var(--surface-card, #ffffff);
    color: var(--ink, #1a1815);
    text-align: left;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.15s ease, border-color 0.15s ease;
    position: relative;
}

.fd-pane .config-option:hover {
    border-color: var(--rule-strong, rgba(26, 24, 21, 0.14));
    background: var(--surface-subtle, #f8f6f1);
}

.fd-pane .config-option:focus-visible {
    outline: 2px solid var(--accent, #c49510);
    outline-offset: 2px;
}

/* Override the default ::after radio dot (which sits absolute on
   the right with its own background) — re-place it as a grid item
   on the LEFT of the row. */
.fd-pane .config-option::after {
    content: "";
    grid-area: radio;
    align-self: center;
    justify-self: center;
    position: static;
    top: auto;
    right: auto;
    transform: none;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1.5px solid var(--rule-strong, rgba(26, 24, 21, 0.34));
    background: transparent;
}
.fd-pane .config-option.active::after {
    border-color: var(--accent, #c49510);
    background:
        radial-gradient(circle at center, var(--accent, #c49510) 0 4.5px, transparent 5px);
}

.fd-pane .config-option strong {
    grid-area: label;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--ink, #1a1815);
}

/* Supporting text in row 2 / col 2 only when present. When absent,
   the label sits centered in the row via row-gap collapse. */
.fd-pane .config-option > span:not(.option-price) {
    grid-area: supporting;
    font-size: 12px;
    color: var(--ink-4, #9a9188);
    line-height: 1.3;
}

.fd-pane .config-option .option-price {
    grid-area: price;
    align-self: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-3, #6b6458);
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--surface-inset, #edeae3);
    white-space: nowrap;
    margin: 0;
}
.fd-pane .config-option .option-price--included {
    color: var(--success, #1e7a45);
    background: var(--success-soft, rgba(30, 122, 69, 0.1));
}

/* Active = accent left-border + soft accent-tint background.
   Quieter than a filled pill but unmistakable at a glance. */
.fd-pane .config-option.active {
    border-color: var(--accent, #c49510);
    background: var(--accent-soft, rgba(196, 149, 16, 0.08));
    box-shadow: inset 3px 0 0 var(--accent, #c49510);
}

.fd-pane .config-option[disabled] {
    opacity: 0.55;
    background: var(--surface-inset, #edeae3);
    border-color: var(--rule, rgba(26, 24, 21, 0.08));
    color: var(--ink-4, #9a9188);
    cursor: not-allowed;
    box-shadow: none;
}
.fd-pane .config-option[disabled] strong { color: var(--ink-4, #9a9188); }
.fd-pane .config-option[disabled]::after {
    border-color: var(--rule-strong, rgba(26, 24, 21, 0.18));
}

/* Drop the auto-fit grid wrapper — panes already lay sub-section
   bodies as a vertical flow now. */
.fd-pane__cards {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Inline panels (RAL, leafThickness, fit detail, uvalue, frame
   note, seal note, smoke-seal warning) keep their existing pill
   styling — they're already inset chips and read fine on white. */

/* Dark mode parity */
html[data-theme="dark"] .fd-pane .config-section {
    border-bottom-color: rgba(148, 163, 184, 0.18);
}
html[data-theme="dark"] .fd-pane .config-eyebrow,
html[data-theme="dark"] .fd-pane .config-selected {
    color: rgba(203, 213, 225, 0.78);
}
html[data-theme="dark"] .fd-pane .config-description {
    color: rgba(203, 213, 225, 0.6);
}
html[data-theme="dark"] .fd-pane .config-info {
    border-color: rgba(148, 163, 184, 0.28);
    color: rgba(203, 213, 225, 0.7);
}
html[data-theme="dark"] .fd-pane .config-option {
    background: rgba(2, 6, 23, 0.32);
    border-color: rgba(148, 163, 184, 0.28);
    color: #f8fafc;
}
html[data-theme="dark"] .fd-pane .config-option:hover {
    border-color: rgba(148, 163, 184, 0.42);
    background: rgba(2, 6, 23, 0.5);
}
html[data-theme="dark"] .fd-pane .config-option strong { color: #f8fafc; }
html[data-theme="dark"] .fd-pane .config-option > span:not(.option-price) {
    color: rgba(203, 213, 225, 0.65);
}
html[data-theme="dark"] .fd-pane .config-option::after {
    border-color: rgba(148, 163, 184, 0.5);
}
html[data-theme="dark"] .fd-pane .config-option.active {
    background: rgba(227, 176, 8, 0.14);
    border-color: var(--accent-on-dark, #e3b008);
    box-shadow: inset 3px 0 0 var(--accent-on-dark, #e3b008);
}
html[data-theme="dark"] .fd-pane .config-option.active::after {
    border-color: var(--accent-on-dark, #e3b008);
    background:
        radial-gradient(circle at center, var(--accent-on-dark, #e3b008) 0 4.5px, transparent 5px);
}
html[data-theme="dark"] .fd-pane .config-option .option-price {
    background: rgba(148, 163, 184, 0.18);
    color: rgba(203, 213, 225, 0.85);
}

/* Mobile parity — list rows just shrink slightly, no shape change. */
@media (max-width: 900px) {
    .fd-pane .config-section { padding: 12px 0; }
    .fd-pane .config-option { min-height: 48px; padding: 10px 12px; }
    .fd-pane .config-option strong { font-size: 13px; }
}

/* ============================================================
   Templates sub-section — category groupings
   All presets render inline grouped by category (no modal CTA).
   ============================================================ */
.fd-step1-block--presets {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.fd-presets-category {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fd-presets-category__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 0 2px;
    border-bottom: 1px solid var(--rule, rgba(26, 24, 21, 0.08));
    padding-bottom: 6px;
}

.fd-presets-category__title {
    font-family: var(--font-display, "Space Grotesk");
    font-size: 14px;
    font-weight: 600;
    color: var(--ink, #1a1815);
    margin: 0;
    letter-spacing: -0.005em;
}

.fd-presets-category__count {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-4, #9a9188);
}

html[data-theme="dark"] .fd-presets-category__head { border-bottom-color: rgba(148, 163, 184, 0.18); }
html[data-theme="dark"] .fd-presets-category__title { color: #f8fafc; }
html[data-theme="dark"] .fd-presets-category__count { color: rgba(203, 213, 225, 0.6); }

@media (max-width: 900px) {
    .fd-step1-block--presets { gap: 14px; }
    .fd-presets-category { gap: 8px; }
    .fd-presets-category__title { font-size: 13px; }
}

/* ════════════════════════════════════════════════════════════════════════════
 * Reference Pricing modal — dark mode + responsive
 * ════════════════════════════════════════════════════════════════════════════ */

html[data-theme="dark"] .fd-pricing-modal__rail {
    background: rgba(15, 23, 42, 0.55);
    border-bottom-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .fd-pricing-modal__search-input {
    background: rgba(2, 6, 23, 0.42);
    border-color: rgba(148, 163, 184, 0.28);
    color: rgba(248, 250, 252, 0.96);
}

html[data-theme="dark"] .fd-pricing-modal__search-input::placeholder {
    color: rgba(203, 213, 225, 0.55);
}

html[data-theme="dark"] .fd-pricing-modal__search-input:focus {
    border-color: #e3b008;
    box-shadow: 0 0 0 3px rgba(227, 176, 8, 0.22);
}

html[data-theme="dark"] .fd-pricing-modal__search > svg {
    color: rgba(203, 213, 225, 0.55);
}

html[data-theme="dark"] .fd-pricing-modal__search-clear {
    background: rgba(148, 163, 184, 0.18);
    color: rgba(203, 213, 225, 0.85);
}

html[data-theme="dark"] .fd-pricing-modal__search-clear:hover {
    background: rgba(148, 163, 184, 0.28);
    color: rgba(248, 250, 252, 0.96);
}

html[data-theme="dark"] .fd-pricing-modal__match-count {
    background: rgba(2, 6, 23, 0.55);
    color: rgba(203, 213, 225, 0.85);
}

html[data-theme="dark"] .fd-pricing-modal__rail-btn {
    background: rgba(2, 6, 23, 0.42);
    border-color: rgba(148, 163, 184, 0.28);
    color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] .fd-pricing-modal__rail-btn:hover,
html[data-theme="dark"] .fd-pricing-modal__rail-btn:focus-visible {
    border-color: #e3b008;
    background: rgba(227, 176, 8, 0.12);
    color: rgba(248, 250, 252, 0.96);
}

html[data-theme="dark"] .fd-pricing-modal__chip {
    background: rgba(2, 6, 23, 0.42);
    border-color: rgba(148, 163, 184, 0.22);
    color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] .fd-pricing-modal__chip:hover,
html[data-theme="dark"] .fd-pricing-modal__chip:focus-visible {
    border-color: #e3b008;
    background: rgba(227, 176, 8, 0.1);
}

html[data-theme="dark"] .fd-pricing-modal__chip-eyebrow {
    color: #e3b008;
}

html[data-theme="dark"] .fd-pricing-modal__chip-label {
    color: rgba(248, 250, 252, 0.96);
}

html[data-theme="dark"] .fd-pricing-modal__chip-count {
    background: rgba(15, 23, 42, 0.55);
    color: rgba(203, 213, 225, 0.85);
}

html[data-theme="dark"] .fd-pricing-modal__chip--alert {
    border-color: rgba(248, 113, 113, 0.55);
}

html[data-theme="dark"] .fd-pricing-modal__chip--alert .fd-pricing-modal__chip-eyebrow,
html[data-theme="dark"] .fd-pricing-modal__chip--alert .fd-pricing-modal__chip-count {
    color: #f87171;
    background: rgba(248, 113, 113, 0.14);
}

html[data-theme="dark"] .fd-pricing-section__summary {
    background: rgba(15, 23, 42, 0.55);
}

html[data-theme="dark"] .fd-pricing-section__summary:hover {
    background: rgba(227, 176, 8, 0.08);
}

html[data-theme="dark"] .fd-pricing-section__summary-text .fd-eyebrow {
    color: #e3b008;
}

html[data-theme="dark"] .fd-pricing-section__count {
    background: rgba(2, 6, 23, 0.55);
    color: rgba(203, 213, 225, 0.85);
}

html[data-theme="dark"] .fd-pricing-section__count-divider {
    color: rgba(203, 213, 225, 0.45);
}

html[data-theme="dark"] .fd-pricing-section__chevron {
    color: rgba(203, 213, 225, 0.7);
}

html[data-theme="dark"] .fd-pricing-section--alert {
    border-color: rgba(248, 113, 113, 0.55);
}

html[data-theme="dark"] .fd-pricing-section--alert .fd-pricing-section__summary-text .fd-eyebrow {
    color: #f87171;
}

html[data-theme="dark"] .fd-pricing-section__alert-note {
    background: rgba(248, 113, 113, 0.06);
    border-color: rgba(248, 113, 113, 0.32);
    color: rgba(226, 232, 240, 0.78);
}

html[data-theme="dark"] .fd-pricing-section__alert-note code {
    background: rgba(2, 6, 23, 0.55);
    color: rgba(248, 250, 252, 0.86);
}

html[data-theme="dark"] .fd-pricing-modal__empty {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(148, 163, 184, 0.28);
    color: rgba(203, 213, 225, 0.85);
}

html[data-theme="dark"] .fd-pricing-modal__empty strong {
    color: rgba(248, 250, 252, 0.96);
}

@media (max-width: 900px) {
    .fd-pricing-modal__rail {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 0 12px;
    }
    .fd-pricing-modal__search {
        flex: 1 1 100%;
        order: 1;
    }
    .fd-pricing-modal__rail-meta {
        order: 2;
        flex: 1 1 100%;
        justify-content: space-between;
    }
    /* .fd-pricing-modal__search-input sizing owned by canonical .modal--sheet
       input rule in style.css:4899. */
    .fd-pricing-modal__rail-btn {
        height: 36px;
        padding: 0 14px;
        font-size: 13px;
    }
    .fd-pricing-modal__jump {
        gap: 6px;
    }
    .fd-pricing-modal__chip {
        padding: 7px 10px;
        gap: 6px;
    }
    .fd-pricing-modal__chip-eyebrow {
        display: none; /* trim chip noise on mobile — count + label is enough */
    }
    .fd-pricing-section__summary {
        padding: 14px;
        gap: 10px;
    }
    .fd-pricing-section__title {
        font-size: 14px;
    }
    .fd-pricing-modal__empty {
        padding: 24px 16px;
        font-size: 13px;
    }
}

/* ════════════════════════════════════════════════════════════════════════════
 * Reference Pricing modal — inline edit affordance + audit log panel
 * Added 2026-04-15. Owner-only (the markup gates `--editable`/`__pencil`/audit
 * via $canManagePricing). Triggers: click row, Enter or blur to save, ESC to
 * cancel. Saving / saved / error states are JS-managed via row classes.
 * ════════════════════════════════════════════════════════════════════════════ */

.fd-pricing-item__display {
    display: inline-flex;
    align-items: baseline;
    min-width: 0;
}

/* Pencil affordance on hover/focus for editable rows */
.fd-pricing-item__pencil {
    width: 12px;
    height: 12px;
    margin-left: 8px;
    color: var(--ink-4, #9a9188);
    opacity: 0;
    transition: opacity 150ms ease, color 150ms ease;
    flex-shrink: 0;
    align-self: center;
}

.fd-pricing-item--editable {
    cursor: pointer;
    border-radius: 6px;
    margin: 0 -8px;
    padding-left: 10px;
    padding-right: 10px;
    transition: background 150ms ease;
}

.fd-pricing-item--editable:hover,
.fd-pricing-item--editable:focus,
.fd-pricing-item--editable:focus-visible {
    background: rgba(196, 149, 16, 0.06);
    outline: none;
}

.fd-pricing-item--editable:hover .fd-pricing-item__pencil,
.fd-pricing-item--editable:focus .fd-pricing-item__pencil,
.fd-pricing-item--editable:focus-visible .fd-pricing-item__pencil,
.fd-pricing-item--editing .fd-pricing-item__pencil {
    opacity: 1;
    color: var(--accent, #c49510);
}

/* Active edit state — input replaces the display span */
.fd-pricing-item--editing {
    background: rgba(196, 149, 16, 0.1);
    cursor: text;
}

.fd-pricing-item__edit-form {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.fd-pricing-item__edit-prefix {
    color: var(--ink-3, #6b6458);
    font-size: 0.85rem;
    font-weight: 600;
}

.fd-pricing-item__edit-input {
    width: 92px;
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid var(--accent, #c49510);
    border-radius: 6px;
    background: var(--surface-card, #ffffff);
    color: var(--ink, #1a1815);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: right;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 0 0 3px rgba(196, 149, 16, 0.18);
}

.fd-pricing-item__edit-input::-webkit-outer-spin-button,
.fd-pricing-item__edit-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.fd-pricing-item__edit-input[type="number"] {
    -moz-appearance: textfield;
}

.fd-pricing-item__edit-input:focus {
    outline: none;
}

/* Saving spinner */
.fd-pricing-item--saving .fd-pricing-item__display {
    opacity: 0.5;
}

.fd-pricing-item__spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid rgba(196, 149, 16, 0.25);
    border-top-color: var(--accent, #c49510);
    border-radius: 50%;
    animation: fd-pricing-spin 600ms linear infinite;
    vertical-align: middle;
}

@keyframes fd-pricing-spin {
    to { transform: rotate(360deg); }
}

/* Saved / error flashes */
.fd-pricing-item--saved {
    background: rgba(30, 122, 69, 0.1);
    transition: background 600ms ease;
}

.fd-pricing-item--error {
    background: rgba(176, 48, 48, 0.1);
}

/* Inline error message under the row when save fails */
.fd-pricing-item__inline-error {
    flex: 1 1 100%;
    margin: 4px 0 0;
    padding: 4px 0 0;
    color: var(--danger, #b03030);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
}

.fd-pricing-undo-error {
    color: var(--danger, #b03030);
    font-size: 12px;
    margin-left: 8px;
}

/* ── Audit log panel ─────────────────────────────────────────────────────── */
.fd-pricing-audit {
    margin-top: 6px;
    background: var(--surface-card, #ffffff);
    border: 1px solid var(--rule, rgba(26, 24, 21, 0.08));
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 150ms ease;
}

.fd-pricing-audit[open] {
    border-color: rgba(26, 24, 21, 0.12);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.fd-pricing-audit__summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    background: var(--surface-card, #ffffff);
    transition: background 150ms ease;
}

.fd-pricing-audit__summary::-webkit-details-marker { display: none; }

.fd-pricing-audit__summary:hover {
    background: rgba(196, 149, 16, 0.04);
}

.fd-pricing-audit__summary-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
}

.fd-pricing-audit__title {
    font-family: var(--font-display, "Space Grotesk", system-ui, sans-serif);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink, #1a1815);
    line-height: 1.3;
}

.fd-pricing-audit__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--surface-inset, #edeae3);
    color: var(--ink-3, #6b6458);
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.fd-pricing-audit[open] .fd-pricing-section__chevron {
    transform: rotate(180deg);
}

.fd-pricing-audit__body {
    padding: 6px 18px 16px;
    border-top: 1px solid var(--rule, rgba(26, 24, 21, 0.08));
}

.fd-pricing-audit__empty {
    margin: 14px 0 4px;
    padding: 16px;
    background: var(--surface-inset, #edeae3);
    border: 1px dashed rgba(26, 24, 21, 0.15);
    border-radius: 8px;
    color: var(--ink-3, #6b6458);
    font-size: 12.5px;
    line-height: 1.55;
    text-align: center;
}

.fd-pricing-audit__list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fd-pricing-audit__entry {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--rule, rgba(26, 24, 21, 0.07));
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--ink-2, #3d3a34);
}

.fd-pricing-audit__entry:last-child {
    border-bottom: none;
}

.fd-pricing-audit__entry-main {
    flex: 1 1 auto;
    min-width: 0;
}

.fd-pricing-audit__actor {
    color: var(--ink, #1a1815);
    font-weight: 600;
}

.fd-pricing-audit__entry-label {
    color: var(--ink, #1a1815);
    font-weight: 600;
}

.fd-pricing-audit__from {
    color: var(--ink-3, #6b6458);
    font-weight: 500;
    text-decoration: line-through;
    text-decoration-color: rgba(26, 24, 21, 0.3);
}

.fd-pricing-audit__to {
    color: var(--accent, #c49510);
    font-weight: 700;
}

.fd-pricing-audit__entry-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.fd-pricing-audit__time {
    color: var(--ink-4, #9a9188);
    font-size: 11.5px;
    white-space: nowrap;
}

.fd-pricing-audit__undo-btn {
    height: 26px;
    padding: 0 10px;
    border: 1px solid rgba(26, 24, 21, 0.14);
    border-radius: 6px;
    background: var(--surface-card, #ffffff);
    color: var(--ink-2, #3d3a34);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.fd-pricing-audit__undo-btn:hover,
.fd-pricing-audit__undo-btn:focus-visible {
    border-color: var(--accent, #c49510);
    background: rgba(196, 149, 16, 0.08);
    color: var(--ink, #1a1815);
    outline: none;
}

.fd-pricing-audit__badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(26, 24, 21, 0.06);
    color: var(--ink-3, #6b6458);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.fd-pricing-audit__badge--info {
    background: rgba(37, 99, 168, 0.1);
    color: var(--info, #2563a8);
}

/* Undone entries: lighter, struck through for clarity */
.fd-pricing-audit__entry--undone .fd-pricing-audit__entry-main,
.fd-pricing-audit__entry--undone .fd-pricing-audit__time {
    opacity: 0.6;
}

.fd-pricing-audit__entry--undone .fd-pricing-audit__entry-label {
    text-decoration: line-through;
    text-decoration-color: rgba(26, 24, 21, 0.35);
}

/* Dark mode */
html[data-theme="dark"] .fd-pricing-item--editable:hover,
html[data-theme="dark"] .fd-pricing-item--editable:focus,
html[data-theme="dark"] .fd-pricing-item--editable:focus-visible {
    background: rgba(227, 176, 8, 0.08);
}

html[data-theme="dark"] .fd-pricing-item__pencil {
    color: rgba(203, 213, 225, 0.55);
}

html[data-theme="dark"] .fd-pricing-item--editable:hover .fd-pricing-item__pencil,
html[data-theme="dark"] .fd-pricing-item--editing .fd-pricing-item__pencil {
    color: #e3b008;
}

html[data-theme="dark"] .fd-pricing-item--editing {
    background: rgba(227, 176, 8, 0.14);
}

html[data-theme="dark"] .fd-pricing-item__edit-input {
    background: rgba(2, 6, 23, 0.55);
    border-color: #e3b008;
    color: rgba(248, 250, 252, 0.96);
    box-shadow: 0 0 0 3px rgba(227, 176, 8, 0.22);
}

html[data-theme="dark"] .fd-pricing-item--saved {
    background: rgba(58, 158, 95, 0.18);
}

html[data-theme="dark"] .fd-pricing-item--error {
    background: rgba(248, 113, 113, 0.18);
}

html[data-theme="dark"] .fd-pricing-item__inline-error {
    color: #f87171;
}

html[data-theme="dark"] .fd-pricing-audit {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .fd-pricing-audit__summary {
    background: rgba(15, 23, 42, 0.55);
}

html[data-theme="dark"] .fd-pricing-audit__summary:hover {
    background: rgba(227, 176, 8, 0.08);
}

html[data-theme="dark"] .fd-pricing-audit__title {
    color: rgba(248, 250, 252, 0.96);
}

html[data-theme="dark"] .fd-pricing-audit__count {
    background: rgba(2, 6, 23, 0.55);
    color: rgba(203, 213, 225, 0.85);
}

html[data-theme="dark"] .fd-pricing-audit__body {
    border-top-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .fd-pricing-audit__empty {
    background: rgba(2, 6, 23, 0.42);
    border-color: rgba(148, 163, 184, 0.28);
    color: rgba(203, 213, 225, 0.85);
}

html[data-theme="dark"] .fd-pricing-audit__entry {
    color: rgba(226, 232, 240, 0.86);
    border-bottom-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .fd-pricing-audit__actor,
html[data-theme="dark"] .fd-pricing-audit__entry-label {
    color: rgba(248, 250, 252, 0.96);
}

html[data-theme="dark"] .fd-pricing-audit__from {
    color: rgba(203, 213, 225, 0.65);
    text-decoration-color: rgba(203, 213, 225, 0.4);
}

html[data-theme="dark"] .fd-pricing-audit__to {
    color: #f4d98b;
}

html[data-theme="dark"] .fd-pricing-audit__time {
    color: rgba(203, 213, 225, 0.55);
}

html[data-theme="dark"] .fd-pricing-audit__undo-btn {
    background: rgba(2, 6, 23, 0.42);
    border-color: rgba(148, 163, 184, 0.28);
    color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] .fd-pricing-audit__undo-btn:hover,
html[data-theme="dark"] .fd-pricing-audit__undo-btn:focus-visible {
    border-color: #e3b008;
    background: rgba(227, 176, 8, 0.12);
    color: rgba(248, 250, 252, 0.96);
}

html[data-theme="dark"] .fd-pricing-audit__badge {
    background: rgba(148, 163, 184, 0.18);
    color: rgba(203, 213, 225, 0.85);
}

html[data-theme="dark"] .fd-pricing-audit__badge--info {
    background: rgba(96, 176, 224, 0.18);
    color: #93c5fd;
}

@media (max-width: 900px) {
    .fd-pricing-item__pencil { opacity: 0.5; }
    .fd-pricing-item__edit-input {
        width: 110px;
        /* font-size + min-height owned by canonical .modal--sheet input rule in style.css:4899 */
    }
    .fd-pricing-audit__entry {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .fd-pricing-audit__entry-meta {
        justify-content: space-between;
    }
}

/* ============================================================================
   JS-created element styles — replaces previous inline style assignments
   that were blocked by CSP (style-src with nonce excludes 'unsafe-inline').
   ============================================================================ */
.fd-print-iframe {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 0;
    height: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.fd-offscreen-clipboard {
    position: absolute;
    left: -9999px;
}

.fd-pricing-audit__undo-error {
    color: var(--danger, #b03030);
    font-size: 12px;
    margin-left: 8px;
}

/* ============================================================================
   MOBILE REBUILD — fire-doors builder page (≤900px only)
   ----------------------------------------------------------------------------
   Desktop layout (3-column .fd-shell grid) is untouched. On mobile the page
   is rebuilt around a single-scroll body plus a fixed bottom action bar that
   houses the "Open quote builder" launcher and the "Next →" button together.

   Fixes vs. previous mobile state:
   - Phase tracks cards removed (step strip + side-tabs already show position)
   - Inner pane scroll removed (page is the single scroll owner)
   - Sticky "Next →" moved out of the options pane into a fixed bottom-right
     half of the action bar, ABOVE the FAB z-index tier so it's always visible
   - "Open quote builder" relocated from floating pill to the bottom-left half
     of the same action bar, sharing one flat integrated strip
   - "Need help?" support FAB suppressed on this page on mobile (it collided
     with the action bar and isn't contextually useful mid-flow)
   ============================================================================ */
@media (max-width: 900px) {
    /* ---- Full-bleed + kill grid: use normal block flow so padding on
           descendants actually grows the page and creates scroll room.
           The desktop 3-column grid with minmax(0, 1fr) row caps the
           options-pane height — padding inside never extends the page. -- */
    .fire-doors-page .fd-shell {
        display: block;
        margin-inline: -16px;
        grid-template-columns: none;
        grid-template-rows: none;
        min-height: 0;
    }

    /* ---- Phase tracks: hide entirely ------------------------------------ */
    .fire-doors-page .fd-phase-tracks {
        display: none;
    }
    .fire-doors-page .fd-phase-header {
        padding: 0;
        border-bottom: none;
    }

    /* ---- Side tabs: hide entirely (step strip already shows position;
           sub-section navigation happens via Next button). --------------- */
    .fire-doors-page .fd-side-tabs {
        display: none;
    }

    /* ---- Step strip: sole flow-progress indicator, tight ---------------- */
    .fire-doors-page .fd-step-strip-shell {
        padding: 8px 14px;
        border-bottom: 1px solid var(--rule, rgba(26, 24, 21, 0.08));
    }
    .fire-doors-page .fd-step-strip {
        gap: 4px;
    }
    .fire-doors-page .fd-step-strip__item {
        padding: 7px 10px;
        font-size: 11.5px;
        min-height: 36px;
    }

    /* ---- Single scroll owner: kill inner pane scroll -------------------- */
    .fire-doors-page .fd-options-pane {
        min-height: 0;
        background: transparent;
        overflow: visible;
    }
    /* Put the clearance padding on the flowing content element — not on
       .fire-doors-page (which is a fixed-height flex child, padding there
       just shrinks the inner area instead of adding scroll room). */
    .fire-doors-page .fd-options-pane > .fd-phase-panel {
        overflow-y: visible;
        overflow-x: visible;
        min-height: 0;
        padding-top: 14px;
        padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
        scrollbar-width: auto;
    }

    /* ---- Full-width fixed footer bar. Mirrors the canonical
           .set-modal__footer mobile pattern (settings-shell.css ~L6904):
           2-col grid, 8px gap, both buttons min-height 44px with standard
           .btn treatment. ------------------------------------------------ */
    .fire-doors-page .fd-options-pane__footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1320;
        margin: 0;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        background: var(--surface-card, #ffffff);
        border-top: 1px solid var(--rule, rgba(26, 24, 21, 0.12));
        box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.06);
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        align-items: center;
    }
    .fire-doors-page .fd-options-pane__footer-note {
        display: none;
    }
    /* Next button fills right column — standard .btn-primary, 44px, 7px radius */
    .fire-doors-page .fd-options-next {
        grid-column: 2;
        width: 100%;
        min-height: 44px;
        justify-content: center;
        font-size: 13px;
        font-weight: 600;
        padding: 10px 14px;
    }

    /* ---- Launcher: positioned fixed overlay filling the bar's left
           column. Styled as a .btn-secondary equivalent so it matches the
           Next button (same 44px, same 7px radius, same font, same
           padding). --------------------------------------------------- */
    .fire-doors-page .fd-mobile-workspace-launch {
        position: fixed;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        left: 16px;
        right: calc(50% + 4px); /* 4px = half of 8px grid gap */
        width: auto;
        max-width: none;
        margin: 0;
        padding: 10px 14px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        flex-direction: row;
        border: 1px solid var(--rule-strong, rgba(26, 24, 21, 0.14));
        border-radius: 7px;
        background: var(--surface-card, #ffffff);
        color: var(--ink, #1a1815);
        font-size: 13px;
        font-weight: 500;
        box-shadow: none;
        z-index: 1321;
        text-align: center;
    }
    .fire-doors-page .fd-mobile-workspace-launch:focus-visible {
        outline: 2px solid var(--accent, #c49510);
        outline-offset: 2px;
        box-shadow: none;
    }
    .fire-doors-page .fd-mobile-workspace-launch__title {
        font-size: 13px;
        font-weight: 500;
        line-height: 1.25;
        color: inherit;
        letter-spacing: 0;
    }
    /* Hide live-meta so launcher matches Next's single-line height */
    .fire-doors-page .fd-mobile-workspace-launch__meta {
        display: none;
    }

    /* Page padding-bottom on .fire-doors-page doesn't work (flex-sized
       child — padding shrinks inner area, doesn't extend scroll). The
       real clearance is set on .fd-options-pane > .fd-phase-panel above. */

    /* When drawer opens, hide the whole bar together */
    body.fd-mobile-workspace-open .fire-doors-page .fd-options-pane__footer {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.15s ease, visibility 0.15s ease;
    }

    /* Phase 2: footer is display:none (desktop rule — phase-2 form has
       its own per-step buttons). Stretch launcher to fill the whole bar. */
    .fire-doors-page:has(.fd-shell--phase-2) .fd-mobile-workspace-launch {
        right: 16px;
    }

    /* Suppress "Need help?" support FAB on this page on mobile — it
       collided with the launcher (both bottom-anchored). */
    .tenant-app-shell:has(.fire-doors-page) .support-fab {
        display: none !important;
    }

    /* Dark mode */
    html[data-theme="dark"] .fire-doors-page .fd-options-pane__footer {
        background: rgba(15, 23, 42, 0.98);
        border-top-color: rgba(148, 163, 184, 0.24);
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.45);
    }
    html[data-theme="dark"] .fire-doors-page .fd-mobile-workspace-launch {
        background: rgba(15, 23, 42, 0.98);
        border-color: rgba(148, 163, 184, 0.32);
        color: rgba(226, 232, 240, 0.92);
    }
    html[data-theme="dark"] .fire-doors-page .fd-mobile-workspace-launch__title {
        color: rgba(226, 232, 240, 0.92);
    }
}
