diff --git a/apps/web/src/app/globals.css b/apps/web/src/app/globals.css index 32780bc..732b716 100644 --- a/apps/web/src/app/globals.css +++ b/apps/web/src/app/globals.css @@ -85,6 +85,18 @@ body { padding: 0; } +/* ---------------------------------------------------------------------------- + User-adjustable text size. Every font-size in this stylesheet is expressed in + rem, so the whole UI follows the root size and one variable scales it all. + --ui-scale is written onto by the pre-hydration script in layout.tsx + (read from localStorage, so there is no flash of the wrong size) and updated + live by the Aa control in the appbar. A percentage keeps the browser's own + base font size honoured instead of hard-coding 16px over it. + -------------------------------------------------------------------------- */ +html { + font-size: calc(100% * var(--ui-scale, 1)); +} + body { font-family: var(--font-sans); background-color: var(--paper); @@ -96,7 +108,7 @@ body { ); background-size: 22px 22px; color: var(--ink); - font-size: 15px; + font-size: 0.9375rem; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; @@ -154,7 +166,7 @@ button { font-family: var(--font-sans); text-transform: uppercase; letter-spacing: 0.16em; - font-size: 11px; + font-size: 0.6875rem; font-weight: 600; color: var(--muted); } @@ -178,7 +190,8 @@ button { max-width: var(--shell-max); margin: 0 auto; padding: 0 28px; - height: 62px; + /* min-height, not height: the bar has to grow when the user scales text up. */ + min-height: 3.875rem; display: flex; align-items: center; gap: 26px; @@ -221,12 +234,12 @@ button { } .brand-name { font-family: var(--font-display); - font-size: 16px; + font-size: 1rem; font-weight: 560; letter-spacing: -0.01em; } .brand-sub { - font-size: 10.5px; + font-size: 0.65625rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(242, 239, 231, 0.62); @@ -246,7 +259,7 @@ button { color: rgba(242, 239, 231, 0.78); padding: 7px 12px; border-radius: 7px; - font-size: 14px; + font-size: 0.875rem; font-weight: 500; white-space: nowrap; } @@ -259,14 +272,256 @@ button { color: #fff; background: rgba(255, 255, 255, 0.12); } + +/* Grouped nav entries ("Cobranza", "Admin") */ +.appbar-menu { + position: relative; +} +.appbar-menu-trigger { + display: inline-flex; + align-items: center; + gap: 6px; + border: 0; + background: transparent; + font: inherit; + font-size: 0.875rem; + font-weight: 500; + cursor: pointer; +} +.appbar-caret { + width: 0; + height: 0; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4.5px solid currentColor; + opacity: 0.7; +} +.appbar-menu-trigger[aria-expanded="true"] { + color: #fff; + background: rgba(255, 255, 255, 0.12); +} +.appbar-dropdown { + position: absolute; + top: calc(100% + 8px); + left: 0; + min-width: 194px; + padding: 6px; + display: flex; + flex-direction: column; + gap: 2px; + background: var(--surface); + border: 1px solid var(--line); + border-radius: 10px; + box-shadow: 0 12px 30px rgba(12, 50, 45, 0.22); + z-index: 50; +} +.appbar-dropdown-link { + padding: 8px 11px; + border-radius: 7px; + font-size: 0.875rem; + color: var(--ink); + white-space: nowrap; +} +.appbar-dropdown-link:hover { + background: var(--brand-tint); + color: var(--brand-800); + text-decoration: none; +} +.appbar-dropdown-link.active { + background: var(--brand-tint); + color: var(--brand-800); + font-weight: 600; + box-shadow: inset 2px 0 0 var(--brand-600); +} +.appbar-dropdown-right { + left: auto; + right: 0; +} .appbar-spacer { flex: 1; } + +/* Text-size control */ +.appbar-scale-trigger { + display: inline-flex; + align-items: baseline; + justify-content: center; + min-width: 2.25rem; + padding: 0.3125rem 0.5rem; + border: 1px solid rgba(255, 255, 255, 0.22); + border-radius: 0.5rem; + background: rgba(255, 255, 255, 0.06); + color: rgba(242, 239, 231, 0.85); + font-family: var(--font-sans); + font-size: 0.75rem; + font-weight: 600; + line-height: 1; + cursor: pointer; +} +.appbar-scale-trigger:hover, +.appbar-scale-trigger[aria-expanded="true"] { + background: rgba(255, 255, 255, 0.14); + color: #fff; +} +.appbar-scale-big { + font-size: 1.25rem; +} +.scale-option { + display: flex; + align-items: baseline; + gap: 0.625rem; + width: 100%; + border: 0; + background: transparent; + font-family: var(--font-sans); + text-align: left; + cursor: pointer; +} +.scale-option > span:first-child { + width: 1.5rem; + flex: none; + font-weight: 700; + line-height: 1; +} +.scale-option-label { + font-size: 0.875rem; +} +.scale-inline { + display: flex; + flex-direction: column; + gap: 0.375rem; + margin-top: 0.75rem; + padding-top: 0.75rem; + border-top: 1px solid rgba(255, 255, 255, 0.1); +} +.scale-inline-options { + display: flex; + align-items: baseline; + gap: 0.375rem; + padding: 0 0.75rem; +} +.scale-chip { + min-width: 2.75rem; + padding: 0.5rem 0.375rem; + border: 1px solid rgba(255, 255, 255, 0.2); + border-radius: 0.5rem; + background: rgba(255, 255, 255, 0.06); + color: rgba(242, 239, 231, 0.82); + font-family: var(--font-sans); + font-weight: 700; + line-height: 1; + cursor: pointer; +} +.scale-chip.active { + background: rgba(255, 255, 255, 0.18); + border-color: rgba(255, 255, 255, 0.4); + color: #fff; +} + +/* Mobile menu button + drawer */ +.appbar-burger { + display: none; + width: 38px; + height: 38px; + padding: 0; + border: 1px solid rgba(255, 255, 255, 0.22); + border-radius: 9px; + background: rgba(255, 255, 255, 0.06); + cursor: pointer; + place-items: center; +} +.burger-icon { + position: relative; +} +.burger-icon, +.burger-icon::before, +.burger-icon::after { + display: block; + width: 17px; + height: 1.8px; + border-radius: 2px; + background: #f2efe7; + transition: transform 0.16s ease, opacity 0.16s ease; +} +.burger-icon::before, +.burger-icon::after { + content: ""; + position: absolute; +} +.burger-icon::before { + transform: translateY(-5.5px); +} +.burger-icon::after { + transform: translateY(5.5px); +} +.burger-icon.open { + background: transparent; +} +.burger-icon.open::before { + transform: rotate(45deg); +} +.burger-icon.open::after { + transform: rotate(-45deg); +} +.appbar-drawer { + display: none; + flex-direction: column; + gap: 2px; + padding: 8px 16px 16px; + border-top: 1px solid rgba(255, 255, 255, 0.1); +} +.appbar-drawer-group { + display: flex; + flex-direction: column; + gap: 2px; + margin-top: 8px; +} +.appbar-drawer-heading { + padding: 6px 12px 2px; + font-size: 0.65625rem; + letter-spacing: 0.14em; + text-transform: uppercase; + color: rgba(242, 239, 231, 0.45); +} +.appbar-drawer-link { + padding: 10px 12px; + border-radius: 8px; + font-size: 0.9375rem; + color: rgba(242, 239, 231, 0.82); +} +.appbar-drawer-link:hover { + background: rgba(255, 255, 255, 0.08); + color: #fff; + text-decoration: none; +} +.appbar-drawer-link.active { + background: rgba(255, 255, 255, 0.13); + color: #fff; + font-weight: 600; +} +.appbar-drawer-user { + margin-top: 12px; + padding: 10px 12px 0; + border-top: 1px solid rgba(255, 255, 255, 0.1); + font-size: 0.78125rem; + color: rgba(242, 239, 231, 0.55); +} +@media (max-width: 980px) { + .appbar-nav { + display: none; + } + .appbar-burger { + display: grid; + } + .appbar-drawer { + display: flex; + } +} .appbar-user { display: flex; align-items: center; gap: 12px; - font-size: 13px; + font-size: 0.8125rem; color: rgba(242, 239, 231, 0.7); } .appbar-user-name { @@ -275,10 +530,11 @@ button { line-height: 1.2; } .appbar-user-role { - font-size: 11px; + font-size: 0.6875rem; color: rgba(242, 239, 231, 0.45); } -@media (max-width: 640px) { +/* Below the drawer breakpoint the drawer carries the user's name/role. */ +@media (max-width: 980px) { .appbar-user .appbar-user-name { display: none; } @@ -313,7 +569,7 @@ button { margin-bottom: 8px; } .inline-form-note { - font-size: 13px; + font-size: 0.8125rem; color: var(--muted, #6b7280); margin: 4px 0 14px; } @@ -382,7 +638,7 @@ button { border-radius: var(--radius-sm); border: 1px solid transparent; padding: 9px 16px; - font-size: 14px; + font-size: 0.875rem; font-weight: 600; line-height: 1; transition: transform 0.12s var(--ease-out-quart), @@ -456,7 +712,7 @@ button { gap: 6px; padding: 3px 9px; border-radius: 999px; - font-size: 12px; + font-size: 0.75rem; font-weight: 600; letter-spacing: 0.01em; line-height: 1.4; @@ -583,7 +839,7 @@ button { } .field-label { display: block; - font-size: 13px; + font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; @@ -591,7 +847,7 @@ button { .input { width: 100%; font-family: inherit; - font-size: 15px; + font-size: 0.9375rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); @@ -679,7 +935,7 @@ button { color: #ecc98d; } .login-lede { - font-size: 16px; + font-size: 1rem; line-height: 1.6; color: rgba(242, 239, 231, 0.82); max-width: 420px; @@ -697,7 +953,7 @@ button { gap: 8px; } .login-foot-note { - font-size: 12.5px; + font-size: 0.78125rem; color: rgba(242, 239, 231, 0.55); } @@ -712,7 +968,7 @@ button { max-width: 380px; } .login-form-title { - font-size: 30px; + font-size: 1.875rem; margin-top: 4px; } .login-error { @@ -721,14 +977,14 @@ button { border: 1px solid rgba(162, 58, 44, 0.28); border-radius: var(--radius-sm); padding: 10px 13px; - font-size: 13.5px; + font-size: 0.84375rem; font-weight: 500; margin-bottom: 18px; } .login-submit { width: 100%; padding: 12px 16px; - font-size: 15px; + font-size: 0.9375rem; } /* ============================================================================ @@ -771,7 +1027,7 @@ button { } .stat-value { font-family: var(--font-display); - font-size: 25px; + font-size: 1.5625rem; font-weight: 560; color: var(--ink); font-feature-settings: "tnum" 1; @@ -781,7 +1037,7 @@ button { color: var(--brand-700); } .stat-label { - font-size: 11.5px; + font-size: 0.71875rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; @@ -809,7 +1065,7 @@ button { top: 50%; transform: translateY(-50%); color: var(--muted-2); - font-size: 16px; + font-size: 1rem; pointer-events: none; } .search-input { @@ -828,7 +1084,7 @@ button { border: none; background: transparent; color: var(--muted); - font-size: 13px; + font-size: 0.8125rem; font-weight: 600; padding: 7px 15px; border-radius: 999px; @@ -855,7 +1111,7 @@ button { } .result-meta { - font-size: 13px; + font-size: 0.8125rem; color: var(--muted); margin-bottom: 12px; } @@ -893,7 +1149,7 @@ button { } .cust-name { font-family: var(--font-display); - font-size: 17px; + font-size: 1.0625rem; font-weight: 560; color: var(--ink); letter-spacing: -0.01em; @@ -919,7 +1175,7 @@ button { apart from a name that was really on the customer record. */ .name-source { font-family: var(--font-sans); - font-size: 10px; + font-size: 0.625rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; @@ -935,7 +1191,7 @@ button { flex-wrap: wrap; gap: 6px 16px; margin-top: 5px; - font-size: 13px; + font-size: 0.8125rem; color: var(--muted); } .cust-sub .sep { @@ -968,7 +1224,7 @@ button { margin-top: 26px; } .pager-info { - font-size: 13px; + font-size: 0.8125rem; color: var(--muted); min-width: 130px; text-align: center; @@ -984,11 +1240,11 @@ button { } .state-box h3 { color: var(--ink-soft); - font-size: 20px; + font-size: 1.25rem; margin-bottom: 6px; } .state-glyph { - font-size: 34px; + font-size: 2.125rem; opacity: 0.5; margin-bottom: 10px; } @@ -998,7 +1254,7 @@ button { color: var(--negative); border-radius: var(--radius); padding: 16px 18px; - font-size: 14px; + font-size: 0.875rem; } .skel-row { @@ -1013,7 +1269,7 @@ button { display: inline-flex; align-items: center; gap: 6px; - font-size: 13.5px; + font-size: 0.84375rem; font-weight: 600; color: var(--muted); margin-bottom: 18px; @@ -1066,7 +1322,7 @@ button { color: rgba(251, 248, 240, 0.55); } .hero-provenance { - font-size: 12.5px; + font-size: 0.78125rem; color: rgba(242, 239, 231, 0.62); margin-top: 8px; font-family: var(--font-mono); @@ -1094,14 +1350,14 @@ button { border-top: 1px solid rgba(255, 255, 255, 0.12); } .hero-fact-label { - font-size: 10.5px; + font-size: 0.65625rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(242, 239, 231, 0.55); font-weight: 600; } .hero-fact-value { - font-size: 15px; + font-size: 0.9375rem; color: #f6f3ec; margin-top: 2px; font-weight: 500; @@ -1141,11 +1397,11 @@ button { background: var(--muted-2); } .section-title { - font-size: 22px; + font-size: 1.375rem; font-weight: 560; } .section-count { - font-size: 13px; + font-size: 0.8125rem; color: var(--muted); font-weight: 600; font-family: var(--font-mono); @@ -1159,7 +1415,7 @@ button { padding: 22px 24px; } .kv-label { - font-size: 11px; + font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); @@ -1167,11 +1423,11 @@ button { margin-bottom: 3px; } .kv-value { - font-size: 14.5px; + font-size: 0.90625rem; color: var(--ink); } .kv-value.mono { - font-size: 14px; + font-size: 0.875rem; } .kv-block { grid-column: 1 / -1; @@ -1189,12 +1445,12 @@ button { } .prop-addr { font-family: var(--font-display); - font-size: 17px; + font-size: 1.0625rem; font-weight: 560; color: var(--ink); } .prop-meta { - font-size: 13px; + font-size: 0.8125rem; color: var(--muted); margin-top: 3px; display: flex; @@ -1226,18 +1482,18 @@ button { } .svc-kind { font-weight: 700; - font-size: 13.5px; + font-size: 0.84375rem; color: var(--servicios-ink); display: flex; align-items: center; gap: 7px; } .svc-glyph { - font-size: 14px; + font-size: 0.875rem; } .svc-detail { margin-top: 7px; - font-size: 12px; + font-size: 0.75rem; color: var(--muted); display: flex; flex-direction: column; @@ -1256,7 +1512,7 @@ button { padding: 13px 15px; } .trust-title { - font-size: 12.5px; + font-size: 0.78125rem; font-weight: 700; color: var(--fideicomiso-ink); text-transform: uppercase; @@ -1267,7 +1523,7 @@ button { display: flex; flex-wrap: wrap; gap: 8px 22px; - font-size: 13px; + font-size: 0.8125rem; } /* ---- policy cards ---- */ @@ -1286,7 +1542,7 @@ button { } .policy-num { font-family: var(--font-mono); - font-size: 18px; + font-size: 1.125rem; font-weight: 600; color: var(--seguros-ink); letter-spacing: -0.01em; @@ -1296,7 +1552,7 @@ button { align-items: center; gap: 8px; margin-top: 5px; - font-size: 13px; + font-size: 0.8125rem; color: var(--muted); flex-wrap: wrap; } @@ -1305,13 +1561,13 @@ button { } .policy-total { font-family: var(--font-display); - font-size: 22px; + font-size: 1.375rem; font-weight: 560; color: var(--ink); font-feature-settings: "tnum" 1; } .policy-total-label { - font-size: 11px; + font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); @@ -1329,7 +1585,7 @@ button { padding: 12px 14px; } .subpanel-title { - font-size: 11px; + font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); @@ -1343,7 +1599,7 @@ button { align-items: center; justify-content: space-between; gap: 10px; - font-size: 13px; + font-size: 0.8125rem; padding: 5px 0; border-bottom: 1px dashed var(--line); } @@ -1356,21 +1612,21 @@ button { border-radius: 50%; background: var(--seguros-tint); color: var(--seguros-ink); - font-size: 11px; + font-size: 0.6875rem; font-weight: 700; display: grid; place-items: center; flex: none; } .mini-list { - font-size: 13.5px; + font-size: 0.84375rem; color: var(--ink-soft); display: flex; flex-direction: column; gap: 5px; } .mini-list .mini-sub { - font-size: 12px; + font-size: 0.75rem; color: var(--muted); } @@ -1406,7 +1662,7 @@ button { display: flex; align-items: center; gap: 7px; - font-size: 12px; + font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; @@ -1414,7 +1670,7 @@ button { } .summary-total { font-family: var(--font-display); - font-size: 22px; + font-size: 1.375rem; font-weight: 560; margin-top: 8px; font-feature-settings: "tnum" 1; @@ -1423,7 +1679,7 @@ button { The track width above is what keeps it inside the card. */ } .summary-count { - font-size: 12px; + font-size: 0.75rem; color: var(--muted); margin-top: 2px; } @@ -1431,11 +1687,11 @@ button { .tx-table { width: 100%; border-collapse: collapse; - font-size: 13.5px; + font-size: 0.84375rem; } .tx-table th { text-align: left; - font-size: 10.5px; + font-size: 0.65625rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); @@ -1496,7 +1752,7 @@ button { color: var(--positive); } .tx-cur { - font-size: 11px; + font-size: 0.6875rem; color: var(--muted); font-weight: 500; } @@ -1505,7 +1761,7 @@ button { } .tx-ref { font-family: var(--font-mono); - font-size: 12.5px; + font-size: 0.78125rem; color: var(--muted); } .tx-scroll { @@ -1535,17 +1791,17 @@ button { background: var(--paper-2); display: grid; place-items: center; - font-size: 15px; + font-size: 0.9375rem; flex: none; color: var(--brand-700); } .doc-type { - font-size: 13.5px; + font-size: 0.84375rem; font-weight: 600; color: var(--ink); } .doc-key { - font-size: 11px; + font-size: 0.6875rem; color: var(--muted-2); font-family: var(--font-mono); word-break: break-all; @@ -1554,12 +1810,12 @@ button { .empty-inline { padding: 22px 24px; color: var(--muted); - font-size: 14px; + font-size: 0.875rem; font-style: italic; } .section-note { - font-size: 12px; + font-size: 0.75rem; color: var(--muted); margin-top: 10px; } @@ -1620,7 +1876,7 @@ button { padding: 0 2px; } .premium-caption { - font-size: 11.5px; + font-size: 0.71875rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; @@ -1634,11 +1890,11 @@ button { .premium-chip strong { font-family: var(--font-mono); font-feature-settings: "tnum" 1; - font-size: 15px; + font-size: 0.9375rem; color: var(--brand-700); } .premium-chip-sub { - font-size: 12px; + font-size: 0.75rem; color: var(--muted); } @@ -1660,7 +1916,7 @@ button { min-width: 0; } .filter-label { - font-size: 11.5px; + font-size: 0.71875rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; @@ -1689,7 +1945,7 @@ button { gap: 9px; } .pol-number { - font-size: 15px; + font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; } @@ -1704,17 +1960,17 @@ button { .pol-premium { font-family: var(--font-mono); font-feature-settings: "tnum" 1; - font-size: 15px; + font-size: 0.9375rem; font-weight: 600; color: var(--ink); } .pol-dates { - font-size: 12px; + font-size: 0.75rem; color: var(--muted); white-space: nowrap; } .pol-phrase { - font-size: 11.5px; + font-size: 0.71875rem; font-weight: 600; } .pol-phrase.expiring { @@ -1750,12 +2006,12 @@ button { } .owner-name { font-family: var(--font-display); - font-size: 19px; + font-size: 1.1875rem; font-weight: 560; margin-bottom: 3px; } .owner-cta { - font-size: 13px; + font-size: 0.8125rem; font-weight: 600; color: var(--brand-600); white-space: nowrap; @@ -1765,7 +2021,7 @@ button { padding: 16px 22px 18px; } .linked-prop { - font-size: 14px; + font-size: 0.875rem; margin-top: 4px; } @@ -1783,14 +2039,14 @@ button { } .veh-title { font-weight: 600; - font-size: 14.5px; + font-size: 0.90625rem; margin-bottom: 6px; } .veh-facts { display: flex; flex-direction: column; gap: 3px; - font-size: 12.5px; + font-size: 0.78125rem; color: var(--muted); } @@ -1836,7 +2092,7 @@ button { box-shadow: inset 0 0 0 1px var(--brand-600); } .mix-glyph { - font-size: 13px; + font-size: 0.8125rem; color: var(--brand-600); } .mix-body { @@ -1847,15 +2103,15 @@ button { .mix-body strong { font-family: var(--font-mono); font-feature-settings: "tnum" 1; - font-size: 14px; + font-size: 0.875rem; color: var(--brand-700); } .mix-label { - font-size: 12.5px; + font-size: 0.78125rem; color: var(--muted); } .mix-inactive { - font-size: 11px; + font-size: 0.6875rem; color: var(--muted); border-left: 1px solid var(--line); padding-left: 8px; @@ -1891,7 +2147,7 @@ button { border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); - font-size: 12px; + font-size: 0.75rem; color: var(--brand-600); } .svc-chip.inactive { @@ -1964,7 +2220,7 @@ button { } .bal-running { font-family: var(--font-mono); - font-size: 12.5px; + font-size: 0.78125rem; font-feature-settings: "tnum" 1; white-space: nowrap; color: var(--ink-soft); @@ -1985,10 +2241,10 @@ button { min-width: 160px; } .bal-side .bal-amount { - font-size: 16px; + font-size: 1rem; } .bal-phrase { - font-size: 11px; + font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; @@ -2005,7 +2261,7 @@ button { /* The customer's other-currency balance, shown so a peso figure is never mistaken for the whole picture. */ .bal-other { - font-size: 11.5px; + font-size: 0.71875rem; color: var(--muted); font-family: var(--font-mono); } @@ -2038,12 +2294,12 @@ button { grid-template-columns: auto 1fr; gap: 1px 8px; margin-top: 8px; - font-size: 12px; + font-size: 0.75rem; align-items: baseline; } .bal-breakdown-label { color: var(--muted); - font-size: 11.5px; + font-size: 0.71875rem; } /* Ledger-wide charge/credit totals in the page header. */ @@ -2058,7 +2314,7 @@ button { } .ledger-chip-cur { font-weight: 700; - font-size: 12px; + font-size: 0.75rem; letter-spacing: 0.06em; color: var(--muted); } @@ -2068,7 +2324,7 @@ button { line-height: 1.3; } .ledger-chip-label { - font-size: 11px; + font-size: 0.6875rem; color: var(--muted); } @@ -2089,7 +2345,7 @@ button { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); - font-size: 12.5px; + font-size: 0.78125rem; color: var(--muted); } .filtered-total-cur { @@ -2129,13 +2385,13 @@ button { border-bottom: none; } .concept-name { - font-size: 13.5px; + font-size: 0.84375rem; font-weight: 600; display: flex; flex-direction: column; } .concept-count { - font-size: 11.5px; + font-size: 0.71875rem; font-weight: 500; color: var(--muted); } @@ -2154,7 +2410,7 @@ button { } .concept-total { text-align: right; - font-size: 13px; + font-size: 0.8125rem; } @media (max-width: 640px) { .concept-row { @@ -2198,7 +2454,7 @@ button { border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; - font-size: 12px; + font-size: 0.75rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; @@ -2225,7 +2481,7 @@ button { } .home-last-seen { margin-top: 14px; - font-size: 13px; + font-size: 0.8125rem; } .home-section { display: flex; @@ -2241,14 +2497,14 @@ button { } .section-title { font-family: var(--font-display); - font-size: 20px; + font-size: 1.25rem; font-weight: 560; margin: 0; color: var(--ink); letter-spacing: -0.005em; } .section-sub { - font-size: 12.5px; + font-size: 0.78125rem; color: var(--muted); } @@ -2286,7 +2542,7 @@ button { box-shadow: var(--shadow-md); } .kpi-label { - font-size: 11.5px; + font-size: 0.71875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); @@ -2294,7 +2550,7 @@ button { } .kpi-primary { font-family: var(--font-display); - font-size: 32px; + font-size: 2rem; font-weight: 560; color: var(--ink); margin-top: 8px; @@ -2310,7 +2566,7 @@ button { display: flex; flex-direction: column; gap: 4px; - font-size: 12.5px; + font-size: 0.78125rem; color: var(--ink-soft); } .kpi-sub li { @@ -2318,7 +2574,7 @@ button { } .kpi-cta { margin-top: 14px; - font-size: 12px; + font-size: 0.75rem; font-weight: 700; color: var(--brand-700); letter-spacing: 0.02em; @@ -2365,7 +2621,7 @@ button { gap: 10px; } .attention-title { - font-size: 12px; + font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); @@ -2373,7 +2629,7 @@ button { } .attention-arrow { color: var(--muted-2); - font-size: 14px; + font-size: 0.875rem; transition: transform 0.18s var(--ease-out-expo), color 0.18s; } .attention-card:hover .attention-arrow { @@ -2382,7 +2638,7 @@ button { } .attention-primary { font-family: var(--font-display); - font-size: 26px; + font-size: 1.625rem; font-weight: 560; color: var(--ink); font-feature-settings: "tnum" 1; @@ -2392,12 +2648,12 @@ button { margin-top: 2px; } .attention-sub { - font-size: 12.5px; + font-size: 0.78125rem; color: var(--ink-soft); line-height: 1.4; } .attention-meta { - font-size: 11.5px; + font-size: 0.71875rem; color: var(--muted); margin-top: 4px; } @@ -2417,7 +2673,7 @@ button { .home-currency-totals-num { font-family: var(--font-display); font-feature-settings: "tnum" 1; - font-size: 20px; + font-size: 1.25rem; font-weight: 560; } @@ -2442,12 +2698,12 @@ button { } .quick-label { font-family: var(--font-display); - font-size: 17px; + font-size: 1.0625rem; font-weight: 560; color: var(--ink); } .quick-sub { - font-size: 12px; + font-size: 0.75rem; color: var(--muted); margin-top: 2px; } @@ -2456,7 +2712,7 @@ button { top: 14px; right: 16px; color: var(--muted-2); - font-size: 14px; + font-size: 0.875rem; transition: transform 0.18s var(--ease-out-expo), color 0.18s; } .quick-link:hover .quick-arrow { @@ -2486,7 +2742,7 @@ button { .report-catalog-title { font-family: var(--font-display); font-weight: 500; - font-size: 20px; + font-size: 1.25rem; color: var(--brand-800); margin: 0; padding-bottom: 6px; @@ -2521,11 +2777,11 @@ button { } .report-catalog-item-title { font-weight: 600; - font-size: 15px; + font-size: 0.9375rem; color: var(--ink); } .report-catalog-item-desc { - font-size: 13px; + font-size: 0.8125rem; color: var(--muted); line-height: 1.4; } @@ -2536,7 +2792,7 @@ button { margin-top: 4px; } .report-catalog-tag { - font-size: 11px; + font-size: 0.6875rem; background: var(--brand-tint); color: var(--brand-800); padding: 2px 8px; @@ -2577,10 +2833,10 @@ button { border: 1px solid #e6b6a4; border-radius: 6px; padding: 10px 14px; - font-size: 13px; + font-size: 0.8125rem; } .report-loading { - font-size: 12px; + font-size: 0.75rem; color: var(--muted); padding: 4px 0; } @@ -2606,7 +2862,7 @@ button { } .btn-sm { padding: 4px 10px; - font-size: 12px; + font-size: 0.75rem; } .report-table-wrap { overflow-x: auto; @@ -2617,7 +2873,7 @@ button { .report-table { width: 100%; border-collapse: collapse; - font-size: 13px; + font-size: 0.8125rem; } .report-table th, .report-table td { @@ -2655,14 +2911,14 @@ button { } .statement-name { font-family: var(--font-display); - font-size: 22px; + font-size: 1.375rem; font-weight: 600; color: var(--ink); margin: 0 0 4px; } .statement-section-title { font-family: var(--font-display); - font-size: 16px; + font-size: 1rem; font-weight: 500; color: var(--brand-800); margin: 0 0 8px; @@ -2692,7 +2948,7 @@ button { } .renewal-letter-title { font-family: var(--font-display); - font-size: 18px; + font-size: 1.125rem; font-weight: 600; color: var(--ink); margin: 0; @@ -2720,7 +2976,7 @@ button { padding-left: 10px; } .renewal-letter-value { - font-size: 14px; + font-size: 0.875rem; font-weight: 600; color: var(--ink); margin: 2px 0 0; @@ -2728,7 +2984,7 @@ button { .renewal-letter-premium { display: flex; gap: 20px; - font-size: 14px; + font-size: 0.875rem; border-top: 1px solid var(--line); padding-top: 10px; } @@ -2755,7 +3011,7 @@ button { margin-left: auto; } .context-reports-label { - font-size: 11px; + font-size: 0.6875rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.06em; @@ -2763,7 +3019,7 @@ button { font-weight: 500; } .context-report-link { - font-size: 12px; + font-size: 0.75rem; padding: 4px 10px; border: 1px solid var(--line); background: var(--surface); diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index 546ca74..47bc66c 100644 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -30,6 +30,17 @@ export default function RootLayout({ children }: { children: ReactNode }) { __html: `window.__API_ORIGIN__=${JSON.stringify(apiOrigin)};`, }} /> + {/* Text-size preference, applied before first paint so the page never + flashes at the default size. Mirrors lib/ui-scale.ts — keep the key + and the clamp in sync with it. */} +