/* ============================================================
   type-scale.css — switchable typography scale
   ------------------------------------------------------------
   TWO scales, one switch:
     • Standard    — the app's original sizes (this file adds nothing).
     • Comfortable — an Apple-HIG-ish larger scale for readability
                     (body ~15–17, forms 16 to stop iOS focus-zoom).
   Toggled by the `data-type-scale` attribute on <html>:
     <html data-type-scale="comfortable">  (default)
     <html data-type-scale="standard">     (revert)
   Set from Settings → persisted in localStorage (pt_type_scale) and
   applied by an inline <head> script before paint. Every rule below is
   scoped to html[data-type-scale="comfortable"], so "standard" is a
   clean no-op fallback and nothing here can affect it.
   ============================================================ */

html[data-type-scale="comfortable"] body { font-size: 15px; }

/* ── Control tokens for this scale ────────────────────────────
   design-system.css sizes every control from these tokens, so the whole
   control set scales together. Before this existed the scale bumped
   inputs to 16px but left buttons at their base size, so a button and
   the input beside it were different heights on the same row.
   ★ Keep --ctl-h >= the input's font-size + padding, or they won't align. */
html[data-type-scale="comfortable"] {
  --ctl-h:     40px;  --ctl-h-sm:  34px;  --ctl-h-xs:  28px;
  --ctl-fs:    15px;  --ctl-fs-sm: 14px;  --ctl-fs-xs: 12.5px;
  --ctl-px:    18px;  --ctl-px-sm: 14px;  --ctl-px-xs: 10px;
}

/* ── Shared framework primitives (used across every module) ── */
html[data-type-scale="comfortable"] .page-title      { font-size: 24px; }
html[data-type-scale="comfortable"] .page-sub        { font-size: 15px; }

/* Button font-size is NOT set per-variant here any more. These selectors
   carry an attribute (specificity 0,2,0) and so beat the size modifiers
   (.btn-xs = 0,1,0) — a .btn-ghost.btn-xs rendered at 15px instead of
   12.5px. The --ctl-fs* tokens above size every variant together, which
   is both correct and impossible to out-specify by accident. */

html[data-type-scale="comfortable"] .field label     { font-size: 13px; }
/* 16px also stops iOS Safari from zooming the page on input focus. */
html[data-type-scale="comfortable"] .field input,
html[data-type-scale="comfortable"] .field select,
html[data-type-scale="comfortable"] .field textarea  { font-size: 16px; }

/* Chrome: sidebar nav + header context switcher */
html[data-type-scale="comfortable"] .nav-item        { font-size: 15px; }
html[data-type-scale="comfortable"] .nav-item i      { font-size: 19px; }
html[data-type-scale="comfortable"] .pd-rail-item    { font-size: 14.5px; }
html[data-type-scale="comfortable"] .pd-rail-ghead   { font-size: 14px; }
html[data-type-scale="comfortable"] .hctx-item       { font-size: 15px; }
html[data-type-scale="comfortable"] .hctx-item > i   { font-size: 18px; }
html[data-type-scale="comfortable"] .hdr-org-name    { font-size: 13px; }
/* Header BAR controls — previously missed, so the toggle only grew the sidebar and
   left the top header at base size. Scale them with the rest so the whole nav matches. */
html[data-type-scale="comfortable"] .hdr-ctx-btn,
html[data-type-scale="comfortable"] .hdr-ctx-name    { font-size: 15px; }
html[data-type-scale="comfortable"] .hdr-ctx-chev    { font-size: 15px; }
html[data-type-scale="comfortable"] .hdr-icon-btn    { font-size: 20px; }
html[data-type-scale="comfortable"] .hdr-search-btn,
html[data-type-scale="comfortable"] .hdr-search-label{ font-size: 14px; }
html[data-type-scale="comfortable"] .hdr-search-kbd  { font-size: 11px; }
html[data-type-scale="comfortable"] .user-name-label { font-size: 14px; }
html[data-type-scale="comfortable"] .um-item,
html[data-type-scale="comfortable"] .um-name         { font-size: 14px; }
html[data-type-scale="comfortable"] .um-role         { font-size: 12px; }

/* Modals / empty states */
html[data-type-scale="comfortable"] .cp-title        { font-size: 18px; }
html[data-type-scale="comfortable"] .empty-state h3  { font-size: 19px; }
html[data-type-scale="comfortable"] .empty-state p   { font-size: 15px; }
html[data-type-scale="comfortable"] .empty-state i   { font-size: 42px; }

/* Dashboard project cards + section headers + chips */
html[data-type-scale="comfortable"] .dash-section-title { font-size: 13px; }
html[data-type-scale="comfortable"] .dash-count      { font-size: 13px; }
html[data-type-scale="comfortable"] .pc-name         { font-size: 16px; }
html[data-type-scale="comfortable"] .pc-number       { font-size: 12px; }
html[data-type-scale="comfortable"] .pc-meta         { font-size: 13px; }
html[data-type-scale="comfortable"] .health-badge    { font-size: 13px; }
html[data-type-scale="comfortable"] .status-pill     { font-size: 12px; }
html[data-type-scale="comfortable"] .filter-btn      { font-size: 14px; }

/* Module toolbars + generic table cells */
html[data-type-scale="comfortable"] .mod-tb          { font-size: 15px; }
html[data-type-scale="comfortable"] table            { font-size: 15px; }
html[data-type-scale="comfortable"] th               { font-size: 13px; }

/* Settings / org-admin common bits */
html[data-type-scale="comfortable"] .oa-section-title { font-size: 15px; }
html[data-type-scale="comfortable"] .oa-stat-value    { font-size: 26px; }

/* ── Enterprise / Branch dashboard (Apple ladder) ── */
html[data-type-scale="comfortable"] .ent-wrap            { font-size: 17px; }
html[data-type-scale="comfortable"] .ent-title           { font-size: 28px; }
html[data-type-scale="comfortable"] .ent-sub             { font-size: 17px; }
html[data-type-scale="comfortable"] .ent-eyebrow         { font-size: 12px; }
html[data-type-scale="comfortable"] .ent-back            { font-size: 15px; }
html[data-type-scale="comfortable"] .ent-tier-badge      { font-size: 12px; }
html[data-type-scale="comfortable"] .ent-setup-hd        { font-size: 20px; }
html[data-type-scale="comfortable"] .ent-setup-sub       { font-size: 15px; }
html[data-type-scale="comfortable"] .ent-setup-pct       { font-size: 24px; }
html[data-type-scale="comfortable"] .ent-step-title      { font-size: 17px; }
html[data-type-scale="comfortable"] .ent-step-desc       { font-size: 16px; line-height: 1.5; }
html[data-type-scale="comfortable"] .ent-step-tag        { font-size: 11px; }
html[data-type-scale="comfortable"] .ent-step-check,
html[data-type-scale="comfortable"] .ent-step-cta        { font-size: 15px; }
html[data-type-scale="comfortable"] .ent-stat-top        { font-size: 15px; }
html[data-type-scale="comfortable"] .ent-stat-val        { font-size: 30px; }
html[data-type-scale="comfortable"] .ent-stat-sub        { font-size: 13px; }
html[data-type-scale="comfortable"] .ent-card-hd         { font-size: 17px; }
html[data-type-scale="comfortable"] .ent-branch-name     { font-size: 17px; }
html[data-type-scale="comfortable"] .ent-branch-meta     { font-size: 14px; }
html[data-type-scale="comfortable"] .ent-branch-type     { font-size: 11px; }
html[data-type-scale="comfortable"] .ent-quick-label     { font-size: 17px; }
html[data-type-scale="comfortable"] .ent-quick-sub       { font-size: 14px; }
html[data-type-scale="comfortable"] .ent-act-row         { font-size: 15px; }
html[data-type-scale="comfortable"] .ent-act-when        { font-size: 13px; }
html[data-type-scale="comfortable"] .ent-empty-inline    { font-size: 15px; }
html[data-type-scale="comfortable"] .ent-detail-l        { font-size: 13px; }
html[data-type-scale="comfortable"] .ent-detail-v        { font-size: 17px; }
html[data-type-scale="comfortable"] .ent-upgrade-hd      { font-size: 17px; }
html[data-type-scale="comfortable"] .ent-upgrade-txt p   { font-size: 16px; }
html[data-type-scale="comfortable"] .ent-form-hint       { font-size: 14px; }

/* ── Onboarding intro banner ── */
html[data-type-scale="comfortable"] .ob-intro-hd        { font-size: 15.5px; }
html[data-type-scale="comfortable"] .ob-intro-list li   { font-size: 15px; }
