/* Shared layout corrections; source typography floors live in site/core.css. */
:root { --tc-sticky-height:170px; --tc-bottom-height:0px; }
/* Source-panel styles also set fixed margins; the measured shared offset wins. */
main [id], .tc-dashboard__main > section { scroll-margin-block-start:calc(var(--tc-sticky-height) + 16px) !important; }
.tc-dashboard__welcome h1 { margin:.35rem 0; font-family:Georgia,serif; font-size:clamp(2rem,4vw,3.6rem); }
.tc-assigned-card__foot { flex-wrap:wrap; }
.tc-assigned-card__foot a { display:inline-flex; align-items:center; justify-content:center; min-block-size:44px; min-inline-size:44px; padding:.5rem .8rem; border:1px solid #bacdc5; border-radius:.65rem; font-size:.875rem; }
.tc-header-foundation .tc-shell { flex-wrap:wrap; gap:.5rem 1rem; padding-block:.35rem; white-space:normal; line-height:1.4; }
.tc-gateway-nav small, .tc-header-actions__learn small { display:none; }
.tc-mobile-drawer__secondary a, .tc-footer nav > a, .tc-toc__list a { display:flex; align-items:center; min-block-size:44px; padding-block:.35rem; }
.tc-breadcrumbs a { display:inline-flex; align-items:center; min-block-size:24px; }
.tc-mobile-drawer__principle { line-height:1.7; }
.tc-menu-is-open #tc-consent-panel { visibility:hidden; }
html #tc-consent-panel { bottom:calc(var(--tc-bottom-height) + 12px); max-height:calc(100dvh - var(--tc-sticky-height) - var(--tc-bottom-height) - 24px); overscroll-behavior:contain; }
.tc-eyebrow, .tc-supporter-slider__country, .tc-supporter-slider__hint, .tc-supporter-slider__controls :is(button,span) { font-size:max(12px,.75rem) !important; }
.tc-share-launcher { bottom:calc(var(--tc-bottom-height) + 12px); }
@media(max-width:700px) {
  :root { --tc-sticky-height:88px; --tc-bottom-height:calc(60px + env(safe-area-inset-bottom)); }
  .tc-header-foundation, .tc-bismillah-bar__purpose, .tc-header-gateway .tc-brand__copy small { display:none; }
  .tc-bismillah-bar__inner { min-block-size:28px; gap:.6rem; letter-spacing:.02em; }
  .tc-bismillah-bar__inner b { font-size:12px; }
  .tc-header-gateway { min-block-size:60px; padding-block:5px; }
  .tc-header-gateway .tc-brand img { max-block-size:44px; inline-size:auto; }
  .tc-lms-mobile-bar { min-block-size:calc(60px + env(safe-area-inset-bottom)); padding:3px 4px env(safe-area-inset-bottom); }
  .tc-lms-mobile-bar :is(a,button) { min-block-size:54px; font-size:12px; }
  .tc-dashboard__welcome .tc-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tc-stat { min-inline-size:0; }
  .tc-stat span { font-size:.8125rem; overflow-wrap:anywhere; }
  .tc-dashboard :is(dt,th,td), .tc-notification__email { font-size:max(12px,.8125rem); }
  .tc-mobile-drawer__panel { padding-bottom:calc(var(--tc-bottom-height) + 20px); }
  html #tc-consent-panel { inset-inline:12px; padding:1rem; }
}
@media(max-height:500px) and (max-width:1120px) {
  .tc-bismillah-bar, .tc-header-foundation { display:none; }
}
