/* 1TTD Trainer integration additions (10 Nov 2026): Training Library, Academy real-trainer step, device-data panel. */
.sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.tl-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:22px 0 12px}
.tl-tab{font:600 16px/1 var(--display);letter-spacing:.06em;text-transform:uppercase;min-height:44px;padding:0 14px;background:var(--panel);color:var(--chalk);border:1px solid var(--line2);cursor:pointer}
.tl-tab[aria-selected="true"]{background:var(--brass);color:#111;border-color:var(--brass)}
.tl-bar{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin:6px 0}
.tl-search{display:flex;flex-direction:column;gap:4px;flex:1 1 280px;font-size:14px;color:var(--muted)}
.tl-search input{min-height:44px;padding:8px 12px;background:var(--bg2);border:1px solid var(--line2);color:var(--chalk);font:inherit}
.tl-bar .btn{min-height:44px}
.tl-layout{display:grid;grid-template-columns:270px 1fr;gap:22px;align-items:start;margin-top:10px}
.tl-filters{background:var(--panel);border:1px solid var(--line);padding:12px;position:sticky;top:calc(var(--hdr, 64px) + 10px);max-height:calc(100vh - 100px);overflow:auto}
.tl-drawer-hd{display:none;align-items:center;justify-content:space-between}
.tl-group{border:0;border-top:1px solid var(--line);margin:0;padding:10px 0}
.tl-group legend{font:600 15px/1 var(--display);letter-spacing:.12em;text-transform:uppercase;color:var(--brass2);padding:0 0 6px}
.tl-opt{display:flex;align-items:center;gap:8px;min-height:36px;font-size:15px;cursor:pointer}
.tl-opt input{width:20px;height:20px;accent-color:var(--brass)}
.tl-opt.is-zero{color:var(--dim)}
.tl-n{color:var(--muted);font-size:13px}
.tl-filter-btn{display:none}
.tl-card{margin-bottom:14px}
.tl-card .lib-card-in{display:block}
.tl-card .lib-card-in > * + *{margin-top:6px}
.tl-card h3{margin:0 0 6px}
.tl-empty{margin-top:10px}
@media (max-width:860px){
  .tl-layout{grid-template-columns:1fr}
  .tl-filter-btn{display:inline-flex}
  .tl-filters{display:none;position:fixed;inset:0;z-index:60;max-height:none;top:0;border:0;padding:16px}
  .tl-filters.open{display:block}
  .tl-drawer-hd{display:flex}
  body.tl-drawer-open{overflow:hidden}
}
.ac-real{margin-top:12px}
.ac-real iframe{width:100%;height:min(86vh,980px);border:1px solid var(--line2);background:#0c1912}
.ac-real .route{font-size:14px;color:var(--muted)}
.device-data{max-width:980px;margin:28px auto;padding:18px 20px;border:1px solid #44624b;border-radius:14px;background:#1a2d21;color:#f2f7ec;font:15px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}
.device-data h2{margin:0 0 8px;font-size:22px}.device-data h3{font-size:17px;margin:16px 0 6px}
.device-data table{width:100%;border-collapse:collapse;font-size:14px}.device-data td,.device-data th{border-bottom:1px solid #44624b;padding:6px;text-align:left;vertical-align:top}
.device-data button{min-height:44px;padding:8px 14px;border-radius:9px;border:1px solid #6f9274;background:#294335;color:#f2f7ec;font:inherit;cursor:pointer}
.device-data button:focus-visible{outline:3px solid #f7cf84;outline-offset:3px}
.device-data .muted{color:#b9ccbb}
/* Academy step 5: five stage tabs on one row; the real trainer uses the full width (no empty lesson board). */
.stage-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}
.ac-layout.is-real{grid-template-columns:minmax(0,1fr)}
.ac-layout.is-real .ac-board{display:none}
@media (max-width:520px){.stage-tabs button{font-size:12px;letter-spacing:.01em;padding:4px 1px}}
/* Privacy "Data on this device": long storage names wrap; the table scrolls inside its own box on phones */
.device-data{max-width:100%;overflow-wrap:anywhere}
.device-data table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse}
.device-data code{word-break:break-all}
.device-data td,.device-data th{padding:4px 8px;vertical-align:top;text-align:left}
/* Very narrow phones (320px): lesson picker and lesson board never wider than the screen */
#lessonSel{max-width:100%;min-width:0}
.ac-board,.ac-layout>*{min-width:0}
.ac-board svg,.ac-pitch svg{max-width:100%;height:auto}
@media (max-width:360px){.ac-head,.ac-lesson-head{flex-wrap:wrap}#lessonSel{width:100%}}
/* R2: Academy real-engine drills */
.ac-drill{margin-top:1.6rem;padding:1rem 1.1rem;border:2px solid #4f8f5b;border-radius:12px;background:rgba(40,90,50,.18)}
.ac-drill h2{margin-top:0;font-size:1.15rem}
.chip-real{background:#2f6d3a;color:#eaffea;border-color:#5fae6c}
.ac-drill-frame iframe{width:100%;height:640px;border:1px solid #3c5a43;border-radius:8px;background:#0b130e}
.drill-facts{width:100%;border-collapse:collapse;margin:.5rem 0;font-size:.92rem;display:block;overflow-x:auto}
.drill-facts th,.drill-facts td{padding:.25rem .5rem;border-bottom:1px solid rgba(255,255,255,.12);text-align:left}
@media(max-width:600px){.ac-drill-frame iframe{height:560px}}

/* R4: Community & Resources */
.page-resources .res-group{margin:26px 0 8px}
.page-resources .res-group h2{margin:0 0 10px}
.page-resources .res-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.page-resources .res-list li{border:1px solid var(--line,#2a3a31);border-left:4px solid var(--brass,#c4a263);padding:10px 14px;background:var(--panel,#121c16);overflow-wrap:anywhere}
.page-resources .res-list a{font-weight:700;font-size:17px}
.page-resources .res-list .ext{font-weight:400;font-size:13px;opacity:.8}
.page-resources .res-list p{margin:4px 0 0}
@media (min-width:900px){.page-resources .res-list{grid-template-columns:1fr 1fr}}
/* R5: owner-review marker on the private privacy draft */
.r5-review{border:2px dashed #b45309;background:#fffbeb;color:#3b2504;padding:.6rem .8rem;border-radius:8px}

/* R5.3: Scottish Blood Bowl Community (Resources). Same card style; the Discord card is the featured one. */
.page-resources .res-list li.res-feature{border-left-width:6px;background:linear-gradient(180deg,rgba(196,162,99,.10),rgba(196,162,99,0)) ,var(--panel,#121c16)}
.page-resources .res-list li.res-feature>a{font-size:19px}
.page-resources .res-list a.res-join{display:inline-block;margin-top:8px;font-size:15px;padding:8px 14px;min-height:40px}
@media (min-width:900px){.page-resources .res-list li.res-feature{grid-column:1 / -1}}
/* R5.4 (brief F): resource-card link headings a little larger/bolder than their descriptions; descriptions a touch quieter. */
.page-resources .res-list li>a:first-child{font-size:18.5px;font-weight:800;line-height:1.3;letter-spacing:.005em}
.page-resources .res-list li.res-feature>a:first-child{font-size:20px}
.page-resources .res-list li>p{font-size:15px;line-height:1.5;color:var(--muted,#a9b5ac)}
@media (max-width:420px){.page-resources .res-list li>a:first-child{font-size:17.5px}.page-resources .res-list li.res-feature>a:first-child{font-size:18.5px}}

/* R5.4.x (R54-20): footer group titles are plain text, not headings (no heading-level skips); same look as the old h4 */
.site-ftr .ftr-h{font-family:var(--display);font-weight:600;color:var(--brass);line-height:1.02;margin:0 0 .4em;font-size:15px;text-transform:uppercase;letter-spacing:.16em}
/* R5.4.x (R54-18): the website name sits under the resource title as quiet secondary text with one external-link cue; screen readers still hear "opens in a new tab" */
.page-resources .res-list .res-dom{display:block;font-weight:400;font-size:13.5px;line-height:1.35;color:var(--muted,#a9b5ac);margin-top:2px;letter-spacing:0}
.page-resources .res-list .res-ext{font-weight:400}
