:root{color-scheme:light;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}*{box-sizing:border-box}body{margin:0;background:#f5f6f8;color:#1a1d21}.app-shell{min-height:100vh;display:flex;flex-direction:column}.app-header{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1.5rem;background:#fff;border-bottom:1px solid #e2e4e8}.app-header h1{font-size:1rem;font-weight:600;margin:0}.app-header .user-info{display:flex;align-items:center;gap:.75rem;font-size:.875rem;color:#4b5563}.app-main{flex:1;width:100%;max-width:960px;margin:0 auto;padding:2rem 1.5rem}.card{background:#fff;border:1px solid #e2e4e8;border-radius:8px;padding:1.5rem}.centered-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1.5rem}.login-card{width:100%;max-width:360px}.login-card h1{font-size:1.125rem;margin:0 0 1.25rem}label{display:block;font-size:.8125rem;font-weight:600;color:#374151;margin-bottom:.25rem}input[type=email],input[type=password]{width:100%;padding:.5rem .625rem;border:1px solid #d1d5db;border-radius:6px;font-size:.9375rem;margin-bottom:1rem}input[type=email]:focus,input[type=password]:focus{outline:2px solid #2563eb;outline-offset:1px}button{cursor:pointer;font-size:.9375rem;font-weight:600;padding:.5rem 1rem;border-radius:6px;border:1px solid transparent}button[type=submit],.btn-primary{width:100%;background:#2563eb;color:#fff}button[type=submit]:disabled{background:#93b4f0;cursor:not-allowed}.btn-secondary{background:#fff;border-color:#d1d5db;color:#1a1d21}.error-text{color:#b91c1c;font-size:.8125rem;margin:-.5rem 0 1rem}.link-button{display:block;width:100%;margin-top:.75rem;padding:.25rem;background:transparent;border:none;color:#2563eb;font-size:.8125rem;font-weight:600}.link-button:hover{text-decoration:underline}.reset-confirm-text{font-size:.875rem;color:#374151;margin:0 0 1.25rem;line-height:1.5}.badge{display:inline-block;padding:.125rem .5rem;border-radius:999px;font-size:.75rem;font-weight:600}.badge-ok{background:#dcfce7;color:#166534}.badge-warn{background:#fef3c7;color:#92400e}.badge-error{background:#fee2e2;color:#991b1b}.badge-neutral{background:#e5e7eb;color:#374151}.badge-info{background:#dbeafe;color:#1e40af}.tab-nav{display:flex;gap:.5rem;padding:.75rem 1.5rem 0;background:#fff;border-bottom:1px solid #e2e4e8}.tab-button{background:transparent;border:none;border-radius:0;border-bottom:2px solid transparent;padding:.5rem .25rem;font-size:.875rem;font-weight:600;color:#6b7280}.tab-button:hover{color:#1a1d21}.tab-button-active{color:#2563eb;border-bottom-color:#2563eb}.topics-screen{display:flex;flex-direction:column;gap:1.5rem}.section-title{font-size:1rem;font-weight:600;margin:0 0 1rem}.topic-form label{margin-top:.5rem}.topic-form textarea{width:100%;padding:.5rem .625rem;border:1px solid #d1d5db;border-radius:6px;font-size:.9375rem;font-family:inherit;margin-bottom:1rem;resize:vertical}.topic-form textarea:focus{outline:2px solid #2563eb;outline-offset:1px}.topic-form input[type=text]{width:100%;padding:.5rem .625rem;border:1px solid #d1d5db;border-radius:6px;font-size:.9375rem;margin-bottom:1rem}.topic-form input[type=text]:focus{outline:2px solid #2563eb;outline-offset:1px}.topic-form .btn-primary,.topics-list-card .btn-primary{width:auto}.topic-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.75rem}.topic-row{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:.875rem 1rem;border:1px solid #e2e4e8;border-radius:6px}.topic-row-main{display:flex;flex-direction:column;gap:.25rem;min-width:0}.topic-row-headline{display:flex;align-items:center;gap:.625rem;font-weight:600;font-size:.9375rem}.topic-row-keyword{margin:0;font-size:.8125rem;color:#374151}.topic-row-synopsis{margin:0;font-size:.8125rem;color:#4b5563}.topic-row-meta{margin:0;font-size:.75rem;color:#9ca3af}.topic-row-actions{display:flex;gap:.5rem;flex-shrink:0}.topic-row-actions button{width:auto}.modal-overlay{position:fixed;inset:0;background:#11141880;display:flex;align-items:center;justify-content:center;padding:1.5rem;z-index:50}.modal-panel{width:100%;max-width:480px;max-height:calc(100vh - 3rem);overflow-y:auto}.generation-topic-headline{margin:-.5rem 0 1rem;font-size:.9375rem;font-weight:600;color:#374151}.cost-warning{background:#fef3c7;color:#92400e;border:1px solid #fde68a;border-radius:6px;padding:.75rem .875rem;font-size:.8125rem;margin-bottom:1.25rem}.modal-actions{display:flex;justify-content:flex-end;gap:.5rem;margin-top:1.25rem}.modal-actions button{width:auto}.stage-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.625rem}.stage-row{display:flex;align-items:center;gap:.625rem}.stage-dot{flex-shrink:0;width:.625rem;height:.625rem;border-radius:999px;background:#d1d5db}.stage-dot-pending{background:#d1d5db}.stage-dot-running{background:#2563eb;animation:stage-pulse 1s ease-in-out infinite}.stage-dot-done{background:#16a34a}.stage-dot-error{background:#dc2626}@keyframes stage-pulse{0%,to{opacity:1}50%{opacity:.35}}.stage-name{flex-shrink:0;width:4.5rem;font-size:.875rem;font-weight:600}.stage-detail{font-size:.8125rem;color:#6b7280;overflow-wrap:anywhere}.stage-detail-error{color:#b91c1c}.stage-detail-done{color:#166534}.generation-article-id{margin:1rem 0 0;font-size:.75rem;color:#9ca3af;word-break:break-all}.generation-note{margin:1rem 0 0;font-size:.8125rem;color:#92400e}.generation-success{margin:1rem 0 0;font-size:.875rem;color:#166534;font-weight:600}.generation-running-note{margin:.75rem 0 0;font-size:.8125rem;color:#6b7280}.articles-screen{display:flex;flex-direction:column;gap:1.5rem}.articles-list-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem}.articles-list-controls{display:flex;align-items:center;gap:.5rem}.articles-list-controls select{padding:.375rem .5rem;border:1px solid #d1d5db;border-radius:6px;font-size:.875rem}.articles-list-controls .btn-secondary{width:auto}.article-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.75rem}.article-row{padding:.875rem 1rem;border:1px solid #e2e4e8;border-radius:6px;cursor:pointer}.article-row:hover{border-color:#2563eb;background:#f8faff}.article-row-main{display:flex;flex-direction:column;gap:.25rem;min-width:0}.article-row-headline{display:flex;align-items:center;gap:.625rem;font-weight:600;font-size:.9375rem}.article-row-meta{margin:0;font-size:.75rem;color:#9ca3af}.review-screen{display:flex;flex-direction:column;gap:1.25rem}.back-button{width:auto;align-self:flex-start}.review-header-top{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}.review-badges{display:flex;gap:.5rem;flex-shrink:0}.review-meta-line{margin:.375rem 0 0;font-size:.8125rem;color:#4b5563}.review-synopsis{margin:.5rem 0 0;font-size:.875rem;color:#374151}.review-dl{margin:0 0 .75rem}.review-dl dt{font-size:.75rem;font-weight:600;color:#6b7280;margin-top:.75rem}.review-dl dt:first-child{margin-top:0}.review-dl dd{margin:.125rem 0 0;font-size:.875rem;color:#1a1d21}.muted{color:#9ca3af}.char-count{color:#9ca3af;font-size:.75rem}.chip-row{display:flex;flex-wrap:wrap;gap:.375rem}.chip{display:inline-block;padding:.1875rem .625rem;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:.75rem;font-weight:600}.article-body-markdown{max-width:68ch;font-size:.9375rem;line-height:1.6;color:#1a1d21}.article-body-markdown :is(h1,h2,h3,h4){margin:1.25rem 0 .5rem}.article-body-markdown p{margin:0 0 .875rem}.article-body-markdown ul,.article-body-markdown ol{margin:0 0 .875rem;padding-left:1.5rem}.faq-list{display:flex;flex-direction:column;gap:1rem}.faq-question{margin:0 0 .25rem;font-size:.9375rem;font-weight:600}.faq-answer{margin:0;font-size:.875rem;color:#374151}.image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:1rem}.image-grid-item img{width:100%;height:140px;object-fit:cover;border-radius:6px;border:1px solid #e2e4e8;display:block}.image-placeholder{width:100%;height:140px;display:flex;align-items:center;justify-content:center;border:1px dashed #d1d5db;border-radius:6px;color:#9ca3af;font-size:.8125rem}.image-caption{margin:.375rem 0 0;font-size:.75rem;color:#6b7280}.image-prompt{color:#9ca3af}.schema-pre{max-height:320px;overflow:auto;background:#f5f6f8;border:1px solid #e2e4e8;border-radius:6px;padding:.75rem;font-size:.75rem;margin-top:.5rem}.review-gates{display:flex;flex-direction:column;gap:1rem}.gate-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 0;border-top:1px solid #e2e4e8}.review-gates .gate-row:first-of-type{border-top:none;padding-top:0}.gate-row-info{min-width:0}.gate-row-title{margin:0;font-size:.875rem;font-weight:600}.gate-row-detail{margin:.125rem 0 0;font-size:.8125rem;color:#6b7280}.gate-row button{width:auto;flex-shrink:0}.gate-row-action{display:flex;align-items:center;gap:.5rem;flex-shrink:0}.reviewer-input{padding:.375rem .5rem;border:1px solid #d1d5db;border-radius:6px;font-size:.8125rem;width:200px}
