/* ==========================================================================
   DRIVER HOURS & FATIGUE  (#251)                            prefix: ftg-
   --------------------------------------------------------------------------
   The screen at #/fatigue (js/screens/67-fatigue.js). `ftg-` was free in
   css/core.css, every file in css/modules/, the portal stylesheet, the driver
   stylesheet and all three apps' markup before this file existed (grepped, 0
   hits) — worth keeping true, because the one-owner rule in
   tests/css-split-check.js means a selector appearing in two module files hands
   the tie to the alphabet.

   Everything generic is borrowed on purpose: .card, .table, .table-wrap and
   .section-title come from css/core.css, so this file holds only what is
   specific to a compliance surface that mostly has to say it does not know.

   THREE TREATMENTS THAT MUST NOT BE CONFUSED. This is the whole reason the file
   is more than layout, and getting the first two the wrong way round is the
   easy mistake:

     .ftg-fig--unknown   HATCHED — "we do not know". No certified provider is
     .ftg-prov--unknown  connected, or one is and it has never answered for this
     .ftg-unknown        driver, or the driver register has not been read yet.
                         No value is drawn at all, because there is none: a dash
                         on a hatch. Never a flat colour, never green, and never
                         folded into either a positive or a negative answer.

     .ftg-fig--stale     DIMMED AND DASHED — "we hold this figure exactly, and
     .ftg-prov--stale    deliberately do not claim it describes the driver now".
                         The value IS drawn, dimmed, beside the clock time it
                         was taken at. It must NOT borrow the hatch: hatching a
                         value we hold reads as uncertainty about the value,
                         when the only thing withheld is its currency. Same
                         distinction .terms-none draws against .terms-unknown,
                         and the same one the change log draws for a redacted
                         field it can name but will not print.

     .ftg-none           DIMMED AND DASHED for a known negative: we looked, and
     .ftg-plan--none     there is nothing there — an empty driver register, a
                         driver with nothing planned in the window.

   And nothing here is green. There is no state on this screen that means
   "compliant": the figures are an unofficial indicator at best, the diary of
   record is somewhere else, and a green pill on an hours screen is precisely
   the claim #251 forbids. A current provider reading gets a neutral, confident
   solid — not a pass mark.
   ========================================================================== */

.ftg-wrap { display:flex; flex-direction:column; gap:16px; }

/* ---- the disclaimer, which is the feature ------------------------------- */
/* Full-size type, at the top, in the flow — not a toast, not a footnote, and
   not smaller than the figures it qualifies. */
.ftg-notice {
  border-left:5px solid var(--warn,#c98a00);
}
.ftg-notice--unofficial {
  background-image:repeating-linear-gradient(135deg,
    rgba(0,0,0,.055) 0 6px, transparent 6px 12px);
}
.ftg-notice__head {
  margin:0 0 10px; font-weight:900; font-size:19px; line-height:1.35;
  letter-spacing:-.3px; color:var(--ink);
}
.ftg-notice__body {
  margin:0 0 8px; font-weight:700; font-size:14px; line-height:1.6; color:var(--ink);
}
.ftg-notice__adapter, .ftg-notice__holder {
  margin:0 0 6px; font-weight:700; font-size:13px; line-height:1.6; color:var(--muted-2);
}
.ftg-notice__adapter b, .ftg-notice__holder b { color:var(--ink); }
.ftg-notice__bug {
  margin:10px 0 0; padding:10px 12px; border:1px solid var(--red,#c0392b); border-radius:8px;
  font-weight:700; font-size:13px; line-height:1.55; color:var(--ink);
}

/* ---- is anything connected --------------------------------------------- */
.ftg-conn__body { margin:0 0 8px; font-weight:700; font-size:13px; line-height:1.6; color:var(--muted-2); }
.ftg-conn__body b { color:var(--ink); }
.ftg-conn--none { border-left:4px solid var(--line); }

/* ---- the table --------------------------------------------------------- */
.ftg-table { width:100%; }
.ftg-table th { vertical-align:bottom; }
.ftg-th-sub {
  display:block; margin-top:3px; font-weight:700; font-size:11px; line-height:1.45;
  color:var(--muted); text-transform:none; letter-spacing:0;
}
.ftg-who b { display:block; font-size:13px; }
.ftg-whoid { display:block; font-size:11px; font-weight:700; color:var(--muted); }

.ftg-fig, .ftg-prov, .ftg-plan { vertical-align:top; }
.ftg-figval { display:block; font-weight:900; font-size:15px; color:var(--ink); }
.ftg-figlbl { display:block; margin-top:2px; font-weight:700; font-size:11px; color:var(--muted); }
.ftg-planval { display:block; font-weight:800; font-size:13px; color:var(--ink); }
.ftg-dash { display:block; font-weight:900; font-size:15px; color:var(--muted); }

/* HATCHED — we do not know. A dash on a hatch, and no number anywhere. */
.ftg-fig--unknown, .ftg-prov--unknown {
  background-image:repeating-linear-gradient(135deg,
    rgba(0,0,0,.055) 0 6px, transparent 6px 12px);
}
/* DIMMED AND DASHED — held, and not claimed to be current. No hatch. */
.ftg-fig--stale, .ftg-prov--stale {
  border-top:1px dashed var(--line); border-bottom:1px dashed var(--line);
  background:#fff;
}
.ftg-fig--stale .ftg-figval { color:var(--muted); font-weight:800; }
.ftg-prov--stale { color:var(--muted); }
.ftg-provstale { display:block; margin-top:4px; font-weight:800; font-size:11px; line-height:1.45; color:var(--muted-2); }
.ftg-prov b { font-size:12px; }
.ftg-provwhy { display:block; font-weight:700; font-size:11px; line-height:1.45; color:var(--muted); }
.ftg-plan--none .ftg-figlbl { color:var(--muted); font-style:italic; }

/* ---- warnings from a reading ------------------------------------------- */
/* Never colour alone: each chip carries its own words, and the past-tense one
   says at the front that it is what the last reading said. */
.ftg-alerts { display:flex; flex-direction:column; gap:4px; margin-top:6px; }
.ftg-alert {
  display:block; border-radius:6px; padding:4px 7px;
  font-weight:800; font-size:11px; line-height:1.4;
}
.ftg-alert--breach { border:1px solid var(--red,#c0392b); color:var(--ink); }
.ftg-alert--warn   { border:1px solid var(--warn,#c98a00); color:var(--ink); }
.ftg-alert--noted  { border:1px dashed var(--line); color:var(--muted); }

/* ---- the legend, and the two register states --------------------------- */
.ftg-legend {
  display:flex; align-items:center; flex-wrap:wrap; gap:6px;
  margin:0 0 10px; font-weight:700; font-size:11px; color:var(--muted-2);
}
.ftg-key { display:inline-block; width:22px; height:12px; border:1px solid var(--line); border-radius:3px; }
.ftg-key--unknown {
  background-image:repeating-linear-gradient(135deg,
    rgba(0,0,0,.055) 0 4px, transparent 4px 8px);
}
.ftg-key--stale { border-style:dashed; background:#fff; }
.ftg-key--live  { background:var(--bg-2,#f4f5f7); }

.ftg-unknown {
  border:1px dashed var(--line);
  background-image:repeating-linear-gradient(135deg,
    rgba(0,0,0,.055) 0 6px, transparent 6px 12px);
}
.ftg-none { border:1px dashed var(--line); background:#fff; }
.ftg-unknown p, .ftg-none p { margin:0; font-weight:700; font-size:13px; line-height:1.6; color:var(--muted-2); }

.ftg-foot { margin:10px 0 0; font-weight:700; font-size:12px; line-height:1.55; color:var(--muted-2); }

/* ---- what is not covered ----------------------------------------------- */
.ftg-scope ul { margin:0; padding-left:18px; }
.ftg-scope li { font-weight:700; font-size:12px; line-height:1.6; color:var(--muted-2); margin:0 0 6px; }
.ftg-scope li b { color:var(--ink); }
