:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
  background: #f3f4f6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 72px; }
.home-hero, .module-hero, .page-hero { padding: clamp(28px, 6vw, 64px); border-radius: 24px; background: #111827; color: #fff; }
.home-hero h1, .module-hero h1, .page-hero h1 { margin: 8px 0 12px; font-size: clamp(2rem, 6vw, 4.6rem); line-height: .98; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.8rem); }
.home-hero p:last-child, .module-hero .concepts, .page-hero p:last-child { margin: 0; max-width: 800px; color: #d1d5db; font-size: 1.05rem; line-height: 1.6; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 800; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; color: #6b7280; font-size: .92rem; }
.breadcrumbs button { border: 0; background: transparent; padding: 4px 0; color: #374151; text-decoration: underline; text-underline-offset: 3px; }
.section-stack { padding-top: 34px; }
.section-heading, .pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading h2 { margin: 4px 0 0; }
.count, .status-pill, .count-inline { padding: 7px 11px; border-radius: 999px; background: #fff; border: 1px solid #e5e7eb; font-size: .84rem; font-weight: 700; }
.count-inline { align-self: flex-start; }
.search { display: grid; gap: 8px; margin: 24px 0; font-weight: 700; }
.search-global { margin: 28px 0 0; }
.search input { width: 100%; padding: 14px 16px; border: 1px solid #d1d5db; border-radius: 14px; background: #fff; outline: none; }
.search input:focus { border-color: #111827; box-shadow: 0 0 0 3px rgba(17,24,39,.08); }
.discipline-grid, .block-grid, .module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.discipline-card, .block-card, .module-card { min-height: 205px; padding: 22px; border: 1px solid #e5e7eb; border-radius: 18px; background: #fff; color: #111827; text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; transition: transform .15s ease, border-color .15s ease; }
.discipline-card:not(.is-future):hover, .block-card:hover, .module-card:hover { transform: translateY(-2px); border-color: #9ca3af; }
.discipline-card strong, .block-card strong, .module-card strong { font-size: 1.2rem; }
.discipline-card > span:not(.status-pill):not(.cta), .block-card > span:not(.module-code):not(.count-inline):not(.cta), .module-concepts { color: #6b7280; line-height: 1.45; }
.is-future { opacity: .58; }
.is-future .status-pill { background: #f3f4f6; }
.module-card.compact { min-height: 190px; }
.module-code { font-size: .8rem; font-weight: 800; letter-spacing: .08em; }
.cta { margin-top: auto; font-weight: 800; }
.reference-panel { margin-top: 28px; padding: 24px; border-radius: 20px; background: #fff; border: 1px solid #e5e7eb; }
.concept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 18px; }
.concept-chip { border: 1px solid #e5e7eb; border-radius: 14px; background: #f9fafb; padding: 14px; text-align: left; display: grid; gap: 5px; }
.concept-chip:hover { border-color: #9ca3af; background: #fff; }
.concept-chip span { color: #6b7280; font-size: .82rem; }
.module-layout { display: grid; gap: 24px; }
.markdown { padding: clamp(22px, 4vw, 44px); border-radius: 20px; background: #fff; border: 1px solid #e5e7eb; line-height: 1.72; overflow-wrap: anywhere; }
.markdown h1:first-child { display: none; }
.markdown h2, .markdown h3 { margin-top: 2em; line-height: 1.2; }
.markdown code { background: #f3f4f6; padding: .15em .4em; border-radius: .4em; }
.markdown blockquote { margin-left: 0; padding: 12px 18px; border-left: 4px solid #111827; background: #f9fafb; }
.markdown ul, .markdown ol { padding-left: 1.4rem; }
.markdown hr { border: 0; border-top: 1px solid #e5e7eb; margin: 32px 0; }
.manual-figure { margin: 24px 0; padding: 10px; border: 1px solid #e5e7eb; border-radius: 16px; background: #f9fafb; }
.manual-figure img { display: block; width: 100%; height: auto; max-height: 720px; object-fit: contain; border-radius: 10px; }
.manual-figure figcaption { padding: 9px 5px 2px; color: #6b7280; font-size: .9rem; line-height: 1.45; }
.pager button { border: 1px solid #d1d5db; border-radius: 12px; background: #fff; padding: 10px 14px; }
.empty, .loading, .error { padding: 24px; border-radius: 16px; background: #fff; }
@media (max-width: 640px) {
  .shell { width: min(100% - 20px, 1120px); padding-top: 16px; }
  .home-hero, .module-hero, .page-hero { border-radius: 18px; padding: 24px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .discipline-grid, .block-grid, .module-grid { grid-template-columns: 1fr; }
  .reference-panel { padding: 18px; }
  .concept-grid { grid-template-columns: 1fr 1fr; }
  .pager { align-items: stretch; flex-wrap: wrap; }
  .pager button { flex: 1 1 30%; }
  .manual-figure { margin-inline: -8px; padding: 6px; }
}
@media (max-width: 430px) {
  .concept-grid { grid-template-columns: 1fr; }
  .pager button { flex-basis: 100%; }
}
