:root {
  --ink: #14233b; --muted: #64748b; --line: #e2e8f0; --bg: #eef2f7;
  --card: #fff; --accent: #0f766e; --accent-d: #115e59; --paper: #f8fafc;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5; padding-bottom: 40px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 15px 24px;
  background: linear-gradient(135deg, #0f766e, #155e75); color: #fff; }
.brand { font-size: 20px; } .brand .tag { font-size: 12px; opacity: .85; font-weight: 400; margin-left: 6px; }
.repo { color: #ccfbf1; text-decoration: none; font-weight: 600; font-size: 14px; } .repo:hover { color: #fff; }

.wrap { max-width: 1000px; margin: 22px auto 0; padding: 0 20px; display: grid;
  grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 3px rgba(20,35,59,.06); }

.chat { display: flex; flex-direction: column; height: 560px; }
.thread { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 8px; max-width: 88%; }
.msg.user { align-self: flex-end; }
.msg .body { padding: 10px 14px; border-radius: 14px; font-size: 14px; }
.msg.bot .body { background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.user .body { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #ccfbf1; display: grid; place-items: center; flex: none; font-size: 15px; }

.quote { min-width: 240px; }
.q-head { font-weight: 700; margin-bottom: 8px; } .q-head .unit { color: var(--muted); font-weight: 400; font-size: 12px; }
.qline { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; padding: 3px 0; border-bottom: 1px dashed #eef2f7; }
.qline.sub { color: var(--muted); font-size: 12px; border: none; padding: 0 0 0 6px; }
.qline.total { border: none; border-top: 2px solid var(--line); margin-top: 4px; padding-top: 6px; font-size: 15px; }
.notes { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 12px; }
.turnaround { margin-top: 8px; font-size: 11px; color: var(--muted); }

.bform { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bform label { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); gap: 3px; }
.bform select { border: 1px solid var(--line); border-radius: 8px; padding: 6px; font-size: 13px; }
.bform .send { grid-column: 1 / -1; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--accent-d); border-radius: 999px;
  padding: 6px 12px; font-size: 12.5px; cursor: pointer; }
.chip:hover { background: #f0fdfa; }
.composer { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
#input { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; font-size: 14px; }
#input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.send { border: none; background: var(--accent); color: #fff; border-radius: 10px; padding: 10px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer; } .send:hover { background: var(--accent-d); }

.about { padding: 20px; } .about h2 { font-size: 16px; margin-bottom: 10px; }
.about p { font-size: 13.5px; color: #475569; margin-bottom: 12px; }
.about .rule { background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 10px; padding: 12px; color: #134e4a; }
.about .small { font-size: 12px; color: var(--muted); }
.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 26px; }

@media (max-width: 800px) { .wrap { grid-template-columns: 1fr; } .chat { height: 480px; } }
