:root{color:#1e2725;background:#f7f5ef;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}.app-shell{min-height:100vh;color:#1e2725;background:linear-gradient(180deg,#ffffffb8,#fff0),#f7f5ef}.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:16px 28px;background:#f7f5efeb;border-bottom:1px solid #dfdad0;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.brand{border:0;background:transparent;color:#14201d;font-size:20px;font-weight:800}.stepper{display:flex;align-items:center;gap:6px;overflow-x:auto}.topbar-actions{display:flex;align-items:center;gap:10px;min-width:0}.language-toggle{min-height:38px;padding:0 12px;border:1px solid #c9ddd6;border-radius:8px;color:#163532;background:#e6f1ed;font-size:14px;font-weight:900}.step-button{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:0 12px;color:#52605d;background:transparent;border:1px solid transparent;border-radius:8px}.step-button.is-active{color:#163532;background:#e6f1ed;border-color:#c9ddd6}.error-banner{display:flex;align-items:center;gap:10px;width:min(1160px,calc(100% - 32px));margin:16px auto 0;padding:12px 14px;color:#681f1f;background:#f9e1dc;border:1px solid #efb5aa;border-radius:8px}.page-transition-frame{animation:pageEnter .42s cubic-bezier(.18,.9,.2,1) both}.app-shell.is-busy .page-transition-frame{filter:saturate(.92)}.page-busy-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:90;display:grid;place-items:center;padding:24px;background:#f7f5efc7;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);animation:busyOverlayIn .18s ease both}.page-busy-panel{width:min(430px,100%);display:grid;justify-items:center;gap:14px;padding:30px 24px 26px;border:1px solid #d8d0c5;border-radius:8px;background:#fffdfaf0;box-shadow:0 34px 90px #2c251c33;text-align:center}.page-busy-visual{width:min(310px,76vw);height:96px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;transform:rotate(-1deg)}.page-busy-visual span{position:relative;overflow:hidden;border:3px solid #16201e;border-radius:6px;background:#fffdfa;box-shadow:6px 7px #16201e1f;animation:busyPanelPop 1.35s ease-in-out infinite}.page-busy-visual span:nth-child(1){background:linear-gradient(135deg,#f8c45b 0,#f8c45b 42%,#fffdfa 42%,#fffdfa)}.page-busy-visual span:nth-child(2){animation-delay:.12s;background:linear-gradient(135deg,#fffdfa 0,#fffdfa 34%,#7fb7ab 34%,#7fb7ab)}.page-busy-visual span:nth-child(3){animation-delay:.24s;background:linear-gradient(135deg,#e87955 0,#e87955 46%,#fffdfa 46%,#fffdfa)}.page-busy-visual span:before{content:"";position:absolute;top:12px;right:12px;bottom:12px;left:12px;border:2px solid rgba(22,32,30,.55);border-radius:4px}.page-busy-visual span:after{content:"";position:absolute;top:-24px;right:-24px;bottom:-24px;left:-24px;background:linear-gradient(90deg,transparent,rgba(255,255,255,.72),transparent);transform:translate(-120%);animation:busyPanelSweep 1.35s ease-in-out infinite}.page-busy-kicker{color:#986235;font-size:12px;font-weight:900;letter-spacing:0;text-transform:uppercase}.page-busy-panel p{max-width:340px;margin:0;color:#16201e;font-size:19px;font-weight:850;line-height:1.42}.page-busy-bar{width:min(310px,100%);height:9px;overflow:hidden;border-radius:999px;background:#ded8ce}.page-busy-bar span{display:block;width:42%;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2f6f68,#e87955,#f8c45b);animation:busyBar 1.05s ease-in-out infinite}.page-grid,.page-stack,.story-page{width:min(1160px,calc(100% - 32px));margin:0 auto;padding:34px 0 56px}.context-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:28px;align-items:start}.workspace-panel,.reference-card{border:1px solid #ded8ce;border-radius:8px;background:#ffffffb8;box-shadow:0 18px 46px #2a231914}.workspace-panel{padding:28px}.reference-panel{position:sticky;top:92px}.reference-card{padding:22px}.reference-card h2{margin:0 0 10px;font-size:18px}.reference-card p{margin:0;color:#58625f;line-height:1.6}.reference-stack{display:grid;gap:8px;margin-top:18px}.reference-stack span{display:inline-flex;min-height:32px;align-items:center;padding:0 10px;border-radius:8px;background:#eef0eb;color:#384440;font-size:14px}.section-heading{margin-bottom:24px}.section-heading.compact{display:flex;align-items:end;justify-content:space-between;gap:18px}.section-heading h1{margin:4px 0 0;max-width:760px;color:#16201e;font-size:clamp(30px,5vw,58px);line-height:1.04;letter-spacing:0}.section-heading.compact h1{font-size:clamp(28px,4vw,44px)}.eyebrow{display:inline-flex;color:#986235;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:0}.context-form{display:grid;gap:18px}.form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.dropzone,.text-field{display:grid;gap:8px}.dropzone{position:relative;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;min-height:72px;padding:0 14px;border:1px dashed #b8c7c1;border-radius:8px;background:#fbfaf7;color:#34413e}.dropzone input{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;cursor:pointer}.dropzone span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-field span{color:#52605d;font-size:13px;font-weight:700}.text-field input,.text-field textarea{width:100%;border:1px solid #d9d3ca;border-radius:8px;background:#fffdfa;color:#1d2725;outline:none}.text-field input{min-height:48px;padding:0 13px}.text-field textarea{resize:vertical;padding:12px 13px;line-height:1.5}.text-field input:focus,.text-field textarea:focus{border-color:#4b8b81;box-shadow:0 0 0 3px #4b8b8124}.primary-button,.secondary-button,.icon-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;border-radius:8px;border:1px solid transparent;font-weight:800}.primary-button{padding:0 16px;color:#fffaf2;background:#244d47;border-color:#244d47}.primary-button:hover:not(:disabled){background:#183b36}.secondary-button{padding:0 14px;color:#22302d;background:#fffdf9;border-color:#d9d3ca}.secondary-button:hover:not(:disabled){border-color:#9fbab1}.icon-button{width:34px;height:34px;padding:0;color:#43504d;background:#fffdf9;border-color:#dcd6cc}.icon-button.danger{color:#8d3326}.wide{width:100%}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}.muted{color:#64706c}.material-list{display:grid;gap:12px}.material-card{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:12px;align-items:start;padding:14px 16px;border:1px solid #ded8ce;border-radius:8px;background:#fffdfa}.material-card.is-selected{border-color:#77a99f;background:#f3faf7}.select-button{width:34px;height:34px;display:grid;place-items:center;border:1px solid #a8bbb4;border-radius:8px;color:#244d47;background:#fff}.select-button span{width:12px;height:12px;border-radius:3px;background:#d8dedb}.card-kicker{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:8px;color:#6b5a49;font-size:12px;font-weight:800;text-transform:uppercase}.material-card h3,.comic-card h3,.admin-row h3{margin:0;color:#1f2b2b;font-size:18px}.material-card p,.admin-row p,.comic-card p{margin:8px 0 0;line-height:1.55}.card-body{min-width:0}.material-claim{display:grid;grid-template-columns:18px minmax(0,1fr);gap:7px;align-items:start;color:#263330;font-weight:760}.material-claim svg{margin-top:4px;color:#2f6f68}.material-description{color:#37423f}.key-info-strip{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:10px}.key-info-strip span{display:inline-flex;align-items:center;min-height:24px;padding:0 8px;border-radius:8px;background:#eef0eb;color:#43504d;font-size:12px;font-weight:800}.key-info-strip .key-info-label{background:transparent;color:#6b5a49;padding:0;text-transform:uppercase}.evidence-stack{display:grid;gap:10px;margin-top:14px}.evidence-row{min-width:0;padding-left:12px;border-left:3px solid #9eb9b0}.evidence-meta,.analysis-label,.data-points{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.evidence-meta,.analysis-label{color:#6b5a49;font-size:12px;font-weight:900;text-transform:uppercase}.evidence-meta span{min-width:0;overflow-wrap:anywhere}.evidence-row blockquote{margin:6px 0 0;color:#273431;line-height:1.55;overflow-wrap:anywhere}.evidence-row blockquote:before{content:"“";color:#7d938b}.evidence-row blockquote:after{content:"”";color:#7d938b}.data-points{margin-top:7px;color:#43504d}.data-points span{display:inline-flex;align-items:center;min-height:24px;padding:0 8px;border-radius:8px;background:#eef0eb;color:#34413e;font-size:12px;font-weight:800}.evidence-relevance{color:#52605d;font-size:14px}.material-analysis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px;padding-top:13px;border-top:1px solid #d9e2dd}.analysis-item{min-width:0}.analysis-item p{color:#37423f;font-size:14px}.analysis-item.caveat p{color:#6b4c2f}.material-hooks{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}.material-hooks span{display:inline-flex;align-items:center;min-height:28px;padding:0 9px;border-radius:8px;background:#f4efe8;color:#52605d;font-size:13px;font-weight:800}.rank-controls{display:flex;align-items:center;gap:7px}.rank-pill{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:32px;border-radius:8px;color:#244d47;background:#deeee9;font-weight:800}.story-page{display:grid;justify-items:center}.story-page .section-heading{justify-self:stretch}.swipe-stage{position:relative;width:min(460px,100%);min-height:0;padding-top:42px;display:grid;place-items:center}.swipe-guide{position:absolute;top:0;inset-inline:0;display:grid;grid-template-columns:auto auto 1fr auto auto;align-items:center;gap:8px;color:#64706c;font-weight:800;animation:guidePulse 3.8s ease-in-out}.story-card{width:min(420px,100%);padding:22px;border-radius:8px;border:1px solid #d8d0c5;background:#fffdfa;box-shadow:0 30px 80px #2c251c24;transform:rotate(-1deg);transition:transform .26s ease,opacity .26s ease}.story-card.leave-left{opacity:0;transform:translate(-120%) rotate(-15deg)}.story-card.leave-right{opacity:0;transform:translate(120%) rotate(15deg)}.story-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#986235;font-size:12px;font-weight:800;text-transform:uppercase}.story-card h2{margin:18px 0 22px;font-size:31px;line-height:1.05}.story-card dl{display:grid;gap:9px;margin:0}.story-card dt{color:#244d47;font-size:12px;font-weight:900;text-transform:uppercase}.story-card dd{margin:0 0 8px;color:#37423f;font-size:16px;line-height:1.5;overflow-wrap:anywhere}.swipe-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}.comic-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px;align-items:start}.comic-card{padding:14px;border:1px solid #ded8ce;border-radius:8px;background:#fffdfa}.comic-card-header{display:flex;align-items:start;justify-content:space-between;gap:12px;margin-bottom:12px}.comic-card-header p{color:#64706c;font-size:13px}.comic-frame{width:100%;aspect-ratio:9 / 16;overflow:hidden;border:5px solid #1f2b2b;border-radius:8px;background:#f3efe7}.comic-frame img{width:100%;height:100%;display:block;object-fit:cover}.comic-loading{width:100%;height:100%;display:grid;align-content:center;gap:18px;padding:18px}.skeleton-sheet{width:100%;height:82%;border-radius:8px;background:linear-gradient(90deg,transparent,rgba(255,255,255,.65),transparent),repeating-linear-gradient(#e4ded2 0,#e4ded2 18%,#f4f0e8 18%,#f4f0e8 24%);background-size:200% 100%,100% 100%;animation:shimmer 1.5s linear infinite}.progress-track{height:8px;overflow:hidden;border-radius:999px;background:#ded8ce}.progress-track span{display:block;height:100%;background:#2f6f68;transition:width .22s ease}.comic-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}.comic-modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:80;display:grid;place-items:center;padding:22px;background:#121917b8}.comic-modal{width:min(720px,100%);max-height:calc(100vh - 44px);display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;border:1px solid #d8d0c5;border-radius:8px;background:#fffdfa;box-shadow:0 34px 90px #00000059}.comic-modal-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid #e2dcd2}.comic-modal-header h2{margin:0;font-size:18px;line-height:1.2}.icon-button{width:36px;height:36px;display:inline-grid;place-items:center;flex:0 0 auto;padding:0;border:1px solid #ded8ce;border-radius:8px;color:#2c3835;background:#fffdfa}.comic-modal img{width:100%;height:100%;min-height:0;display:block;object-fit:contain;background:#f3efe7}.status-badge{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:0 9px;border-radius:999px;background:#eef0eb;color:#46514e;font-size:12px;font-weight:900;white-space:nowrap}.status-badge.completed{color:#1d5b40;background:#dff0e6}.status-badge.failed{color:#8b2f25;background:#f6ddd8}.admin-table{display:grid;gap:12px}.admin-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:14px;align-items:center;padding:16px;border:1px solid #ded8ce;border-radius:8px;background:#fffdfa}.admin-metrics{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}.admin-metrics span{display:inline-flex;align-items:center;min-height:30px;padding:0 9px;border-radius:8px;background:#eef0eb;color:#46514e;font-size:13px;font-weight:800}.empty-state{width:min(560px,calc(100% - 32px));margin:70px auto;display:grid;justify-items:center;gap:12px;text-align:center}.empty-state.embedded{width:100%;min-height:260px;place-content:center;border:1px dashed #cfc7bb;border-radius:8px;background:#ffffff7a}.empty-state h1,.empty-state h2{margin:0}.empty-state p{margin:0;color:#64706c}.spin{animation:spin 1s linear infinite}@keyframes pageEnter{0%{opacity:0;transform:translateY(16px) scale(.992)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes busyOverlayIn{0%{opacity:0}to{opacity:1}}@keyframes busyPanelPop{0%,to{transform:translateY(0)}45%{transform:translateY(-8px)}}@keyframes busyPanelSweep{0%{transform:translate(-120%)}55%,to{transform:translate(120%)}}@keyframes busyBar{0%{transform:translate(-115%)}to{transform:translate(255%)}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes shimmer{to{background-position:-200% 0,0 0}}@keyframes guidePulse{0%,to{opacity:.62}45%{opacity:1}}@media(max-width:820px){.topbar{align-items:stretch;flex-direction:column;padding:14px 16px}.stepper{padding-bottom:2px}.topbar-actions{align-items:flex-start;flex-direction:column}.step-button span{display:none}.context-grid{grid-template-columns:1fr}.reference-panel{position:static}.form-row,.material-card,.admin-row{grid-template-columns:1fr}.rank-controls,.admin-metrics{justify-content:flex-start}.material-analysis{grid-template-columns:1fr}.section-heading.compact,.toolbar{align-items:flex-start;flex-direction:column}.comic-actions{grid-template-columns:1fr}.page-busy-panel{padding:24px 18px 22px}.page-busy-visual{height:78px;gap:8px}}@media(prefers-reduced-motion:reduce){.page-transition-frame,.page-busy-overlay,.page-busy-visual span,.page-busy-visual span:after,.page-busy-bar span{animation-duration:1ms;animation-iteration-count:1}}
