/* Readable at ordinary browser zoom: 16px body text, 14px minimum UI text.
   Only the decorative miniature book retains its small printed lettering. */
:root {
  --side: 252px;
  --ink: #202a2a;
  --muted: #4f5c54;
  font-size: 16px;
}
body { font-size: 16px; line-height: 1.5; }
small { font-size: 14px; }
.sidebar { padding: 30px 20px 22px; }
.brand { font-size: 16px; }
.brand b { font-size: 25px; }
.author-label { font-size: 14px; letter-spacing: .6px; line-height: 1.6; color: #53604e; margin: 21px 0 26px; }
.nav-list button, .setup-nav { font-size: 16px; color: #4c594f; min-height: 48px; }
.nav-count { font-size: 14px; padding: 2px 7px; }
.book-promo p { font-size: 16px; color: #4d5e47; }
.text-link { font-size: 14px; min-height: 44px; }
.local-status { font-size: 14px; line-height: 1.6; color: #526149; padding-left: 8px; }
.breadcrumb, .breadcrumb>span:not(.mobile-logo), .today-label { font-size: 14px; color: #4e5c50; }
.breadcrumb>span:not(.mobile-logo) { letter-spacing: .6px; }
.avatar { width: 40px; height: 40px; font-size: 16px; }
.icon-button { width: 44px; height: 44px; }
.demo-banner { font-size: 14px; color: #655225; line-height: 1.65; padding-top: 12px; padding-bottom: 12px; }
.demo-pill { font-size: 14px; letter-spacing: .4px; padding: 3px 7px; }
.demo-banner>button { font-size: 15px; min-height: 44px; }
.storage-warning { font-size: 16px; }
.heading-sub { font-size: 16px; color: #4e5d4b; line-height: 1.65; }
.eyebrow, .small-caps { font-size: 14px; letter-spacing: 1px; color: #4f5d48; }
.button { font-size: 16px; min-height: 48px; padding: 12px 17px; }
.heading-actions .button { font-size: 15px; }
.period-control { gap: 8px; }
.period-control .icon-button { width: 44px; height: 44px; }
.period-control .icon-button svg { width: 18px; height: 18px; }
.period-label { font-size: 16px; min-width: 170px; }
.period-control .today-button { font-size: 14px; min-height: 44px; padding: 8px 12px; }
.period-hint { font-size: 14px; color: #4d5f47; }
.overview-grid, .lower-grid { grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr); }
.earnings-card { min-height: 270px; }
.card-label { font-size: 16px; }
.earnings-amount { font-size: 58px; }
.earnings-caption { font-size: 16px; color: #584720; line-height: 1.6; }
.goal-row { font-size: 14px; margin-top: 22px; }
.goal-track { height: 6px; }
.quick-card h2 { font-size: 26px; }
.quick-card p { font-size: 16px; color: #4e5e48; }
.quick-card .button { white-space: normal; }
.stat-title { font-size: 15px; color: #4e5e47; line-height: 1.45; }
.stat-value { font-size: 32px; }
.stat-note { font-size: 14px; color: #52614a; line-height: 1.6; }
.panel-heading h2 { font-size: 21px; }
.panel-heading .text-link { font-size: 14px; }
.panel-sub { font-size: 15px; color: #526149; line-height: 1.6; }
.legend { font-size: 14px; color: #4d5e45; }
.chart { grid-template-columns: 48px 1fr; height: 230px; }
.chart-axis { font-size: 14px; color: #4e5f46; }
.chart-day { font-size: 14px; color: #4d5e45; }
.chart-bar>span { font-size: 14px; }
.week-insight { font-size: 15px; color: #4c5f43; line-height: 1.65; }
.recent-name { font-size: 15px; }
.recent-name small { font-size: 14px; color: #52624a; }
.recent-amount { font-size: 16px; }
.date-tile { width: 44px; height: 52px; font-size: 18px; }
.date-tile small { font-size: 14px; color: #4f6046; }
.recent-row { gap: 10px; padding: 16px 0; }
.empty-small, .empty-state p { font-size: 16px; color: #4f6046; }
.onboarding { font-size: 16px; }
.onboarding button { font-size: 16px; }
.app-footer { font-size: 14px; color: #526149; line-height: 1.7; }
.search-wrap input, .filter-bar select, .month-input { font-size: 16px; min-height: 48px; }
table { font-size: 16px; }
th { font-size: 14px; color: #4d6044; padding: 16px 19px; }
td { font-size: 16px; padding: 18px 19px; }
td small { font-size: 14px; color: #52634a; }
td .icon-button { width: 44px; height: 44px; }
td .icon-button svg { width: 19px; height: 19px; }
.table-footer { font-size: 14px; color: #4e6145; }
.pagination button { font-size: 16px; min-width: 44px; min-height: 44px; }
.tabs button { font-size: 16px; min-height: 44px; }
.report-summary .eyebrow { color: #d3dfcb; }
.report-summary p { font-size: 16px; color: #d9e3d3; }
.report-stats { gap: 24px; }
.report-stats small { font-size: 14px; color: #d3e0cb; }
.report-stats strong { font-size: 28px; }
.report-secondary .stat-value { font-size: 28px; }
.report-note { font-size: 15px; color: #4e6045; }
.notes-editor textarea { font-size: 17px; }
.notes-info p, .notes-info ul { font-size: 16px; color: #66542b; }
.notes-link { font-size: 16px; min-height: 44px; }
.settings-card h2 { font-size: 23px; }
.settings-card p { font-size: 16px; color: #4c5f43; }
.settings-footnote { font-size: 14px!important; }
.status-inline, .sample-switch p, .backup-reminder { font-size: 15px; line-height: 1.6; }
.status-inline { color: #276c41; }
.prototype-note { font-size: 16px; color: #675226; }
.inline-button { font-size: 15px; min-height: 44px; }
dialog { width: min(580px, calc(100vw - 28px)); }
.dialog-heading .eyebrow { font-size: 14px; letter-spacing: .6px; }
.dialog-description { font-size: 16px; color: #4e6044; }
label { font-size: 16px; }
label>span { font-size: 14px; color: #506446; }
label input, label textarea { font-size: 17px; min-height: 48px; }
label input::placeholder, label textarea::placeholder { font-size: 16px; color: #67765c; }
.input-prefix>span { top: 13px; font-size: 17px; color: #52634a; }
.optional-fields summary { font-size: 16px; line-height: 1.7; }
.optional-fields summary span { font-size: 14px; color: #506347; }
.device-save { font-size: 14px; color: #506447; }
.form-error, .info-content { font-size: 16px; }
.info-content { color: #4d6043; }
.info-content .fine-print { font-size: 14px; }
#confirm-dialog p { font-size: 16px; color: #4d6043; }
.confirm-actions .button { font-size: 16px; }
.toast { font-size: 16px; }

@media (max-width: 1250px) and (min-width: 851px) {
  :root { --side: 225px; }
  main { padding-left: 28px; padding-right: 28px; }
  .page-heading { flex-wrap: wrap; }
  .heading-actions { flex-wrap: wrap; }
  .overview-grid, .lower-grid { grid-template-columns: minmax(0, 1fr); }
  .quick-card { display: grid; grid-template-columns: 1fr auto; gap: 0 22px; }
  .quick-top { grid-column: 1; }
  .quick-card h2 { grid-column: 1; }
  .quick-card p { grid-column: 1; margin-bottom: 0; }
  .quick-card .button { grid-column: 2; grid-row: 1 / 4; width: auto; margin: auto; }
  .quick-card br { display: none; }
  .period-hint { display: none; }
  .settings-layout { grid-template-columns: 1fr; }
  .report-summary { flex-wrap: wrap; }
  .report-stats { flex: 1; justify-content: space-between; }
  .app-footer { flex-direction: column; gap: 8px; }
}
@media (max-width: 850px) {
  :root { --side: 0px; }
  .mobile-nav button { font-size: 14px; min-width: 52px; min-height: 54px; color: #4f6147; padding: 5px 3px; }
  .mobile-nav .mobile-add { width: 50px; height: 50px; min-height: 50px; min-width: 50px; }
  .settings-layout { grid-template-columns: 1fr; }
  .overview-grid, .lower-grid { grid-template-columns: minmax(0, 1.55fr) minmax(270px, 1fr); }
  .toast { bottom: 108px; }
  .app-footer { padding-bottom: 116px; }
}
@media (max-width: 700px) {
  .overview-grid, .lower-grid { display: flex; flex-direction: column; }
  .notes-layout, .settings-layout { display: flex; flex-direction: column; }
  .quick-card { padding: 23px; }
  .report-summary { display: block; }
  .report-stats { margin-top: 22px; padding-top: 20px; border-top: 1px solid #ffffff30; justify-content: space-between; }
}
@media (max-width: 600px) {
  .topbar { height: 72px; padding: 0 18px; }
  .breadcrumb { gap: 8px; font-size: 14px; }
  .breadcrumb>span:not(.mobile-logo) { font-size: 14px; }
  .breadcrumb>.crumb-separator { display: none; }
  .breadcrumb>span:nth-child(2) { display: none; }
  .top-actions .icon-button { width: 40px; height: 44px; }
  .avatar { width: 36px; height: 36px; font-size: 16px; }
  .demo-banner { display: block; padding: 12px 18px; font-size: 14px; }
  .demo-banner>div { gap: 9px; align-items: flex-start; }
  .demo-banner>div>span:last-child { max-width: none; }
  .demo-pill { font-size: 14px; padding: 2px 6px; margin-top: 0; }
  .demo-banner>button { font-size: 16px; display: block; margin-top: 5px; padding: 6px 0; }
  main { padding: 27px 18px 28px; }
  .page-heading { display: block; margin-bottom: 22px; }
  .page-heading h1 { font-size: 33px; line-height: 1.2; }
  .eyebrow { font-size: 14px; line-height: 1.7; }
  .heading-sub { font-size: 16px; max-width: none; margin-top: 12px; }
  .heading-actions { padding-top: 0; margin-top: 16px; }
  .heading-actions .button { font-size: 16px; min-height: 48px; padding: 12px 16px; }
  .period-control { gap: 6px; }
  .period-label { font-size: 14px; min-width: 137px; line-height: 1.6; }
  .period-control .today-button { font-size: 14px; padding: 8px; }
  .earnings-card { padding: 24px; min-height: 280px; }
  .earnings-amount { font-size: 54px; }
  .card-label { font-size: 16px; }
  .earnings-caption { font-size: 16px; }
  .goal-row { font-size: 14px; gap: 14px; }
  .goal-row>span { max-width: 70%; }
  .hero-art { opacity: .3; right: -35px; }
  .quick-card { display: block; padding: 23px; }
  .small-caps { font-size: 14px; }
  .quick-card h2 { font-size: 24px; line-height: 1.35; margin-top: 9px; }
  .quick-card p { font-size: 16px; line-height: 1.7; margin-top: 10px; }
  .quick-card .button { font-size: 16px; width: 100%; margin-top: 20px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0 22px; }
  .stats-grid>.stat-card:last-child { grid-column: 1 / -1; }
  .stat-card { padding: 20px 16px; }
  .stat-title { font-size: 15px; min-height: 0; margin-bottom: 12px; }
  .stat-value { font-size: 30px; }
  .stat-note { font-size: 14px; line-height: 1.65; }
  .stats-grid>.stat-card:last-child .stat-icon { display: grid; }
  .panel-heading { flex-wrap: wrap; gap: 8px; padding: 22px 18px 0; }
  .panel-heading h2 { font-size: 21px; }
  .panel-heading .text-link { font-size: 14px; }
  .panel-sub { font-size: 15px; padding: 8px 18px 0; }
  .legend { font-size: 14px; }
  .chart { height: 225px; grid-template-columns: 42px 1fr; gap: 5px; margin: 25px 15px 17px; }
  .chart-axis, .chart-day, .chart-bar>span { font-size: 14px; }
  .chart-plot { gap: 4px; }
  .week-insight { font-size: 15px; margin: 0 18px 22px; }
  .recent-name { font-size: 15px; }
  .recent-name small { font-size: 14px; }
  .recent-amount { font-size: 16px; }
  .date-tile { width: 42px; height: 51px; }
  .recent-list { padding-left: 18px; padding-right: 18px; }
  .search-wrap input, .filter-bar select, .month-input { font-size: 16px; }
  .filter-bar .button { font-size: 16px; }
  th { font-size: 14px; padding: 15px; }
  td { font-size: 16px; padding: 16px 15px; }
  td small { font-size: 14px; }
  .table-footer { font-size: 14px; flex-wrap: wrap; gap: 16px; }
  .tabs button { font-size: 16px; padding: 9px 12px; }
  .report-toolbar .period-control { width: 100%; justify-content: flex-start; }
  .report-toolbar .month-input { max-width: none; font-size: 16px; }
  .report-stats { gap: 14px; flex-wrap: wrap; }
  .report-stats small { font-size: 14px; }
  .report-stats strong { font-size: 26px; }
  .report-summary p { font-size: 16px; }
  .report-secondary { gap: 12px; }
  .report-secondary .stat-card { padding: 20px 15px; }
  .report-secondary .stat-title { font-size: 15px; }
  .report-secondary .stat-value { font-size: 27px; }
  .report-secondary .stat-note { font-size: 14px; }
  .report-note { font-size: 15px; }
  .notes-info p, .notes-info ul, .settings-card p { font-size: 16px; }
  .notes-editor textarea { font-size: 17px; }
  .notes-editor .dialog-bottom { flex-wrap: wrap; }
  .settings-layout { gap: 20px; }
  .settings-card h2 { font-size: 23px; }
  .sample-switch { flex-wrap: wrap; }
  .sample-switch p, .status-inline { font-size: 15px; }
  .prototype-note, .onboarding, .onboarding button { font-size: 16px; }
  .app-footer { flex-direction: column; padding: 2px 18px 120px; gap: 8px; font-size: 14px; }
  .mobile-nav { padding-left: 6px; padding-right: 6px; }
  .mobile-nav button { font-size: 14px; min-width: 56px; min-height: 58px; }
  .mobile-nav .mobile-add { min-width: 48px; width: 48px; margin: 0; }
  dialog { padding: 24px 20px; }
  .dialog-heading .eyebrow { font-size: 14px; }
  .dialog-heading h2 { font-size: 28px; }
  .dialog-description { font-size: 16px; }
  label { font-size: 16px; }
  label>span { font-size: 14px; }
  label input, label textarea { font-size: 17px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .optional-fields summary span { display: block; margin-left: 0; font-size: 14px; }
  .dialog-bottom { flex-wrap: wrap; gap: 15px; }
  .dialog-bottom .button { font-size: 16px; }
  .device-save { font-size: 14px; }
  .confirm-actions { flex-wrap: wrap; }
  .confirm-actions .button { font-size: 16px; }
  .toast { font-size: 16px; bottom: 108px; }
}
@media print {
  body, table, td { font-size: 14px; }
  th, td small { font-size: 12px; }
  .report-stats small { color: #333; }
}
