/* Console: dense by design. Analysts read queues all day; the home page is the roomier one. */
body { font-size: .875rem; }
.loading { padding: 4rem 1.25rem; text-align: center; color: var(--ink-3); font-family: var(--mono); }
.dim { color: var(--ink-3); }
.small { font-size: .8rem; }
.num { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.on-asset { color: var(--ink-2); white-space: nowrap; }
.why { color: var(--ink-2); display: inline-block; min-width: 12rem; max-width: 26rem; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--action); cursor: pointer; text-decoration: underline; }

/* sign-in */
.signin { max-width: 46rem; margin: 0 auto; padding: 3rem 1.25rem; }
.signin h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 1.75rem 0 .5rem; }
.signin .sub { color: var(--ink-2); font-size: .98rem; margin-bottom: 1.4rem; }
.signin .sub.small { font-size: .88rem; margin-top: 2rem; }
.desks { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@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: .22rem 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.1rem; }
.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-weight: 600; 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: var(--radius); padding: .4rem .55rem; max-width: 100%; }
textarea { width: 100%; resize: vertical; }

/* shell */
.shell { display: grid; grid-template-columns: 13.5rem 1fr; min-height: calc(100vh - 2rem);
         background: linear-gradient(to right, var(--panel) 13.5rem, transparent 13.5rem); }
aside { background: var(--panel); color: var(--panel-ink); padding: 1.1rem .9rem; display: flex; flex-direction: column; gap: 1.4rem;
        position: sticky; top: 0; height: calc(100vh - 2rem); align-self: start; }
aside nav { display: grid; gap: .15rem; }
aside nav a { color: var(--panel-dim); text-decoration: none; padding: .45rem .65rem; border-radius: var(--radius); font-size: .9rem; border-left: .18rem solid transparent; }
aside nav a:hover { color: var(--panel-ink); background: var(--panel-2); }
aside nav a.on { color: var(--panel-ink); background: var(--panel-2); font-weight: 650; border-left-color: #9db2ff; }
aside :focus-visible { outline-color: #9db2ff; }
.me { margin-top: auto; display: grid; gap: .3rem; font-size: .82rem; border-top: 1px solid var(--panel-line); padding-top: .9rem; }
.me b { font-size: .98rem; }
.me span { color: var(--panel-dim); font-family: var(--mono); font-size: .76rem; }
.me .switch { display: grid; gap: .25rem; margin-top: .6rem; color: var(--panel-dim); }
.me select { width: 100%; padding: .3rem .4rem; font-size: .82rem; }
.me .linkish { color: var(--panel-dim); justify-self: start; margin-top: .4rem; }
main { padding: 1.5rem 1.75rem 4rem; min-width: 0; max-width: 84rem; }
@media (max-width: 54rem) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; background: none; }
  aside { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .65rem .9rem; position: static; height: auto; border-right: 0; }
  aside nav { display: flex; flex-wrap: wrap; order: 3; flex-basis: 100%; }
  aside nav a { border-left: 0; border-bottom: .18rem solid transparent; padding: .35rem .55rem; }
  aside nav a.on { border-bottom-color: #9db2ff; }
  .me { margin: 0 0 0 auto; border: 0; padding: 0; grid-auto-flow: column; align-items: center; gap: .75rem; }
  .me b { display: none; }
  .me .switch { margin: 0; font-size: 0; }
  .me .switch select { font-size: .8rem; width: auto; }
  .me .linkish { margin: 0; }
  main { padding: 1.1rem .9rem 3rem; }
}

header.page { margin-bottom: 1.1rem; }
header.page h1 { font-size: 1.55rem; display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
header.page p { color: var(--ink-2); margin-top: .3rem; font-size: .98rem; max-width: 56rem; }
.crumb { margin-bottom: .7rem; }
.crumb a { text-decoration: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: .35rem; margin-bottom: 1rem; overflow: hidden; }
.card-head { padding: .75rem .9rem .65rem; }
.card-head h2 { font-size: .95rem; font-weight: 700; letter-spacing: 0; display: flex; align-items: center; gap: .5rem; }
.card-head p { color: var(--ink-3); font-size: .84rem; margin-top: .15rem; max-width: 52rem; }
.count { font-family: var(--mono); font-size: .74rem; font-weight: 700; background: var(--sunk); color: var(--ink-2); border-radius: var(--radius); padding: .1rem .45rem; border: 1px solid var(--line); }
.empty { padding: .2rem .9rem .9rem; color: var(--ink-3); }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-family: var(--mono); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3);
     font-weight: 600; padding: .4rem .9rem; background: var(--sunk); border-block: 1px solid var(--line-2); white-space: nowrap; }
td { padding: .5rem .9rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tr[data-open] { cursor: pointer; }
tr[data-open]:hover td, tr[data-open]:focus-visible td { background: var(--action-soft); }
.note { color: var(--ink-2); font-size: .82rem; margin-top: .15rem; max-width: 34rem; }
p.note { padding: 0 .9rem .8rem; max-width: 52rem; }

.stages { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: 1rem; }
.stages > * { text-decoration: none; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
              border-radius: var(--radius); padding: .45rem .75rem; font-size: .8rem; min-width: 5rem; }
.stages b { display: block; font-family: var(--mono); font-size: 1.3rem; color: var(--ink); line-height: 1.15; }
.stages a.on { border-color: var(--ink); box-shadow: inset 0 -.2rem 0 var(--action); }

/* finding page */
.stepper { list-style: none; display: flex; margin: 0 0 1rem; padding: 0; font-family: var(--mono); font-size: .8rem; overflow-x: auto; }
.stepper li { flex: 1; min-width: 4.5rem; padding-top: .6rem; border-top: .22rem solid var(--line); color: var(--ink-3); }
.stepper li.past { border-color: var(--ink-3); color: var(--ink-2); }
.stepper li.past::before { content: "✓ "; }
.stepper li.now { border-color: var(--action); color: var(--ink); font-weight: 700; }
.stepper li.now::before { content: "▸ "; }
.side { margin: -.3rem 0 1rem; color: var(--ink-2); }
.next { border-left: .22rem solid var(--action); }
.actions { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.next .actions { padding: 0 .9rem .9rem; }
td .actions { justify-content: flex-end; }
.inline { flex-basis: 100%; display: grid; gap: .6rem; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; margin-top: .3rem; text-align: left; }
.inline > * { max-width: 36rem; }
.inline label { display: grid; gap: .25rem; font-size: .84rem; font-weight: 650; }
.inline label small { font-weight: 400; color: var(--ink-3); }
.inline .row { display: flex; gap: .5rem; flex-wrap: wrap; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; padding: 0 .9rem .9rem; }
@media (max-width: 36rem) { .pair { grid-template-columns: 1fr; } }
.slot { border-radius: var(--radius); padding: .7rem .8rem; }
.slot.machine { border: 1px dashed var(--ink-3); }
.slot.person { border: 1px solid var(--ink); background: var(--sunk); }
.slot h3 { font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: .5rem; }
.slot p { color: var(--ink-2); margin-top: .5rem; }
.slot p b { color: var(--ink); }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line);
         border-radius: .35rem; overflow: hidden; margin: 0 0 1rem; }
@media (max-width: 36rem) { .facts { grid-template-columns: 1fr; } }
.facts div { background: var(--surface); padding: .7rem .9rem; min-width: 0; }
.facts dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.facts dd { margin: .2rem 0 0; font-size: .95rem; font-weight: 650; overflow-wrap: anywhere; }
.facts small { display: block; font-weight: 400; color: var(--ink-2); font-size: .82rem; margin-top: .3rem; }
.facts .evidence { font-family: var(--mono); font-size: .78rem; margin-top: 0; }
.cols { display: grid; grid-template-columns: 1.7fr 1fr; gap: 1rem; align-items: start; }
.cols > div { min-width: 0; }
@media (max-width: 70rem) { .cols { grid-template-columns: 1fr; } }

.waiver { margin: 0 .9rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .8rem; background: var(--ground); display: grid; gap: .4rem; }
.waiver-head { display: flex; gap: .4rem 1rem; flex-wrap: wrap; align-items: center; color: var(--ink-2); font-size: .84rem; }
.waiver p { color: var(--ink-2); }
.waiver p b, .waiver-head b { color: var(--ink); }
.waiver .actions { margin-top: .3rem; }

.matrix { max-width: 38rem; }
.matrix td, .matrix th { text-align: center; font-family: var(--mono); }
.matrix th[scope="row"], .matrix th:first-child { text-align: left; }
.matrix td { font-size: 1.05rem; font-weight: 700; border-left: 1px solid var(--line-2); }
.matrix td.diag { background: var(--sunk); }
.matrix td.off { box-shadow: inset 0 0 0 1px var(--ink); }

.timeline { list-style: none; margin: 0; padding: 0 .9rem .9rem 1rem; }
.timeline li { position: relative; padding: 0 0 .85rem 1.1rem; border-left: 2px solid var(--line); }
.timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -.4rem; top: .3rem; width: .65rem; height: .65rem; background: var(--ink-3); box-shadow: 0 0 0 .2rem var(--surface); }
.timeline li.success::before { background: var(--ok); border-radius: 50%; }
.timeline li.warning::before { background: var(--high); transform: rotate(45deg); }
.timeline li.error::before { background: var(--crit); }
.timeline b { display: block; font-weight: 650; overflow-wrap: anywhere; }
.timeline span { color: var(--ink-3); font-family: var(--mono); font-size: .74rem; }

.done, .refused { border-radius: var(--radius); padding: .65rem .9rem; margin-bottom: 1rem; }
.done { background: var(--ok-soft); color: var(--ok); font-weight: 650; }
.done::before { content: "✓ "; }
.refused { background: var(--crit-soft); color: var(--ink); border-left: .25rem solid var(--crit); }
.refused b { color: var(--crit); }
.refused .rule { display: block; font-family: var(--mono); font-size: .76rem; color: var(--ink-2); margin-top: .25rem; }

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

.nw { white-space: nowrap; }
.ai-said { margin-top: .25rem; font-family: var(--mono); font-size: .72rem; }
/* on a phone a table scrolls sideways rather than crushing its text columns */
.scroll table { min-width: 40rem; }
.scroll table.matrix { min-width: 24rem; }
