/* Epimetheus — "Demo data" page. Builds on style.css tokens and components. */

.sr-only{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}

/* ---------- Top navigation (Environments | Demo data) ---------- */
.topnav{display:flex; gap:4px; margin-left:10px}
.topnav a{color:var(--muted); padding:6px 10px; border-radius:var(--radius-sm); font-weight:500}
.topnav a:hover{color:var(--text); background:var(--bg-3); text-decoration:none}
.topnav a[aria-current="page"]{color:var(--text); background:var(--bg-3)}
a.login-logo:hover{text-decoration:none}

/* ---------- Page header ---------- */
.dd-hero{margin-bottom:22px}
.dd-hero h1{font-size:22px; margin-bottom:4px}
.dd-hero p{margin:0; max-width:760px; font-size:14.5px}

/* ---------- Get started ---------- */
.dd-steps{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px}
.dd-step{display:flex; gap:14px; background:var(--bg-2); border:1px solid var(--line); border-radius:var(--radius); padding:16px 18px}
.dd-step-num{flex:none; width:28px; height:28px; border-radius:50%; background:rgba(59,130,246,.16); color:#9ec5fe;
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px}
.dd-step-body{flex:1; min-width:0}
.dd-step-body p{margin:4px 0 0}
.dd-step-title{font-weight:600; font-size:14.5px; display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px}
.dd-ok{color:#7ee2a0; font-weight:600; font-size:13px}
.dd-no{color:#ff8085; font-weight:600; font-size:13px}
.dd-how{margin-top:10px}
.dd-how summary{cursor:pointer; color:var(--primary); font-weight:500; width:max-content}
.dd-how ol{margin:10px 0 0; padding-left:20px; display:flex; flex-direction:column; gap:8px; font-size:13.5px}
.dd-copyrow{display:flex; gap:8px; align-items:center; margin-top:6px; flex-wrap:wrap}
.dd-code{font-family:var(--mono); font-size:12.5px; background:var(--bg); border:1px solid var(--line-2);
  border-radius:var(--radius-sm); padding:6px 10px; word-break:break-all}
.dd-prompt{display:flex; gap:12px; align-items:center; margin-top:8px; background:var(--bg);
  border:1px solid var(--line-2); border-left:3px solid var(--primary); border-radius:var(--radius-sm); padding:10px 12px}
.dd-prompt-text{margin:0; flex:1; font-size:14px; line-height:1.5}
.dd-prompt .btn{flex:none}
.dd-prompt-sm .dd-prompt-text{font-size:13px}
.dd-or{margin-top:14px}

/* ---------- Datasets ---------- */
.dd-filters{display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:12px}
.dd-filters select,.dd-filters input{width:auto; margin:0}
.dd-filters select{flex:0 1 190px}
.dd-filters input{flex:1 1 200px; min-width:160px}
.dd-seg{display:inline-flex; border:1px solid var(--line-2); border-radius:var(--radius-sm); overflow:hidden}
.dd-seg button{font:inherit; font-size:13px; font-weight:500; color:var(--muted); background:transparent; border:none;
  padding:7px 13px; cursor:pointer; border-right:1px solid var(--line-2)}
.dd-seg button:last-child{border-right:none}
.dd-seg button:hover{color:var(--text); background:var(--bg-3)}
.dd-seg button.active{color:#fff; background:var(--primary)}

.dd-table-wrap{background:var(--bg-2); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden}
.dd-table{width:100%; border-collapse:collapse; font-size:13px}
.dd-table th{text-align:left; color:var(--muted); font-weight:600; font-size:12px; padding:10px 12px;
  border-bottom:1px solid var(--line); background:var(--bg-2); white-space:nowrap}
.dd-table td{padding:11px 12px; border-bottom:1px solid var(--line); vertical-align:top}
.dd-table tbody tr:last-child td{border-bottom:none}
.dd-table tbody tr:hover td{background:rgba(255,255,255,.015)}
.dd-c-name{min-width:200px}
.dd-link{font:inherit; font-weight:600; color:var(--text); background:none; border:none; padding:0; cursor:pointer; text-align:left}
.dd-link:hover{color:var(--primary); text-decoration:underline}
.dd-title{margin-top:2px; max-width:300px}
.dd-fail{color:#ff9599; margin-top:5px; max-width:240px; line-height:1.35}
.dd-c-actions{text-align:right; white-space:nowrap}
.dd-actions{display:inline-flex; gap:6px; align-items:center}
.dd-more{font-weight:700; letter-spacing:1px; min-width:30px}
.dd-legend{margin:10px 2px 0}
.dd-legend strong{color:var(--text); font-weight:600}

.dd-pill{text-transform:none; letter-spacing:0; font-weight:600}
.dd-building::before{animation:ddpulse 1.2s ease-in-out infinite}
@keyframes ddpulse{50%{opacity:.25}}
.dd-tier{text-transform:none; letter-spacing:0; font-weight:600}
.dd-tier-draft{background:var(--bg-3); color:var(--muted)}
.dd-tier-library{background:rgba(59,130,246,.16); color:#9ec5fe}
.dd-tier-golden{background:rgba(210,153,34,.16); color:#f0c674}
.dd-quality{font-size:12.5px; font-weight:500; white-space:nowrap}
.dd-q-val{color:#7ee2a0}
.dd-q-val::before{content:"✓ "}
.dd-q-be{color:var(--muted)}

/* ---------- Upload dataset (page fallback for <name>-source.zip) ---------- */
.dd-upload{margin-bottom:14px}
.dd-drop{display:flex; gap:14px; align-items:center; background:var(--bg-2); border:1px dashed var(--line-2);
  border-radius:var(--radius); padding:14px 18px; cursor:pointer; margin:0; transition:border-color .15s, background .15s}
.dd-drop:hover,.dd-drop:focus-within{border-color:var(--primary)}
.dd-drop.dd-drop-over{border-color:var(--primary); border-style:solid; background:rgba(59,130,246,.08)}
.dd-drop.dd-drop-busy{opacity:.6; pointer-events:none}
.dd-drop-icon{flex:none; width:32px; height:32px; border-radius:50%; background:rgba(59,130,246,.16); color:#9ec5fe;
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:16px}
.dd-drop-text{display:flex; flex-direction:column; gap:2px; min-width:0}
.dd-drop-title{font-weight:600; font-size:14px; color:var(--text)}
.dd-drop-pick{color:var(--primary); font-weight:500}
.dd-drop code{font-family:var(--mono); font-size:12px; background:var(--bg-3); border-radius:4px; padding:0 5px}
.dd-up-result{margin-top:8px; border:1px solid var(--line); border-radius:var(--radius-sm); padding:10px 14px; font-size:13.5px; background:var(--bg-2)}
.dd-up-result ul{margin:6px 0 0; padding-left:20px; display:flex; flex-direction:column; gap:3px; font-size:13px}
.dd-up-title{font-weight:600}
.dd-up-ok{border-color:rgba(46,160,67,.5)}
.dd-up-ok .dd-up-title{color:#7ee2a0}
.dd-up-ok ul{color:var(--muted)}
.dd-up-err{border-color:rgba(229,72,77,.5); background:rgba(229,72,77,.08)}
.dd-up-err .dd-up-title{color:#ff9599}
.dd-up-busy .dd-up-title{color:var(--muted)}
.dd-up-actions{margin-top:10px}
.dd-table tbody tr.dd-row-new td{background:rgba(59,130,246,.08)}
.dd-table tbody tr.dd-row-new td:first-child{box-shadow:inset 3px 0 0 var(--primary)}

/* ---------- popover menu ---------- */
.dd-menu{position:absolute; z-index:80; min-width:210px; background:var(--bg-3); border:1px solid var(--line-2);
  border-radius:var(--radius-sm); box-shadow:0 12px 34px rgba(0,0,0,.5); padding:4px; display:flex; flex-direction:column}
.dd-menu button{font:inherit; font-size:13px; text-align:left; color:var(--text); background:none; border:none;
  padding:8px 10px; border-radius:4px; cursor:pointer}
.dd-menu button:hover:not(:disabled){background:var(--line)}
.dd-menu button:disabled{color:var(--muted-2); cursor:not-allowed}

/* ---------- Summary side panel ---------- */
.dd-panel .job-meta{flex-wrap:wrap}
.dd-panel-actions{display:flex; flex-wrap:wrap; gap:8px; padding:12px 20px; border-bottom:1px solid var(--line)}
.dd-md{flex:1; overflow:auto; padding:6px 20px 30px; font-size:13.5px; line-height:1.55}
.dd-md h2{font-size:17px; margin:16px 0 4px}
.dd-md h3{font-size:14px; margin:20px 0 8px; color:var(--text)}
.dd-md p{margin:6px 0}
.dd-md em{color:var(--muted)}
.dd-md ul,.dd-md ol{margin:6px 0; padding-left:20px}
.dd-md li{margin:3px 0}
.dd-md code{font-family:var(--mono); font-size:12px; background:var(--bg-3); border:1px solid var(--line); border-radius:4px; padding:0 5px}
.dd-md blockquote{margin:8px 0; padding:8px 12px; border-left:3px solid var(--danger); background:rgba(229,72,77,.08); color:#ff9599}
.dd-md-table{overflow-x:auto; margin:6px 0}
.dd-md table{border-collapse:collapse; width:100%; font-size:12.5px}
.dd-md th{text-align:left; color:var(--muted); font-weight:600; padding:6px 8px; border-bottom:1px solid var(--line-2); white-space:nowrap}
.dd-md td{padding:7px 8px; border-bottom:1px solid var(--line); vertical-align:top}

/* ---------- Targets ---------- */
.dd-held{font-weight:600; color:var(--text)}

/* ---------- Demo servers (admin) ---------- */
.dd-srv-head{flex-wrap:wrap}
.dd-srv-head h2{display:flex; align-items:center; gap:8px}
.dd-srv-add{margin-left:auto; align-self:center}
.dd-admin-pill{text-transform:none; letter-spacing:0; font-weight:600; background:rgba(210,153,34,.16); color:#f0c674}
.dd-srv-name{display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px}
.dd-srv-url{display:inline-block; margin-top:2px; word-break:break-all; font-family:var(--mono); font-size:12px}
.dd-srv-table td{line-height:1.45}
.dd-srv-table .dd-ok,.dd-srv-table .dd-no{font-size:13px}
.dd-warn{color:#f0c674}
.dd-form-grid{display:grid; grid-template-columns:1fr 1fr; gap:0 14px}
.dd-hint{margin:2px 0 0; line-height:1.4}
.dd-hint code,.dd-flags code,.dd-cred-intro code{font-family:var(--mono); font-size:12px; background:var(--bg-3); border-radius:4px; padding:0 4px}
.dd-fieldset{border:1px solid var(--line-2); border-radius:var(--radius-sm); padding:4px 14px 12px; margin:16px 0 0}
.dd-fieldset legend{font-size:12px; color:var(--muted); font-weight:500; padding:0 6px}
textarea{font:inherit; width:100%; padding:8px 10px; color:var(--text); background:var(--bg); border:1px solid var(--line-2);
  border-radius:var(--radius-sm); margin:4px 0 2px; resize:vertical; min-height:40px}
textarea:focus{outline:none; border-color:var(--primary); box-shadow:0 0 0 2px rgba(59,130,246,.25)}
.dd-adv{margin-top:14px}
.dd-adv summary{cursor:pointer; color:var(--primary); font-weight:500; font-size:13px; width:max-content}
.dd-flags{margin-top:10px; flex-direction:column; gap:2px}
.dd-cred-intro{margin:0 0 4px}
.dd-test-row{display:flex; gap:10px; align-items:center}
.dd-test-row select{flex:1; margin:0}
.dd-test-row .btn{flex:none}
.dd-test-out{margin-top:14px}
.dd-test-verdict{border:1px solid var(--line); border-radius:var(--radius-sm); padding:10px 14px; font-size:14px}
.dd-test-verdict.dd-up-ok{border-color:rgba(46,160,67,.5); background:rgba(46,160,67,.08)}
.dd-test-verdict.dd-up-ok .dd-up-title{color:#7ee2a0}
.dd-checks{list-style:none; margin:12px 0 0; padding:0; display:flex; flex-direction:column; gap:7px; font-size:13.5px}
.dd-check{display:flex; gap:10px; align-items:baseline}
.dd-check-mark{flex:none; width:18px; text-align:center; font-weight:700}
.dd-check-ok .dd-check-mark{color:#7ee2a0}
.dd-check-no .dd-check-mark{color:#ff8085}
.dd-check-skip{color:var(--muted-2)}
.dd-check .muted{word-break:break-all}
.dd-test-facts{margin-top:12px}
.dd-test-list{margin-top:12px; font-size:13px}
.dd-test-list ul{margin:4px 0 0; padding-left:20px; display:flex; flex-direction:column; gap:3px; color:#c9d1d9}
.dd-confirm-text{margin:0; font-size:14px; line-height:1.55}
@media(max-width:560px){
  .dd-form-grid{grid-template-columns:1fr}
  .dd-srv-add{margin-left:0}
  .dd-table.dd-srv-table tr.dd-row{grid-template-columns:1fr}
  .dd-test-row{flex-direction:column; align-items:stretch}
}

/* ---------- Technologies ---------- */
.dd-tech{display:grid; grid-template-columns:minmax(220px,1fr) 3fr; gap:16px}
.dd-tech-group{background:var(--bg-2); border:1px solid var(--line); border-radius:var(--radius); padding:16px 18px}
.dd-tech-group h3{font-size:14px; display:flex; align-items:center; gap:8px; margin-bottom:4px}
.dd-tech-group h3 .pill{text-transform:none; letter-spacing:0}
.dd-tech-group > p{margin:0 0 12px}
.dd-tech-sub{font-size:11px; text-transform:uppercase; letter-spacing:.4px; color:var(--muted-2); margin:14px 0 8px}
.dd-chips{display:flex; flex-wrap:wrap; gap:6px}
.dd-chip{font-size:12.5px; padding:4px 10px; border-radius:999px; background:var(--bg-3); border:1px solid var(--line); color:var(--text)}
#techValidated .dd-chip{border-color:rgba(46,160,67,.5); background:rgba(46,160,67,.12); color:#7ee2a0; font-weight:600}

/* ---------- Example prompts ---------- */
.dd-prompt-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:12px; margin-bottom:16px}
.dd-prompt-card{background:var(--bg-2); border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px;
  display:flex; flex-direction:column; gap:8px}
.dd-prompt-card .dd-prompt-text{font-size:13.5px}
.dd-prompt-card .btn{align-self:flex-start; margin-top:auto}
.dd-prompt-label{font-size:11px; text-transform:uppercase; letter-spacing:.4px; color:#9ec5fe; font-weight:700}
.dd-tips ul{margin:8px 0 0; padding-left:20px; display:flex; flex-direction:column; gap:6px; font-size:13.5px}

/* ---------- FAQ ---------- */
.dd-faq{display:flex; flex-direction:column; gap:8px}
.dd-faq details{background:var(--bg-2); border:1px solid var(--line); border-radius:var(--radius-sm); padding:0 16px}
.dd-faq summary{cursor:pointer; padding:12px 0; font-weight:500; list-style-position:inside}
.dd-faq details[open] summary{border-bottom:1px solid var(--line)}
.dd-faq p{margin:10px 0 14px; color:#c9d1d9; font-size:13.5px; line-height:1.55}
.dd-faq code{font-family:var(--mono); font-size:12px; background:var(--bg-3); border-radius:4px; padding:0 5px}

/* ---------- Activity ---------- */
.dd-act{cursor:default}
.dd-act .dd-act-what{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.dd-act .job-who{margin-left:0}

/* ---------- Responsive ---------- */
@media(max-width:980px){
  .dd-tech{grid-template-columns:1fr}
}
@media(max-width:860px){
  /* Dataset table becomes one card per dataset. */
  .dd-table-wrap{background:none; border:none; overflow:visible}
  .dd-table thead{display:none}
  .dd-table,.dd-table tbody{display:block}
  .dd-table tr.dd-row{display:grid; grid-template-columns:1fr 1fr; gap:8px 14px; background:var(--bg-2);
    border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px; margin-bottom:10px}
  .dd-table td{padding:0; border:none}
  .dd-table td[data-label]::before{content:attr(data-label); display:block; font-size:11px; color:var(--muted-2);
    text-transform:uppercase; letter-spacing:.4px; font-weight:600; margin-bottom:2px}
  .dd-table td.dd-c-name{grid-column:1 / -1; min-width:0}
  .dd-table td.dd-c-name::before{display:none}
  .dd-table td.dd-c-actions{grid-column:1 / -1; text-align:left; padding-top:10px; border-top:1px solid var(--line)}
  .dd-table tbody tr:hover td{background:none}
  .dd-table tbody tr.dd-row-new{border-color:var(--primary)}
  .dd-table tbody tr.dd-row-new td{background:none; box-shadow:none}
}
@media(max-width:700px){
  .topnav{margin-left:0}
  .topbar{flex-wrap:wrap}
  .topbar-left{flex-wrap:wrap}
}
@media(max-width:560px){
  .dd-hero h1{font-size:20px}
  .dd-step{padding:14px; gap:10px}
  .dd-prompt{flex-direction:column; align-items:stretch}
  .dd-prompt .btn{align-self:flex-start}
  .dd-filters select{flex:1 1 45%}
  .dd-seg{width:100%}
  .dd-seg button{flex:1; padding:7px 6px}
  .dd-prompt-grid{grid-template-columns:1fr}
  .userchip .role-pill{display:none}
  .dd-act{display:grid; grid-template-columns:auto 1fr auto; gap:4px 10px}
  .dd-act .dd-act-what{grid-column:1 / -1; grid-row:2; white-space:normal}
  .dd-act .job-who{grid-row:3; grid-column:1 / 3}
  .dd-act .job-when{grid-row:3; grid-column:3; text-align:right; min-width:0}
}

/* Sticky topbar must not cover a section reached by #anchor. */
.dd .section{scroll-margin-top:72px}
@media(max-width:560px){ .dd .section{scroll-margin-top:118px} }
.dd-act .pill{justify-self:start}
