/* Demo-only additions on top of the real app's styles.css (copied from frontend/src/index.css). */
:root { --demobar: 32px; }
body { padding-top: var(--demobar); }
.ico { display: inline-flex; flex: none; align-items: center; justify-content: center; }
.ico svg { display: block; }
.pagetitle:focus { outline: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* shell offsets for the demo bar */
.rail { top: var(--demobar); height: calc(100vh - var(--demobar)); }
.topbar { top: var(--demobar); }
@media (max-width: 900px) { .rail { top: var(--demobar); bottom: 0; height: auto; } .railback { top: var(--demobar); } }
.nav a .ico svg { width: 16px; height: 16px; }

/* ---- demo bar ---- */
.demobar { position: fixed; inset: 0 0 auto 0; height: var(--demobar); z-index: 100; display: flex; align-items: center; gap: 14px;
  padding: 0 14px; background: #1b1e24; color: #c9ced6; border-bottom: 1px solid #2b3039; font: 12px/1 var(--body); }
.demobar a { color: #e8ebef; }
.demobar .db-back { font-weight: 600; white-space: nowrap; }
.demobar .db-back:hover { text-decoration: underline; }
.demobar .db-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.demobar .db-name b { color: #fff; font-weight: 600; }
.demobar .db-fict { font-family: var(--mono); font-size: 10.5px; padding: 3px 7px; border: 1px solid #3a404b; border-radius: 999px; white-space: nowrap; }
.demobar .db-sp { flex: 1; }
.demobar .db-btn { background: transparent; border: 1px solid #3a404b; color: #e8ebef; border-radius: 4px; padding: 4px 9px; font: 500 11.5px var(--body); cursor: pointer; white-space: nowrap; }
.demobar .db-btn:hover { border-color: #8aa6f2; color: #fff; }
@media (max-width: 640px) { .demobar { gap: 8px; padding: 0 10px; } .demobar .db-long { display: none; } .demobar .db-fict { display: none; } }

/* ---- tour + toast ---- */
.tour { position: fixed; right: 18px; top: calc(var(--demobar) + 64px); width: min(360px, calc(100vw - 32px)); z-index: 90;
  background: var(--surface); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: var(--r);
  box-shadow: 0 18px 50px -18px rgba(0,0,0,.6); padding: 16px 18px; }
.tour .tour-k { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.tour b { font-family: var(--disp); font-size: 17px; }
.tour p { color: var(--muted); font-size: 13px; margin: 6px 0 14px; line-height: 1.55; }
.tour .row, .bulkconfirm .row, .eo-pop .row { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.tour .spacer { flex: 1; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 95; background: var(--fg); color: var(--bg);
  padding: 10px 16px; border-radius: var(--rs); font-size: 13px; font-weight: 500; box-shadow: 0 12px 34px -12px rgba(0,0,0,.6);
  max-width: calc(100vw - 32px); animation: eo-in .18s ease-out; }
@keyframes eo-in { from { opacity: 0; transform: translate(-50%, 6px); } }

/* ---- buildings ---- */
.condsearch { border: 0; background: transparent; outline: none; min-width: 200px; padding: 0; font: inherit; font-size: 12.5px; color: var(--fg); }
@media (max-width: 520px) { .condsearch { min-width: 0; width: 150px; } }
.addwrap { position: relative; }
.eo-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; width: 260px; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px; box-shadow: 0 16px 40px -16px rgba(0,0,0,.55); }
.sortsel { position: relative; }
.sortsel select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; padding-right: 2px; }
a.addr { display: block; color: var(--fg); }
a.addr:hover { color: var(--accent); }
.newpill { font-size: 10px; padding: 1px 7px; margin-left: 6px; vertical-align: 1px; }
.fld small.err, small.err { color: var(--crit); }
.fld input[aria-invalid="true"] { border-color: var(--crit); }

/* ---- detail ---- */
button.ent { border: 0; width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.ent .en, .ent .es { display: block; }
.graphwrap .gnode:focus { outline: none; }
.graphwrap .gnode:focus-visible rect { stroke: var(--accent); stroke-width: 2; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.srcrow .sn .pill { font-size: 10.5px; padding: 1px 7px; }

/* ---- review ---- */
.decbtn.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.decbtn.approve.picked { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.bulkconfirm { padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--accent-soft); font-size: 12.5px; }
.bulkconfirm p { margin: 0 0 10px; }
.gaugearc { transition: d .35s ease; }
table.hist { min-width: 640px; }

/* ---- runs ---- */
.runmeta { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.runmeta .mono { font-size: 12.5px; }
.pill .live, td .live { margin-right: 2px; }
.pill .live i { width: 6px; height: 6px; }
.stgright { display: flex; align-items: center; gap: 12px; }
.stgright .mono { font-size: 11.5px; color: var(--muted); width: 38px; text-align: right; }
.stgbar { width: 160px; height: 5px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
@media (max-width: 560px) { .stgbar { width: 70px; } }
.stgbar i { display: block; height: 100%; background: var(--accent); transition: width .4s ease; }
.stgbar i.done { background: var(--good); }
.stgbar i.waiting { background: var(--warn); }
.stgbar i.failed { background: var(--crit); }
.stg.waiting .dot { box-shadow: 0 0 0 4px var(--warn-soft); }
.runchip { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--accent); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 5px 11px; white-space: nowrap; }
@media (max-width: 560px) { .runchip { display: none; } }
.incident { align-items: flex-start; }
.incident .ico { color: var(--warn); margin-top: 1px; }
.logpre { min-height: 220px; }

/* ---- revisions ---- */
table.revs td { padding-top: 16px; padding-bottom: 16px; }
.revdate { font-size: 16px; font-weight: 600; }
table.revs tr.fresh td { background: color-mix(in srgb, var(--good) 7%, transparent); }
table.revs tr.revx { cursor: default; }
table.revs tr.revx:hover { background: transparent; }
table.revs tr.revx td { padding: 0; background: var(--sunk); }

/* ---- exports ---- */
.projgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 720px) { .projgrid { grid-template-columns: 1fr; } }
.proj { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r); padding: 13px 15px; cursor: pointer; background: var(--bg); }
.proj.on { border-color: var(--accent); background: var(--accent-soft); }
.proj input { accent-color: var(--accent); }
.proj b { display: block; font-size: 13.5px; }
.proj small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.proj .pn { margin-left: auto; font-family: var(--disp); font-size: 22px; font-weight: 600; text-align: right; line-height: 1; }
.proj .pn small { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.note .ico { color: var(--accent); margin-top: 2px; }

/* phone width: keep the page from scrolling sideways */
@media (max-width: 560px) {
  .content { padding-left: 16px; padding-right: 16px; }
  .phead h1 { font-size: 23px; }
  .hactions { width: 100%; }
  .gnode text { font-size: 13px; }
  .covrow { grid-template-columns: 100px 1fr 36px; }
}
@media (prefers-reduced-motion: reduce) { .toast, .gaugearc, .stgbar i { animation: none; transition: none; } .live i { animation: none; } }
html, body, #root { height: auto; }
body { min-height: 100vh; }
.app { min-height: calc(100vh - var(--demobar)); }
.toast { background: var(--surface); color: var(--fg); border: 1px solid var(--line-2); border-left: 3px solid var(--good); }
@media (max-width: 560px) {
  .agent { min-width: 0; flex: 1 1 100%; }
  .runner .rhead { min-width: 0; }
  .tour { top: auto; bottom: 14px; right: 16px; }
}
@media (max-width: 900px) { .qlist { max-height: 300px; overflow: auto; } }
@media (max-width: 560px) { .runner { flex-direction: column; } .agents { width: 100%; } .runbuild .rb-hd { flex-direction: column; align-items: flex-start; } }
.noscript{padding:24px}
