/* Scoped to KOI statements; global page width and editor tabs are preserved. */
.koi-text-statement,.koi-text-reader{--koi-ink:#243653;--koi-muted:#667895;--koi-line:#dbe3ef;--koi-pale:#f4f7fc;color:var(--koi-ink);font-family:inherit;min-width:0;box-sizing:border-box}
.koi-text-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0 22px;font-size:12px;color:var(--koi-muted)}
.koi-text-statement button,.koi-text-reader button{font:inherit;font-size:13px;font-weight:600;line-height:1.5;padding:8px 12px;min-height:38px;border:1px solid #cbd5e7;background:#fff;border-radius:9px;color:#3e57b5;cursor:pointer}
.koi-text-statement button:hover,.koi-text-reader button:hover{background:#edf2ff}
.koi-text-statement button:focus-visible,.koi-text-reader button:focus-visible{outline:3px solid #9bafff;outline-offset:2px}
#labLayout.workbench28 .lab-story .koi-text-content,.koi-text-content{font-size:16px!important;line-height:1.9;overflow-wrap:break-word;word-break:normal;min-width:0}
#labLayout.workbench28 .lab-story .koi-text-content p,.lab-story .koi-text-content p,.koi-text-content p{font-size:inherit!important;line-height:1.9!important;margin:0 0 17px!important;color:inherit;white-space:normal;word-break:normal;overflow-wrap:break-word}
.koi-text-content h3{font-size:18px!important;font-weight:750;line-height:1.6;margin:30px 0 14px!important;padding-top:16px;border-top:1px solid var(--koi-line);color:inherit}
.koi-text-content var{font-family:Georgia,'Times New Roman',serif;font-size:1.06em;font-style:italic;white-space:nowrap}
.koi-text-content sub,.koi-text-content sup{font-size:.75em;line-height:0;position:relative;vertical-align:baseline}
.koi-text-content sub{bottom:-.28em}.koi-text-content sup{top:-.48em}
.koi-text-content sub sub{font-size:.8em}
.koi-text-content .koi-list-line{padding-left:1.1em;text-indent:-1.1em;margin-bottom:8px!important}
.koi-table-scroll{max-width:100%;overflow:auto;margin:20px 0;overscroll-behavior:contain;border:1px solid var(--koi-line);border-radius:10px}
.koi-text-content table{border-collapse:collapse;width:100%;font-size:14px;line-height:1.7;background:#fff;text-align:left}
.koi-text-content td,.koi-text-content th{padding:11px 13px;border-bottom:1px solid var(--koi-line);border-right:1px solid var(--koi-line);min-width:55px;vertical-align:top;color:var(--koi-ink)}
.koi-text-content th{background:#edf2ff;font-weight:700}.koi-text-content tr:last-child td{border-bottom:0}.koi-text-content td:last-child,.koi-text-content th:last-child{border-right:0}
.koi-text-figure{margin:22px 0!important;padding:14px 10px 4px;background:#fff;border:1px solid var(--koi-line);border-radius:12px;max-width:100%;box-sizing:border-box}
.koi-figure-scroll{max-width:100%;overflow:auto;overscroll-behavior:contain;padding:4px 0}
.koi-figure-scroll>div{width:100%}.koi-text-figure svg{display:block;width:100%;height:auto;max-width:none!important;background:#fff}
.koi-text-figure figcaption{text-align:right;margin:8px 0 4px}.koi-text-figure button{font-size:12px;padding:5px 9px;min-height:32px}
.koi-example-label{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:16px 0 6px;font-size:14px}
#labLayout.workbench28 .lab-story .koi-contest-example pre,.koi-contest-example pre{font:14px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace!important;white-space:pre!important;overflow:auto!important;overflow-wrap:normal!important;word-break:normal!important;background:var(--koi-pale);color:var(--koi-ink);border:1px solid var(--koi-line);border-radius:10px;padding:14px!important;margin:0 0 16px!important;max-width:100%;box-sizing:border-box}
.koi-contest-example code{font:inherit;white-space:inherit;color:inherit;background:none;padding:0}
.lab-story .koi-text-credit{font-size:11px!important;line-height:1.7!important;color:var(--koi-muted);border-top:1px solid var(--koi-line);padding-top:16px;margin-top:28px!important}.koi-text-credit a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.koi-text-reader{width:min(940px,94vw)!important;max-width:94vw!important;height:min(920px,92dvh);max-height:92dvh;padding:0!important;margin:auto!important;background:#fff;border:1px solid var(--koi-line);border-radius:18px;box-shadow:0 20px 90px #13244540;overflow:hidden}
.koi-text-reader[open]{display:flex!important;flex-direction:column}.koi-text-reader::backdrop{background:#17263d80}
.koi-text-reader>header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 26px;border-bottom:1px solid var(--koi-line);flex:none;background:#fff}.koi-text-reader>header small{font-size:12px;color:var(--koi-muted)}.koi-text-reader>header h2{font-size:21px;margin:6px 0 0;line-height:1.4;color:var(--koi-ink)}.koi-text-reader>header button{flex:none}
.koi-text-reader-scroll{overflow:auto;min-height:0;padding:28px 38px;overscroll-behavior:contain;flex:1}.koi-text-reader .koi-text-content{max-width:780px;margin:0 auto;font-size:17px!important}
.koi-expanded-figure{min-width:600px}.koi-expanded-figure svg{width:100%;height:auto;display:block}.koi-figure-description{font-size:14px;line-height:1.8;color:var(--koi-muted)}
@media(max-width:600px){.koi-text-reader{width:96vw!important;max-width:96vw!important;height:94dvh;max-height:94dvh;border-radius:12px}.koi-text-reader>header{padding:15px}.koi-text-reader>header h2{font-size:18px}.koi-text-reader-scroll{padding:20px 17px}.koi-text-reader .koi-text-content{font-size:16px!important}.koi-text-toolbar{flex-wrap:wrap}}
[data-theme="dark"] .koi-text-statement{--koi-ink:#dce5f6;--koi-muted:#a2b1cd;--koi-line:#39465e;--koi-pale:#1c283d}.koi-text-statement .koi-text-content table{--koi-ink:#243653}
@media(min-width:1280px){#labLayout.workbench28:has(.koi-native-text){grid-template-columns:minmax(320px,1.08fr) minmax(330px,1.35fr) minmax(250px,.85fr)!important}}
