/* Readable headings; progressively enhanced compact mobile navigation. */
#menu-toggle[hidden], #primary-navigation[hidden] { display: none; }
#menu-toggle { min-height: 44px; min-width: 44px; border: 1px solid #4b5563; border-radius: .25rem; background: #fff; color: #111827; cursor: pointer; }
@media (max-width: 42rem) {
  .site-header { flex-direction: row; align-items: center; flex-wrap: wrap; gap: .25rem; }
  .site-header .site-name { padding-left: 0; }
  .site-header nav { flex-basis: 100%; }
}
body { background: #fff; color: #111827; }
.site-header a, .site-footer a, button, .search-fallback a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: .5rem; }
.site-header nav { gap: .25rem .5rem; }
.site-header > *, main * { min-width: 0; }
main h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 750; line-height: 1.2; margin: .75rem 0 1.25rem; }
main h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; line-height: 1.3; margin: 1.75rem 0 .75rem; }
main h3 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); font-weight: 650; line-height: 1.4; margin: 1.25rem 0 .5rem; }
main h1, main h2, main h3, .cards { overflow-wrap: anywhere; }
.cards { grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); }
.article-content :is(h2,h3,h4,h5,h6) a[href^="#"] { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: #1e40af; background: #fff; font-size: 1rem; vertical-align: middle; }
.article-content :is(h2,h3,h4,h5,h6) .opacity-0 { opacity: 1; }
:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }
.search-panel { max-width: 52rem; }
.search-panel form { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; margin: 1rem 0; }
.search-field { flex: 1 1 16rem; }
.search-field label { display: block; font-weight: 600; margin-bottom: .4rem; }
.search-field input { width: 100%; min-height: 44px; border: 2px solid #4b5563; border-radius: .25rem; padding: .5rem; background: white; color: #111827; font-size: 1rem; }
.search-panel button { background: #1e40af; color: white; border-radius: .25rem; font-weight: 600; cursor: pointer; }
#search-results { list-style: disc; padding-left: 1.5rem; }
#search-results li { margin-block: 1rem; }
#search-results a { display: inline-flex; align-items: center; min-height: 44px; color: #1e40af; text-decoration: underline; }
.search-fallback a { color: #1e40af; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* Long source tokens remain visible; trust-note links remain distinguishable. */
.article-layout p, .article-layout li { overflow-wrap: anywhere; }
.trust-note a { text-decoration: underline; }
.article-content pre, .article-content pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
.article-content pre code { display: block; }
/* Restore the original slate appearance; follow the visitor's system without storage. */
html { color-scheme: light dark; }
.site-header, .site-footer, main { max-width: 66rem; }
.site-header .site-name { flex-shrink: 0; font-weight: 650; }
.home-intro { max-width: none; min-height: 28rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border-radius: 1rem; padding: 2rem 1rem; margin-block: 1rem 2rem; box-shadow: 0 8px 24px #0000000a; }
.home-intro h1 { margin: 0 0 .5rem; font-size: clamp(1.6rem, 4vw, 2.3rem); }
.home-intro h2 { margin: 0; font-size: clamp(1.1rem, 2.5vw, 1.3rem); }
.home-intro .shadow-xl { box-shadow: none; }
.home-intro .py-16 { padding: 0; }
.home-intro .mt-3 { margin: 0; }
.cards { grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); }
.cards h3 { margin-top: .5rem; }
@media (prefers-color-scheme: dark) {
  body { background: #1e293b; color: #e2e8f0; }
  .site-header a, .site-footer a, .breadcrumbs a, .cards a, .taxonomy-links a, .article-content a, .pillar-link a, .trust-note a, #search-results a, .search-fallback a { color: #93c5fd; }
  main h1, main h2, main h3 { color: #f1f5f9; }
  .home-intro h2 { color: #cbd5e1 !important; }
  .cards article { border-color: #64748b; }
  #menu-toggle, .search-field input { background: #0f172a; color: #f1f5f9; border-color: #94a3b8; }
  .article-content :is(h2,h3,h4,h5,h6) a[href^="#"] { background: #1e293b; color: #93c5fd; }
  .article-content pre, .article-content code { background: #0f172a; color: #e2e8f0; }
  .article-content :is(th,td) { border-color: #64748b; }
  .search-panel button { background: #1e40af; color: #fff; }
  :focus-visible { outline-color: #fbbf24; }
}
@media (max-width: 42rem) { .home-intro { min-height: 20rem; } }
