/* Order Desk house look. Token names follow bkc-ops core/ui.py and the
   bkc-hub web CSS. Those files were not in this project, so the values
   below are the paper background, one teal accent, and state colours only. */
:root {
  --paper: #f3efe6;
  --sheet: #faf7f1;
  --ink: #221c16;
  --muted: #6a6156;
  --line: #ddd4c4;
  --teal: #0e6e6a;
  --teal-ink: #0b534f;
  --on-teal: #f7f4ee;
  --done: #1c6b42;
  --wait: #8d5b10;
  --parked: #6e675f;
  --banner: #f6efe2;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Instrument Sans", "Segoe UI", sans-serif;
  font-size: 16.5px;
  line-height: 1.5;
}
a { color: var(--teal-ink); text-underline-offset: 3px; }
h1, h2, .brand {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
}
h1 { font-size: 36px; line-height: 1.1; margin: 0 0 8px; }
h2 { font-size: 26px; line-height: 1.15; margin: 0; }
p { margin: 0; }

.wrap { max-width: 860px; margin: 0 auto; padding: 28px 20px 72px; }
.letter {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  border-bottom: 2px solid var(--teal);
  padding-bottom: 12px;
}
.kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
a.brand {
  display: inline-block;
  margin-top: 2px;
  color: var(--ink);
  text-decoration: none;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.who { text-align: right; color: var(--muted); font-size: 14px; }
.who strong { display: block; color: var(--ink); font-weight: 600; }
.flag { display: block; color: var(--wait); }

.stub-note { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.banner {
  margin: 14px 0 0;
  padding: 8px 12px;
  background: var(--banner);
  border-left: 3px solid var(--wait);
}

nav, .tabs { display: flex; flex-wrap: wrap; gap: 8px 18px; }
nav { margin: 18px 0 28px; }
nav a, .tabs a { color: var(--muted); text-decoration: none; padding-bottom: 3px; }
nav a.active, .tabs a.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--teal); }
.tabs { margin: 0 0 18px; }

.lede { color: var(--muted); margin: 0 0 18px; max-width: 62ch; }
.meta, .quiet-note { color: var(--muted); font-size: 14px; }
.quiet-note { display: block; }
.empty { color: var(--muted); padding: 12px 0; }
.back { margin: 0 0 10px; }

.milestone { margin: 0 0 28px; }
.milestone-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.bar {
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  margin: 8px 0 2px;
  overflow: hidden;
}
.bar > span { display: block; height: 100%; background: var(--teal); }

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px 16px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
a.link-row { color: inherit; text-decoration: none; }
a.link-row:hover .title { color: var(--teal-ink); }
.title { flex: 1; min-width: 12rem; }
.owner { color: var(--muted); font-size: 14px; white-space: nowrap; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.status { font-size: 14px; white-space: nowrap; }
.status.done, .status.approved { color: var(--done); }
.status.in_progress { color: var(--teal); }
.status.pending, .status.picked_up { color: var(--muted); }
.status.waiting_esha, .status.waiting_paras, .status.rejected { color: var(--wait); }
.status.parked { color: var(--parked); }
.status.stand { margin: -8px 0 16px; }

select, textarea {
  font: inherit;
  color: inherit;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 5px 8px;
}
select.status { font-size: 14px; }
textarea { width: 100%; max-width: 40rem; display: block; margin: 6px 0 12px; }

button, a.button {
  font: inherit;
  background: var(--teal);
  color: var(--on-teal);
  border: 1px solid var(--teal);
  border-radius: 4px;
  padding: 7px 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
button.text {
  background: none;
  color: var(--teal-ink);
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.decide label { display: block; margin-top: 18px; }
.block { margin-top: 22px; }
.block h2 { margin-bottom: 6px; }

.choices { display: flex; flex-direction: column; gap: 0; margin: 8px 0 16px; max-width: 32rem; }
.choices button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 0;
}
.choices button span { color: var(--muted); font-size: 14px; }
.choices button:hover { color: var(--teal-ink); }

.nums { display: flex; flex-wrap: wrap; gap: 22px 32px; margin: 6px 0 28px; }
.num b {
  display: block;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}
.num span { display: block; margin-top: 4px; }
.chart { width: 100%; margin: 8px 0 8px; }

article.manual { max-width: 68ch; }
article.manual h2 {
  font-size: 26px;
  margin: 22px 0 8px;
}
article.manual p { margin: 0 0 10px; }
article.manual ul { margin: 0 0 12px; padding-left: 1.2rem; }
article.manual .todo {
  border-left: 3px solid var(--wait);
  background: var(--banner);
  padding: 8px 12px;
}

.wide { overflow-x: auto; }
table.sheet { width: 100%; border-collapse: collapse; margin: 8px 0 28px; font-size: 14.5px; }
table.sheet th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--line);
  padding: 6px 10px 6px 0;
  white-space: nowrap;
}
table.sheet td { border-bottom: 1px solid var(--line); padding: 7px 10px 7px 0; vertical-align: top; }
table.sheet .num { text-align: right; font-variant-numeric: tabular-nums; }
.check { color: var(--wait); font-weight: 600; }

/* Trade questions */
.questions .qrow { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
.questions .qrow .title { display: block; }
.questions .qrow .meta { display: block; margin-top: 2px; }
form.filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 4px 0 18px; }
form.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
form.filters input {
  font: inherit; color: var(--ink); background: var(--sheet);
  border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; min-width: 7rem;
}
form.filters input[type="number"] { width: 6.5rem; min-width: 0; }
:where(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
table.answer thead th { position: sticky; top: 0; background: var(--paper); }
table.answer th a { color: inherit; text-decoration: none; }
table.answer th a:hover { color: var(--ink); }
table.answer th[aria-sort] { color: var(--ink); }
table.answer th .arrow { display: inline; margin: 0; font-size: 10px; }
table.answer td:first-child { font-weight: 500; }
.count { margin: 6px 0 2px; }
.pager { display: flex; gap: 18px; }
@media (max-width: 700px) {
  table.answer thead { display: none; }
  table.answer, table.answer tbody, table.answer tr, table.answer td { display: block; width: 100%; }
  table.answer tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.answer td { border: 0; padding: 2px 0; text-align: left; display: flex; justify-content: space-between; gap: 12px; }
  table.answer td::before { content: attr(data-label); color: var(--muted); font-size: 13px; }
  table.answer td:first-child { font-size: 16px; }
  table.answer td:first-child::before { content: none; }
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 640px) {
  a.brand { font-size: 34px; }
  h1 { font-size: 30px; }
  .letter { flex-direction: column; align-items: flex-start; }
  .who { text-align: left; }
  .row { flex-wrap: wrap; align-items: flex-start; }
  .num b { font-size: 32px; }
  .choices button { flex-direction: column; align-items: flex-start; }
}

table.receipt { max-width: 640px; }
table.receipt td.num { white-space: nowrap; padding-left: 16px; }
form.filters label.check { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 8px; color: var(--ink); }
