:root {
  font-family: system-ui, sans-serif;
  color: #183e43;
  background: #f7f6f0;
  line-height: 1.65;
  font-synthesis: none;
}
.quiz-link {
  display: block;
  min-height: 44px;
  padding: 12px 0;
  font-size: 0.85rem;
  font-weight: 650;
  color: #205d50;
}
.quiz-entry {
  padding: 24px;
  border: 1px solid #b6cbbc;
  border-radius: 8px;
  background: #e6eee7;
  margin: 32px 0;
}
.quiz-entry p:last-of-type {
  margin-bottom: 12px;
}
.text-quiz-link {
  display: inline-block;
  padding: 12px;
  min-height: 44px;
  font-size: 0.85rem;
}
@media print {
  .quiz-entry,
  .quiz-link {
    display: none;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #b16826;
  outline-offset: 5px;
}
.top {
  max-width: 1240px;
  margin: auto;
  padding: 24px 36px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 13px;
}
.brand {
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero {
  background: #123f45;
  color: #f8f6e9;
  overflow: hidden;
}
.hero-inner {
  max-width: 1240px;
  margin: auto;
  padding: 74px 36px 66px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 750;
  color: #44736c;
}
.hero .eyebrow {
  color: #c4dcd1;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  line-height: 1.12;
}
h1 {
  font-size: clamp(42px, 5.5vw, 76px);
  letter-spacing: -0.04em;
  margin: 20px 0 24px;
  max-width: 650px;
}
h1 em {
  color: #e7bc78;
}
.intro {
  max-width: 570px;
  color: #d9e5df;
  font-size: 17px;
}
.hero-link {
  display: inline-block;
  margin-top: 10px;
  background: #edca8f;
  color: #163d41;
  padding: 12px 22px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}
.art {
  width: 100%;
  max-width: 360px;
  justify-self: center;
}
.stats {
  max-width: 1168px;
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  gap: 32px;
  border-bottom: 1px solid #d4ddd5;
  font-size: 13px;
}
.stats strong {
  font-family: Georgia, serif;
  font-size: 24px;
  margin-right: 8px;
}
.layout {
  max-width: 1240px;
  margin: auto;
  padding: 54px 36px 80px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 64px;
}
nav {
  position: sticky;
  top: 24px;
  align-self: start;
}
nav h2 {
  font: 700 11px system-ui;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
nav a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  text-decoration: none;
  border-bottom: 1px solid #dce1d9;
  padding: 14px 0;
  font-size: 13px;
}
nav a span {
  color: #627c75;
  font-size: 11px;
}
nav b {
  margin-left: auto;
  font-weight: 400;
}
nav a:hover {
  color: #926024;
}
label {
  display: block;
  font-size: 12px;
  margin: 28px 0 8px;
}
input {
  width: 100%;
  border: 1px solid #b8c8c1;
  border-radius: 4px;
  padding: 12px;
  background: white;
  font: inherit;
  font-size: 13px;
}
.search-note {
  font-size: 11px;
  color: #54716b;
  margin-top: 9px;
}
.chapter {
  scroll-margin-top: 28px;
  margin-bottom: 64px;
}
.chapter h2 {
  font-size: 36px;
  margin: 10px 0 14px;
}
.chapter header > p {
  color: #58706c;
  max-width: 600px;
  font-size: 15px;
}
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 26px;
}
article {
  background: #fff;
  padding: 26px;
  border: 1px solid #dce3dc;
  border-radius: 7px;
  scroll-margin-top: 25px;
}
.card-head {
  display: flex;
  align-items: baseline;
  gap: 13px;
}
.number {
  font-size: 12px;
  color: #7c663e;
  font-weight: 650;
}
h3 {
  font-size: 18px;
  line-height: 1.35;
  margin-bottom: 17px;
  letter-spacing: -0.02em;
}
article p {
  font-size: 14px;
  color: #536863;
}
.goal {
  color: #234d4b;
  font-weight: 550;
}
details {
  border-top: 1px solid #e3e7e1;
  padding-top: 12px;
  margin-top: 20px;
}
summary {
  font-size: 12px;
  cursor: pointer;
  color: #235d56;
  min-height: 44px;
  display: list-item;
  padding-top: 5px;
}
details p {
  padding-top: 10px;
  margin-bottom: 0;
}
.sources {
  border-top: 1px solid #ccd8cf;
  margin-top: 40px;
  padding-top: 24px;
  font-size: 13px;
  color: #526d65;
}
.sources h2 {
  font-size: 24px;
}
.sources a {
  display: inline-block;
  margin: 0 16px 12px 0;
}
.footer {
  padding: 25px 36px;
  background: #123f45;
  color: #e6eee7;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
[hidden] {
  display: none !important;
}
.skip {
  position: absolute;
  top: -100px;
}
.skip:focus {
  top: 0;
  background: white;
  z-index: 5;
  padding: 12px;
}
@media (max-width: 1000px) {
  .layout {
    gap: 28px;
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .stats {
    margin: 0 36px;
  }
  .hero-inner {
    grid-template-columns: 1.4fr 1fr;
  }
}
@media (max-width: 650px) {
  .top {
    padding: 18px 20px;
  }
  .hero-inner {
    padding: 42px 20px;
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .art {
    max-width: 230px;
  }
  .stats {
    margin: 0 20px;
    gap: 14px;
    flex-wrap: wrap;
  }
  .layout {
    padding: 30px 20px 50px;
    display: block;
  }
  nav {
    position: static;
    margin-bottom: 40px;
  }
  .chapter h2 {
    font-size: 31px;
  }
  article {
    padding: 22px;
  }
  .footer {
    padding: 24px 20px;
    flex-wrap: wrap;
  }
}
@media print {
  nav,
  .hero-link,
  .art,
  .top a,
  .footer {
    display: none;
  }
  .hero {
    background: white;
    color: #123f45;
  }
  .hero .eyebrow,
  .intro,
  h1 em {
    color: #123f45;
  }
  .hero-inner,
  .layout {
    display: block;
    padding: 20px;
  }
  .stats {
    margin: 0;
  }
  .cards {
    display: block;
  }
  article {
    break-inside: avoid;
    margin-bottom: 12px;
  }
  .chapter {
    margin-bottom: 30px;
  }
}

.detail-hero {
  background: #123f45;
  color: #f7f6f0;
  padding: 48px max(24px, calc((100vw - 1168px) / 2));
}
.detail-hero .eyebrow {
  color: #c4dcd1;
}
.detail-hero h1 {
  font-size: clamp(34px, 4vw, 58px);
  max-width: 880px;
}
.detail-hero p {
  max-width: 760px;
  margin: 0;
  color: #d9e5df;
  font-size: 17px;
}
.detail-layout {
  max-width: 1240px;
  margin: auto;
  padding: 44px 36px 64px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 56px;
}
.detail-body {
  max-width: 820px;
}
.detail-body section {
  margin-bottom: 36px;
  scroll-margin-top: 24px;
}
.detail-body h2 {
  font-size: 29px;
  margin-bottom: 18px;
}
.detail-body p,
.detail-body li {
  font-size: 16px;
}
.detail-body li {
  margin-bottom: 16px;
}
.detail-body ul,
.detail-body ol {
  padding-left: 24px;
}
.example {
  padding: 22px 26px;
  background: #e6eee7;
  border-left: 3px solid #42786a;
  margin: 24px 0;
}
.example p:last-child {
  margin-bottom: 0;
}
.cardinal-marks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
  margin: 24px 0;
}
.cardinal-mark {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 22px;
  border: 1px solid #cbd8cd;
  border-radius: 12px;
  background: #eef2ec;
  break-inside: avoid;
}
.cardinal-mark h3 {
  margin: 0;
  font-size: 1.2rem;
}
.cardinal-mark img {
  display: block;
  width: min(100%, 200px);
  height: auto;
  margin: 8px auto 16px;
}
.cardinal-mark figcaption {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.cardinal-mark figcaption strong,
.cardinal-mark figcaption span {
  display: block;
}
.cardinal-mark .cardinal-passage {
  margin-top: auto;
  padding-top: 14px;
  color: #265950;
  font-weight: 700;
}
@media (max-width: 600px) {
  .cardinal-marks {
    grid-template-columns: minmax(0, 1fr);
  }
  .cardinal-mark {
    padding: 20px;
  }
  .cardinal-mark figcaption {
    font-size: 1rem;
  }
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 14px;
  border: 1px solid #ccd8cf;
}
thead {
  background: #e6eee7;
}
tbody th {
  min-width: 110px;
}
.wind-instrument {
  margin: 28px 0 0;
}
.wind-instrument img {
  display: block;
  width: 100%;
  max-width: 540px;
  height: auto;
}
.wind-instrument figcaption {
  margin-top: 14px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #3f5c56;
}
.page-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid #ccd8cf;
  padding-top: 24px;
}
.page-nav a {
  padding: 10px 0;
}
.detail-link {
  display: block;
  border-top: 1px solid #e3e7e1;
  padding: 14px 0 0;
  margin-top: 20px;
  font-size: 13px;
  min-height: 44px;
}
.number {
  white-space: nowrap;
}
/* Desktop reading size grows gently; text columns stay bounded. */
@media screen and (min-width: 1001px) {
  :root {
    font-size: clamp(20px, calc(1rem + 0.3125vw), 22px);
  }
  .top,
  .hero-inner,
  .layout,
  .detail-layout {
    max-width: 1440px;
  }
  .stats {
    max-width: 1368px;
  }
  .layout {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 56px;
  }
  .detail-layout {
    max-width: 1300px;
    grid-template-columns: 280px minmax(0, 820px);
    gap: 56px;
  }
  .detail-hero {
    padding-inline: max(36px, calc((100% - 1228px) / 2));
  }
  nav {
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    padding-right: 8px;
  }
  nav a,
  input,
  .top,
  .stats,
  .hero-link,
  .detail-link,
  .page-nav,
  table {
    font-size: 0.8rem;
  }
  nav h2,
  nav a span,
  .eyebrow,
  label,
  .number,
  summary,
  .search-note,
  .footer {
    font-size: 0.7rem;
  }
  .intro,
  .detail-hero p,
  .detail-body p,
  .detail-body li {
    font-size: 1rem;
  }
  .intro {
    max-width: 650px;
  }
  .detail-hero p {
    max-width: 820px;
  }
  article p,
  .chapter header > p,
  .sources {
    font-size: 0.9rem;
    color: #3f5c56;
  }
  article {
    padding: 28px;
  }
  .cards {
    gap: 24px;
  }
  h3 {
    font-size: 1.15rem;
  }
  .chapter h2 {
    font-size: 2rem;
  }
  .detail-body h2 {
    font-size: 1.65rem;
    line-height: 1.2;
  }
  .detail-body section {
    margin-bottom: 48px;
  }
  .detail-body .line-entry > h3,
  .detail-body .line-entry > h4 {
    font-size: 1.3rem;
  }
  .detail-body .line-diagram figcaption,
  .detail-body .anchor-formula span {
    font-size: 0.9rem;
  }
  .detail-body .line-diagram svg {
    max-width: 700px;
  }
}
@media screen and (min-width: 1001px) and (max-width: 1200px) {
  .layout,
  .detail-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 32px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .detail-layout {
    display: block;
    padding: 30px 20px;
  }
  .detail-layout nav {
    position: static;
    margin-bottom: 35px;
  }
  .detail-hero {
    padding: 34px 20px;
  }
  .detail-body h2 {
    font-size: 26px;
  }
}
@media print {
  .detail-layout {
    display: block;
  }
  .detail-hero {
    background: white;
    color: #123f45;
  }
  .detail-hero p,
  .detail-hero .eyebrow {
    color: #123f45;
  }
  .table-wrap {
    overflow: visible;
  }
}
@media (max-width: 600px) {
  .table-wrap {
    overflow: visible;
  }
  table,
  tbody,
  tr,
  tbody th,
  td {
    display: block;
    width: 100%;
  }
  thead {
    display: none;
  }
  tbody tr {
    border: 1px solid #ccd8cf;
    margin-bottom: 18px;
  }
  tbody th {
    background: #e6eee7;
    border: 0;
  }
  td {
    border: 0;
    border-top: 1px solid #ccd8cf;
  }
  td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
  }
}
