:root{--bg: #0b1020;--bg-elev: #111733;--bg-card: #151c3a;--border: #243056;--text: #e6e8ef;--text-dim: #99a0b8;--accent: #22d3ee;--accent-soft: rgba(34, 211, 238, .12);--ok: #10b981;--warn: #f59e0b;--err: #ef4444;--shadow: 0 10px 30px rgba(0, 0, 0, .35);--radius: 12px;--mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;color-scheme:dark}*{box-sizing:border-box}html,body,#root{height:100%;margin:0;background:radial-gradient(ellipse at top,#14204a 0%,var(--bg) 60%);color:var(--text);font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:15px;line-height:1.55;-webkit-font-smoothing:antialiased}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}button{font-family:inherit;font-size:inherit;cursor:pointer;border-radius:8px;border:1px solid var(--border);background:var(--bg-elev);color:var(--text);padding:.5rem .9rem;transition:background .15s,border-color .15s,transform .05s}button:hover:not(:disabled){background:var(--bg-card);border-color:var(--accent)}button:active:not(:disabled){transform:translateY(1px)}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}button.primary{background:var(--accent);color:#06141d;border-color:var(--accent);font-weight:600}button.primary:hover:not(:disabled){background:#4eddf0}select{font-family:inherit;background:var(--bg-elev);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:.45rem .7rem}select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.app-shell{min-height:100vh;display:grid;grid-template-rows:auto 1fr auto}header.topbar{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;border-bottom:1px solid var(--border);background:#0b1020b3;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);position:sticky;top:0;z-index:10}header.topbar .brand{display:flex;align-items:center;gap:.7rem;font-weight:700;letter-spacing:.02em}header.topbar .brand .mark{width:28px;height:28px;border-radius:7px;background:linear-gradient(135deg,var(--accent),#6366f1);display:grid;place-items:center;color:#06141d;font-family:Georgia,serif;font-weight:700;font-size:18px}header.topbar .tagline{color:var(--text-dim);font-size:.85rem}main{display:grid;grid-template-columns:minmax(280px,380px) 1fr;gap:1.25rem;padding:1.5rem;max-width:1500px;width:100%;margin:0 auto}@media (max-width: 880px){main{grid-template-columns:1fr}}.card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:1.1rem 1.15rem;box-shadow:var(--shadow)}.card h2{font-size:.85rem;margin:0 0 .75rem;letter-spacing:.08em;text-transform:uppercase;color:var(--text-dim)}.stack>*+*{margin-top:1rem}.dropzone{border:2px dashed var(--border);border-radius:var(--radius);padding:2rem 1rem;text-align:center;cursor:pointer;transition:border-color .15s,background .15s;outline:none}.dropzone:hover,.dropzone.active{border-color:var(--accent);background:var(--accent-soft)}.dropzone:focus-visible{border-color:var(--accent);background:var(--accent-soft)}.dropzone .big{font-size:1.05rem;font-weight:600}.dropzone .small{color:var(--text-dim);font-size:.85rem;margin-top:.4rem}.dropzone .file-name{font-family:var(--mono);margin-top:.5rem;font-size:.9rem;color:var(--accent);word-break:break-all}.template-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.5rem}.template-grid label{display:block;border:1px solid var(--border);border-radius:8px;padding:.55rem .7rem;cursor:pointer;transition:border-color .15s,background .15s}.template-grid label:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}.template-grid input{margin-right:.4rem}.template-grid .desc{display:block;color:var(--text-dim);font-size:.75rem;margin-top:.15rem}.actions-row{display:flex;flex-wrap:wrap;gap:.5rem}.status-pill{display:inline-flex;align-items:center;gap:.4rem;padding:.25rem .6rem;border-radius:999px;font-size:.75rem;background:var(--bg-elev);border:1px solid var(--border);color:var(--text-dim)}.status-pill.ok{color:var(--ok);border-color:#10b98166}.status-pill.warn{color:var(--warn);border-color:#f59e0b66}.status-pill.err{color:var(--err);border-color:#ef444466}.status-pill .dot{width:7px;height:7px;border-radius:50%;background:currentColor}.summary-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.6rem}.summary-grid .item{background:var(--bg-elev);border:1px solid var(--border);border-radius:8px;padding:.6rem}.summary-grid .item .label{color:var(--text-dim);font-size:.7rem;text-transform:uppercase;letter-spacing:.05em}.summary-grid .item .value{font-size:1.2rem;font-weight:600;margin-top:.2rem}.warnings{max-height:220px;overflow-y:auto}.warning{font-size:.85rem;padding:.4rem .55rem;border-radius:6px;background:var(--bg-elev);border-left:3px solid var(--warn);margin-bottom:.35rem}.warning.citation{border-left-color:var(--accent)}.warning.error{border-left-color:var(--err)}.warning-empty{color:var(--text-dim);font-size:.85rem}.editor-wrapper{display:flex;flex-direction:column;height:100%;min-height:60vh}.editor-wrapper .editor-shell{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;flex:1}.editor-toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem;gap:.5rem;flex-wrap:wrap}.editor-empty{display:grid;place-items:center;height:100%;color:var(--text-dim);text-align:center;padding:2rem}.spinner{display:inline-block;width:14px;height:14px;border:2px solid transparent;border-top-color:currentColor;border-right-color:currentColor;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}footer.footer{padding:1rem 1.5rem;border-top:1px solid var(--border);color:var(--text-dim);font-size:.85rem;display:flex;justify-content:space-between;flex-wrap:wrap;gap:.5rem}.toast{position:fixed;bottom:1.25rem;right:1.25rem;background:var(--bg-card);border:1px solid var(--border);padding:.6rem .9rem;border-radius:8px;box-shadow:var(--shadow);font-size:.85rem;z-index:50;animation:slideIn .18s ease-out}@keyframes slideIn{0%{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}.kbd{font-family:var(--mono);font-size:.75rem;border:1px solid var(--border);border-radius:4px;padding:.05rem .35rem;background:var(--bg-elev);color:var(--text-dim)}
