/* Inspector: read-only, top-down view of everything that shapes the pipeline. Tokens come from ui.css. */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 18.5px/1.5 var(--sans); }
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.bar { display: flex; align-items: center; gap: 1rem; padding: 0 1rem; height: 52px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
.back { text-decoration: none; color: var(--dim); white-space: nowrap; }
#project-select, #search { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: .35rem .6rem; }
#search { margin-left: auto; width: min(360px, 40vw); }
.crumbs { display: flex; gap: .4rem; align-items: center; color: var(--faint); font: 16.5px var(--mono); overflow: hidden; white-space: nowrap; }
.crumbs a { text-decoration: none; color: var(--dim); }
.crumbs a:hover { color: var(--text); }

.layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); min-height: calc(100vh - 52px); }
.tree { border-right: 1px solid var(--line); background: var(--panel); padding: .6rem 0; overflow-y: auto; position: sticky; top: 52px; height: calc(100vh - 52px); }
.tree a { display: flex; align-items: center; gap: .5rem; padding: .35rem 1rem; text-decoration: none; color: var(--dim); font-size: 17.5px; border-left: 2px solid transparent; }
.tree a:hover { background: var(--panel-2); color: var(--text); }
.tree a[aria-current="true"] { background: var(--panel-2); color: var(--text); border-left-color: var(--accent); }
.tree a.stage { font-weight: 600; color: var(--text); margin-top: .5rem; }
.tree a.sub { padding-left: 2rem; font-size: 16.5px; }
.tree .n { margin-left: auto; font: 15px var(--mono); color: var(--faint); }
.tree .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.done { background: var(--ok); } .dot.needs_you { background: var(--accent); } .dot.running { background: var(--changed); } .dot.blocked { background: var(--flag); }

main { padding: 1.4rem 1.6rem 4rem; max-width: 1240px; }
h1 { font-size: 1.25rem; margin: 0 0 .3rem; }
h2 { font-size: .95rem; margin: 1.6rem 0 .6rem; }
.lead { color: var(--dim); margin: 0 0 1.2rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .7rem; }
.card { display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem .9rem; }
.card:hover { border-color: var(--line-strong); background: var(--panel-2); }
.card h3 { margin: 0 0 .3rem; font-size: .95rem; display: flex; gap: .5rem; align-items: center; }
.card .facts { font: 16.5px var(--mono); color: var(--faint); display: flex; flex-wrap: wrap; gap: .3rem .8rem; margin-top: .5rem; }
.list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.list a, .list div.row { display: flex; gap: 1rem; align-items: baseline; padding: .55rem .8rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.list a:last-child, .list div.row:last-child { border-bottom: 0; }
.list a:hover { background: var(--panel-2); }
.list .k { flex: 0 0 15rem; font-weight: 500; }
.list .v { flex: 1; color: var(--dim); font: 16.5px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1.2rem; font-size: 17.5px; margin: 0 0 1rem; }
.meta dt { color: var(--faint); font: 16.5px var(--mono); padding-top: 2px; } .meta dd { margin: 0; }
.textblock { position: relative; margin: 0 0 1rem; }
.textblock .head { display: flex; justify-content: space-between; align-items: center; font: 15px var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .3rem; }
.textblock button { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: .2rem .6rem; font-size: 16.5px; }
pre.text { margin: 0; padding: .9rem 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); font: 17px/1.55 var(--mono); white-space: pre-wrap; word-break: break-word; max-height: 70vh; overflow: auto; }
mark { background: rgba(245, 158, 11, .35); color: inherit; }
.notice { border-left: 3px solid var(--accent); background: var(--panel-2); padding: .6rem .8rem; color: var(--dim); margin: 0 0 1rem; font-size: 17.5px; }
.tag { font: 15px var(--mono); padding: .1rem .4rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--dim); }
.tag.ok { color: var(--ok); border-color: rgba(16,185,129,.45); } .tag.warn { color: var(--flag); border-color: rgba(249,115,22,.45); }
.filter { margin: 0 0 .8rem; padding: .4rem .6rem; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); width: min(360px, 100%); }
details.item { border-bottom: 1px solid var(--line); }
details.item summary { padding: .5rem .8rem; cursor: pointer; display: flex; gap: 1rem; align-items: baseline; }
details.item summary .id { flex: 0 0 8rem; font: 16.5px var(--mono); }
details.item summary .v { flex: 1; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.item .body { padding: 0 .8rem .8rem; }
.sr { padding: .6rem .8rem; border-bottom: 1px solid var(--line); display: block; text-decoration: none; }
.sr:hover { background: var(--panel-2); } .sr .where { font: 15px var(--mono); color: var(--faint); } .sr .snip { color: var(--dim); font-size: 17.5px; }
@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; } .tree { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); max-height: 40vh; }
  .crumbs { display: none; } main { padding: 1rem; } .list .k { flex-basis: 8rem; }
}

.tree a { font-size: 17.5px; } .tree a.sub { font-size: 16.5px; } .list .v { font-size: 16px; } .card .facts { font-size: 15px; }
.card h3 { font-size: 1.15rem; } h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; }
