/* Scroll the introductory titles away while retaining dates and navigation. */
:root{--nav-height:48px;--live-height:0px;--intro-collapse:0px;--billing-height:130px}
body>header{position:sticky;top:0;z-index:40;height:var(--nav-height);min-height:var(--nav-height);padding:4px 18px;background:var(--paper)}
body>header .brand{font-size:17px;gap:8px}
body>header .brandmark{width:28px;height:28px;border-radius:8px}
body>header .calculator-mark svg{width:21px;height:21px}
body>header .brand small{font-size:6px;margin-top:2px}
body>header .nav{min-height:32px;padding:7px 12px;font-size:11px}
body.calculator-view{height:auto;overflow:auto}
#calculator{display:block;height:auto;padding-bottom:calc(56px + var(--live-height) + env(safe-area-inset-bottom))}
#calculator .intro{position:sticky;top:calc(var(--nav-height) - var(--intro-collapse));z-index:30;background:var(--paper);margin:0}
#calculator .workspace{height:calc(100dvh - var(--nav-height) - var(--billing-height) - 56px - var(--live-height) - env(safe-area-inset-bottom));min-height:180px}
#calculator .sidebar-scroll,#calculator .editor-scroll,#calculator .results-scroll{overscroll-behavior-y:auto}
#calculator.show-results .intro{display:none}
#calculator.show-results .workspace{height:calc(100dvh - var(--nav-height) - 56px - var(--live-height) - env(safe-area-inset-bottom))}
@media(max-width:1049px){:root{--live-height:78px}}
@media(max-width:680px){
  :root{--nav-height:72px}
  body>header{flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;padding:4px 10px}
  body>header .brand{font-size:15px}
  body>header .brandmark{width:24px;height:24px}
  body>header .brand small{display:none}
  body>header nav{width:100%;justify-content:space-between;gap:3px}
  body>header .nav{font-size:10px;padding:6px 9px}
}

/* History collapses its title before scrolling records, retaining backup controls. */
:root{--history-collapse:0px;--history-controls-height:64px}
body.history-view{height:auto;overflow:auto}
#history.view{padding-bottom:calc(56px + env(safe-area-inset-bottom))}
#history .history-intro{position:sticky;top:calc(var(--nav-height) - var(--history-collapse));z-index:30;background:var(--paper);padding-bottom:12px}
:is(#history,#guide,#about) .page-heading{max-width:none;padding:12px 0}
:is(#history,#guide,#about) .page-heading .eyebrow{display:none}
:is(#history,#guide,#about) .page-heading h1{font-size:25px;line-height:1.25;letter-spacing:-.8px;margin:3px 0}
:is(#history,#guide,#about) .page-heading p{font-size:11px;line-height:1.65;margin:4px 0 0}
#history .history-actions{margin:0}
#history-list{height:calc(100dvh - var(--nav-height) - var(--history-controls-height) - 56px - env(safe-area-inset-bottom));min-height:180px;overflow-y:auto;scrollbar-width:thin;overscroll-behavior-y:auto}
@media(max-width:600px){:is(#history,#guide,#about) .page-heading{padding:9px 0}:is(#history,#guide,#about) .page-heading h1{font-size:20px;line-height:1.3;letter-spacing:-.4px}:is(#history,#guide,#about) .page-heading p{font-size:10px;line-height:1.4}}

/* Informational pages use the same compact title and title-first scrolling. */
:is(#guide,#about).view{padding-bottom:calc(56px + env(safe-area-inset-bottom))}
#about{max-width:none;margin:0}
:is(#guide,#about) .page-scroll{height:calc(100dvh - var(--nav-height) - 64px - env(safe-area-inset-bottom));min-height:180px;overflow-y:auto;scrollbar-width:thin;overscroll-behavior-y:auto}
