/* Shared public-page chrome: page background, skip link, header actions,
   mobile drawer, unified footer, minimum tap targets. Loaded on every page
   with a .site-header (before page CSS, so page rules may refine it). */
html { background: var(--paper, #fbf9f8); min-height: 100%; }
:root[data-theme=dark], :root[data-theme="dark"] { background: #1c1917; color-scheme: dark; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; padding: 10px 16px; border-radius: 10px; background: #c2410c; color: #fff !important; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* Header actions + mobile menu */
.site-header .header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.sc-menu-btn { display: none; }
body .sc-theme-toggle { position: static !important; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50% !important; display: inline-flex; align-items: center; justify-content: center; box-shadow: none !important; inset: auto !important; }
@media (max-width: 760px) {
  .sc-chrome .site-header { flex-wrap: wrap; row-gap: 10px; min-height: 0; padding: 12px 16px !important; }
  .sc-chrome .site-header .desktop-nav, .sc-chrome .site-header .lang-switcher, .sc-chrome .site-header .bm-wrap,
  .sc-chrome .site-header .sc-desktop-only, .sc-chrome .site-header .sc-login, .sc-chrome .site-header .sc-theme-toggle, .sc-chrome .site-header .header-end { display: none !important; }
  .sc-chrome .site-header .header-actions { gap: 8px; }
  .sc-chrome .site-header .search-bar { order: 10; flex: 1 0 100%; max-width: none; margin: 0; }
  .sc-chrome .site-header .search-bar input { min-height: 44px; }
  body .sc-menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 12px; background: var(--surface, #fff); border: 1px solid var(--line, #f1eeeb); color: var(--ink, #292524); box-shadow: none; }
  .sc-bars, .sc-bars::before, .sc-bars::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; position: relative; }
  .sc-bars::before, .sc-bars::after { content: ""; position: absolute; left: 0; }
  .sc-bars::before { top: -6px; } .sc-bars::after { top: 6px; }
}
.sc-drawer { margin: 0 0 0 auto; height: 100vh; height: 100dvh; max-height: none; width: min(340px, 88vw); padding: 0; border: 0; background: var(--surface, #fff); color: var(--ink, #292524); box-shadow: -10px 0 40px #0003; }
.sc-drawer::backdrop { background: #17141299; }
.sc-drawer[open] { display: flex; flex-direction: column; animation: sc-slide .22s ease-out; }
@keyframes sc-slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sc-drawer[open] { animation: none; } }
.sc-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line, #f1eeeb); }
body .sc-close { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: transparent; border: 1px solid var(--line, #f1eeeb); color: var(--ink, #292524); }
.sc-drawer-nav { display: grid; padding: 8px; }
.sc-drawer-nav a { display: flex; align-items: center; min-height: 48px; padding: 10px 14px; border-radius: 10px; color: var(--ink, #292524); font-size: 1rem; }
.sc-drawer-nav a:hover, .sc-drawer-nav a[aria-current=page] { background: var(--redesign-soft, #fff7ed); color: var(--redesign-accent, #c2410c); }
.sc-drawer-auth { display: grid; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line, #f1eeeb); }
.sc-drawer-auth a { display: flex; align-items: center; justify-content: center; min-height: 46px; }
.sc-drawer-tools { padding: 4px 16px 20px; }
.sc-drawer-tools button { width: 100%; min-height: 44px; }

/* Unified footer */
.sf-footer { display: grid !important; grid-template-columns: minmax(200px, 1.2fr) 3fr; gap: 28px 40px; align-items: start; padding: 36px clamp(16px, 4vw, 40px) 24px !important; border-top: 1px solid var(--line, #f1eeeb); background: var(--surface, #fff) !important; color: var(--ink-soft, #544f4b); font-size: .875rem; }
.sf-footer-brand { display: grid; gap: 8px; }
.sf-footer-brand .brand { font-size: 1.15rem; font-weight: 600; color: var(--ink, #292524); }
.sf-footer-brand p { margin: 0; font-size: .85rem; }
.sf-footer-brand a[href^="mailto"] { color: var(--redesign-accent, #c2410c); }
.sf-footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.sf-footer-cols h2 { font-family: var(--font-sans); font-size: .75rem !important; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #807871); margin: 0 0 6px; }
.sf-footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sf-footer a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink-soft, #544f4b); }
.sf-footer a:hover { color: var(--redesign-accent, #c2410c); text-decoration: underline; }
.sf-footer-legal { grid-column: 1 / -1; margin: 0; padding-top: 16px; border-top: 1px solid var(--line, #f1eeeb); font-size: .8rem; color: var(--muted, #807871); }
@media (max-width: 760px) { .sf-footer { grid-template-columns: minmax(0, 1fr); } .sf-footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Minimum 24px targets for inline text controls flagged by the audit */
.studio-chart summary, .text-link, .cl-instructor-link, .cl-created a, .site-header .desktop-nav a, .studio-rail-foot { min-height: 24px; display: inline-flex; align-items: center; }
.studio-chart summary { display: list-item; padding: 4px 0; }
.fc-course-grid article > a, .account-links a, .cl-inst-link, .header-end a { display: inline-flex; align-items: center; min-height: 24px; }
.header-end { display: inline-flex; align-items: center; gap: 10px; }
body .sc-theme-toggle, .site-header .header-actions > a { flex: none; }
