/* "Signal": print-shop black and white, one yellow that means "act here" (as qrnomad-site). */
@font-face {
  font-family: "Archivo";
  src: url("/static/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --ink: #0b0b0b; --paper: #fff; --signal: #ffd400; --stock: #f1f0ea; --graphite: #5a5a55;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--font);
       -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; }
::selection { background: var(--signal); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
a { color: inherit; text-underline-offset: 3px; }
h1 { font-size: clamp(1.777rem, 1.3rem + 2vw, 2.369rem); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 1rem; }
h2 { font-size: 1.333rem; margin: 0 0 1rem; }
.label { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--graphite); font-weight: 600; }
.lead { font-size: 1.15rem; color: var(--graphite); max-width: 52ch; }
.hint { font-size: .875rem; color: var(--graphite); margin: 0; }
.error { color: var(--ink); background: var(--signal); padding: .5rem .75rem; font-weight: 600; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
       padding: .75rem clamp(1rem, 4vw, 2rem); background: var(--ink); color: var(--paper); }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; text-decoration: none; font-size: 1.15rem; }
.bar nav { display: flex; align-items: center; gap: 1.25rem; }
.bar :focus-visible { outline-color: var(--signal); }
.wrap { max-width: 64rem; margin: 0 auto; padding: 2.5rem clamp(1rem, 4vw, 2rem) 4rem; }
.narrow { max-width: 34rem; }
.head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.stack { display: flex; flex-direction: column; gap: .5rem; }
.stack button { margin-top: 1rem; align-self: flex-start; }
.banner { background: var(--signal); padding: .75rem 1rem; font-weight: 600; }

label { font-weight: 600; margin-top: .75rem; }
input { font: inherit; padding: .7rem .8rem; border: 2px solid var(--ink); border-radius: 0; background: var(--paper); width: 100%; }
input[aria-invalid="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--signal); }
button, .button { font: inherit; font-weight: 700; display: inline-block; padding: .7rem 1.2rem;
  border: 2px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; }
.primary { background: var(--signal); }
button:hover, .button:hover { background: var(--ink); color: var(--paper); }
button.link { background: none; border: 0; padding: 0; color: inherit; font-weight: 400; text-decoration: underline; text-underline-offset: 3px; }

.codes { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.codes li { display: grid; grid-template-columns: 72px 1fr auto auto; gap: 1.25rem; align-items: center;
            padding: 1rem 0; border-bottom: 1px solid var(--stock); }
.meta { display: flex; flex-direction: column; min-width: 0; }
.name { font-weight: 700; font-size: 1.1rem; }
.short { font-family: ui-monospace, monospace; font-size: .9rem; }
.target { color: var(--graphite); font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count { text-align: right; display: flex; flex-direction: column; }
.count strong { font-size: 1.5rem; line-height: 1; }
.actions { display: flex; gap: .75rem; }
@media (max-width: 40rem) {
  .codes li { grid-template-columns: 56px 1fr; }
  .codes img { width: 56px; height: 56px; }
  .count, .actions { grid-column: 2; text-align: left; }
}

.panel { background: var(--stock); padding: 1.5rem; margin-bottom: 1.5rem; }
.chart { width: 100%; height: 160px; display: block; }
.chart rect { fill: var(--ink); }
.chart rect:hover { fill: var(--graphite); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; }
table { width: 100%; border-collapse: collapse; }
td { padding: .35rem 0; border-bottom: 1px solid #dddbd2; }
td:last-child { text-align: right; font-weight: 700; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; margin: 0 0 2rem; }
dt { color: var(--graphite); }
dd { margin: 0; font-weight: 600; }
.danger { margin-top: 3rem; border-top: 1px solid var(--stock); padding-top: 1rem; }
.danger summary { cursor: pointer; color: var(--graphite); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; flex: none; accent-color: var(--ink); }
.foot { display: flex; flex-wrap: wrap; gap: 1.25rem; padding-top: 2rem; padding-bottom: 2rem; font-size: .9rem; color: var(--graphite); }
