/* Chop Shop Racing — unified full-browser layout & +10% readability.
 * Loaded in templates/base.html for all routes, including nested admin,
 * channels, topics, search and league subpages.
 * No transforms/zoom: photos, icons and controls stay properly aligned.
 */
:root { --csr-page-gutter:clamp(12px,2vw,38px); }
html { font-size:110%; }
body { font-size:16.5px; }

/* The old shared main max-width of 1180px is the original page bottleneck. */
body main {
  box-sizing:border-box!important;
  display:block;
  max-width:none!important;
  width:100%!important;
  min-width:0;
  margin:0 auto!important;
  padding:clamp(16px,1.6vw,30px) var(--csr-page-gutter) 76px!important;
  font-size:16.5px!important;
}

/* Full-width top-level page containers, without expanding modals, popovers,
 * form controls, centered dialog boxes, or side panels. */
body main > :is(section,article,div.page,div.container,div.content,div[class$="-shell"],
                 div[class$="-wrap"],div[class$="-container"],div[class$="-page"],
                 div[class$="-layout"],div[class$="-hub"],div[class$="-center"]),
body main > section > :is(.container,[class$="-shell"],[class$="-wrap"],[class$="-container"]),
body main > div > :is(.container,[class$="-shell"],[class$="-wrap"],[class$="-container"]) {
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  min-width:0;
}

/* Recurring named full-page wrappers from standalone and older sections. */
body main :is(
  .results5-shell,.results4-shell,.career5-shell,.legacy5-shell,
  .owner2-shell,.auto5-shell,.usage-shell,.home4-shell,
  .search-v2-box,.search-v2-group,.search-page-card,.search-results,
  .series73,.series-hero,.csr-projections,.v48-home-layout,
  .v48-event-strip,.v48-story-rail,.v48-section,.v48-home-main,
  .race-week-section,.race-week-insights,.race-week-quick-grid,
  .live-race-broadcast,.live-race-broadcast-link,.live-race-story,.live-race-grid,
  .results5-grid,.race-media-wrap,.health-wrap,
  .update-all-shell,.recap-center-grid,.discord-layout,.discord-feed,
  .discord-channel-list,.record-hero,.championship-hero,
  .video-grid,.photo-grid,.quick-access-grid
) {
  box-sizing:border-box!important;
  max-width:none!important;
  min-width:0;
}

/* Main content card and grids occupy all space available to their parent.
 * Intentionally avoid globally applying width:100% to cards in grid columns. */
body main :is(.pagehead,.global-breadcrumbs,.p19-context-bar,
  .results5-hero,.results5-series-tabs,.results5-feed-head,
  .results5-filter-card,.search-v2-box,.search-v2-group,
  .v48-section,.v48-event-strip,.live-race-story) {
  max-width:none!important;
  min-width:0;
}
body main :is(.grid,.search-results,.results5-grid,.quick-access-grid,
  .discord-layout,.v48-home-layout,.race-week-insights) > * {
  min-width:0;
}

/* Older modules with their own centered max-width (Race Week, search,
 * Discord navigation, registry, league admin and personal dashboards). */
body main :is(
  .ux3-personal-home,.race-week-hero,.race-week-header,
  .race-week-quick-grid,.search-v2-hero,.search-v2-summary,
  .mycs-shell,.mychop6-shell,.mychop6-checkin,.mychop6-accountability,
  .master-drivers-shell,.series-control-shell,.truck7-shell,
  .data-health-shell,.backup2-shell,.security2-shell,
  .identity75-shell,.social76-shell,.owner77-shell,
  .rd86-shell,.aw87-shell,.ai89-shell,.ai89-preview,
  .companion-overview,.update-all-hero,.update-all-report,
  .series82-shell,.intel130-shell,.intel169-shell,
  .site-banner,.series-identity
) {max-width:none!important;width:100%!important;box-sizing:border-box;min-width:0;}
body :is(header,.v4-topbar,.login-status-bar,.subnav-wrap) {
  box-sizing:border-box;
  width:100%;
  max-width:none;
}
body :is(.subnav,.v4-topbar,.login-status-inner,.admin-quick-access-inner) {
  max-width:none!important;
  box-sizing:border-box;
}
body header {padding-inline:var(--csr-page-gutter);}
body .subnav {width:100%;padding-inline:var(--csr-page-gutter);}
body main > :is(.home4-shell,.ux3-personal-home,.race-week-section,
  .series-control-shell,.master-drivers-shell) {
  max-width:none!important;width:100%!important;
}

/* Readability floor for common controls and fine print. Fixed-size custom
 * scoreboard components keep their existing type hierarchy. */
body :is(input,select,textarea,button) { font-family:inherit; }
body main :is(input,select,textarea) { font-size:max(15px,0.96em); }
body main :is(.btn,button) { font-size:max(14px,0.93em); }
body main table { font-variant-numeric:tabular-nums; }
body main th { font-size:max(12.1px,0.75em); line-height:1.45; }
body main td { line-height:1.52; }
body main :is(p,li,dd,dt) { line-height:1.53; }
body main :is(small,.muted,.caption) { line-height:1.48; }
body main .eyebrow {font-size:13.2px;}

/* The shared headings and navigation use fixed pixel type, so they need
 * explicit 1.10 multipliers rather than relying on the inherited body size. */
body main .pagehead h1 {font-size:46.2px;}
body main .hero h1 {font-size:clamp(39.6px,6.6vw,70.4px);}
body main .hero p {font-size:19.8px;}
body .ux3-nav>a,body .ux3-nav>details>summary {font-size:14.3px;}
body .subnav a {font-size:14.3px;}
body main .next-race h2 {font-size:33px;}
body main .eyebrow {font-size:13.2px;}
@media(max-width:560px) {
  body main .pagehead h1 {font-size:clamp(31px,8vw,46.2px);}
}

/* Main standings: their compact dedicated 12–18px sizes were individually
 * tuned earlier. Increase those figures 10% as requested. */
body main :is(.movement-standings,.ng-nascar-standings,.truck7-shell table,
 .upgraded-standings,.nationals-nascar-table) th {
  font-size:clamp(13.2px,.869vw,16.5px)!important;
}
body main :is(.movement-standings,.ng-nascar-standings,.truck7-shell table,
 .upgraded-standings,.nationals-nascar-table) td {
  font-size:clamp(16.5px,1.078vw,19.8px)!important;
}
body main :is(.movement-standings,.ng-nascar-standings,.truck7-shell table,
 .upgraded-standings,.nationals-nascar-table) :is(.move-badge,.standings-penalty-badge) {
  font-size:clamp(12.1px,.77vw,14.3px)!important;
}
/* Career leaderboard: replace its earlier +5% overrides with +10% values. */
body:has(.career5-hero) main .career5-table .career-row {
  font-size:clamp(12.1px,.88vw,15.4px)!important;
}
body:has(.career5-hero) main .career5-table .career-head {
  font-size:12.1px!important;
}
body:has(.career5-hero) main .career5-table .career-driver b {
  font-size:clamp(14.3px,1.045vw,17.6px)!important;
}
/* Search results, channel/message text and context navigation. */
body main :is(.search-result,.search-result-card,.discord-message-card,
  .discord-channel,.channel-actions,.search-v2-group) {
  font-size:1.1rem;
}
body main :is(.global-breadcrumbs,.p19-context-bar) {
  font-size:1rem;
}

/* Keep tables usable on phones without forcing a page-wide horizontal bar. */
body main :is(.card,.table-wrap,.table-scroll,.trend-scroll,
  .career5-table,.legacy5-board,.recap-filter-card) {
  max-width:100%;
}
body main :is(.table-wrap,.table-scroll,.trend-scroll,
  .career5-table,.legacy5-board) {overflow-x:auto;}
@media(max-width:820px) {
  :root { --csr-page-gutter:12px; }
  body main {padding:15px 12px 58px!important;}
  body main :is(.grid.two,.v48-home-layout,.live-race-grid) {
    grid-template-columns:minmax(0,1fr);
  }
}
@media(max-width:560px) {
  body main {font-size:16px!important;}
  body main :is(.pagehead,.cardhead) {flex-wrap:wrap;}
  body main :is(.results5-hero,.series-hero) {min-width:0;}
}
