/* Console: dense by design. The people here read tables 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); }
.dim { color: var(--ink-3); font-weight: 400; }
.small { font-size: .8rem; margin-top: .25rem; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.hash { font-weight: 400; font-size: .8rem; white-space: normal; overflow-wrap: anywhere; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--action); cursor: pointer; text-decoration: underline; }

/* sign-in */
.signin { max-width: 58rem; margin: 0 auto; padding: 3rem 1.25rem; min-height: 70vh; }
.signin h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 2rem 0 .5rem; }
.signin .sub { color: var(--ink-2); font-size: 1rem; margin-bottom: 1.5rem; max-width: 40rem; }
.signin .sub.small { font-size: .9rem; margin-top: 2rem; }
.desks { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
@media (max-width: 48rem) { .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-top: .25rem solid var(--ink); border-radius: var(--radius); padding: 1rem 1.1rem 1.1rem; }
.desk:hover { border-color: var(--action); box-shadow: var(--shadow); }
.desk .tag { font-family: var(--mono); font-size: .72rem; color: var(--ink-3); margin: 0; }
.desk b { display: block; font-size: 1.2rem; letter-spacing: -.01em; margin-top: .2rem; }
.desk span { display: block; color: var(--ink-2); font-size: .9rem; margin: .2rem 0 .8rem; }
.desk i { font-style: normal; font-weight: 600; font-size: .85rem; 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; }
textarea { width: 100%; resize: vertical; }

/* top bar */
.topbar { background: var(--slab); color: var(--slab-ink); display: flex; align-items: center; gap: .5rem 1.5rem; flex-wrap: wrap;
       padding: .55rem 1.25rem 0; position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--slab-line); }
.topbar .mark { padding-bottom: .55rem; font-size: .98rem; }
.topbar nav { display: flex; gap: .15rem; order: 3; flex-basis: 100%; overflow-x: auto; margin: 0 -.5rem; }
.topbar nav a { color: var(--slab-dim); text-decoration: none; padding: .45rem .8rem .55rem; border-bottom: .2rem solid transparent; white-space: nowrap; font-weight: 600; }
.topbar nav a:hover { color: var(--slab-ink); }
.topbar nav a.on { color: var(--slab-ink); border-color: var(--signal); }
.topbar :focus-visible { outline-color: var(--signal); }
.me { margin-left: auto; display: flex; align-items: center; gap: .9rem; padding-bottom: .55rem; font-size: .82rem; }
.me select { padding: .25rem .4rem; font-size: .82rem; background: var(--slab-2); color: var(--slab-ink); border-color: var(--slab-line); max-width: 11rem; }
.me .linkish { color: var(--slab-dim); white-space: nowrap; }
@media (min-width: 62rem) {
  .topbar { flex-wrap: nowrap; padding-top: 0; }
  .topbar .mark, .me { padding-block: .6rem; }
  .topbar nav { order: 0; flex-basis: auto; margin: 0; align-self: stretch; }
  .topbar nav a { display: flex; align-items: center; padding-block: 0; border-top: .2rem solid transparent; }
}
@media (max-width: 30rem) { .topbar .mark span { display: none; } }
main { padding: 1.5rem 1.25rem 4rem; max-width: 84rem; margin: 0 auto; min-height: 70vh; }

header.page { margin-bottom: 1.1rem; }
header.page h1 { font-size: 1.55rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
header.page h1 .chip { font-size: .78rem; letter-spacing: 0; }
header.page h1 .dim { font-size: 1rem; 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; }
.count { font-family: var(--mono); font-size: .75rem; font-weight: 700; background: var(--sunk); color: var(--ink-2); border-radius: .25rem; padding: .08rem .4rem; }
.empty { padding: .1rem 1rem .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: .7rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3);
     font-weight: 600; padding: .4rem 1rem; background: var(--sunk); border-block: 1px solid var(--line-2); white-space: nowrap; }
td { padding: .55rem 1rem; 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); }
td .bar { max-width: 14rem; }
/* phone: each row becomes a labelled block, so nothing hides off the right edge */
@media (max-width: 40rem) {
  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-2); }
  tbody tr:last-child { border-bottom: 0; }
  td { padding: .15rem 0; border: 0; }
  td.nil { display: none; }
  td[data-l]:not([data-l=""]) { display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem; align-items: start; }
  td[data-l]:not([data-l=""])::before { content: attr(data-l); font-family: var(--mono); font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding-top: .2rem; }
  td:first-child[data-l]:not([data-l=""]) { display: block; font-size: .95rem; }
  td:first-child[data-l]::before { content: none; }
  td .actions { justify-content: flex-start; margin-top: .35rem; }
  td .inline { margin-left: 0; }
  td .bar { max-width: none; }
}
.note { color: var(--ink-2); font-size: .82rem; margin-top: .25rem; max-width: 34rem; }
p.note { padding: 0 1rem .9rem; }

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

/* detail pages */
.stepper { list-style: none; display: flex; margin: 0 0 1rem; padding: 0; font-size: .8rem; max-width: 34rem; }
.stepper li { flex: 1; padding-top: .5rem; border-top: .25rem solid var(--line); color: var(--ink-3); }
.stepper li.past { border-color: var(--ink-3); color: var(--ink-2); }
.stepper li.past::before { content: "\2713  "; font-family: var(--mono); }
.stepper li.now { border-color: var(--action); color: var(--ink); font-weight: 700; }
.side { margin: -.3rem 0 1rem; color: var(--ink-2); }
.next { border-left: .25rem solid var(--action); }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.next .actions { padding: 0 1rem .9rem; }
td .actions { justify-content: flex-end; }
td .inline { margin-left: auto; }
.next .inline { margin: -.3rem 1rem .9rem; }
.inline { display: grid; gap: .6rem; background: var(--sunk); border-radius: var(--radius); padding: .75rem; margin-top: .3rem;
          max-width: 32rem; min-width: 14rem; text-align: left; white-space: normal; }
.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; }
.facts .wide { grid-column: span 2; }
@media (max-width: 60rem) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 30rem) { .facts { grid-template-columns: 1fr; } .facts .wide { grid-column: auto; } }
.facts div { background: var(--surface); padding: .7rem 1rem; min-width: 0; }
.facts dt { font-family: var(--mono); font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.facts dd { margin: .2rem 0 0; font-size: .98rem; font-weight: 600; }
.facts small { display: block; font-weight: 400; color: var(--ink-2); font-size: .8rem; margin-top: .15rem; }
.cols { display: grid; grid-template-columns: 1.7fr 1fr; gap: 1rem; align-items: start; }
.cols > div { min-width: 0; }
@media (max-width: 68rem) { .cols { grid-template-columns: 1fr; } }

.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); }
.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.warning::before { background: var(--warn); transform: rotate(45deg); }
.timeline li.error::before { background: var(--bad); transform: rotate(45deg); }
.timeline b { display: block; font-weight: 600; }
.timeline span { color: var(--ink-3); font-size: .8rem; }

.done, .refused { border-radius: var(--radius); padding: .65rem 1rem; margin-bottom: 1rem; }
.done { background: var(--surface); border: 1px solid var(--line); border-left: .25rem solid var(--ink-3); font-weight: 600; }
.done::before { content: "\2713  "; font-family: var(--mono); }
.refused { background: var(--bad-soft); color: var(--ink); border-left: .25rem solid var(--bad); }
.refused b { color: var(--bad); }
.refused .rule { display: block; font-family: var(--mono); font-size: .78rem; 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); }
.legal-bar p { max-width: 82rem; margin: 0 auto; }
.nw { white-space: nowrap; }
