
#amaGenApp{--navy:#102a43;--blue:#2563eb;--green:#11875d;--bg:#f5f8fb;--line:#d9e2ec;--muted:#64748b;--red:#a42318;--amber:#8a5a00;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#243b53}
#amaGenApp *{box-sizing:border-box}
#amaGenApp .ama-wrap{max-width:980px;margin:24px auto;padding:24px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 8px 28px rgba(15,42,67,.06)}
#amaGenApp .ama-top,#amaGenApp .section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}
#amaGenApp .eyebrow{font-size:12px;letter-spacing:.08em;text-transform:uppercase;font-weight:800;color:var(--blue)}
#amaGenApp h2{font-size:31px;line-height:1.15;margin:4px 0 8px;color:var(--navy)}
#amaGenApp h3{font-size:21px;margin:2px 0;color:var(--navy)}
#amaGenApp .lead{margin:0;color:var(--muted);line-height:1.6}
#amaGenApp .status-pill{font-size:11px;font-weight:800;border-radius:999px;padding:7px 10px;border:1px solid #b8ddd0;background:#eefaf5;color:#0e6c4b;white-space:nowrap}
#amaGenApp .search-card,#amaGenApp .panel,#amaGenApp .result,#amaGenApp .project{margin-top:20px;border:1px solid var(--line);border-radius:14px;background:#fff}
#amaGenApp .search-card{padding:18px;background:var(--bg)}
#amaGenApp .search-row{display:flex;align-items:flex-end;gap:12px}
#amaGenApp .grow{flex:1;min-width:0}
#amaGenApp label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:750;color:#334e68}
#amaGenApp input,#amaGenApp textarea,#amaGenApp select{width:100%;font:inherit;color:#102a43;background:#fff;border:1px solid #b9c8d4;border-radius:9px;padding:11px 12px;outline:none}
#amaGenApp input:focus,#amaGenApp textarea:focus,#amaGenApp select:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,.12)}
#amaGenApp #amaQuery{font-size:17px;padding:13px 14px}
#amaGenApp small{font-weight:500;color:var(--muted);line-height:1.4}
#amaGenApp .hint{font-size:12px;color:var(--muted);margin-top:7px;min-height:18px}
#amaGenApp .hint.detected{color:#0e6c4b;font-weight:800}
#amaGenApp .btn{min-height:44px;padding:11px 15px;border-radius:9px;border:1px solid transparent;font-size:14px;font-weight:800;cursor:pointer}
#amaGenApp .btn-primary{background:var(--green);color:#fff}
#amaGenApp .btn-primary:hover{filter:brightness(.96)}
#amaGenApp .btn-secondary{background:#fff;color:var(--navy);border-color:#b9c8d4}
#amaGenApp .btn-link{border:0;background:transparent;color:var(--blue);font-weight:800;cursor:pointer;padding:6px 3px}
#amaGenApp .btn:disabled{opacity:.55;cursor:not-allowed}
#amaGenApp .tools,#amaGenApp .chips,#amaGenApp .actions{display:flex;gap:10px;flex-wrap:wrap}
#amaGenApp .tools{margin-top:13px}
#amaGenApp .chips{margin-top:13px}
#amaGenApp .chips span{font-size:11px;font-weight:800;padding:5px 8px;border-radius:999px;border:1px solid #d4dee6;background:#fff}
#amaGenApp .message{margin-top:16px;padding:12px 14px;border-radius:10px;border:1px solid #b9daf7;background:#eef7ff;color:#164e7a;line-height:1.5}
#amaGenApp .message.error{border-color:#f3c1bc;background:#fff1f0;color:#8f2019}
#amaGenApp .message.warn{border-color:#efd28e;background:#fff8e7;color:#775000}
#amaGenApp .candidate-list{margin-top:16px;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff}
#amaGenApp .candidate-title{padding:12px 15px;background:var(--bg);font-weight:800;color:var(--navy)}
#amaGenApp .candidate{display:block;width:100%;border:0;border-top:1px solid #e8eef3;background:#fff;text-align:left;padding:14px 15px;cursor:pointer}
#amaGenApp .candidate:hover{background:#f8fbfe}
#amaGenApp .candidate strong{display:block;color:var(--navy);line-height:1.4}
#amaGenApp .candidate div{font-size:13px;color:var(--muted);margin-top:5px;line-height:1.45}
#amaGenApp .panel,#amaGenApp .result,#amaGenApp .project{padding:20px}
#amaGenApp .field-top{margin-top:16px}
#amaGenApp .grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:17px}
#amaGenApp .span2{grid-column:1/-1}
#amaGenApp .actions{margin-top:17px}
#amaGenApp .quality{display:flex;gap:7px;flex-wrap:wrap;margin:14px 0}
#amaGenApp .badge{font-size:11px;font-weight:800;padding:5px 8px;border-radius:999px}
#amaGenApp .badge.good{background:#e8f8f1;color:#116647}
#amaGenApp .badge.warn{background:#fff3d6;color:#805600}
#amaGenApp .citation-box{display:flex;gap:12px;background:#fff7d4;border:1px solid #eddc9c;border-radius:12px;padding:17px;line-height:1.65}
#amaGenApp .number{font-weight:850;min-width:22px}
#amaGenApp .citation{font-family:Georgia,"Times New Roman",serif;font-size:16px;color:#111827;word-break:break-word}
#amaGenApp .intext{display:flex;gap:10px;align-items:center;margin-top:12px;color:var(--muted)}
#amaGenApp .intext strong{font-size:22px;color:var(--navy)}
#amaGenApp ol{padding-left:25px}
#amaGenApp li{padding:11px 0 11px 4px;border-bottom:1px solid #e8eef3}
#amaGenApp .ref-row{display:flex;justify-content:space-between;gap:12px}
#amaGenApp .ref-text{font-family:Georgia,"Times New Roman",serif;line-height:1.55;flex:1}
#amaGenApp .ref-controls{display:flex;gap:3px}
#amaGenApp .ref-controls button{border:1px solid var(--line);background:#fff;border-radius:7px;padding:4px 7px;cursor:pointer}
#amaGenApp .empty{padding:14px 0;color:var(--muted)}
#amaGenApp .foot{margin-top:18px;padding-top:14px;border-top:1px solid #e8eef3;color:var(--muted);font-size:12px;line-height:1.55}
@media(max-width:720px){
  #amaGenApp .ama-wrap{padding:15px}
  #amaGenApp .ama-top,#amaGenApp .section-head,#amaGenApp .search-row{flex-direction:column;align-items:stretch}
  #amaGenApp h2{font-size:26px}
  #amaGenApp .grid{grid-template-columns:1fr}
  #amaGenApp .span2{grid-column:auto}
  #amaGenApp .search-row .btn{width:100%}
  #amaGenApp .ref-row{flex-direction:column}
}
