/* Sidebar title filter: hidden rows must override the explicit grid layout. */
#books .book-row[hidden]{display:none}
.book-search{display:block;margin:0 6px 16px;color:var(--muted);font-size:11px;font-weight:400;min-width:0}
.book-search input{display:block;width:100%;min-width:0;min-height:44px;margin-top:8px;padding:10px 12px;border:1px solid #ddd;border-radius:12px;background:#fff;font-size:14px;color:var(--ink)}
/* Independent sidebar actions; modal lives outside the polling list. */
#books .book-row{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:2px;align-items:center;min-width:0}
#books .book-row>button:first-child{min-width:0;overflow-wrap:anywhere}
#books .book-row>.book-delete{width:44px;height:44px;min-width:44px;min-height:44px;padding:0;display:grid;place-items:center;color:var(--muted);font-size:19px;transition:color .15s ease}
#books .book-row>.book-delete:not(:disabled):hover,#books .book-row>.book-delete:not(:disabled):focus-visible{color:var(--danger)}
#book-delete-dialog{width:min(560px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);margin:auto;padding:24px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);overflow:auto;overflow-wrap:anywhere}
#book-delete-dialog::backdrop{background:#0006}
#book-delete-dialog h2{font-size:22px}
#book-delete-dialog p{font-size:14px}
#book-delete-dialog form{margin-bottom:0}
#book-delete-dialog input{min-width:0;max-width:100%}
.book-delete-exact{white-space:pre-wrap;font-weight:700}
.book-delete-error{color:var(--danger)}
.book-delete-error:empty{display:none}
.book-delete-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.book-delete-actions button{min-height:44px;max-width:100%;overflow-wrap:anywhere}
.book-delete-destructive{background:var(--danger);color:#fff;border-color:var(--danger)}
.book-delete-destructive:hover{background:#85252a}
@media(max-width:400px),(max-height:450px){#book-delete-dialog{padding:16px}#book-delete-dialog h2{font-size:19px}}
.workflow-timer{font-variant-numeric:tabular-nums;color:var(--muted);margin:0 0 8px}.layout-feedback-history{white-space:pre-wrap;overflow-wrap:anywhere}#layout-feedback{width:100%;max-width:100%;min-width:0;min-height:150px;resize:vertical;font:inherit;padding:12px;margin-top:8px;color:var(--ink);background:var(--surface);border:1px solid #87988e;border-radius:4px}#layout-feedback:focus-visible{outline:3px solid #b08a43;outline-offset:2px}#layout-review{min-width:0;max-width:100%}#layout-review button{margin:4px 8px 4px 0}#layout-review summary{cursor:pointer;min-height:44px;padding:8px 0}#layout-blocker{white-space:pre-wrap}#layout-review [hidden]{display:none!important}
.status-spinner{display:inline-block;width:1em;height:1em;flex:0 0 1em;margin-right:.55em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-.12em;animation:status-spin .8s linear infinite}#book-status[data-busy=true],.book-meta[data-busy=true]{overflow-wrap:anywhere}@keyframes status-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.status-spinner{animation:none;border-style:dotted;border-right-color:currentColor}}
.workflow-step{min-width:0;border-top:1px solid var(--line);padding:8px 0 22px;overflow-wrap:anywhere}.workflow-step h3{font-size:20px;margin:20px 0 12px}.workflow-step p{max-width:68ch}.workflow-step a{display:inline-block;margin:12px 18px 4px 0;min-height:44px;padding:10px 0}.workflow-step .confirmation{display:flex;align-items:flex-start;gap:10px;font-weight:400;max-width:65ch}.confirmation input[type=checkbox]{flex:0 0 20px;width:20px;min-height:20px;margin-top:3px}.workflow-step input[type=file]{max-width:100%;min-width:0}.workflow-step form{margin:16px 0}.workflow-step button{max-width:100%;overflow-wrap:anywhere}#project-archive{border-top:1px solid var(--line);padding-top:20px}#project-archive>summary{cursor:pointer;min-height:44px}#notice:empty{display:none}
.production-panel{min-width:0;margin-top:28px;padding-top:8px;border-top:1px solid var(--line);overflow-wrap:anywhere}.production-panel pre{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%;font-size:13px;background:var(--paper);padding:12px}.production-panel textarea,.production-panel select{display:block;width:100%;max-width:100%;padding:10px;margin-top:5px;font:inherit;border:1px solid #87988e;border-radius:4px;background:var(--surface);color:var(--ink)}.production-panel textarea{min-height:120px;resize:vertical}.production-panel button{margin:4px 8px 4px 0;max-width:100%;overflow-wrap:anywhere}.production-panel details{margin:12px 0}.production-panel summary{cursor:pointer;min-height:44px;padding:8px 0}.production-panel textarea:focus-visible,.production-panel select:focus-visible,.production-panel summary:focus-visible{outline:3px solid #b08a43;outline-offset:2px}.production-stage,.rule-revision{min-width:0;padding:14px 0;border-bottom:1px solid var(--line)}.production-warning{color:var(--warn);border-left:3px solid var(--warn);padding-left:12px}
:root{--paper:#f5f3ee;--surface:#fff;--ink:#202b29;--muted:#5d6862;--line:#d4d9d0;--accent:#1b5746;--warn:#72510e;--danger:#9c302b}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:Arial,Helvetica,sans-serif;font-size:16px;line-height:1.5}header{display:flex;align-items:center;gap:24px;padding:22px 4vw;background:var(--surface);border-bottom:1px solid var(--line)}.brand{font:700 28px Georgia,'Times New Roman',serif}.brand span{display:block;font:14px Arial,sans-serif;color:var(--muted)}.environment{margin-left:auto;color:var(--warn);font-size:14px}.scope{max-width:1440px;margin:22px auto 12px;padding:0 4vw;color:var(--muted)}main{max-width:1440px;margin:0 auto;padding:12px 4vw 40px}h1,h2{font-family:Georgia,'Times New Roman',serif;line-height:1.25}h1{font-size:28px;margin:0 0 12px}h2{font-size:28px;margin-top:0}h3{font-size:17px;margin:28px 0 10px}button,input{font:inherit}button{min-height:44px;padding:9px 16px;border:1px solid var(--line);border-radius:4px;background:#fff;cursor:pointer;text-align:left}button:hover{background:#edf1eb}button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid #b08a43;outline-offset:2px}button:disabled{cursor:not-allowed;opacity:.5}.primary{background:var(--accent);border-color:var(--accent);color:#fff}.primary:hover{background:#164b3d}label{display:block;font-size:14px;font-weight:700;margin-bottom:16px}input{display:block;width:100%;padding:10px;border:1px solid #87988e;border-radius:4px;margin-top:5px;min-height:44px;background:#fff}form{margin:20px 0}.login{max-width:480px;margin:40px auto;padding:28px;background:#fff;border:1px solid var(--line)}aside,article,nav button{min-width:0;overflow-wrap:anywhere}.layout{display:grid;grid-template-columns:minmax(250px,330px) minmax(0,1fr);gap:40px}aside{border-right:1px solid var(--line);padding-right:28px}article{background:var(--surface);border:1px solid var(--line);padding:28px;min-height:430px}nav{display:grid;gap:8px;margin-top:30px}nav button.selected{border-color:var(--accent);background:#e9f0eb}.book-meta{display:block;font-size:13px;color:var(--muted);margin-top:5px}.muted{font-size:14px;color:var(--muted)}.status{display:inline-block;padding:6px 10px;border:1px solid #d7bc79;color:var(--warn);font-size:14px;background:#fff8e6}.status.waiting{font-weight:700}.actions{display:flex;gap:10px;flex-wrap:wrap}.facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin:20px 0}.facts div{border-bottom:1px solid var(--line);padding-bottom:10px}.facts dt{font-size:13px;color:var(--muted)}.facts dd{margin:4px 0 0;overflow-wrap:anywhere}.history{padding:0;list-style:none}.history li{display:grid;grid-template-columns:140px minmax(0,1fr);gap:20px;border-top:1px solid var(--line);padding:12px 0}.history time{font-size:13px;color:var(--muted)}.history small{display:block;color:var(--muted);overflow-wrap:anywhere}#notice{max-width:1320px;margin:0 auto;color:var(--danger);padding:0 4vw;min-height:24px;overflow-wrap:anywhere}a{color:var(--accent)}footer{padding:20px 4vw;border-top:1px solid var(--line);color:var(--muted);font-size:13px}[hidden]{display:none!important}header>*{min-width:0;max-width:100%;overflow-wrap:anywhere}.artifact{min-width:0;overflow-wrap:anywhere;border-top:1px solid var(--line);padding:12px 0}.artifact p{margin:6px 0}#editorial-review{margin-top:28px;border-top:2px solid var(--line);overflow-wrap:anywhere}#editorial-review select,#editorial-review textarea{display:block;font:inherit;width:100%;max-width:100%;padding:10px;border:1px solid #87988e;border-radius:4px;background:var(--surface)}#editorial-review textarea{min-height:100px;margin:10px 0;resize:vertical}#editorial-review textarea:focus-visible,#editorial-review select:focus-visible{outline:3px solid #b08a43;outline-offset:2px}.editorial-change,.editorial-question{border-top:1px solid var(--line);padding:12px 0}.editorial-change button{margin-right:8px}#editorial-audit{white-space:pre-wrap;overflow-wrap:anywhere;max-height:320px;overflow:auto;font-size:13px}@media(max-width:760px){header{flex-wrap:wrap;gap:12px}.environment{margin-left:0}.layout{grid-template-columns:minmax(0,1fr);gap:24px}aside{border-right:0;padding-right:0}article{padding:20px}.facts{grid-template-columns:1fr}.history li{grid-template-columns:1fr;gap:4px}.login{margin:12px auto;padding:22px}}

/* Prospekt conversation shell. Legacy production sections keep their rules. */
:root{--paper:#f7f7f7;--surface:#fff;--ink:#242424;--muted:#656565;--line:#e7e7e7;--accent:#262626;--warn:#805515;--danger:#a92f35;color-scheme:light}
body{height:100vh;height:100dvh;min-height:0;display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;background:#fff;font-family:Arial,Helvetica,sans-serif;line-height:1.55}
body>header{height:64px;padding:8px 24px;gap:14px;border-bottom:1px solid #ededed;background:#fff}
.brand{font:700 24px Georgia,'Times New Roman',serif;letter-spacing:-.6px;white-space:nowrap}
.brand span{display:inline;margin-left:14px;font:12px Arial,Helvetica,sans-serif;letter-spacing:.01em;color:var(--muted)}
.environment{font-size:12px;color:var(--muted);margin-left:auto}
#logout{border:0;border-radius:12px;font-size:13px;padding:8px 12px;background:transparent}
#books-toggle{display:grid;place-items:center;flex:0 0 44px;width:44px;padding:0;border:0;border-radius:12px;background:transparent;font-size:21px;color:var(--ink)}
.scope{max-width:none;margin:0;padding:7px 24px;color:var(--muted);font-size:11px;border-bottom:1px solid #f0f0f0;line-height:1.5}
main{width:100%;max-width:none;margin:0;padding:0;min-height:0;overflow:auto}
#workspace,.layout{height:100%;min-height:0}
.layout{grid-template-columns:260px minmax(0,1fr);gap:0;position:relative}
#book-sidebar{padding:25px 14px 20px;background:#f7f7f7;border-right:1px solid #eee;overflow-y:auto;overscroll-behavior:contain;min-height:0}
#book-sidebar h1{font:600 14px Arial,Helvetica,sans-serif;padding:0 10px;margin:0 0 6px;color:#444}
#identity{font-size:11px;margin:0 10px 24px;overflow-wrap:anywhere}
#create-form{margin:0 0 24px;padding:0 6px}
#create-form label{font-size:11px;font-weight:400;color:var(--muted);margin-bottom:8px}
#create-form input{font-size:13px;border:1px solid #ddd;border-radius:12px;padding:10px 12px;background:#fff;margin-top:8px}
#create-form button{width:100%;border-radius:12px;text-align:center;font-size:13px;background:#fff;color:#333;border:1px solid #ddd;font-weight:600}
#books{display:flex;flex-direction:column;gap:3px;margin:0}
#books button{display:block;width:100%;border:0;border-radius:12px;padding:12px;font-size:13px;line-height:1.4;background:transparent;color:var(--ink)}
#books button:hover{background:#ececec}
#books button.selected{background:#e9e9e9;color:#171717}
.book-meta{font-size:10px;color:#707070;line-height:1.45;margin-top:5px}
#workspace[data-sidebar-open="false"] .layout{grid-template-columns:minmax(0,1fr)}
#workspace[data-sidebar-open="false"] #book-sidebar{display:none}
#detail{min-width:0;min-height:0;margin:0;padding:32px 40px;border:0;border-radius:0;overflow:auto;background:#fff}
h1,h2{font-family:Arial,Helvetica,sans-serif;letter-spacing:-.025em}
h2{font-size:23px;font-weight:600}
button,input,textarea,select{font-family:inherit}
button{border-radius:12px;transition:background-color .15s ease;min-height:44px}
button:hover{background:#eee}
.primary{background:#262626;border-color:#262626;color:#fff}
.primary:hover{background:#444}
input{border-color:#d6d6d6;border-radius:12px}
button:focus-visible,input:focus-visible,textarea:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #676767;outline-offset:3px}
[hidden],#workspace[hidden],#login[hidden]{display:none!important}
#notice:not(:empty){max-width:none;margin:0;padding:10px 24px;font-size:13px;background:#fff5f5;color:var(--danger);max-height:20vh;overflow:auto;min-height:0}
.login{max-width:410px;margin:clamp(25px,7vh,80px) auto;padding:28px 20px;border:0;border-radius:0;background:#fff}
.login h1{font:600 28px Arial,Helvetica,sans-serif;letter-spacing:-.8px;margin-bottom:16px}
.login>p{font-size:14px;color:var(--muted)}
.login form{margin:28px 0}
.login label{font-size:13px;font-weight:500;margin-bottom:18px}
.login input{border-radius:14px;padding:12px 14px;min-height:48px}
.login button{width:100%;min-height:48px;border-radius:24px;text-align:center;font-weight:600}
.login .muted{font-size:12px;line-height:1.65}
body>footer{padding:5px 24px;border-top:1px solid #f0f0f0;font-size:10px;color:#777;text-align:center;background:#fff}
@media(max-width:760px){
 body>header{height:56px;padding:6px 12px;gap:8px;flex-wrap:nowrap}
 .brand{font-size:22px}.brand span{display:none}.environment{display:none}#logout{margin-left:auto}
 .scope{font-size:10px;padding:6px 14px}
 .layout{grid-template-columns:minmax(0,1fr)}
 #book-sidebar{position:absolute;inset:0 auto 0 0;width:min(300px,90%);z-index:10;box-shadow:16px 0 40px #00000012;border-right:1px solid #ddd}
 #detail{padding:24px 18px}
 body>footer{font-size:9px;padding:4px 10px}
 .login{margin:24px auto}
}
body>header{grid-row:1}body>.scope{grid-row:2}body>#notice{grid-row:3}body>main{grid-row:4}body>footer{grid-row:5}
@media(prefers-reduced-motion:reduce){button{transition:none}}


/* Availability is independent of workflow text and busy/send state. */
.availability-dot{display:inline-block;width:8px;height:8px;min-width:8px;flex:0 0 8px;border-radius:50%;background:#88919c;margin-inline-end:7px;vertical-align:middle;}
.availability-dot[data-status="free"]{background:#20864b;}
.availability-dot[data-status="busy"]{background:#c63838;}
.book-title{overflow-wrap:anywhere;}
