/* Ironflow Grid shared typography system
   Approved reference: Dashboard and Command Center.
   Keep future pages on this seven-step scale instead of adding one-off sizes. */
:root{
  --ifg-font-sans:"Segoe UI",Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Arial,sans-serif;
  --ifg-type-caption:12px;
  --ifg-type-compact:13px;
  --ifg-type-body:14px;
  --ifg-type-card:16px;
  --ifg-type-section:18px;
  --ifg-type-page:24px;
  --ifg-type-display:28px;
  --ifg-leading-tight:1.2;
  --ifg-leading-body:1.45;
}

html{font-size:16px;}
body,.premium-app,button,input,select,textarea{
  font-family:var(--ifg-font-sans)!important;
  font-kerning:normal;
  font-synthesis:none;
}
body,.premium-app{
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Shared app chrome. These values mirror the approved pages. */
.premium-app .topbar h1{
  font-size:var(--ifg-type-page)!important;
  line-height:var(--ifg-leading-tight)!important;
  letter-spacing:-.015em!important;
}
.premium-app .topbar .muted{
  font-size:var(--ifg-type-caption)!important;
  line-height:var(--ifg-leading-body)!important;
}
.premium-app .tab-button,
.premium-app .proposal-nav-group .subnav button{
  font-size:var(--ifg-type-compact)!important;
}

/* Pages still being standardized. Dashboard, Command Center, and Leads stay locked. */
:is(
  .ironflow-calendar-page,
  .customers-reference-page,
  .customer-directory-reference-page,
  .proposal-reference-page,
  .quick-proposal-studio,
  .painting-module-shell,
  .jobs-command-page,
  .invoice-reference-page,
  .reports-center-page,
  .workspace-settings
){
  font-size:var(--ifg-type-body)!important;
  line-height:var(--ifg-leading-body)!important;
}

:is(
  .ironflow-calendar-page,
  .customers-reference-page,
  .customer-directory-reference-page,
  .proposal-reference-page,
  .quick-proposal-studio,
  .painting-module-shell,
  .jobs-command-page,
  .invoice-reference-page,
  .reports-center-page,
  .workspace-settings
) :where(button,input,select,textarea){
  font-size:var(--ifg-type-compact)!important;
  line-height:1.3!important;
}

:is(
  .ironflow-calendar-page,
  .customers-reference-page,
  .customer-directory-reference-page,
  .proposal-reference-page,
  .quick-proposal-studio,
  .painting-module-shell,
  .jobs-command-page,
  .invoice-reference-page,
  .reports-center-page,
  .workspace-settings
) :where(h2){
  font-size:var(--ifg-type-page)!important;
  line-height:var(--ifg-leading-tight)!important;
  letter-spacing:-.015em!important;
}

:is(
  .ironflow-calendar-page,
  .customers-reference-page,
  .customer-directory-reference-page,
  .proposal-reference-page,
  .quick-proposal-studio,
  .painting-module-shell,
  .jobs-command-page,
  .invoice-reference-page,
  .reports-center-page,
  .workspace-settings
) :where(h3){
  font-size:var(--ifg-type-section)!important;
  line-height:1.25!important;
  letter-spacing:-.01em!important;
}

:is(
  .ironflow-calendar-page,
  .customers-reference-page,
  .customer-directory-reference-page,
  .proposal-reference-page,
  .quick-proposal-studio,
  .painting-module-shell,
  .jobs-command-page,
  .invoice-reference-page,
  .reports-center-page,
  .workspace-settings
) :where(h4){
  font-size:var(--ifg-type-card)!important;
  line-height:1.3!important;
}

:is(
  .ironflow-calendar-page,
  .customers-reference-page,
  .customer-directory-reference-page,
  .proposal-reference-page,
  .quick-proposal-studio,
  .painting-module-shell,
  .jobs-command-page,
  .invoice-reference-page,
  .reports-center-page,
  .workspace-settings
) :where(p,li,td,label){
  font-size:var(--ifg-type-body)!important;
  line-height:var(--ifg-leading-body)!important;
}

:is(
  .ironflow-calendar-page,
  .customers-reference-page,
  .customer-directory-reference-page,
  .proposal-reference-page,
  .quick-proposal-studio,
  .painting-module-shell,
  .jobs-command-page,
  .invoice-reference-page,
  .reports-center-page,
  .workspace-settings
) :where(small,.eyebrow,th,caption){
  font-size:var(--ifg-type-caption)!important;
  line-height:1.35!important;
}

/* Dense estimator/table rows use one compact size, never sub-12px text. */
:is(.painting-module-shell,.quick-proposal-studio,.proposal-reference-page,.invoice-reference-page)
  :where(th,.meta,small){
  font-size:var(--ifg-type-caption)!important;
  line-height:1.35!important;
}

/* Preserve the readable caption size without squeezing Calendar focus cards. */
.ironflow-calendar-page .calendar-focus-grid{
  grid-template-columns:minmax(168px,1.25fr) repeat(8,minmax(96px,1fr))!important;
}

@media(max-width:1400px){
  .ironflow-calendar-page .calendar-focus-strip{
    grid-template-columns:1fr!important;
    min-width:0!important;
    overflow:hidden!important;
  }
  .ironflow-calendar-page .calendar-focus-date{display:none!important;}
  .ironflow-calendar-page .calendar-focus-grid{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    /* The first card carries the longest one-line helper, "Appointments".
       Give only that card the room it needs and keep the other tracks compact. */
    grid-template-columns:168px repeat(8,136px)!important;
    overflow-x:auto!important;
    overscroll-behavior-x:contain;
    scrollbar-width:thin!important;
  }
}

@media(max-width:760px){
  .premium-app .topbar h1{font-size:21px!important;}
  :is(
    .ironflow-calendar-page,
    .customers-reference-page,
    .customer-directory-reference-page,
    .proposal-reference-page,
    .quick-proposal-studio,
    .painting-module-shell,
    .jobs-command-page,
    .invoice-reference-page,
    .reports-center-page,
    .workspace-settings
  ) :where(h2){font-size:21px!important;}
}
/* The new-project customer step stays compact so the familiar estimator remains visible. */
body .proposal-page.fresh-project-builder-page{display:block!important;min-height:0!important;}
