/* tools/worksheet.css — Vireo shared salesman-review worksheet styling.
 *
 * One stylesheet for the printed worksheet, loaded by every take-off tool so the
 * output is identical no matter which engine produced it. THIS file owns the
 * `.out` worksheet block + the whole `@media print` worksheet. Each tool keeps
 * its own page chrome (hero header, input panels, segment/mass cards).
 *
 * Two view modes (Issue #5): the default internal worksheet, and `.out.cust`
 * (customer quantities-forward quote — Qty · SKU · Description; internal
 * SRC/flags/review chrome suppressed). worksheet.js toggles `.cust` on `.out`.
 *
 * Brand vars are declared here as a fallback so the worksheet also renders
 * standalone (e.g. a preview harness); a tool's own :root (same values) wins.
 */

:root {
  --paper:#f3efe6; --paper-2:#ece6d8; --ink:#211f1b; --ink-soft:#5c574d; --line:#d8d0bf;
  --red:#a62938; --red-d:#8c182c; --amber:#b0561a; --amber-soft:#f8ecdd; --tint:#f6e7ea; --sp:#fbefe2;
  --shadow:0 1px 0 rgba(0,0,0,.04),0 8px 28px -18px rgba(33,31,27,.5);
}

.out{background:#fff;border:1px solid var(--line);border-radius:6px;box-shadow:var(--shadow);overflow:hidden}
.out table{width:100%;border-collapse:collapse;font-size:13px}
.out thead th{font-family:"JetBrains Mono",monospace;font-size:9.5px;text-transform:uppercase;letter-spacing:.06em;
  color:#fff;text-align:left;font-weight:600;padding:8px;background:var(--ink)}
.out th.c,.out td.c{text-align:center}
.out th.r,.out td.r{text-align:right}
.out tbody td{padding:6px 8px;border-bottom:1px solid var(--line);vertical-align:middle}
.out tbody tr:nth-child(even){background:#fbf8f1}

.out tr.sect td{background:var(--red);color:#fff;font-family:"Saira Condensed",sans-serif;font-weight:600;
  text-transform:uppercase;letter-spacing:.08em;font-size:12px;padding:5px 8px}
.out tr.sect.scope td{background:var(--ink-soft)}

.out .sku{font-family:"JetBrains Mono",monospace;font-size:11.5px;color:var(--red-d);font-weight:700}
.out .sku.soft{color:var(--ink-soft);font-weight:400}
.out .src{font-family:"JetBrains Mono",monospace;font-size:11px;color:var(--ink-soft)}
.out .basis{font-family:"JetBrains Mono",monospace;font-size:11px;color:var(--ink-soft)}
.out .draft{font-family:"JetBrains Mono",monospace;font-size:14px;font-weight:700}
.out .flag{font-size:10.5px;color:var(--amber);font-style:italic}

.out tr.chk-row td{color:var(--ink-soft)}
.out tr.sp{background:var(--sp)}                 /* special-order (SP##) line — shaded */
.out tr.sp .src{color:var(--amber);font-weight:700}

.out .qin{width:54px;font-family:"JetBrains Mono",monospace;font-size:13px;padding:4px 5px;border:1px solid var(--line);
  border-radius:3px;background:var(--tint);text-align:right}
.out .ok{width:18px;height:18px;accent-color:var(--red)}

.out .foot-note{padding:11px 14px 14px;font-size:11px;color:var(--ink-soft);line-height:1.5}
.out .foot-note code{font-family:"JetBrains Mono",monospace;background:#efe9db;padding:1px 5px;border-radius:3px}

/* ---- Customer (quantities-forward) view — Issue #5 worksheet split -----------
   Same rows as the internal worksheet; columns are Qty · SKU · Description
   (owner call 2026-07-03 — the customer side carries the SKU for the quote /
   e-comm import). SRC/flags/review cells are never emitted, so no internal chrome
   can leak. Section bars stay Massa-red (matches how we quote by area). */
.out.cust table{font-size:14px}
.out.cust .qcol{font-family:"JetBrains Mono",monospace;font-weight:700;white-space:nowrap;width:1%;padding-right:16px}
.out.cust td.qty{color:var(--ink)}
/* SKU is shown on the customer sheet, but softened from the internal loud red to
   read as a reference key, not an alert. Kept narrow so Description gets the room. */
.out.cust .sku{color:var(--ink-soft);font-weight:600;font-size:12px;white-space:nowrap;width:1%;padding-right:16px}
.out.cust tr.chk-row td{color:var(--ink-soft)}
.out.cust tbody td{padding:7px 10px}

.print-only{display:none}

@media print{
  @page{size:letter portrait;margin:.5in .45in}
  /* -webkit-font-smoothing:auto keeps print text crisp; the screen header uses
     antialiased smoothing which prints lighter/ghosted. */
  body{background:#fff;padding:0;font-size:10px;-webkit-font-smoothing:auto}
  .screen-only,.panel,.actions{display:none!important}
  .grid{display:block!important}
  .print-only{display:block}
  .out{border:none;box-shadow:none}
  .out thead th{background:#211f1b!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .out tr.sect td{background:#a62938!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .out tr.sect.scope td{background:#5c574d!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .out tr.chk-row td{background:#fbefe2!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .out tr.sp td{background:#fbefe2!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .out table{font-size:9px}
  .out tbody td{padding:3px 5px}
  /* Header band: pin the saturated colors so the PDF engine renders them solid
     instead of dithering (the dither pattern reads as a fuzzy / doubled edge). */
  .ph{display:flex;justify-content:space-between;border-bottom:2px solid #a62938;padding-bottom:8px;margin-bottom:10px;
    -webkit-print-color-adjust:exact;print-color-adjust:exact}
  .ph .t{font-family:"Saira Condensed",sans-serif;font-size:22px;font-weight:700;color:#a62938;text-transform:uppercase;
    line-height:.9;-webkit-font-smoothing:auto;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .ph .s{font-size:9px;color:#5c574d}
  .ph .db{border:1px solid #b0561a;background:#f8ecdd;padding:5px 8px;font-size:7.5px;color:#b0561a;max-width:240px;
    -webkit-font-smoothing:auto;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .pjob{font-size:9px;margin:6px 0 4px}
  .pmeas{font-family:"JetBrains Mono",monospace;font-size:8px;color:#5c574d;margin:0 0 6px;line-height:1.35}

  /* Customer view in print: chunkier quantity column, and the header banner is a
     soft estimate line (not the loud amber salesman-DRAFT alert box). */
  .out.cust table{font-size:10px}
  .out.cust tbody td{padding:4px 7px}
  .out.cust .qcol{padding-right:18px}
  .out.cust .sku{padding-right:14px}
  .ph.cust .db.soft{border:none;background:transparent;color:#5c574d;font-size:8px;font-style:italic;
    max-width:260px;padding:0;font-weight:400}
  .ph.cust .db.soft b{font-weight:400}
}
