.rehab { max-width: 1380px; }
.rehab-head { margin-bottom: 23px; }
.rehab-head .link { min-height: 36px; margin-bottom: 6px; }
.rehab-head h1 { font-size: clamp(26px, 2.7vw, 39px); line-height: 1.3; }
.rehab-head p, .topic-intro { margin-top: 9px; color: #526983; }
.rehab-layout { display: grid; grid-template-columns: minmax(208px, 25%) minmax(0, 1fr); gap: clamp(12px, 2vw, 24px); align-items: start; }
.rehab-nav { position: sticky; top: 74px; padding: 17px 14px; }
.nav-title { display: flex; align-items: baseline; justify-content: space-between; gap: 5px; }
.rehab-nav h2 { font-size: 17px; }
#rehab-count { color: #526983; font-size: 13px; }
.rehab-nav label { display: block; margin: 12px 0 4px; color: #425c75; font-size: 13px; font-weight: 600; }
.rehab-nav input, .rehab-nav select { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #b9cde0; border-radius: 8px; background: #fff; }
#rehab-topics { display: grid; gap: 2px; max-height: max(210px, calc(100vh - 358px)); margin-top: 14px; overflow-y: auto; }
#rehab-topics a { display: flex; align-items: center; min-height: 44px; padding: 7px 10px; border-radius: 7px; color: #38516b; line-height: 1.45; }
#rehab-topics a:hover { background: #f1f6fc; }
#rehab-topics a[aria-current=page] { background: #e8f1ff; color: #1b519f; font-weight: 650; box-shadow: inset 3px 0 #2d69bb; }
.rehab-detail { padding: clamp(18px, 2.6vw, 33px); scroll-margin-top: 82px; }
.topic-region { margin-bottom: 4px; color: #496b8a; font-weight: 650; font-size: 13px; }
#rehab-title { font-size: clamp(22px, 2vw, 30px); }
.rehab-detail section { margin-top: 23px; }
.rehab-detail section h3 { margin-bottom: 8px; font-size: 17px; }
.rehab-detail h4 { margin: 0 0 4px; font-size: 14px; }
.rehab-detail p { line-height: 1.7; }
.rehab-detail .red-flag { margin-top: 16px; padding: 12px 15px; background: #fff6f2; border-left: 3px solid #be653c; border-radius: 3px 8px 8px 3px; color: #70391e; }
.rehab-detail .red-flag h3 { margin-bottom: 2px; color: #843b20; font-size: 14px; }
.rehab-phases { padding: 0; margin: 0; list-style: none; }
.rehab-phases li { display: grid; grid-template-columns: 26px 1fr; align-items: start; gap: 10px; padding: 10px 0; border-bottom: 1px solid #e4ecf3; }
.phase-number { display: grid; place-content: center; width: 25px; height: 25px; background: #eaf2fc; color: #285794; border-radius: 50%; font-size: 13px; font-weight: 650; }
.rehab-criteria { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 12px; }
.rehab-criteria > div { padding: 11px 13px; border-radius: 8px; background: #f2f6fa; }
.rehab-detail dl { margin: 0; }
.resource-row { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 10px; padding: 9px 0; border-top: 1px solid #e4ecf3; align-items: baseline; }
.resource-row dt { font-weight: 600; color: #536b80; }
.resource-row dd { display: flex; flex-wrap: wrap; gap: 0 14px; }
.resource-row a, .source-links a, .exercise-title { color: #2458a6; text-decoration: underline; text-underline-offset: 3px; }
.resource-row a, .source-links a { display: inline-flex; align-items: center; min-height: 36px; }
.exercise-row { padding: 13px 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; border-top: 1px solid #e4ecf3; }
.exercise-row p { margin-top: 2px; color: #516780; }
.exercise-row .button, .rehab-detail .button { min-height: 44px; }
.source-links { margin-top: 20px; border-top: 1px solid #dbe5ef; }
.source-links summary { padding: 10px 0; min-height: 44px; font-weight: 600; cursor: pointer; }
.source-links a { margin-right: 16px; }
.empty-state p { margin: 7px 0 16px; }
@media (max-width: 900px) { .rehab { padding-inline: 16px; } .rehab-layout { grid-template-columns: minmax(186px, 26%) minmax(0,1fr); } }
@media (max-width: 720px) {
  .rehab-layout, .rehab-criteria { grid-template-columns: minmax(0, 1fr); }
  .rehab-nav { position: static; }
  #rehab-topics { max-height: 158px; }
  .resource-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .exercise-row { grid-template-columns: minmax(0,1fr); gap: 6px; justify-items: start; }
}
@media (pointer: coarse) { .resource-row a, .source-links a { min-height: 44px; } }
