:root {
  --ink: #1c1917;
  --muted: #5c564e;
  --paper: #f3efe6;
  --card: #faf7f1;
  --line: #d9d0c3;
  --rust: #9a3412;
  --rust-ink: #fff8f3;
  --hired: #1d6b45;
  --passed: #8c2e2e;
  --open: #8a5a12;
  --shadow: 0 1px 0 rgba(28, 25, 23, 0.04);
  font-family: "Liberation Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 22px;
  background: var(--ink);
  color: #f6f1e8;
}
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.brand strong { display: block; font-family: Georgia, "Liberation Serif", serif; font-size: 1.25rem; font-weight: 600; }
.brand small { color: #d6cbbd; }
.mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--rust); color: white; font-weight: 700; letter-spacing: 0.04em;
}
nav { display: flex; gap: 6px; }
nav a {
  color: #f6f1e8; text-decoration: none; padding: 8px 12px; border-radius: 999px;
}
nav a[aria-current="page"] { background: #f6f1e8; color: var(--ink); }

main { max-width: 1080px; margin: 0 auto; padding: 28px 20px 80px; }
h1, h2, h3 { font-family: Georgia, "Liberation Serif", serif; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: 2.1rem; margin: 0 0 8px; }
h2 { font-size: 1.35rem; margin: 0; }
.lede { color: var(--muted); max-width: 62ch; margin: 0 0 22px; line-height: 1.45; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; gap: 12px; align-items: center; }

.card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 14px;
  padding: 16px;
}
.stack { display: grid; gap: 14px; }
.company { display: grid; gap: 14px; }
.office { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.person, .project {
  display: grid; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line);
}

label { display: grid; gap: 4px; font-size: 0.86rem; color: var(--muted); }
input, select, textarea {
  background: white; border: 1px solid #c9bfb2; border-radius: 8px; padding: 9px 10px; width: 100%;
}
textarea { min-height: 88px; resize: vertical; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.checks { display: grid; gap: 6px; }
.checks label { display: flex; gap: 8px; align-items: center; color: var(--ink); grid-template-columns: auto 1fr; }
.checks input { width: auto; }

.btn, button.btn {
  border: 0; background: var(--rust); color: var(--rust-ink); border-radius: 999px; padding: 9px 14px; text-decoration: none;
}
.btn.quiet, button.quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.warn, button.warn { background: transparent; color: var(--passed); border: 1px solid #e4c7c7; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.money { font-variant-numeric: tabular-nums; font-weight: 650; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 0.78rem; background: #efe8dc; }
.pill.hired { background: #e5f4ec; color: var(--hired); }
.pill.passed { background: #f8e8e8; color: var(--passed); }
.pill.open { background: #f8efd8; color: var(--open); }
.banner { background: #fff6ea; border: 1px solid #ead7b8; padding: 10px 12px; border-radius: 10px; }
.error { color: var(--passed); }

.report-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.report-head .actions { flex: none; }
.dash { margin: 8px 0 22px; }
.dash h2, main > h2 { margin: 22px 0 10px; }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(140px, 240px) 1fr auto; gap: 10px; align-items: center; }
.bar-name { display: grid; line-height: 1.2; }
.bar-name small { color: var(--muted); }
.track { height: 14px; background: #efe8dc; border-radius: 999px; overflow: hidden; }
.fill { display: block; height: 100%; background: var(--rust); border-radius: 999px; }
.fill.hired { background: var(--hired); }
.fill.open { background: var(--open); }
.fill.passed { background: var(--passed); }
.bar-meta { display: grid; justify-items: end; min-width: 88px; font-variant-numeric: tabular-nums; }
.bar-meta span { color: var(--muted); font-size: 0.82rem; }
.mix { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: #efe8dc; }
.mix span { display: block; height: 100%; }
.mix .hired, .mix-legend .hired { background: var(--hired); }
.mix .open, .mix-legend .open { background: var(--open); }
.mix .passed, .mix-legend .passed { background: var(--passed); }
.mix-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; color: var(--muted); font-size: 0.86rem; }
.mix-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 99px; margin-right: 6px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.stat { padding: 14px; }
.stat span { display: block; color: var(--muted); font-size: 0.82rem; }
.stat strong { font-size: 1.45rem; font-variant-numeric: tabular-nums; }

table { width: 100%; border-collapse: collapse; background: white; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.thumb { max-width: 220px; border-radius: 10px; border: 1px solid var(--line); }

@media (max-width: 800px) {
  .top { flex-direction: column; align-items: flex-start; }
  .stats { grid-template-columns: 1fr 1fr; }
  .bar-row { grid-template-columns: 1fr auto; }
  .track { grid-column: 1 / -1; }
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: white; }
  table.stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 4px; }
  table.stack td::before { content: attr(data-label); color: var(--muted); }
}

@media print {
  .top, .noprint, button, form { display: none !important; }
  body { background: white; }
  main { max-width: none; }
  .card, .panel, .bar-row { break-inside: avoid; }
  .fill, .mix span, .mix-legend i { print-color-adjust: exact; }
}
