/* Case desk: dense by design. Analysts read tables and identifiers all day; the home page is the roomier one. */
body { font-size: .875rem; }
#root { min-height: calc(100vh - 8rem); }
.loading { padding: 4rem 1.25rem; text-align: center; color: var(--ink-3); }
.dim { color: var(--ink-3); }
.small { font-size: .8rem; }
.num { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.ioc { overflow-wrap: anywhere; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--action); cursor: pointer; text-decoration: underline; }

/* sign-in */
.signin { max-width: 52rem; 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: 1rem; margin-bottom: 1.5rem; max-width: 38rem; }
.signin .sub.small { font-size: .9rem; margin-top: 2rem; }
.desks { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
@media (max-width: 44rem) { .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-radius: .5rem; padding: 1rem 1.1rem; display: grid; gap: .2rem; align-content: start; }
.desk:hover { border-color: var(--action); box-shadow: var(--shadow); }
.desk b { font-size: 1.15rem; }
.desk span:not(.label) { color: var(--ink-2); font-size: .9rem; }
.desk i { font: 600 .78rem var(--mono); color: var(--action); margin-top: .6rem; font-style: normal; }
.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; }
textarea.mono { font-family: var(--mono); font-size: .82rem; }

/* top bar */
.slab { background: var(--slab); color: var(--slab-ink); }
.bar { 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(--slab-line); }
.bar nav { display: flex; gap: .15rem; }
.bar nav a { color: var(--slab-dim); text-decoration: none; padding: .4rem .7rem; border-radius: .3rem; font-size: .9rem; font-weight: 600; }
.bar nav a:hover { color: var(--slab-ink); background: rgba(255, 255, 255, .06); }
.bar nav a.on { color: var(--slab-ink); background: rgba(255, 255, 255, .1); box-shadow: inset 0 -.15rem 0 var(--teal-on-slab); }
.me { margin-left: auto; display: flex; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--slab-dim); }
.me b { color: var(--slab-ink); }
.me label { display: flex; align-items: center; gap: .4rem; }
.me select { padding: .2rem .35rem; font-size: .8rem; background: var(--slab-2); color: var(--slab-ink); border-color: var(--slab-line); }
.me .linkish { color: var(--slab-dim); }
@media (max-width: 40rem) { .bar { padding: .5rem .75rem; } .me > span { display: none; } .bar nav { order: 3; flex-basis: 100%; } }

main { padding: 1.5rem 1.25rem 3.5rem; max-width: 88rem; margin: 0 auto; min-width: 0; }
@media (max-width: 40rem) { main { padding: 1rem .75rem 3rem; } }

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

.card { background: var(--surface); border: 1px solid var(--line); border-radius: .5rem; margin-bottom: 1rem; overflow: hidden; }
.card-head { padding: .75rem .9rem .6rem; }
.card-head.split { display: flex; gap: .5rem 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.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: 600 .72rem var(--mono); background: var(--sunk); color: var(--ink-2); border-radius: .25rem; padding: .1rem .4rem; }
.empty { padding: .2rem .9rem .9rem; color: var(--ink-3); }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
@media (max-width: 44rem) { .scroll table { min-width: 40rem; } .scroll td:first-child { min-width: 10rem; } }
th { text-align: left; font: 600 .68rem var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
     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 { background: var(--action-soft); }
td:first-child .num + span { color: var(--ink-2); }
.note { color: var(--ink-2); font-size: .82rem; margin-top: .25rem; max-width: 36rem; }
.filter { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; font-weight: 600; }
.filter input { flex: 1; max-width: 26rem; font-family: var(--mono); font-size: .85rem; }

.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: .4rem; padding: .4rem .75rem; font-size: .8rem; min-width: 4.8rem; }
.stages a b { display: block; font-family: var(--mono); font-size: 1.2rem; color: var(--ink); line-height: 1.15; }
.stages a.on { border-color: var(--action); box-shadow: inset 0 -.18rem 0 var(--action); }

/* case page */
.stepper { list-style: none; display: flex; margin: 0 0 1rem; padding: 0; font-size: .78rem; overflow-x: auto; gap: .2rem; }
.stepper li { flex: 1; min-width: 5rem; padding-top: .5rem; 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: "● "; color: var(--action); }
.next { border-left: .25rem solid var(--action); }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.next .actions { padding: 0 .9rem .9rem; }
td .actions { justify-content: flex-end; min-width: 10rem; }
.inline { flex-basis: 100%; display: grid; gap: .6rem; background: var(--sunk); border-radius: .4rem; padding: .75rem; margin-top: .3rem; max-width: 36rem; text-align: left; }
.inline.wide { max-width: none; margin: 0 .9rem .9rem; }
.inline label { display: grid; gap: .25rem; font-size: .82rem; font-weight: 600; }
.inline .row { display: flex; gap: .5rem; }
.inline select { width: 100%; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
@media (max-width: 40rem) { .grid2 { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line);
         border-radius: .5rem; overflow: hidden; margin: 0 0 1rem; }
@media (max-width: 48rem) { .facts { grid-template-columns: 1fr 1fr; } }
.facts div { background: var(--surface); padding: .65rem .9rem; }
.facts .full { grid-column: 1 / -1; }
.facts dt { font: 600 .68rem var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin: .2rem 0 0; font-size: .95rem; font-weight: 600; }
.facts dd.prose { font-weight: 400; max-width: 60rem; }
.cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1rem; align-items: start; }
.cols > div { min-width: 0; }
@media (max-width: 68rem) { .cols { grid-template-columns: 1fr; } }

.findings, .evidence, .links { list-style: none; margin: 0; padding: 0; }
.findings li, .evidence li { padding: .8rem .9rem; border-top: 1px solid var(--line-2); display: grid; gap: .35rem; }
.findings li { border-left: .25rem solid var(--line); }
.findings li.in_review { border-left-color: var(--amber); }
.findings li.accepted { border-left-color: var(--green); }
.findings li.rejected { border-left-color: var(--red); }
.f-head, .ev-head { display: flex; gap: .4rem .8rem; align-items: center; flex-wrap: wrap; }
.statement { font-size: 1rem; line-height: 1.4; max-width: 46rem; }
.findings li.rejected .statement { color: var(--ink-2); }
.review { background: var(--sunk); border-radius: .3rem; padding: .45rem .6rem; font-size: .85rem; max-width: 46rem; }
.review b { font-weight: 600; margin-right: .3rem; }
.findings li.rejected .review b { color: var(--red); }
.findings li.accepted .review b { color: var(--green); }
.evidence li.flash { background: var(--action-soft); }
.hash summary { cursor: pointer; font-size: .8rem; color: var(--ink-2); }
.hash > code { display: block; margin-top: .3rem; overflow-wrap: anywhere; font-size: .78rem; background: var(--sunk); padding: .4rem .5rem; border-radius: .25rem; }
.links { border-top: 1px solid var(--line-2); padding: .5rem .9rem .7rem; }
.links li { padding: .3rem 0; display: flex; gap: .3rem .6rem; flex-wrap: wrap; align-items: center; font-size: .85rem; }
.rel { font: 600 .72rem var(--mono); color: var(--action); white-space: nowrap; }

.timeline { list-style: none; margin: 0; padding: 0 .9rem .9rem 1rem; }
.timeline li { position: relative; padding: 0 0 .8rem 1rem; border-left: 2px solid var(--line); display: grid; gap: .1rem; }
.timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -.36rem; top: .3rem; width: .55rem; height: .55rem; border-radius: 50%; background: var(--ink-3); box-shadow: 0 0 0 .18rem var(--surface); }
.timeline b { font-weight: 600; }
.timeline .what { color: var(--ink-2); font-size: .82rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.timeline code { display: block; font-size: .76rem; color: var(--ink-2); overflow-wrap: anywhere; }
.timeline li > span:last-child { color: var(--ink-3); font-size: .78rem; }

.done, .refused { border-radius: .4rem; padding: .65rem .9rem; margin-bottom: 1rem; }
.done { background: var(--green-soft); color: var(--green); font-weight: 600; }
.refused { background: var(--red-soft); color: var(--ink); border-left: .25rem solid var(--red); }
.refused b { color: var(--red); }
.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: 72rem; margin: 0 auto; }
