/* batch8 b8-shop-web - the Tree Shop page. tokens.css rule 1: NO PER-SCREEN
   COLOUR - this file names tokens only. Rule 2: colour never carries meaning
   alone - a unit's state is its WORDS (Down / Waiting parts / In work /
   Ready), a chosen button is inverted fill AND heavier weight AND
   aria-pressed. --tap (56 px) is the floor for anything tappable,
   --tap-primary (64 px) for the one primary action. A mechanic at 6 AM,
   gloves, cracked phone. Laid out for 390 px wide first. */
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body {
  margin: 0; padding: var(--sp-2); max-width: 760px;
  background: var(--c-bg); color: var(--c-text);
  font: var(--fw-body) var(--fs-body)/var(--lh-body) var(--font-ui);
  overflow-wrap: anywhere;
}
h1 {
  font-size: var(--fs-head); font-weight: var(--fw-head); line-height: var(--lh-tight);
  margin: 0 0 var(--sp-2) 0; padding-bottom: var(--sp-1);
  border-bottom: var(--bw-rule) solid var(--c-rule);
}
h2 {
  font-size: var(--fs-label); font-weight: var(--fw-label); text-transform: uppercase;
  letter-spacing: var(--ls-caps); color: var(--c-text-2); margin: var(--sp-3) 0 var(--sp-1) 0;
}
p { margin: 0 0 var(--sp-1) 0; }
.muted { color: var(--c-text-2); }
.big { font-size: var(--fs-head); font-weight: var(--fw-label); }
.alert {
  padding: var(--sp-1); margin-bottom: var(--sp-2); background: var(--c-alert-bg);
  color: var(--c-alert-text); font-weight: var(--fw-label); border-radius: var(--radius);
}
.banner { font-weight: var(--fw-label); }
.ts-banner { border-bottom: var(--bw-rule) solid var(--c-rule); margin-bottom: var(--sp-2); }

button, a.primary {
  display: block; width: 100%; min-height: var(--tap); margin: 0 0 var(--tap-gap) 0;
  padding: 12px; font-family: var(--font-ui); font-size: var(--fs-label);
  font-weight: var(--fw-label); text-align: center; text-decoration: none;
  border: var(--bw) solid var(--c-border); border-radius: var(--radius);
  background: var(--c-bg); color: var(--c-text);
}
button.primary, a.primary {
  min-height: var(--tap-primary); border-color: var(--c-accent);
  background: var(--c-accent); color: var(--c-on-accent); font-weight: var(--fw-head);
}
button[aria-pressed="true"] {
  background: var(--c-chosen-bg); color: var(--c-chosen-text);
  border-color: var(--c-chosen-bg); font-weight: var(--fw-head);
}
input, textarea {
  display: block; width: 100%; min-height: var(--tap); margin-bottom: var(--sp-2);
  padding: 12px; font-family: var(--font-ui); font-size: var(--fs-body);
  font-weight: var(--fw-label); border: var(--bw) solid var(--c-border);
  border-radius: var(--radius); background: var(--c-bg); color: var(--c-text);
}
textarea { min-height: calc(var(--tap) * 2); }
label { display: block; margin-bottom: var(--sp-1); font-size: var(--fs-label);
  font-weight: var(--fw-label); color: var(--c-text-2); }

.ts-nav { display: flex; gap: var(--tap-gap); margin-bottom: var(--sp-2); }
.ts-nav a, .ts-nav button { flex: 1 1 0; display: flex; align-items: center;
  justify-content: center; min-height: var(--tap); margin: 0;
  border: var(--bw) solid var(--c-border); border-radius: var(--radius);
  color: var(--c-text); text-decoration: none; font-weight: var(--fw-label); }
.lang { display: flex; gap: var(--tap-gap); }
.lang button { flex: 1 1 0; }

/* The three Tree Shop rows: the home-row shape, tall, one word line and one
   "as of / last loaded" line under it. */
button.ts-row { min-height: calc(var(--tap) + 16px); text-align: left;
  border-left: 4px solid var(--c-rule); font-size: var(--fs-body); }
.ts-row-label { display: block; font-weight: var(--fw-head); }
.ts-row-when { display: block; color: var(--c-text-2); font-weight: var(--fw-body); }

/* Two big buttons side by side on the sign-off; four in a 2x2 on the board. */
.ts-two, .ts-four { display: grid; grid-template-columns: 1fr 1fr; gap: var(--tap-gap);
  margin-bottom: var(--sp-2); }
.ts-two button, .ts-four button { min-height: var(--tap-primary); margin: 0;
  font-size: var(--fs-body); }

/* One unit: boxed by a rule, never coloured. */
section.ts-unit { margin-bottom: var(--sp-3); padding-bottom: var(--sp-2);
  border-bottom: var(--bw-rule) solid var(--c-rule); }
.ts-unit-head { font-size: var(--fs-head); font-weight: var(--fw-head); margin-bottom: var(--sp-1); }
button.ts-defect, div.ts-defect { text-align: left; font-size: var(--fs-body);
  font-weight: var(--fw-body); padding: 12px; margin-bottom: var(--tap-gap);
  border: var(--bw) solid var(--c-border); border-radius: var(--radius); }
.ts-defect .ts-line { display: block; }
.ts-defect .ts-item { font-weight: var(--fw-head); }
.ts-state-word { font-weight: var(--fw-head); }
.ts-entry { padding: var(--sp-1) 0; border-top: 1px solid var(--c-border); }
.ts-picks button { text-align: left; }
:focus-visible { outline: var(--bw-focus) solid var(--c-accent); outline-offset: 2px; }
