:root { --bg:#f6f7f9; --card:#fff; --ink:#1d2330; --muted:#6a7280; --line:#e2e5ea; --accent:#1f5fbf; --ok:#2e7d32; --warn:#b26a00; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font:17px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--accent); color:#fff; padding: 12px 0; }
.top a, .top span { color:#fff; text-decoration:none; font-weight:600; }
main { padding: 20px 16px 60px; }
h1 { font-size: 1.7rem; margin: .3em 0 .4em; }
h2 { font-size: 1.25rem; margin: .2em 0 .5em; }
h2.phase { margin-top: 1.6em; }
.lead { font-size: 1.1rem; }
.muted { color: var(--muted); } .small { font-size: .9rem; }
.ok { color: var(--ok); margin-left: .6em; } .warn { color: var(--warn); }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:16px 18px; margin:14px 0; }
.card.next { border-color: var(--accent); }
.cols { display:grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cols .card { margin: 0; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }
.btn, button { display:inline-block; background:var(--accent); color:#fff; border:0; border-radius:8px; padding:10px 16px; font:inherit; cursor:pointer; text-decoration:none; }
.btn.ghost, button.ghost { background:#fff; color:var(--accent); border:1px solid var(--accent); }
button.link { background:none; color:var(--muted); padding:0 4px; text-decoration:underline; font-size:.9rem; }
button:disabled { opacity:.5; }
form.inline { display:inline; }
.row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:8px; }
.row input[type=text], .row input:not([type]) { flex:1; min-width:180px; }
input, textarea { font:inherit; padding:8px 10px; border:1px solid var(--line); border-radius:8px; max-width:100%; }
textarea { width:100%; display:block; margin-bottom:8px; }
.progress { height:10px; background:var(--line); border-radius:6px; overflow:hidden; }
.progress div { height:100%; background:var(--ok); }
ol.steps { padding-left: 1.4em; } ol.steps li { margin:.35em 0; }
.badge { font-size:.8rem; color:var(--muted); border:1px solid var(--line); border-radius:20px; padding:1px 8px; margin-left:.5em; white-space:nowrap; }
.st-done .badge { color:var(--ok); border-color:var(--ok); } .st-work .badge { color:var(--warn); border-color:var(--warn); }
ul.pit li { color: var(--warn); }
.chat { display:flex; flex-direction:column; gap:10px; margin-bottom:12px; }
.msg { padding:10px 14px; border-radius:10px; max-width:88%; }
.msg.assistant { background:#eef3fb; align-self:flex-start; }
.msg.user { background:#e9f5ea; align-self:flex-end; }
.msg p:first-child { margin-top:0 } .msg p:last-child { margin-bottom:0 }
.preview { border-top:1px solid var(--line); margin-top:12px; padding-top:8px; overflow-x:auto; }
.preview table, table.grid { border-collapse:collapse; width:100%; margin:8px 0; }
.preview td, .preview th, table.grid td, table.grid th { border:1px solid var(--line); padding:6px 8px; vertical-align:top; text-align:left; }
details { margin:10px 0; }
form.done { margin: 18px 0; }
.pager { display:flex; justify-content:space-between; gap:12px; margin-top:24px; }
#busy { position:fixed; inset:0; background:rgba(20,25,35,.45); display:flex; align-items:center; justify-content:center; }
#busy[hidden] { display:none; }
.busy-box { background:#fff; padding:20px 24px; border-radius:10px; max-width:340px; text-align:center; }
