/* MCP interaction and responsive refinements. Loaded after mcp.css. */
[hidden]{display:none!important}

.mcp-model-preview-live .mcp-preview-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:820px){.mcp-model-preview-live .mcp-preview-tabs{grid-template-columns:1fr}}
.mcp-preview-video img.is-switching{opacity:.34;transform:scale(1.015);filter:grayscale(1)}
.mcp-preview-video img{transition:opacity .18s ease,transform .18s ease,filter .18s ease}
.mcp-preview-window.is-processing-example .mcp-preview-context>div{opacity:.52;position:relative}
.mcp-preview-window.is-processing-example .mcp-preview-context>div:after{content:"";position:absolute;left:0;bottom:0;width:34%;height:1px;background:var(--red);animation:previewRead .7s ease-in-out infinite alternate}

.mcp-context-row.is-progress{cursor:default;opacity:1;transform:none;border-color:#2a2a2a;background:#080808;position:relative;overflow:hidden}
.mcp-context-row.is-progress:hover{border-color:#2a2a2a;background:#080808}
.mcp-context-row.is-progress:after{content:"";position:absolute;left:0;bottom:0;width:26%;height:1px;background:var(--red);animation:previewRead 1s ease-in-out infinite alternate}
.mcp-context-error{padding:22px;border:1px solid #5a2b27;background:#0d0504}
.mcp-context-error>span{display:block;margin-bottom:10px;color:var(--red);font-size:8px;font-weight:700;letter-spacing:.14em}
.mcp-context-error>strong{display:block;color:#fff;font-size:16px;line-height:1.35}
.mcp-context-error>p{margin:10px 0 0;color:#b48b86;font-size:11px;line-height:1.5}
@keyframes previewRead{from{transform:translateX(0)}to{transform:translateX(190%)}}

/* The Lab starts as a calm setup surface; the dense workspace appears on demand. */
.mcp-demo-page .mcp-lab-shell{width:min(1480px,calc(100% - 80px));max-width:1480px;padding:48px 0 80px}
.mcp-demo-page .mcp-lab-head{grid-template-columns:minmax(0,1fr) minmax(300px,520px);gap:56px;margin-bottom:28px}
.mcp-demo-page .mcp-lab-head h1{max-width:820px;font-size:clamp(52px,6.4vw,96px);line-height:.88}
.mcp-demo-page .mcp-lab-head>p{max-width:500px;font-size:clamp(15px,1.2vw,18px);line-height:1.55}
.mcp-demo-page .mcp-live-input{margin-bottom:14px;padding:20px 22px}
.mcp-demo-page .mcp-live-input>label{margin-bottom:12px;font-size:10px}
.mcp-demo-page .mcp-live-input-row{gap:12px}
.mcp-demo-page .mcp-live-input input{height:56px;padding:0 17px;font-size:14px}
.mcp-demo-page .mcp-live-input .mcp-button{min-width:156px;min-height:56px;font-size:10px}
.mcp-demo-page button.mcp-button{color:#fff;cursor:pointer}
.mcp-demo-page button.mcp-button:disabled{opacity:.5;cursor:wait}
.mcp-demo-page .mcp-live-meta{margin-top:12px;font-size:9px;line-height:1.35}
.mcp-demo-page .mcp-example-picker{grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--line)}
.mcp-demo-page .mcp-example{min-height:82px;padding:13px;gap:13px}
.mcp-demo-page .mcp-example-prompt{margin:23px 0 9px;color:#777;font-size:10px;font-weight:700;letter-spacing:.14em}
.mcp-demo-page .mcp-example b{font-size:12px;white-space:normal;line-height:1.25}
.mcp-lab-empty{display:flex;align-items:center;justify-content:space-between;gap:32px;margin-top:18px;padding:28px 30px;border:1px solid var(--line);background:#050505}
.mcp-empty-copy{display:grid;grid-template-columns:42px minmax(0,1fr);align-items:start;gap:18px;max-width:760px}
.mcp-empty-mark{width:42px;height:42px;display:grid;place-items:center;border:1px solid #3a3a3a;border-radius:50%;color:var(--red);font-size:9px;font-weight:800;letter-spacing:.08em}
.mcp-empty-copy span{display:block;color:var(--red);font-size:9px;font-weight:700;letter-spacing:.14em}
.mcp-empty-copy h2{margin:8px 0 0;font-size:clamp(22px,2.4vw,34px);line-height:1;letter-spacing:-.04em}
.mcp-empty-copy p{max-width:600px;margin:10px 0 0;color:#999;font-size:13px;line-height:1.55}
.mcp-empty-actions{display:flex;align-items:flex-end;flex-direction:column;gap:20px}
.mcp-empty-flow{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:9px;color:#888;font-size:9px;font-weight:700;letter-spacing:.12em;white-space:nowrap}
.mcp-empty-flow i{color:var(--red);font-style:normal}
.mcp-empty-buy{color:#fff;white-space:nowrap}
.mcp-lab-results{margin-top:24px}
.mcp-lab-results .mcp-lab-caption{margin-top:16px}
.mcp-lab-actions{align-items:center;gap:24px}
.mcp-lab-links{display:flex;align-items:center;flex-wrap:wrap;gap:20px}
.mcp-lab-buy{color:#fff}
.mcp-demo-page .mcp-chat-compose input:disabled{cursor:not-allowed;color:#777}
.mcp-demo-page .mcp-chat-compose button:disabled{cursor:not-allowed;color:#4e2522;background:transparent}
.mcp-demo-page .mcp-video-frame video{width:100%;height:100%;display:block;object-fit:cover;background:#090909}
.mcp-demo-page .mcp-video-frame.has-video .mcp-play{display:none}

@media(max-width:1180px){
  .mcp-demo-page .mcp-lab-shell{width:min(1480px,calc(100% - 64px))}
  .mcp-demo-page .mcp-lab-head{gap:36px}
  .mcp-demo-page .mcp-example-picker{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mcp-demo-page .mcp-example:nth-child(2){border-right:0}
  .mcp-demo-page .mcp-example:nth-child(-n+2){border-bottom:1px solid var(--line)}
  .mcp-demo-page .mcp-example:nth-child(3),.mcp-demo-page .mcp-example:nth-child(4){border-top:0}
}
@media(max-width:820px){
  .mcp-demo-page .mcp-lab-shell{width:calc(100% - 40px);padding:36px 0 60px}
  .mcp-demo-page .mcp-lab-head{grid-template-columns:1fr;gap:18px;margin-bottom:24px}
  .mcp-demo-page .mcp-lab-head h1{font-size:clamp(44px,10.8vw,70px);line-height:.9}
  .mcp-demo-page .mcp-lab-head>p{max-width:620px;font-size:15px}
  .mcp-demo-page .mcp-live-input{padding:17px}
  .mcp-demo-page .mcp-live-input-row{grid-template-columns:1fr}
  .mcp-demo-page .mcp-live-input .mcp-button{width:100%}
  .mcp-demo-page .mcp-live-meta{align-items:flex-start;flex-direction:column;gap:7px}
  .mcp-lab-empty{align-items:flex-start;flex-direction:column;gap:24px;padding:23px}
  .mcp-empty-actions{align-items:flex-start}
  .mcp-empty-flow{justify-content:flex-start}
  .mcp-lab-results{margin-top:20px}
  .mcp-lab-actions{align-items:flex-start;flex-direction:column;gap:18px}
  .mcp-lab-links{align-items:flex-start;flex-direction:column;gap:12px}
}
@media(max-width:520px){
  .mcp-demo-page .mcp-lab-shell{width:calc(100% - 32px);padding-top:28px}
  .mcp-demo-page .mcp-lab-head h1{font-size:clamp(38px,11.2vw,54px);letter-spacing:-.04em}
  .mcp-demo-page .mcp-lab-head>p{font-size:14px}
  .mcp-demo-page .mcp-live-input{padding:15px}
  .mcp-demo-page .mcp-live-input input{height:52px;font-size:13px}
  .mcp-demo-page .mcp-live-input .mcp-button{min-height:52px}
  .mcp-demo-page .mcp-example-picker{grid-template-columns:1fr 1fr}
  .mcp-demo-page .mcp-example{min-height:74px;grid-template-columns:48px 1fr;padding:10px;gap:9px}
  .mcp-demo-page .mcp-example img{width:48px;height:42px}
  .mcp-demo-page .mcp-example small{font-size:7px}
  .mcp-demo-page .mcp-example b{font-size:10px}
  .mcp-demo-page .mcp-example-prompt{margin-top:20px;font-size:9px}
  .mcp-lab-empty{padding:20px}
  .mcp-empty-copy{grid-template-columns:34px minmax(0,1fr);gap:12px}
  .mcp-empty-mark{width:34px;height:34px;font-size:8px}
  .mcp-empty-copy h2{font-size:24px}
  .mcp-empty-copy p{font-size:13px}
  .mcp-empty-flow{font-size:8px;gap:6px}
}
@media(max-width:390px){
  .mcp-demo-page .mcp-example-picker{grid-template-columns:1fr}
  .mcp-demo-page .mcp-example,.mcp-demo-page .mcp-example:nth-child(2){border-right:0;border-bottom:1px solid var(--line)}
  .mcp-demo-page .mcp-example:last-child{border-bottom:0}
  .mcp-empty-flow{white-space:normal;line-height:1.5}
}

/* The lab's loading state mirrors the backend's public milestones. The
   thumbnail remains visible while the cards below progress from fetch to
   understanding to the structured project output. */
.mcp-progress-stack{display:grid;gap:8px;padding:0 14px 14px}
.mcp-progress-step{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:10px;padding:12px 13px;border:1px solid #242424;background:#080808;opacity:.55;position:relative;overflow:hidden}
.mcp-progress-step:before{content:"";position:absolute;inset:0 auto 0 0;width:2px;background:#3a3a3a}
.mcp-progress-step.is-active{border-color:#63302c;background:#100807;opacity:1}
.mcp-progress-step.is-active:before{background:var(--red);animation:pulse .7s ease infinite alternate}
.mcp-progress-step.is-complete{opacity:.8}
.mcp-progress-step.is-complete:before{background:#8e4d47}
.mcp-progress-index{width:24px;height:24px;display:grid;place-items:center;border:1px solid #343434;border-radius:50%;color:#777;font-size:7px;font-weight:700;letter-spacing:.08em}
.mcp-progress-step.is-active .mcp-progress-index{border-color:var(--red);color:#fff}
.mcp-progress-step strong{display:block;color:#ddd;font-size:9px;letter-spacing:.12em}
.mcp-progress-step p{margin:4px 0 0;color:#777;font-size:9px;line-height:1.4}
.mcp-progress-step small{color:#555;font-size:7px;font-weight:700;letter-spacing:.12em}
.mcp-progress-step.is-active small{color:var(--red)}

/* Structured project output is the first-class view; long raw evidence is
   still available by selecting its card instead of taking over the screen. */
.mcp-overview-body{display:grid;gap:10px}
.mcp-overview-story{margin:0;color:#d6d6d6;font-size:11px;line-height:1.55}
.mcp-overview-takeaway,.mcp-overview-next{display:grid;gap:6px;padding:11px 12px;border-left:2px solid var(--red);background:#100807}
.mcp-overview-takeaway span,.mcp-overview-next>span{color:var(--red);font-size:7px;font-weight:700;letter-spacing:.14em}
.mcp-overview-takeaway strong,.mcp-overview-next strong{color:#f0f0f0;font-size:11px;line-height:1.4}
.mcp-overview-section{padding-top:9px;border-top:1px solid #242424}
.mcp-overview-section h4{margin:0 0 7px;color:#777;font-size:8px;letter-spacing:.13em;text-transform:uppercase}
.mcp-overview-section ul{display:grid;gap:6px;margin:0;padding:0;list-style:none}
.mcp-overview-section li{display:grid;gap:3px;padding:7px 8px;border:1px solid #252525;background:#080808}
.mcp-overview-section li:before{display:none}
.mcp-overview-section li strong{color:#ddd;font-size:9px}
.mcp-overview-section li span{color:#999;font-size:9px;line-height:1.4}
.mcp-overview-next ol{display:grid;gap:4px;margin:2px 0 0;padding-left:18px;color:#aaa;font-size:9px;line-height:1.4}
.mcp-context-row.is-raw:not(.is-selected) .mcp-raw-copy{max-height:142px;overflow:hidden;position:relative}
.mcp-context-row.is-raw:not(.is-selected) .mcp-raw-copy:after{content:"";position:absolute;left:0;right:0;bottom:0;height:30px;background:#0a0a0a;border-top:1px solid #202020}
.mcp-context-row.is-selected .mcp-raw-copy{max-height:none}
.mcp-context-row.is-raw:not(.is-selected):after{content:"CLICK TO READ ALL";position:absolute;right:11px;bottom:9px;padding:4px 5px;background:#0a0a0a;color:#888;font-size:6px;font-weight:700;letter-spacing:.1em}
.mcp-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.mcp-detail-grid dd{overflow-wrap:anywhere;line-height:1.35}
.mcp-ordered-list,.mcp-roadmap-list{counter-reset:mcp-step}
.mcp-ordered-list li,.mcp-roadmap-list li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:10px;padding:9px 0 9px 30px;border-left:0;border-bottom:1px solid #202020;position:relative}
.mcp-ordered-list li:last-child,.mcp-roadmap-list li:last-child{border-bottom:0}
.mcp-ordered-list li:before,.mcp-roadmap-list li:before{content:counter(mcp-step,decimal-leading-zero);counter-increment:mcp-step;position:absolute;left:0;top:9px;margin:0;color:var(--red);font-size:8px;font-weight:700;letter-spacing:.08em}
.mcp-ordered-list li strong,.mcp-roadmap-list li strong{display:block;color:#eee;font-size:10px;line-height:1.35}
.mcp-ordered-list li p,.mcp-roadmap-list li p{margin:4px 0 0;color:#999;font-size:9px;line-height:1.45}
.mcp-ordered-list li small,.mcp-roadmap-list li small{color:#777;font-size:7px;letter-spacing:.1em;white-space:nowrap}
.mcp-roadmap-title{display:block;color:#eee;font-size:11px;line-height:1.35}
.mcp-roadmap-summary{margin:5px 0 10px;color:#999;font-size:9px;line-height:1.45}
.mcp-source-copy p{overflow-wrap:anywhere;word-break:break-word}

@media(max-width:520px){
  .mcp-progress-step{grid-template-columns:26px minmax(0,1fr);gap:8px;padding:10px}
  .mcp-progress-step small{grid-column:2}
  .mcp-progress-index{width:22px;height:22px}
  .mcp-detail-grid{grid-template-columns:1fr}
  .mcp-context-row.is-raw:not(.is-selected) .mcp-raw-copy{max-height:126px}
  .mcp-ordered-list li,.mcp-roadmap-list li{grid-template-columns:1fr;gap:4px}
  .mcp-ordered-list li small,.mcp-roadmap-list li small{white-space:normal}
}
