@font-face {
  font-family: 'Instrument Serif';
  src: url('./fonts/InstrumentSerif-Regular.woff2') format('woff2');
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('./fonts/InstrumentSerif-Italic.woff2') format('woff2');
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('./fonts/DM-Sans.woff2') format('woff2');
  font-weight: 100 1000;
  font-display: swap;
}
:root {
  --paper: #faf8ef;
  --ink: #163e35;
  --muted: #56645a;
  --line: #cacdbd;
  --rust: #a4482a;
  --cream: #fcf9ea;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 18px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
select,
input {
  font: inherit;
}
button,
select,
summary,
a {
  touch-action: manipulation;
}
button,
summary {
  cursor: pointer;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b54c15;
  outline-offset: 4px;
}
.wrap {
  width: min(1336px, 91%);
  margin: auto;
}
.top {
  border-bottom: 1px solid var(--line);
}
.nav {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.brand {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -1.1px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav nav {
  margin-left: auto;
  display: flex;
  gap: 28px;
}
.nav nav a,
.contribute {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.nav nav a:hover,
.byline a:hover {
  text-decoration: underline;
}
.contribute {
  background: var(--ink);
  color: var(--cream);
  padding: 12px 17px;
  border-radius: 5px;
}
.contribute span {
  margin-left: 7px;
}
.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 43px 0 33px;
  gap: 20px;
}
.eyebrow,
.mono,
.count,
.profile-meta,
.map-key,
.clock small,
.scrub span,
.byline,
.filters button,
.slot-meta,
.card-meta {
  font-family: var(--mono);
}
.eyebrow,
.profile-meta,
.card-meta,
.slot-meta {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 650;
  letter-spacing: 1.25px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.rule {
  width: 27px;
  height: 2px;
  background: var(--rust);
}
h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}
.mast h1,
.section-head h2,
.profile h2,
.card h3,
.slot-row h3,
summary span {
  font-family: var(--serif);
  font-weight: normal;
}
.mast h1 {
  font-size: clamp(50px, 6.1vw, 94px);
  letter-spacing: -0.071em;
  line-height: 1.07;
  margin: 7px 0 10px;
}
.mast h1 em {
  color: var(--rust);
  font-weight: 400;
}
.mast p,
.slot-intro {
  line-height: 1.55;
  color: var(--muted);
  font-size: 15px;
}
.seal {
  width: 100px;
  color: #698372;
  transform: rotate(10deg);
  margin-right: 10px;
}
.seal svg {
  width: 100%;
  fill: none;
  stroke: currentColor;
}
.seal text {
  fill: currentColor;
  stroke: none;
  font: 8px var(--mono);
  letter-spacing: 1.4px;
}
.sealroute {
  stroke-width: 4;
  stroke-linejoin: round;
}
.dot {
  fill: var(--paper);
  stroke-width: 2.5;
}
.dispatch {
  display: grid;
  grid-template-columns: minmax(0, 1.82fr) minmax(310px, 1fr);
  border: 1px solid #a6ae99;
  border-radius: 9px;
  overflow: hidden;
  background: #f5f2e4;
  box-shadow: 0 3px 0 #233d2b0d;
}
.board {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #a6ae99;
}
.board-head {
  height: 43px;
  background: var(--ink);
  color: #f7f1de;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}
.board-head .mono {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #d2dfcf;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #edb867;
}
.map-frame {
  position: relative;
  flex: 1;
  min-height: 315px;
  isolation: isolate;
  background: #e8e5d6;
  overflow: hidden;
}
.map-frame canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.north {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  justify-items: center;
  font: bold 24px/1 var(--serif);
}
.north small {
  font: 9px var(--mono);
}
.map-key {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  gap: 13px;
  padding: 7px 10px;
  background: #fffbedf2;
  border: 1px solid #b7bbaa;
  border-radius: 3px;
  font-size: 10px;
}
.map-key span {
  display: flex;
  gap: 5px;
  align-items: center;
}
.map-key i {
  display: block;
  width: 9px;
  height: 9px;
}
.key-donor {
  border-radius: 50%;
  background: #dc8b31;
  border: 1px solid #7c4a1d;
}
.key-pantry {
  background: #338475;
  transform: rotate(45deg);
}
.key-van {
  background: #184d42;
  border-radius: 2px;
  outline: 1px solid white;
}
.transport {
  display: flex;
  gap: 15px;
  align-items: center;
  min-height: 68px;
  border-top: 1px solid #b9beab;
  padding: 10px 17px;
  background: #f4f1e3;
}
.transport button {
  height: 40px;
  width: 40px;
  flex: none;
  border: 0;
  background: var(--ink);
  color: var(--cream);
  border-radius: 50%;
  font-size: 14px;
}
.clock {
  display: grid;
  gap: 3px;
}
.clock output {
  font: bold 22px/1 var(--mono);
  letter-spacing: -1.5px;
}
.clock small,
.scrub span {
  font-size: 8px;
  letter-spacing: 1px;
}
.scrub {
  flex: 1;
  margin-left: 2px;
}
.scrub input {
  width: 100%;
  margin: 0;
  height: 21px;
  accent-color: var(--ink);
  cursor: pointer;
}
.scrub div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}
.profile {
  padding: 24px clamp(19px, 2.4vw, 38px) 19px;
  display: flex;
  flex-direction: column;
}
.profile-meta {
  font-size: 10px;
  justify-content: space-between;
  color: var(--rust);
}
#tier {
  border: 1px solid #adb6a1;
  border-radius: 3px;
  padding: 4px 7px;
  color: var(--ink);
  letter-spacing: 0.5px;
}
.profile h2 {
  font-size: clamp(31px, 3.35vw, 51px);
  line-height: 0.99;
  letter-spacing: -0.058em;
  margin: 15px 0 12px;
}
.profile p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 47ch;
}
.yield {
  margin: 21px 0 16px;
}
.yield .eyebrow {
  font-size: 9px;
}
.yield strong {
  font: normal clamp(40px, 3.85vw, 58px) / 1.2 var(--serif);
  letter-spacing: -0.06em;
  font-variant-numeric: lining-nums;
}
.yield b {
  font: italic 24px var(--serif);
}
.meter {
  height: 5px;
  background: #dcdccc;
  margin: 6px 0 5px;
  border-radius: 2px;
  overflow: hidden;
}
.meter i {
  background: #3b7761;
  display: block;
  height: 100%;
}
#share {
  font: 10px var(--mono);
  color: var(--muted);
}
.numbers {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.numbers dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.numbers dd {
  font: 600 17px var(--mono);
  letter-spacing: -1px;
}
.byline {
  font-size: 10px;
  display: flex;
  justify-content: space-between;
  gap: 9px;
  align-items: center;
  padding-top: 14px;
  margin-top: auto;
}
.byline a {
  font-weight: bold;
}
.manifest {
  border-bottom: 1px solid var(--line);
  margin: 10px 0 5px;
}
.manifest > details > summary {
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 13px 0;
}
.manifest > details > summary::-webkit-details-marker {
  display: none;
}
.manifest > details > summary:before {
  content: '+';
  font: 19px var(--mono);
}
.manifest > details[open] > summary:before {
  content: '−';
}
.manifest summary span {
  font-size: 22px;
  letter-spacing: -0.7px;
}
.manifest summary small {
  color: var(--muted);
}
.details-inner {
  padding: 12px 0 24px;
}
.manifest-top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
.manifest-top label,
.manifest-top a {
  font-size: 13px;
}
.manifest-top select,
.manifest-top button,
#more {
  border: 1px solid #9ea995;
  background: var(--paper);
  border-radius: 4px;
  color: var(--ink);
  padding: 9px 12px;
  font-weight: 600;
  font-size: 13px;
}
.manifest-top select {
  margin-left: 4px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  margin: 8px 0 16px;
}
th,
td {
  padding: 7px 5px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  font-weight: 600;
}
.loads {
  display: flex;
  height: 32px;
  align-items: flex-end;
  max-width: 600px;
  margin: 8px 0;
}
.loads i {
  background: var(--route, #397e6a);
  min-width: 0;
  flex: 1;
  border-bottom: 1px solid var(--route, #397e6a);
}
.route-sheet,
.unserved {
  border-top: 1px solid var(--line);
  padding: 10px 0;
  font-size: 13px;
}
.route-sheet summary,
.unserved summary {
  font-weight: 600;
  line-height: 1.55;
}
.unserved ul {
  columns: 3;
  line-height: 1.8;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 13px;
  margin-bottom: 20px;
}
.catalogue,
.slots {
  padding: 40px 0 7px;
}
.section-head h2 {
  font-size: clamp(34px, 3.1vw, 48px);
  letter-spacing: -0.052em;
  margin-top: 7px;
}
.count {
  font-size: 11px;
  white-space: nowrap;
  color: var(--muted);
}
#piece-count {
  white-space: normal;
  text-align: right;
  max-width: 36ch;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  color: inherit;
  text-decoration: none;
  display: block;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fffdf4;
}
.card:hover,
.card:focus-visible {
  border-color: var(--ink);
}
.card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-bottom: 1px solid var(--line);
}
.card-body {
  padding: 16px;
}
.card h3,
.slot-row h3 {
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -1px;
  margin: 7px 0;
}
.card-meta,
.slot-meta {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--rust);
}
.card p,
.slot-row p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.card .card-foot {
  margin-top: 13px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  font: 11px var(--mono);
}
.slots {
  padding-bottom: 40px;
}
.slots .section-head {
  margin-bottom: 6px;
}
.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.filters button {
  background: transparent;
  border: 1px solid #b9c0ad;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 11px;
}
.filters button[aria-pressed='true'] {
  background: var(--ink);
  color: white;
}
.slot-row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.slot-row img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 3px;
}
.slot-row a,
.desk-link {
  font-size: 12px;
  font-weight: 600;
}
.slot-row h3 {
  font-size: 23px;
}
.slots > p:last-child {
  margin: 23px 0 0;
}
#more {
  margin-top: 12px;
}
footer {
  background: var(--ink);
  color: #faf6e6;
  padding: 27px 0;
}
footer .wrap {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
}
footer p {
  font: 12px/1.6 var(--mono);
  max-width: 61ch;
}
footer a {
  font-size: 12px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 10px;
  top: 10px;
  z-index: 4;
  background: white;
  padding: 12px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 880px) {
  .wrap {
    width: 93%;
  }
  .dispatch {
    grid-template-columns: 1.25fr 1fr;
  }
  .profile {
    padding: 18px;
  }
  .map-frame {
    min-height: 295px;
  }
  .nav {
    gap: 20px;
  }
  .mast {
    padding: 30px 0;
  }
  .card-body {
    padding: 12px;
  }
  .cards {
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  }
  .card h3 {
    font-size: 21px;
  }
  .slot-row {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .slot-row a {
    grid-column: 2;
  }
  footer .wrap {
    flex-wrap: wrap;
  }
}
@media (max-width: 650px) {
  .wrap {
    width: calc(100% - 30px);
  }
  .nav {
    height: 58px;
    gap: 10px;
  }
  .brand {
    font-size: 17px;
    gap: 6px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .nav nav {
    gap: 0;
  }
  .nav nav a {
    font-size: 11px;
  }
  .nav nav a:first-child {
    display: none;
  }
  .contribute {
    padding: 9px 10px;
    font-size: 11px;
  }
  .contribute span {
    margin-left: 1px;
  }
  .mast {
    padding: 25px 0 19px;
  }
  .mast .eyebrow {
    font-size: 9px;
  }
  .mast h1 {
    font-size: clamp(43px, 10.3vw, 63px);
    margin: 7px 0 9px;
  }
  .mast p {
    font-size: 13px;
    max-width: 37ch;
  }
  .seal {
    display: none;
  }
  .dispatch {
    display: flex;
    flex-direction: column;
  }
  .board {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .board-head {
    height: 36px;
    padding: 0 12px;
  }
  .board-head .mono {
    font-size: 8px;
  }
  .board-head .eyebrow {
    font-size: 9px;
  }
  .map-frame {
    min-height: 245px;
  }
  .transport {
    padding: 8px 12px;
    min-height: 59px;
    gap: 11px;
  }
  .transport button {
    width: 35px;
    height: 35px;
  }
  .profile {
    padding: 16px;
  }
  .profile h2 {
    font-size: 36px;
    max-width: 19ch;
    margin: 10px 0;
  }
  .profile p {
    font-size: 13px;
  }
  .yield {
    margin: 14px 0;
  }
  .yield strong {
    font-size: 40px;
  }
  .manifest > details > summary {
    gap: 8px;
    flex-wrap: wrap;
  }
  .manifest summary small {
    font-size: 10px;
  }
  .manifest summary span {
    font-size: 19px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .card h3 {
    font-size: 21px;
  }
  .section-head .count {
    font-size: 9px;
  }
  .slots .section-head,
  .catalogue .section-head {
    flex-wrap: wrap;
  }
  #piece-count {
    text-align: left;
  }
  #slot-count {
    white-space: normal;
  }
  .catalogue,
  .slots {
    padding-top: 28px;
  }
  .section-head {
    margin-bottom: 15px;
  }
  .slot-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .slot-row a {
    grid-column: 1;
  }
  .slot-row p {
    font-size: 12px;
  }
  .slot-row h3 {
    font-size: 20px;
  }
  .slot-meta {
    font-size: 8px;
  }
  .filters {
    gap: 4px;
  }
  .filters button {
    padding: 7px 10px;
  }
  .unserved ul {
    columns: 1;
  }
  .route-sheet table {
    font-size: 11px;
  }
  footer .wrap {
    gap: 15px;
  }
  footer p {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
.board-head {
  gap: 8px;
}
.board-head #sheet {
  margin-left: auto;
}
.board-head select {
  background: #294c40;
  border: 1px solid #627c67;
  border-radius: 3px;
  color: #f6f4df;
  font: 10px var(--mono);
  max-width: 110px;
  padding: 5px 3px;
}
.card[aria-current='true'] {
  border-color: #658075;
}
.card[aria-current='true'] .card-foot {
  color: #285f4c;
}
@media (max-width: 650px) {
  .board-head #sheet {
    font-size: 8px;
    letter-spacing: 0;
  }
  .board-head select {
    font-size: 9px;
  }
}

.brand,
.map-key span,
.board-head .eyebrow,
.clock small,
.nav a {
  white-space: nowrap;
}
.board-head #sheet {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mast h1 {
  letter-spacing: -0.035em;
}
.profile h2,
.section-head h2 {
  letter-spacing: -0.025em;
}
.brand img {
  width: 36px;
  height: 36px;
  flex: none;
}
footer .brand img {
  width: 30px;
  height: 30px;
}
@media (max-width: 650px) {
  .brand img {
    width: 30px;
    height: 30px;
  }
}

#activity-strip, #book-history {
  margin: 0 0 20px;
  padding: 15px clamp(12px, 2vw, 26px);
  border-block: 1px solid var(--line);
  background: #f0f0e4;
}
.strip-head, .history-controls, .presence-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.strip-head { justify-content: space-between; }
.strip-head h2, #book-history h3 {
  margin: 0;
  font: 26px var(--serif);
}
.strip-head a, .presence-controls, #desk-updates, .shift-status, #book-history {
  font-size: 13px;
}
#desk-updates ul { margin: 8px 0 0; padding-inline-start: 18px; }
#desk-updates li { margin-block: 3px; }
#desk-updates li::marker { color: var(--rust); }
.presence-controls { padding: 7px 12px; background: var(--cream); color: var(--ink); }
#visitor-markers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.visitor-marker {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  transform: translate(-50%,-50%); background: #805485; border: 2px solid #fff;
}
.history-controls button, .history-controls select {
  font: inherit; padding: 6px 10px; color: var(--ink);
  background: var(--paper); border: 1px solid #738171; border-radius: 3px;
}
.history-range { display: grid; gap: 4px; margin-block: 14px 5px; }
#history-slider { width: 100%; accent-color: var(--ink); }
#history-position { display: block; min-height: 2.5em; }
#archive-cards p { padding: 12px; border: 1px dashed var(--muted); }
.history-mode :is(#dispatch,#manifest,#slots,#activity-strip,#replay-status) { display: none; }
.shift-status { color: var(--muted); }
.slot-row[data-state='claimed'] .shift-status::before { content: '⚑ '; color: var(--rust); }
@media (prefers-reduced-motion: no-preference) {
  .slot-row:is([data-state='submitted'],[data-state='checked'],[data-state='agreeing']) img {
    animation: check-outline 1s ease-in-out 3 alternate;
  }
  .arrived { animation: check-outline 1s ease-out 2 alternate; }
  @keyframes check-outline { from { outline: 2px solid transparent; } to { outline: 2px solid var(--rust); } }
}
.slot-row, .card { position: relative; }
.visiting {
  position: absolute; top: 4px; right: 5px; padding: 2px 6px;
  background: var(--cream); color: #634269; border: 1px solid #b6a3b6;
  border-radius: 3px; font: 11px var(--mono); pointer-events: none;
}
