:root{
  --bg:#050814;--bg2:#07101f;--panel:#0d1628;--panel2:#111b30;--line:#223047;--text:#f8fafc;--muted:#94a3b8;--purple:#8b5cf6;--purple2:#c084fc;--cyan:#06b6d4;--green:#22c55e;--blue:#3b82f6;--orange:#f59e0b;--red:#ef4444;
}
*{box-sizing:border-box} body{margin:0;background:radial-gradient(circle at top left,rgba(124,58,237,.22),transparent 28%),linear-gradient(135deg,var(--bg),#020617 70%);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;min-height:100vh}.app-shell{display:grid;grid-template-columns:320px 1fr;min-height:100vh}.sidebar{border-right:1px solid var(--line);padding:28px 22px;background:rgba(4,10,22,.86);backdrop-filter:blur(22px);display:flex;flex-direction:column;gap:22px}.brand{display:flex;gap:16px;align-items:flex-start}.brand-icon{width:56px;height:56px;display:grid;place-items:center;border-radius:18px;border:1px solid rgba(192,132,252,.8);background:linear-gradient(135deg,rgba(139,92,246,.75),rgba(30,41,59,.55));box-shadow:0 0 28px rgba(139,92,246,.45);font-weight:900}.brand h1{font-size:28px;line-height:1.1;margin:0}.version-pill,.status-badge,.server-card strong#environment{display:inline-block;padding:5px 11px;border-radius:999px;background:rgba(124,58,237,.28);color:#ddd6fe;border:1px solid rgba(139,92,246,.35);font-weight:700}.tagline{color:#cbd5e1;margin:0;line-height:1.5}.nav{display:flex;flex-direction:column;gap:8px}.nav-item{width:100%;text-align:left;display:flex;align-items:center;gap:14px;padding:14px 16px;border:1px solid transparent;border-radius:12px;background:transparent;color:#e5e7eb;font-size:16px;cursor:pointer}.nav-item span{color:var(--purple2);min-width:28px}.nav-item:hover,.nav-item.active{background:linear-gradient(90deg,rgba(124,58,237,.28),rgba(15,23,42,.55));border-color:rgba(139,92,246,.45);box-shadow:inset 3px 0 0 var(--purple)}.server-card{margin-top:auto;background:linear-gradient(180deg,rgba(15,23,42,.85),rgba(15,23,42,.45));border:1px solid var(--line);border-radius:14px;padding:18px}.server-row,.meta-row{display:flex;justify-content:space-between;gap:10px;align-items:center;border-bottom:1px solid rgba(34,48,71,.7);padding:10px 0}.meta-row:last-child{border:0}.online-dot{width:10px;height:10px;background:var(--green);border-radius:50%;box-shadow:0 0 12px var(--green)}a{color:#a78bfa;text-decoration:none}.footer-note{color:#cbd5e1}.main{padding:28px 36px 42px;overflow:auto}.topbar{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:26px}.topbar h2{font-size:42px;margin:0 0 8px}.topbar p{color:#cbd5e1;font-size:18px;margin:0}.actions{display:flex;gap:12px}.primary-btn,.ghost-btn{border:1px solid rgba(139,92,246,.55);border-radius:12px;padding:11px 16px;color:white;background:linear-gradient(135deg,rgba(124,58,237,.9),rgba(37,99,235,.65));cursor:pointer;font-weight:700}.ghost-btn{background:rgba(15,23,42,.65);color:#e9d5ff}.hero-card,.panel,.table-card,.upload-card{background:linear-gradient(180deg,rgba(15,23,42,.86),rgba(10,15,28,.78));border:1px solid var(--line);border-radius:18px;box-shadow:0 24px 80px rgba(0,0,0,.25)}.hero-card{display:flex;justify-content:space-between;gap:22px;align-items:center;padding:28px;margin-bottom:20px}.eyebrow{color:var(--purple2);font-weight:800}.hero-card h3{font-size:28px;margin:10px 0}.hero-card p{color:#cbd5e1;margin:0}.status-badge{background:rgba(34,197,94,.16);border-color:rgba(34,197,94,.35);color:#86efac}.status-badge.error{background:rgba(239,68,68,.18);border-color:rgba(239,68,68,.45);color:#fca5a5}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:18px}.metric-card{padding:22px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(180deg,rgba(17,24,39,.86),rgba(15,23,42,.5))}.metric-card span{color:#93c5fd}.metric-card strong{display:block;font-size:34px;margin:8px 0}.metric-card small{color:var(--muted)}.panel-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:16px}.panel{padding:20px}.panel-header{display:flex;justify-content:space-between;align-items:center}.panel-header h3{margin:0}.panel-header span{color:#86efac}.breakdown{display:flex;flex-direction:column;gap:10px;margin-top:16px}.breakdown-row{display:flex;justify-content:space-between;padding:12px;border:1px solid rgba(34,48,71,.7);border-radius:12px;background:rgba(15,23,42,.6)}.check-list{list-style:none;padding:0;margin:16px 0 0;display:flex;flex-direction:column;gap:12px;color:#cbd5e1}.ok{color:var(--green);font-weight:900}.pending{color:var(--orange);font-weight:900}.view{display:none}.view.active{display:block}.section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.section-title h3,.empty-view h3{font-size:30px;margin:0 0 6px}.section-title p,.empty-view p{margin:0;color:#cbd5e1}.toolbar{display:grid;grid-template-columns:1fr 180px 120px;gap:12px;margin:16px 0}.toolbar input,.toolbar select,input,textarea{background:rgba(15,23,42,.82);border:1px solid var(--line);color:var(--text);border-radius:12px;padding:12px}.table-card{overflow:hidden}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:15px;border-bottom:1px solid rgba(34,48,71,.7)}th{color:#93c5fd;font-size:13px;text-transform:uppercase;letter-spacing:.08em}td{color:#e5e7eb}.badge{padding:5px 9px;border-radius:999px;background:rgba(59,130,246,.2);color:#bfdbfe;border:1px solid rgba(59,130,246,.35);font-weight:700}.status{color:#86efac}.row-actions{display:flex;gap:8px}.small-btn{border:1px solid var(--line);background:rgba(15,23,42,.8);color:#e5e7eb;border-radius:9px;padding:7px 9px;cursor:pointer}.small-btn.delete{color:#fecaca;border-color:rgba(239,68,68,.4)}.upload-card{padding:18px;margin-bottom:16px}.hidden{display:none!important}.form-grid{display:grid;grid-template-columns:1.1fr 1fr .8fr .8fr;gap:12px}.upload-card label{display:flex;flex-direction:column;gap:8px;color:#cbd5e1}textarea{min-height:78px;resize:vertical}.form-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:14px}.empty-view{padding:64px;border:1px dashed rgba(148,163,184,.35);border-radius:18px;background:rgba(15,23,42,.38)}.modal{position:fixed;inset:0;background:rgba(2,6,23,.72);backdrop-filter:blur(10px);display:grid;place-items:center;padding:24px}.modal-content{width:min(960px,94vw);max-height:86vh;background:#07101f;border:1px solid var(--line);border-radius:18px;overflow:hidden}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid var(--line)}.modal-header h3{margin:0}.modal-header button{background:transparent;color:white;border:0;font-size:28px;cursor:pointer}pre{white-space:pre-wrap;overflow:auto;max-height:70vh;margin:0;padding:20px;color:#dbeafe;background:#020617;font-family:"SFMono-Regular",Consolas,monospace;font-size:13px}.danger{color:#fca5a5}@media(max-width:980px){.app-shell{grid-template-columns:1fr}.sidebar{position:relative}.metric-grid,.panel-grid,.form-grid{grid-template-columns:1fr}.toolbar{grid-template-columns:1fr}.topbar{flex-direction:column;gap:16px}.topbar h2{font-size:34px}}
.analysis-grid{display:grid;grid-template-columns:420px 1fr;gap:18px;align-items:start}.analysis-card,.result-card{background:linear-gradient(180deg,rgba(15,23,42,.86),rgba(10,15,28,.78));border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:0 24px 80px rgba(0,0,0,.25)}.analysis-card{display:flex;flex-direction:column;gap:14px}.analysis-card label{display:flex;flex-direction:column;gap:8px;color:#cbd5e1}.analysis-card small{color:var(--muted)}.analysis-card select[multiple]{min-height:210px;background:rgba(15,23,42,.82);border:1px solid var(--line);color:var(--text);border-radius:12px;padding:10px}.analysis-card select{background:rgba(15,23,42,.82);border:1px solid var(--line);color:var(--text);border-radius:12px;padding:12px}.result-card pre{margin-top:14px;border-radius:14px;border:1px solid rgba(34,48,71,.7);max-height:64vh}.primary-btn:disabled{opacity:.55;cursor:not-allowed}@media(max-width:1180px){.analysis-grid{grid-template-columns:1fr}}

.markdown-output{margin-top:14px;border-radius:14px;border:1px solid rgba(34,48,71,.7);max-height:64vh;overflow:auto;padding:22px;background:#020617;color:#dbeafe;line-height:1.55;font-size:14px}.markdown-output h2,.markdown-output h3,.markdown-output h4,.markdown-output h5{margin:18px 0 10px;color:#f8fafc}.markdown-output h2{font-size:24px;border-bottom:1px solid rgba(34,48,71,.75);padding-bottom:10px}.markdown-output h3{font-size:20px;color:#bfdbfe}.markdown-output p{margin:10px 0;color:#dbeafe}.markdown-output ul{margin:10px 0 14px 22px;color:#dbeafe}.markdown-output code{background:rgba(59,130,246,.16);border:1px solid rgba(59,130,246,.24);padding:1px 5px;border-radius:6px}.markdown-output pre{margin:12px 0;border-radius:12px;border:1px solid rgba(34,48,71,.7);max-height:none}.md-table-wrap{overflow:auto;margin:14px 0;border:1px solid rgba(34,48,71,.85);border-radius:14px;background:rgba(15,23,42,.42)}.md-table{width:100%;border-collapse:collapse;font-size:13px;min-width:920px}.md-table th{background:rgba(59,130,246,.16);color:#bfdbfe;position:sticky;top:0;z-index:1}.md-table th,.md-table td{vertical-align:top;padding:12px 14px;border-bottom:1px solid rgba(34,48,71,.7);border-right:1px solid rgba(34,48,71,.45)}.md-table td{color:#e5e7eb}.md-table tr:hover td{background:rgba(124,58,237,.08)}.result-card .markdown-output{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.result-card pre#analysisResult{display:none}
.metric-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.part-row td{background:rgba(59,130,246,.035)}.split-note{color:#a78bfa!important}.status.warn{color:#fbbf24}@media(max-width:1320px){.metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:720px){.metric-grid{grid-template-columns:1fr}}


/* --------------------------------------------------------------------------
   Release v0.7.3 - Frontend release metadata control
   Scope: typography, spacing, contrast and analysis readability only.
   Backend/API behaviour remains unchanged.
---------------------------------------------------------------------------- */
:root{
  --font-base:18px;
  --font-ui:17px;
  --font-small:15px;
  --font-analysis:19px;
  --font-result:18px;
  --line-height-reading:1.72;
  --focus-ring:0 0 0 3px rgba(6,182,212,.18),0 0 0 1px rgba(6,182,212,.44);
}
html{font-size:var(--font-base);}
body{font-size:var(--font-base);line-height:1.58;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;}
.app-shell{grid-template-columns:336px 1fr;}
.sidebar{padding:32px 24px;gap:26px;}
.brand{gap:18px;}
.brand-icon{width:60px;height:60px;border-radius:20px;font-size:20px;letter-spacing:.04em;}
.brand h1{font-size:30px;line-height:1.08;letter-spacing:-.035em;}
.version-pill,.status-badge,.server-card strong#environment{font-size:14px;padding:6px 12px;}
.tagline{font-size:16px;line-height:1.65;color:#d7e0ee;}
.nav{gap:10px;}
.nav-item{font-size:18px;padding:16px 17px;border-radius:14px;min-height:56px;letter-spacing:-.01em;}
.nav-item span{font-size:20px;min-width:30px;}
.server-card{padding:20px;border-radius:16px;font-size:15px;}
.server-row,.meta-row{padding:12px 0;}
.footer-note{font-size:15px;color:#d7e0ee;}
.main{padding:34px 44px 50px;}
.topbar{margin-bottom:32px;gap:24px;}
.topbar h2{font-size:46px;line-height:1.02;letter-spacing:-.05em;margin-bottom:10px;}
.topbar p{font-size:20px;line-height:1.5;color:#d7e0ee;max-width:980px;}
.primary-btn,.ghost-btn{font-size:16px;padding:13px 18px;border-radius:14px;min-height:46px;}
.primary-btn:focus-visible,.ghost-btn:focus-visible,.small-btn:focus-visible,input:focus,textarea:focus,select:focus{outline:none;box-shadow:var(--focus-ring);border-color:rgba(6,182,212,.55)!important;}
.hero-card{padding:32px;border-radius:22px;margin-bottom:24px;}
.eyebrow{font-size:14px;letter-spacing:.08em;text-transform:uppercase;}
.hero-card h3{font-size:32px;line-height:1.12;letter-spacing:-.035em;}
.hero-card p{font-size:18px;line-height:1.65;color:#d7e0ee;}
.metric-grid{gap:18px;margin-bottom:22px;}
.metric-card{padding:24px;border-radius:18px;}
.metric-card span{font-size:15px;font-weight:700;}
.metric-card strong{font-size:38px;letter-spacing:-.04em;}
.metric-card small{font-size:15px;line-height:1.45;}
.panel-grid{gap:20px;}
.panel{padding:24px;border-radius:20px;}
.panel-header h3{font-size:22px;letter-spacing:-.02em;}
.panel-header span{font-size:15px;font-weight:700;}
.breakdown-row{font-size:16px;padding:14px;border-radius:14px;}
.check-list{font-size:17px;line-height:1.65;gap:14px;}
.section-title{margin-bottom:24px;gap:22px;align-items:flex-start;}
.section-title h3,.empty-view h3{font-size:34px;line-height:1.12;letter-spacing:-.04em;margin-bottom:8px;}
.section-title p,.empty-view p{font-size:18px;line-height:1.6;color:#d7e0ee;}
.toolbar{grid-template-columns:1fr 200px 140px;gap:14px;margin:18px 0 20px;}
.toolbar input,.toolbar select,input,textarea,select{font-size:16px;padding:14px 15px;border-radius:14px;line-height:1.45;}
textarea{min-height:110px;}
.table-card{border-radius:20px;}
table{font-size:16px;}
th,td{padding:17px 16px;line-height:1.55;}
th{font-size:14px;letter-spacing:.075em;}
td small{font-size:14px;color:#b6c4d7;line-height:1.45;}
.badge{font-size:14px;padding:6px 11px;}
.status{font-size:15px;font-weight:800;}
.small-btn{font-size:15px;padding:8px 11px;border-radius:10px;min-height:38px;}
.upload-card{padding:22px;border-radius:20px;margin-bottom:20px;}
.upload-card label{font-size:16px;line-height:1.5;}
.form-grid{gap:14px;}
.form-actions{gap:14px;margin-top:18px;}
.empty-view{padding:72px;border-radius:22px;}
.modal-content{border-radius:20px;}
.modal-header{padding:18px 22px;}
.modal-header h3{font-size:22px;}
pre{font-size:15px;line-height:1.65;padding:24px;}

/* AI Analysis readability improvements */
.analysis-grid{grid-template-columns:minmax(440px,500px) 1fr;gap:24px;}
.analysis-card,.result-card{padding:24px;border-radius:22px;}
.analysis-card{gap:18px;font-size:var(--font-analysis);}
.analysis-card label{gap:10px;font-size:18px;color:#dbe7f5;font-weight:650;}
.analysis-card small{font-size:15px;line-height:1.55;color:#aebed1;font-weight:400;}
.analysis-card input,.analysis-card select,.analysis-card textarea,.analysis-card select[multiple]{font-size:18px;line-height:1.5;border-radius:15px;padding:15px 16px;background:rgba(15,23,42,.9);}
.analysis-card select[multiple]{min-height:260px;padding:12px;}
.analysis-card select[multiple] option{padding:9px 8px;font-size:17px;line-height:1.55;}
#analysisQuery{min-height:180px;font-size:19px;line-height:1.62;}
#runAnalysisBtn{font-size:18px;min-height:52px;padding-inline:22px;}
.result-card .panel-header{padding-bottom:14px;border-bottom:1px solid rgba(34,48,71,.65);margin-bottom:18px;}
.result-card .panel-header h3{font-size:24px;}
#analysisRuntime{font-size:15px;padding:6px 11px;border-radius:999px;background:rgba(6,182,212,.12);border:1px solid rgba(6,182,212,.24);color:#9be8f5;}
.markdown-output{font-size:var(--font-result);line-height:var(--line-height-reading);padding:28px;max-height:72vh;border-radius:18px;background:linear-gradient(180deg,rgba(2,6,23,.96),rgba(8,13,24,.96));}
.markdown-output h2,.markdown-output h3,.markdown-output h4,.markdown-output h5{line-height:1.25;letter-spacing:-.025em;}
.markdown-output h2{font-size:30px;margin:24px 0 16px;padding-bottom:12px;}
.markdown-output h3{font-size:25px;margin:22px 0 13px;}
.markdown-output h4{font-size:21px;color:#dbeafe;}
.markdown-output p{margin:13px 0;color:#e7eefb;}
.markdown-output ul{margin:12px 0 18px 26px;color:#e7eefb;}
.markdown-output li{margin:7px 0;padding-left:4px;}
.markdown-output code{font-size:.94em;padding:2px 7px;border-radius:7px;}
.markdown-output pre{font-size:15px;line-height:1.7;padding:22px;border-radius:15px;}
.md-table-wrap{margin:18px 0;border-radius:16px;}
.md-table{font-size:15px;min-width:960px;}
.md-table th,.md-table td{padding:15px 16px;line-height:1.6;}
.md-table th{font-size:14px;}
.part-row td{background:rgba(59,130,246,.05);}
.split-note{font-size:14px!important;line-height:1.5;}

@media(max-width:1180px){.analysis-grid{grid-template-columns:1fr}.analysis-card select[multiple]{min-height:220px}}
@media(max-width:980px){.app-shell{grid-template-columns:1fr}.main{padding:28px 24px 40px}.topbar h2{font-size:38px}.topbar p{font-size:18px}.section-title{flex-direction:column}.toolbar{grid-template-columns:1fr}.analysis-card,.result-card{padding:20px}}
@media(max-width:720px){html{font-size:16px}.main{padding:24px 18px 34px}.brand h1{font-size:26px}.nav-item{font-size:16px}.topbar h2{font-size:34px}.hero-card{flex-direction:column;align-items:flex-start}.markdown-output{font-size:16px;padding:20px}.analysis-card input,.analysis-card select,.analysis-card textarea,.analysis-card select[multiple]{font-size:16px}}


/* --------------------------------------------------------------------------
   Release v0.7.3 - AI Analysis document selector refinement
   Scope: readability of long document names inside the multi-select only.
---------------------------------------------------------------------------- */
.analysis-card select#analysisDocuments {
  min-height: 310px;
  font-size: 15px;
  line-height: 1.42;
  padding: 10px 11px;
  letter-spacing: -0.01em;
}
.analysis-card select#analysisDocuments option {
  font-size: 15px;
  line-height: 1.42;
  padding: 6px 8px;
  white-space: nowrap;
}
.analysis-card select#analysisDocuments option[data-kind="parent"] {
  font-weight: 800;
  color: #e9d5ff;
}
.analysis-card select#analysisDocuments option[data-kind="part"] {
  color: #c7d2fe;
}
@media(max-width:1180px){
  .analysis-card select#analysisDocuments{min-height:280px;}
}
@media(max-width:720px){
  .analysis-card select#analysisDocuments,
  .analysis-card select#analysisDocuments option{font-size:14px;}
}

/* --------------------------------------------------------------------------
   Release v0.7.4 - Smart Markdown Renderer
   Scope: result presentation only. Backend/API behaviour remains unchanged.
---------------------------------------------------------------------------- */
.markdown-output{
  color:#e8f0fb;
  word-break:normal;
  overflow-wrap:anywhere;
}
.markdown-output a{color:#67e8f9;text-decoration:none;border-bottom:1px solid rgba(103,232,249,.35)}
.markdown-output a:hover{color:#a78bfa;border-bottom-color:#a78bfa}
.markdown-output h2:first-child,
.markdown-output h3:first-child{margin-top:0}
.markdown-output h2{
  display:flex;
  align-items:center;
  gap:10px;
  color:#ffffff;
}
.markdown-output h2::before{
  content:"";
  width:9px;
  height:28px;
  border-radius:999px;
  background:linear-gradient(180deg,#7c3aed,#06b6d4);
  box-shadow:0 0 18px rgba(124,58,237,.35);
  flex:none;
}
.markdown-output h3{
  color:#d8b4fe;
  border-left:3px solid rgba(124,58,237,.65);
  padding-left:12px;
}
.markdown-output h4{color:#bae6fd;margin:18px 0 10px}
.markdown-output ol{
  margin:12px 0 18px 28px;
  color:#e7eefb;
  padding-left:10px;
}
.markdown-output ol li{margin:8px 0;padding-left:6px}
.markdown-output ul li::marker{color:#a78bfa}
.markdown-output ol li::marker{color:#67e8f9;font-weight:800}
.markdown-output blockquote{
  margin:18px 0;
  padding:16px 18px;
  border-left:4px solid #06b6d4;
  background:rgba(6,182,212,.08);
  border-radius:14px;
  color:#dbeafe;
}
.markdown-output blockquote p{margin:0 0 8px 0}
.markdown-output blockquote p:last-child{margin-bottom:0}
.md-divider{
  border:0;
  height:1px;
  margin:26px 0;
  background:linear-gradient(90deg,transparent,rgba(124,58,237,.65),rgba(6,182,212,.45),transparent);
}
.code-block{
  margin:18px 0;
  border:1px solid rgba(34,48,71,.85);
  border-radius:16px;
  overflow:hidden;
  background:#020617;
}
.code-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 14px;
  font-size:13px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#93c5fd;
  background:rgba(15,23,42,.96);
  border-bottom:1px solid rgba(34,48,71,.75);
}
.code-block pre{
  margin:0;
  border:0;
  border-radius:0;
  background:#020617;
}
.key-value-line{
  display:grid;
  grid-template-columns:minmax(160px,260px) 1fr;
  gap:16px;
  margin:10px 0;
  padding:13px 15px;
  border:1px solid rgba(34,48,71,.72);
  border-radius:14px;
  background:rgba(15,23,42,.42);
}
.key-value-line span{
  color:#c4b5fd;
  font-weight:850;
}
.key-value-line p{margin:0!important;color:#e8f0fb!important}
.requirement-list{
  display:grid;
  gap:12px;
  margin:18px 0 22px;
}
.requirement-card{
  display:grid;
  grid-template-columns:minmax(110px,190px) 1fr;
  gap:16px;
  padding:15px 16px;
  border:1px solid rgba(124,58,237,.32);
  border-radius:16px;
  background:linear-gradient(180deg,rgba(30,41,59,.42),rgba(15,23,42,.58));
  box-shadow:0 14px 36px rgba(2,6,23,.16);
}
.requirement-card:hover{
  border-color:rgba(6,182,212,.42);
  background:linear-gradient(180deg,rgba(30,41,59,.54),rgba(15,23,42,.68));
}
.requirement-ref{
  align-self:start;
  display:inline-flex;
  width:max-content;
  max-width:100%;
  padding:7px 10px;
  border-radius:999px;
  background:rgba(124,58,237,.18);
  border:1px solid rgba(167,139,250,.35);
  color:#e9d5ff;
  font-weight:900;
  font-size:14px;
  letter-spacing:.025em;
  white-space:nowrap;
}
.requirement-text{
  color:#e8f0fb;
  line-height:1.62;
}
.md-table-wrap{
  box-shadow:0 16px 42px rgba(2,6,23,.28);
}
.md-table th{
  text-transform:none;
  letter-spacing:.02em;
  background:linear-gradient(180deg,rgba(59,130,246,.2),rgba(30,41,59,.8));
  color:#dbeafe;
}
.md-table tbody tr:nth-child(even) td{background:rgba(15,23,42,.38)}
.md-table tbody tr:hover td{background:rgba(124,58,237,.12)}
@media(max-width:980px){
  .key-value-line,.requirement-card{grid-template-columns:1fr;gap:10px}
  .requirement-ref{white-space:normal}
}

/* --------------------------------------------------------------------------
   Release v0.7.5 - Analysis Progress & Error UX
   Scope: frontend-only execution feedback and user-readable errors.
---------------------------------------------------------------------------- */
.analysis-progress{
  margin-top:16px;
  padding:17px 18px;
  border:1px solid rgba(6,182,212,.25);
  border-radius:18px;
  background:linear-gradient(180deg,rgba(6,182,212,.08),rgba(15,23,42,.58));
  box-shadow:0 16px 42px rgba(2,6,23,.18);
}
.progress-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
  color:#e0f2fe;
  font-size:15px;
  font-weight:800;
}
.progress-topline strong{
  color:#67e8f9;
  font-size:14px;
}
.progress-track{
  position:relative;
  height:11px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(15,23,42,.95);
  border:1px solid rgba(34,48,71,.8);
}
.progress-bar{
  height:100%;
  width:0%;
  border-radius:999px;
  background:linear-gradient(90deg,#7c3aed,#06b6d4,#22c55e);
  box-shadow:0 0 22px rgba(6,182,212,.35);
  transition:width .55s ease;
}
.progress-steps{
  list-style:none;
  padding:0;
  margin:14px 0 0;
  display:grid;
  gap:8px;
  color:#9fb0c5;
  font-size:14px;
}
.progress-steps li{
  position:relative;
  padding-left:24px;
  line-height:1.35;
}
.progress-steps li::before{
  content:"";
  position:absolute;
  left:0;
  top:.35em;
  width:10px;
  height:10px;
  border-radius:999px;
  background:rgba(148,163,184,.35);
  border:1px solid rgba(148,163,184,.35);
}
.progress-steps li.active{color:#e0f2fe;font-weight:850;}
.progress-steps li.active::before{
  background:#06b6d4;
  border-color:#67e8f9;
  box-shadow:0 0 16px rgba(6,182,212,.55);
}
.progress-steps li.done{color:#bbf7d0;}
.progress-steps li.done::before{
  content:"✓";
  display:grid;
  place-items:center;
  width:14px;
  height:14px;
  top:.18em;
  color:#052e16;
  font-size:10px;
  font-weight:900;
  background:#22c55e;
  border-color:#86efac;
}
.primary-btn.loading{
  opacity:.88;
  cursor:wait;
}
.analysis-waiting{
  padding:18px 20px;
  border:1px solid rgba(6,182,212,.22);
  border-radius:16px;
  background:rgba(6,182,212,.075);
  color:#dffafe;
}
.analysis-waiting strong{font-size:19px;color:#ffffff;}
.analysis-waiting p{margin:8px 0 0;color:#c8e9f2!important;}
.error-card{
  display:grid;
  grid-template-columns:44px 1fr;
  gap:16px;
  padding:20px;
  border:1px solid rgba(239,68,68,.35);
  border-radius:18px;
  background:linear-gradient(180deg,rgba(127,29,29,.28),rgba(15,23,42,.68));
  color:#fee2e2;
}
.error-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:rgba(239,68,68,.18);
  border:1px solid rgba(248,113,113,.36);
  color:#fecaca;
  font-weight:950;
  font-size:24px;
}
.error-card h3{
  margin:0 0 8px!important;
  color:#ffffff!important;
  border:0!important;
  padding-left:0!important;
}
.error-card p{margin:0 0 12px!important;color:#fecaca!important;}
.error-recommendation{
  margin:12px 0;
  padding:13px 14px;
  border-radius:14px;
  background:rgba(15,23,42,.55);
  border:1px solid rgba(248,113,113,.25);
  color:#ffe4e6;
  line-height:1.55;
}
.error-card details{
  margin-top:12px;
  color:#fca5a5;
}
.error-card summary{
  cursor:pointer;
  font-weight:800;
}
.error-card pre{
  margin-top:10px;
  max-height:220px;
  overflow:auto;
  white-space:pre-wrap;
}
@media(max-width:720px){
  .error-card{grid-template-columns:1fr;}
}

/* --------------------------------------------------------------------------
   Release v0.7.6 - Report Content UX
   Scope: frontend-only result presentation refinements.
---------------------------------------------------------------------------- */
.result-header{
  align-items:center;
  gap:16px;
}
.result-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.result-actions .small-btn:disabled{
  opacity:.45;
  cursor:not-allowed;
}
.analysis-summary-card{
  margin:0 0 22px;
  padding:18px 20px;
  border:1px solid rgba(6,182,212,.24);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(6,182,212,.09),rgba(124,58,237,.08) 55%,rgba(15,23,42,.72));
  box-shadow:0 18px 46px rgba(2,6,23,.28);
}
.summary-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:16px;
  padding-bottom:14px;
  border-bottom:1px solid rgba(34,48,71,.65);
}
.summary-title span{
  color:#67e8f9;
  font-size:14px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.summary-title strong{
  color:#fff;
  font-size:19px;
  line-height:1.3;
  text-align:right;
}
.summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.summary-grid div{
  padding:13px 14px;
  border:1px solid rgba(34,48,71,.7);
  border-radius:14px;
  background:rgba(2,6,23,.34);
}
.summary-grid span{
  display:block;
  margin-bottom:5px;
  color:#9fb0c5;
  font-size:13px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.summary-grid strong{
  display:block;
  color:#f8fafc;
  font-size:16px;
  line-height:1.35;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.rendered-analysis-report{
  min-width:0;
}
.ai-table-shell{
  margin:22px 0;
  border:1px solid rgba(34,48,71,.82);
  border-radius:18px;
  overflow:hidden;
  background:rgba(2,6,23,.44);
  box-shadow:0 18px 48px rgba(2,6,23,.32);
}
.ai-table-label{
  padding:12px 16px;
  border-bottom:1px solid rgba(34,48,71,.78);
  color:#93c5fd;
  font-size:13px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  background:linear-gradient(180deg,rgba(15,23,42,.96),rgba(15,23,42,.72));
}
.md-table-wrap{
  overflow-x:auto;
  overflow-y:hidden;
  max-width:100%;
}
.md-table.ai-table{
  table-layout:auto;
  border-collapse:separate;
  border-spacing:0;
  min-width:1100px;
  width:max-content;
}
.md-table.ai-table th,
.md-table.ai-table td{
  min-width:150px;
  max-width:520px;
  vertical-align:top;
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none;
}
.md-table.ai-table th{
  position:sticky;
  top:0;
  z-index:2;
  white-space:normal;
  min-width:170px;
  line-height:1.45;
}
.md-table.ai-table th:first-child,
.md-table.ai-table td:first-child{
  min-width:130px;
  max-width:180px;
  white-space:normal;
  font-weight:800;
}
.md-table.ai-table td{
  white-space:normal;
}
.md-table.ai-table td[data-col*="Reference"],
.md-table.ai-table td[data-col*="reference"],
.md-table.ai-table td[data-col*="Ref"],
.md-table.ai-table td[data-col*="ref"]{
  white-space:normal;
  min-width:135px;
  max-width:180px;
  font-weight:800;
  color:#dbeafe;
}
.md-table.ai-table th[title*="Reference"],
.md-table.ai-table th[title*="reference"],
.md-table.ai-table th[title*="Ref"],
.md-table.ai-table th[title*="ref"]{
  min-width:135px;
  max-width:180px;
}
.md-table-wrap::-webkit-scrollbar{height:10px}
.md-table-wrap::-webkit-scrollbar-track{background:rgba(15,23,42,.9);border-radius:999px}
.md-table-wrap::-webkit-scrollbar-thumb{background:linear-gradient(90deg,#7c3aed,#06b6d4);border-radius:999px}
.requirement-card{
  grid-template-columns:minmax(130px,210px) minmax(0,1fr);
}
.requirement-text{
  overflow-wrap:break-word;
}
@media(max-width:1180px){
  .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:720px){
  .result-actions{justify-content:flex-start;width:100%;}
  .summary-title{flex-direction:column;gap:8px;}
  .summary-title strong{text-align:left;}
  .summary-grid{grid-template-columns:1fr;}
  .md-table.ai-table{min-width:920px;}
}


/* v0.7.7 Repository UX */
.repository-mini-stats{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  margin:16px 0;
}
.repository-mini-stats div{
  border:1px solid rgba(34,48,71,.82);
  border-radius:14px;
  padding:14px 16px;
  background:linear-gradient(180deg,rgba(15,23,42,.78),rgba(15,23,42,.42));
}
.repository-mini-stats span{
  display:block;
  color:#94a3b8;
  font-size:13px;
  margin-bottom:6px;
}
.repository-mini-stats strong{
  color:#f8fafc;
  font-size:20px;
}
.repository-table-card table{min-width:1180px;}
.repo-doc-cell{display:flex;gap:13px;align-items:flex-start;min-width:360px;}
.repo-doc-icon{width:30px;height:30px;display:grid;place-items:center;border-radius:10px;background:rgba(124,58,237,.18);border:1px solid rgba(139,92,246,.28);font-size:16px;flex:0 0 auto;}
.repo-doc-main{min-width:0;display:flex;flex-direction:column;gap:6px;}
.repo-doc-title{display:flex;align-items:center;gap:6px;max-width:620px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.repo-doc-title strong{font-size:16px;color:#f8fafc;overflow:hidden;text-overflow:ellipsis;}
.repo-doc-meta{display:flex;flex-wrap:wrap;gap:8px;color:#94a3b8;font-size:13px;line-height:1.35;}
.repo-doc-meta span{max-width:520px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.repo-doc-metrics{display:flex;flex-wrap:wrap;gap:8px;align-items:center;color:#cbd5e1;font-size:13px;}
.repository-part-row td{background:rgba(59,130,246,.04)!important;}
.repository-part-row .repo-doc-cell{padding-left:22px;}
.repository-part-row .repo-doc-title strong{font-weight:650;color:#dbeafe;}
.part-connector{color:#60a5fa;font-family:"SFMono-Regular",Consolas,monospace;}
.mini-badge{display:inline-flex;align-items:center;border-radius:999px;padding:3px 8px;font-size:12px;font-weight:800;border:1px solid rgba(148,163,184,.28);}
.mini-badge.split{background:rgba(124,58,237,.16);color:#ddd6fe;border-color:rgba(139,92,246,.38)}
.mini-badge.part{background:rgba(59,130,246,.15);color:#bfdbfe;border-color:rgba(59,130,246,.36)}
.mini-badge.single{background:rgba(34,197,94,.12);color:#bbf7d0;border-color:rgba(34,197,94,.32)}
.type-badge{font-size:12px;letter-spacing:.02em;}
@media(max-width:1320px){.repository-mini-stats{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:820px){.repository-mini-stats{grid-template-columns:1fr;}.repository-table-card{overflow:auto;}.repo-doc-title{max-width:360px;}}


/* v0.7.8 - Prompt Starter UX */
.query-helper-bar{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin-top:2px;
}
.query-helper-bar span#queryMetrics{
  color:#aebed1;
  border:1px solid rgba(148,163,184,.20);
  background:rgba(15,23,42,.58);
  border-radius:999px;
  padding:6px 10px;
  font-size:13px;
  line-height:1;
}
.prompt-chip{
  border:1px solid rgba(139,92,246,.34);
  background:linear-gradient(135deg,rgba(124,58,237,.20),rgba(6,182,212,.08));
  color:#e9d5ff;
  border-radius:999px;
  padding:7px 10px;
  font-size:13px;
  font-weight:750;
  cursor:pointer;
  transition:all .16s ease;
}
.prompt-chip:hover{
  border-color:rgba(167,139,250,.72);
  color:#fff;
  transform:translateY(-1px);
  box-shadow:0 8px 22px rgba(124,58,237,.16);
}
.prompt-chip.clear{
  color:#fecaca;
  border-color:rgba(239,68,68,.30);
  background:rgba(127,29,29,.18);
}
.query-guidance{
  margin-top:2px;
  display:block;
}
.analysis-card textarea#analysisQuery{
  min-height:145px;
}
@media(max-width:720px){
  .prompt-chip{font-size:12px;padding:7px 9px;}
  .query-helper-bar span#queryMetrics{width:100%;}
}

/* v0.8.1 Prompt Studio */
.prompt-studio-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.4fr);
  gap: 24px;
  align-items: start;
}

.prompt-template-list {
  display: grid;
  gap: 12px;
}

.prompt-template-card {
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.76);
  color: var(--text, #e5e7eb);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.prompt-template-card:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(30, 41, 59, 0.88);
}

.prompt-template-title {
  display: block;
  font-weight: 800;
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.prompt-template-meta {
  display: block;
  color: var(--muted, #94a3b8);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.prompt-template-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.prompt-template-detail {
  display: grid;
  gap: 18px;
}

.prompt-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.prompt-detail-grid div {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.35);
  border-radius: 14px;
  padding: 14px;
}

.prompt-detail-grid span {
  display: block;
  color: var(--muted, #94a3b8);
  font-size: 0.84rem;
  margin-bottom: 5px;
}

.prompt-detail-grid strong {
  font-size: 1rem;
}

.prompt-template-pre {
  white-space: pre-wrap;
  overflow-x: auto;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 16px;
  padding: 18px;
  background: rgba(2, 6, 23, 0.55);
  color: #dbeafe;
  line-height: 1.65;
  font-size: 0.98rem;
}

.error-card.compact {
  padding: 14px;
}

@media (max-width: 1100px) {
  .prompt-studio-grid {
    grid-template-columns: 1fr;
  }
}

/* v0.8.2 Prompt Studio CRUD */
.prompt-studio-grid-v082 {
  grid-template-columns: 0.9fr 1fr 1.15fr;
  align-items: start;
}

.prompt-studio-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.small-action {
  padding: 9px 13px;
  font-size: 0.92rem;
}

.prompt-template-card.selected {
  border-color: rgba(34, 211, 238, 0.65);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(124, 58, 237, 0.15));
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.18), 0 12px 32px rgba(15, 23, 42, 0.28);
}

.prompt-template-editor-panel {
  min-width: 0;
}

.prompt-template-form {
  display: grid;
  gap: 16px;
}

.prompt-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prompt-template-form textarea {
  min-height: auto;
  resize: vertical;
  font-family: inherit;
}

.prompt-template-form #promptTemplateText,
.prompt-template-form #promptSystemInstructions {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  line-height: 1.55;
  font-size: 0.94rem;
}

.prompt-editor-actions {
  justify-content: flex-end;
  gap: 10px;
}

.danger-btn {
  border: 1px solid rgba(248, 113, 113, 0.42);
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
}

.danger-btn:disabled,
.ghost-btn:disabled,
.primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.prompt-editor-message {
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.62);
  color: #dbeafe;
  font-size: 0.95rem;
}

.prompt-editor-message.success {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(22, 101, 52, 0.18);
  color: #bbf7d0;
}

.prompt-editor-message.error {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.2);
  color: #fecaca;
}

.prompt-editor-message.info {
  border-color: rgba(34, 211, 238, 0.32);
  background: rgba(8, 47, 73, 0.2);
  color: #bae6fd;
}

.mini-badge.danger {
  border-color: rgba(248, 113, 113, 0.42);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.2);
}

.compact-pre {
  max-height: 180px;
}

@media (max-width: 1480px) {
  .prompt-studio-grid-v082 {
    grid-template-columns: 1fr 1fr;
  }
  .prompt-template-editor-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1100px) {
  .prompt-studio-grid-v082,
  .prompt-form-grid {
    grid-template-columns: 1fr;
  }
  .prompt-template-editor-panel {
    grid-column: auto;
  }
}

/* v0.8.3 Prompt Preview */
.prompt-preview-panel {
  grid-column: 1 / -1;
}

.prompt-preview-panel label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.prompt-preview-panel textarea {
  min-height: auto;
  resize: vertical;
}

.prompt-preview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.prompt-preview-metrics div {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.35);
  padding: 13px 14px;
}

.prompt-preview-metrics span {
  display: block;
  color: var(--muted, #94a3b8);
  font-size: 0.85rem;
  margin-bottom: 5px;
}

.prompt-preview-metrics strong {
  color: #e0f2fe;
  font-size: 1.05rem;
}

.prompt-preview-warnings {
  border: 1px solid rgba(251, 191, 36, 0.34);
  background: rgba(120, 53, 15, 0.18);
  color: #fde68a;
  border-radius: 14px;
  padding: 13px 15px;
  margin-bottom: 16px;
}

.prompt-preview-warnings ul {
  margin: 8px 0 0 20px;
}

.prompt-preview-body {
  max-height: 460px;
  overflow: auto;
}

@media (max-width: 900px) {
  .prompt-preview-metrics {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Release v0.8.4 - Prompt Studio Professional Editor
   Scope: editor layout, alignment, integrated preview and validation hints.
---------------------------------------------------------------------------- */
.prompt-studio-grid-v082{
  grid-template-columns:minmax(320px,.82fr) minmax(520px,1.18fr);
  gap:24px;
}
.prompt-template-editor-panel{
  grid-column:1 / -1;
}
.prompt-template-editor-panel .panel-header{
  padding-bottom:16px;
  margin-bottom:6px;
  border-bottom:1px solid rgba(34,48,71,.55);
}
.prompt-template-form-v084{
  gap:22px;
}
.prompt-editor-section{
  border:1px solid rgba(148,163,184,.14);
  background:linear-gradient(180deg,rgba(15,23,42,.42),rgba(2,6,23,.20));
  border-radius:18px;
  padding:18px;
}
.prompt-editor-section-title{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
  color:#e2e8f0;
}
.prompt-editor-section-title span{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:rgba(124,58,237,.22);
  border:1px solid rgba(167,139,250,.38);
  color:#ddd6fe;
  font-weight:900;
  font-size:.9rem;
}
.prompt-editor-section-title strong{
  font-size:1.05rem;
  letter-spacing:-.01em;
}
.prompt-editor-section-title em{
  margin-left:auto;
  font-style:normal;
  font-size:.88rem;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.18);
  color:#94a3b8;
  background:rgba(15,23,42,.58);
}
.prompt-editor-section-title em.state-ok{
  color:#bbf7d0;
  border-color:rgba(34,197,94,.32);
  background:rgba(22,101,52,.16);
}
.prompt-editor-section-title em.state-warning{
  color:#fde68a;
  border-color:rgba(251,191,36,.34);
  background:rgba(120,53,15,.18);
}
.prompt-form-grid-v084{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  align-items:start;
}
.prompt-template-form-v084 label{
  display:flex;
  flex-direction:column;
  gap:8px;
  color:#dbeafe;
  font-weight:700;
}
.prompt-template-form-v084 input,
.prompt-template-form-v084 select,
.prompt-template-form-v084 textarea{
  width:100%;
  min-height:48px;
  border-radius:14px;
  border:1px solid rgba(71,85,105,.78);
  background:rgba(15,23,42,.88);
  color:#f8fafc;
  padding:13px 14px;
  font-size:16px;
  line-height:1.45;
}
.prompt-template-form-v084 textarea{
  resize:vertical;
}
.prompt-field-full textarea#promptDescription{
  min-height:124px;
  font-family:inherit;
  line-height:1.62;
}
.prompt-authoring-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}
.prompt-authoring-grid textarea{
  min-height:310px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace!important;
  font-size:15px!important;
  line-height:1.65!important;
}
.prompt-preview-inline{
  border:1px solid rgba(34,211,238,.18);
  border-radius:18px;
  background:linear-gradient(180deg,rgba(8,47,73,.14),rgba(2,6,23,.22));
  overflow:hidden;
}
.prompt-preview-inline summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:16px 18px;
  border-bottom:1px solid rgba(34,48,71,.65);
  color:#e0f2fe;
  font-weight:900;
}
.prompt-preview-inline summary::-webkit-details-marker{display:none;}
.prompt-preview-inline summary::before{
  content:"▾";
  color:#67e8f9;
  margin-right:2px;
}
.prompt-preview-inline:not([open]) summary{
  border-bottom:0;
}
.prompt-preview-inline:not([open]) summary::before{
  content:"▸";
}
.prompt-preview-inline summary span{
  display:flex;
  align-items:center;
  gap:8px;
}
.prompt-preview-inline summary strong{
  color:#bbf7d0;
  font-size:.92rem;
  font-weight:800;
}
.prompt-preview-content{
  padding:18px;
}
.prompt-preview-content label{
  margin-bottom:16px;
}
.prompt-preview-content #promptPreviewQuery{
  min-height:96px;
  font-family:inherit!important;
}
.prompt-preview-inline .prompt-preview-body{
  max-height:360px;
  margin-top:6px;
}
.prompt-editor-actions-v084{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding-top:2px;
}
.prompt-editor-actions-left,
.prompt-editor-actions-right{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.prompt-editor-actions-v084 .primary-btn{
  min-width:170px;
  box-shadow:0 14px 32px rgba(124,58,237,.22);
}
.prompt-editor-message{
  margin-top:-4px;
}
@media(max-width:1480px){
  .prompt-studio-grid-v082{grid-template-columns:1fr 1fr;}
  .prompt-template-editor-panel{grid-column:1 / -1;}
}
@media(max-width:1100px){
  .prompt-studio-grid-v082,
  .prompt-form-grid-v084,
  .prompt-authoring-grid{grid-template-columns:1fr;}
  .prompt-editor-actions-v084{align-items:stretch;flex-direction:column;}
  .prompt-editor-actions-left,.prompt-editor-actions-right{justify-content:flex-end;}
}
@media(max-width:720px){
  .prompt-editor-section{padding:14px;}
  .prompt-authoring-grid textarea{min-height:240px;}
  .prompt-editor-actions-left,.prompt-editor-actions-right{flex-direction:column;}
  .prompt-editor-actions-v084 button{width:100%;}
}

/*
   Release v0.8.4 final refinement - Simplified Prompt Studio editor
   Focus: user-facing simplicity. Prompt Builder complexity remains backend-side.
*/
.prompt-template-form-simple{
  display:flex;
  flex-direction:column;
  gap:20px;
  padding:18px;
  border-radius:18px;
  background:linear-gradient(180deg, rgba(15,23,42,.78), rgba(2,6,23,.72));
  border:1px solid rgba(148,163,184,.18);
}
.simple-template-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  padding-bottom:8px;
  border-bottom:1px solid rgba(148,163,184,.14);
}
.simple-template-header h4{
  margin:0 0 6px 0;
  font-size:1.25rem;
  letter-spacing:-.01em;
}
.simple-template-header p{
  margin:0;
  max-width:720px;
  color:var(--muted);
  line-height:1.55;
}
.compact-danger{
  padding:9px 14px;
  min-width:88px;
}
.simple-field,
.simple-template-grid label,
.simple-preview-tools label{
  display:flex;
  flex-direction:column;
  gap:8px;
  color:#e5e7eb;
  font-weight:700;
}
.simple-field input,
.simple-field textarea,
.simple-template-grid input,
.simple-template-grid select,
.simple-preview-tools textarea{
  width:100%;
  border:1px solid rgba(148,163,184,.22);
  background:rgba(15,23,42,.82);
  color:#f8fafc;
  border-radius:12px;
  padding:13px 14px;
  font-size:1rem;
  line-height:1.5;
  outline:none;
}
.simple-field input:focus,
.simple-field textarea:focus,
.simple-template-grid input:focus,
.simple-template-grid select:focus,
.simple-preview-tools textarea:focus{
  border-color:rgba(124,58,237,.72);
  box-shadow:0 0 0 3px rgba(124,58,237,.18);
}
.simple-field-name{max-width:560px;}
.simple-template-grid{
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:16px;
  align-items:end;
}
.simple-prompt-field textarea{
  min-height:280px;
  resize:vertical;
  font-family:Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.simple-prompt-field small{
  display:block;
  color:var(--muted);
  font-weight:600;
  line-height:1.45;
}
.simple-prompt-field small.state-ok{color:#86efac;}
.simple-prompt-field small.state-warning{color:#fde68a;}
.simple-preview-tools{
  max-width:720px;
}
.simple-preview-tools textarea{
  min-height:74px;
  resize:vertical;
}
.simple-template-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding-top:4px;
}
.simple-template-actions > div{
  display:flex;
  gap:12px;
  align-items:center;
}
.simple-preview-container{
  margin-top:0;
  border-radius:16px;
  overflow:hidden;
}
.simple-preview-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:14px 16px;
  border-bottom:1px solid rgba(148,163,184,.16);
  background:rgba(15,23,42,.72);
}
.simple-preview-header h4{margin:0;font-size:1.08rem;}
.simple-preview-header strong{font-size:.85rem;color:#c4b5fd;}
.prompt-template-form-simple .prompt-preview-content{
  padding:16px;
}
.prompt-template-form-simple .prompt-preview-body{
  max-height:360px;
  overflow:auto;
  white-space:pre-wrap;
}
@media (max-width: 1180px){
  .simple-template-grid{grid-template-columns:repeat(2, minmax(0, 1fr));}
}
@media (max-width: 760px){
  .simple-template-grid{grid-template-columns:1fr;}
  .simple-template-header,
  .simple-template-actions{flex-direction:column;align-items:stretch;}
  .simple-template-actions > div{flex-direction:column;align-items:stretch;}
  .simple-template-actions button{width:100%;}
}

/*
   Release v0.8.4 final corrective patch
   Simplified Prompt Studio editor: clean layout, clear fields and cache-safe release handling.
*/
.prompt-template-editor-panel{
  min-width:0;
}
.prompt-template-form-clean{
  display:flex;
  flex-direction:column;
  gap:22px;
  padding:22px;
  border-radius:18px;
  border:1px solid rgba(148,163,184,.18);
  background:linear-gradient(180deg,rgba(15,23,42,.88),rgba(2,6,23,.76));
}
.clean-editor-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  padding-bottom:18px;
  border-bottom:1px solid rgba(148,163,184,.16);
}
.clean-editor-header h4{
  margin:0 0 8px 0;
  font-size:1.35rem;
  letter-spacing:-.015em;
}
.clean-editor-header p{
  margin:0;
  max-width:820px;
  color:#cbd5e1;
  line-height:1.55;
}
.clean-editor-section{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.clean-editor-section h5,
.clean-section-title h5{
  margin:0;
  font-size:1.05rem;
  color:#f8fafc;
}
.clean-name-row{
  display:grid;
  grid-template-columns:minmax(260px,1fr) 180px;
  gap:16px;
  align-items:end;
}
.clean-meta-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(160px,1fr));
  gap:16px;
  align-items:end;
}
.prompt-template-form-clean label{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  color:#e5e7eb!important;
  font-weight:700!important;
  line-height:1.2;
}
.prompt-template-form-clean input,
.prompt-template-form-clean select,
.prompt-template-form-clean textarea{
  width:100%;
  min-height:46px;
  border:1px solid rgba(148,163,184,.24)!important;
  background:rgba(15,23,42,.9)!important;
  color:#f8fafc!important;
  border-radius:12px!important;
  padding:12px 14px!important;
  font-size:1rem!important;
  line-height:1.45!important;
  outline:none;
}
.prompt-template-form-clean input:focus,
.prompt-template-form-clean select:focus,
.prompt-template-form-clean textarea:focus{
  border-color:rgba(124,58,237,.78)!important;
  box-shadow:0 0 0 3px rgba(124,58,237,.18);
}
.clean-prompt-section textarea#promptTemplateText{
  min-height:320px;
  resize:vertical;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.clean-section-title{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-end;
}
.clean-section-title small{
  color:#cbd5e1;
  font-weight:600;
  text-align:right;
  max-width:520px;
}
.clean-section-title small.state-ok{color:#86efac;}
.clean-section-title small.state-warning{color:#fde68a;}
.clean-preview-details{
  border:1px solid rgba(148,163,184,.16);
  border-radius:14px;
  padding:14px 16px;
  background:rgba(15,23,42,.52);
}
.clean-preview-details summary{
  cursor:pointer;
  color:#c4b5fd;
  font-weight:800;
}
.clean-preview-details label{
  margin-top:14px;
}
.clean-preview-details textarea{
  min-height:86px;
}
.clean-preview-container{
  margin-top:0;
  overflow:hidden;
}
.clean-editor-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding-top:4px;
}
.clean-editor-actions > div{
  display:flex;
  align-items:center;
  gap:12px;
}
.prompt-editor-message{
  order:98;
}
.clean-editor-actions{
  order:99;
}
@media(max-width:1180px){
  .clean-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:760px){
  .clean-name-row,.clean-meta-grid{grid-template-columns:1fr;}
  .clean-editor-header,.clean-editor-actions,.clean-section-title{flex-direction:column;align-items:stretch;}
  .clean-section-title small{text-align:left;}
  .clean-editor-actions > div{flex-direction:column;align-items:stretch;}
  .clean-editor-actions button{width:100%;}
}

/* v0.9.1 - AIDA Analysis Workspace Foundation */
.brand h1 small{
  display:block;
  color:#cbd5e1;
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.02em;
  line-height:1.15;
}
.workspace-flow{
  margin-bottom:24px;
}
.workspace-step-card{
  border:1px solid rgba(148,163,184,.16);
  background:linear-gradient(135deg,rgba(15,23,42,.92),rgba(17,24,39,.72));
  border-radius:22px;
  padding:22px;
  box-shadow:0 18px 45px rgba(2,6,23,.24);
}
.step-heading{
  display:flex;
  gap:14px;
  align-items:flex-start;
  margin-bottom:18px;
}
.step-heading span{
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:linear-gradient(135deg,rgba(124,58,237,.9),rgba(6,182,212,.78));
  color:white;
  font-weight:900;
  box-shadow:0 12px 28px rgba(124,58,237,.26);
}
.step-heading h4{margin:0 0 4px;font-size:1.15rem;color:#f8fafc;}
.step-heading p{margin:0;color:#94a3b8;font-size:.98rem;line-height:1.45;}
.step-heading.compact{margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid rgba(148,163,184,.14);}
.analysis-profile-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.analysis-profile-card{
  border:1px solid rgba(148,163,184,.16);
  background:rgba(15,23,42,.64);
  color:#e5e7eb;
  border-radius:18px;
  padding:17px;
  text-align:left;
  display:grid;
  gap:7px;
  min-height:154px;
  cursor:pointer;
  transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
.analysis-profile-card:hover{
  transform:translateY(-2px);
  border-color:rgba(6,182,212,.55);
  background:rgba(15,23,42,.86);
  box-shadow:0 18px 38px rgba(6,182,212,.12);
}
.analysis-profile-card.selected{
  border-color:rgba(124,58,237,.82);
  background:linear-gradient(135deg,rgba(124,58,237,.24),rgba(6,182,212,.12));
  box-shadow:0 18px 44px rgba(124,58,237,.18);
}
.profile-icon{font-size:1.55rem;line-height:1;}
.analysis-profile-card strong{font-size:1.08rem;color:#fff;}
.analysis-profile-card small{font-size:.92rem;color:#cbd5e1;line-height:1.35;}
.analysis-profile-card em{font-style:normal;color:#93c5fd;font-size:.83rem;font-weight:800;margin-top:auto;}
.analysis-workspace-grid{align-items:start;}
@media(max-width:1180px){.analysis-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:760px){.analysis-profile-grid{grid-template-columns:1fr;}}

/* --------------------------------------------------------------------------
   Release v0.9.2 - Compare Documents Foundation
   Scope: first functional document-to-document comparison workflow.
---------------------------------------------------------------------------- */
.compare-grid{
  display:grid;
  grid-template-columns:minmax(460px,540px) 1fr;
  gap:24px;
  align-items:start;
}
.compare-card textarea#compareInstructions{
  min-height:160px;
  font-size:17px;
  line-height:1.6;
}
.compare-two-col{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.compare-result-card .markdown-output{
  max-height:74vh;
}
#compareRuntime{
  font-size:15px;
  padding:6px 11px;
  border-radius:999px;
  background:rgba(6,182,212,.12);
  border:1px solid rgba(6,182,212,.24);
  color:#9be8f5;
}
@media(max-width:1180px){
  .compare-grid{grid-template-columns:1fr;}
}
@media(max-width:760px){
  .compare-two-col{grid-template-columns:1fr;}
}

/* --------------------------------------------------------------------------
   Release v0.9.3 - Compare Documents Stabilisation
   Scope: fix selectable documents and redesign Compare layout for long names.
---------------------------------------------------------------------------- */
.compare-grid-v093{
  grid-template-columns:minmax(520px,660px) 1fr;
  gap:28px;
}
.compare-card-v093{
  max-width:660px;
}
.compare-document-status{
  margin:8px 0 10px;
  padding:10px 12px;
  border:1px solid rgba(6,182,212,.22);
  background:rgba(6,182,212,.07);
  border-radius:12px;
  color:#bae6fd;
  font-size:.92rem;
  line-height:1.35;
}
.compare-document-stack{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}
.compare-document-stack label{
  min-width:0;
}
.compare-document-stack select,
.compare-card-v093 input,
.compare-card-v093 textarea{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
.compare-document-stack select{
  min-height:44px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:1rem;
}
.compare-card-v093 textarea#compareInstructions{
  min-height:170px;
}
.compare-result-card{
  min-width:0;
}
.compare-result-card .markdown-output{
  overflow:auto;
}
@media(max-width:1180px){
  .compare-grid-v093{grid-template-columns:1fr;}
  .compare-card-v093{max-width:none;}
}

/* --------------------------------------------------------------------------
   Release v0.9.4 - Compare Types Foundation
   Scope: comparison type selector and clearer comparison guidance.
---------------------------------------------------------------------------- */
.compare-card-v093 label select#compareType{
  width:100%;
  min-height:46px;
  font-weight:700;
  border-color:rgba(124,58,237,.42);
  background:linear-gradient(135deg, rgba(124,58,237,.14), rgba(15,23,42,.88));
}
#compareTypeHint{
  display:block;
  margin-top:8px;
  padding:10px 12px;
  border:1px solid rgba(124,58,237,.25);
  background:rgba(124,58,237,.08);
  color:#ddd6fe;
  border-radius:12px;
  line-height:1.4;
}
.compare-result-card .markdown-output table th,
.compare-result-card .markdown-output table td{
  min-width:150px;
}

/* v0.9.5 — Professional Compare Report */
.compare-report{
  display:flex;
  flex-direction:column;
  gap:18px;
}
.compare-report-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:22px;
  border:1px solid rgba(148,163,184,.22);
  border-radius:22px;
  background:linear-gradient(135deg, rgba(15,23,42,.95), rgba(30,41,59,.74));
  box-shadow:0 24px 60px rgba(2,6,23,.24);
}
.compare-report-hero h3{
  margin:8px 0 8px;
  font-size:1.42rem;
  line-height:1.25;
  color:#f8fafc;
  overflow-wrap:anywhere;
}
.compare-report-hero h3 span{color:#38bdf8;font-weight:700;}
.compare-report-hero p{margin:0;color:#94a3b8;font-size:.98rem;}
.compare-report-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.compare-report-meta{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.compare-report-meta div{
  padding:14px 16px;
  border:1px solid rgba(148,163,184,.18);
  border-radius:16px;
  background:rgba(15,23,42,.76);
  min-width:0;
}
.compare-report-meta span{
  display:block;
  color:#94a3b8;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:6px;
}
.compare-report-meta strong{
  display:block;
  color:#e2e8f0;
  font-size:.98rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.compare-report-sections{display:flex;flex-direction:column;gap:12px;}
.compare-report-section{
  border:1px solid rgba(148,163,184,.18);
  border-radius:18px;
  background:rgba(15,23,42,.72);
  overflow:hidden;
}
.compare-report-section summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:15px 18px;
  cursor:pointer;
  color:#f8fafc;
  font-weight:700;
  list-style:none;
}
.compare-report-section summary::-webkit-details-marker{display:none;}
.compare-report-section summary::before{
  content:'▸';
  color:#38bdf8;
  transition:transform .18s ease;
}
.compare-report-section[open] summary::before{transform:rotate(90deg);}
.compare-report-section summary span{flex:1;}
.compare-report-section summary small{
  color:#94a3b8;
  font-weight:600;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.compare-section-body{
  border-top:1px solid rgba(148,163,184,.14);
  padding:18px;
}
.compare-section-body h2,
.compare-section-body h3{margin-top:0;}
.compare-report .md-table-wrap{max-width:100%;overflow-x:auto;}
.compare-report .md-table th{white-space:nowrap;min-width:150px;}
.compare-report .md-table td{min-width:150px;vertical-align:top;}
@media (max-width: 1100px){
  .compare-report-meta{grid-template-columns:repeat(2,minmax(0,1fr));}
  .compare-report-hero{flex-direction:column;}
  .compare-report-actions{justify-content:flex-start;}
}
@media (max-width: 720px){
  .compare-report-meta{grid-template-columns:1fr;}
}

/* v0.9.6 - Analysis History & Sessions */
.history-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px 180px auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 18px;
}
.history-toolbar input,
.history-toolbar select {
  width: 100%;
  min-height: 42px;
}
.toolbar-count {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
  text-align: right;
}
.history-table-card table {
  min-width: 1100px;
}
.history-prompt-cell {
  max-width: 340px;
  color: var(--text-muted, #a8b3c7);
  line-height: 1.45;
}
.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 250px;
}
.history-actions .small-btn {
  padding: 7px 10px;
  font-size: 0.82rem;
}
.danger-action {
  border-color: rgba(248, 113, 113, 0.35) !important;
  color: #fca5a5 !important;
}
.session-status {
  text-transform: capitalize;
}
.session-completed {
  border-color: rgba(34,197,94,.35);
  color: #86efac;
}
.session-failed {
  border-color: rgba(248,113,113,.35);
  color: #fca5a5;
}
.session-running {
  border-color: rgba(59,130,246,.35);
  color: #93c5fd;
}
.session-created {
  border-color: rgba(251,191,36,.35);
  color: #fde68a;
}
@media (max-width: 980px) {
  .history-toolbar {
    grid-template-columns: 1fr;
  }
  .toolbar-count {
    text-align: left;
  }
}

/* v0.9.7 Repository Refinement */
.repository-toolbar-v097{
  grid-template-columns:minmax(260px,1.4fr) 190px 160px 180px 110px;
  align-items:center;
}
.repository-mini-stats{
  grid-template-columns:repeat(7,minmax(0,1fr));
}
.repo-metric-stack{display:flex;flex-direction:column;gap:4px;min-width:130px;}
.repo-metric-stack span{font-weight:800;color:#e5e7eb;}
.repo-metric-stack small{color:#94a3b8;font-size:12px;line-height:1.25;}
.repo-actions{flex-wrap:wrap;min-width:230px;}
.repo-actions .small-btn{white-space:nowrap;}
.repository-table-card{overflow:auto;}
.repository-table-card th:last-child,.repository-table-card td:last-child{min-width:240px;}
.repository-table-card th:nth-child(4),.repository-table-card td:nth-child(4){min-width:150px;}
.repository-table-card th:nth-child(6),.repository-table-card td:nth-child(6){min-width:170px;}
@media(max-width:1320px){.repository-toolbar-v097{grid-template-columns:1fr 1fr 1fr}.repository-mini-stats{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:820px){.repository-toolbar-v097{grid-template-columns:1fr}.repository-mini-stats{grid-template-columns:1fr;}}


/* v0.9.8 - Performance & Stability */
.error-card.compact {
  margin: 0;
  padding: 14px;
  gap: 12px;
}
.error-card.compact p {
  margin: 4px 0 0;
}
button:disabled, .primary-btn:disabled, .ghost-btn:disabled, .small-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.view [aria-busy="true"] {
  pointer-events: none;
}


/* AIDA v1.0.1 Performance UX */
.performance-panel{margin:18px 0;padding:16px;border:1px solid rgba(6,182,212,.22);border-radius:16px;background:linear-gradient(180deg,rgba(8,20,38,.92),rgba(8,13,28,.92));box-shadow:0 16px 40px rgba(0,0,0,.22);}
.performance-panel summary{cursor:pointer;font-weight:800;color:#e5eefc;display:flex;align-items:center;justify-content:space-between;gap:12px;}
.perf-badge{font-size:12px;padding:5px 10px;border-radius:999px;border:1px solid rgba(148,163,184,.25);background:rgba(148,163,184,.12);color:#cbd5e1;}
.perf-badge.good{border-color:rgba(34,197,94,.35);background:rgba(34,197,94,.12);color:#86efac;}
.perf-badge.warn{border-color:rgba(245,158,11,.38);background:rgba(245,158,11,.12);color:#fcd34d;}
.perf-badge.bad{border-color:rgba(248,113,113,.42);background:rgba(248,113,113,.12);color:#fca5a5;}
.performance-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px;}
.performance-grid div{border:1px solid rgba(148,163,184,.15);border-radius:12px;padding:10px 12px;background:rgba(15,23,42,.55);}
.performance-grid span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#94a3b8;margin-bottom:4px;}
.performance-grid strong{font-size:14px;color:#e2e8f0;}
@media(max-width:900px){.performance-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}

/* =========================================================
   AI Analysis — simplified workflow and prompt preview
   ========================================================= */

.analysis-prompt-preview-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(139, 92, 246, 0.38);
  border-radius: 18px;
  background:
    linear-gradient(
      180deg,
      rgba(30, 41, 59, 0.82),
      rgba(15, 23, 42, 0.72)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 42px rgba(2, 6, 23, 0.22);
}

.prompt-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.prompt-preview-header h4 {
  margin: 0 0 6px;
  color: #f8fafc;
  font-size: 20px;
}

.prompt-preview-header p {
  margin: 0;
  color: #aebed1;
  font-size: 14px;
  line-height: 1.55;
}

.prompt-preview-status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid rgba(34, 197, 94, 0.38);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.prompt-preview-status.edited {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.analysis-card textarea.prompt-preview-editor {
  min-height: 280px;
  padding: 16px;
  border: 1px solid rgba(139, 92, 246, 0.42);
  border-radius: 15px;
  background: rgba(2, 6, 23, 0.72);
  color: #e2e8f0;
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 14px;
  line-height: 1.65;
  resize: vertical;
  tab-size: 2;
}

.analysis-card textarea.prompt-preview-editor:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.9);
  box-shadow:
    0 0 0 3px rgba(139, 92, 246, 0.14),
    0 0 24px rgba(139, 92, 246, 0.12);
}

.prompt-preview-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.prompt-preview-footer > span {
  color: #93a4b8;
  font-size: 13px;
  font-weight: 650;
}

.prompt-preview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.secondary-btn {
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 11px;
  padding: 9px 13px;
  background: rgba(15, 23, 42, 0.8);
  color: #ddd6fe;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.secondary-btn:hover {
  border-color: rgba(167, 139, 250, 0.85);
  background: rgba(91, 33, 182, 0.26);
  transform: translateY(-1px);
}

.secondary-btn:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.disabled-field {
  opacity: 0.52;
}

.disabled-field select {
  cursor: not-allowed;
}

.disabled-field small {
  color: #94a3b8;
}

#analysisQueryLabel {
  color: #dbe7f5;
  font-weight: 700;
}

#analysisDocumentGuidance {
  display: block;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .prompt-preview-panel {
    padding: 15px;
  }

  .prompt-preview-header {
    flex-direction: column;
  }

  .prompt-preview-status {
    align-self: flex-start;
  }

  .prompt-preview-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .prompt-preview-actions {
    justify-content: stretch;
  }

  .prompt-preview-actions .secondary-btn {
    flex: 1;
  }

  .analysis-card textarea.prompt-preview-editor {
    min-height: 240px;
    font-size: 13px;
  }
}


/* AI Analysis mode selector */
.analysis-mode-panel {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .86), rgba(10, 15, 28, .76));
}
.analysis-mode-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.analysis-mode-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  align-items: center;
  width: 100%;
  padding: 18px;
  text-align: left;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, .68);
  cursor: pointer;
}
.analysis-mode-card .profile-icon { grid-row: 1 / 3; font-size: 28px; }
.analysis-mode-card strong { font-size: 17px; }
.analysis-mode-card small { color: var(--muted); line-height: 1.45; }
.analysis-mode-card:hover,
.analysis-mode-card.selected {
  border-color: rgba(139, 92, 246, .8);
  background: linear-gradient(135deg, rgba(124, 58, 237, .25), rgba(37, 99, 235, .12));
  box-shadow: 0 0 0 2px rgba(139, 92, 246, .08);
}
.analysis-prompt-preview-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(139, 92, 246, .38);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(30, 41, 59, .82), rgba(15, 23, 42, .72));
}
@media (max-width: 760px) {
  .analysis-mode-selector { grid-template-columns: 1fr; }
  .analysis-prompt-preview-panel { padding: 15px; }
}
