/*
 * Prezip legibility layer
 *
 * The warm editorial UI intentionally uses compact supporting type. This final-loaded
 * layer keeps that hierarchy while making decision copy readable on exhibition
 * laptops, iPad, and phones. It does not change colors, radii, or typeface choices.
 */
:root {
  --mz-copy: 14px;
  --mz-copy-small: 12px;
  --mz-label: 11px;
  --mz-control: 13px;
}

/* Sign-in and the portal are the first two surfaces every visitor sees. */
body[data-route="auth"] .google-auth-brand-sub { font-size: var(--mz-copy-small); line-height: 1.35; }
body[data-route="auth"] .google-auth-copy { font-size: 16px; line-height: 1.65; }
body[data-route="auth"] .google-auth-mode-note,
body[data-route="auth"] .google-auth-trust strong,
body[data-route="auth"] .google-auth-trust span,
body[data-route="auth"] .auth-legal-note { font-size: var(--mz-copy-small); line-height: 1.5; }

body[data-route="portal"] .portal-wordmark strong { font-size: 16px; }
body[data-route="portal"] .portal-wordmark small,
body[data-route="portal"] .portal-account span,
body[data-route="portal"] .portal-saved-draft span,
body[data-route="portal"] .portal-plan-scale,
body[data-route="portal"] .portal-ledger-head span { font-size: var(--mz-label); line-height: 1.4; }
body[data-route="portal"] .portal-account strong,
body[data-route="portal"] .portal-status :is(dt, dd),
body[data-route="portal"] .portal-saved-draft :is(strong, small),
body[data-route="portal"] .portal-progress-label,
body[data-route="portal"] .portal-ledger-rows :is(dt, dd) { font-size: var(--mz-copy-small); line-height: 1.45; }

/* Project intake: labels, evidence, and review decisions cannot depend on microcopy. */
body:is([data-route="brief"], [data-route="capture"], [data-route="plans"]) :is(
  .capture-method-index,
  .capture-method-copy small,
  .capture-fact-row span,
  .capture-upload-drop span,
  .capture-upload-status,
  .capture-file-placeholder span,
  .capture-privacy-note,
  .capture-analysis-steps strong,
  .capture-analysis-steps small,
  .capture-confidence small,
  .capture-recognition-preview > p,
  .capture-scale-card > p,
  .capture-review-section-head > span,
  .capture-room-focus span,
  .capture-room-focus small,
  .capture-excluded-rooms summary,
  .capture-excluded-room,
  .capture-scale-card > label[for="capture-confirmed-width"],
  .capture-scale-evidence,
  .capture-scale-difference,
  .capture-review-check strong,
  .capture-review-check small,
  .brief-field,
  .brief-field small,
  .brief-check-field small,
  .brief-stepper button span,
  .brief-stepper button strong,
  .brief-fieldset legend,
  .brief-choice strong,
  .brief-choice small,
  .brief-budget-card span,
  .brief-range-field > div,
  .brief-range-field small,
  .brief-assumption strong,
  .brief-assumption span,
  .brief-recommendation-top > span,
  .brief-recommendation > small,
  .brief-final-note span,
  .us-plan-card-type,
  .us-plan-specs span,
  .us-plan-tags span,
  .us-plan-level-note,
  .us-plan-method-note,
  .us-plan-head-tools
) { font-size: var(--mz-copy-small); line-height: 1.5; }

body:is([data-route="brief"], [data-route="capture"]) :is(
  .capture-method-copy strong,
  .capture-upload-drop strong,
  .capture-scale-card h4,
  .brief-budget-card strong,
  .brief-recommendation p,
  .brief-final-note strong
) { font-size: var(--mz-copy); line-height: 1.45; }

/* Shared project chrome. Navigation remains compact, but never below 12px. */
body[data-project-shell="true"] .pw-brand strong { font-size: 15px; line-height: 1.2; }
body[data-project-shell="true"] .pw-brand small { font-size: 10px; line-height: 1.35; }
body[data-project-shell="true"] :is(.pw-save-status, .pw-account-button small) { font-size: var(--mz-label); line-height: 1.4; }
body[data-project-shell="true"] .pw-account-button strong { max-width: 132px; font-size: var(--mz-copy-small); }
body[data-project-shell="true"] .pw-unit-slot .us-unit-toggle button,
body[data-project-shell="true"] .pw-project-nav button,
body[data-project-shell="true"] .pw-button { font-size: var(--mz-control); line-height: 1.2; }
body[data-project-shell="true"] .pw-active-project small,
body[data-project-shell="true"] .pw-manager-title small,
body[data-project-shell="true"] .pw-status-pill,
body[data-project-shell="true"] .pw-eyebrow { font-size: var(--mz-label); line-height: 1.4; }
body[data-project-shell="true"] .pw-active-project strong { font-size: 16px; line-height: 1.3; }
body[data-project-shell="true"] .pw-manager-title strong,
body[data-project-shell="true"] .pw-manager-card p,
body[data-project-shell="true"] .pw-project-facts { font-size: var(--mz-copy-small); line-height: 1.5; }
body[data-project-shell="true"] .pw-step-copy strong { font-size: var(--mz-control); line-height: 1.3; }
body[data-project-shell="true"] .pw-step-state { font-size: var(--mz-label); line-height: 1.35; }

/* Project Home and the shared planning stepper. */
body[data-project-shell="true"] .pw-stage-marker { font-size: var(--mz-label); }
body[data-project-shell="true"] .pw-stage-copy strong,
body[data-project-shell="true"] .pw-stage-copy small { font-size: var(--mz-copy-small); line-height: 1.35; }
body[data-project-shell="true"] .pw-stage-copy strong { overflow: visible; white-space: normal; }
body[data-project-shell="true"] .pw-next-decision small,
body[data-project-shell="true"] .pw-section-heading p,
body[data-project-shell="true"] .pw-text-action,
body[data-project-shell="true"] .pw-view-toggle button,
body[data-project-shell="true"] .pw-plan-pane figcaption,
body[data-project-shell="true"] .pw-scene-loading small,
body[data-project-shell="true"] .pw-live-scene.is-unavailable small,
body[data-project-shell="true"] .pw-helper-copy { font-size: var(--mz-copy-small); line-height: 1.5; }
body[data-project-shell="true"] .pw-next-decision h2,
body[data-project-shell="true"] .pw-section-heading h2 { font-size: 20px; line-height: 1.25; }
body[data-project-shell="true"] .pw-next-decision p,
body[data-project-shell="true"] .pw-scene-loading strong,
body[data-project-shell="true"] .pw-live-scene.is-unavailable strong { font-size: var(--mz-copy); line-height: 1.5; }
body[data-project-shell="true"] .pw-room-chips button,
body[data-project-shell="true"] .pw-material-more { font-size: var(--mz-copy-small); }

body[data-project-shell="true"] :is(
  .pw-material-space,
  .pw-material-type,
  .pw-material-tag,
  .pw-summary-list dt,
  .pw-summary-list dd,
  .pw-estimate-total span,
  .pw-estimate-total small,
  .pw-cost-legend dt,
  .pw-cost-legend dd,
  .pw-fine-print,
  .pw-contractor-heading strong,
  .pw-contractor-heading small,
  .pw-contractor-rating span,
  .pw-contractor-rating small,
  .pw-contractor-card dt,
  .pw-contractor-card dd,
  .pw-ai-intro p,
  .pw-ai-prompts button
) { font-size: var(--mz-copy-small); line-height: 1.45; }
body[data-project-shell="true"] .pw-material-body strong,
body[data-project-shell="true"] .pw-material-rate { font-size: var(--mz-copy); line-height: 1.4; }
body[data-project-shell="true"] .pw-material-card { min-height: 244px; }

/* The in-place picker is another state of the Project Home material card,
   so it must use the same readable type scale as the summary it replaces. */
body[data-project-shell="true"] :is(
  .pw-embedded-picker-head p,
  .pw-embedded-product-tier,
  .pw-embedded-picker-status,
  .pw-embedded-picker-footer > span,
  .pw-embedded-picker-empty
) { font-size: var(--mz-copy-small); line-height: 1.5; }
body[data-project-shell="true"] :is(
  .pw-embedded-picker-back,
  .pw-embedded-subcategories button
) { font-size: var(--mz-control); line-height: 1.2; }
body[data-project-shell="true"] :is(
  .pw-embedded-product-select strong,
  .pw-embedded-product-rate
) { font-size: var(--mz-copy); line-height: 1.4; }

/* Material Selection: product evidence and installed-cost details are primary content. */
body[data-route="studio"] :is(
  .material-workspace-kicker,
  .material-workspace-tools .studio-draft-status,
  .material-scene-help,
  .material-scene-panel .cam-chips .chip,
  .material-scene-panel .segment button,
  .material-scene-panel > .small,
  .material-catalog-panel .live-eyebrow,
  .material-catalog-panel .live-copy,
  .material-catalog-panel .live-tab,
  .material-catalog-panel .chip,
  .material-catalog-panel .live-product-tier,
  .material-catalog-panel .live-product-price small,
  .material-catalog-panel .live-update-status,
  .material-undo,
  .material-inspector-empty p,
  .material-inspector-eyebrow,
  .material-installed-rate span,
  .material-inspector-room,
  .material-inspector-tabs button,
  .material-inspector h3,
  .material-considerations ul,
  .material-care p,
  .material-cost-card > div,
  .material-cost-card small,
  .material-ai-guidance p,
  .material-inspector-note,
  .material-project-examples strong,
  .material-project-examples span,
  .material-install-steps strong,
  .material-install-steps span,
  .material-companion-heading span,
  .material-companion-heading small,
  .material-companion-list strong,
  .material-companion-list small,
  .material-companion-empty
) { font-size: var(--mz-copy-small); line-height: 1.45; }

body[data-route="studio"] .material-workspace-intro .sub-text,
body[data-route="studio"] .material-scene-panel > div:first-child,
body[data-route="studio"] .material-catalog-panel .live-product-name,
body[data-route="studio"] .material-catalog-panel .live-product-price,
body[data-route="studio"] .material-installed-rate { font-size: var(--mz-copy); line-height: 1.45; }
body[data-route="studio"] .material-catalog-panel :is(.live-product-card, .live-product-select) { min-height: 250px; }

/* Visualization, quote, and progress sheets share the same readable floor. */
body:is([data-route="studio"], [data-route="quote"]) :is(
  .render-review-kicker,
  .render-review-facts dt,
  .render-review-disclosure,
  .studio-render-allowance-label,
  .visualization-preflight-head p,
  .visualization-preflight-facts dt,
  .visualization-preflight-facts dd,
  .visualization-staging-note,
  .quote-calculation-body ul,
  .render-loading-stage-copy strong,
  .render-loading-stage-copy small,
  .render-loading-item-copy strong,
  .render-loading-item-copy small,
  .render-loading-state,
  .draft-review-sheet dt,
  .draft-review-sheet dd,
  .draft-review-sheet > p
) { font-size: var(--mz-copy-small); line-height: 1.5; }

@media (max-width: 820px) {
  :root { --mz-copy: 15px; --mz-copy-small: 13px; --mz-label: 12px; --mz-control: 14px; }
  body[data-project-shell="true"] .pw-brand strong { font-size: 16px; }
  body[data-project-shell="true"] .pw-stage-stepper { grid-template-columns: repeat(5, 154px); }
  body[data-project-shell="true"] .pw-project-nav button { padding-inline: 15px; }
  body[data-project-shell="true"] .pw-step-copy strong { font-size: 14px; }
  body[data-project-shell="true"] .pw-step-state { font-size: 12px; }
}

@media (max-width: 430px) {
  body[data-route="auth"] .google-auth-copy { font-size: 15px; }
  body[data-project-shell="true"] .pw-page-header h1,
  body[data-route="studio"] .material-workspace-intro .headline { font-size: 32px; line-height: 1.08; }
}
