/* Shared layout for medicine and TCM resource libraries. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: .8rem; top: -100px; z-index: 101; padding: .6rem; background: #1e293b; color: #fff; }
.skip-link:focus { top: 0; }
.course-resources .resource-back-link { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; text-decoration: none; }
.resource-back-arrow { flex-shrink: 0; font-size: 1rem; font-weight: 400; color: #cbd5e1; }
.resource-main { max-width: 960px; margin: 0 auto; padding: .35rem 1rem .8rem; }
.resource-toolbar { margin-bottom: .5rem; }
.resource-tabs { display: flex; align-items: center; gap: .3rem; border-bottom: 1px solid #334155; }
.resource-tabs button { min-height: 44px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #94a3b8; padding: .4rem .5rem; font: inherit; font-size: .84rem; cursor: pointer; }
.resource-tabs button[aria-selected="true"] { color: #f1f5f9; border-bottom-color: #7dd3fc; }
.resource-panel[hidden] { display: none !important; }
.resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.resource-entry { display: flex; align-items: center; justify-content: space-between; gap: .4rem; min-height: 44px; padding: .5rem .65rem; border: 1px solid #334155; border-radius: 8px; background: #1e293b; color: #f1f5f9; font-size: .84rem; font-weight: 600; line-height: 1.4; text-decoration: none; }
.resource-entry > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.resource-arrow { flex-shrink: 0; color: #7dd3fc; font-size: .82rem; font-weight: 400; }
.resource-entry:hover { border-color: #7dd3fc; background: #25344a; }
.resource-card { min-width: 0; border: 1px solid #334155; border-radius: 8px; background: #1e293b; padding: .45rem .5rem .5rem; }
.resource-card h3 { margin: 0 0 .35rem; font-size: .8rem; line-height: 1.4; font-weight: 600; color: #f1f5f9; }
.resource-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem; }
.resource-links a { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 44px; border: 1px solid #475569; border-radius: 5px; background: #0f172a; font-size: .72rem; line-height: 1.4; color: #a5c7de; text-decoration: none; white-space: nowrap; }
.resource-links a:hover { color: #7dd3fc; border-color: #7dd3fc; background: #25344a; }
.resource-extra-links { margin-top: .45rem; }
.resource-extra-entry { display: flex; align-items: center; gap: .5rem; min-height: 44px; color: #a5c7de; font-size: .76rem; text-decoration: none; }
.resource-extra-entry span { color: #7dd3fc; }
.course-resources .site-footer { margin-top: .5rem; padding: .7rem; font-size: .7rem; color: #94a3b8; }
.course-resources :is(a, button):focus-visible { outline: 2px solid #7dd3fc; outline-offset: 2px; }
@media (max-width: 560px) {
  .resource-main { padding: .35rem .8rem 1rem; }
  .resource-tabs { justify-content: space-between; }
  .resource-tabs button { padding: .4rem .3rem; font-size: .78rem; }
}
@media print { .resource-toolbar, .top-nav { display: none; } .resource-panel[hidden] { display: block !important; } }
