/* Editable shared styles. No generated framework CSS. */
@import url('https://fonts.googleapis.com/css2?family=Dosis:wght@500;600;700&family=Nunito+Sans:wght@400;600;700;800&family=JetBrains+Mono&display=swap');
:root {
  color-scheme: light;
  --background: #f7fafc;
  --surface: #ffffff;
  --text: #172b42;
  --muted: #4c6075;
  --border: #cbd5e1;
  --accent: #0369a1;
  --accent-hover: #075985;
  --hero: #0c4a6e;
  --hero-end: #082f49;
  --shadow: 0 8px 24px rgb(15 23 42 / 8%);
}
html.dark {
  color-scheme: dark;
  --background: #0f172a;
  --surface: #172338;
  --text: #f1f5f9;
  --muted: #b5c5d9;
  --border: #475569;
  --accent: #7dd3fc;
  --accent-hover: #bae6fd;
  --hero: #082f49;
  --hero-end: #020617;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); font: 1rem/1.65 'Nunito Sans', system-ui, sans-serif; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--accent-hover); }
button, input, select { font: inherit; }
button, .button { min-height: 44px; padding: .55rem 1rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--surface); color: var(--text); cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
button[aria-selected='true'], button[aria-pressed='true'] { outline: 2px solid var(--accent); }
input:not([type='checkbox']):not([type='range']), select { width: 100%; max-width: 32rem; min-height: 44px; padding: .65rem; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: .4rem; }
input[type='range'] { width: min(100%, 28rem); display: block; min-height: 44px; }
label { display: block; margin: 1rem 0 .4rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 100; background: var(--surface); padding: .75rem; }
.skip-link:focus { top: 1rem; }
.container { max-width: 1200px; padding: 2rem 1.25rem; margin: 0 auto; }
.site-header { display: flex; align-items: center; gap: 1.25rem; justify-content: space-between; padding: .8rem max(1rem, calc((100vw - 1160px) / 2)); background: var(--hero-end); color: white; position: sticky; top: 0; z-index: 20; }
.site-header a { color: white; text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 1.15rem; }
.site-header button { background: transparent; color: white; border-color: #64748b; }
.wordmark { font: 700 2rem 'Dosis', sans-serif; }
.wordmark span { font: 600 1rem 'Nunito Sans', sans-serif; }
[data-menu] { display: none; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; padding: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; padding: 1.5rem; box-shadow: var(--shadow); overflow-wrap: anywhere; margin: 0; }
.card-body { padding: 1rem 0 0; }
.card h2 { font-size: 1.35rem; }
.card h3 { font-size: 1.15rem; }
.post-grid .card { padding: 0; overflow: hidden; }
.post-grid .card-body { padding: 1.5rem; }
.post-image { width: 100%; height: 192px; object-fit: cover; }
h1, h2, h3, h4 { line-height: 1.25; overflow-wrap: anywhere; scroll-margin-top: 6rem; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.025em; }
h2 { font-size: 1.7rem; margin-top: 2rem; }
.muted, time { color: var(--muted); }
.home-hero { min-height: 80vh; background: linear-gradient(130deg, var(--hero), var(--hero-end)); color: white; text-align: center; }
.home-hero .container { max-width: 1000px; padding-top: 5rem; padding-bottom: 4rem; }
.home-hero h1 { font-family: 'Dosis', sans-serif; font-size: clamp(2.5rem, 6vw, 4rem); }
.home-hero .grid { margin: 2rem 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; }
.button { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--surface); text-decoration: none; }
.button.secondary { background: var(--surface); color: var(--text); }
.actions, .tabs, .chips, .pagination { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin: 1rem 0; }
.chips a { border: 1px solid var(--border); border-radius: 2rem; padding: .35rem .8rem; text-decoration: none; }
.pagination { justify-content: center; margin: 2rem 0; }
.document-hero { padding: 1rem 0; background: var(--surface); border-bottom: 1px solid var(--border); }
.article-hero { background: linear-gradient(110deg, #4338ca, #047857); color: white; }
.article-hero time { color: white; }
.document-layout { display: flex; align-items: start; gap: 2rem; }
.document { width: 100%; max-width: 900px; margin: auto; min-width: 0; }
.toc { flex: 0 0 240px; position: sticky; top: 6rem; max-height: 75vh; overflow-y: auto; }
.toc nav a { display: block; margin: .5rem 0; font-size: .9rem; }
.toc-depth-3 { padding-left: .75rem; }
.toc-depth-4, .toc-depth-5, .toc-depth-6 { padding-left: 1.5rem; }
.toc a[aria-current='location'] { font-weight: 800; }
.prose { line-height: 1.8; overflow-wrap: anywhere; }
.prose h2, .prose h3 { margin-top: 2rem; }
.prose pre, .highlight { overflow: auto; max-width: 100%; border: 1px solid var(--border); border-radius: .6rem; padding: 1rem; }
code { font: .9em/1.6 'JetBrains Mono', monospace; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; max-width: 100%; }
td, th { border: 1px solid var(--border); padding: .7rem; }
img { max-width: 100%; height: auto; }
iframe { max-width: 100%; border: 0; }
.prose blockquote { margin-left: 0; border-left: 4px solid var(--accent); padding-left: 1.2rem; }
.historical { background: var(--surface); border: 1px solid var(--border); padding: 1rem; border-radius: .6rem; }
.quiz-section { border-top: 1px solid var(--border); margin-top: 2rem; }
[data-quiz-content] button { display: block; width: 100%; text-align: left; margin: .7rem 0; }
.adjacent { display: flex; gap: 1rem; justify-content: space-between; border-top: 1px solid var(--border); margin-top: 2rem; padding-top: 1rem; }
.newsletter { border: 1px dashed var(--border); border-radius: .6rem; padding: 1rem; margin-bottom: 2rem; }
.categories article { border-bottom: 1px solid var(--border); margin-bottom: 1rem; padding-bottom: 1rem; }
.taxonomy-list { columns: 3; padding-left: 1.25rem; }
.taxonomy-list li { margin-bottom: .75rem; break-inside: avoid; }
.course-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.course-layout section { margin-bottom: 1.5rem; }
details { border: 1px solid var(--border); border-radius: .5rem; padding: 1rem; margin: 1rem 0; }
summary { cursor: pointer; font-weight: 700; min-height: 32px; }
.slideshow figure { margin: 0; text-align: center; }
.slideshow img { height: 340px; width: 100%; object-fit: contain; }
.site-footer { margin-top: 4rem; background: linear-gradient(120deg, var(--hero), var(--hero-end)); color: white; }
.site-footer h2 { font: 700 1.3rem 'Dosis', sans-serif; }
.site-footer a { color: #e0f2fe; display: block; margin: .5rem 0; }
.site-footer > p { text-align: center; margin: 0; padding: 1.5rem; border-top: 1px solid #64748b; }
.logs { width: 100%; overflow-x: auto; }
.logs table { border-collapse: collapse; width: 100%; }
@media (max-width: 950px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .toc { flex-basis: 180px; } .site-header { flex-wrap: wrap; } }
@media (max-width: 650px) {
  .grid, .course-layout { grid-template-columns: 1fr; }
  .container { padding: 1.5rem 1rem; }
  [data-menu] { display: block; }
  .site-header nav { flex-basis: 100%; }
  .js .site-header nav:not(.open) { display: none; }
  .document-layout { display: block; }
  .toc { position: static; max-height: none; margin-bottom: 1.5rem; }
  .taxonomy-list { columns: 1; }
  .adjacent { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
