/* hoanghai.css - Sổ Hoàng Hải. Only what kit v1.4 lacks (gap ids from KIT_GAPS.md). Page layout uses the kit's .page-cols, so there is no layout glue here.
   Every value is a var(--*) token of tokens.css or the kit; no colour literal; no kit class is restyled.
   Delete a rule when the kit ships the part named in its gap. */

/* G1 · Kết quả LÃI / LỖ: the word at figure size beside a tone disc, then the whole signed amount on its own line.
   The kit's KPI card holds a figure, not a verdict word that must be read before the number (PRODUCT principle 2).
   Markup: .hoanghai-verdict[data-tone="ok|bad"] > span.hoanghai-verdict-ic[aria-hidden] > svg.icon.icon-lg
           + p.hoanghai-verdict-word ("LÃI" / "LỖ") + p.hoanghai-verdict-fig.num-in|.num-neg (sign in the text, U+2212)
           + optional p.hoanghai-verdict-note. Delete when the kit ships a verdict figure. */
.hoanghai-verdict {
  container-type: inline-size;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
}
.hoanghai-verdict-ic {
  display: grid;
  place-items: center;
  inline-size: var(--sp-9);
  block-size: var(--sp-9);
  border-radius: var(--radius-pill);
  background: var(--ok-bg);
  color: var(--ok);
}
.hoanghai-verdict-word {
  margin: 0;
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: var(--lh-tight);
  color: var(--ok);
}
.hoanghai-verdict-fig {
  grid-column: 1 / -1;
  margin: 0;
  font-weight: 700;
  line-height: var(--lh-tight);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: clamp(var(--fs-xl), calc(100cqi / (var(--fit-chars, 13) * 0.6)), var(--fs-display, var(--fs-3xl)));
}
.hoanghai-verdict-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
}
.hoanghai-verdict[data-tone="bad"] .hoanghai-verdict-ic { background: var(--danger-bg); color: var(--danger); }
.hoanghai-verdict[data-tone="bad"] .hoanghai-verdict-word { color: var(--danger); }

/* G1 (small form) · the same word inside a kit .kpi-value, before the amount: "LÃI 1.845.448 ₫". */
.hoanghai-ketqua {
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-inline-end: var(--sp-2);
}

/* G2 · Nhãn dán thùng: one A4 sheet cut into four A6 labels (2 × 2) with dashed cut lines.
   Markup: .paper.hoanghai-labels > .hoanghai-label × 4 > .hoanghai-label-from, .hoanghai-label-to, .hoanghai-label-foot.
   The kit lets a tenant set the margins of .paper (COMPONENTS "A4 paper"). Delete when the kit ships a label sheet. */
.paper.hoanghai-labels {
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.hoanghai-label {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6);
  border: 1px dashed currentColor;
  min-block-size: 0;
}
.hoanghai-label-from { font-size: var(--fs-sm); }
.hoanghai-label-to { flex: 1; display: flex; flex-direction: column; gap: var(--sp-2); }
.hoanghai-label-name { font-size: var(--fs-2xl); font-weight: 700; line-height: var(--lh-tight); margin: 0; }
.hoanghai-label-line { font-size: var(--fs-lg); margin: 0; }
.hoanghai-label-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--sp-3);
  border-block-start: 1px solid currentColor;
  padding-block-start: var(--sp-3);
}
.hoanghai-label-box { font-size: var(--fs-3xl); font-weight: 700; line-height: var(--lh-tight); }
.hoanghai-label-empty {
  display: block;
  min-block-size: var(--sp-8);
  border: 1px solid currentColor;
}
.hoanghai-label-blank { border-style: dashed; }
