/* FitnessIndexer: a quiet, classic reference-library interface. */
:root{font-family:Arial,Helvetica,sans-serif;color:#202122;background:#f6f6f6;font-synthesis:none;--muted:#54595d;--line:#a2a9b1;--accent:#0645ad}
*{box-sizing:border-box}body{margin:0;height:100vh;height:100dvh;display:grid;grid-template-rows:100px minmax(0,1fr) auto;overflow:hidden}button,textarea,select{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}[hidden]{display:none!important}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}:focus-visible{outline:2px solid #36c;outline-offset:3px}
.site-header{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:16px 32px;border-bottom:1px solid #a7d7f9;background:linear-gradient(#fff,#f6f6f6)}
.brand{display:flex;align-items:center;gap:12px;color:#202122;font:25px Georgia,'Times New Roman',serif;white-space:nowrap}.brand:hover{text-decoration:none}.brand-mark{display:grid;place-items:center;flex-shrink:0;width:49px;height:49px;border:1px solid #72777d;border-radius:50%;background:#fff;color:#202122;font:italic 30px Georgia,serif}.brand-description{font:12px Arial,sans-serif;color:var(--muted);border-left:1px solid #c8ccd1;padding-left:14px}.header-note{font:italic 13px Georgia,serif;color:var(--muted)}
.layout{width:100%;min-height:0;overflow-y:auto;display:grid;grid-template-columns:190px minmax(0,1fr);align-items:start;gap:0;margin:0 auto}
aside{padding:28px 20px}.history-heading{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #c8ccd1;padding-bottom:6px;gap:8px}h2{font-size:13px;font-weight:400;margin:0}.text-button{border:0;background:none;color:var(--accent);font-size:11px;padding:4px}.text-button:hover{text-decoration:underline}.muted,.storage-note{font-size:12px;line-height:1.6;color:var(--muted)}.storage-note{border-top:1px solid #c8ccd1;padding-top:12px;margin-top:24px;font-size:11px}.history-list{list-style:none;margin:16px 0;padding:0}.history-list li+li{margin-top:12px}.history-section{margin:12px 0 18px}.history-section h3,.history-heading h3{font-size:12px;font-weight:600;margin:0}#recentRequestsList{max-height:18rem;overflow-y:auto;padding:2px}.history-item{display:block;width:100%;padding:0;border:0;background:none;text-align:left;color:var(--accent)}.history-item:hover span{text-decoration:underline}.history-item span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font-size:12px;line-height:1.6}.history-item small{display:block;color:var(--muted);font-size:10px;line-height:1.5;margin-top:4px}
.workspace{min-width:0;min-height:100%;padding:30px 40px 48px;border-left:1px solid #a7d7f9;background:#fff}.intro,.answer-section{max-width:1080px}.eyebrow{font-size:10px;color:var(--muted);letter-spacing:1.2px;margin:0 0 12px}h1{font:normal 32px/1.25 Georgia,'Times New Roman',serif;border-bottom:1px solid var(--line);padding-bottom:9px;margin:0}.intro>p:last-child{font-size:14px;line-height:1.75;margin:18px 0;max-width:780px}.answer-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line);padding-bottom:8px}.answer-heading h2{font:28px Georgia,serif}.answer-heading span{font-size:11px;color:var(--muted)}.asked-question{font-size:13px;color:var(--muted);line-height:1.6;overflow-wrap:anywhere}.answer{font-size:14px;line-height:1.7;overflow-wrap:anywhere}.answer h1,.answer h2{font-family:Georgia,'Times New Roman',serif;font-weight:400;border-bottom:1px solid var(--line);margin:26px 0 12px;padding-bottom:5px}.answer h1{font-size:29px}.answer h2{font-size:24px}.answer h3{font-size:18px;margin:24px 0 10px}.answer h4,.answer h5,.answer h6{font-size:15px;margin:20px 0 10px}.answer p{margin:12px 0}.answer a{color:var(--accent)}.answer blockquote{border-left:3px solid #c8ccd1;margin:18px 0 18px 16px;padding:1px 20px;color:#404448}.answer table{display:block;overflow-x:auto;max-width:100%;border-collapse:collapse;margin:18px 0;font-size:13px}.answer th,.answer td{border:1px solid var(--line);padding:7px 12px;text-align:left;min-width:90px;background:#f8f9fa}.answer th{background:#eaecf0}.answer pre{overflow:auto;background:#f8f9fa;border:1px solid #eaecf0;padding:14px;white-space:pre}.answer code{font-size:13px;background:#f8f9fa;padding:2px 4px}.answer pre code{padding:0}.answer hr{border:0;border-top:1px solid #a2a9b1;margin:24px 0}.answer img{max-width:100%;height:auto}.answer li{margin:4px 0}.answer ul,.answer ol{padding-left:26px}
.input-dock{border-top:1px solid #a7d7f9;box-shadow:0 -4px 18px rgb(6 69 173 / 8%);background:#f6f6f6;padding-bottom:env(safe-area-inset-bottom)}.dock-layout{display:grid;grid-template-columns:190px minmax(0,1fr)}.dock-content{grid-column:2;min-width:0;border-left:1px solid #a7d7f9;background:#f0f5fc;padding:14px 40px 10px}.dock-content>form{max-width:1080px}.settings{display:flex;gap:20px;margin-bottom:10px}.settings label{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted)}select{min-width:0;max-width:100%;padding:6px 24px 6px 8px;border:1px solid var(--line);border-radius:2px;background:#f8f9fa;color:#202122;font-size:12px}.composer{border:2px solid #6489c4;border-radius:6px;background:#fff;box-shadow:0 2px 8px rgb(6 69 173 / 8%);overflow:hidden}.composer:focus-within{border-color:#36c;box-shadow:0 0 0 3px rgb(51 102 204 / 18%)}.composer-label{display:block;padding:12px 14px 0;color:#202122;font-size:13px;font-weight:600}textarea{display:block;width:100%;height:70px;min-height:50px;max-height:18dvh;resize:none;border:0;background:transparent;padding:8px 14px 12px;font-size:16px;line-height:1.5;color:#202122;outline:0}textarea:focus-visible{outline:none}textarea::placeholder{color:#54595d}.composer-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 10px;background:#f8f9fa;border-top:1px solid #eaecf0}.composer-footer>span{font-size:11px;color:var(--muted)}.primary-button{border:1px solid #0645ad;border-radius:4px;background:#0645ad;color:#fff;font-size:12px;font-weight:600;padding:7px 16px;display:flex;gap:18px}.primary-button:hover:not(:disabled){background:#043785;border-color:#043785}#status{font-size:12px;color:var(--muted);min-height:18px;max-height:55px;overflow-y:auto;overflow-wrap:anywhere;line-height:1.5;margin:7px 0 0}#status.error{color:#b32424}
.request-progress{display:block;width:100%;height:4px;margin:10px 0 0;border:0;appearance:none;background:#eaecf0;color:#36c}.request-progress::-webkit-progress-bar{background:#eaecf0}.request-progress:indeterminate{background:linear-gradient(90deg,#eaecf0 0%,#eaecf0 25%,#36c 50%,#eaecf0 75%,#eaecf0 100%);background-size:200% 100%;animation:request-progress 1.8s linear infinite}.request-progress:indeterminate::-webkit-progress-bar{background:transparent}.request-progress::-moz-progress-bar{background:#36c}@keyframes request-progress{from{background-position:100% 0}to{background-position:-100% 0}}@media(prefers-reduced-motion:reduce){.request-progress:indeterminate{animation:none}.request-progress::-moz-progress-bar{animation:none}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.research-ad{padding:14px;background:linear-gradient(120deg,#f0f5fc,#fff);overflow-wrap:anywhere}.research-ad .ad-label{margin:0 0 10px;font-size:10px;letter-spacing:.6px;text-transform:uppercase;color:var(--muted)}.research-ad h2{font:24px/1.2 Georgia,'Times New Roman',serif;margin:0 0 8px}.research-ad>p:last-child{max-width:620px;margin:0;font-size:13px;line-height:1.5;color:var(--muted)}
@media(max-width:900px){.header-note{display:none}.workspace{padding:24px}.dock-content{padding:12px 24px}.brand-description{font-size:11px}.settings{gap:12px}.settings label{align-items:flex-start;flex-direction:column;gap:4px}}
@media(max-width:600px){body{grid-template-rows:80px minmax(0,1fr) auto}.site-header{padding:12px 16px}.brand{gap:9px;font-size:23px;flex-wrap:wrap;position:relative;padding-left:47px}.brand-mark{position:absolute;left:0;top:0;width:38px;height:38px;font-size:25px}.brand-description{flex-basis:100%;border:0;padding:0;font-size:10px;margin-top:-5px}.layout{display:flex;flex-direction:column;background:white}.workspace{order:0;width:100%;min-height:auto;border-left:0;padding:24px 18px}aside{order:1;width:100%;padding:18px;border-top:1px solid #c8ccd1;background:#f6f6f6}.dock-layout{display:block}.dock-content{border:0;padding:10px 18px}.settings label{flex:1;min-width:0}select{width:100%}h1{font-size:27px}.answer-heading{flex-wrap:wrap;gap:6px}.answer-heading h2{font-size:25px}.composer-footer>span{font-size:10px}#status{max-height:36px}}

/* Keep the sidebar in view; long answers and history scroll independently. */
@media(min-width:601px){
  .layout{overflow:hidden;grid-template-rows:minmax(0,1fr);align-items:stretch}
  .layout>aside{min-height:0;overflow-y:auto;overscroll-behavior:contain}
  .workspace{min-height:0;overflow-y:auto;overscroll-behavior:contain}
}

/* Progress and the current video belong to the document area. */
.research-progress{margin-bottom:18px}.research-progress:has(#status:empty):has(.request-progress[hidden]){display:none}.research-progress .request-progress{margin:0}.research-progress #status{margin:0;padding:8px 0;max-height:none}#status:empty{display:none}#status.error{padding:8px 10px;background:#fff2f2;border:1px solid #e4b7b7}
.live-research{min-width:0;max-width:1080px}.researched-video-list{margin:0;padding-left:22px;font-size:14px;line-height:1.6}.researched-video-list li{margin:0 0 12px;overflow-wrap:anywhere}.research-ad{min-height:145px}

.research-layout{min-width:0}.video-panel{display:none}.video-panel h2{font:20px Georgia,serif;border-bottom:1px solid #a2a9b1;padding-bottom:8px;margin:0 0 16px}.video-card{display:block;margin-bottom:26px;font-size:14px;line-height:1.5}.video-card img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border:1px solid #c8ccd1;background:#eaecf0;margin-bottom:0}.video-card span{display:block;overflow-wrap:anywhere;font-weight:600;margin-top:10px}
@media(min-width:1200px){.research-layout:has(.video-panel:not([hidden])){display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:32px;align-items:start}.research-layout .answer-section{min-width:0}.video-panel:not([hidden]){display:flex;flex-direction:column;height:var(--video-panel-height,60dvh);overflow:hidden;position:sticky;top:0;align-self:start;padding-left:20px;border-left:1px solid #c8ccd1}}

@media(min-width:1600px){.research-layout:has(.video-panel:not([hidden])){grid-template-columns:minmax(0,1fr) 400px}}

@media(min-width:1200px){
  .video-panel h2{flex-shrink:0}
  #videoList{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:10px}
}

/* Keep the next-question action within reach while reading restored answers. */
.floating-question{position:fixed;z-index:10;left:20px;bottom:calc(24px + env(safe-area-inset-bottom));min-height:44px;padding:12px 20px;border:1px solid #a2a9b1;border-radius:2px;background:linear-gradient(#fff,#eaecf0);color:var(--accent);font-size:14px;font-weight:600;box-shadow:0 1px 3px rgb(32 33 34 / 12%)}
.floating-question:hover:not(:disabled){background:#fff;border-color:#72777d;color:var(--accent);text-decoration:underline}
body:has(#newQuestion:not([hidden])) aside{padding-bottom:100px}
@media(max-width:600px){
  .floating-question{left:18px;bottom:calc(18px + env(safe-area-inset-bottom));max-width:calc(100% - 36px)}
  body:has(#newQuestion:not([hidden])) aside{padding-bottom:100px}
}

/* Let the video list reach the bottom of the available reading area. */
@media(min-width:1200px){.workspace:has(.video-panel:not([hidden])){padding-bottom:0}}
