/* Toolholder firmware downloads + live strain — same light, large look as /present. */
:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --panel: #ffffff;
  --panel-2: #eceef1;
  --line: #d3d8de;
  --line-strong: #9aa3ad;
  --text: #1b2129;
  --muted: #5d6874;
  --green: #1fae5a;
  --green-glow: rgba(31,174,90,.45);
  --red: #e01f1f;
  --red-glow: rgba(224,31,31,.45);
  --amber: #b07d00;
  --blue: #2b7fe0;
  --focus: #2b7fe0;
  font: 18px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; padding: clamp(10px, 1.6vw, 28px); background: var(--bg); }
h1, h2, p { margin: 0; }
a { color: #1c5fae; }
.eyebrow { font-size: .78rem; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.muted { color: var(--muted); font-size: .85rem; }
.crumbs { margin-bottom: 6px; }
.home-link { font-weight: 600; text-decoration: none; font-size: .95rem; }
.home-link:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }

.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.top h1 { font-size: clamp(24px, 2.6vw, 40px); font-weight: 700; }

.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; border: 1px solid var(--line); background: var(--panel);
}
.pill::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--line-strong); }
.pill.fresh::before { background: var(--green); box-shadow: 0 0 12px var(--green-glow); }
.pill.stale { color: #7a5a00; border-color: #e6cf8f; }
.pill.stale::before { background: #d99a06; }
.pill.offline { color: #a51616; border-color: #e9a3a3; }
.pill.offline::before { background: var(--red); box-shadow: 0 0 12px var(--red-glow); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px 24px;
  box-shadow: 0 2px 12px rgba(27,33,41,.06); min-width: 0;
}
.card h2 { font-size: clamp(22px, 2vw, 30px); margin-bottom: 12px; }

.field-label { display: block; font-weight: 600; margin-bottom: 6px; }
select {
  width: 100%; font: inherit; font-size: 1.15rem; font-weight: 600; padding: 12px 14px; min-height: 56px;
  border: 2px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--text);
}
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 16px 0; }
.details div { min-width: 0; }
.details .wide { grid-column: 1 / -1; }
.details dt { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.details dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
#fw-notes { font-weight: 400; }
.hash-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
code { font: 600 .9rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--panel-2); padding: 3px 7px; border-radius: 6px; }
.issues { margin: 0; padding-left: 1.2em; font-weight: 500; }

.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .85rem; font-weight: 700; border: 1px solid var(--line); background: var(--panel-2); }
.badge.candidate { background: #dff3e8; border-color: #8fd6ac; color: #11633a; }
.badge.bench_verified { background: #dcebfb; border-color: #8db9ee; color: #164c8a; }
.badge.superseded { background: #eceef1; color: #4b5560; }
.badge.diagnostic { background: #f1e6fb; border-color: #c9a6ea; color: #5b2d87; }
.badge.not_built, .badge.deferred { background: #fff3d1; border-color: #e6cf8f; color: #7a5a00; }
.badge.on { background: #dff3e8; border-color: #8fd6ac; color: #11633a; }
.badge.off { background: #fff3d1; border-color: #e6cf8f; color: #7a5a00; }
.muted-badge { color: var(--muted); }

button, .button {
  font: inherit; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  border: 2px solid var(--line-strong); border-radius: 12px; background: #e9ecf0; color: var(--text); cursor: pointer;
}
button.small { font-size: .85rem; min-height: 36px; padding: 4px 14px; border-radius: 9px; }
button.small.active { background: var(--text); border-color: var(--text); color: #fff; }
button:disabled { opacity: .45; cursor: not-allowed; }
.button.primary { background: var(--green); border-color: #157a3e; color: #fff; font-size: 1.3rem; min-height: 72px; padding: 14px 34px; }
.button.primary:hover { background: #1a9a4f; }
.button.primary.disabled { background: #c9ced5; border-color: #aab2bb; color: #59626c; cursor: not-allowed; pointer-events: none; }
.download-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 6px 0 14px; }
.reason { color: #7a5a00; font-weight: 600; min-height: 1.4em; }
.error { color: #a51616; font-weight: 600; margin-top: 8px; }

.ipe { border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; background: #fafbfc; }
.ipe summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; }
.ipe ol { margin: 10px 0; padding-left: 1.3em; }
.ipe li { margin: 4px 0; }
.eeprom { margin: 8px 0; }

.live-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.live-head h2 { margin-bottom: 0; }
.tag { font: 600 .85rem ui-monospace, SFMono-Regular, Menlo, monospace; padding: 4px 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); }
.readout { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 12px 0 6px; }
.counts { font-size: clamp(56px, 7vw, 112px); line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.counts.stale { color: #a3abb4; }
.unit { font-size: 1.1rem; font-weight: 600; }
.facts { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.chart-head { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 10px; flex-wrap: wrap; }
.toggle { display: flex; gap: 6px; }
canvas { display: block; width: 100%; height: 220px; margin-top: 8px; background: #fbfcfd; border: 1px solid var(--line); border-radius: 10px; }
.temp { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.temp .label { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; }
.temp-value { font-size: clamp(34px, 3.6vw, 54px); font-weight: 800; font-variant-numeric: tabular-nums; }
.temp-value.stale { color: #a3abb4; }
.small-print { margin-top: 14px; color: var(--muted); font-size: .78rem; }

@media (max-width: 980px) {
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  :root { font-size: 16px; }
  .card { padding: 16px; }
  .details { grid-template-columns: 1fr; }
  .button.primary { width: 100%; }
}

/* t_edbc07c5: read-only A–F observer (holder page + RevPi Out1/In1 readback). */
.fw-observer { margin: 10px 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.fw-observer-head { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.fw-observer-head .label { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.fw-step { font-size: 1.15rem; }
.fw-bit { font-size: .85rem; color: var(--muted); }
.fw-bit b { display: inline-block; min-width: 1.4em; text-align: center; padding: 0 4px; border-radius: 5px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-variant-numeric: tabular-nums; }
.fw-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.fw-steps li { min-width: 0; padding: 6px 6px; border: 3px solid var(--line); border-radius: 9px; background: var(--panel); font-size: .78rem; color: var(--muted); opacity: .55; overflow-wrap: anywhere; text-align: center; }
.fw-steps li b { display: block; font-size: 1.1rem; color: var(--text); }
.fw-steps li[aria-current="step"] { opacity: 1; color: var(--text); font-weight: 650; border-color: #4a5866; background: #e3e8ee; box-shadow: 0 0 0 3px rgba(74,88,102,.25); }
.fw-steps li[aria-current="step"][data-step="B"], .fw-steps li[aria-current="step"][data-step="C"], .fw-steps li[aria-current="step"][data-step="E"] { border-color: var(--green); background: #e2f5ea; box-shadow: 0 0 0 3px var(--green-glow); }
.fw-steps li[aria-current="step"][data-step="F"] { border-color: var(--red); background: #fbe4e4; box-shadow: 0 0 0 3px var(--red-glow); }
.fw-steps[data-source="controller"] li[aria-current="step"] { border-style: dashed; }
.fw-steps li.controller-only { opacity: .9; border-style: dotted; }
.fw-observer-text { margin: 8px 0 0; font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.fw-observer-text[data-kind="device"] { color: #17633a; }
.fw-observer-text[data-kind="uncertain"], .fw-observer-text[data-kind="device-disputed"] { color: #8a5b0d; font-weight: 600; }
@media (max-width: 520px) { .fw-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
