@property --d { syntax: "<length>"; inherits: true; initial-value: 0px; }

:root {
  color-scheme: light;
  --ground: #e6e8eb;
  --sheet: #ffffff;
  --tint: #f1f2f4;
  --ink: #000000;
  --ink-2: #45484d;
  --hair: #c5c8ce;
  --red: #d9200f;
  --yellow: #f7c600;
  --blue: #1c3f94;
  --grey: #c4c4bf;
  --hatch: repeating-linear-gradient(45deg, var(--ink) 0 2px, var(--sheet) 2px 9px);
  --white: #ffffff;
  --black: #000000;
  --edge: var(--ink);
  --focus: var(--blue);
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8' fill='none' stroke='%23fff' stroke-width='2.5'/%3E%3C/svg%3E");

  --col: 73rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --pad: clamp(1.125rem, 2.4vw, 1.75rem);
  --rule: 2px;
  --bar: 6px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --font: "Archivo", "Arial", system-ui, sans-serif;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #131518;
  --sheet: #1e2125;
  --tint: #282c31;
  --ink: #f1f2f4;
  --ink-2: #a8adb5;
  --hair: #3b4047;
  --blue: #3f66cf;
  --grey: #7f848c;
  --edge: #5d626b;
  --focus: #8eacff;
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8' fill='none' stroke='%23000' stroke-width='2.5'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #131518;
    --sheet: #1e2125;
    --tint: #282c31;
    --ink: #f1f2f4;
    --ink-2: #a8adb5;
    --hair: #3b4047;
    --blue: #3f66cf;
    --grey: #7f848c;
    --edge: #5d626b;
    --focus: #8eacff;
    --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8' fill='none' stroke='%23000' stroke-width='2.5'/%3E%3C/svg%3E");
  }
}

* { box-sizing: border-box; }
html { overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 4rem;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-md);
  font-stretch: 100%;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
button, input { font: inherit; color: inherit; border-radius: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.column { width: min(100% - 2 * var(--gutter), var(--col)); margin-inline: auto; }
.sheet { background: var(--sheet); min-width: 0; }

.display { font-stretch: 125%; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.heading { font-stretch: 112%; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }

/* A slab is a face lifted --d off the page in oblique projection, with two side faces
   reaching down and right to its footprint. --sit is the depth at which the face fills
   its layout box, so a slab lines up with its neighbours at rest and only the sides
   overflow. --face colours the top, --end the sides. */
:is(.slab, .button-primary, .run) {
  position: relative;
  --face: var(--ink);
  --end: var(--yellow);
  --sit: 0px;
  background: var(--face);
  translate: calc(var(--sit) - var(--d)) calc(var(--sit) - var(--d));
  transition: --d 160ms var(--ease);
}
:is(.slab, .button-primary, .run, .tile)::before, :is(.slab, .button-primary, .run, .tile)::after {
  content: "";
  position: absolute;
  transform-origin: 0 0;
  pointer-events: none;
}
:is(.slab, .button-primary, .run, .tile)::before {
  left: 0;
  top: 100%;
  width: 100%;
  height: var(--d);
  background: color-mix(in srgb, var(--end) 66%, #000);
  transform: skewX(45deg);
}
:is(.slab, .button-primary, .run, .tile)::after {
  left: 100%;
  top: 0;
  width: var(--d);
  height: 100%;
  background: var(--end);
  transform: skewY(45deg);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.625rem 1.125rem;
  border: 0;
  box-shadow: inset 0 0 0 var(--rule) var(--ink);
  background: var(--sheet);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.button:hover { background: var(--tint); }
.button:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.button:disabled, .button:has(input:disabled) { opacity: 0.4; cursor: progress; }
.button-primary { --sit: 5px; --d: 5px; box-shadow: none; background: var(--face); color: var(--sheet); }
.button-primary:hover { --d: 8px; background: var(--face); }
.button-primary:active { --d: 1px; }
.button-primary:disabled { --d: 5px; }

.text-button {
  padding: 0.25rem 0;
  border: 0;
  background: none;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.text-button:disabled { opacity: 0.4; cursor: progress; }

.input {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  box-shadow: inset 0 0 0 var(--rule) var(--ink);
  background: var(--sheet);
}
.input::placeholder { color: var(--ink-2); opacity: 1; }
.input:disabled { opacity: 0.4; cursor: progress; }

.swatch { display: inline-block; flex: none; width: 0.875rem; height: 0.875rem; }
.swatch-missing { background: var(--red); }
.swatch-underpaid { background: var(--yellow); }
.swatch-duplicate { background: var(--blue); }
.swatch-unknown { background: var(--grey); }
.swatch-held {
  background: repeating-linear-gradient(45deg, var(--ink) 0 1.5px, var(--sheet) 1.5px 4px);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.swatch-clear { background: var(--sheet); box-shadow: inset 0 0 0 2px var(--ink); }

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.25rem;
  border-bottom: var(--rule) solid var(--ink);
}
.wordmark { display: inline-flex; align-items: center; font-size: var(--text-xl); color: var(--ink); text-decoration: none; }
.wordmark::before {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  margin-right: 1.25rem;
  background: var(--red);
  box-shadow: 0.3125rem 0.3125rem 0 var(--yellow), 0.625rem 0.625rem 0 var(--blue);
  translate: 0 -0.3125rem;
}
.top-actions, .top-result { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.file-summary { font-size: var(--text-sm); color: var(--ink-2); }
#user-name { font-size: var(--text-sm); font-weight: 600; }
.theme-toggle {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: linear-gradient(135deg, var(--ink) 50%, var(--sheet) 50%);
  box-shadow: 0 0 0 var(--rule) var(--ink);
  cursor: pointer;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem 0.75rem calc(1rem + var(--bar));
  background: var(--sheet);
  box-shadow: inset var(--bar) 0 0 var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.status:empty { display: none; }
.status::before {
  content: "";
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--ink);
  animation: blink 1s steps(2, jump-none) infinite;
}
.status.error { box-shadow: inset var(--bar) 0 0 var(--red); }
.status.error::before { content: none; }
@keyframes blink { from { opacity: 1; } to { opacity: 0; } }

.signin { display: grid; place-items: center; padding-block: clamp(1.5rem, 8vh, 5rem); }
.signin-form {
  --face: var(--sheet);
  --end: var(--edge);
  --sit: 10px;
  --d: 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  width: min(100%, 24rem);
  padding: 2rem;
}
.signin-form h1 { margin-bottom: 1.25rem; font-size: 2.25rem; }
.signin-form label { font-weight: 600; }
.signin-form .input { margin-bottom: 0.75rem; }
.signin-form .button { align-self: flex-start; margin-top: 0.5rem; }

.setup {
  display: grid;
  gap: 2.5rem clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 6fr) minmax(0, 7fr);
  grid-template-areas: "intro intake" "legend intake";
  align-items: start;
  padding-top: 1rem;
}
.intake-only { grid-template-columns: minmax(0, 46rem); grid-template-areas: "intake"; padding-top: 0; }

.intro { grid-area: intro; display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.intro h1 { font-size: clamp(2rem, 3.3vw, 2.75rem); text-wrap: balance; }
.intro p { max-width: 44ch; font-size: var(--text-lg); }

.legend { grid-area: legend; display: grid; gap: 1.5rem; padding-top: 2rem; border-top: var(--rule) solid var(--ink); }
.flag { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.25rem 1.25rem; align-items: start; }
.chip {
  --sit: 6px;
  --d: 6px;
  --end: color-mix(in srgb, var(--face) 74%, #000);
  grid-row: 1 / span 2;
  width: 2.25rem;
  height: 2.25rem;
  margin-top: 0.375rem;
}
.flag h2 { grid-column: 2; font-size: var(--text-lg); }
.flag p { grid-column: 2; max-width: 42ch; color: var(--ink-2); }
.flag-missing .chip { --face: var(--red); }
.flag-underpaid .chip { --face: var(--yellow); }
.flag-duplicate .chip { --face: var(--blue); }
.flag-unknown .chip { --face: var(--grey); }

.intake { grid-area: intake; display: flex; flex-direction: column; container: intake / inline-size; }
.slot {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  gap: 0.125rem 1rem;
  align-items: start;
  padding: 1.25rem var(--pad);
  border-bottom: 1px solid var(--hair);
}
.slot::before {
  content: "";
  grid-row: 1 / span 2;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.25rem;
  box-shadow: inset 0 0 0 var(--rule) var(--ink);
}
.ready::before {
  background: var(--ink) var(--check) center / contain no-repeat;
}
.slot-title { grid-column: 2; font-size: var(--text-xl); }
.slot-status { grid-column: 2; color: var(--ink-2); overflow-wrap: anywhere; }
.ready .slot-status { color: var(--ink); font-weight: 600; }
.slot-actions { grid-column: 3; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; align-self: center; }

.add-files {
  grid-column: 2 / -1;
  display: grid;
  gap: 0.5rem;
  justify-items: start;
  max-width: 28rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hair);
}
.add-files label:first-child { font-weight: 600; }

.file-list { grid-column: 2 / -1; margin-top: 0.75rem; font-size: var(--text-sm); }
.file-list summary { width: fit-content; cursor: pointer; font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.file-list ul { list-style: none; margin-top: 0.75rem; padding: 0; display: grid; gap: 0.75rem; }
.file-list strong { display: block; font-weight: 600; }
.file { display: inline-flex; align-items: center; gap: 0.375rem; margin: 0.25rem 1rem 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.remove {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  box-shadow: inset 0 0 0 var(--rule) var(--ink);
  background: var(--sheet);
  color: var(--ink);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.remove:hover { background: var(--ink); color: var(--sheet); }

@container intake (max-width: 34rem) {
  .slot { grid-template-columns: 1.25rem minmax(0, 1fr); }
  .slot-actions { grid-column: 2; grid-row: auto; justify-content: flex-start; margin-top: 0.75rem; }
}

.agency {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 1rem;
  align-items: center;
  padding: 1.25rem var(--pad);
}
.agency-label { grid-column: 2; font-size: var(--text-xl); }

.run {
  --sit: 8px;
  --d: 8px;
  display: flex;
  align-items: center;
  min-height: 4.5rem;
  margin: 0.5rem calc(var(--pad) + 8px) calc(var(--pad) + 8px) var(--pad);
  padding: 1rem 1.5rem;
  border: 0;
  color: var(--sheet);
  font-size: 1.625rem;
  text-align: left;
  cursor: pointer;
}
.run:hover { --d: 12px; }
.run:active { --d: 2px; }
.run:disabled { --d: 8px; opacity: 0.4; cursor: progress; }

.results { flex: 1; display: flex; flex-direction: column; gap: 2.5rem; }

.working { display: flex; flex-wrap: wrap; align-items: center; gap: 2.5rem 3.5rem; padding-block: clamp(2rem, 10vh, 6rem); }
.working p { max-width: 34ch; font-size: var(--text-xl); }
.working-grid {
  display: grid;
  grid-template-columns: repeat(3, 4.5rem);
  grid-template-rows: repeat(2, 4.5rem);
  margin: 2rem 0 0 2rem;
}
.working-grid span {
  box-shadow: inset 0 0 0 1px var(--ink);
  --end: color-mix(in srgb, var(--face) 74%, #000);
  animation: piston 2.4s var(--ease) infinite;
  animation-delay: calc(var(--n) * 0.4s);
}
.working-grid span:nth-child(1) { --face: var(--red); }
.working-grid span:nth-child(2) { --face: var(--sheet); }
.working-grid span:nth-child(3) { --face: var(--yellow); }
.working-grid span:nth-child(4) { --face: var(--sheet); }
.working-grid span:nth-child(5) { --face: var(--blue); }
.working-grid span:nth-child(6) { --face: var(--grey); }
@keyframes piston {
  0%, 34%, 100% { --d: 0px; }
  14% { --d: 26px; }
}

.hero {
  display: grid;
  grid-template-columns: minmax(min-content, 5fr) minmax(0, 7fr);
  gap: 2.5rem clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  padding-top: 1rem;
}
.summary { display: flex; flex-direction: column; gap: 1.25rem; }
.summary h1 { font-size: var(--text-xl); text-wrap: balance; }
.total { font-size: clamp(2.5rem, 5.4vw, 4.5rem); white-space: nowrap; font-variant-numeric: tabular-nums; }
.recovered { color: var(--ink-2); }
.recovered .display { margin-right: 0.375rem; font-size: var(--text-xl); color: var(--ink); font-variant-numeric: tabular-nums; }
.tally { display: grid; border-top: var(--rule) solid var(--ink); }
.tally div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.625rem 0; border-bottom: 1px solid var(--hair); }
.tally dt { color: var(--ink-2); }
.tally dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.downloads { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.art { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
/* The top and left margins leave room for blocks to rise out of the field. */
.painting {
  position: relative;
  aspect-ratio: 16 / 10;
  max-height: 26rem;
  margin: 2.5rem 0 0 2.5rem;
}
.painting-field { position: absolute; inset: 0; --gap: 0.875rem; }
.painting-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin-left: 2.5rem; font-size: var(--text-sm); color: var(--ink-2); }
.painting-legend span { display: inline-flex; align-items: center; gap: 0.5rem; }

.block {
  position: absolute;
  display: flex;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  --d: var(--rest);
  translate: calc(var(--d) * -1) calc(var(--d) * -1);
  transition: --d 200ms var(--ease);
  text-align: left;
  cursor: pointer;
}
.block:hover { --d: calc(var(--rest) + 5px); }
.block[aria-current="true"] { --d: calc(var(--rest) + 12px); animation: lift 320ms var(--ease); }
.block:focus-visible { outline-offset: 0; }
.tall { flex-direction: column; }
.tile {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  background: var(--face);
  box-shadow: inset 0 0 0 1px var(--ink);
  --end: color-mix(in srgb, var(--face) 74%, #000);
}
.block[aria-current="true"] .tile { box-shadow: inset 0 0 0 3px var(--ink); }
.tile-missing { --face: var(--red); color: var(--white); }
.tile-underpaid { --face: var(--yellow); color: var(--black); }
.tile-clear { --face: var(--sheet); --end: var(--grey); color: var(--ink); }
.tile-held { --end: var(--ink-2); background: var(--hatch); color: var(--ink); }
.tile-in {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0.75rem 0.875rem;
  overflow: hidden;
  container: tile / size;
}
.label { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; max-width: 100%; }
.label-patch { width: fit-content; padding: 0.25rem 0.375rem; background: var(--sheet); }
.label-name { font-size: 0.9375rem; font-weight: 600; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; }
.label-amount { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.label-note { font-size: var(--text-sm); font-weight: 600; }
@container tile (max-width: 9rem) or (max-height: 5rem) {
  .label-amount.display { font-size: var(--text-md); }
  .label-name { font-size: var(--text-sm); }
  .label-note { display: none; }
}
@container tile (max-height: 3.75rem) {
  .label-amount { display: none; }
}
@container tile (max-width: 5rem) or (max-height: 2.5rem) {
  .label { display: none; }
}
.lay-in .block, .lay-in .block[aria-current="true"] {
  animation: rise 1000ms var(--ease) backwards;
  animation-delay: calc(var(--i) * 90ms + 120ms);
}
@keyframes rise {
  from { --d: 0px; }
  55% { --d: calc(var(--rest) * 1.6 + 10px); }
}
@keyframes lift { from { --d: var(--rest); } }

.workspace {
  display: grid;
  grid-template-columns: minmax(15rem, 21rem) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
.ledger { position: sticky; top: 1rem; min-width: 0; background: var(--sheet); }
.ledger ol { list-style: none; padding: 0; }
.ledger li + li { border-top: 1px solid var(--hair); }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 1.25rem;
  border: 0;
  background: var(--sheet);
  text-align: left;
  cursor: pointer;
}
.row:hover { background: var(--tint); }
.row:focus-visible { outline-offset: -3px; }
.remove:disabled, .block:disabled, .row:disabled { opacity: 0.4; cursor: progress; }
.row[aria-current="true"] { background: var(--tint); box-shadow: inset var(--bar) 0 0 var(--ink); }
.row-name { font-weight: 600; overflow-wrap: anywhere; }
.row[aria-current="true"] .row-name { font-weight: 700; }
.row-amount { font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-sub { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; font-size: var(--text-sm); color: var(--ink-2); }
.row-sub span:last-child { margin-left: 0.25rem; }

.detail { min-width: 0; background: var(--sheet); }
.detail:empty { display: none; }
.part { padding: var(--pad); }
.part + .part { border-top: var(--rule) solid var(--ink); }
.panel { display: flex; flex-direction: column; gap: 1.25rem; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem 2rem; }
.panel-head > :first-child { min-width: 0; }
.detail-name { font-size: clamp(1.75rem, 3vw, 2.5rem); overflow-wrap: anywhere; }
.files-line { margin-top: 0.625rem; font-size: var(--text-sm); color: var(--ink-2); overflow-wrap: anywhere; }
.big-owed { flex: none; margin-left: auto; text-align: right; }
.big-owed strong { display: block; margin-bottom: 0.375rem; font-size: 2rem; font-variant-numeric: tabular-nums; }
.big-owed span { font-size: var(--text-sm); color: var(--ink-2); }

.group { padding: 0; }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.625rem; padding: var(--pad) var(--pad) 1rem; }
.group-head h3 { font-size: var(--text-xl); }
.group-head .count { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.group-head p { flex-basis: 100%; color: var(--ink-2); }

.finding {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.375rem 1.5rem;
  padding: 1rem var(--pad) 1.125rem calc(var(--pad) + var(--bar));
  border-top: 1px solid var(--hair);
}
.finding::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: var(--bar); background: var(--kind); }
.finding-missing { --kind: var(--red); }
.finding-underpaid { --kind: var(--yellow); }
.finding-duplicate { --kind: var(--blue); }
.finding-unknown { --kind: var(--grey); }
.finding-recovered { --kind: var(--ink); }
.who { font-weight: 600; overflow-wrap: anywhere; }
.refs { font-size: var(--text-sm); color: var(--ink-2); }
.money { text-align: right; }
.money strong { display: block; font-size: var(--text-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.money span { font-size: var(--text-sm); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.reason { grid-column: 1 / -1; max-width: 62ch; }
.evidence { grid-column: 1 / -1; font-size: var(--text-sm); color: var(--ink-2); overflow-wrap: anywhere; }

.claim-head, .claim { max-width: 46rem; }
.claim-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.claim-head h2 { font-size: var(--text-xl); }
.claim-head p { margin-top: 0.375rem; color: var(--ink-2); }
.claim {
  max-height: 26rem;
  margin: 0;
  padding: 1.25rem 1.5rem;
  overflow: auto;
  background: var(--tint);
  box-shadow: inset var(--bar) 0 0 var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tag { display: inline-block; flex: none; padding: 0.25rem 0.625rem; box-shadow: inset 0 0 0 var(--rule) var(--ink); background: var(--sheet); font-size: var(--text-sm); font-weight: 700; }
.hold-reasons {
  padding: 0.875rem 1rem 0.875rem calc(var(--bar) + 1rem);
  background: var(--tint);
  box-shadow: inset var(--bar) 0 0 var(--ink);
  font-weight: 600;
}
.hold-reasons ul { padding-left: 1.125rem; }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem 2rem; }
.compare div { display: flex; flex-direction: column; gap: 0.375rem; padding-top: 0.75rem; border-top: var(--rule) solid var(--ink); }
.compare dt { font-size: var(--text-sm); color: var(--ink-2); }
.compare dd { font-size: 1.5rem; font-variant-numeric: tabular-nums; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
th { padding: 0.5rem 0.75rem; border-bottom: var(--rule) solid var(--ink); font-weight: 600; text-align: left; white-space: nowrap; }
td { padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--hair); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.panel-actions p { max-width: 52ch; font-size: var(--text-sm); color: var(--ink-2); }

.notes { display: grid; gap: 0.5rem; font-size: var(--text-sm); color: var(--ink-2); }
.notes:empty { display: none; }
.notes p { max-width: 70ch; }

.drop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: color-mix(in srgb, var(--ground) 90%, transparent);
}
.drop p {
  --face: var(--sheet);
  --end: var(--blue);
  --sit: 14px;
  --d: 14px;
  max-width: 16ch;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  font-size: clamp(1.75rem, 4.5vw, 3.25rem);
}

@media (max-width: 900px) {
  .setup { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "intake" "legend"; }
  .intake-only { grid-template-areas: "intake"; }
  .hero { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  body { gap: 1.5rem; }
  .file-summary { display: none; }
  .agency { grid-template-columns: 1.25rem minmax(0, 1fr); }
  .agency .input { grid-column: 2; }
  .painting { aspect-ratio: 1 / 1; margin: 2rem 0 0 2rem; }
  .painting-legend { margin-left: 0; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .ledger { position: static; }
  .finding { grid-template-columns: minmax(0, 1fr); }
  .money { text-align: left; }
  .panel-head { flex-wrap: wrap; }
  .big-owed { margin-left: 0; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .status::before, .working-grid span, .lay-in .block, .block[aria-current="true"] { animation: none; }
  .slab, .block { transition: none; }
  .working-grid span:first-child { --d: 18px; }
}
