body.quote-page {
  background: var(--background-muted);
  color: var(--text-primary);
}

@media (min-width: 640px) {
  body.quote-page #main-content {
    display: flex;
    justify-content: center;
  }
}

.quote-shell {
  width: 100%;
  max-width: 520px;
  padding: 16px 16px 0px;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quote-branding {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.quote-brand {
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;
  color: var(--brand-primary);
  text-transform: uppercase;
  font-size: 12px;
}

.quote-tag {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(27, 53, 44, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
}

.quote-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  min-height: 520px;
  padding: 16px 16px 20px;
  box-sizing: border-box;
  flex: 1;
  min-height: 0;
  z-index: 1;
}

.quote-frame::before,
.quote-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-light);
  z-index: 0;
}

.quote-frame::before {
  transform: translateY(14px) scale(0.985);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
  opacity: 0.6;
}

.quote-frame::after {
  transform: translateY(8px) scale(0.992);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  opacity: 0.75;
}

.quote-step {
  position: absolute;
  inset: 0;
  padding: 20px 20px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 24px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.1);
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: transform 320ms ease, opacity 200ms ease, box-shadow 200ms ease;
  z-index: 2;
  height: 100%;
  overflow: hidden;
}

.quote-step.is-active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.quote-step.is-under {
  transform: translateY(8px) scale(0.985);
  opacity: 1;
  pointer-events: none;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.07);
}

.quote-step.is-exiting {
  transform: translateX(-115%) rotate(-2deg);
  opacity: 0.97;
  pointer-events: none;
}

.quote-step.is-exiting-reverse {
  transform: translateX(115%) rotate(2deg);
  opacity: 0.97;
  pointer-events: none;
}

.quote-topline {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 4px;
  font-size: 13px;
  color: var(--text-muted);
  user-select: none;
}

.quote-step h1 {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: var(--font-weight-semibold);
  text-align: center;
  letter-spacing: -0.2px;
}

.quote-helper {
  margin-top: -6px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.quote-options {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.quote-option {
  appearance: none;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, border-color 180ms ease, transform 120ms ease;
}

.quote-option:active {
  transform: scale(0.99);
}

.quote-option.is-selected {
  border-color: var(--brand-primary);
  background: rgba(27, 53, 44, 0.08);
}

.quote-label {
  font-size: 16px;
  font-weight: var(--font-weight-medium);
  line-height: 1.2;
}

.quote-pill {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid #cfcfcf;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #fff;
  transition: border-color 180ms ease, background 180ms ease;
}

.quote-pill::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: transparent;
  transform: scale(0.6);
  transition: background 180ms ease, transform 180ms ease;
}

.quote-option.is-selected .quote-pill {
  border-color: var(--brand-primary);
  background: #fff;
}

.quote-option.is-selected .quote-pill::after {
  background: var(--brand-primary);
  transform: scale(1);
}

.quote-spacer {
  display: none;
}

.quote-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  margin-top: auto;
}

.quote-btn {
  width: 100%;
  border: 0;
  padding: 16px;
  border-radius: 14px;
  font-weight: var(--font-weight-semibold);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: transform 120ms ease, opacity 120ms ease;
}

body.quote-page .quote-btn {
  display: flex;
}

.quote-btn:active {
  transform: scale(0.99);
}

.quote-btn-primary {
  background: var(--brand-primary);
  color: #fff;
}

.quote-btn-secondary {
  background: transparent;
  box-shadow: none;
  color: #444;
  font-weight: var(--font-weight-semibold);
  padding: 10px 16px;
}

.quote-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.quote-field {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quote-field-label {
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.quote-input,
.quote-select {
  width: 100%;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 16px;
  font-family: var(--font-family-primary);
  outline: none;
  background: #fff;
}

.quote-input:focus,
.quote-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(27, 53, 44, 0.12);
}

.quote-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.quote-checkbox {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.quote-checkbox input {
  appearance: none;
  width: 50px;
  height: 50px;
  border: 2px solid rgba(27, 53, 44, 0.25);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.quote-checkbox input::after {
  content: '';
  width: 18px;
  height: 10px;
  border-left: 3px solid transparent;
  border-bottom: 3px solid transparent;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%) rotate(-45deg);
  opacity: 0;
}

.quote-checkbox input:checked {
  background: var(--primary-colour);
  border-color: var(--primary-colour);
  box-shadow: 0 10px 20px rgba(27, 53, 44, 0.2);
}

.quote-checkbox input:checked::after {
  border-color: #fff;
  opacity: 1;
}

.quote-checkbox label {
  cursor: pointer;
}

.quote-checkbox a {
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.quote-checkboxes {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.quote-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 15, 0.55);
  z-index: 60;
  padding: 20px;
}

.quote-modal.show {
  display: flex;
}

.quote-modal .modal-overlay {
  position: absolute;
  inset: 0;
}

.quote-modal .modal-content {
  position: relative;
  z-index: 1;
  width: min(760px, 92vw);
  max-height: 82vh;
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.quote-modal_header h2 {
  margin: 0;
  font-size: 20px;
}

.quote-modal_body {
  overflow-y: auto;
  padding-right: 10px;
  color: var(--text-primary);
  line-height: var(--line-height-relaxed);
}

.quote-modal_body h1 {
  font-size: 22px;
  margin-top: 0;
}

.quote-modal_actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
}

.quote-feedback {
  min-height: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--error-colour);
}

.quote-success {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #f7f7f7;
  z-index: 5;
  pointer-events: auto;
}

.quote-success[hidden] {
  display: none;
}

.quote-success-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  width: min(720px, 100%);
  max-height: 82vh;
  overflow-y: auto;
}

.quote-success-card h1 {
  font-size: 22px;
  margin-bottom: 10px;
}

.quote-footnote {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: auto;
  padding: 8px 8px 0;
}

.quote-safe {
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.quote-option:focus-visible,
.quote-btn:focus-visible,
.quote-input:focus-visible,
.quote-select:focus-visible {
  outline: 2px solid rgba(27, 53, 44, 0.4);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .quote-step,
  .quote-option,
  .quote-btn {
    transition: none;
  }
}

@media (min-width: 768px) {
  .quote-step h1 {
    font-size: 22px;
  }
}
