/* Screen typography only. Document text, export strings, and editable values keep
   their authored case. The printed, long-form guide retains its print typography. */
@layer stone-city {
@media screen {
  html #root :is(#hub-main,.app-shell,.welcome-screen),
  html #root :is(#hub-main,.app-shell,.welcome-screen) :where(
    h1,h2,h3,h4,h5,h6,p,span,strong,b,em,small,div,header,footer,section,aside,
    a,button,label,legend,select,optgroup,option,li,dt,dd,th,td,caption,figcaption,
    summary,output,time,abbr,mark,sub,sup,text,tspan
  ) { text-transform: uppercase !important; }

  html #root :is(#hub-main,.app-shell,.welcome-screen) :is(input,textarea,[contenteditable]:not([contenteditable="false"])),
  html #root :is(#hub-main,.app-shell,.welcome-screen) [contenteditable]:not([contenteditable="false"]) * {
    text-transform: none !important;
  }
  html #root :is(.app-shell,.welcome-screen) :is(input,textarea)::placeholder { text-transform: uppercase; }

  html #root #hub-main .hub-flow-header h1,
  html #root .welcome-screen h1,
  html[data-hub-theme] body > .guide-header h1 {
    font-size: clamp(1.65rem,3.25vw,3rem) !important;
    font-weight: 650 !important; line-height: 1.12 !important;
    letter-spacing: -.026em !important;
    overflow-wrap: anywhere;
  }
  html #root #hub-main :is(.panel-heading,.hub-production-heading,.team-hub-section-heading,.daily-report-heading) :is(h2,h3),
  html #root #hub-main .hub-help-panel > h2 {
    font-size: clamp(1.04rem,1.6vw,1.38rem) !important;
    line-height: 1.27 !important; letter-spacing: -.008em !important;
    white-space: normal; overflow-wrap: anywhere;
  }
  html #root #hub-main .hub-flow-header p,
  html #root #hub-main .hub-agent-help :is(p,li,td),
  html #root .welcome-screen > p {
    line-height: 1.55 !important; letter-spacing: .008em;
  }
  html #root #hub-main :is(.metric-label,.team-hub-kpi-label,.eyebrow,.hub-flow-stat dt,.team-hub-section-heading p) {
    letter-spacing: .035em !important;
  }
  html #root .app-shell :is(.hub-flow-nav-link,.hub-board-actions button,.hub-global-select select,.hub-flow-actions button,.hub-flow-actions a) {
    letter-spacing: .01em !important;
  }
  html #root .hub-nav-sidebar .hub-flow-nav-link > span,
  html #root #hub-main :is(.hub-mobile-podium-name,.team-hub-person strong,.agent-link strong) {
    min-inline-size: 0; max-inline-size: 100%; white-space: normal !important;
    overflow-wrap: anywhere;
  }

  /* The former three-period grid now holds just one report. Its border box belongs
     on the same page edges as Conversion rates, including on short landscape pages. */
  html #root #hub-main > .averages-grid.hub-global-trending {
    display: block !important; align-self: stretch; box-sizing: border-box;
    min-inline-size: 0; inline-size: 100%; max-inline-size: 100%;
    margin-inline: 0 !important; padding: 0 !important; border: 0 !important;
  }
  html #root #hub-main > .hub-global-trending > .average-panel {
    box-sizing: border-box; inline-size: 100%; max-inline-size: 100%;
    min-inline-size: 0; margin: 0 !important;
    padding: var(--sc-padding,16px) !important;
  }
  html #root #hub-main .team-hub-insights {
    grid-template-columns: minmax(0,1fr) !important; align-self: stretch;
    box-sizing: border-box; min-inline-size: 0; inline-size: 100%; margin-inline: 0 !important;
  }
  html #root #hub-main .team-hub-insights > .panel {
    box-sizing: border-box; min-inline-size: 0; inline-size: 100%; margin-inline: 0 !important;
  }
  html #root #hub-main :is(.average-rows,.team-hub-averages) > div {
    min-inline-size: 0; column-gap: 12px;
  }
  html #root #hub-main :is(.average-rows,.team-hub-averages) :is(span,dt,dd,strong) {
    min-inline-size: 0; overflow-wrap: anywhere;
  }

  html[data-hub-theme] body > .guide-header :is(h1,a,button),
  html[data-hub-theme] body > .hub-agent-help :is(h2,h3,h4,th,dt,.hub-help-step) {
    text-transform: uppercase !important;
  }
  html[data-hub-theme] body > .hub-agent-help :is(p,li,td) { line-height: 1.6; }
}
@media screen and (min-width:1000px) {
  html #root #hub-main .hub-global-trending .average-rows,
  html #root #hub-main .team-hub-insights .team-hub-averages {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 30px;
  }
}
@media screen and (max-width:760px), screen and (max-width:960px) and (max-height:540px) and (orientation:landscape) {
  html #root #hub-main .hub-flow-header h1 {
    font-size: clamp(1.35rem,5.4vw,1.85rem) !important; letter-spacing: -.022em !important;
  }
  html #root .app-shell .topbar :is(.hub-log-action,.hub-phone-refresh,.hub-phone-signout) {
    font-size: clamp(.75rem,3vw,.8125rem) !important; letter-spacing: .005em !important;
  }
  html #root .app-shell .topbar .hub-global-select select { font-size: 16px !important; letter-spacing: 0 !important; }
  html #root .app-shell .hub-nav-bottom .hub-flow-nav-link { font-size: .75rem !important; line-height: 1.15 !important; }
  html #root .app-shell .hub-nav-bottom .hub-flow-nav-link > span { letter-spacing: 0 !important; }
  html #root .app-shell .hub-nav-bottom .hub-nav-list:has(> li:nth-child(5)) {
    grid-template-columns: minmax(0,1.14fr) minmax(0,1.14fr) minmax(0,1.06fr) minmax(0,.78fr) minmax(0,.88fr);
  }
  html #root #hub-main .hub-board-actions .text-button { font-size: .77rem !important; }
}
@media screen and (max-width:619px) {
  html #root .app-shell .topbar .hub-global-picker {
    grid-template-columns: minmax(min(100%,11.5rem),1.4fr) minmax(0,1fr);
  }
}
}

@layer stone-city {
@media screen {
  /* The official targets panel immediately precedes Team Hub's averages. */
  html #root #hub-main .team-hub > .hub-org-targets:has(+ .team-hub-insights) {
    align-self: stretch; box-sizing: border-box;
    inline-size: 100%; min-inline-size: 0; max-inline-size: 100%;
  }
}
@media screen and (max-width:760px), screen and (max-width:960px) and (max-height:540px) and (orientation:landscape) {
  html #root #hub-main:is([data-hub-route-content="leaderboard"],[data-hub-route-content="averages"]) > .hub-flow-header {
    grid-template-columns: minmax(0,1fr) fit-content(38%); gap: 3px 6px !important;
  }
  html #root #hub-main:is([data-hub-route-content="leaderboard"],[data-hub-route-content="averages"]) .hub-flow-header p {
    font-size: .8rem !important; line-height: 1.36 !important; letter-spacing: .005em;
    max-inline-size: none; margin: 0 !important;
  }
  html #root #hub-main:is([data-hub-route-content="leaderboard"],[data-hub-route-content="averages"]) .hub-flow-actions .btn {
    font-size: .78rem !important; line-height: 1.2 !important; gap: 5px !important;
    letter-spacing: 0 !important; padding-inline: 8px !important;
  }
  /* Allow a long coverage label to wrap inside the caption before the toolbar
     displaces the first performer. Both controls retain their full touch targets. */
  html #root #hub-main .hub-standings-first .hub-board-toolbar {
    display: grid !important; grid-template-columns: minmax(0,1fr) auto;
    align-items: center; gap: 0 5px !important;
  }
  html #root #hub-main .hub-board-caption p { font-size: .75rem !important; line-height: 1.22; }
}
@media screen and (max-width:480px) {
  html #root .app-shell .hub-nav-utility:has(.hub-nav-secondary > li:nth-child(2)) {
    grid-template-columns: minmax(0,1fr) fit-content(71%); gap: 4px;
  }
  html #root .app-shell .hub-nav-utility .hub-nav-secondary:has(> li:nth-child(2)) {
    display: grid !important; grid-template-columns: minmax(0,1fr) auto;
    align-items: center; gap: 2px; max-inline-size: 100%;
  }
  html #root .app-shell .hub-nav-utility .hub-nav-secondary .hub-flow-nav-link > span {
    min-inline-size: 0; white-space: normal !important; overflow-wrap: anywhere;
  }
}
}
