/* No table can widen the page. Dense matrices scroll; narrative rows become cards. */
#app,main,.card,.course-source,.bank-source-reference,.lf-section-body,.lf-step-body {min-width:0;max-width:100%}
#app p,#app h1,#app h2,#app h3,#app h4,#app summary,#app dd {overflow-wrap:break-word;word-break:normal}
#app a {overflow-wrap:anywhere}
#app textarea,#app input,#app select {min-width:0;max-width:100%;box-sizing:border-box}
#app textarea {width:100%}
.grid>*,.hub-grid>*,.area-catalog-grid>*,.area-path-cards>*,.area-source-grid>*,.course-lesson-grid>*,.bank-filters>* {min-width:0}
.responsive-table {max-width:100%;min-width:0;margin:18px 0}
.rt-scroll {width:100%;max-width:100%;overflow:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:12px;background:var(--surface);scrollbar-color:var(--brand-500) var(--brand-50)}
.rt-scroll:focus-visible {outline:3px solid var(--accent-500);outline-offset:3px}
.rt-table {width:max-content;min-width:100%;table-layout:auto;border-collapse:collapse;font-size:14px;line-height:1.65}
.rt-table caption {text-align:left;white-space:normal;padding:15px;color:var(--text-muted);font-weight:650}
.rt-table :is(th,td) {min-width:170px;max-width:340px;width:auto;padding:13px 16px;white-space:pre-line;word-break:normal!important;overflow-wrap:normal!important;hyphens:none;vertical-align:top;text-align:left;border-bottom:1px solid var(--line)}
.rt-table th {background:var(--brand-50);color:var(--brand-900)}
.rt-numeric :is(th,td):not(:first-child) {min-width:105px;font-variant-numeric:tabular-nums}
.rt-key-value {width:100%}.rt-key-value th {min-width:155px;width:28%}
.rt-hint {font-size:12px;color:var(--text-muted);margin:0 0 8px}
.course-table-wrap {max-width:100%;overflow-x:auto;min-width:0}
.course-extract,.source-paragraph {white-space:pre-line;word-break:normal;overflow-wrap:break-word}
.bank-figure {margin:18px 0;max-width:100%}.bank-figure img {display:block;width:100%;height:auto;max-width:900px}.bank-figure figcaption {font-size:12px;padding-top:10px}
@media(max-width:650px) {
  .rt-cards,.rt-cards tbody,.rt-cards tr,.rt-cards td,.rt-cards th {display:block;width:100%;min-width:0;max-width:none}
  .rt-cards {background:var(--brand-50)}
  .rt-cards thead {position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%)}
  .rt-cards tr {background:var(--surface);border:1px solid var(--line);border-radius:12px;margin-bottom:14px;overflow:hidden}
  .rt-cards tr:last-child {margin-bottom:0}
  .rt-cards :is(td,th) {font-size:14px;line-height:1.7;padding:12px 16px;min-width:0;max-width:100%;white-space:pre-line}
  .rt-cards td::before {content:attr(data-label);display:block;font-weight:750;font-size:12px;color:var(--brand-700);margin-bottom:6px}
  .rt-cards td[data-label=""]::before {display:none}
  .rt-key-value th {border:0;padding-bottom:0;background:transparent;font-size:12px}
  .rt-key-value td {padding-top:5px}
  .has-cards .rt-scroll {border:0;border-radius:0;background:transparent;overflow:visible}
  .has-cards .rt-hint {display:none}
  .bank-source-reference details.card {padding:16px 12px}
  .bank-reference-tabs {display:flex;flex-wrap:wrap;gap:8px}
  .bank-reference-tabs button {font-size:13px;min-height:44px;padding:11px 14px}
  .lf-component-results>div {flex-wrap:wrap;gap:6px}
  .area-mini-nav {max-width:100%}
}
@media(max-width:375px) {
  #app {margin-left:6px;margin-right:6px;padding-left:12px;padding-right:12px}
  .process-switch {padding-left:8px;padding-right:8px;gap:7px}
  .process-choice {gap:7px;padding-left:8px;padding-right:8px}
  .process-choice small {font-size:9px;letter-spacing:0}
  .lf-step>summary {gap:7px}.lf-expand {margin-left:auto}
  .area-practice-grid,.course-lesson-grid,.m0-form-grid {grid-template-columns:minmax(0,1fr)}
}
