/* rem text keeps the browser's preferred default size and scales without zooming the viewport. */
html[data-text-size=normal] { font-size: 100%; }
html[data-text-size=large] { font-size: 125%; }
html[data-text-size=extra-large] { font-size: 150%; }
.text-size-menu { position: relative; margin-left: auto; flex-shrink: 0; }
.text-size-menu summary { display: grid; place-items: center; min-width: 44px; min-height: 44px; cursor: pointer; list-style: none; font-size: 1rem; font-weight: 700; border-radius: 8px; }
.text-size-menu summary::-webkit-details-marker { display: none; }
.text-size-menu[open] summary { background: #edeae3; }
.text-size-menu .text-size-panel { position: absolute; right: 0; top: 100%; z-index: 90; width: min(17rem, calc(100vw - 24px)); margin: 8px 0 0; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 28px #0002; }
.text-size-menu fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.text-size-menu legend { max-width: 100%; padding: 0; margin-bottom: 8px; font-weight: 700; }
.text-size-menu label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 0; cursor: pointer; }
.text-size-menu input { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--brand-strong); }
.text-size-menu small { display: block; color: var(--muted); line-height: 1.5; }
.topbar .help-menu, .topbar #notificationBell { margin-left: 0; }
@media (max-width: 759px) {
  .text-size-menu .text-size-panel { position: fixed; top: 56px; right: 12px; width: calc(100vw - 24px); max-height: calc(100dvh - 80px); overflow-y: auto; }
  .topbar .brand-logo { max-width: 30%; }
  .mobile-home-new { flex-shrink: 0; white-space: nowrap; }
  .topbar { min-height: 56px; height: auto; }
  html:not([data-text-size=normal]) .bottom-nav .nav-label { white-space: normal; line-height: 1.3; }
}
@media print { html[data-text-size] { font-size: 100%; } .text-size-menu { display: none; } }
