/* loadshift-bba-demo/assets/type.css */
/* Typography control, loaded last by every page in this build.               */
/* Three jobs: kill orphan words in prose, balance headings across their      */
/* lines, and stop fixed-height row labels from wrapping at all.              */

/* ── 1. Prose: no single-word last line ──────────────────────────────────────
   text-wrap: pretty is inherited, so setting it once on the root covers every
   paragraph, list item, cell, and panel in the page. It only changes where
   lines break; it never changes intrinsic width. ─────────────────────────── */
html {
  text-wrap: pretty;
  hyphens: none;
  -webkit-hyphens: none;
}

/* ── 2. Headings and titles: even line lengths, no stranded last word ────── */
h1, h2, h3, h4, h5,
.dx-title,
.hero h1,
.sec-head h1,
.page-head h1,
.panel__title,
.part-card .pc-t,
.ph h3,
.acard__head h3,
.d-card__head h2,
.dest .dh b,
.src b,
.foot b,
.muster b,
.why b,
.jv b,
.keep li b,
.banner__t,
.trk__t,
.drop-t,
.verdict b,
.exc-t,
.way-t,
.geo-t,
.fitt,
.cvt,
.dt,
.qt,
.sb-t,
.tl-t {
  text-wrap: balance;
}

/* ── 3. Fixed-height rows: labels never wrap, they truncate ──────────────────
   These sit inside rows with an explicit height (.row-34, .row-38, and the
   per-page equivalents). A wrapped label would push past the row and get
   clipped mid-line, which reads as a bug. Truncating with an ellipsis is the
   honest failure mode, and no shipped string in this build reaches it. Only
   the title line is held to one line; the caption under it may wrap.
   ─────────────────────────────────────────────────────────────────────────── */
.n-name, .n-sub,
.g-name, .g-sub,
.co-n,
.aw-t,
.dsc-t,
.q-t,
.chg-t,
.gname, .gsub,
.cst-t,
.cls-n,
.lg .nm {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Description lines under those titles sit in rows tall enough for two lines.
   They wrap, they just must not orphan a word, which the root rule handles. */
.co-d, .aw-d, .dsc-d, .q-d, .chg-d, .cst-d, .exc-v small, .lg .nm small {
  text-wrap: pretty;
}

/* Table cells that carry a primary line plus a caption line are designed for
   exactly two lines in a fixed-height row. Keep each to one line. */
.t .prim, .t .sub2, .t .mono, .er-route {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Numeric and status columns should never break across lines. */
.t .tx-right, .pill, .status-chip, .owner-tag, .cree-badge,
.modelled, .kpi-num, .amt, .amt-big, .big, .cls-n, .co-c, .aw-v,
.float-tag, .doc, .gref, .queue, .eta__v, .pw__v {
  white-space: nowrap;
}

/* ── 4. Numbers keep their units ─────────────────────────────────────────────
   Applied as non-breaking spaces in the markup itself (see the build notes);
   this rule catches anything that slips through a flex container. ────────── */
.nb { white-space: nowrap; }

/* ── 5. Panel prose in the controller sidebar ───────────────────────────────
   The right-hand panel is narrow, so it is the most orphan-prone surface in
   the whole build. Balance the title, pretty the two prose blocks, and stop
   feature bullets from breaking a two-word phrase across lines. ──────────── */
.dx-title { text-wrap: balance; }
.dx-story, .dx-desc { text-wrap: pretty; }
.dx-features li span { text-wrap: pretty; }
.dx-eyebrow, .dx-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 6. Hero leads ──────────────────────────────────────────────────────────
   Capped measure keeps a hero paragraph between roughly 60 and 80 characters
   a line, which is where balance and pretty do their best work. ──────────── */
.hero__lead { max-width: 74ch; }
.cover-note { max-width: 82ch; }

/* Console subheads keep the 720px measure console.css already gives them.
   Capping them tighter pushed every one of them onto an extra line and blew
   the fixed 780px budget on five screens. */
