.takeaway { color: var(--green); font-size: 15px; margin: 0 0 18px; }
.study-section { margin: 0 0 24px; scroll-margin-top: 20px; }
.study-section h2 { font-size: 21px; line-height: 1.4; font-weight: 600; letter-spacing: -.3px; margin: 0 0 8px; }
.study-section p { margin-bottom: 12px; }
.study-note strong { color: var(--ink); font-weight: 600; }
.table-wrap { overflow-x: auto; margin: 14px 0 8px; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; line-height: 1.5; }
caption { padding: 0 10px 8px; text-align: left; color: var(--ink); font-weight: 600; }
th { color: var(--ink); text-align: left; background: #f0f2ec; font-weight: 600; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child { font-weight: 500; width: 20%; }
.study-section .table-credit { color: var(--muted); font-size: 11px; margin-bottom: 14px; }
.study-list { padding-left: 22px; margin: 10px 0 16px; }
.study-list li { padding-left: 2px; margin: 5px 0; }
figure { margin: 18px 0; }
.figure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.figure-grid figure { margin: 0; }
.figure-grid .figure-open img { height: 240px; }
.figure-open { display: block; cursor: zoom-in; background: #fff; }
.figure-open img { display: block; width: 100%; max-height: 620px; object-fit: contain; }
#figure-amino-acid-structure img { max-height: 240px; }
figcaption { font-size: 12px; color: var(--text); margin-top: 8px; }
figcaption strong { font-weight: 500; }
figcaption small { display: block; color: var(--muted); font-size: 10px; }
.extra-note, .code-key { margin: 14px 0; font-size: 14px; }
summary { color: var(--green); }
.extra-note p { margin: 8px 0 0; }
.code-key summary > span { color: var(--muted); font-size: 11px; margin-left: 8px; }
.code-key ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 20px; margin: 12px 0; }
.code-key li { display: flex; align-items: baseline; gap: 10px; }
.code-key li > a { min-width: 58px; }
.code-key li > span { font-size: 12px; color: var(--muted); }
.search-box { display: block; }
.search-box input { width: 100%; padding: 8px 10px; border: 1px solid #cdd4c7; border-radius: 3px; color: var(--ink); background: #fff; font-size: 14px; }
.search-count { font-size: 12px; margin: 8px 0 12px; color: var(--muted); }
.glossary { margin: 0; }
.glossary-entry { display: grid; grid-template-columns: 190px 1fr; gap: 20px; border-top: 1px solid var(--line); padding: 12px 0; scroll-margin-top: 20px; }
.glossary-entry:target { background: var(--soft); }
.glossary-entry dt { font-size: 15px; color: var(--ink); font-weight: 600; }
.term-aliases { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
.glossary-entry dd { margin: 0; font-size: 15px; }
.search-empty { color: var(--muted); padding: 20px 0; font-size: 14px; }
.definition { position: fixed; margin: 0; padding: 16px 18px; border: 1px solid #ced9c3; border-radius: 6px; width: 340px; max-width: calc(100vw - 24px); color: var(--text); background: #fffffc; box-shadow: 0 8px 30px #25372f26; z-index: 5; }
.definition-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.definition h2 { font-size: 20px; line-height: 1.3; margin: 0; }
.definition p { font-size: 14px; margin: 0 0 12px; }
.definition > a { color: var(--green); font-size: 12px; }
.image-viewer { width: min(1100px, 96vw); max-width: 96vw; max-height: 94vh; padding: 20px; border: 0; border-radius: 6px; background: #fff; color: var(--text); }
.image-viewer::backdrop { background: #172a22c9; }
.image-viewer-header { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 16px; }
.image-viewer-header h2 { font-size: 21px; margin: 0; }
.image-scroll { overflow: auto; max-height: calc(94vh - 110px); }
.image-scroll img { display: block; width: 100%; }
@media (max-width: 600px) {
  .figure-grid { grid-template-columns: 1fr; }
  .study-section h2 { font-size: 20px; }
  .code-key ul { grid-template-columns: 1fr 1fr; column-gap: 10px; }
  .code-key li { gap: 4px; }
  .glossary-entry { grid-template-columns: 1fr; gap: 4px; }
}
@media print {
  .site-header, .lesson-toolbar, dialog, .search-box, .search-count { display: none !important; }
  main { width: 100%; padding: 0; }
  #notes[hidden], #terminology[hidden] { display: block !important; }
  #terminology { break-before: page; }
  .term-link { color: inherit; text-decoration: none; }
  figure, .study-note, .glossary-entry { break-inside: avoid; }
}
