/* tokens
   vault dark: #161813   concrete: #33362c   paper: #ece7d6   ink: #1a1a14
   accent: #ccff00 (acid lime, off the hats in the art, also the chain's own neon, used sparingly)
   olive variant: #7c8a3c
   type: Allerta Stencil (stenciled headers/labels, government-form register), JetBrains Mono (data, CA, real case, copyable)
   corner radius: 0 everywhere - an audit form does not round
   spacing scale: 8 / 12 / 16 / 24 / 32 / 48 px
   motion: recount scan (interaction only), CA copy flash, live clock - no idle decoration
*/

@font-face {
  font-family: "Allerta Stencil";
  src: url("assets/fonts/allerta-stencil-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: #ece7d6;
  color: #1a1a14;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.masthead {
  position: relative;
  background-color: #161813;
  background-size: cover;
  background-position: center 60%;
  padding: 28px 20px 0;
}

.masthead .scrim {
  position: relative;
  background: linear-gradient(180deg, rgba(10,11,8,0.9) 0%, rgba(10,11,8,0.72) 55%, rgba(10,11,8,0.35) 100%);
  padding: 6px 4px 20px;
}

.form-tag {
  margin: 0;
  color: #ccff00;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stencil-title {
  margin: 10px 0 0;
  font-family: "Allerta Stencil", "Arial Narrow", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #f2f0e4;
  font-size: clamp(28px, 6vw, 52px);
  line-height: 1.04;
}

.sub {
  margin: 12px 0 0;
  max-width: 46ch;
  color: rgba(242,240,228,0.82);
  font-size: 13px;
  line-height: 1.5;
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: #ccff00;
  margin-top: 22px;
}

.stat {
  flex: 1 1 160px;
  background: #1a1c15;
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat .label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(242,240,228,0.6);
}

.stat .value {
  font-weight: 700;
  font-size: 22px;
  color: #f2f0e4;
}

.stat.serial { flex: 1 1 220px; }

.ca {
  align-self: flex-start;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: 14px;
  color: #161813;
  background: #ccff00;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
}
.ca:hover { background: #f2f0e4; }

.manifest {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 8px;
}

.manifest-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 2px solid #1a1a14;
  padding-bottom: 10px;
}

.section-title {
  margin: 0;
  font-family: "Allerta Stencil", "Arial Narrow", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 22px;
}

.sample {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sample img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 2px solid #1a1a14;
  flex-shrink: 0;
}

.sample figcaption {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(26,26,20,0.6);
  max-width: 12ch;
}

.sheet-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 2px solid #1a1a14;
  background: #f5f2e4;
}

table.sheet {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 13px;
}

.sheet th, .sheet td {
  text-align: left;
  padding: 8px 12px;
  white-space: nowrap;
}

.sheet thead th {
  background: #1a1a14;
  color: #ece7d6;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.sheet tbody tr {
  border-top: 1px dashed rgba(26,26,20,0.3);
  transition: background 120ms ease;
}

.sheet tbody tr.short td:last-child {
  color: #6b4d16;
  font-weight: 700;
}

.sheet tbody tr.scanning {
  background: rgba(204,255,0,0.35);
}

.swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border: 1px solid rgba(26,26,20,0.5);
  vertical-align: middle;
}
.swatch.standard { background: #ccff00; }
.swatch.olive { background: #7c8a3c; }

.recount {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 2px solid #1a1a14;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 28px;
}

.recount-btn {
  align-self: flex-start;
  font-family: "Allerta Stencil", "Arial Narrow", sans-serif;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #1a1a14;
  color: #ece7d6;
  border: 2px solid #1a1a14;
  padding: 10px 18px;
  cursor: pointer;
}
.recount-btn:hover { background: #ece7d6; color: #1a1a14; }
.recount-btn:disabled { opacity: 0.55; cursor: default; }

.recount-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: rgba(26,26,20,0.75);
}

.recount-log {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: rgba(26,26,20,0.85);
}

.recount-log li {
  border-left: 3px solid #ccff00;
  padding-left: 8px;
}

.chrome {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.6em;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(26,26,20,0.75);
  padding: 10px 20px 26px;
}
.ticker { font-weight: 700; color: #1a1a14; }
.chrome a { color: #1a1a14; text-decoration: none; border-bottom: 1px solid rgba(26,26,20,0.4); }
.chrome a:hover { border-bottom-color: #1a1a14; }
.sep { color: rgba(26,26,20,0.3); }

@media (prefers-reduced-motion: reduce) {
  .sheet tbody tr.scanning { transition: none; }
}

@media (max-width: 560px) {
  .manifest-head { flex-direction: column; align-items: flex-start; }
  .summary-strip { flex-direction: column; }
  .stat.serial { flex: 1 1 auto; }
}
