/* ============================================================
   PRINTVENDO — PAPER ROUND
   The app's own ink system, lifted from printvendo-web/styles/tokens.css.
   Inverted photocopy: riso spot inks on toner black.

   Single visual world by decision — a zine is printed once, so there is no
   light mode and every colour is painted explicitly.

   Built for a phone held in one hand in a corridor: 48px touch targets,
   nothing that needs a second tap to confirm except the things that change
   a number.
   ============================================================ */

:root {
  --ink: #0a0a0a;
  --ink-lift: #141416;
  --paper: #f2f2ef;
  --paper-2: #dededa;
  --orange: #ff6b47;
  --orange-ink: #0b0b0c;   /* never white on orange: that is 2.8:1 */
  --green: #00a95c;
  --yellow: #ffe800;
  --toner: #8e8e8a;
  --toner-dim: #5c5c59;    /* decorative only, 2.4:1 */

  --hair: rgba(242, 242, 239, 0.24);
  --hair-soft: rgba(242, 242, 239, 0.14);
  --wash: rgba(242, 242, 239, 0.06);

  --display: "Anton", "Roboto Condensed", "Avenir Next Condensed",
    "HelveticaNeue-CondensedBold", Impact, Haettenschweiler, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --type: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --t-meta: 12px;
  --t-small: 13px;
  --t-body: 15px;
  --d-md: 21px;
  --d-lg: 27px;

  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 26px; --s7: 34px;

  --edge: 0px;
  --line: 2px;

  --fast: 140ms;
  --base: 220ms;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);

  --halftone: radial-gradient(circle, rgba(242,242,239,0.03) 0.8px, transparent 1.3px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ink);
  background-image: var(--halftone);
  background-size: 6px 6px;
  color: var(--paper);
  font-family: var(--body);
  font-size: var(--t-body);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ── the bar ─────────────────────────────────────────────── */

.bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  padding-top: calc(var(--s3) + env(safe-area-inset-top));
  background: var(--ink);
  border-bottom: var(--line) solid var(--hair);
}
.wordmark {
  font-family: var(--display);
  font-size: var(--d-md);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-right: auto;
}
.back {
  background: none;
  border: 0;
  color: var(--paper);
  font-size: 22px;
  line-height: 1;
  padding: var(--s2);
  margin-left: calc(var(--s2) * -1);
  cursor: pointer;
}

/* ── layout ──────────────────────────────────────────────── */

main {
  max-width: 34rem;
  margin: 0 auto;
  padding: var(--s5) var(--s4) var(--s7);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

h1 {
  font-family: var(--display);
  font-size: var(--d-lg);
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
  text-wrap: balance;
}
h2 {
  font-family: var(--display);
  font-size: var(--d-md);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: var(--s3) 0 0;
}
p { margin: 0; line-height: 1.55; }
.muted { color: var(--toner); }
.loading { color: var(--toner); font-family: var(--type); font-size: var(--t-meta); }

.eyebrow {
  font-family: var(--type);
  font-size: var(--t-meta);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--toner);
  margin: 0;
}

/* ── the round: one card per shop ────────────────────────── */

.round { display: flex; flex-direction: column; gap: var(--s3); list-style: none; margin: 0; padding: 0; }

.shop {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--ink-lift);
  border: var(--line) solid var(--hair-soft);
  border-radius: var(--edge);
  color: inherit;
  font: inherit;
  padding: var(--s4);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  transition: transform var(--fast) var(--ease);
}
.shop:active { transform: translate(2px, 2px); }
.shop:focus-visible { outline: var(--line) solid var(--paper); outline-offset: 2px; }

/* The severity stripe is the whole point of the list: a refiller scans it
   from the top and stops where the colour changes. */
.shop.is-empty { border-left: 6px solid var(--orange); }
.shop.is-low   { border-left: 6px solid var(--yellow); }
.shop.is-ok    { border-left: 6px solid var(--green); }
.shop.is-off   { border-left: 6px solid var(--toner-dim); }

.shop-head { display: flex; align-items: baseline; gap: var(--s3); }
.shop-name {
  font-family: var(--display);
  font-size: var(--d-md);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-right: auto;
}
.shop-where { font-size: var(--t-small); color: var(--toner); margin: 0; }

/* ── the paper bar ───────────────────────────────────────── */

.gauge { display: flex; flex-direction: column; gap: var(--s2); }
.track {
  height: 10px;
  background: var(--wash);
  border: 1px solid var(--hair-soft);
  overflow: hidden;
}
.fill { height: 100%; transition: width var(--base) var(--ease); }
.fill.is-empty { background: var(--orange); }
.fill.is-low   { background: var(--yellow); }
.fill.is-ok    { background: var(--green); }
.fill.is-off   { background: var(--toner-dim); }

.count {
  font-family: var(--type);
  font-size: var(--t-meta);
  letter-spacing: 0.04em;
  color: var(--toner);
  font-variant-numeric: tabular-nums;
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
}
.count b { color: var(--paper); font-weight: 400; }

.pill {
  font-family: var(--type);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 7px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.pill.is-empty { color: var(--orange); }
.pill.is-low   { color: var(--yellow); }
.pill.is-ok    { color: var(--green); }
.pill.is-off   { color: var(--toner); }

/* ── buttons ─────────────────────────────────────────────── */

button {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  min-height: 48px;
  padding: 13px var(--s4);
  border: none;
  border-radius: var(--edge);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  transition: transform var(--fast) var(--ease), opacity var(--fast) var(--ease);
}
button:active:not(:disabled) { transform: translate(2px, 2px); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button:focus-visible { outline: var(--line) solid var(--paper); outline-offset: 3px; }

.accent { background: var(--orange); color: var(--orange-ink); }
.solid  { background: var(--paper); color: var(--ink); }
.green  { background: var(--green); color: var(--ink); }
.ghost  {
  background: transparent;
  color: var(--paper);
  box-shadow: inset 0 0 0 var(--line) var(--hair);
}
.small {
  min-height: 36px;
  padding: 7px var(--s3);
  font-size: var(--t-meta);
}

.actions { display: flex; flex-direction: column; gap: var(--s2); }

/* ── forms ───────────────────────────────────────────────── */

form { display: flex; flex-direction: column; gap: var(--s3); }
label {
  font-family: var(--type);
  font-size: var(--t-meta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--toner);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
input {
  font-family: var(--body);
  font-size: 16px; /* 16px or iOS zooms the page on focus */
  min-height: 48px;
  padding: 12px var(--s3);
  background: var(--ink-lift);
  color: var(--paper);
  border: var(--line) solid var(--hair);
  border-radius: var(--edge);
}
input:focus-visible { outline: var(--line) solid var(--orange); outline-offset: 1px; }

/* ── the refill log ──────────────────────────────────────── */

.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.log li {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  font-family: var(--type);
  font-size: var(--t-meta);
  color: var(--toner);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--hair-soft);
  font-variant-numeric: tabular-nums;
}
.log b { color: var(--paper); font-weight: 400; }

/* ── errors and the toast ────────────────────────────────── */

.error {
  border-left: 6px solid var(--orange);
  background: var(--ink-lift);
  padding: var(--s3) var(--s4);
  font-size: var(--t-small);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--s5) + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--type);
  font-size: var(--t-meta);
  letter-spacing: 0.04em;
  padding: var(--s3) var(--s4);
  max-width: calc(100vw - var(--s5) * 2);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ── sign in ─────────────────────────────────────────────── */

.signin { display: flex; flex-direction: column; gap: var(--s4); }

/* A rule with the word sitting in it, rather than a centred word floating
   between two gaps. */
.divider {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--type);
  font-size: var(--t-meta);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--toner);
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hair-soft);
}

/* Google owns the shape of its button and will not be restyled -- forcing it
   is against their terms and breaks on their next release. It is given room
   and left alone. */
.google-slot {
  display: flex;
  justify-content: center;
  min-height: 44px;
}
