/* Shared UI roles; product drawings and exported images keep their own scale. */
:root {
  --ui-display: clamp(40px, 3.75vw, 56px);
  --ui-section: 24px;
  --ui-panel-title: 20px;
  --ui-dialog-title: 32px;
  --ui-body: 12px;
  --ui-action: 12px;
  --ui-compact: 11px;
  --ui-fine: 10px;
  --ui-label: 10px;
  --ui-input: 16px;
  --ui-total: 22px;
  --ui-target: 44px;
  --ui-button-height: 48px;
  --ui-circle: 32px;
  --ui-browse-circle: 24px;
  --ui-step-circle: 28px;
  --ui-radius: 6px;
  --ui-panel-radius: 8px;
  --ui-space-1: 4px;
  --ui-space-2: 8px;
  --ui-space-3: 12px;
  --ui-space-4: 16px;
  --ui-space-5: 24px;
}

#main .title-block h1 {
  font-size: var(--ui-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.05em;
}

body .eyebrow,
body .title-block .eyebrow,
body .build-topline .eyebrow,
body .order-result .eyebrow,
body .field-label,
body .small-label,
body .design-signature label,
body .price-total-label {
  font-size: var(--ui-label);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 1.2px;
}

body .editor .editor-heading h2,
body .editor.is-building .editor-heading h2 {
  font-size: var(--ui-section);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.6px;
}

body .summary-panel .summary-title,
body .design-card .card-name,
body .studio-picks h3,
body .studio-picks .option-browser.is-scrollable .browse-heading h3 {
  font-size: var(--ui-panel-title);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.5px;
}

body .micro-copy,
body .preview-workspace .preview-title .micro-copy,
body .summary-caption,
body .summary-panel .summary-caption,
body .shape-note,
body .selected-colour-caption,
body .design-signature p,
body .price-disclosure,
body .price-item small,
body .price-breakdown p,
body .build-part-label,
body .rotation-help,
body .preview-workspace .rotation-help,
body .field-hint,
#contact-form .field-hint,
body .order-customer span {
  font-size: var(--ui-compact);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}

body .final-copy,
body .build-empty,
body .colour-value {
  font-size: var(--ui-body);
  line-height: 1.6;
}

body .step,
body .category .index,
body .shape-option,
body .shape-option span {
  font-size: var(--ui-fine);
  line-height: 1.4;
}

body .category .category-name,
body .body-select {
  font-size: var(--ui-compact);
  line-height: 1.4;
}

body .browse-count,
body .browse-hint,
body .pick-name,
body .card-id,
body .detail-colour,
body .detail-row .detail-colour,
body .order-item-list li div span,
body .swatch-tooltip,
body .prototype-btn {
  font-size: var(--ui-fine);
  line-height: 1.5;
}

body .detail-row,
body .price-item,
body .price-item-amount,
body .order-item-list li,
body .details summary,
body .contact-design span,
body .checkout-progress li {
  font-size: var(--ui-compact);
  line-height: 1.5;
}

body .details summary,
body .sad-price-export details > summary {
  min-height: var(--ui-target);
  padding-block: var(--ui-space-3);
}

body .price-total,
body .transfer-total strong,
body .order-total strong,
body .contact-price-total,
body .contact-design .contact-price-total {
  font-size: var(--ui-total);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.4px;
  font-variant-numeric: tabular-nums;
}

body .measure-heading > :last-child {
  font-size: var(--ui-panel-title);
  font-weight: 500;
}

dialog h2 {
  font-size: var(--ui-dialog-title);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -1px;
  padding-right: var(--ui-space-5);
}

body .order-result h3 {
  font-size: var(--ui-section);
  line-height: 1.15;
}

dialog p,
dialog label,
body .transfer-intro,
body .order-result p {
  font-size: var(--ui-body);
  line-height: 1.6;
}

body .fine { font-size: var(--ui-fine) !important; line-height: 1.5; }

body input:not([type="checkbox"]):not([type="file"]):not([type="hidden"]),
body textarea,
body select,
body .design-signature input {
  font-size: var(--ui-input);
  line-height: 1.4;
  min-height: var(--ui-target);
  border-radius: var(--ui-radius);
  padding: 10px 12px;
}

body .design-signature input::placeholder { font-size: inherit; }
body #payment-proof { font-size: var(--ui-body); }

@media (max-width: 1100px) {
  :root { --ui-display: 36px; }
}

@media (max-width: 360px) {
  :root { --ui-display: 32px; }
}
