/* The console: dense by design. Operators and reviewers read queues; the home page is the one with air in it. */
body { font-size: .875rem; }
.loading { padding: 4rem 1.25rem; text-align: center; color: var(--ink-3); }
.dim { color: var(--ink-3); }
.small { font-size: .8rem; }
.nw { white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .92em; font-variant-numeric: tabular-nums; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }

/* sign-in */
.signin { max-width: 46rem; margin: 0 auto; padding: 3.5rem 1.25rem; min-height: 70vh; }
.signin h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 2rem 0 .6rem; }
.signin .sub { color: var(--ink-2); font-size: 1rem; margin-bottom: 1.5rem; }
.signin .sub.small { font-size: .9rem; margin-top: 2rem; }
.desks { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 34rem) { .desks { grid-template-columns: 1fr; } }
.desk { text-align: left; font: inherit; cursor: pointer; background: var(--surface); color: var(--ink);
        border: 1px solid var(--line); border-left: .25rem solid var(--ink); border-radius: var(--radius); padding: 1rem 1.1rem; }
.desk:hover { border-color: var(--action); box-shadow: var(--shadow); }
.desk b { display: block; font-size: 1.15rem; letter-spacing: -.01em; }
.desk span { display: block; color: var(--ink-2); font-size: .9rem; margin: .15rem 0 .7rem; }
.desk i { font-style: normal; font-family: var(--mono); font-size: .8rem; color: var(--action); }
.signin details { margin-top: 1.5rem; color: var(--ink-2); }
.signin summary { cursor: pointer; }
.manual { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; margin-top: .9rem; }
.manual label { display: grid; gap: .25rem; font-size: .85rem; }

input, textarea, select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--ink-3);
                          border-radius: .3rem; padding: .4rem .55rem; max-width: 100%; }
textarea { width: 100%; resize: vertical; }

/* top bar: dark in both themes, like the panel on the home page */
.bar { background: var(--console); color: var(--console-ink); display: flex; align-items: center; gap: .5rem 1.5rem; flex-wrap: wrap;
       padding: .55rem 1.25rem; position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--console-line); }
.bar .mark { font-size: 1rem; }
.bar nav { display: flex; gap: .15rem; overflow-x: auto; max-width: 100%; }
.bar nav a { color: var(--console-dim); text-decoration: none; padding: .45rem .7rem; border-radius: .3rem; white-space: nowrap; font-weight: 600; }
.bar nav a:hover { color: var(--console-ink); background: rgba(255, 255, 255, .06); }
.bar nav a.on { color: var(--console-ink); background: rgba(255, 255, 255, .1); box-shadow: inset 0 -.15rem 0 var(--console-cyan); }
.bar .count { background: var(--console-amber); color: #1c1403; }
.bar :focus-visible { outline-color: var(--console-cyan); }
.me { margin-left: auto; display: flex; align-items: center; gap: .9rem; font-size: .8rem; }
.me label { display: flex; align-items: center; gap: .4rem; color: var(--console-dim); }
.me select { padding: .25rem .4rem; font-size: .8rem; background: #161c26; color: var(--console-ink); border-color: var(--console-line); }
.me .dim { color: var(--console-dim); }
@media (max-width: 52rem) {
  .bar { padding: .5rem .75rem; }
  .bar nav { order: 3; flex-basis: 100%; }
  .me > .mono { display: none; }
}

main { padding: 1.5rem 1.25rem 4rem; max-width: 86rem; margin: 0 auto; min-height: 70vh; }
@media (max-width: 52rem) { main { padding: 1rem .75rem 3rem; } }
header.page { margin-bottom: 1.1rem; }
header.page h1 { font-size: 1.5rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
header.page h1 .chip { letter-spacing: 0; }
header.page p { color: var(--ink-2); margin-top: .3rem; font-size: .95rem; max-width: 56rem; }
.crumb { margin-bottom: .6rem; }
.crumb a { text-decoration: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden; }
.card-head { padding: .75rem 1rem .6rem; }
.card-head h2 { font-size: .95rem; letter-spacing: 0; display: flex; align-items: center; gap: .5rem; }
.card-head p { color: var(--ink-3); font-size: .82rem; margin-top: .15rem; max-width: 60rem; }
.count { font-size: .72rem; font-weight: 700; font-family: var(--mono); background: var(--sunk); color: var(--ink-2); border-radius: .25rem; padding: .1rem .4rem; }
.empty { padding: .2rem 1rem 1rem; color: var(--ink-3); }
.pad { padding: 0 1rem 1rem; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
     font-weight: 700; padding: .4rem .8rem; background: var(--sunk); border-block: 1px solid var(--line-2); white-space: nowrap; }
td { padding: .55rem .8rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th:first-child, td:first-child { padding-left: 1rem; }
tbody tr:last-child td { border-bottom: 0; }
tr[data-open] { cursor: pointer; }
tr[data-open]:hover td { background: var(--action-soft); }
.note { color: var(--ink-2); font-size: .85rem; margin-top: .2rem; max-width: 36rem; display: block; }
/* phone: each row becomes a labelled block, so nothing needs sideways scrolling */
@media (max-width: 44rem) {
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table, tbody, tr, td { display: block; }
  tr { padding: .6rem 1rem; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  td { padding: .15rem 0; border: 0; }
  td:not(:first-child) { display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem; align-items: start; }
  td:not(:first-child)::before { content: attr(data-l); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding-top: .2rem; }
  td:first-child { font-size: .95rem; margin-bottom: .2rem; }
  td:first-child { padding-left: 0; }
  td > div { min-width: 0; }
}

.tiles { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tiles a { text-decoration: none; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
           border-radius: var(--radius); padding: .5rem .8rem; font-size: .78rem; min-width: 6.5rem; flex: 1 1 6.5rem; }
.tiles a b { display: block; font-family: var(--mono); font-size: 1.25rem; color: var(--ink); line-height: 1.2; font-variant-numeric: tabular-nums; }
.tiles a:hover { border-color: var(--action); }

.meter, .gate { display: inline-block; vertical-align: middle; position: relative; width: 5.5rem; height: .45rem; background: var(--line-2); border-radius: .15rem; overflow: hidden; margin-right: .35rem; }
.meter i, .gate i { display: block; height: 100%; background: var(--ink-3); }
.meter { display: block; margin: .3rem 0 .25rem; }
.meter.hot i { background: var(--stop); }
.gate { overflow: visible; }
.gate i { border-radius: .15rem; background: var(--stop); }
.gate.open i { background: var(--ok); }
.gate u { position: absolute; top: -.2rem; bottom: -.2rem; width: .14rem; background: var(--ink); }

/* detail pages */
.next { border-left: .25rem solid var(--hold-mark); }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.next > .actions { padding: 0 1rem 1rem; }
.inline { flex-basis: 100%; display: grid; gap: .6rem; background: var(--sunk); border-radius: var(--radius); padding: .8rem; margin-top: .3rem; max-width: 36rem; text-align: left; }
.inline label { display: grid; gap: .25rem; font-size: .82rem; font-weight: 600; }
.inline .row { display: flex; gap: .5rem; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line);
         border-radius: var(--radius); overflow: hidden; margin: 0 0 1rem; }
@media (max-width: 60rem) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 30rem) { .facts { grid-template-columns: 1fr; } }
.facts div { background: var(--surface); padding: .7rem 1rem; min-width: 0; }
.facts dt, .kv dt { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.facts dd { margin: .2rem 0 0; font-size: .95rem; font-weight: 600; }
.facts small { display: block; font-weight: 400; color: var(--ink-2); font-size: .8rem; margin-top: .15rem; font-family: var(--sans); }
.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; align-items: start; }
.cols > div { min-width: 0; }
@media (max-width: 72rem) { .cols { grid-template-columns: 1fr; } }

.rel, .ask { margin: 0 1rem 1rem; border: 1px solid var(--line); border-left: .25rem solid var(--ink-3); border-radius: var(--radius); padding: .8rem 1rem; background: var(--paper); }
.rel.draft, .ask.pending, .ask.investigating { border-left-color: var(--hold-mark); }
.rel.deployed, .ask.approved, .ask.resolved { border-left-color: var(--ok); }
.ask.denied, .ask.open { border-left-color: var(--stop); }
.rel-head, .ask-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.rel-head b { font-size: 1rem; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem 1.25rem; margin: .7rem 0 0; }
.kv div:nth-child(n+4) { grid-column: 1 / -1; }
@media (max-width: 34rem) { .kv { grid-template-columns: 1fr; } }
.kv dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.rel .actions, .ask .actions { margin-top: .8rem; }
.tool { display: inline-block; font-family: var(--mono); font-size: .78rem; border: 1px solid var(--line); border-radius: .25rem; padding: .05rem .35rem; background: var(--surface); margin: 0 .15rem .2rem 0; }
.tool.high { border-color: var(--hold-mark); }
.tool em { font-style: normal; font-family: var(--sans); font-weight: 700; font-size: .68rem; color: var(--hold); text-transform: uppercase; letter-spacing: .04em; }
.ask-what { font-size: 1rem; font-weight: 600; margin: .5rem 0 .3rem; }
.ask small { color: var(--ink-3); display: block; }
.stack { list-style: none; margin: 0; padding: 0 1rem .4rem; }
.stack li { padding: .6rem 0; border-top: 1px solid var(--line-2); }
.stack li:first-child { border-top: 0; padding-top: 0; }
.stack a { text-decoration: none; }

.timeline { list-style: none; margin: 0; padding: 0 1rem 1rem 1.1rem; }
.timeline li { position: relative; padding: 0 0 .85rem 1.1rem; border-left: 2px solid var(--line); overflow-wrap: anywhere; }
.timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -.38rem; top: .3rem; width: .6rem; height: .6rem; border-radius: .1rem; background: var(--ink-3); box-shadow: 0 0 0 .2rem var(--surface); }
.timeline li.success::before { background: var(--ok); }
.timeline li.warning::before { background: var(--hold-mark); }
.timeline li.error::before { background: var(--stop); }
.timeline b { display: block; font-weight: 600; }
.timeline span { color: var(--ink-3); font-size: .8rem; display: block; }

.done, .refused { border-radius: var(--radius); padding: .7rem 1rem; margin-bottom: 1rem; }
.done { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.refused { background: var(--stop-soft); color: var(--ink); border-left: .25rem solid var(--stop); }
.refused b { color: var(--stop); }
.refused .rule { display: block; font-family: var(--mono); font-size: .8rem; color: var(--ink-2); margin-top: .25rem; }

.legal-bar { border-top: 1px solid var(--line); background: var(--surface); padding: 1rem 1.25rem; font-size: .78rem; color: var(--ink-3); }
.legal-bar p { max-width: 72rem; margin: 0 auto; }
