/* V8.1.6 tutor only. Existing OS navigation, viewer and timers are not restyled. */
.ai-panel.slide-tutor {display:grid;grid-template-rows:auto auto minmax(64px,1fr) auto;overflow:hidden;background:#09101a;color:#e7eef8;font-size:14px;line-height:1.5;isolation:isolate}
.ai-panel.slide-tutor[hidden] {display:none}
.slide-tutor * {box-sizing:border-box}
.slide-tutor [hidden] {display:none!important}
.slide-tutor button,.slide-tutor a {touch-action:manipulation}
.slide-tutor button {cursor:pointer;font:inherit;color:inherit;border:1px solid #2a3749;background:#111d2c;border-radius:10px;padding:8px 10px;min-height:36px}
.slide-tutor button:hover:not(:disabled),.slide-tutor a:hover {background:#192c41}
.slide-tutor button:disabled {opacity:.55;cursor:wait}
.slide-tutor :is(button,a,textarea,summary,[tabindex]):focus-visible {outline:2px solid #77dfff;outline-offset:2px}
.tutor-head {display:flex;justify-content:space-between;align-items:center;gap:8px;padding:13px 12px 10px;border-bottom:1px solid #202b39}
.tutor-brand {display:flex;align-items:center;gap:10px;min-width:0}
.tutor-brand .ai-orb {flex:0 0 29px;width:29px;height:29px;box-shadow:none}
.tutor-eyebrow {display:block;color:#79dcfa;font-size:10px;font-weight:800;letter-spacing:.1em}
.tutor-brand h2 {margin:2px 0 0;font-size:14px;letter-spacing:-.02em;font-weight:750;line-height:1.3}
.tutor-controls {display:flex;gap:4px;flex-shrink:0}
.tutor-controls button {width:32px;padding:0;font-size:19px}
.tutor-tools {padding:10px 12px 7px;display:grid;gap:8px;border-bottom:1px solid #202b39;min-width:0}
.tutor-topic {margin:0;min-width:0;line-height:1.35}
.tutor-topic span {display:block;font-size:10px;color:#96b4c9}
.tutor-topic strong {display:block;font-size:12px;font-weight:650;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin-top:2px}
.tutor-quick {display:flex;gap:6px;flex-wrap:wrap}
.tutor-quick button {flex:1;white-space:nowrap;padding:6px;font-size:12px;font-weight:650;min-height:34px;border-color:#315269;background:#0e2232;color:#b6ecff}
.tutor-utility {display:flex;justify-content:space-between;gap:8px}
.tutor-utility button {padding:0 3px;min-height:25px;border:0;background:none;color:#a8bbcf;font-size:11px;text-decoration:underline;text-underline-offset:3px}
.tutor-utility button[aria-pressed=true] {color:#8ee3fa}
.tutor-thread {min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:14px 12px;scrollbar-gutter:stable;overflow-wrap:anywhere}
.tutor-message {flex:none;max-width:100%;width:100%;padding:12px;border:1px solid #273545;border-radius:14px;background:#101a28;white-space:normal}
.tutor-message-label {font-size:9px;font-weight:800;color:#84dbf4;letter-spacing:.08em}
.tutor-message p {white-space:pre-wrap;margin:7px 0 0;font-size:13px;line-height:1.65;color:#e2eaf4}
.tutor-user {align-self:flex-end;width:auto;max-width:94%;background:#0d2940;border-color:#244661}
.tutor-welcome {border-style:dashed;background:#0a1421}
.tutor-welcome p {color:#bccbdc}
.tutor-evidence {margin-top:12px;padding-top:8px;border-top:1px solid #293747;display:flex;gap:5px;flex-wrap:wrap}
.tutor-basis {display:inline-flex;border:1px solid #2b485b;border-radius:6px;font-size:10px;line-height:1.4;padding:3px 5px;color:#a6d4e7;background:#0c202e}
.tutor-evidence small {flex-basis:100%;font-size:10px;line-height:1.5;color:#a6b7ca}
.tutor-sources {display:grid;gap:5px;margin-top:9px}
.tutor-sources>span {color:#acbfd3;font-size:10px}
.tutor-sources a {color:#8ddfff;font-size:11px;overflow-wrap:anywhere;text-underline-offset:3px}
.tutor-error {border-color:#68503f;background:#231d1a}
.tutor-error-title {display:block;font-size:13px;margin-top:5px;color:#ffd29f}
.tutor-error-actions {display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-top:12px;font-size:11px}
.tutor-error-actions a {color:#b7e7fa}
.tutor-error-actions button {font-size:11px;min-height:32px}
.tutor-wait {border-style:dashed;background:#0d1927}
.tutor-wait p {color:#b7c9dc}
.tutor-footer {min-width:0;padding:10px 12px max(9px,env(safe-area-inset-bottom));border-top:1px solid #283548;background:#0b131e;display:grid;gap:8px}
.tutor-form {margin:0;display:grid;gap:6px;min-width:0}
.tutor-form textarea {display:block;min-width:0;width:100%;height:66px;min-height:48px;max-height:120px;padding:9px 11px;border:1px solid #35485e;background:#070e18;border-radius:12px;color:#eef6ff;font-size:16px;line-height:1.4;resize:vertical}
.tutor-form textarea::placeholder {color:#94a9bd;opacity:1}
.tutor-form-row {display:flex;justify-content:flex-end;align-items:center;gap:7px;min-width:0}
.tutor-count {margin-right:auto;font-size:10px;color:#a4b5c7;font-variant-numeric:tabular-nums}
.slide-tutor .tutor-send {min-width:77px;background:linear-gradient(110deg,#177cdc,#5656d8);border-color:#618fe1;color:white;font-size:12px;font-weight:750;padding:6px 12px}
.slide-tutor .tutor-stop {min-width:48px;font-size:12px;padding:6px 10px}
.tutor-external {display:flex;gap:8px;align-items:center;justify-content:space-between}
.tutor-external a {font-weight:700;font-size:12px;line-height:1.4;color:#98e8ff;min-height:32px;display:flex;align-items:center;text-decoration:none;white-space:nowrap;padding:3px 5px;border-radius:7px}
.tutor-external button {font-size:11px;min-height:30px;padding:3px 9px;background:none}
.tutor-privacy {margin:0;color:#acbbcc;font-size:10px}
.tutor-privacy summary {cursor:pointer;min-height:21px;display:list-item;list-style:revert}
.tutor-privacy p {margin:5px 0 0;max-height:90px;overflow:auto;font-size:11px}
.tutor-status {font-size:11px;line-height:1.4;color:#aad6e7;margin:0;max-height:55px;overflow:auto}
.tutor-copy-card textarea {width:100%;min-height:145px;max-height:250px;font-size:14px;line-height:1.5;background:#06101b;color:#f0f6ff;border:1px solid #34506c;padding:10px;margin-top:9px;resize:vertical}
.tutor-sr {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.tutor-recall-cover {position:absolute;inset:0;z-index:15;display:grid;align-content:center;justify-items:center;gap:10px;text-align:center;padding:20px;background:#03070d;color:#dcecfb;border:1px solid #1c2e42;border-radius:10px}
.tutor-recall-cover[hidden] {display:none}
.tutor-recall-cover strong {font-size:clamp(16px,2vw,25px);letter-spacing:-.02em}
.tutor-recall-cover p {font-size:13px;line-height:1.5;max-width:340px;margin:0;color:#abbdd0}
.tutor-recall-cover button {background:#142b40;color:#a6e6ff;border:1px solid #355b75;border-radius:10px;padding:9px 14px;cursor:pointer}
@media(min-width:761px) and (min-height:681px){.viewer.ai-open{--ai-width:400px}}
@media(max-width:760px) and (orientation:portrait){
 .viewer.ai-open .ai-panel.slide-tutor {border-radius:18px;box-shadow:0 0 0 1px #1c3347,0 15px 65px #000b;height:min(var(--ai-mobile-height,70dvh),calc(var(--vvh) - var(--safe-t) - 72px));max-height:calc(var(--vvh) - var(--safe-t) - 72px)}
 .tutor-head {padding:10px 11px 8px}
 .tutor-tools {padding:8px 11px 6px;gap:6px}
 .tutor-thread {padding:10px;gap:9px}
 .tutor-message {padding:10px}
 .tutor-footer {padding:8px 10px max(7px,env(safe-area-inset-bottom));gap:5px}
 .tutor-form textarea {height:54px;resize:none}
 .tutor-brand h2 {font-size:13px}
}
@media(max-height:600px){
 .ai-panel.slide-tutor {grid-template-rows:auto auto minmax(45px,1fr) auto}
 .tutor-head {padding:5px 9px;gap:4px}
 .tutor-brand .ai-orb {width:22px;height:22px;flex-basis:22px}
 .tutor-brand h2 {font-size:12px}
 .tutor-controls button {width:28px;min-height:28px;font-size:17px}
 .tutor-tools {padding:5px 9px;gap:4px}
 .tutor-topic strong {font-size:11px}
 .tutor-topic span {font-size:9px}
 .tutor-quick {gap:4px}
 .tutor-quick button {min-height:27px;font-size:10px;padding:3px}
 .tutor-utility {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .tutor-utility:focus-within {position:relative;width:auto;height:auto;overflow:visible;clip-path:none}
 .tutor-thread {padding:7px;gap:7px}
 .tutor-message {padding:8px}
 .tutor-message p {font-size:12px;line-height:1.5}
 .tutor-footer {padding:5px 8px;gap:3px}
 .tutor-form {gap:3px;grid-template-columns:minmax(0,1fr) auto}
 .tutor-form textarea {height:46px;min-height:46px;max-height:65px;resize:none;padding:5px 7px}
 .tutor-form-row {display:flex;flex-direction:column;gap:2px;justify-content:stretch}
 .tutor-count {display:none}
 .slide-tutor .tutor-send,.slide-tutor .tutor-stop {min-width:52px;min-height:30px;padding:3px 6px;font-size:11px;flex:1}
 .tutor-external a {min-height:27px;font-size:11px}
 .tutor-external button {min-height:27px;font-size:10px}
 .tutor-privacy summary {min-height:16px;font-size:9px}
 .tutor-privacy p {max-height:60px}
}
@media(prefers-reduced-motion:reduce){.slide-tutor *{animation:none!important;transition:none!important}}
/* Keep mission navigation reachable while the tutor is open. */
.viewer.ai-open .nav-arrow {display:inline-flex;align-items:center;justify-content:center;gap:6px}
.viewer.ai-open .nav-arrow svg {width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;flex:none}
@media(max-width:760px) and (orientation:portrait){
 .viewer.ai-open .ai-panel.slide-tutor {bottom:calc(64px + env(safe-area-inset-bottom));height:min(var(--ai-mobile-height,66dvh),calc(var(--vvh) - var(--safe-t) - env(safe-area-inset-bottom) - 140px));max-height:calc(var(--vvh) - var(--safe-t) - env(safe-area-inset-bottom) - 140px)}
}
@media(orientation:landscape) and (max-height:680px){
 .viewer.ai-open {grid-template-rows:auto minmax(0,1fr) 44px}
 .viewer.ai-open .viewer-bottom {display:grid;min-height:44px;height:44px;padding:4px max(10px,var(--safe-r)) 4px max(10px,var(--safe-l))}
 .viewer.ai-open .nav-arrow {min-height:32px;padding:3px 10px}
 .viewer.ai-open .rate-btn {min-height:30px;padding:3px 9px}
}
/* Native select labels must not widen the library behind the fixed viewer. */
.content .view,.content .view > * {min-width:0}
.library-toolbar {min-width:0;max-width:100%}
.library-toolbar .select-box {min-width:0;max-width:100%}
.library-toolbar .search-box input {min-width:0}
.library-toolbar .search-box svg {width:20px;height:20px;flex:0 0 20px;margin-left:12px;stroke:currentColor;stroke-width:1.8;fill:none}
