/* ==========================================================================
   Pulsar IT — Quote builder
   Loaded only on quote.html. Uses the tokens defined in style.css.
   ========================================================================== */

.qb-section { padding: clamp(40px, 5vw, 64px) 0 clamp(72px, 8vw, 112px); }

.qb-loading,
.qb-load-error { padding: 32px; text-align: center; color: var(--muted); }

/* Stepper ---------------------------------------------------------------- */
.qb-steps {
  position: relative;
  z-index: 1;
  margin-top: calc(-1 * clamp(64px, 6vw, 88px));
  margin-bottom: 40px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(11, 22, 48, .08);
}
.qb-steps ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.qb-step {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: 500 15px/1.3 var(--font);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.qb-step:hover:not([disabled]) { background: var(--surface-alt); color: var(--ink); }
.qb-step[disabled] { cursor: not-allowed; opacity: .55; }
.qb-step__num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  background: #fff;
}
.qb-step.is-complete .qb-step__num { border-color: var(--blue-600); color: var(--blue-600); }
.qb-step.is-current { background: var(--blue-50); color: var(--ink); font-weight: 600; }
.qb-step.is-current .qb-step__num { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }

/* Layout ----------------------------------------------------------------- */
.qb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}
.qb-main { min-width: 0; }

.qb-stage__head { margin-bottom: 28px; }
.qb-stage__eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 10px;
}
.qb-stage__title {
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.qb-stage__title:focus { outline: none; }
.qb-stage__lead { margin-top: 12px; font-size: 17px; color: var(--muted); max-width: 680px; }

.qb-card {
  padding: clamp(24px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.qb-card + .qb-card { margin-top: 24px; }
.qb-card__title { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.qb-card__intro { font-size: 15px; color: var(--muted); margin-bottom: 22px; }

.qb-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.qb-nav .btn--back { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.qb-nav .btn--back:hover { border-color: var(--ink); }
.qb-nav__spacer { flex: 1; }

/* Fields ----------------------------------------------------------------- */
.qb-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.qb-field label, .qb-field legend { font-size: 15px; font-weight: 600; color: var(--ink); }
.qb-field--full { grid-column: 1 / -1; }
fieldset.qb-field { border: 0; padding: 0; margin: 0; }
.qb-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }

.qb-estate {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 20px;
}
.qb-counter {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: stretch;
  max-width: 220px;
}
.qb-counter .input {
  border-radius: 0;
  text-align: center;
  font-weight: 600;
  -moz-appearance: textfield;
}
.qb-counter .input::-webkit-outer-spin-button,
.qb-counter .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qb-counter__btn {
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--surface-alt);
  color: var(--ink);
  cursor: pointer;
}
.qb-counter__btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: 0; }
.qb-counter__btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: 0; }
.qb-counter__btn:hover { background: var(--blue-50); color: var(--blue-600); }
.qb-counter__btn svg { width: 18px; height: 18px; }

.qb-error {
  margin-top: 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--danger);
}
.qb-form-alert { margin-bottom: 20px; }

/* Plans ------------------------------------------------------------------ */
.qb-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.qb-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 20px 20px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.qb-plan:hover { border-color: #b9cbef; }
.qb-plan.is-selected { border: 2px solid var(--blue-600); box-shadow: 0 14px 34px rgba(22, 99, 255, .12); }
.qb-plan__badge {
  position: absolute;
  top: -13px; left: 20px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--navy-950);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}
/* R6.2: Advanced IT & Security is the recommended flagship plan */
.qb-plan--recommended {
  border-color: rgba(22, 99, 255, .55);
  background:
    linear-gradient(180deg, rgba(22, 99, 255, .06), rgba(22, 99, 255, 0) 40%),
    var(--surface);
}
/* The badge may wrap to two lines on narrow cards: give the flagship card room so it never covers the name */
.qb-plan--recommended { padding-top: 42px; }
.qb-plan--recommended .qb-plan__badge {
  max-width: calc(100% - 32px);
  line-height: 1.3;
  padding: 4px 12px;
  background: var(--blue-600);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  box-shadow: 0 6px 14px rgba(22, 99, 255, .28);
}
.qb-plan__head { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; }
.qb-plan__head input,
.qb-plan-none input,
.qb-level input[type="radio"] {
  flex-shrink: 0;
  width: 20px; height: 20px;
  margin: 3px 0 0;
  accent-color: var(--blue-600);
  cursor: pointer;
}
.qb-plan__name { font-size: 16.5px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; cursor: pointer; }
.qb-plan__price { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.qb-plan__price strong { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); margin-right: 2px; }
.qb-plan__baseline { margin-top: 6px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.qb-plan__desc { margin-top: 12px; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.qb-plan__list-title { margin-top: 16px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.qb-plan__list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.qb-plan__list li { display: flex; gap: 8px; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }
.qb-plan__list svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; color: var(--blue-600); }
.qb-plan__list--no li { color: var(--muted); }
.qb-plan__list--no svg { color: #9aa3b5; }
.qb-plan__calc {
  margin-top: auto;
  padding-top: 18px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-bottom: 0;
}
.qb-plan__more { margin: 14px 0 18px; }
.qb-plan__more summary {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}
.qb-plan__more summary::-webkit-details-marker { display: none; }
.qb-plan__more summary::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .15s ease;
}
.qb-plan__more[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.qb-plan__more summary:hover,
.qb-plan__more summary:focus-visible { color: var(--blue-600); }

.qb-plan-none {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 18px 22px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}
.qb-plan-none.is-selected { border: 2px solid var(--blue-600); border-style: solid; }
.qb-plan-none label { display: flex; flex-direction: column; gap: 2px; font-size: 15px; cursor: pointer; }
.qb-plan-none label span { color: var(--muted); font-size: 14px; }

.qb-callout {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.qb-callout svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--blue-600); margin-top: 1px; }

.qb-compare {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.qb-compare summary {
  padding: 16px 22px;
  font-weight: 600;
  font-size: 15px;
  color: var(--blue-600);
  cursor: pointer;
}
.qb-compare__scroll { overflow-x: auto; padding: 0 22px 18px; }
.qb-compare table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; }
.qb-compare th, .qb-compare td { padding: 11px 10px; border-top: 1px solid var(--line); text-align: center; }
.qb-compare thead th { border-top: 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.qb-compare th[scope="row"] { text-align: left; font-weight: 500; color: var(--ink-soft); }
.qb-compare td svg { width: 18px; height: 18px; margin: 0 auto; color: var(--blue-600); }
.qb-compare td.is-add { color: var(--muted); font-size: 13px; }
.qb-compare__note { display: block; margin-top: 4px; font-size: 12px; line-height: 1.35; color: var(--ink-soft); }
.qb-compare td.is-no { color: #9aa3b5; }
.qb-compare__price td { font-weight: 700; color: var(--ink); }

/* Groups & service cards -------------------------------------------------- */
.qb-group + .qb-group { margin-top: 40px; }
.qb-group__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.qb-service,
.qb-level {
  padding: 24px 26px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s ease;
}
.qb-service + .qb-service,
.qb-service + .qb-levels,
.qb-levels + .qb-service { margin-top: 14px; }
.qb-service.is-active,
.qb-level.is-selected { border-color: var(--blue-600); }
.qb-service.is-included { border-color: var(--blue-100); background: #fbfcff; }

.qb-service__head,
.qb-level__top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}
.qb-service__title h4,
.qb-level__body h4 { font-size: 17px; font-weight: 700; line-height: 1.35; }
.qb-service__title label,
.qb-level__body label { cursor: pointer; }
.qb-service__title p,
.qb-level__summary { display: block; margin-top: 3px; font-size: 15px; color: var(--muted); }
.qb-service__price { text-align: right; line-height: 1.3; }
.qb-service__price strong { display: block; font-size: 19px; font-weight: 800; color: var(--ink); }
.qb-service__price span { display: block; font-size: 12.5px; color: var(--muted); }
.qb-service__price .qb-tag { margin-top: 6px; }
.qb-service__poa { font-size: 15px !important; font-weight: 700 !important; color: var(--ink-soft) !important; }

.qb-service__body { margin: 14px 0 0 calc(44px + 16px); }
.qb-level .qb-service__body { margin-left: calc(20px + 16px); }
.qb-service__desc { font-size: 15px; color: var(--ink-soft); line-height: 1.6; }
.qb-service__benefits { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.qb-service__benefits li { display: flex; gap: 8px; font-size: 14px; color: var(--ink-soft); }
.qb-service__benefits svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; color: var(--blue-600); }
.qb-service__more { margin-top: 10px; font-size: 14px; }
.qb-service__more summary { cursor: pointer; font-weight: 600; color: var(--blue-600); width: max-content; }
.qb-service__more ul { margin: 8px 0 0; padding-left: 20px; color: var(--ink-soft); display: grid; gap: 4px; }

.qb-service__controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  margin: 18px 0 0 calc(44px + 16px);
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}
.qb-service__status {
  margin: 16px 0 0 calc(44px + 16px);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  background: var(--surface-alt);
  color: var(--ink-soft);
}
.qb-level .qb-service__status { margin-left: calc(20px + 16px); }
.qb-service__status.is-charged { background: var(--blue-50); color: var(--ink); }
.qb-service__status.is-included { background: #e9f7ef; color: #14532d; }
.qb-service__status.is-poa,
.qb-service__status.is-scoped { background: var(--warn-bg); color: var(--warn-ink); }

/* Toggle switch */
.qb-switch { position: relative; display: inline-flex; width: 44px; height: 26px; margin-top: 1px; }
.qb-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.qb-switch input:disabled { cursor: not-allowed; }
.qb-switch__ui {
  position: relative;
  width: 44px; height: 26px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background-color .15s ease;
}
.qb-switch__ui::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .15s ease;
}
.qb-switch input:checked + .qb-switch__ui { background: var(--blue-600); }
.qb-switch input:checked + .qb-switch__ui::after { transform: translateX(18px); }
.qb-switch input:disabled:checked + .qb-switch__ui { background: #7fa6f5; }
.qb-switch input:focus-visible + .qb-switch__ui { outline: 2px solid var(--blue-400); outline-offset: 3px; }

/* Level groups (alternative tiers) */
.qb-levels { border: 0; margin: 0; padding: 0; min-width: 0; }
.qb-levels legend { font-size: 17px; font-weight: 700; padding: 0; margin-bottom: 4px; }
.qb-levels__intro { font-size: 15px; color: var(--muted); margin-bottom: 14px; }
.qb-level + .qb-level { margin-top: 12px; }
label.qb-level { display: flex; align-items: flex-start; gap: 16px; cursor: pointer; padding: 18px 26px; }
.qb-level__body { display: flex; flex-direction: column; gap: 2px; }
.qb-level__body .qb-tag { align-self: flex-start; margin-bottom: 6px; }

.qb-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .03em;
  background: var(--blue-50);
  color: var(--blue-600);
}
.qb-tag--prov { background: var(--warn-bg); color: var(--warn-ink); }
.qb-tag--optional { background: #e8f0ff; color: var(--blue-600); text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; }

/* R6.3: group intro, included price label, visible inclusions, included-with indicators */
.qb-group__intro { margin: -6px 0 14px; font-size: 15px; color: var(--ink-soft); max-width: 680px; }
.qb-service__price-slot { min-width: 0; }
.qb-service__price--included strong { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; font-size: 15px; color: #14532d; }
.qb-service__price--included svg { width: 16px; height: 16px; }
.qb-service__price--included span { max-width: 190px; margin-left: auto; }
/* R6.3: services already included in the selected plan (Advanced) — greyed out, locked, £0 */
.qb-service.is-muted { background: #f4f5f7; border-color: var(--line); }
.qb-service.is-muted .qb-service__title h4,
.qb-service.is-muted .qb-service__title label { color: #4b5466; cursor: default; }
.qb-service.is-muted .qb-service__title p,
.qb-service.is-muted .qb-service__desc,
.qb-service.is-muted .qb-service__more ul { color: #5d6678; }
.qb-service.is-muted .qb-switch { opacity: .55; }
.qb-service__price--muted strong { color: #14532d; font-size: 14.5px; white-space: nowrap; }
.qb-service__status.is-plan-included { background: #eaf6ee; color: #14532d; }
.qb-included-msg { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
.qb-included-msg svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; color: #16a34a; }
.qb-included-scope { display: block; margin: 4px 0 0 26px; font-size: 13px; font-weight: 400; color: #3f5a49; }
.qb-entitlement { display: block; margin: 6px 0 0 26px; }
.qb-entitlement__line { display: block; font-size: 14px; font-weight: 600; color: #1f4a30; }
.qb-entitlement__line--poa { font-weight: 600; color: #7a4b00; }
.qb-service__included { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-alt); }
.qb-service.is-active .qb-service__included { border-color: var(--blue-100); background: var(--blue-50); }
.qb-service__included-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.qb-service__included ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.qb-service__included li { display: flex; gap: 8px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.qb-service__included svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; color: var(--blue-600); }
.qb-indicators { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.qb-indicator { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); font-size: 14px; line-height: 1.5; color: var(--muted); }
.qb-indicator__mark { flex-shrink: 0; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid var(--line-strong); border-radius: 50%; color: transparent; }
.qb-indicator__mark svg { width: 13px; height: 13px; }
.qb-indicator strong { color: var(--ink); }
.qb-indicator__text { display: block; margin-top: 2px; }
.qb-indicator.is-on { border-style: solid; border-color: #b7e2c8; background: #e9f7ef; color: #14532d; }
.qb-indicator.is-on .qb-indicator__mark { border-color: #16a34a; background: #16a34a; color: #fff; }
.qb-indicator.is-on .qb-indicator__state { font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: 12.5px; }
.qb-indicator--optional.is-on { border-color: var(--blue-100); background: var(--blue-50); color: var(--ink-soft); }
.qb-indicator--optional.is-on .qb-indicator__mark { border-color: var(--blue-600); background: var(--blue-600); }
@media (max-width: 700px) {
  .qb-service__price-slot { grid-column: 2; }
  .qb-service__price-slot .qb-service__price { text-align: left; }
  .qb-service__included ul { grid-template-columns: 1fr; }
  .qb-service__price-slot .qb-service__price--included strong { display: inline-flex; justify-content: flex-start; }
  .qb-service__price--included span { margin-left: 0; }
}

/* Live estimate ------------------------------------------------------------ */
.qb-sidebar { position: sticky; top: calc(var(--nav-h) + 24px); }
.qb-estimate {
  padding: 28px 26px;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(22, 99, 255, .28), transparent 70%),
    var(--navy-950);
  box-shadow: 0 20px 40px rgba(2, 8, 23, .18);
}
.qb-estimate__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-400); }
.qb-estimate__title { margin-top: 6px; font-size: 20px; font-weight: 700; }
.qb-estimate__empty { margin-top: 16px; font-size: 14px; color: var(--on-dark-muted); }
.qb-estimate__lines {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 9px;
  max-height: 260px;
  overflow-y: auto;
}
.qb-estimate__lines li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: #dbe3f3; }
.qb-estimate__lines li span:last-child { flex-shrink: 0; font-weight: 600; color: #fff; }
.qb-estimate__lines li.is-poa span:last-child,
.qb-estimate__lines li.is-scoped span:last-child { font-weight: 500; color: #f5c97a; font-size: 13px; }
.qb-estimate__totals { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--on-dark-line); display: grid; gap: 8px; }
.qb-estimate__totals div { display: flex; justify-content: space-between; font-size: 14px; }
.qb-estimate__totals dt { color: var(--on-dark-muted); }
.qb-estimate__totals dd { margin: 0; font-weight: 600; }
.qb-estimate__big {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--on-dark-line);
}
.qb-estimate__big span { font-size: 14px; color: var(--on-dark-muted); display: flex; flex-direction: column; }
.qb-estimate__big small { font-size: 12px; }
.qb-estimate__big strong { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.qb-estimate__vat { margin-top: 4px; text-align: right; font-size: 13px; color: var(--on-dark-muted); }
.qb-estimate__note { margin-top: 16px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(245, 201, 122, .1); font-size: 13px; color: #f5c97a; }
.qb-estimate__small { margin-top: 14px; font-size: 12.5px; color: var(--on-dark-muted); }

.qb-mobilebar { display: none; }

/* Summary (stage 5) -------------------------------------------------------- */
.qb-summary__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.qb-summary__label { display: block; font-size: 13px; color: var(--muted); }
.qb-summary__meta strong { font-size: 17px; }
.qb-summary__parties {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 40px;
  margin-top: 24px;
}
.qb-summary__parties h3,
.qb-summary__tbc h3,
.qb-summary__terms h3 { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-600); margin-bottom: 12px; }
.qb-summary__parties dl { margin: 0; display: grid; gap: 6px; }
.qb-summary__parties dl div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; font-size: 15px; }
.qb-summary__parties dt { color: var(--muted); }
.qb-summary__parties dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.qb-table-wrap { margin-top: 32px; }
.qb-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.qb-table thead th {
  padding: 12px 14px;
  background: var(--navy-950);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: left;
}
.qb-table thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.qb-table thead th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.qb-table .num { text-align: right; white-space: nowrap; }
.qb-table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.qb-table__section th {
  padding: 10px 14px;
  background: var(--surface-alt);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: left;
}
.qb-table__note { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.qb-table__amount { font-weight: 700; }
.qb-table tr.is-included .qb-table__amount { color: var(--blue-600); font-weight: 600; }
.qb-table tr.is-poa .qb-table__amount,
.qb-table tr.is-scoped .qb-table__amount { color: var(--warn-ink); font-weight: 600; }
.qb-summary__empty { margin-top: 16px; color: var(--muted); }

.qb-summary__totals { display: flex; justify-content: flex-end; margin-top: 24px; }
.qb-summary__totals dl {
  width: min(100%, 420px);
  margin: 0;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--surface-alt);
  display: grid;
  gap: 8px;
}
.qb-summary__totals dl div { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.qb-summary__totals dt { color: var(--ink-soft); }
.qb-summary__totals dd { margin: 0; font-weight: 600; }
.qb-summary__totals .is-strong { padding-top: 8px; border-top: 1px solid var(--line); font-size: 16px; }
.qb-summary__totals .is-strong dt { color: var(--ink); font-weight: 700; }
.qb-summary__totals .is-strong dd { font-weight: 800; }

.qb-summary__tbc { margin-top: 28px; padding: 20px 24px; border-radius: var(--radius); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.qb-summary__tbc h3 { color: var(--warn-ink); }
.qb-summary__tbc ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; color: var(--warn-ink); }
.qb-summary__terms { margin-top: 28px; }
.qb-summary__terms ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 14.5px; color: var(--ink-soft); }

.qb-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 24px;
  margin-top: 24px;
}
.qb-actions .qb-card + .qb-card { margin-top: 0; }
.qb-download-status { margin-top: 12px; font-size: 14px; color: var(--muted); min-height: 1.4em; }
.qb-send .form-footer { margin-top: 20px; }
.qb-send .check { align-items: flex-start; }
.qb-send .check a { color: var(--blue-600); text-decoration: underline; }

/* Responsive --------------------------------------------------------------- */
/* R6.2: on wide screens the three plan cards share row tracks (subgrid), so names, prices, descriptions,
   feature lists and the per-quote line all start at the same height in every card. Browsers without
   subgrid keep the flex layout above. */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1241px) {
    .qb-plans { grid-template-rows: repeat(8, auto); row-gap: 0; }
    .qb-plan { display: grid; grid-row: span 8; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
    .qb-plan__calc { align-self: end; }
  }
}

@media (max-width: 1240px) {
  .qb-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
  .qb-plans { grid-template-columns: 1fr; gap: 22px; }
  .qb-plan { padding-top: 28px; }
  .qb-plan__head { min-height: 0; }
}

@media (max-width: 1100px) {
  .qb-layout { grid-template-columns: 1fr; }
  .qb-sidebar { position: static; }
  .qb-steps ol { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .qb-step { flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 6px; font-size: 13px; }
  .qb-actions { grid-template-columns: 1fr; }
  .qb-mobilebar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px var(--gutter);
    background: var(--navy-950);
    color: #fff;
    box-shadow: 0 -8px 24px rgba(2, 8, 23, .25);
  }
  .qb-mobilebar__total span { display: block; font-size: 12px; color: var(--on-dark-muted); }
  .qb-mobilebar__total strong { font-size: 20px; font-weight: 800; }
  .qb-mobilebar__total small { font-size: 12px; font-weight: 500; color: var(--on-dark-muted); margin-left: 4px; }
  .qb-section { padding-bottom: 120px; }
}

@media (max-width: 700px) {
  .qb-step__label { font-size: 11.5px; }
  .qb-step__num { width: 28px; height: 28px; font-size: 13px; }
  .qb-estate,
  .qb-service__controls,
  .qb-checks,
  .qb-summary__parties { grid-template-columns: 1fr; }
  .qb-service__head,
  .qb-level__top { grid-template-columns: auto minmax(0, 1fr); }
  .qb-service__price { grid-column: 2; text-align: left; }
  .qb-service__price strong { display: inline; margin-right: 6px; }
  .qb-service__price span { display: inline; }
  .qb-service__body,
  .qb-service__controls,
  .qb-service__status { margin-left: 0; }
  .qb-level .qb-service__body,
  .qb-level .qb-service__status { margin-left: 0; }
  .qb-service, .qb-level { padding: 20px; }
  .qb-summary__parties dl div { grid-template-columns: 130px minmax(0, 1fr); }
  .qb-nav .btn { flex: 1; }
  .qb-nav__spacer { display: none; }

  /* Breakdown table becomes stacked rows */
  .qb-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .qb-table, .qb-table tbody, .qb-table tr, .qb-table td, .qb-table th { display: block; width: 100%; }
  .qb-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .qb-table td { padding: 3px 0; border: 0; }
  .qb-table td.num { text-align: left; }
  .qb-table td[data-label]:not(:first-child) { display: flex; justify-content: space-between; font-size: 14px; }
  .qb-table td[data-label]:not(:first-child)::before { content: attr(data-label); color: var(--muted); font-weight: 500; }
  .qb-table__section th { border-radius: var(--radius-sm); }
}

.stack-sm { margin-top: 18px; }
.qb-mobilebar:empty { display: none !important; }
.qb-extras:not(:empty) { margin-top: 40px; }

/* Plan price: unit on its own line */
.qb-plan__price strong { display: block; margin-bottom: 2px; }

/* Phones: numbers only in the stepper (labels kept for screen readers) */
@media (max-width: 700px) {
  .qb-step { padding: 8px 4px; }
  .qb-step__label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
}

@media (max-width: 700px) {
  .qb-nav .btn { white-space: normal; height: auto; min-height: 52px; padding: 12px 16px; text-align: center; line-height: 1.3; }
  .qb-nav .btn--back { flex: 0 0 auto; }
}

@media (max-width: 400px) {
  .qb-actions .btn,
  .qb-send .btn { white-space: normal; height: auto; min-height: 52px; padding: 12px 16px; text-align: center; line-height: 1.3; width: 100%; }
  .qb-mobilebar .btn { padding: 0 14px; }
  .qb-mobilebar__total strong { font-size: 18px; }
  .qb-card { padding: 20px; }
}

/* R6: guidance under free-text scoping questions (e.g. not to include sign-in details) */
.qb-field__hint { margin: -2px 0 8px; font-size: 14px; line-height: 1.5; color: var(--warn-ink, #6b4400); }
