/* ============================================================================
   sheet-tokens.css — the CLAIM-SHEET DESIGN TOKENS, mirrored for the screen.

   ⚠ GENERATED-FROM / MIRRORS: src/Boab.Works.Web/Services/ClaimSheets/SheetTheme.cs
   (plus the dashed-guide geometry hardcoded in ClaimSheetDocument.SvgWriteBox).
   This file is the ONE mirror point between the printed claim sheet and the app.
   When a SheetTheme token changes, change the matching custom property HERE and
   nowhere else — every on-screen sheet-mirroring surface (stage 2: the WYSIWYG
   claim-entry panels; stage 3: app-wide) consumes these variables.
   A regression test (SheetTokenMirrorTests) asserts each value below equals its
   SheetTheme constant, so drift fails the build instead of the eyeball pass.

   THE pt → screen MAPPING (defined once, used everywhere):
       1 sheet-pt  =  0.1rem   (at the 16 px root: 1.6 px per pt)
   CSS-physical pt is 4/3 px, so this renders the sheet at exactly 120 % of its
   printed size — one uniform scale factor, chosen so the sheet's 28 pt capture
   boxes land at ~44.8 px (a comfortable input height) and its 7.2 pt captions at
   ~11.5 px (legible micro-caps). Because EVERY dimension multiplies the same
   --sheet-pt, all sheet proportions hold exactly; retune the whole surface by
   changing --sheet-pt alone.
   ============================================================================ */
:root {
    /* ── The unit: 1 sheet-pt (see mapping note above) ─────────────────────── */
    --sheet-pt: 0.1rem;

    /* ── Grayscale palette (SheetTheme colour tokens, verbatim) ──────────────
       These are the PAPER (print / PDF) values and the mirror-tested source of
       truth (SheetTokenMirrorTests reads THIS block). They stay light here on
       purpose. Dark mode does NOT edit them here: boab-design.css remaps the
       --sheet-* COLOUR tokens under `.boab-dark` (owner ruling 2026-07-07 — the
       sheet tier now respects dark mode), and pins these same literals back under
       @media print so print/PDF stay paper. Keep this file a pure light mirror. */
    --sheet-ink: #222524;            /* Ink / Body / Heading */
    --sheet-grey: #555555;           /* Grey — secondary text */
    --sheet-hairline: #cfcfcf;       /* PowderGrey / Hairline */
    --sheet-page-bg: #ffffff;        /* White / PageBg */
    --sheet-label-grey: #6b6b6b;     /* LabelGreyV5 — tracked-caps labels/captions */
    --sheet-muted: #8c8c8c;          /* MutedV5 — least-important micro type */
    --sheet-masthead-rule: #b9b9b9;  /* MastheadRule */
    --sheet-inner-rule: #d6d6d6;     /* InnerRule — rules INSIDE panels */
    --sheet-border: #9e9e9e;         /* BorderB — panel border */
    --sheet-write-rule: #a6a6a6;     /* WriteRule — capture chrome */
    --sheet-field-tint: #f6f6f6;     /* FieldTintB — write-area tint (the ONLY fill) */
    --sheet-guide-grey: #c6c6c6;     /* GuideGrey — in-box dashed baseline guides */

    /* ── Font sizes (SheetTheme Fs*, in sheet-pt) ──────────────────────────── */
    --sheet-fs-default: calc(var(--sheet-pt) * 9);      /* FsDefault */
    --sheet-fs-title: calc(var(--sheet-pt) * 17);       /* FsTitleV5 (stage 3) */
    --sheet-fs-kicker: calc(var(--sheet-pt) * 7.2);     /* FsKicker — captions / section index */
    --sheet-fs-meta: calc(var(--sheet-pt) * 8.5);       /* FsMetaV5 */
    --sheet-fs-label: calc(var(--sheet-pt) * 6.8);      /* FsLabelV5 — field labels */
    --sheet-fs-value: calc(var(--sheet-pt) * 9.5);      /* FsValueV5 — info-grid values */
    --sheet-fs-identity: calc(var(--sheet-pt) * 12.5);  /* FsIdentityV5 — the big ids */
    --sheet-fs-item: calc(var(--sheet-pt) * 9);         /* FsValue — checklist item text */
    --sheet-fs-box: calc(var(--sheet-pt) * 8);          /* FsBox — comments / line-item cells */
    --sheet-fs-tick: calc(var(--sheet-pt) * 9);         /* FsTick — checklist ✓ / ✗ glyphs */
    --sheet-fs-foot: calc(var(--sheet-pt) * 6.5);       /* FsFootV5 — footer micro type */
    /* Derived (ClaimSheetDocument.SignCell): the sign-off micro-hint = FsFootV5 − 0.5 */
    --sheet-fs-sign-hint: calc(var(--sheet-pt) * 6);

    /* ── Tracking (SheetTheme Track*, em fractions — unit-identical on screen) ─ */
    --sheet-track-kicker: 0.16em;    /* TrackKicker */
    --sheet-track-label: 0.09em;     /* TrackLabel */
    --sheet-track-foot: 0.12em;      /* TrackFoot */

    /* ── Panel + capture chrome (SheetTheme, in sheet-pt) ──────────────────── */
    --sheet-radius: calc(var(--sheet-pt) * 3.5);         /* RadiusB — panel corner radius */
    --sheet-stroke: calc(var(--sheet-pt) * 0.8);         /* StrokeB — panel hairline weight */
    --sheet-panel-pad: calc(var(--sheet-pt) * 7.5);      /* PanelPadB — panel inner padding */
    --sheet-block-gap: calc(var(--sheet-pt) * 7);        /* BlockGapB — gap between panels */
    --sheet-caption-pad-t: calc(var(--sheet-pt) * 5);    /* CaptionPadT */
    --sheet-caption-pad-b: calc(var(--sheet-pt) * 3.5);  /* CaptionPadB */
    --sheet-body-top-gap: calc(var(--sheet-pt) * 8);     /* BodyTopGap (stage 3) */
    --sheet-grid-row-pad-v: calc(var(--sheet-pt) * 3);   /* GridRowPadV — info-grid row pad */
    --sheet-inner-rule-w: calc(var(--sheet-pt) * 0.5);   /* InnerRuleW — in-panel rule weight */
    --sheet-write-stroke: calc(var(--sheet-pt) * 0.6);   /* WriteStroke — capture chrome weight */
    --sheet-write-radius: calc(var(--sheet-pt) * 2.5);   /* WriteRadiusB — capture-box radius */
    --sheet-brand-lockup-h: calc(var(--sheet-pt) * 18);  /* BrandLockupH (stage 3) */

    /* ── Capture dimensions (SheetTheme, in sheet-pt) ──────────────────────── */
    --sheet-handwrite-box: calc(var(--sheet-pt) * 28);   /* HandwriteBox — capture box height */
    --sheet-checklist-row: calc(var(--sheet-pt) * 20);   /* ChecklistRow — row min height */
    --sheet-lineitem-box: calc(var(--sheet-pt) * 18);    /* LineItemBox (equipment, stage 3) */
    --sheet-lineitem-pad-v: calc(var(--sheet-pt) * 2);   /* LineItemPadV — equipment row pad */
    --sheet-tick-box: calc(var(--sheet-pt) * 11);        /* TickBoxSize — tick-square side */
    --sheet-tick-radius: calc(var(--sheet-pt) * 2.5);    /* TickBoxRadius */
    --sheet-signature-row: calc(var(--sheet-pt) * 26);   /* SignatureRow — sign-off line height */

    /* ── Dashed baseline-guide geometry ────────────────────────────────────────
       Mirrors ClaimSheetDocument.SvgWriteBox (hardcoded there, not in SheetTheme):
       inset 7, first guide 7 above the bottom, extra guides every 16, stroke 0.5,
       dash 2.6 on / 2.2 off, colour GuideGrey. */
    --sheet-guide-inset: calc(var(--sheet-pt) * 7);
    --sheet-guide-pitch: calc(var(--sheet-pt) * 16);
    --sheet-guide-w: calc(var(--sheet-pt) * 0.5);
    --sheet-guide-dash: calc(var(--sheet-pt) * 2.6);
    --sheet-guide-gap: calc(var(--sheet-pt) * 2.2);
    /* The ready-made guide stroke (one horizontal dashed line, tiled by size/position). */
    --sheet-guide-image: repeating-linear-gradient(to right,
        var(--sheet-guide-grey) 0 var(--sheet-guide-dash),
        transparent var(--sheet-guide-dash) calc(var(--sheet-guide-dash) + var(--sheet-guide-gap)));

    /* NOT mirrored (print-only layout with no on-screen counterpart): page margins
       (V5Margin*), the print-safe spine envelope (Spine*), QrSize, HairlineWidth. */
}
