/* app2/ui/scale.css — the experience pass (2026-09-23, decision 6): one global step up in type,
   keycaps and the ribbon, a two-state density switch, and the page using its width.

   One attribute on <html>, set before first paint (index.html) and kept by prefs.reflect():
     data-density            "comfortable" (the step up, the default) | "compact" (the smaller setting)

   The sheet itself stays Excel at 100% (archived SITE_SPEC §4): the grid is the one thing that must look
   like the real program. What steps up is everything around it. */

/* ---------- 1. the page uses its width: 1180 → 1340, centered — the comfy middle, never edge-to-edge ---------- */
.app, .wrap, .page, .home, .drill-page{max-width:1340px}   /* Reference (.ref) follows the shell's --page-w column, which grows with --k */
.app{padding:0 var(--s8)}

@media (max-width:1100px){ .app{padding:0 var(--s6)} }

/* shared type */
/* a bare <kbd> (the Ribbon's, a toast's) keeps 12.5px; a keycap (.ui-cap) takes --fs-key, which grows with --k on big windows */
html[data-density="comfortable"] kbd:where(:not(.ui-cap)){font-size:var(--fs-2)}   /* :where keeps the old specificity, so a class still sets its own size */
/* bare paragraphs only, at the lowest specificity: a paragraph with a class (.page-fine, .lb-sub …) keeps its own size */
:where(html[data-density="comfortable"] .page, html[data-density="comfortable"] .home) p{font-size:var(--fs-4)}
/* one page title size on every page: Practice, Leaderboard, Pricing, Account, Learn, Reference */
html[data-density="comfortable"] .home h1{font-size:var(--fs-6)}
html[data-density="comfortable"] #hkToast{font-size:var(--fs-3); padding:var(--s2) var(--s5)}
/* the lesson panel */




/* the sheet tabs strip */
html[data-density="comfortable"] .wb-tabs .wb-tab{font-size:calc(var(--wb-fs) - 0.5px)}
/* the full ribbon: tabs, groups, buttons and KeyTips all one step up (Wolf: "ribbon text feels small") */
html[data-density="comfortable"] .ribbon-slot.rib-full{--rib-h:110px}
html[data-density="comfortable"] .rf-tabs{height:29px; padding:3px 10px 0}
html[data-density="comfortable"] .rf-tab{font-size:calc(var(--xl-fs) + 1px); padding:4px 13px 5px}
html[data-density="comfortable"] .rf-tab k{min-width:18px; height:17px; font-size:calc(var(--xl-fs) - 1px)}
html[data-density="comfortable"] .rf-body{padding:3px 6px 0}
html[data-density="comfortable"] .rf-grp{padding:0 8px 2px}
html[data-density="comfortable"] .rf-cols{gap:3px}
html[data-density="comfortable"] .rf-gname{font-size:calc(var(--xl-fs) - 2px); padding-top:3px}
html[data-density="comfortable"] .rf-btn{height:20px; font-size:calc(var(--xl-fs) - 0.5px); padding:0 5px; gap:5px}
html[data-density="comfortable"] .rf-btn .rf-ico{width:18px; height:18px}
html[data-density="comfortable"] .rf-btn .rf-ico svg{width:17px; height:17px}
html[data-density="comfortable"] .rf-btn .rf-ico .ri-g{font-size:calc(var(--xl-fs) + 2px)}
html[data-density="comfortable"] .rf-btn.ico{width:25px}
html[data-density="comfortable"] .rf-btn.big{height:62px; width:60px; padding:5px 2px 2px; gap:3px}
html[data-density="comfortable"] .rf-btn.big .rf-ico{width:28px; height:28px}
html[data-density="comfortable"] .rf-btn.big .rf-ico svg{width:26px; height:26px}
html[data-density="comfortable"] .rf-btn.big .rf-ico .ri-g{font-size:calc(var(--xl-fs) + 9px)}
html[data-density="comfortable"] .rf-btn.big .rf-lbl{font-size:calc(var(--xl-fs) - 1px); max-width:60px}
html[data-density="comfortable"] .rf-split.big{width:60px}
html[data-density="comfortable"] .rf-split.big .rf-face{height:50px; width:60px}
html[data-density="comfortable"] .rf-split.big .rf-face .rf-ico{width:28px; height:28px}
html[data-density="comfortable"] .rf-split.big .rf-face .rf-ico svg{width:26px; height:26px}
html[data-density="comfortable"] .rf-split.big .rf-face .rf-lbl{font-size:calc(var(--xl-fs) - 1px)}
html[data-density="comfortable"] .rf-split.big .rf-arrow{width:60px; height:12px}
html[data-density="comfortable"] .rf-split .rf-arrow{width:16px}
html[data-density="comfortable"] .rf-box{height:20px; font-size:calc(var(--xl-fs) - 0.5px); padding:0 6px}
html[data-density="comfortable"] .ribbon-full .ri-key, html[data-density="comfortable"] .rdrop-menu .ri-key,
html[data-density="comfortable"] .rdrop-dialog .ri-key{font-size:calc(var(--xl-fs) - 1px); padding:0 4px}
html[data-density="comfortable"] .rf-grp.rf-collapsed .rf-grpbtn{width:58px}
html[data-density="comfortable"] .rdrop-item{font-size:calc(var(--xl-fs) + 1px); padding:5px 9px 5px 11px}
html[data-density="comfortable"] .rf-qbtn{width:24px; height:24px}
/* the slim strip */
html[data-density="comfortable"] .ribbon-slot:not(.rib-full){--rib-h:38px}
html[data-density="comfortable"] .ribbon:not(.ribbon-full){font-size:calc(var(--xl-fs) + 1px); min-height:38px}
html[data-density="comfortable"] .ribbon .rtab k, html[data-density="comfortable"] .ribbon .opt k{font-size:calc(var(--xl-fs) + 1.5px); min-width:22px; height:22px}
html[data-density="comfortable"] .ribbon.ribbon-lean .ri-lbl{font-size:var(--xl-fs)}
/* the formula bar and name box: a half step, still Excel-sized */
html[data-density="comfortable"] .fbar{font-size:var(--wb-fs)}
/* the workspace frame follows the taller nav */
/* the Learn / Home / Practice cards */

/* ---------- 3. compact: today's type sizes, and the content pages tighten (never the workspace) ---------- */


