/* Shared website layer. Book typography and chapter tables live in book.css. */
:root { --clay: #975c3c; --blue-wash: #e6edf0; scroll-padding-top: 24px; }
body { -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, a { overflow-wrap: break-word; }
::selection { background: #c9ddd5; color: #15383e; }
.site-header { position: relative; z-index: 5; background: var(--paper); }
.site-nav { min-height: 82px; }
.brand { font-size: 16px; }
.nav-links { gap: 25px; }
.nav-links a, .nav-resources summary { font-size: 13px; font-weight: 600; color: var(--ink); }
.nav-links a[aria-current], .nav-resources .current { color: var(--teal); text-decoration: underline; text-underline-offset: 7px; }
.nav-resources { position: relative; }
.nav-resources summary { padding: 12px 0; cursor: pointer; list-style: none; }
.nav-resources summary::-webkit-details-marker { display: none; }
.nav-resources summary span { margin-left: 7px; }
.nav-resources summary:focus-visible { outline: 3px solid #a86a17; outline-offset: 4px; }
.nav-dropdown { position: absolute; right: 0; top: 100%; min-width: 290px; padding: 12px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 14px 35px #1d343b18; border-radius: 4px; }
.nav-dropdown a { display: block; padding: 12px; border-radius: 3px; }
.nav-dropdown a:hover { background: var(--wash); }
.nav-toggle { border: 1px solid var(--line); background: transparent; border-radius: 4px; padding: 10px 12px; font-size: 12px; gap: 10px; }
.art-banner { height: 154px; overflow: hidden; background: #547579; border-bottom: 1px solid #1d343b18; }
.art-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 48%; }
.art-banner-home { height: clamp(200px, 19vw, 310px); }
.home-intro { display: grid; grid-template-columns: 1.2fr 1fr; align-items: end; gap: 80px; padding-block: 50px 58px; }
.home-intro .eyebrow { margin-bottom: 18px; }
.home-intro h1 { font-family: var(--serif); font-size: clamp(44px, 4.8vw, 66px); letter-spacing: -.035em; line-height: 1.08; }
.home-intro h1 em { color: var(--teal); font-weight: 400; }
.home-intro-copy { padding-bottom: 4px; max-width: 45ch; }
.home-intro-copy p { font-size: 17px; color: var(--muted); margin-bottom: 21px; }
.text-link { display: inline-flex; align-items: center; gap: 18px; font-size: 13px; font-weight: 650; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.bookshelf { padding-bottom: 68px; }
.bookshelf .section-heading { padding-top: 28px; border-top: 1px solid var(--line); margin-bottom: 24px; }
.bookshelf .section-heading h2 { font-size: 32px; }
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px; }
.book-card { border: 1px solid var(--line); background: #fffdf9; border-radius: 5px; overflow: hidden; display: flex; flex-direction: column; }
.book-card-cover { display: flex; align-items: center; justify-content: center; height: 283px; padding: 25px; background: var(--wash); border-bottom: 1px solid var(--line); }
.book-card-daft .book-card-cover { background: #e6edf0; }
.book-card-introduction .book-card-cover { background: #eee7db; }
.book-card-cover img { height: 100%; width: auto; box-shadow: 4px 7px 17px #223f3e20; transition: transform .2s; }
.book-card-cover:hover img { transform: translateY(-4px); }
.book-card-copy { display: flex; flex-direction: column; flex: 1; padding: 25px; }
.book-card .eyebrow { font-size: 9px; letter-spacing: .13em; margin-bottom: 13px; }
.book-card h3 { font-family: var(--serif); font-size: 28px; letter-spacing: -.02em; line-height: 1.18; min-height: 3.6em; }
.book-card h3 a { color: var(--ink); text-decoration: none; }
.book-card h3 a:hover { color: var(--teal); text-decoration: underline; }
.book-summary { font-size: 14px; color: var(--muted); margin-top: 17px; }
.book-level { font-size: 12px; color: var(--muted); margin-block: 15px 22px; padding-left: 12px; border-left: 2px solid #adc3b8; }
.book-formats { margin-top: auto; padding-top: 6px; font-size: 11px; color: var(--teal); font-weight: 600; }
.book-card-actions { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.book-card-actions a { font-size: 11px; }
.book-card-actions>a:last-child { white-space: nowrap; text-decoration: none; color: var(--muted); }
.book-card-actions>a:last-child:hover { text-decoration: underline; }
.home-resources { background: var(--wash); padding-block: 58px 62px; border-block: 1px solid var(--line); }
.companion-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.companion-card { background: #f9fbf7; border: 1px solid #d1ddd4; padding: 30px; border-radius: 4px; }
.resource-index { display: block; font-size: 10px; color: var(--teal); letter-spacing: .11em; margin-bottom: 20px; }
.companion-card h3 { font-family: var(--serif); font-size: 27px; }
.companion-card p { font-size: 14px; color: var(--muted); max-width: 51ch; margin-block: 12px 20px; }
.course-feature { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 30px; margin-top: 28px; border: 1px solid #c7d4ca; padding: 30px; border-radius: 4px; background: #dee8df; }
.course-feature-number { font-family: var(--serif); font-size: 78px; color: #426a5f; }
.course-feature .eyebrow { margin-bottom: 10px; }
.course-feature h3 { font-family: var(--serif); font-size: 29px; }
.course-feature p:not(.eyebrow) { max-width: 65ch; font-size: 13px; color: var(--muted); margin-top: 12px; }
.book-trail { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 19px; border-bottom: 1px solid var(--line); }
.book-trail a { font-size: 11px; text-decoration: none; }
.book-trail a:hover { text-decoration: underline; }
.book-trail nav { display: flex; flex-wrap: wrap; gap: 24px; }
.book-page .hero { padding-top: 44px; }
.basics-subtitle { display: block; font-family: var(--serif); font-size: 22px; line-height: 1.45; color: var(--teal); margin-top: 18px; max-width: 32ch; }
.basics-chapters .chapter-title-fr { display: block; font-size: 13px; font-weight: 400; color: var(--teal); margin-top: 4px; }
.basics-chapters .chapter-actions a:first-child { border-color: var(--line); background: var(--white); }
.basics-edition { display: block; margin-top: 4px; }
.page-content { padding-bottom: 65px; }
.page-heading { padding-block: 45px 35px; }
.page-heading .eyebrow { margin-bottom: 14px; }
.page-heading .eyebrow a { text-decoration: none; }
.page-heading h1 { font-family: var(--serif); font-size: clamp(38px, 4.5vw, 58px); letter-spacing: -.03em; line-height: 1.1; max-width: 22ch; }
.page-lead { color: var(--muted); font-size: 16px; max-width: 75ch; margin-top: 20px; }
.page-meta { display: flex; gap: 12px 26px; flex-wrap: wrap; padding: 18px 0; border-block: 1px solid var(--line); color: var(--muted); font-size: 12px; margin-bottom: 32px; }
.page-meta strong { color: var(--teal); font-weight: 650; }
.catalogue-tools { display: grid; grid-template-columns: minmax(0, 1fr) 270px auto; gap: 18px; align-items: end; padding: 20px; border: 1px solid var(--line); border-radius: 4px; background: var(--wash); margin-bottom: 28px; }
.catalogue-tools .field label { font-size: 12px; }
.result-count { color: var(--muted); font-size: 12px; line-height: 42px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.directory-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 42px; }
.section-nav { position: sticky; top: 24px; align-self: start; border-left: 1px solid var(--line); padding-left: 18px; }
.section-nav p { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 12px; }
.section-nav a { display: block; font-size: 12px; text-decoration: none; padding-block: 8px; line-height: 1.5; }
.section-nav a:hover { text-decoration: underline; }
.directory-section { margin-bottom: 38px; scroll-margin-top: 26px; }
.directory-section h2 { font-family: var(--serif); font-size: 27px; line-height: 1.25; }
.directory-section>p { font-size: 13px; color: var(--muted); margin-block: 11px 16px; }
.algorithm-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; border-top: 1px solid var(--line); }
.algorithm-list li { border-bottom: 1px solid var(--line); min-width: 0; }
.algorithm-list a { display: flex; justify-content: space-between; align-items: center; gap: 15px; font-size: 13px; line-height: 1.5; text-decoration: none; color: var(--ink); padding: 13px 5px; min-height: 50px; }
.algorithm-list a:hover { color: var(--teal); background: var(--wash); }
.algorithm-list a span:last-child { color: var(--teal); font-size: 12px; }
.editorial-note { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 18px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.empty-results { padding: 24px; border: 1px solid var(--line); background: var(--sand); font-size: 14px; }
.empty-results button { border: 0; padding: 4px; background: none; color: var(--teal); text-decoration: underline; }
.jump-links { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 38px; }
.slide-section+.slide-section { margin-top: 48px; }
.slide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.slide-card { display: grid; grid-template-columns: 32px 1fr; gap: 15px; padding: 23px; border: 1px solid var(--line); border-radius: 4px; background: #fffdf9; }
.slide-number { font-family: var(--serif); font-size: 25px; color: #617f75; }
.slide-card h3 { font-size: 16px; font-weight: 600; line-height: 1.4; }
.slide-card h3 a { color: var(--ink); text-decoration: none; }
.slide-card h3 a:hover { color: var(--teal); text-decoration: underline; }
.slide-card p { color: var(--muted); font-size: 13px; margin-block: 10px 17px; }
.slide-card .text-link { font-size: 11px; }
.course-introduction { padding: 24px 28px; background: var(--wash); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 35px; font-size: 14px; color: var(--muted); }
.course-introduction p+p { margin-top: 10px; }
.lecture { padding-bottom: 38px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.lecture:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.lecture .eyebrow { margin-bottom: 12px; }
.lecture h2 { font-family: var(--serif); font-size: 30px; line-height: 1.2; margin-bottom: 17px; }
.lecture h3 { font-size: 13px; font-weight: 650; margin-block: 24px 12px; }
.lecture ul { padding-left: 19px; margin: 0; }
.lecture li { font-size: 13px; color: var(--muted); line-height: 1.75; margin-block: 7px; }
.lecture a { overflow-wrap: anywhere; }
.lecture>.button { font-size: 12px; min-height: 40px; padding: 10px 15px; }
.lecture-columns { display: grid; grid-template-columns: 1fr 1.15fr; gap: 30px; }
.lecture-bibliography { padding-top: 2px; }
.lecture-bibliography li { font-size: 12px; }
.site-footer { border-top: 1px solid var(--line); padding-block: 35px; align-items: start; }
.site-footer .footer-brand { color: var(--ink); font-size: 16px; font-family: var(--serif); text-decoration: none; display: block; margin-bottom: 10px; }
.site-footer nav { display: flex; gap: 24px; padding-top: 6px; }
.site-footer nav a { font-size: 12px; }
.prose { max-width: 850px; }
.prose>p { margin-bottom: 18px; }
.prose h2 { font-family: var(--serif); font-size: 30px; margin-block: 32px 16px; }
.prose li { line-height: 1.7; margin-bottom: 8px; }
.prose img { max-height: 75vh; width: auto; margin: 25px auto; }
.prose pre { overflow-x: auto; background: var(--wash); padding: 20px; }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 10px; }
@media (max-width: 1080px) {
  .nav-links { gap: 18px; }
  .home-intro { gap: 45px; }
  .book-grid { gap: 16px; }
  .book-card-copy { padding: 21px; }
  .book-card h3 { font-size: 25px; }
  .book-card-cover { height: 254px; }
  .book-card-actions { flex-wrap: wrap; gap: 15px; }
  .course-feature { grid-template-columns: 65px 1fr; gap: 24px; }
  .course-feature-number { font-size: 65px; }
  .course-feature>.button { grid-column: 2; justify-self: start; }
  .directory-layout { gap: 28px; grid-template-columns: 180px minmax(0, 1fr); }
  .algorithm-list { grid-template-columns: 1fr; }
  .catalogue-tools { grid-template-columns: minmax(0, 1fr) 230px; }
  .result-count { grid-column: 1 / -1; line-height: 1.4; }
}
@media (min-width: 851px) { .nav-toggle { display: none; } }
@media (max-width: 850px) {
  .site-nav { flex-wrap: wrap; padding-block: 16px; gap: 14px; min-height: 76px; }
  .nav-toggle:not([hidden]) { display: inline-flex; align-items: center; }
  .nav-links { flex-basis: 100%; flex-wrap: wrap; gap: 12px 24px; }
  .nav-enhanced .nav-links { display: none; }
  .nav-enhanced .nav-links.is-open { display: flex; }
  .nav-resources { width: 100%; border-top: 1px solid var(--line); }
  .nav-dropdown { position: static; border: 0; border-left: 2px solid var(--line); box-shadow: none; padding: 0 4px; }
  .nav-dropdown a { padding: 10px 12px; }
  .nav-links>a { padding-block: 9px; }
  .book-grid { grid-template-columns: 1fr; }
  .book-card { display: grid; grid-template-columns: 230px 1fr; }
  .book-card-cover { height: 100%; min-height: 345px; border-bottom: 0; border-right: 1px solid var(--line); }
  .book-card-cover img { width: 100%; height: auto; }
  .book-card h3 { min-height: 0; font-size: 28px; }
  .book-card-copy { padding: 26px; }
  .book-level { margin-bottom: 18px; }
  .book-card-actions { flex-wrap: nowrap; }
  .directory-layout { grid-template-columns: 1fr; }
  .section-nav { position: static; padding: 0 0 19px; border-left: 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 22px; }
  .section-nav p { flex-basis: 100%; margin-bottom: 0; }
  .section-nav a { padding-block: 5px; }
  .algorithm-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer nav { flex-direction: column; gap: 14px; }
}
@media (max-width: 600px) {
  .art-banner { height: 118px; }
  .art-banner-home { height: 175px; }
  .home-intro { grid-template-columns: 1fr; gap: 22px; padding-block: 35px 36px; }
  .home-intro h1 { font-size: 47px; }
  .home-intro-copy p { font-size: 15px; margin-bottom: 17px; }
  .bookshelf { padding-bottom: 40px; }
  .bookshelf .section-heading { padding-top: 22px; }
  .book-card { display: flex; }
  .book-card-cover { height: 246px; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .book-card-cover img { height: 100%; width: auto; }
  .book-card-copy { padding: 23px; }
  .book-card h3 { font-size: 29px; }
  .book-summary { font-size: 14px; }
  .book-level { margin-bottom: 18px; }
  .book-card-actions { flex-wrap: wrap; }
  .home-resources { padding-block: 34px 40px; }
  .companion-grid { grid-template-columns: 1fr; gap: 14px; }
  .companion-card { padding: 25px; }
  .companion-card h3 { font-size: 25px; }
  .course-feature { grid-template-columns: 1fr; padding: 25px; gap: 16px; }
  .course-feature-number { display: none; }
  .course-feature>.button { grid-column: 1; margin-top: 3px; }
  .course-feature h3 { font-size: 28px; }
  .book-trail { flex-wrap: wrap; gap: 13px; }
  .book-trail nav { gap: 16px; }
  .book-trail a { font-size: 10px; }
  .book-page .hero { padding-top: 32px; }
  .basics-subtitle { font-size: 20px; }
  .basics-chapters .chapter-actions { flex-wrap: wrap; }
  .basics-chapters .chapter-actions a:first-child { padding: 8px 11px; }
  .page-heading { padding-block: 33px 25px; }
  .page-heading h1 { font-size: 39px; }
  .page-lead { font-size: 15px; margin-top: 16px; }
  .page-content { padding-bottom: 35px; }
  .catalogue-tools { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .algorithm-list { grid-template-columns: 1fr; }
  .directory-section h2 { font-size: 25px; }
  .slide-grid { grid-template-columns: 1fr; }
  .slide-card { padding: 22px 19px; grid-template-columns: 25px 1fr; gap: 12px; }
  .course-introduction { padding: 20px; font-size: 13px; }
  .lecture-columns { grid-template-columns: 1fr; gap: 0; }
  .lecture h2 { font-size: 28px; }
  .lecture h3 { margin-top: 20px; }
  .site-footer { gap: 22px; padding-block: 28px; }
  .site-footer nav { flex-direction: row; flex-wrap: wrap; gap: 14px 22px; }
}
@media (prefers-reduced-motion: reduce) { .book-card-cover img { transition: none; } }
@media print {
  .art-banner, .book-trail, .section-nav, .catalogue-tools, .nav-toggle, .skip-link { display: none !important; }
  .home-intro, .book-grid, .directory-layout, .lecture-columns { display: block; }
  .book-card, .slide-card, .lecture { break-inside: avoid; }
  .book-card-cover { display: none; }
  .page-heading { padding-block: 15px; }
  .page-content { width: 100%; }
}
