/* ============================================================================
   quick-calc.css — the three "cover your emissions" routes on the personal
   calculator page. Loaded only by that page; everything is namespaced .qc-*
   (.path-card already exists in cfp-2026.css and means something else).

   No colours are declared here. The page carries body.theme-vita, which remaps
   --green and friends to the warm orange, so this section inherits the accent
   and would follow any other theme unchanged. The recommended card is marked
   out by weight, lift and a ribbon rather than by hue, for the same reason.
   ========================================================================== */

.qc-paths { padding: 40px 40px 72px; position: relative; }

/* The section heading is for screen readers and heading order only; the three
   cards carry the message visually. No such utility exists in cfp-2026.css. */
.qc-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── The three cards ── */

.qc-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; align-items: stretch;
}

.qc-card {
  position: relative; background: #fff;
  border: 1px solid var(--border); border-radius: 20px;
  padding: 32px 26px 28px; display: flex; flex-direction: column; gap: 14px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.qc-card:hover { border-color: var(--light-green); box-shadow: 0 12px 40px color-mix(in srgb, var(--green) 14%, transparent); }

/* Highlight the recommended route without changing its size. */
.qc-card--rec {
  border: 2px solid var(--green);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 10%, transparent), 0 14px 34px -18px color-mix(in srgb, var(--green) 45%, transparent);
}
.qc-card--rec:hover {
  border-color: var(--green);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 10%, transparent), 0 18px 44px -18px color-mix(in srgb, var(--green) 55%, transparent);
}

.qc-ribbon {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #fff; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  padding: 5px 14px; border-radius: 50px;
}

.qc-icon {
  width: 52px; height: 52px; border-radius: 16px; background: var(--mint);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1.35rem; line-height: 1; color: var(--green);
}

.qc-badge {
  align-self: flex-start; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); background: var(--pale);
  border: 1px solid var(--border); border-radius: 50px; padding: 5px 12px;
}
.qc-card--rec .qc-badge { color: var(--green); background: var(--mint); border-color: transparent; }

.qc-card h3 {
  font-family: 'Cormorant Garamond', 'Cormorant Fallback', serif;
  font-size: 1.6rem; font-weight: 600; color: var(--dark); line-height: 1.15;
}
.qc-card > p { color: var(--muted); font-size: 0.9rem; line-height: 1.65; font-weight: 300; }

/* Pushes the stat block and CTA to the bottom so all three cards line up. */
.qc-spacer { flex: 1 1 auto; }
.qc-grid, .qc-trust, .qc-footnote { position: relative; z-index: 1; } /* above any .grid-bg::after layer */
.qc-stat-label { min-height: 2.9em; }

/* People stepper: "Cover [-] 1 [+] person" on the average card and the quick-calc result. */
.qc-people { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; font-size: 0.86rem; color: var(--text); margin: 2px 0 4px; }
.qc-people button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--dark); font-size: 1.15rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: border-color 0.2s, background 0.2s; }
.qc-people button:hover:not(:disabled) { border-color: var(--green); background: var(--mint); }
.qc-people button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.qc-people button:disabled { opacity: 0.35; cursor: default; }
.qc-people strong { min-width: 1.6em; text-align: center; font-size: 1.05rem; color: var(--dark); }
.qc-people .qc-people-note { flex-basis: 100%; font-size: 0.74rem; color: var(--muted); }
.qc-result .qc-people { justify-content: center; margin: 6px auto 14px; }

.qc-stat { border-top: 1px solid var(--border); padding-top: 16px; }
.qc-stat-label { display: block; font-size: 0.78rem; color: var(--muted); line-height: 1.45; margin-bottom: 4px; }
.qc-stat-value {
  font-family: 'Cormorant Garamond', 'Cormorant Fallback', serif;
  font-size: 1.5rem; font-weight: 600; color: var(--dark);
}

.qc-cta { width: 100%; text-align: center; }

/* ── Trust strip and footnote ── */

.qc-trust {
  max-width: var(--maxw); margin: 40px auto 0;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 14px 32px;
  background: var(--pale); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px 28px;
}
.qc-trust li { list-style: none; font-size: 0.85rem; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 9px; }
.qc-trust li::before { content: '\2713'; color: var(--green); font-weight: 700; }

.qc-footnote { max-width: var(--maxw); margin: 16px auto 0; text-align: center; font-size: 0.75rem; color: var(--muted); }
.qc-country { max-width: var(--maxw); margin: 12px auto 0; text-align: center; font-size: 0.8rem; color: var(--text); position: relative; z-index: 1; display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.qc-country select { font: inherit; font-size: 0.8rem; color: var(--dark); background: #fff; border: 1px solid var(--border); border-radius: 50px; padding: 6px 30px 6px 12px; appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.qc-country select:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ── Responsive ── */

@media (max-width: 1000px) {
  .qc-grid { grid-template-columns: 1fr; max-width: 480px; gap: 20px; }
  .qc-card--rec { margin-top: 8px; }
  .qc-paths { padding: 32px 24px 56px; }
}

@media (max-width: 600px) {
  .qc-card { padding: 26px 20px 24px; }
  .qc-trust { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .qc-card { transition: none; }
}

/* ── Quick-calc dialog ──────────────────────────────────────────────────────
   A native <dialog>, so focus trapping, ESC and the backdrop come for free.
   Form controls reuse .wp-modal-label / .wp-modal-input / .wp-modal-row from
   cfp-2026.css; only the shell and the result view are defined here. */

.qc-dialog {
  width: min(460px, calc(100vw - 32px));
  max-height: min(88vh, 760px);
  margin: auto;
  padding: 34px 32px 30px;
  border: none; border-radius: 18px;
  background: #fff; color: var(--text);
  box-shadow: 0 24px 70px rgba(13,31,18,0.3);
  overflow-y: auto;
}
.qc-dialog::backdrop { background: rgba(13,31,18,0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

.qc-dialog-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; font-size: 1.7rem; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 0;
}
.qc-dialog-close:hover { color: var(--text); }

/* --forest, not --green: the accent is only 3.4:1 on white, which fails AA at these sizes. */
.qc-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--forest); margin-bottom: 8px; }
.qc-dialog h3 { font-family: 'Cormorant Garamond', 'Cormorant Fallback', serif; font-size: 1.75rem; font-weight: 600; color: var(--dark); line-height: 1.15; margin-bottom: 8px; }

/* ── Step wizard ── */

.qc-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding-right: 30px; }
.qc-back {
  flex: 0 0 32px; width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--border); border-radius: 50%; background: #fff;
  color: var(--dark); font-family: inherit; font-size: 1rem; line-height: 1; cursor: pointer;
}
.qc-back:hover { border-color: var(--green); color: var(--green); }
.qc-back[hidden] { display: none; }
.qc-progress-track { flex: 1 1 auto; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.qc-progress-fill { height: 100%; width: 25%; background: var(--green); border-radius: 3px; transition: width 0.3s ease; }
.qc-progress-label { flex: 0 0 auto; min-width: 34px; text-align: right; font-size: 0.75rem; font-weight: 600; color: var(--muted); }

.qc-step { border: none; padding: 0; margin: 0; }
.qc-step legend { padding: 0; display: block; width: 100%; }
.qc-step-eyebrow { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.qc-step-title { display: block; font-family: 'Cormorant Garamond', 'Cormorant Fallback', serif; font-size: 1.65rem; font-weight: 600; color: var(--dark); line-height: 1.2; margin-top: 8px; }
.qc-step-sub { font-size: 0.85rem; line-height: 1.5; color: var(--muted); margin: 6px 0 18px; }

.qc-options { display: flex; flex-direction: column; gap: 10px; }
.qc-option {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.qc-option:hover { border-color: var(--light-green); }
.qc-option input { flex: 0 0 18px; width: 18px; height: 18px; accent-color: var(--green); margin: 0; cursor: pointer; }
.qc-option-text { display: flex; flex-direction: column; gap: 2px; }
.qc-option-text strong { font-size: 0.95rem; font-weight: 600; color: var(--dark); }
.qc-option-text span { font-size: 0.78rem; color: var(--muted); }
.qc-option:has(input:checked) { border-color: var(--green); border-width: 2px; padding: 13px 15px; background: var(--mint); }
.qc-option:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }

/* A second, smaller group on the same step — occupants, fuel type. */
.qc-sub { border: none; padding: 0; margin: 18px 0 0; }
.qc-sub-label { padding: 0; font-size: 0.85rem; font-weight: 600; color: var(--dark); margin-bottom: 10px; }

/* Short answers sit in a row instead of stacking: counts, occupants, fuel. */
.qc-options--pills { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.qc-options--pills .qc-option { flex: 1 1 auto; justify-content: center; padding: 10px 14px; }
.qc-options--pills .qc-option input { position: absolute; opacity: 0; pointer-events: none; }
/* Four word-length pills wrap to 3 + 1 and the orphan stretches; 2x2 reads better. */
.qc-options--two .qc-option { flex: 1 1 calc(50% - 4px); }
/* Home-size pills keep their one-line bedroom hint under the label. */
.qc-options--home .qc-option { justify-content: flex-start; text-align: left; }
.qc-options--home .qc-option-text { display: flex; flex-direction: column; gap: 2px; }
.qc-options--home .qc-option-text span { font-size: 0.72rem; color: var(--muted); }
.qc-options--pills .qc-option-text strong { font-size: 0.9rem; white-space: nowrap; }
.qc-options--pills .qc-option:has(input:checked) { padding: 9px 13px; }

.qc-submit { width: 100%; margin-top: 22px; text-align: center; }
.qc-submit[disabled] { opacity: 0.45; cursor: not-allowed; }
.qc-submit[disabled]:hover { transform: none; box-shadow: none; }

/* ── Result view ── */

.qc-total { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 8px; }
.qc-total > [data-qc-per-person] { font-family: 'Cormorant Garamond', 'Cormorant Fallback', serif; font-size: 3rem; font-weight: 600; line-height: 1; color: var(--green); }
.qc-total-unit { font-size: 0.95rem; font-weight: 600; color: var(--muted); }
.qc-compare { font-size: 0.95rem; line-height: 1.5; color: var(--text); font-weight: 500; }

.qc-bars { background: var(--pale); border-radius: 16px; padding: 18px; margin: 18px 0 16px; display: flex; flex-direction: column; gap: 14px; }
.qc-bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; }
.qc-bar-label { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.qc-bar-val { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.qc-track { grid-column: 1 / -1; height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; }
.qc-fill { height: 100%; width: 0; background: color-mix(in srgb, var(--muted) 55%, #fff); border-radius: 5px; transition: width 0.4s ease; }
.qc-fill--you { background: var(--green); }

.qc-rough { font-size: 0.8rem; line-height: 1.5; color: var(--muted); margin-bottom: 4px; }

.qc-precision { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-top: 16px; }
.qc-precision a,
.qc-precision button {
  display: block; width: 100%; text-align: left;
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  color: var(--forest); text-decoration: underline; text-underline-offset: 2px;
}
.qc-precision span { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 3px; }

.qc-restart-row { text-align: center; margin-top: 14px; }
.qc-restart { background: none; border: none; font: inherit; font-size: 0.82rem; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; padding: 4px; }
.qc-restart:hover { color: var(--text); }

/* ── Interstitials (before the marketplace / before the full calculator) ── */

.qc-backlink { margin-bottom: 16px; }
.qc-backlink button {
  background: none; border: none; padding: 0; font: inherit;
  font-size: 0.82rem; color: var(--muted); cursor: pointer;
}
.qc-backlink button:hover { color: var(--text); }

.qc-inter-title { font-family: 'Cormorant Garamond', 'Cormorant Fallback', serif; font-size: 1.65rem; font-weight: 600; color: var(--dark); line-height: 1.2; margin-bottom: 10px; }
.qc-inter-lede { font-size: 0.9rem; line-height: 1.6; color: var(--muted); margin-bottom: 16px; }

.qc-note {
  background: var(--mint); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 16px;
  font-size: 0.85rem; line-height: 1.45; color: var(--text);
}
.qc-note strong { color: var(--green); }

.qc-checklist { background: var(--pale); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; margin-bottom: 16px; }
.qc-checklist-title { font-size: 0.8rem; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.qc-check { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.qc-check:last-child { margin-bottom: 0; }
.qc-check-icon {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: var(--green);
}
.qc-check-text { display: flex; flex-direction: column; gap: 2px; }
.qc-check-text strong { font-size: 0.87rem; font-weight: 600; color: var(--text); }
.qc-check-text span { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }

.qc-meta { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; }
.qc-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

.qc-cta-note { text-align: center; font-size: 0.72rem; color: var(--muted); margin-top: 8px; }

@media (max-width: 480px) {
  .qc-dialog { padding: 30px 20px 24px; max-height: 92vh; }
  .qc-dialog h3 { font-size: 1.5rem; }
  .qc-total > [data-qc-per-person] { font-size: 2.5rem; }
  .wp-modal-row { flex-direction: column; gap: 0; }
  .wp-modal-row .wp-modal-label { margin-top: 14px; }
}

/* Focused by script to announce a panel change, never tabbed to, so no ring. */
.qc-step:focus, .qc-result:focus, .qc-screen:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
  .qc-fill, .qc-progress-fill, .qc-option { transition: none; }
}
