/* ===== PV Copilot — new liquid-glass UI, scoped under .pvcopilot-root ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* keep the pvtools site chrome (header logos row + gaps) white; the page paints
   its own gradient only on .pvcopilot-root */
html, body { background: #ffffff !important; }

.pvcopilot-root { --pvc-advanced-step-max-height:calc(100vh - 220px); position: relative; overflow: hidden; margin-top: -22px; margin-bottom: -54px; font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; color: #1c2540; font-size: 15px; line-height: 1.5;
  background:linear-gradient(125deg,#d7efff 0%,#edf7ff 34%,#fff9e7 68%,#ffe8b5 100%); }
.pvcopilot-root, .pvcopilot-root * { font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
.pvcopilot-root [style*="monospace"], .pvcopilot-root pre, .pvcopilot-root code { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* Soft blue/yellow atmospheric light over the page gradient. */
.pvcopilot-root::before { content:""; position:absolute; top:0; right:0; bottom:auto; left:0;
  height:max(calc(var(--pvc-advanced-step-max-height) + 700px), 100vh); z-index:0; pointer-events:none;
  background:
    radial-gradient(circle at 10% 78%,rgba(74,190,255,.34) 0,rgba(111,205,255,.16) 28%,transparent 52%),
    radial-gradient(circle at 72% 8%,rgba(255,207,100,.40) 0,rgba(255,226,157,.18) 30%,transparent 55%),
    radial-gradient(circle at 96% 52%,rgba(255,238,187,.30) 0,transparent 42%);
  filter:blur(18px); opacity:.96; }
.pvcopilot-root::after  { content:""; position: absolute; inset:0; z-index:0; pointer-events:none;
  background:linear-gradient(145deg,rgba(255,255,255,.18),rgba(255,255,255,.04) 46%,rgba(255,252,241,.16)); }
.pvcopilot-root > * { position: relative; z-index: 1; }

.pvcopilot-root a { color: #2f6bff; text-decoration: none; }
.pvcopilot-root ::selection { background: rgba(79,139,255,0.25); }
.pvcopilot-root ::-webkit-scrollbar { width: 10px; height: 10px; }
.pvcopilot-root ::-webkit-scrollbar-thumb { background: rgba(120,140,180,0.4); border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
.pvcopilot-root button { font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
.pvcopilot-root input:focus-visible, .pvcopilot-root button:focus-visible { outline: 2px solid #4f8bff; outline-offset: 2px; }

.pvcopilot-shell { position: relative; z-index: 1; max-width: 1320px; margin: 0 auto; padding: 26px 16px 30px;
  min-height: calc(100vh - 210px); display: flex; flex-direction: column; justify-content: center; }

/* glass surfaces */
.pvcopilot-root .glass {
  background: linear-gradient(135deg, rgba(255,255,255,0.66), rgba(255,255,255,0.44));
  backdrop-filter: blur(30px) saturate(1.5); -webkit-backdrop-filter: blur(30px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.72);
  box-shadow: 0 14px 44px rgba(30,58,120,0.11), inset 0 1px 0 rgba(255,255,255,0.6);
  border-radius: 28px;
}
.pvcopilot-root .glass-soft { background: rgba(255,255,255,0.42); border: 1px solid rgba(255,255,255,0.7); border-radius: 24px; }

/* nav */
.pvcopilot-root .nav { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:4px; }
.pvcopilot-root .pvc-brand-wordmark {
  flex:0 0 auto;
  color:#080b12;
  font-family:Archivo,system-ui,sans-serif;
  font-size:34px;
  line-height:1;
  font-weight:900;
  letter-spacing:-.045em;
}
.pvcopilot-root .nav-pills {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:nowrap;
  gap:0;
  padding:6px;
  border:1px solid rgba(255,255,255,.86);
  border-radius:28px;
  background:linear-gradient(135deg,rgba(255,255,255,.82),rgba(255,255,255,.64));
  box-shadow:0 12px 30px rgba(30,58,120,.10),inset 0 1px 0 rgba(255,255,255,.76);
  backdrop-filter:blur(26px) saturate(1.35);
  -webkit-backdrop-filter:blur(26px) saturate(1.35);
}
.pvcopilot-root .nav-pills .nav-pill {
  appearance:none;
  padding:10px 18px;
  border:0;
  border-radius:20px;
  background:transparent;
  color:#374466;
  font-family:inherit;
  font-size:14px;
  line-height:1.2;
  font-weight:700;
  cursor:pointer;
  box-shadow:none;
  transition:color .16s ease,background .16s ease,box-shadow .16s ease;
}
.pvcopilot-root .nav-pills .nav-pill:hover {
  color:#1c2540;
  transform:none;
  background:rgba(255,255,255,.72);
  box-shadow:0 5px 14px rgba(30,58,120,.08);
}
.pvcopilot-root .nav-pill.active { color: #2f6bff; }

/* buttons */
.pvcopilot-root .pvc-primary-action {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px !important;
  padding:13px 28px !important;
  border:0 !important;
  border-radius:999px !important;
  background:linear-gradient(135deg,#4b8bff,#2f6bff) !important;
  color:#ffffff !important;
  font-family:Archivo,system-ui,sans-serif !important;
  font-size:15px !important;
  line-height:1.2 !important;
  font-weight:850 !important;
  letter-spacing:-.02em !important;
  text-align:center !important;
  cursor:pointer;
  box-shadow:0 10px 26px rgba(47,107,255,.28) !important;
}
.pvcopilot-root .pvc-primary-action:hover:not(:disabled) {
  transform:translateY(-1px);
  filter:brightness(1.035);
  box-shadow:0 13px 30px rgba(47,107,255,.34) !important;
}
.pvcopilot-root .pvc-primary-action:disabled {
  color:#ffffff !important;
  opacity:.58;
  cursor:not-allowed;
}
.pvcopilot-root .btn-primary, .pvcopilot-root .btn-run {
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 22px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, #4b8bff, #2f6bff); color: #fff; font-weight: 700; font-size: 14.5px;
  cursor: pointer; box-shadow: 0 10px 26px rgba(47,107,255,0.34); }
.pvcopilot-root .btn-primary:hover, .pvcopilot-root .btn-run:hover { filter: brightness(1.05); }
.pvcopilot-root .btn-run:disabled { filter: grayscale(0.4) opacity(0.6); cursor: not-allowed; box-shadow: none; }

/* animations */
@keyframes pvc-riseIn { from { opacity: 0; transform: translateY(16px);} to { opacity: 1; transform: translateY(0);} }
@keyframes pvc-slideIn { from { opacity: 0; transform: translateX(40px);} to { opacity: 1; transform: translateX(0);} }
@keyframes pvc-pulseDot { 0%,100% { opacity: .35;} 50% { opacity: 1;} }
.pvcopilot-root .rise { animation: pvc-riseIn .45s ease both; }

/* identified-variable mapping chips */
.pvcopilot-root .varmap-chip { display:flex; align-items:center; gap:10px; padding:11px 14px; border-radius:13px; background: rgba(255,255,255,0.58); border: 1px solid rgba(255,255,255,0.7); }
.pvcopilot-root .pill { font-size:10.5px; font-weight:600; line-height:1; border-radius:980px; padding:3px 8px; white-space:nowrap; }
.pvcopilot-root .pill-note { color:#57606a; background:#f1f3f5; border:1px solid #d7dce0; }
.pvcopilot-root .pill-warn { color:#8a6d00; background:#fff6e0; border:1px solid #f0dfa8; }

/* plotly transparent */
.pvcopilot-root .js-plotly-plot, .pvcopilot-root .plot-container { background: transparent !important; }

/* number inputs */
.pvcopilot-root input.pnum::-webkit-outer-spin-button, .pvcopilot-root input.pnum::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pvcopilot-root input.pnum { -moz-appearance: textfield; appearance: textfield; }

/* hide dash undo/redo + legacy page title */
.pvcopilot-root ._dash-undo-redo { display: none; }
.pvcopilot-root .page-title { display: none; }

/* dmc.Select group ("category") titles — the dropdown renders in a body portal,
   so this is intentionally NOT scoped under .pvcopilot-root */
.pvcopilot-var-group { color:#2f6bff !important; font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif !important; font-weight:700 !important; letter-spacing:0.02em; }

/* AI diagnosis markdown */
.pvcopilot-root .pvc-md p { margin: 0 0 8px; }
.pvcopilot-root .pvc-md ul { margin: 4px 0 8px; padding-left: 20px; }
.pvcopilot-root .pvc-md li { margin: 2px 0; }
.pvcopilot-root .pvc-md strong { color: #1c2540; font-weight: 700; }
.pvcopilot-root .pvc-md code { background: rgba(120,140,180,0.15); padding: 1px 5px; border-radius: 5px; }

/* nav pop-up modal */
.pvcopilot-root .pvc-modal-overlay { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center;
  justify-content: center; padding: 40px 20px; background: rgba(20,30,55,0.34); backdrop-filter: blur(6px); animation: pvc-riseIn .25s ease both; }
.pvcopilot-root .pvc-modal { position: relative; width: 100%; max-width: 720px; max-height: calc(100vh - 90px); overflow-y: auto;
  border-radius: 24px; padding: 26px 30px 28px;
  background: linear-gradient(150deg, rgba(255,255,255,0.96), rgba(244,248,255,0.94));
  border: 1px solid rgba(255,255,255,0.9); box-shadow: 0 30px 80px rgba(30,58,120,0.3); }
.pvcopilot-root .pvc-modal-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border: none;
  border-radius: 12px; background: rgba(120,140,180,0.14); color: #455172; font-size: 16px; cursor: pointer; }
.pvcopilot-root .pvc-modal-close:hover { background: rgba(120,140,180,0.24); }

/* Team modal */
.pvcopilot-root .pvc-team-modal { max-width:860px; }
.pvcopilot-root .pvc-team-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.pvcopilot-root .pvc-team-card { min-width:0; padding:18px 14px 17px; border-radius:20px; overflow:hidden;
  transition:transform .2s ease,box-shadow .2s ease,background .2s ease; }
.pvcopilot-root .pvc-team-photo { display:block; width:min(100%,150px); aspect-ratio:1 / 1; margin:0 auto; object-fit:cover; border-radius:15px;
  border:1px solid rgba(255,255,255,0.82); box-shadow:0 9px 24px rgba(30,58,120,0.12);
  transition:transform .28s cubic-bezier(.2,.7,.2,1),box-shadow .28s ease; }
.pvcopilot-root .pvc-team-card:hover { transform:translateY(-3px); box-shadow:0 19px 48px rgba(30,58,120,0.16),inset 0 1px 0 rgba(255,255,255,0.68); }
.pvcopilot-root .pvc-team-card:hover .pvc-team-photo { transform:scale(1.08); box-shadow:0 14px 30px rgba(30,58,120,0.18); }
.pvcopilot-root .pvc-team-copy { padding:14px 4px 0; text-align:center; }
.pvcopilot-root .pvc-team-name { color:#1c2540; font-size:16px; line-height:1.25; font-weight:800; }
.pvcopilot-root .pvc-team-role { min-height:38px; margin-top:5px; color:#2f6bff; font-size:12.5px; line-height:1.45; font-weight:700; }
.pvcopilot-root .pvc-team-org { margin-top:8px; color:#71809e; font-size:10.5px; line-height:1.4; }
@media (max-width:680px) {
  .pvcopilot-root .pvc-team-grid { grid-template-columns:1fr; }
  .pvcopilot-root .pvc-team-card { display:grid; grid-template-columns:110px minmax(0,1fr); gap:14px; align-items:center; }
  .pvcopilot-root .pvc-team-photo { width:100%; }
  .pvcopilot-root .pvc-team-copy { padding:0; text-align:left; }
  .pvcopilot-root .pvc-team-role { min-height:0; }
}

/* Live pipeline monitor */
.pvcopilot-root .pvc-monitor { position:fixed; left:24px; bottom:24px; z-index:42; }
.pvcopilot-root .pvc-monitor-toggle { display:flex; align-items:center; gap:9px; padding:11px 15px; border-radius:14px;
  color:#263454; background:rgba(255,255,255,0.82); backdrop-filter:blur(22px) saturate(1.3);
  -webkit-backdrop-filter:blur(22px) saturate(1.3); border:1px solid rgba(255,255,255,0.9);
  box-shadow:0 12px 34px rgba(30,58,120,0.18); font-size:12.5px; font-weight:750; cursor:pointer; }
.pvcopilot-root .pvc-monitor-dot { width:9px; height:9px; border-radius:50%; background:#9aa7bd; box-shadow:0 0 0 4px rgba(154,167,189,0.14); }
.pvcopilot-root .pvc-monitor-dot.is-running { background:#2f6bff; box-shadow:0 0 0 4px rgba(47,107,255,0.16); animation:pvc-pulseDot 1.1s ease-in-out infinite; }
.pvcopilot-root .pvc-monitor-dot.is-done { background:#18a36f; box-shadow:0 0 0 4px rgba(24,163,111,0.14); }
.pvcopilot-root .pvc-monitor-dot.is-error { background:#cf3f4d; box-shadow:0 0 0 4px rgba(207,63,77,0.14); }
.pvcopilot-root .pvc-monitor-panel { display:none; position:absolute; left:0; bottom:52px; width:min(560px,calc(100vw - 48px));
  height:min(500px,calc(100vh - 150px)); min-width:340px; min-height:240px;
  max-width:calc(100vw - 16px); max-height:calc(100vh - 90px); overflow:hidden; resize:none; box-sizing:border-box; border-radius:22px;
  background:linear-gradient(150deg,rgba(255,255,255,0.94),rgba(240,247,255,0.88));
  backdrop-filter:blur(30px) saturate(1.35); -webkit-backdrop-filter:blur(30px) saturate(1.35);
  border:1px solid rgba(255,255,255,0.92); box-shadow:0 28px 76px rgba(30,58,120,0.27); }
.pvcopilot-root .pvc-monitor-panel.is-open { display:flex; flex-direction:column; animation:pvc-riseIn .2s ease both; }
.pvcopilot-root .pvc-monitor-resize-grip { position:absolute; right:5px; bottom:5px; width:25px; height:25px;
  z-index:4; cursor:nwse-resize; border-radius:8px; touch-action:none; background:rgba(255,255,255,0.34); }
.pvcopilot-root .pvc-monitor-resize-grip::before,.pvcopilot-root .pvc-monitor-resize-grip::after {
  content:''; position:absolute; right:5px; bottom:6px; height:2px; border-radius:2px; background:#8291ad; transform:rotate(-45deg); transform-origin:right center; }
.pvcopilot-root .pvc-monitor-resize-grip::before { width:15px; }
.pvcopilot-root .pvc-monitor-resize-grip::after { width:9px; right:5px; bottom:11px; }
.pvcopilot-root .pvc-monitor-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:17px 18px 14px;
  border-bottom:1px solid rgba(120,140,180,0.17); cursor:grab; user-select:none; touch-action:none; }
.pvcopilot-root .pvc-monitor-head:active { cursor:grabbing; }
.pvcopilot-root .pvc-monitor-titleline { display:flex; align-items:center; gap:9px; }
.pvcopilot-root .pvc-monitor-title { color:#1c2540; font-size:15px; font-weight:800; }
.pvcopilot-root .pvc-monitor-move-hint { display:inline-flex; align-items:center; padding:3px 7px; border-radius:980px;
  color:#637391; background:rgba(120,140,180,0.11); font-size:8.5px; line-height:1; font-weight:750;
  letter-spacing:.03em; cursor:move; pointer-events:none; }
.pvcopilot-root .pvc-monitor-subtitle { margin-top:2px; color:#7b89a5; font-size:10.5px; }
.pvcopilot-root .pvc-monitor-close { width:31px; height:31px; padding:0; border:0; border-radius:10px; color:#53617e;
  background:rgba(120,140,180,0.12); font-size:20px; line-height:29px; cursor:pointer; }
.pvcopilot-root .pvc-monitor-actions { display:flex; align-items:center; gap:7px; }
.pvcopilot-root .pvc-monitor-copy { height:31px; padding:0 11px; border:0; border-radius:10px; color:#415274;
  background:rgba(120,140,180,0.12); font-size:10.5px; font-weight:750; cursor:pointer; }
.pvcopilot-root .pvc-monitor-copy:hover,.pvcopilot-root .pvc-monitor-minimize:hover,.pvcopilot-root .pvc-monitor-close:hover {
  color:#2f6bff; background:rgba(47,107,255,0.11); }
.pvcopilot-root .pvc-monitor-minimize { width:31px; height:31px; padding:0; border:0; border-radius:10px; color:#53617e;
  background:rgba(120,140,180,0.12); font-size:20px; line-height:27px; cursor:pointer; }
.pvcopilot-root .pvc-monitor-body { flex:1; min-height:0; display:flex; flex-direction:column; overflow-y:auto; padding:10px 12px 12px; }
.pvcopilot-root .pvc-monitor-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.pvcopilot-root .pvc-monitor-idle-summary { grid-column:1/-1; padding:10px 12px; border-radius:12px;
  color:#71809e; background:rgba(255,255,255,0.48); border:1px solid rgba(255,255,255,0.78); font-size:11.5px; }
.pvcopilot-root .pvc-monitor-row { padding:10px 11px; margin-bottom:7px; border-radius:13px; background:rgba(255,255,255,0.58);
  border:1px solid rgba(255,255,255,0.82); }
.pvcopilot-root .pvc-monitor-rowtop { display:flex; align-items:center; gap:8px; }
.pvcopilot-root .pvc-monitor-statusdot { width:8px; height:8px; flex:0 0 auto; border-radius:50%; background:#9aa7bd; }
.pvcopilot-root .pvc-monitor-row.is-running .pvc-monitor-statusdot { background:#2f6bff; animation:pvc-pulseDot 1.1s ease-in-out infinite; }
.pvcopilot-root .pvc-monitor-row.is-done .pvc-monitor-statusdot { background:#18a36f; }
.pvcopilot-root .pvc-monitor-row.is-error .pvc-monitor-statusdot { background:#cf3f4d; }
.pvcopilot-root .pvc-monitor-row.is-locked { opacity:.62; }
.pvcopilot-root .pvc-monitor-label { flex:1; color:#263454; font-size:12px; font-weight:750; }
.pvcopilot-root .pvc-monitor-badge { padding:3px 6px; border-radius:980px; color:#71809e; background:rgba(120,140,180,0.1);
  font-size:8.5px; line-height:1; font-weight:800; letter-spacing:.05em; }
.pvcopilot-root .pvc-monitor-row.is-running .pvc-monitor-badge { color:#2f6bff; background:rgba(47,107,255,0.1); }
.pvcopilot-root .pvc-monitor-row.is-done .pvc-monitor-badge { color:#15835e; background:rgba(24,163,111,0.1); }
.pvcopilot-root .pvc-monitor-row.is-error .pvc-monitor-badge { color:#b52f3d; background:rgba(207,63,77,0.1); }
.pvcopilot-root .pvc-monitor-message { margin:5px 0 0 16px; color:#657391; font-size:10.8px; line-height:1.4; }
.pvcopilot-root .pvc-monitor-track { height:4px; margin:8px 0 0 16px; overflow:hidden; border-radius:99px; background:rgba(120,140,180,0.15); }
.pvcopilot-root .pvc-monitor-fill { height:100%; border-radius:inherit; background:linear-gradient(90deg,#5b96ff,#2f6bff); transition:width .25s ease; }
.pvcopilot-root .pvc-monitor-meta { margin:5px 0 0 16px; color:#8a97b0; font-family:'JetBrains Mono',monospace !important; font-size:8.8px; line-height:1.35; }
.pvcopilot-root .pvc-monitor-error { margin:6px 0 0 16px; color:#b52f3d; font-size:9.5px; line-height:1.4; overflow-wrap:anywhere; }
.pvcopilot-root .pvc-monitor-warning { margin:2px 0 9px; padding:11px 12px; border-radius:13px; color:#8e2632;
  background:rgba(207,63,77,0.1); border:1px solid rgba(207,63,77,0.2); font-size:10.5px; line-height:1.45; }
.pvcopilot-root .pvc-monitor-warning b { display:block; margin-bottom:3px; }
.pvcopilot-root .pvc-monitor-warning code { display:block; margin-top:5px; color:#8e2632; background:rgba(255,255,255,0.48);
  padding:5px 6px; border-radius:7px; font-size:8.5px; white-space:normal; overflow-wrap:anywhere; }
.pvcopilot-root .pvc-monitor-footer { padding:6px 3px 2px; color:#94a0b6; text-align:center; font-family:'JetBrains Mono',monospace !important; font-size:8.5px; }
.pvcopilot-root .pvc-log-section { flex:1; min-height:0; display:flex; flex-direction:column; margin-top:12px; padding-top:11px; border-top:1px solid rgba(120,140,180,0.2); }
.pvcopilot-root .pvc-log-heading { display:flex; justify-content:space-between; align-items:center; padding:0 3px 7px;
  color:#64728f; font-size:9px; line-height:1; font-weight:800; letter-spacing:.08em; }
.pvcopilot-root .pvc-log-heading-actions { display:flex; align-items:center; gap:7px; color:#95a1b7; font-weight:600; letter-spacing:0; }
.pvcopilot-root .pvc-log-latest { padding:4px 7px; border:1px solid rgba(120,140,180,.18); border-radius:8px;
  color:#5e7094; background:rgba(255,255,255,.62); font:inherit; font-weight:750; cursor:pointer; letter-spacing:0; }
.pvcopilot-root .pvc-log-latest:hover { color:#2f6bff; background:rgba(47,107,255,.09); }
.pvcopilot-root .pvc-log-console { flex:1; min-height:160px; overflow:auto; padding:10px 11px; border-radius:12px;
  background:rgba(18,28,50,0.94); border:1px solid rgba(255,255,255,0.16);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.05); scroll-behavior:auto; overscroll-behavior:contain;
  scrollbar-gutter:stable; touch-action:pan-y; }
.pvcopilot-root .pvc-log-line { position:relative; padding:4px 0 5px 12px; color:#c8d5ed;
  font-family:'JetBrains Mono',monospace !important; font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.pvcopilot-root .pvc-log-line::before { content:''; position:absolute; left:0; top:7px; width:5px; height:5px;
  border-radius:50%; background:#71809e; }
.pvcopilot-root .pvc-log-line.is-running::before { background:#6da2ff; }
.pvcopilot-root .pvc-log-line.is-done::before { background:#43c894; }
.pvcopilot-root .pvc-log-line.is-error::before { background:#ff7180; }
.pvcopilot-root .pvc-log-meta { display:inline-block; min-width:245px; margin-right:9px; color:#8fa0c0; }
.pvcopilot-root .pvc-log-message { color:#d8e2f4; }
.pvcopilot-root .pvc-log-line.is-error .pvc-log-message { color:#ff9aa5; }
.pvcopilot-root .pvc-log-detail { margin:5px 0 3px; padding:7px 8px; max-height:130px; overflow:auto; white-space:pre-wrap;
  border-radius:8px; color:#ffc0c7; background:rgba(207,63,77,0.12); font:inherit; }
.pvcopilot-root .pvc-log-empty { color:#8291ad; font-family:'JetBrains Mono',monospace !important; font-size:9px; }
@media (max-width:620px) {
  .pvcopilot-root .pvc-monitor { left:14px; bottom:14px; }
  .pvcopilot-root .pvc-monitor-panel { width:calc(100vw - 28px); min-width:280px; }
  .pvcopilot-root .pvc-monitor-grid { grid-template-columns:1fr; }
}

/* Data requirements: three signal tiers first, then one compact file checklist. */
.pvcopilot-root .pvc-datareq-modal { max-width:1120px; padding:30px 32px 28px;
  background:linear-gradient(150deg,rgba(255,255,255,0.92),rgba(248,251,255,0.84));
  backdrop-filter:blur(26px) saturate(1.24); -webkit-backdrop-filter:blur(26px) saturate(1.24);
  border:1px solid rgba(255,255,255,0.78); box-shadow:0 30px 80px rgba(30,58,120,0.24),inset 0 1px 0 rgba(255,255,255,0.64); }
.pvcopilot-root .pvc-datareq-section { margin-bottom:18px; }
.pvcopilot-root .pvc-datareq-section-head { display:flex; align-items:baseline; gap:12px; margin:0 2px 10px; }
.pvcopilot-root .pvc-datareq-section-title { flex:0 0 auto; color:#1c2540; font-size:14px; font-weight:800; }
.pvcopilot-root .pvc-datareq-section-description { color:#71809e; font-size:11.5px; line-height:1.4; }
.pvcopilot-root .pvc-datareq-signal-surface { padding:16px; border-radius:20px;
  background:linear-gradient(135deg,rgba(79,139,255,0.13),rgba(210,229,255,0.22) 48%,rgba(255,228,169,0.14));
  border:1px solid rgba(255,255,255,0.82); box-shadow:0 14px 34px rgba(30,58,120,0.09),inset 0 1px 0 rgba(255,255,255,0.68); }
.pvcopilot-root .pvc-datareq-grid { display:grid; grid-template-columns:minmax(0,1fr) 26px minmax(0,1fr) 26px minmax(0,1fr);
  gap:8px; align-items:stretch; }
.pvcopilot-root .pvc-datareq-card { position: relative; min-width: 0; padding: 17px 17px 16px; border-radius: 18px;
  overflow:hidden; background:linear-gradient(135deg,rgba(255,255,255,0.76),rgba(248,251,255,0.56));
  backdrop-filter:blur(18px) saturate(1.22); -webkit-backdrop-filter:blur(18px) saturate(1.22);
  border:1px solid rgba(255,255,255,0.88); box-shadow:0 10px 24px rgba(30,58,120,0.075),inset 0 1px 0 rgba(255,255,255,0.7); }
.pvcopilot-root .pvc-datareq-plus { display:flex; align-items:center; justify-content:center; align-self:center; width:26px; height:26px;
  border-radius:50%; color:#7183a8; background:rgba(255,255,255,0.72); border:1px solid rgba(160,181,218,0.42);
  font-size:18px; line-height:1; font-weight:500; }
.pvcopilot-root .pvc-datareq-card-head { display:flex; align-items:center; justify-content:flex-start; gap:8px; margin-bottom:13px; }
.pvcopilot-root .pvc-datareq-level { padding:4px 8px; border-radius:980px; color:var(--req-accent); background:var(--req-tint);
  font-size:9.5px; line-height:1; font-weight:800; letter-spacing:.045em; white-space:nowrap; }
.pvcopilot-root .pvc-datareq-title { margin-bottom:10px; color:#1c2540; font-size:15px; line-height:1.25; font-weight:800; }
.pvcopilot-root .pvc-datareq-fields { display:flex; flex-wrap:wrap; gap:6px; min-height:29px; margin-bottom:11px; }
.pvcopilot-root .pvc-datareq-field { padding:5px 9px; border-radius:9px; color:#4f5f80; background:rgba(255,255,255,0.82);
  border:1px solid rgba(160,181,218,0.46); font-size:11.5px; line-height:1.2; font-weight:700; }
.pvcopilot-root .pvc-datareq-description { margin:0; color:#5a6784; font-size:11.8px; line-height:1.48; }
.pvcopilot-root .pvc-datareq-file { padding:16px 18px 17px; border-radius:18px;
  background:linear-gradient(135deg,rgba(79,139,255,0.12),rgba(215,232,255,0.24) 55%,rgba(255,255,255,0.22));
  border:1px solid rgba(255,255,255,0.82); box-shadow:0 14px 34px rgba(30,58,120,0.085),inset 0 1px 0 rgba(255,255,255,0.68); }
.pvcopilot-root .pvc-datareq-file-head { display:flex; align-items:baseline; gap:12px; margin-bottom:13px; }
.pvcopilot-root .pvc-datareq-file-kicker { color:#2f6bff; font-size:10px; font-weight:800; letter-spacing:.08em; white-space:nowrap; }
.pvcopilot-root .pvc-datareq-file-title { color:#1c2540; font-size:13.5px; font-weight:750; }
.pvcopilot-root .pvc-datareq-check-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.pvcopilot-root .pvc-datareq-check { min-width:0; padding:10px 12px; border-radius:12px; background:rgba(255,255,255,0.68);
  backdrop-filter:blur(16px) saturate(1.18); -webkit-backdrop-filter:blur(16px) saturate(1.18);
  border:1px solid rgba(255,255,255,0.88); box-shadow:0 7px 18px rgba(30,58,120,0.055),inset 0 1px 0 rgba(255,255,255,0.66); }
.pvcopilot-root .pvc-datareq-check-label { margin-bottom:3px; color:#6c7ea8; font-size:9.5px; font-weight:800; letter-spacing:.07em; }
.pvcopilot-root .pvc-datareq-check-value { color:#1c2540; font-size:13px; line-height:1.25; font-weight:800; }
.pvcopilot-root .pvc-datareq-check-note { margin-top:3px; color:#8090ad; font-size:10.5px; line-height:1.3; }
.pvcopilot-root .pvc-datareq-note { display:flex; align-items:flex-start; gap:9px; margin-top:12px; padding:0 3px;
  color:#5a6784; font-size:11.5px; line-height:1.45; }
.pvcopilot-root .pvc-datareq-note-icon { flex:0 0 auto; color:#2f6bff; font-size:14px; line-height:1.2; }
@media (max-width:760px) {
  .pvcopilot-root .pvc-datareq-modal { padding:24px 20px 22px; }
  .pvcopilot-root .pvc-datareq-signal-surface { padding:12px; }
  .pvcopilot-root .pvc-datareq-grid { grid-template-columns:1fr; }
  .pvcopilot-root .pvc-datareq-plus { margin:0 auto; }
  .pvcopilot-root .pvc-datareq-section-head { display:block; }
  .pvcopilot-root .pvc-datareq-section-description { margin-top:3px; }
  .pvcopilot-root .pvc-datareq-check-grid { grid-template-columns:1fr; }
  .pvcopilot-root .pvc-datareq-file-head { display:block; }
  .pvcopilot-root .pvc-datareq-file-title { margin-top:4px; }
}

/* universal hover feedback on buttons + selectable cards */
.pvcopilot-root button { transition: box-shadow .14s ease, transform .12s ease, background .15s ease, filter .12s ease, border-color .12s ease; }
.pvcopilot-root button:hover { box-shadow: 0 6px 18px rgba(30,58,120,0.14); }
.pvcopilot-root button:active { transform: translateY(1px); }
.pvcopilot-root .nav-pill:hover { background: rgba(255,255,255,0.90); color: #2f6bff; }
.pvcopilot-root .btn-run:hover, .pvcopilot-root .btn-primary:hover { transform: translateY(-1px); }
.pvcopilot-root .glass-soft:hover, .pvcopilot-root .varmap-chip { transition: box-shadow .14s ease; }
/* dmc select + dropdown hover */
.pvcopilot-root .mantine-Select-input:hover { border-color: rgba(79,139,255,0.6) !important; }

/* data-load spinner accent */
.pvcopilot-root ._dash-loading, .pvcopilot-root .dash-spinner * { color: #2f6bff !important; }

/* upload arrow hover zoom */
.pvcopilot-root .pvc-up-icon { transition: transform .2s ease; }
.pvcopilot-root .pvc-upload:hover .pvc-up-icon { transform: scale(1.12) translateY(-2px); }

/* Landing upload area: file input and example datasets share one card. */
.pvcopilot-root .pvc-upload-grid {
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(280px,.95fr);
  gap:20px;
  align-items:stretch;
}
.pvcopilot-root .pvc-upload-column {
  position:relative;
  display:flex;
  min-width:0;
  flex-direction:column;
}
.pvcopilot-root .pvc-datareq-button {
  position:absolute;
  top:16px;
  left:16px;
  z-index:3;
  padding:7px 14px;
  border:1px solid rgba(79,139,255,.34);
  border-radius:999px;
  background:rgba(255,255,255,.78);
  color:#2f6bff;
  font-family:Archivo,system-ui,sans-serif;
  font-size:12.5px;
  font-weight:750;
  cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.pvcopilot-root .pvc-datareq-button:hover {
  border-color:rgba(47,107,255,.58);
  background:rgba(255,255,255,.94);
}
.pvcopilot-root .pvc-upload-column > #upload-data {
  display:flex;
  flex:1 1 auto;
  min-height:250px;
  box-sizing:border-box;
}
.pvcopilot-root .pvc-upload-column > #upload-data > div {
  display:flex;
  width:100%;
  flex-direction:column;
  justify-content:center;
}
.pvcopilot-root .pvc-upload-status { width:100%; margin-top:14px; }
.pvcopilot-root .pvc-upload-status:empty { display:none; margin-top:0; }
.pvcopilot-root .pvc-example-column {
  display:flex;
  min-width:0;
  flex-direction:column;
}
.pvcopilot-root .pvc-example-heading {
  margin-bottom:10px;
  color:#8090ad;
  font-family:Archivo,system-ui,sans-serif;
  font-size:12px;
  font-weight:700;
  letter-spacing:.04em;
}
.pvcopilot-root .pvc-example-list {
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  gap:10px;
}
.pvcopilot-root .pvc-example-card {
  display:flex;
  width:100%;
  min-height:76px;
  flex:1 1 0;
  align-items:center;
  gap:14px;
  padding:14px 16px;
  border:1px solid rgba(255,255,255,.82);
  border-radius:18px;
  background:rgba(255,255,255,.46);
  color:#1c2540;
  cursor:pointer;
  font-family:Archivo,system-ui,sans-serif;
  text-align:left;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65);
}
.pvcopilot-root .pvc-example-card:hover {
  border-color:rgba(79,139,255,.38) !important;
  background:rgba(255,255,255,.68) !important;
  transform:translateY(-1px);
}
.pvcopilot-root .pvc-example-icon {
  display:flex;
  width:42px;
  height:42px;
  flex:0 0 42px;
  align-items:center;
  justify-content:center;
  border-radius:13px;
  background:rgba(79,139,255,.13);
  color:#2f6bff;
  font-size:18px;
}
.pvcopilot-root .pvc-example-copy { display:flex; min-width:0; flex-direction:column; gap:2px; }
.pvcopilot-root .pvc-example-title { color:#1c2540; font-size:15px; font-weight:800; line-height:1.25; }
.pvcopilot-root .pvc-example-description { color:#6b7794; font-size:12.5px; font-weight:500; line-height:1.3; }

/* Analyze card header: title on the left, mode switch on the upper-right. */
.pvcopilot-root .pvc-analyze-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:10px;
}
.pvcopilot-root .pvc-analyze-card.is-hidden { display:none !important; }
.pvcopilot-root .pvc-analyze-title {
  display:flex;
  min-width:0;
  align-items:baseline;
  flex-wrap:wrap;
  column-gap:2px;
}
.pvcopilot-root .pvc-mode-tabs-top { flex:0 0 auto; margin-left:auto; }
.pvcopilot-root .pvc-mode-glyph { line-height:1; }
.pvcopilot-root .pvc-bolt-icon {
  display:inline-block;
  width:12px;
  height:17px;
  flex:0 0 12px;
  background:currentColor;
  clip-path:polygon(57% 0,16% 53%,45% 53%,34% 100%,86% 39%,57% 39%);
}

/* Simple mode: centered one-click workflow with two selectable method cards. */
.pvcopilot-root .pvc-simple-start {
  padding:38px 32px 34px;
  border:1px solid rgba(255,255,255,.72);
  border-radius:22px;
  background:linear-gradient(135deg,rgba(236,244,255,.46),rgba(255,252,242,.34));
  text-align:center;
}
.pvcopilot-root .pvc-simple-heading {
  color:#1c2540;
  font-size:24px;
  font-weight:850;
  letter-spacing:-.02em;
}
.pvcopilot-root .pvc-simple-description {
  max-width:650px;
  margin:10px auto 24px;
  color:#657391;
  font-size:15px;
  line-height:1.55;
}
/* Simple YOY result: compact rate summary beside the normalized power plot. */
.pvcopilot-root .pvc-simple-yoy-result {
  display:grid;
  grid-template-columns:minmax(320px,.78fr) minmax(0,2.12fr);
  gap:20px;
  align-items:start;
  margin-top:18px;
  font-family:Archivo,system-ui,sans-serif;
}
.pvcopilot-root .pvc-yoy-summary-card,
.pvcopilot-root .pvc-yoy-chart-card {
  min-width:0;
  border:1px solid rgba(255,255,255,.84);
  border-radius:26px;
  box-shadow:0 14px 38px rgba(30,58,120,.08),inset 0 1px 0 rgba(255,255,255,.72);
}
.pvcopilot-root .pvc-yoy-summary-card {
  display:flex;
  height:460px;
  min-height:0;
  max-height:460px;
  box-sizing:border-box;
  flex-direction:column;
  padding:32px 28px 28px;
  background:linear-gradient(145deg,rgba(218,237,255,.78),rgba(239,248,240,.62));
}
.pvcopilot-root .pvc-yoy-kicker {
  color:#8392b0;
  font-size:13px;
  font-weight:800;
  letter-spacing:.075em;
  text-transform:uppercase;
}
.pvcopilot-root .pvc-yoy-rate {
  display:flex;
  align-items:baseline;
  margin-top:26px;
  white-space:nowrap;
}
.pvcopilot-root .pvc-yoy-rate-value {
  color:#172342;
  font-size:clamp(52px,5.6vw,72px);
  font-weight:850;
  letter-spacing:-.055em;
  line-height:.95;
}
.pvcopilot-root .pvc-yoy-rate-unit {
  margin-left:9px;
  color:#647391;
  font-size:22px;
  font-weight:750;
}
.pvcopilot-root .pvc-yoy-meta {
  display:flex;
  gap:7px;
  margin-top:25px;
  color:#647391;
  font-size:14px;
  font-weight:500;
}
.pvcopilot-root .pvc-yoy-status-list { margin-top:auto; padding-top:34px; }
.pvcopilot-root .pvc-yoy-status-row {
  display:flex;
  align-items:center;
  min-width:0;
  margin-top:12px;
  color:#435477;
  font-size:14px;
  line-height:1.35;
}
.pvcopilot-root .pvc-yoy-status-check { margin-right:10px; color:#18a36f; font-size:14px; font-weight:900; }
.pvcopilot-root .pvc-yoy-status-separator { margin:0 3px; color:#71809e; }
.pvcopilot-root .pvc-yoy-status-value { min-width:0; color:#344568; font-weight:800; }
.pvcopilot-root .pvc-yoy-chart-card {
  height:460px;
  min-height:0;
  max-height:460px;
  overflow:hidden;
  box-sizing:border-box;
  padding:28px 26px 12px;
  background:linear-gradient(145deg,rgba(255,255,255,.74),rgba(255,251,239,.64));
}
.pvcopilot-root .pvc-yoy-chart-title {
  margin:0 0 2px 4px;
  color:#1c2540;
  font-size:18px;
  font-weight:850;
  letter-spacing:-.01em;
}
.pvcopilot-root .pvc-yoy-graph {
  width:100% !important;
  height:390px !important;
  min-width:0;
  max-height:390px !important;
  overflow:hidden;
}
.pvcopilot-root .pvc-yoy-graph .js-plotly-plot,
.pvcopilot-root .pvc-yoy-graph .plot-container,
.pvcopilot-root .pvc-yoy-graph .svg-container {
  height:390px !important;
  max-height:390px !important;
}
.pvcopilot-root .pvc-yoy-chart-empty { padding:80px 20px; color:#8090ad; text-align:center; }

/* Actions shown only after a Simple-mode result replaces the start panel. */
.pvcopilot-root .pvc-simple-result-actions {
  display:flex;
  align-items:center;
  gap:20px;
  margin-top:20px;
  padding:2px 0 0;
}
.pvcopilot-root .pvc-simple-result-return,
.pvcopilot-root .pvc-simple-result-advanced {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:54px;
  font-family:Archivo,system-ui,sans-serif;
  font-size:15px;
  font-weight:800;
  cursor:pointer;
}
.pvcopilot-root .pvc-simple-result-return {
  padding:0 22px;
  border:1px solid rgba(105,126,166,.34);
  border-radius:16px;
  background:rgba(255,255,255,.52);
  color:#354563;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
}
.pvcopilot-root .pvc-simple-result-return:hover {
  border-color:rgba(47,107,255,.46);
  background:rgba(255,255,255,.78);
}
.pvcopilot-root .pvc-simple-result-action-icon { font-size:23px; line-height:1; }
.pvcopilot-root .pvc-simple-result-advanced {
  padding:0 8px;
  border:0;
  background:transparent;
  color:#2f6bff;
  box-shadow:none;
}
.pvcopilot-root .pvc-simple-result-advanced:hover { color:#1f57d6; box-shadow:none; transform:translateX(2px); }
@media (max-width:620px) {
  .pvcopilot-root .pvc-simple-result-actions { align-items:stretch; flex-direction:column; gap:8px; }
  .pvcopilot-root .pvc-simple-result-return,
  .pvcopilot-root .pvc-simple-result-advanced { width:100%; min-height:48px; }
}
@media (max-width:940px) {
  .pvcopilot-root .pvc-simple-yoy-result { grid-template-columns:minmax(0,1fr); }
  .pvcopilot-root .pvc-yoy-summary-card { height:auto; min-height:330px; max-height:none; }
}

/* Simple PVPRO result: headline rate + parameter selector + one active plot. */
.pvcopilot-root .pvc-simple-pvpro-result {
  display:grid;
  grid-template-columns:minmax(285px,.7fr) minmax(0,2.3fr);
  gap:20px;
  margin-top:18px;
  font-family:Archivo,system-ui,sans-serif;
}
.pvcopilot-root .pvc-simple-pvpro-summary,
.pvcopilot-root .pvc-simple-pvpro-trends {
  min-width:0;
  min-height:382px;
  border:1px solid rgba(255,255,255,.86);
  border-radius:27px;
  box-shadow:0 14px 38px rgba(30,58,120,.08),inset 0 1px 0 rgba(255,255,255,.74);
}
.pvcopilot-root .pvc-simple-pvpro-summary {
  display:flex;
  flex-direction:column;
  padding:26px 24px 25px;
  background:linear-gradient(145deg,rgba(245,250,255,.80),rgba(244,250,247,.66));
}
.pvcopilot-root .pvc-simple-pvpro-kicker {
  color:#8191af;
  font-size:13px;
  font-weight:800;
  letter-spacing:.075em;
  text-transform:uppercase;
}
.pvcopilot-root .pvc-simple-pvpro-rate {
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  margin-top:19px;
}
.pvcopilot-root .pvc-simple-pvpro-rate-value {
  color:#2164bd;
  font-size:clamp(48px,4.5vw,62px);
  font-weight:850;
  letter-spacing:-.055em;
  line-height:.95;
}
.pvcopilot-root .pvc-simple-pvpro-rate-unit {
  margin-left:9px;
  color:#586887;
  font-size:18px;
  font-weight:750;
  white-space:nowrap;
}
.pvcopilot-root .pvc-simple-pvpro-details {
  margin-top:auto;
  color:#657493;
  font-size:14px;
  line-height:1.7;
}
.pvcopilot-root .pvc-simple-pvpro-details strong { color:#283754; font-weight:800; }
.pvcopilot-root .pvc-simple-pvpro-window { white-space:nowrap; }
.pvcopilot-root .pvc-simple-pvpro-trends {
  display:grid;
  grid-template-columns:170px minmax(0,1fr);
  gap:14px;
  padding:16px 18px 12px;
  background:linear-gradient(145deg,rgba(255,255,255,.76),rgba(255,251,239,.64));
}
.pvcopilot-root .pvc-simple-pvpro-params {
  display:flex;
  flex-direction:column;
  gap:7px;
}
.pvcopilot-root .pvc-simple-pvpro-param {
  display:flex;
  min-height:58px;
  flex-direction:column;
  justify-content:center;
  padding:8px 12px;
  border:1px solid rgba(139,157,192,.32);
  border-radius:14px;
  background:rgba(255,255,255,.52);
  color:#455576;
  cursor:pointer;
  text-align:left;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72);
}
.pvcopilot-root .pvc-simple-pvpro-param:hover {
  border-color:rgba(33,100,189,.42);
  background:rgba(255,255,255,.76);
}
.pvcopilot-root .pvc-simple-pvpro-param.is-active {
  border-color:#2164bd;
  background:#2164bd;
  color:#fff;
  box-shadow:0 10px 24px rgba(33,100,189,.24);
}
.pvcopilot-root .pvc-simple-pvpro-param-name { font-size:15px; font-weight:850; line-height:1.12; }
.pvcopilot-root .pvc-simple-pvpro-param-description { margin-top:2px; font-size:10.5px; font-weight:600; line-height:1.2; }
.pvcopilot-root .pvc-simple-pvpro-param:not(.is-active) .pvc-simple-pvpro-param-description { color:#697896; }
.pvcopilot-root .pvc-simple-pvpro-chart-stage {
  display:flex;
  min-width:0;
  align-items:stretch;
  border-radius:20px;
  background:rgba(255,255,255,.42);
}
.pvcopilot-root .pvc-simple-pvpro-chart { width:100%; min-width:0; }
.pvcopilot-root .pvc-simple-pvpro-graph { width:100%; min-width:0; }
.pvcopilot-root .pvc-simple-pvpro-chart-empty { padding:180px 20px; color:#8090ad; text-align:center; }
@media (max-width:1040px) {
  .pvcopilot-root .pvc-simple-pvpro-result { grid-template-columns:minmax(0,1fr); }
  .pvcopilot-root .pvc-simple-pvpro-summary { min-height:270px; }
}
@media (max-width:700px) {
  .pvcopilot-root .pvc-simple-pvpro-trends { grid-template-columns:minmax(0,1fr); }
  .pvcopilot-root .pvc-simple-pvpro-params { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .pvcopilot-root .pvc-simple-pvpro-param { min-height:54px; }
}
.pvcopilot-root .pvc-simple-method-wrap { max-width:720px; margin:0 auto; }
.pvcopilot-root .pvc-simple-method-cards {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.pvcopilot-root .pvc-simple-method-cards label {
  position:relative;
  min-width:0;
  margin:0;
  padding:0;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.84);
  border-radius:18px;
  background:rgba(255,255,255,.46);
  text-align:left;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.68);
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .14s ease;
}
.pvcopilot-root .pvc-simple-method-cards label:hover {
  border-color:rgba(79,139,255,.48);
  background:rgba(255,255,255,.66);
  transform:translateY(-1px);
}
.pvcopilot-root .pvc-simple-method-cards label:has(input:checked) {
  border:2px solid #4f8bff;
  background:rgba(219,233,255,.66);
  box-shadow:0 10px 26px rgba(47,107,255,.13),inset 0 1px 0 rgba(255,255,255,.76);
}
.pvcopilot-root .pvc-simple-method-card-content {
  display:flex;
  min-height:104px;
  align-items:center;
  gap:14px;
  padding:18px 20px;
}
.pvcopilot-root .pvc-simple-method-icon {
  display:flex;
  width:44px;
  height:44px;
  flex:0 0 44px;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background:rgba(79,139,255,.10);
  color:#2f6bff;
  font-size:19px;
  font-weight:800;
}
.pvcopilot-root .pvc-simple-method-cards label:has(input:checked) .pvc-simple-method-icon {
  background:linear-gradient(135deg,#4f8bff,#2f6bff);
  color:#fff;
  box-shadow:0 8px 18px rgba(47,107,255,.22);
}
.pvcopilot-root .pvc-simple-method-copy { display:flex; min-width:0; flex:1 1 auto; flex-direction:column; gap:3px; }
.pvcopilot-root .pvc-simple-method-title { color:#1c2540; font-size:16px; font-weight:850; line-height:1.25; }
.pvcopilot-root .pvc-simple-method-description { color:#657391; font-size:13px; font-weight:500; line-height:1.35; }
.pvcopilot-root .pvc-simple-method-logo { width:auto; height:26px; flex:0 0 auto; margin-left:6px; object-fit:contain; }
.pvcopilot-root .pvc-simple-pvpro-extra { max-width:720px; margin:0 auto; text-align:left; }
.pvcopilot-root .pvc-simple-run-row { display:flex; justify-content:center; margin-top:24px; }
.pvcopilot-root .pvc-simple-run-button {
  display:inline-flex;
  min-width:220px;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.pvcopilot-root .pvc-simple-progress {
  width:100%;
  max-width:720px;
  margin:18px auto 0;
  text-align:left;
}
.pvcopilot-root .pvc-simple-progress:empty { display:none; margin-top:0; }

/* Advanced mode: persistent four-step rail + one active workspace panel. */
.pvcopilot-root .pvc-advanced-workspace { min-width:0; }
.pvcopilot-root .pvc-advanced-layout {
  display:grid;
  grid-template-columns:270px minmax(0,1fr);
  gap:22px;
  align-items:start;
}
.pvcopilot-root .pvc-advanced-rail {
  position:sticky;
  top:18px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.pvcopilot-root .pvc-advanced-rail-card {
  width:100%;
  display:flex;
  min-width:0;
  min-height:78px;
  align-items:center;
  gap:12px;
  padding:13px 15px;
  border:1px solid rgba(255,255,255,.72);
  border-radius:19px;
  background:rgba(255,255,255,.34);
  color:#73819c;
  opacity:.48;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.62);
  transition:opacity .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease;
  appearance:none;
  font-family:inherit;
  text-align:left;
}
.pvcopilot-root .pvc-advanced-step-badge {
  display:flex;
  width:46px;
  height:46px;
  flex:0 0 46px;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background:rgba(151,176,215,.18);
  color:#89a0c4;
  font-size:15px;
  font-weight:850;
}
.pvcopilot-root .pvc-advanced-step-check { display:none; font-size:19px; }
.pvcopilot-root .pvc-advanced-step-copy { min-width:0; flex:1 1 auto; }
.pvcopilot-root .pvc-advanced-step-name { color:inherit; font-size:14px; font-weight:850; line-height:1.25; }
.pvcopilot-root .pvc-advanced-step-caption { margin-top:3px; color:#8290aa; font-size:11.5px; line-height:1.3; }
.pvcopilot-root .pvc-advanced-step-chevron {
  color:#8aa0c4;
  font-size:23px;
  line-height:1;
  transition:color .18s ease,transform .18s ease;
}

/* Explicit UI state: completing a step unlocks the next one, while the active
   class changes only when the user clicks a rail tab. */
.pvcopilot-root .pvc-advanced-rail-card.is-active {
  border:2px solid #4f8bff;
  background:rgba(255,255,255,.78);
  color:#1c2540;
  opacity:1;
  box-shadow:0 12px 30px rgba(47,107,255,.12),inset 0 1px 0 rgba(255,255,255,.82);
  cursor:pointer;
}
.pvcopilot-root .pvc-advanced-rail-card.is-active .pvc-advanced-step-badge {
  background:linear-gradient(135deg,#4f8bff,#2f6bff);
  color:#fff;
  box-shadow:0 8px 18px rgba(47,107,255,.22);
}
.pvcopilot-root .pvc-advanced-rail-card.is-done,
.pvcopilot-root .pvc-advanced-rail-card.is-enabled {
  border:1px solid rgba(255,255,255,.78);
  background:rgba(255,255,255,.50);
  color:#1c2540;
  opacity:1;
  box-shadow:none;
  cursor:pointer;
}
.pvcopilot-root .pvc-advanced-rail-card.is-done .pvc-advanced-step-badge {
  background:#20b986;
  color:#fff;
  box-shadow:none;
}
.pvcopilot-root .pvc-advanced-rail-card.is-done .pvc-advanced-step-number { display:none; }
.pvcopilot-root .pvc-advanced-rail-card.is-done .pvc-advanced-step-check { display:inline; }
.pvcopilot-root .pvc-advanced-rail-card.is-active.is-done {
  border:2px solid #4f8bff;
  background:rgba(255,255,255,.78);
  box-shadow:0 12px 30px rgba(47,107,255,.12),inset 0 1px 0 rgba(255,255,255,.82);
}
.pvcopilot-root .pvc-advanced-rail-card.is-locked { cursor:not-allowed; }
.pvcopilot-root .pvc-advanced-rail-card:not(:disabled):hover {
  transform:translateX(4px);
  border-color:rgba(79,139,255,.58);
  background:rgba(255,255,255,.76);
  box-shadow:0 12px 28px rgba(47,107,255,.13),inset 0 1px 0 rgba(255,255,255,.82);
}
.pvcopilot-root .pvc-advanced-rail-card:not(:disabled):hover .pvc-advanced-step-chevron {
  color:#2f6bff;
  transform:translateX(2px);
}

.pvcopilot-root .pvc-advanced-panel {
  min-width:0;
  min-height:590px;
  max-height:calc(100vh - 190px);
  overflow-y:auto;
  padding:30px 34px 34px;
  border:1px solid rgba(255,255,255,.84);
  border-radius:25px;
  background:linear-gradient(140deg,rgba(255,255,255,.72),rgba(255,250,235,.58));
  box-shadow:0 14px 38px rgba(30,58,120,.08),inset 0 1px 0 rgba(255,255,255,.72);
  scrollbar-color:rgba(122,145,183,.38) transparent;
  scrollbar-width:thin;
}
.pvcopilot-root .pvc-advanced-panel:has(#agent-data-wrap:not([style*="display: none"])) {
  min-height:0;
}
.pvcopilot-root .pvc-advanced-stage { display:none; min-width:0; }
.pvcopilot-root #agent-data-wrap {
  display:block;
  width:100%;
  max-width:none;
}

.pvcopilot-root .pvc-advanced-panel-kicker { color:#2f6bff; font-size:12px; font-weight:850; letter-spacing:.12em; }
.pvcopilot-root .pvc-advanced-panel-title { margin:16px 0 8px; color:#18233f; font-size:30px; font-weight:850; letter-spacing:-.03em; }
.pvcopilot-root .pvc-advanced-panel-description { margin:0 0 26px; color:#657391; font-size:15px; line-height:1.55; }
.pvcopilot-root #advanced-data-body {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  align-self:stretch;
  width:100%;
  max-width:none;
  box-sizing:border-box;
}
.pvcopilot-root #advanced-data-body #analyze-caption { display:none !important; }
.pvcopilot-root #advanced-data-body #analyze-status-line {
  width:100%;
  margin-top:10px;
  text-align:left;
}
.pvcopilot-root #advanced-data-body > div:has(#loading-summary-and-figs),
.pvcopilot-root #advanced-data-body #loading-summary-and-figs,
.pvcopilot-root #advanced-data-body #data-summary-output,
.pvcopilot-root #advanced-data-body #data-summary-output > .slide-in-up {
  width:100% !important;
  max-width:none !important;
  align-self:stretch;
  box-sizing:border-box;
}

/* Completed Advanced steps become result-first views. The analysis outputs
   stay mounted; only their input/configuration controls are folded. */
.pvcopilot-root #advanced-data-body.is-complete .pvc-step1-intro-item {
  display:none !important;
}
.pvcopilot-root #advanced-data-body.is-complete #data-summary-output { margin-top:0 !important; }

/* Step 1 result: variable mappings and raw-signal figures share the same
   responsive two-column rhythm. */
.pvcopilot-root #advanced-data-body .pvc-var-map-header { display:none !important; }
.pvcopilot-root #advanced-data-body .pvc-var-map-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px 10px;
  margin-top:0 !important;
}
.pvcopilot-root #advanced-data-body .pvc-var-map-card {
  min-width:0;
  padding:9px 11px !important;
  border:1px solid rgba(255,255,255,.84);
  border-radius:13px;
  background:rgba(255,255,255,.64);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78);
}
.pvcopilot-root #advanced-data-body .pvc-var-map-label {
  min-width:0;
  margin-bottom:6px;
  color:#415171;
  font-size:13px;
  font-weight:750;
}
.pvcopilot-root #advanced-data-body .pvc-var-map-control { min-width:0; }
.pvcopilot-root #advanced-data-body .pvc-var-map-card .mantine-Select-input {
  min-height:34px !important;
  height:34px !important;
  font-size:12.5px !important;
}
.pvcopilot-root #advanced-data-body .pvc-step1-mapping-surface {
  padding:13px 14px !important;
  margin-bottom:12px !important;
}
.pvcopilot-root #advanced-data-body .pvc-step1-fig-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px 12px;
  align-items:start;
}
.pvcopilot-root #advanced-data-body .pvc-step1-fig-grid > * {
  width:100%;
  min-width:0;
  overflow:hidden;
  border-radius:14px;
  background:rgba(255,255,255,.62);
}
@media (max-width:900px) {
  .pvcopilot-root #advanced-data-body .pvc-var-map-grid,
  .pvcopilot-root #advanced-data-body .pvc-step1-fig-grid {
    grid-template-columns:minmax(0,1fr);
  }
}

.pvcopilot-root .pvc-step-fold-summary {
  display:none;
  width:100%;
  min-height:64px;
  align-items:center;
  gap:11px;
  margin:0 0 18px;
  padding:14px 17px;
  border:1px solid rgba(62,139,110,.25);
  border-radius:16px;
  background:linear-gradient(135deg,rgba(229,249,240,.84),rgba(255,255,255,.64));
  color:#1c2540;
  font-family:Archivo,system-ui,sans-serif;
  text-align:left;
  cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78);
}
.pvcopilot-root .pvc-step-fold-summary:hover {
  border-color:rgba(47,107,255,.42);
  background:linear-gradient(135deg,rgba(229,249,240,.96),rgba(255,255,255,.82));
}
.pvcopilot-root .pvc-advanced-step-body.is-complete .pvc-step-fold-summary { display:flex; }
.pvcopilot-root .pvc-advanced-step-body.is-complete.is-collapsed .pvc-step-config-item { display:none !important; }
.pvcopilot-root .pvc-step-fold-check {
  display:flex;
  width:34px;
  height:34px;
  flex:0 0 34px;
  align-items:center;
  justify-content:center;
  border-radius:11px;
  background:#20b986;
  color:#fff;
  font-size:17px;
  font-weight:850;
}
.pvcopilot-root .pvc-step-fold-title { font-size:15px; font-weight:850; }
.pvcopilot-root .pvc-step-fold-help { color:#657391; font-size:13px; font-weight:550; }
.pvcopilot-root .pvc-step-fold-arrow {
  margin-left:auto;
  color:#2f6bff;
  font-size:21px;
  font-weight:800;
  transition:transform .18s ease;
}
.pvcopilot-root .pvc-advanced-step-body.is-complete.is-expanded .pvc-step-fold-arrow { transform:rotate(180deg); }
.pvcopilot-root .pvc-advanced-step-body.is-complete.is-collapsed #data-filter-output,
.pvcopilot-root .pvc-advanced-step-body.is-complete.is-collapsed #degradation-output,
.pvcopilot-root .pvc-advanced-step-body.is-complete.is-collapsed #pvpro-progress-output { margin-top:0 !important; }
.pvcopilot-root .pvc-next-step-button {
  display:none;
  align-items:center;
  justify-content:center;
  gap:7px;
  margin:18px 0 0 auto;
  padding:11px 18px;
  border:0;
  border-radius:999px;
  background:linear-gradient(135deg,#4b8bff,#2f6bff);
  color:#fff;
  font:800 14px/1 Archivo,system-ui,sans-serif;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(47,107,255,.24);
  transition:transform .18s ease,filter .18s ease,box-shadow .18s ease;
}
.pvcopilot-root .pvc-advanced-step-body.is-complete .pvc-next-step-button { display:flex; }
.pvcopilot-root .pvc-next-step-button:hover {
  transform:translateY(-1px);
  filter:brightness(1.035);
  box-shadow:0 13px 28px rgba(47,107,255,.31);
}
.pvcopilot-root #agent-data-wrap #analyze-btn,
.pvcopilot-root #agent-filter-wrap #filter-btn,
.pvcopilot-root #agent-calc-wrap #run-btn,
.pvcopilot-root #agent-code-wrap #generate-code-btn {
  width:auto !important;
  min-width:210px;
  padding:13px 24px !important;
  box-shadow:0 12px 26px rgba(47,107,255,.24);
}
.pvcopilot-root #agent-filter-wrap #filter-btn,
.pvcopilot-root #agent-calc-wrap #run-btn,
.pvcopilot-root #agent-code-wrap #generate-code-btn { display:flex; align-items:center; justify-content:center; gap:8px; }

.pvcopilot-root .pvc-advanced-filter-grid {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
}
.pvcopilot-root .pvc-advanced-filter-card {
  min-width:0;
  padding:17px 18px 18px;
  border:1px solid rgba(255,255,255,.78);
  border-radius:17px;
  background:rgba(255,255,255,.52);
}
.pvcopilot-root .pvc-advanced-filter-content { min-width:0; }
.pvcopilot-root .pvc-advanced-filter-description {
  margin:8px 0 0 27px;
  color:#657391;
  font-size:12.5px;
  line-height:1.45;
}
.pvcopilot-root .pvc-advanced-filter-content > details { margin:7px 0 0 0; }
.pvcopilot-root .pvc-advanced-filter-card summary { color:#2f6bff !important; font-weight:700 !important; }

.pvcopilot-root .pvc-advanced-metric-panel {
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
}
.pvcopilot-root #metric-stat-radio {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px 10px;
}
.pvcopilot-root #metric-stat-radio > label,
.pvcopilot-root #metric-pvpro-radio > label {
  display:grid !important;
  grid-template-columns:24px minmax(0,1fr);
  align-items:start;
  gap:10px;
  width:100%;
  box-sizing:border-box;
  min-width:0;
  min-height:74px;
  margin:0 !important;
  padding:12px 16px;
  border:1px solid rgba(255,255,255,.80);
  border-radius:18px;
  background:rgba(255,255,255,.58);
  color:#1c2540 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78);
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease;
}
.pvcopilot-root #metric-stat-radio > label:hover,
.pvcopilot-root #metric-pvpro-radio > label:hover {
  transform:translateY(-1px);
  border-color:rgba(79,139,255,.40);
  background:rgba(255,255,255,.72);
  color:#1c2540 !important;
  box-shadow:0 8px 20px rgba(47,107,255,.08),inset 0 1px 0 rgba(255,255,255,.84);
}
.pvcopilot-root #metric-stat-radio > label > input,
.pvcopilot-root #metric-pvpro-radio > label > input {
  width:19px;
  height:19px;
  margin:3px 0 0 !important;
  accent-color:#2f6bff;
}
.pvcopilot-root #metric-stat-radio .metric-radio-label,
.pvcopilot-root #metric-pvpro-radio .metric-radio-label {
  display:block !important;
  width:100%;
  min-width:0;
  line-height:1.45;
  color:#1c2540 !important;
}
.pvcopilot-root #metric-stat-radio .metric-radio-label details,
.pvcopilot-root #metric-pvpro-radio .metric-radio-label details {
  margin-top:4px;
}
.pvcopilot-root #metric-stat-radio .metric-radio-label summary,
.pvcopilot-root #metric-pvpro-radio .metric-radio-label summary {
  color:#2f6bff !important;
  font-weight:700 !important;
}
.pvcopilot-root #metric-stat-radio > label:has(> input:checked),
.pvcopilot-root #metric-pvpro-radio > label:has(> input:checked) {
  border-color:rgba(79,139,255,.66);
  background:rgba(255,255,255,.72);
  box-shadow:inset 0 0 0 1px rgba(79,139,255,.18),0 8px 20px rgba(47,107,255,.08);
}
.pvcopilot-root #metric-pvpro-radio { display:block; width:100%; margin-top:0; }
.pvcopilot-root #metric-pvpro-radio > label { min-height:0; }

/* Advanced Step 3 results: single method, comparison, and PVPRO dashboards. */
.pvcopilot-root .pvc-advanced-single-result,
.pvcopilot-root .pvc-advanced-pvpro-result {
  display:grid;
  grid-template-columns:minmax(270px,.82fr) minmax(0,2.18fr);
  gap:18px;
  align-items:stretch;
  margin-top:16px;
  font-family:Archivo,system-ui,sans-serif;
}
.pvcopilot-root .pvc-advanced-single-summary,
.pvcopilot-root .pvc-advanced-pvpro-summary,
.pvcopilot-root .pvc-advanced-multi-summary,
.pvcopilot-root .pvc-advanced-result-chart-card,
.pvcopilot-root .pvc-advanced-pvpro-trends {
  min-width:0;
  border:1px solid rgba(255,255,255,.86);
  border-radius:24px;
  background:linear-gradient(145deg,rgba(255,255,255,.76),rgba(255,251,239,.62));
  box-shadow:0 12px 32px rgba(30,58,120,.07),inset 0 1px 0 rgba(255,255,255,.76);
}
.pvcopilot-root .pvc-advanced-single-summary,
.pvcopilot-root .pvc-advanced-pvpro-summary,
.pvcopilot-root .pvc-advanced-multi-summary {
  display:flex;
  min-height:390px;
  box-sizing:border-box;
  flex-direction:column;
  padding:27px 25px 25px;
  background:linear-gradient(145deg,rgba(245,250,255,.82),rgba(245,250,247,.66));
}
.pvcopilot-root .pvc-advanced-result-kicker {
  color:#8191af;
  font-size:12.5px;
  font-weight:850;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.pvcopilot-root .pvc-advanced-single-rate,
.pvcopilot-root .pvc-advanced-pvpro-rate {
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  margin-top:22px;
}
.pvcopilot-root .pvc-advanced-single-rate-value,
.pvcopilot-root .pvc-advanced-pvpro-rate-value {
  color:#2164bd;
  font-size:clamp(46px,4.2vw,64px);
  font-weight:850;
  letter-spacing:-.055em;
  line-height:.95;
}
.pvcopilot-root .pvc-advanced-single-rate-unit,
.pvcopilot-root .pvc-advanced-pvpro-rate-unit {
  margin-left:8px;
  color:#586887;
  font-size:18px;
  font-weight:750;
  white-space:nowrap;
}
.pvcopilot-root .pvc-advanced-result-details {
  margin-top:auto;
  color:#657493;
  font-size:14px;
  line-height:1.72;
}
.pvcopilot-root .pvc-advanced-result-details strong { color:#283754; font-weight:800; }
.pvcopilot-root .pvc-advanced-result-chart-card {
  overflow:hidden;
  padding:24px 24px 10px;
}
.pvcopilot-root .pvc-advanced-result-chart-card .js-plotly-plot,
.pvcopilot-root .pvc-advanced-result-chart-card .plot-container { width:100% !important; }

.pvcopilot-root .pvc-advanced-multi-result {
  margin-top:16px;
  font-family:Archivo,system-ui,sans-serif;
}
.pvcopilot-root .pvc-advanced-multi-top {
  display:grid;
  grid-template-columns:minmax(270px,.82fr) minmax(0,2.18fr);
  gap:18px;
  align-items:stretch;
}
.pvcopilot-root .pvc-advanced-multi-summary { min-height:360px; }
.pvcopilot-root .pvc-advanced-multi-rate {
  margin-top:20px;
  color:#2164bd;
  font-size:clamp(34px,3vw,46px);
  font-weight:850;
  letter-spacing:-.045em;
  line-height:1.02;
}
.pvcopilot-root .pvc-advanced-multi-unit {
  margin-top:5px;
  color:#586887;
  font-size:15px;
  font-weight:750;
}
.pvcopilot-root .pvc-advanced-multi-summary .pvc-advanced-result-kicker { font-size:11.5px; }
.pvcopilot-root .pvc-advanced-multi-summary .pvc-advanced-result-details {
  font-size:12.5px;
  line-height:1.55;
  overflow-wrap:anywhere;
}
.pvcopilot-root .pvc-advanced-multi-trend { margin-top:18px; padding-bottom:4px; }

.pvcopilot-root .pvc-advanced-pvpro-trends {
  padding:18px 20px 12px;
}
.pvcopilot-root .pvc-advanced-pvpro-params {
  display:flex;
  align-items:center;
  gap:9px;
  margin:0 0 10px;
  flex-wrap:wrap;
}
.pvcopilot-root .pvc-advanced-pvpro-param {
  min-width:88px;
  min-height:42px;
  padding:8px 18px;
  border:1px solid rgba(139,157,192,.38);
  border-radius:999px;
  background:rgba(255,255,255,.58);
  color:#455576;
  cursor:pointer;
  font:850 15px/1 Archivo,system-ui,sans-serif;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.76);
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease;
}
.pvcopilot-root .pvc-advanced-pvpro-param:hover {
  transform:translateY(-1px);
  border-color:rgba(33,100,189,.46);
  background:rgba(255,255,255,.80);
}
.pvcopilot-root .pvc-advanced-pvpro-param.is-active {
  border-color:#2164bd;
  background:#2164bd;
  color:#fff;
  box-shadow:0 9px 22px rgba(33,100,189,.24);
}
.pvcopilot-root .pvc-advanced-pvpro-chart-stage {
  min-width:0;
  overflow:hidden;
  border-radius:18px;
  background:rgba(255,255,255,.40);
}
.pvcopilot-root .pvc-advanced-pvpro-chart,
.pvcopilot-root .pvc-advanced-pvpro-graph { width:100%; min-width:0; }
.pvcopilot-root .pvc-advanced-pvpro-chart-empty { padding:170px 20px; color:#8090ad; text-align:center; }

/* Shared result-level AI diagnosis panel for Simple and Advanced modes. */
.pvcopilot-root .pvc-ai-diagnostic-card {
  margin-top:18px;
  padding:22px 24px;
  border:1px solid rgba(255,255,255,.86);
  border-radius:24px;
  background:linear-gradient(135deg,rgba(247,251,255,.78),rgba(255,251,239,.66));
  box-shadow:0 12px 32px rgba(30,58,120,.07),inset 0 1px 0 rgba(255,255,255,.78);
  font-family:Archivo,system-ui,sans-serif;
}
.pvcopilot-root .pvc-ai-diagnostic-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:14px;
}
.pvcopilot-root .pvc-ai-diagnostic-title {
  color:#2f6bff;
  font-size:12px;
  font-weight:850;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.pvcopilot-root .pvc-ai-diagnostic-restart {
  appearance:none;
  border:1px solid rgba(47,107,255,.28);
  border-radius:999px;
  background:rgba(255,255,255,.62);
  color:#2f6bff;
  cursor:pointer;
  font-family:Archivo,system-ui,sans-serif;
  font-size:12px;
  font-weight:750;
  line-height:1;
  padding:8px 13px;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.pvcopilot-root .pvc-ai-diagnostic-restart:hover {
  border-color:rgba(47,107,255,.52);
  background:rgba(239,246,255,.96);
  box-shadow:0 5px 14px rgba(47,107,255,.12);
}
.pvcopilot-root .pvc-ai-diagnostic-button { min-width:190px; }
.pvcopilot-root .pvc-ai-diagnostic-button[hidden] { display:none !important; }
.pvcopilot-root .pvc-ai-diagnostic-icon { color:#fff; font-size:16px; line-height:1; }
.pvcopilot-root .pvc-ai-diagnostic-output:not(:empty) {
  margin-top:18px;
  padding-top:17px;
  border-top:1px solid rgba(120,140,180,.20);
}
.pvcopilot-root .pvc-ai-diagnostic-markdown {
  max-width:980px;
  color:#293651;
  font-size:13.5px;
  line-height:1.65;
}
.pvcopilot-root .pvc-ai-diagnostic-markdown > :first-child { margin-top:0; }
.pvcopilot-root .pvc-ai-diagnostic-markdown > :last-child { margin-bottom:0; }
.pvcopilot-root .pvc-ai-diagnostic-error { color:#a33a2b; font-size:13px; }

@media (max-width:1050px) {
  .pvcopilot-root .pvc-advanced-single-result,
  .pvcopilot-root .pvc-advanced-pvpro-result,
  .pvcopilot-root .pvc-advanced-multi-top { grid-template-columns:minmax(0,1fr); }
  .pvcopilot-root .pvc-advanced-single-summary,
  .pvcopilot-root .pvc-advanced-pvpro-summary,
  .pvcopilot-root .pvc-advanced-multi-summary { min-height:260px; }
}

@media (max-width:900px) {
  .pvcopilot-root .pvc-advanced-layout { grid-template-columns:minmax(0,1fr); }
  .pvcopilot-root .pvc-advanced-rail { position:static; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .pvcopilot-root .pvc-advanced-panel { max-height:none; }
}
@media (max-width:620px) {
  .pvcopilot-root .pvc-advanced-rail { grid-template-columns:minmax(0,1fr); }
  .pvcopilot-root .pvc-advanced-filter-grid,
  .pvcopilot-root #metric-stat-radio { grid-template-columns:minmax(0,1fr); }
  .pvcopilot-root .pvc-advanced-panel { padding:22px 15px 24px; }
}

/* Local busy overlays: every mask is clipped to the smallest result/input host. */
.pvcopilot-root .pvc-busy-host,
.pvcopilot-root .pvc-upload-host { position: relative; min-width: 0; }
.pvcopilot-root .pvc-upload-host { min-height: 230px; align-self: stretch; overflow: hidden; border-radius: 22px; }
.pvcopilot-root .pvc-upload-host > #upload-data {
  position: absolute !important; inset: 0 !important; display: flex !important;
  width: auto !important; height: auto !important; min-height: 0 !important; box-sizing: border-box;
}
.pvcopilot-root .pvc-upload-host > #upload-data > .pvc-upload {
  display: flex !important; width: 100% !important; height: 100% !important;
  min-height: 0 !important; box-sizing: border-box;
}
.pvcopilot-root .pvc-upload-host > #upload-data > .pvc-upload > div { width: 100%; height: 100%; min-height: 0; }
.pvcopilot-root .pvc-panel-busy-host { position: relative; min-width: 0; border-radius: 24px; overflow: hidden; }
.pvcopilot-root .pvc-panel-busy-host > .glass-soft { width: 100%; }
.pvcopilot-root .pvc-panel-busy-host > .pvc-busy { border-radius: 24px; }
.pvcopilot-root .pvc-busy { position: absolute; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px; background: rgba(238,244,253,0.62); backdrop-filter: blur(4px); border-radius: 28px; }
.pvcopilot-root .pvc-busy.show { display: flex; }
.pvcopilot-root .pvc-upload-busy { border-radius: 22px; }
.pvcopilot-root .pvc-busy-text { font-size: 15px; font-weight: 700; color: #1c2540; }
.pvcopilot-root .pvc-busy-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px;
  padding: 0; border: 1px solid rgba(120,140,180,0.28); border-radius: 11px; background: rgba(255,255,255,0.82);
  color: #455172; font-size: 24px; font-weight: 400; line-height: 30px; cursor: pointer;
  box-shadow: 0 5px 16px rgba(30,58,120,0.12); }
.pvcopilot-root .pvc-busy-close:hover { color: #b42318; background: rgba(255,255,255,0.96); border-color: rgba(180,70,70,0.35); }
.pvcopilot-root .pvc-spinner { width: 52px; height: 52px; border-radius: 50%; border: 4px solid rgba(79,139,255,0.25);
  border-top-color: #2f6bff; animation: pvc-spin .8s linear infinite; }
@keyframes pvc-spin { to { transform: rotate(360deg); } }

@media (max-width:900px) {
  .pvcopilot-root .pvc-upload-grid { grid-template-columns:minmax(0,1fr); }
  .pvcopilot-root .pvc-example-card { min-height:72px; }
}

/* whole selectable block hover (methods/filters) */
.pvcopilot-root .pvc-sel-block { transition: box-shadow .14s ease, transform .12s ease, border-color .14s ease; }
.pvcopilot-root .pvc-sel-block:hover { box-shadow: 0 8px 22px rgba(30,58,120,0.13); transform: translateY(-1px); border-color: rgba(79,139,255,0.5); }
.pvcopilot-root .pvc-sel-block button:hover { box-shadow: none; }

/* controlled "fold" bar used to tuck away a step's settings once its result is
   shown (Step 2 filters, Step 3 metric selection). State lives in app-state, so
   a re-run can force it back to folded. */
.pvcopilot-root .pvc-foldbar { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 13px 18px; border: 1px solid rgba(120,140,180,0.28); border-radius: 14px; background: rgba(255,255,255,0.5);
  font-size: 13px; font-weight: 700; color: #374466; cursor: pointer;
  transition: background .14s ease, color .14s ease, border-color .14s ease; }
.pvcopilot-root .pvc-foldbar:hover { color: #2f6bff; background: rgba(79,139,255,0.07); border-color: rgba(79,139,255,0.4); box-shadow: none; }
.pvcopilot-root .pvc-foldbar .pvc-chev { font-size: 12px; color: #8090ad; transition: color .14s ease; }
.pvcopilot-root .pvc-foldbar:hover .pvc-chev { color: #2f6bff; }

/* PVPRO parameter pills (Advanced mode) — short name shown, full name on hover.
   The tooltip uses the button's data-full attribute and sits BELOW the pill so
   it never gets clipped by the card above it. */
.pvcopilot-root .pvc-pvpro-pill { position: relative; transition: box-shadow .14s ease, transform .12s ease, background .15s ease, border-color .12s ease; }
.pvcopilot-root .pvc-pvpro-pill:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(30,58,120,0.16); border-color: rgba(79,139,255,0.55); }
.pvcopilot-root .pvc-pvpro-pill::after {
  content: attr(data-full); position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-3px);
  padding: 6px 11px; border-radius: 9px; font-size: 11.5px; font-weight: 600; line-height: 1; white-space: nowrap; letter-spacing: 0.01em;
  color: #eef4ff; background: rgba(24,34,60,0.94); box-shadow: 0 8px 22px rgba(20,30,55,0.28);
  opacity: 0; pointer-events: none; z-index: 40; transition: opacity .13s ease, transform .13s ease; }
.pvcopilot-root .pvc-pvpro-pill::before {
  content: ""; position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-bottom-color: rgba(24,34,60,0.94);
  opacity: 0; pointer-events: none; z-index: 40; transition: opacity .13s ease; }
.pvcopilot-root .pvc-pvpro-pill:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.pvcopilot-root .pvc-pvpro-pill:hover::before { opacity: 1; }

/* Technology dropdown matched to the number inputs */
.pvcopilot-root .pvc-dd .Select-control,
.pvcopilot-root .pvc-dd .Select__control {
  border: 1px solid rgba(120,140,180,0.4) !important; border-radius: 10px !important;
  background: rgba(255,255,255,0.7) !important; min-height: 38px !important; box-shadow: none !important; font-size: 13px; }
.pvcopilot-root .pvc-dd .Select__control--is-focused { border-color: #4f8bff !important; }
.pvcopilot-root .pvc-dd .Select-value, .pvcopilot-root .pvc-dd .Select__single-value { color: #1c2540 !important; }

/* Floating PV Copilot chat. */
.pvcopilot-root > #floating-chat-widget {
  position:fixed;
  inset:0;
  z-index:2147483000;
  pointer-events:none;
  isolation:isolate;
}
.pvcopilot-root > #floating-chat-widget > * { pointer-events:auto; }
.pvcopilot-root .pvc-chat-open {
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:10001;
  display:flex;
  align-items:center;
  gap:11px;
  padding:10px 17px 10px 10px;
  border:1px solid rgba(255,255,255,.82);
  border-radius:22px;
  background:rgba(255,255,255,.80);
  color:#1c2540;
  cursor:pointer;
  font-family:Archivo,system-ui,sans-serif;
  font-size:15px;
  font-weight:800;
  box-shadow:0 16px 42px rgba(24,44,88,.24),inset 0 1px 0 rgba(255,255,255,.88);
  backdrop-filter:blur(24px) saturate(1.35);
  -webkit-backdrop-filter:blur(24px) saturate(1.35);
}
.pvcopilot-root .pvc-chat-open:hover { transform:translateY(-2px); box-shadow:0 18px 46px rgba(24,44,88,.28); }
.pvcopilot-root .pvc-chat-pill-icon {
  display:flex;
  width:38px;
  height:38px;
  align-items:center;
  justify-content:center;
  border-radius:13px;
  background:linear-gradient(135deg,#6fa8ff,#3975ff);
  color:#fff;
  font-size:18px;
  box-shadow:0 7px 18px rgba(47,107,255,.24);
}
.pvcopilot-root .pvc-chat-drawer {
  position:fixed;
  right:24px;
  bottom:92px;
  z-index:10000;
  width:min(440px,calc(100vw - 32px));
  height:min(650px,calc(100dvh - 124px));
  min-width:0;
  overflow:hidden;
  flex-direction:column;
  border:1px solid rgba(255,255,255,.84);
  border-radius:28px;
  background:linear-gradient(155deg,rgba(250,253,255,.96),rgba(238,246,255,.93));
  box-shadow:0 28px 74px rgba(24,44,88,.30),inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter:blur(30px) saturate(1.35);
  -webkit-backdrop-filter:blur(30px) saturate(1.35);
  animation:pvc-chat-pop .18s ease-out;
}
@keyframes pvc-chat-pop {
  from { opacity:0; transform:translateY(10px) scale(.98); }
  to { opacity:1; transform:translateY(0) scale(1); }
}
.pvcopilot-root .pvc-chat-head {
  display:flex;
  flex:0 0 auto;
  align-items:center;
  gap:13px;
  padding:20px 22px;
  border-bottom:1px solid rgba(120,140,180,.20);
}
.pvcopilot-root .pvc-chat-head-icon {
  display:flex;
  width:48px;
  height:48px;
  flex:0 0 48px;
  align-items:center;
  justify-content:center;
  border-radius:16px;
  background:linear-gradient(135deg,#72abff,#3977ff);
  color:#fff;
  font-size:20px;
  box-shadow:0 8px 22px rgba(47,107,255,.22);
}
.pvcopilot-root .pvc-chat-head-copy { min-width:0; flex:1 1 auto; }
.pvcopilot-root .pvc-chat-title { color:#1c2540; font-size:19px; font-weight:850; line-height:1.2; }
.pvcopilot-root .pvc-chat-ready { display:flex; align-items:center; gap:6px; margin-top:4px; color:#19a56f; font-size:13px; font-weight:750; }
.pvcopilot-root .pvc-chat-ready-dot { width:9px; height:9px; border-radius:50%; background:#19a56f; box-shadow:0 0 0 3px rgba(25,165,111,.10); }
.pvcopilot-root .pvc-chat-close {
  display:flex;
  width:42px;
  height:42px;
  flex:0 0 42px;
  align-items:center;
  justify-content:center;
  padding:0;
  border:0;
  border-radius:14px;
  background:rgba(219,229,244,.72);
  color:#53617f;
  cursor:pointer;
  font-size:29px;
  font-weight:300;
  line-height:1;
}
.pvcopilot-root .pvc-chat-close:hover { background:rgba(207,220,240,.92); box-shadow:none; }
.pvcopilot-root #ai-assistant-block,
.pvcopilot-root #agent-chat-wrap { display:flex; min-height:0; flex:1 1 auto; flex-direction:column; }
.pvcopilot-root #agent-chat-wrap { padding:0 !important; margin:0 !important; overflow:hidden; }
.pvcopilot-root #agent-chat-wrap > :first-child { display:none; }
.pvcopilot-root #agent-chat-wrap > :nth-child(2) { display:contents; }
.pvcopilot-root #agent-chat-wrap > :nth-child(2) > :nth-child(2) { display:none; }
.pvcopilot-root #chat-history {
  order:1;
  display:flex;
  min-height:0 !important;
  max-height:none !important;
  flex:1 1 auto;
  flex-direction:column;
  overflow-y:auto;
  padding:22px !important;
  background:transparent !important;
  overscroll-behavior:contain;
}
.pvcopilot-root .pvc-chat-welcome {
  max-width:82%;
  padding:16px 18px;
  border:1px solid rgba(255,255,255,.86);
  border-radius:20px 20px 20px 6px;
  background:rgba(255,255,255,.76);
  color:#263451;
  font-family:Archivo,system-ui,sans-serif;
  font-size:15px;
  line-height:1.55;
  box-shadow:0 8px 22px rgba(30,58,120,.055);
}
.pvcopilot-root .pvc-chat-prompts {
  order:2;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  flex:0 0 auto;
  gap:8px;
  margin:0 !important;
  padding:14px 18px 10px;
  border-top:1px solid rgba(120,140,180,.18);
  background:rgba(244,249,255,.58);
}
.pvcopilot-root .pvc-chat-prompts > :first-child { display:none; }
.pvcopilot-root .pvc-chat-prompt { min-width:0; padding:10px 12px; overflow:hidden; border-radius:13px;
  border:1px solid rgba(79,139,255,.30); color:#2f6bff; background:rgba(255,255,255,.68);
  font-size:12px; line-height:1.25; font-weight:700; text-align:left; text-overflow:ellipsis;
  white-space:nowrap; cursor:pointer; }
.pvcopilot-root .pvc-chat-prompt:hover { background:rgba(79,139,255,.10); border-color:rgba(79,139,255,.52); }
.pvcopilot-root .pvc-chat-input-row {
  order:3;
  display:flex;
  flex:0 0 auto;
  align-items:center;
  gap:10px;
  margin:0 18px 18px;
  padding:9px 10px 9px 16px !important;
  border:1px solid rgba(255,255,255,.86);
  border-radius:18px;
  background:rgba(255,255,255,.82) !important;
  box-shadow:0 8px 22px rgba(30,58,120,.065);
}
.pvcopilot-root .pvc-chat-input { font-size:16px !important; font-weight:500 !important; }
.pvcopilot-root .pvc-chat-send {
  width:48px;
  height:48px;
  flex:0 0 48px;
  padding:0 !important;
  border-radius:16px !important;
  background:linear-gradient(135deg,#4f8bff,#2f6bff) !important;
  color:transparent !important;
  font-size:0 !important;
  box-shadow:0 8px 20px rgba(47,107,255,.28);
}
.pvcopilot-root .pvc-chat-send::after { content:"➤"; color:#fff; font-size:20px; }

/* The closed progress pill is a drag handle too. A short click still opens it. */
.pvcopilot-root .pvc-monitor-toggle { touch-action:none; user-select:none; cursor:grab; }
.pvcopilot-root .pvc-monitor-toggle:active,
.pvcopilot-root .pvc-monitor.is-pill-dragging .pvc-monitor-toggle { cursor:grabbing; }

/* Narrow-screen layout. These selectors intentionally override the component
   inline desktop grids while leaving all desktop dimensions unchanged. */
@media (max-width:760px) {
  .pvcopilot-root { margin-top:-10px; margin-bottom:-30px; font-size:14px; overflow-x:hidden; }
  .pvcopilot-root::before { height:max(calc(var(--pvc-advanced-step-max-height) + 920px), 100dvh); }
  .pvcopilot-shell { width:100%; min-width:0; padding:12px 8px 24px; box-sizing:border-box; justify-content:flex-start; }
  .pvcopilot-root .glass { border-radius:21px; }
  .pvcopilot-root .glass-soft { border-radius:17px; }

  .pvcopilot-root .pvc-landing { padding:0 !important; margin-bottom:12px !important; }
  .pvcopilot-root .pvc-landing-header > div { padding:24px 18px 18px !important; }
  .pvcopilot-root .pvc-upload-section { padding:0 18px 24px !important; }
  .pvcopilot-root .pvc-landing-nav { align-items:flex-start !important; gap:10px !important; margin-bottom:16px !important; }
  .pvcopilot-root .pvc-landing-nav > :first-child { max-width:100%; padding:5px 10px !important; font-size:10.5px !important; }
  .pvcopilot-root .nav { flex-wrap:wrap; gap:14px; }
  .pvcopilot-root .pvc-brand-wordmark { font-size:28px; }
  .pvcopilot-root .nav-pills { width:100%; justify-content:flex-start; flex-wrap:nowrap; gap:0; padding:5px;
    overflow-x:auto; scrollbar-width:none; }
  .pvcopilot-root .nav-pills::-webkit-scrollbar { display:none; }
  .pvcopilot-root .nav-pills .nav-pill { flex:0 0 auto; padding:8px 11px; border-radius:11px; font-size:11px; }
  .pvcopilot-root .pvc-hero-title { font-size:clamp(28px,9vw,38px) !important; line-height:1.08 !important; overflow-wrap:anywhere; }
  .pvcopilot-root .pvc-landing > p { margin-bottom:18px !important; font-size:13.5px !important; }
  .pvcopilot-root .pvc-upload-grid { grid-template-columns:minmax(0,1fr) !important; gap:16px !important; }
  .pvcopilot-root .pvc-upload-host { min-height:210px; }
  .pvcopilot-root .pvc-upload { padding:46px 16px 24px !important; min-height:210px !important; }
  .pvcopilot-root .pvc-upload .pvc-up-icon { width:48px !important; height:48px !important; margin-bottom:10px !important; }
  .pvcopilot-root #example-row { gap:8px !important; }
  .pvcopilot-root .pvc-analyze-header { align-items:flex-start; flex-wrap:wrap; gap:10px; }
  .pvcopilot-root .pvc-analyze-card { padding:16px 12px 20px !important; }
  .pvcopilot-root .pvc-mode-tabs-top { margin-left:auto; }
  .pvcopilot-root .pvc-mode-tabs-top button { padding:9px 12px !important; font-size:12px !important; }
  .pvcopilot-root .pvc-simple-start { padding:28px 14px 24px !important; }
  .pvcopilot-root .pvc-simple-heading { font-size:21px; }
  .pvcopilot-root .pvc-simple-description { font-size:13.5px; }
  .pvcopilot-root .pvc-simple-method-cards { grid-template-columns:minmax(0,1fr); }
  .pvcopilot-root .pvc-simple-method-card-content { min-height:88px; padding:14px; }
  .pvcopilot-root .pvc-simple-method-logo { height:22px; }

  .pvcopilot-root .pvc-workflow { padding:16px 12px 20px !important; }
  .pvcopilot-root .pvc-workflow-header { align-items:flex-start !important; gap:12px !important; margin-bottom:16px !important; }
  .pvcopilot-root .pvc-workflow-header > :first-child { min-width:0; }
  .pvcopilot-root .pvc-workflow-header > :first-child > :last-child { overflow-wrap:anywhere; font-size:14px !important; }
  .pvcopilot-root .pvc-workflow-header > :last-child { margin-left:auto; }
  .pvcopilot-root .pvc-workflow-header > :last-child button { padding:8px 11px !important; font-size:12px !important; }
  .pvcopilot-root .pvc-simple-methods { flex-direction:column !important; width:100%; max-width:none !important; }
  .pvcopilot-root .pvc-simple-methods > button { width:100%; flex:none !important; }
  .pvcopilot-root .pvc-simple-start { padding:24px 12px !important; }
  .pvcopilot-root .pvc-simple-settings { max-width:none !important; padding:13px 12px !important; }
  .pvcopilot-root .pvc-form-grid,
  .pvcopilot-root .pvc-two-col-grid,
  .pvcopilot-root .pvc-three-col-grid,
  .pvcopilot-root .pvc-result-grid { grid-template-columns:minmax(0,1fr) !important; }
  .pvcopilot-root .pvc-result-grid { gap:12px !important; }
  .pvcopilot-root .pvc-result-grid .js-plotly-plot,
  .pvcopilot-root .pvc-result-grid .plot-container { width:100% !important; max-width:100% !important; }

  .pvcopilot-root .pvc-advanced-layout { grid-template-columns:minmax(0,1fr) !important; gap:12px !important; }
  .pvcopilot-root .pvc-advanced-rail { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px !important; }
  .pvcopilot-root .pvc-advanced-rail > .pvc-advanced-rail-card { min-width:0; min-height:58px; gap:8px !important; padding:9px !important; border-radius:13px !important; }
  .pvcopilot-root .pvc-advanced-rail > .pvc-advanced-rail-card > :first-child { width:31px !important; height:31px !important; flex-basis:31px !important; border-radius:10px !important; font-size:12px !important; }
  .pvcopilot-root .pvc-advanced-rail > .pvc-advanced-rail-card > :nth-child(2) > :first-child { font-size:11px !important; overflow-wrap:anywhere; }
  .pvcopilot-root .pvc-advanced-rail > .pvc-advanced-rail-card > :nth-child(2) > :last-child,
  .pvcopilot-root .pvc-advanced-rail > .pvc-advanced-rail-card > :last-child { display:none; }
  .pvcopilot-root .pvc-advanced-panel { min-height:360px !important; padding:20px 14px !important; max-height:calc(100dvh - 180px) !important; }
  .pvcopilot-root .pvc-advanced-panel-title { font-size:23px !important; }
  .pvcopilot-root .pvc-panel-busy-host { border-radius:17px; }
  .pvcopilot-root .pvc-panel-busy-host > .pvc-busy { border-radius:17px; }
  .pvcopilot-root .pvc-sel-block { min-width:0; }
  .pvcopilot-root img, .pvcopilot-root svg { max-width:100%; }
  .pvcopilot-root table { display:block; max-width:100%; overflow-x:auto; }
  .pvcopilot-root .pvc-modal-overlay { padding:10px 8px; align-items:flex-start; }
  .pvcopilot-root .pvc-modal { max-height:calc(100dvh - 20px); padding:22px 14px 20px; border-radius:20px; }

  .pvcopilot-root .pvc-chat-open { right:12px !important; bottom:12px !important; padding:9px 12px 9px 9px !important;
    gap:7px !important; border-radius:16px !important; font-size:12px !important; }
  .pvcopilot-root .pvc-chat-drawer { right:8px !important; bottom:68px !important; width:calc(100vw - 16px) !important;
    max-width:none !important; height:min(620px,calc(100dvh - 84px)) !important; border-radius:20px !important; }
  .pvcopilot-root .pvc-chat-head { padding:12px 13px !important; gap:9px !important; }
  .pvcopilot-root .pvc-chat-head > :first-child { width:34px !important; height:34px !important; border-radius:11px !important; }
  .pvcopilot-root .pvc-chat-messages { padding:13px !important; gap:10px !important; }
  .pvcopilot-root .pvc-chat-composer { padding:9px 10px 10px !important; }
  .pvcopilot-root .pvc-chat-prompts { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-bottom:8px; }
  .pvcopilot-root .pvc-chat-prompt { padding:7px 8px; font-size:9.5px; }
  .pvcopilot-root .pvc-chat-input-row { padding-left:12px !important; }
  .pvcopilot-root .pvc-chat-input-row input { font-size:16px !important; }

  .pvcopilot-root .pvc-monitor-panel { width:min(430px,calc(100vw - 16px)); min-width:min(280px,calc(100vw - 16px));
    height:min(440px,calc(100dvh - 130px)); max-height:calc(100dvh - 76px); }
  .pvcopilot-root .pvc-monitor-head { padding:12px 11px 10px; gap:7px; }
  .pvcopilot-root .pvc-monitor-title { font-size:13px; }
  .pvcopilot-root .pvc-monitor-subtitle { display:none; }
  .pvcopilot-root .pvc-monitor-copy { padding:0 8px; font-size:9px; }
  .pvcopilot-root .pvc-monitor-grid { grid-template-columns:1fr; }

  /* Phone workflow rail: full-width vertical state cards. */
  .pvcopilot-root .pvc-advanced-rail {
    position:static !important;
    display:flex !important;
    width:100%;
    flex-direction:column;
    gap:10px !important;
  }
  .pvcopilot-root .pvc-advanced-rail > .pvc-advanced-rail-card {
    width:100%;
    min-height:78px;
    gap:13px !important;
    padding:12px 14px !important;
    border:1px solid rgba(255,255,255,.76) !important;
    border-radius:20px !important;
    background:rgba(255,255,255,.34);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.62);
  }
  .pvcopilot-root .pvc-advanced-rail > .pvc-advanced-rail-card > :first-child {
    width:48px !important;
    height:48px !important;
    flex-basis:48px !important;
    border-radius:15px !important;
    font-size:15px !important;
  }
  .pvcopilot-root .pvc-advanced-rail > .pvc-advanced-rail-card > :nth-child(2) > :first-child {
    font-size:15px !important;
    line-height:1.22 !important;
    overflow-wrap:normal;
  }
  .pvcopilot-root .pvc-advanced-rail > .pvc-advanced-rail-card > :nth-child(2) > :last-child {
    display:block !important;
    margin-top:3px;
    font-size:12.5px !important;
    line-height:1.25;
  }
  .pvcopilot-root .pvc-advanced-rail > .pvc-advanced-rail-card > :last-child {
    display:block !important;
    margin-left:auto;
    font-size:22px;
  }
  .pvcopilot-root .pvc-advanced-rail-card.is-active,
  .pvcopilot-root .pvc-advanced-rail-card.is-active.is-done,
  .pvcopilot-root .pvc-advanced-rail-card.is-done,
  .pvcopilot-root .pvc-advanced-rail-card.is-enabled {
    background:rgba(255,255,255,.68);
    color:#1c2540;
    opacity:1;
    box-shadow:0 10px 24px rgba(47,107,255,.08),inset 0 1px 0 rgba(255,255,255,.82);
  }
  .pvcopilot-root .pvc-advanced-rail-card.is-active .pvc-advanced-step-badge {
    background:linear-gradient(135deg,#4f8bff,#2f6bff);
    color:#fff;
    box-shadow:0 7px 17px rgba(47,107,255,.22);
  }
  .pvcopilot-root .pvc-advanced-rail-card.is-done .pvc-advanced-step-badge,
  .pvcopilot-root .pvc-advanced-rail-card.is-active.is-done .pvc-advanced-step-badge {
    background:#20b986;
    color:#fff;
    box-shadow:none;
  }
  .pvcopilot-root .pvc-advanced-rail-card.is-locked {
    background:rgba(255,255,255,.23);
    color:#7b89a2;
    opacity:.48;
  }
  .pvcopilot-root .pvc-advanced-rail-card:not(:disabled):hover { transform:none; }

  /* Let the active phone step grow naturally instead of creating a nested
     scroll area, and keep every content surface inside the viewport. */
  .pvcopilot-root .pvc-advanced-panel {
    width:100%;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    box-sizing:border-box;
    padding:22px 14px 24px !important;
    border-radius:21px;
  }
  .pvcopilot-root .pvc-advanced-panel-kicker { font-size:10.5px; }
  .pvcopilot-root .pvc-advanced-panel-title {
    margin:11px 0 7px;
    font-size:24px !important;
    line-height:1.12;
  }
  .pvcopilot-root .pvc-advanced-panel-description {
    margin-bottom:20px;
    font-size:13px;
    line-height:1.5;
  }
  .pvcopilot-root #agent-data-wrap #analyze-btn,
  .pvcopilot-root #agent-filter-wrap #filter-btn,
  .pvcopilot-root #agent-calc-wrap #run-btn,
  .pvcopilot-root #agent-code-wrap #generate-code-btn,
  .pvcopilot-root .pvc-next-step-button {
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box;
  }
  .pvcopilot-root .pvc-next-step-button { margin-top:14px; }
  .pvcopilot-root .pvc-step-fold-summary {
    min-height:58px;
    margin-bottom:13px;
    padding:11px 12px;
    border-radius:14px;
  }
  .pvcopilot-root .pvc-step-fold-help { display:none; }
  .pvcopilot-root .pvc-advanced-filter-grid,
  .pvcopilot-root #metric-stat-radio { grid-template-columns:minmax(0,1fr) !important; }
  .pvcopilot-root .pvc-advanced-filter-card { padding:14px 13px 15px; border-radius:15px; }
  .pvcopilot-root #metric-stat-radio > label,
  .pvcopilot-root #metric-pvpro-radio > label {
    min-height:0;
    padding:11px 12px;
    border-radius:15px;
  }
  .pvcopilot-root #advanced-data-body .pvc-step1-mapping-surface,
  .pvcopilot-root #advanced-data-body #data-summary-output > .slide-in-up > div {
    padding:12px 10px !important;
    border-radius:16px !important;
  }
  .pvcopilot-root #advanced-data-body .pvc-var-map-card { padding:9px !important; }
  .pvcopilot-root .pvc-advanced-single-summary,
  .pvcopilot-root .pvc-advanced-pvpro-summary,
  .pvcopilot-root .pvc-advanced-multi-summary {
    min-height:0;
    padding:20px 16px;
    border-radius:19px;
  }
  .pvcopilot-root .pvc-advanced-result-chart-card,
  .pvcopilot-root .pvc-advanced-pvpro-trends {
    padding:16px 10px 8px;
    border-radius:19px;
  }
  .pvcopilot-root .pvc-advanced-single-rate-value,
  .pvcopilot-root .pvc-advanced-pvpro-rate-value { font-size:44px; }
  .pvcopilot-root .pvc-advanced-multi-rate { font-size:36px; }
  .pvcopilot-root .pvc-ai-diagnostic-card { padding:18px 15px; border-radius:19px; }
  .pvcopilot-root .pvc-ai-diagnostic-button { width:100%; min-width:0; }
  .pvcopilot-root .pvc-simple-yoy-result,
  .pvcopilot-root .pvc-simple-pvpro-result { gap:12px; }
  .pvcopilot-root .pvc-yoy-summary-card,
  .pvcopilot-root .pvc-simple-pvpro-summary {
    min-height:0;
    padding:22px 17px;
    border-radius:20px;
  }
  .pvcopilot-root .pvc-yoy-chart-card,
  .pvcopilot-root .pvc-simple-pvpro-trends { border-radius:20px; }
  .pvcopilot-root .pvc-yoy-rate-value,
  .pvcopilot-root .pvc-simple-pvpro-rate-value { font-size:48px; }
  .pvcopilot-root pre { max-width:100%; overflow-x:auto; box-sizing:border-box; font-size:11px !important; }
}

@media (max-width:430px) {
  .pvcopilot-root .pvc-workflow-header { flex-direction:column !important; }
  .pvcopilot-root .pvc-workflow-header > :last-child { align-self:flex-end; margin-left:0; }
  .pvcopilot-root .pvc-chat-prompts { grid-template-columns:minmax(0,1fr); }
  .pvcopilot-root .pvc-chat-prompt { white-space:nowrap; }
  .pvcopilot-shell { padding-left:6px; padding-right:6px; }
  .pvcopilot-root .pvc-analyze-card { padding:14px 10px 18px !important; }
  .pvcopilot-root .pvc-advanced-rail > .pvc-advanced-rail-card { min-height:74px; padding:11px 12px !important; }
  .pvcopilot-root .pvc-advanced-panel { padding:19px 11px 22px !important; }
  .pvcopilot-root .pvc-mode-tabs-top { width:100%; margin-left:0; }
  .pvcopilot-root .pvc-mode-tabs-top > div { width:100%; }
  .pvcopilot-root .pvc-mode-tabs-top button { flex:1 1 50% !important; }
  .pvcopilot-root .pvc-simple-pvpro-params { grid-template-columns:minmax(0,1fr); }
  .pvcopilot-root .pvc-simple-result-actions { width:100%; }
}
