/* ==========================================================================
   estimate-print.css  ::  loaded media="print" only.
   The downloadable OllaCloud estimate. Two A4 pages, printed from a hidden
   #estimate-doc that is a direct child of <body>. Everything here is scoped to
   #estimate-doc so the site's own stylesheets, which also apply at print time,
   cannot reach into the document. The layout is the contract in
   notes/estimate-pdf-template.html; figures are written in at click time from
   currentCfg() and estimate().
   ========================================================================== */

/* ---- hide the whole site; print only the document ---------------------- */
/* body's own children are the header (with the fixed nav), main, footer, the
   scripts, and the drawn scrollbar appended by scroll.js. All go. The nav and
   the scrollbar are named as well, per the build notes, in case either is ever
   re-parented out of the flow. */
@page { size: A4; margin: 0; }
body > *:not(#estimate-doc) { display: none !important; }
#nav, .section_nav, [data-scrollbar] { display: none !important; }

#estimate-doc { display: block !important; }

/* ---- document reset (scoped) ------------------------------------------- */
#estimate-doc {
  --red:#FF2D46; --red-bright:#FF4D62; --ink:#000; --ink-soft:#3A3A3B;
  --rule:rgba(58,58,59,.3); --rule-strong:#3A3A3B; --tint:rgba(255,45,70,.06);
  --display:"Gotham","Montserrat","Helvetica Neue",Arial,sans-serif;
  --body:Arial,"Helvetica Neue",Helvetica,sans-serif;
  --mono:ui-monospace,"SF Mono",Menlo,monospace;
  -webkit-print-color-adjust:exact; print-color-adjust:exact;
  font-family:var(--body); color:var(--ink); font-size:8.6pt; line-height:1.42;
  background:#fff;
}
#estimate-doc *, #estimate-doc *::before, #estimate-doc *::after { box-sizing:border-box; margin:0; padding:0; }

#estimate-doc .page {
  width:210mm; height:297mm; background:#fff; position:relative;
  padding:14mm 15mm 13mm; overflow:hidden;
  display:flex; flex-direction:column;
  page-break-after:always;
}
#estimate-doc .page:last-child { page-break-after:auto; }

/* ---------- shared type ---------- */
#estimate-doc .eyebrow { font-family:var(--display); font-weight:600; font-size:6.6pt; letter-spacing:.14em;
  text-transform:uppercase; color:var(--red); white-space:nowrap; }
#estimate-doc .eyebrow.dim { color:var(--ink-soft); }
#estimate-doc .mono { font-family:var(--mono); font-size:7pt; letter-spacing:.02em; }
#estimate-doc h1 { font-family:var(--display); font-weight:700; font-size:19pt; line-height:1.1; letter-spacing:-.01em; }
#estimate-doc h2 { font-family:var(--display); font-weight:700; font-size:11pt; line-height:1.2; letter-spacing:-.005em; }
#estimate-doc h3 { font-family:var(--display); font-weight:600; font-size:8.4pt; }
#estimate-doc .rule { border:0; border-top:1px solid var(--rule); }
#estimate-doc .rule-hard { border:0; border-top:1.4px solid var(--rule-strong); }
#estimate-doc .num { font-variant-numeric:tabular-nums; }

/* ---------- masthead ---------- */
#estimate-doc .mast { display:flex; justify-content:space-between; align-items:flex-start; padding-bottom:4mm; }
#estimate-doc .mast img { height:9mm; width:auto; }
#estimate-doc .mast .meta { text-align:right; }
#estimate-doc .mast .meta .doctype { font-family:var(--display); font-weight:700; font-size:9pt; letter-spacing:.02em; text-transform:uppercase; }
#estimate-doc .mast .meta .ref { font-family:var(--mono); font-size:7.4pt; color:var(--ink-soft); margin-top:1mm; }

/* ---------- headline block ---------- */
#estimate-doc .head { display:grid; grid-template-columns:1fr 62mm; gap:8mm; align-items:end; padding:5mm 0 4mm; }
#estimate-doc .head p.lede { font-size:8.8pt; color:var(--ink-soft); max-width:108mm; margin-top:2.5mm; }

#estimate-doc .figure { border:1.4px solid var(--ink); padding:4mm 4.5mm 3.5mm; }
#estimate-doc .figure .lbl { font-family:var(--display); font-weight:600; font-size:6.4pt; letter-spacing:.14em;
  text-transform:uppercase; color:var(--ink-soft); }
#estimate-doc .figure .big { font-family:var(--display); font-weight:700; font-size:20pt; line-height:1.05; margin-top:1.5mm;
  letter-spacing:-.02em; }
#estimate-doc .figure .sub { font-size:7.4pt; color:var(--ink-soft); margin-top:1.5mm; }
#estimate-doc .figure .sub b { font-weight:700; color:var(--ink); }

/* ---------- key/value grid ---------- */
#estimate-doc .kv { display:grid; grid-template-columns:repeat(4,1fr); gap:4mm 6mm; padding:4mm 0 5mm; }
#estimate-doc .kv .k { font-family:var(--display); font-weight:600; font-size:6.4pt; letter-spacing:.12em;
  text-transform:uppercase; color:var(--ink-soft); margin-bottom:1mm; }
#estimate-doc .kv .v { font-size:8.4pt; }

/* ---------- config strip ---------- */
#estimate-doc .config { background:var(--tint); border-left:2.5px solid var(--red); padding:3.5mm 4mm; margin-bottom:5mm; }
#estimate-doc .config .what { font-size:8.6pt; }
#estimate-doc .config .what b { font-family:var(--display); font-weight:700; }

/* ---------- line items ---------- */
#estimate-doc table { width:100%; border-collapse:collapse; }
#estimate-doc thead th { font-family:var(--display); font-weight:600; font-size:6.4pt; letter-spacing:.12em;
  text-transform:uppercase; color:var(--ink-soft); text-align:right; padding:0 0 1.8mm; }
#estimate-doc thead th:first-child { text-align:left; }
#estimate-doc tbody td { padding:1.9mm 0; border-top:1px solid var(--rule); text-align:right; font-size:8.4pt; }
#estimate-doc tbody td:first-child { text-align:left; }
#estimate-doc tbody tr.grp td { border-top:none; padding:4mm 0 1mm; }
#estimate-doc tbody tr.grp td span { font-family:var(--display); font-weight:700; font-size:7pt; letter-spacing:.12em;
  text-transform:uppercase; }
#estimate-doc tbody tr.sub td { border-top:1px solid var(--rule-strong); font-weight:700; font-family:var(--display); font-size:8pt; }
#estimate-doc tbody tr.tot td { border-top:1.4px solid var(--ink); border-bottom:1.4px solid var(--ink);
  font-family:var(--display); font-weight:700; font-size:10.5pt; padding:2.6mm 0; }
#estimate-doc tbody td.rate { font-family:var(--mono); font-size:7pt; color:var(--ink-soft); }
#estimate-doc tbody td.qty { font-family:var(--mono); font-size:7.4pt; color:var(--ink-soft); }
#estimate-doc .none { color:var(--ink-soft); font-style:italic; }

/* ---------- foot ---------- */
#estimate-doc .pagefoot { margin-top:auto; padding-top:3.5mm; border-top:1px solid var(--rule);
  display:flex; justify-content:space-between; align-items:baseline;
  font-size:6.8pt; color:var(--ink-soft); }
#estimate-doc .pagefoot .mk { color:var(--red); font-family:var(--mono); }

/* ---------- page 2 ---------- */
#estimate-doc .band { padding-top:4mm; }
#estimate-doc .band + .band { margin-top:1mm; }
#estimate-doc .bandhead { margin-bottom:2.5mm; }
#estimate-doc .bandlede { font-family:var(--display); font-weight:500; font-size:9.4pt; line-height:1.32;
  color:var(--ink); max-width:168mm; margin:1.5mm 0 3mm; }
#estimate-doc .two { display:grid; grid-template-columns:1fr 1fr; gap:4mm 10mm; }

#estimate-doc .sheet { width:100%; border-collapse:collapse; margin-top:1mm; }
#estimate-doc .sheet thead th { font-family:var(--display); font-weight:600; font-size:6.4pt; letter-spacing:.12em;
  text-transform:uppercase; color:var(--ink-soft); text-align:left; padding:0 0 1.6mm; }
#estimate-doc .sheet thead th + th { padding-left:7mm; border-left:1px solid var(--rule); }
#estimate-doc .sheet td { border-top:1px solid var(--rule); padding:1.85mm 0; vertical-align:top; text-align:left; }
#estimate-doc .sheet td + td { padding-left:7mm; border-left:1px solid var(--rule); }
#estimate-doc .sheet .q { width:52%; }
#estimate-doc .sheet .q b { font-family:var(--display); font-weight:700; font-size:8.4pt; display:block; }
#estimate-doc .sheet .q span { font-size:7.5pt; color:var(--ink-soft); display:block; margin-top:.6mm; }
#estimate-doc .sheet .a { font-size:7.9pt; text-align:left; }
#estimate-doc .sheet .a b { font-family:var(--display); font-weight:600; }

#estimate-doc .three { display:grid; grid-template-columns:1fr 1fr 1fr; gap:0 10mm; }

/* steps rail */
#estimate-doc .rail { margin-top:2mm; }
#estimate-doc .rail .track { display:grid; grid-template-columns:repeat(4,1fr); position:relative; margin-bottom:3mm; }
/* Olla did not confirm the day-three and day-five turnaround, so the rail lost
   its clock and runs three stages instead of four. */
#estimate-doc .rail.is-three .track,
#estimate-doc .rail.is-three .steps { grid-template-columns:repeat(3,1fr); }
#estimate-doc .rail .track::before { content:""; position:absolute; left:0; right:0; top:1.75mm; height:1px; background:var(--rule); }
#estimate-doc .rail .dot { width:3.5mm; height:3.5mm; border-radius:50%; border:1.2px solid var(--rule-strong);
  background:#fff; position:relative; z-index:1;
  font-family:var(--mono); font-size:5.6pt; line-height:3.1mm; text-align:center; color:var(--ink-soft); }
#estimate-doc .rail .dot.on { background:var(--red); border-color:var(--red); color:#fff; }
#estimate-doc .rail .steps { display:grid; grid-template-columns:repeat(4,1fr); gap:5mm; }
#estimate-doc .rail .steps div { padding-right:5mm; }
#estimate-doc .rail .steps b { font-family:var(--display); font-weight:700; font-size:8pt; display:block; margin-bottom:1mm; }
#estimate-doc .rail .steps b em { font-style:normal; color:var(--red); }
#estimate-doc .rail .steps p { font-size:7.6pt; color:var(--ink-soft); line-height:1.4; }

/* contact */
#estimate-doc .contact { border-top:1.4px solid var(--ink); padding-top:3.8mm; margin-top:2mm;
  display:grid; grid-template-columns:1fr 1fr 34mm 34mm; gap:8mm; align-items:start; }
#estimate-doc .contact .lines p { font-size:8.2pt; margin-bottom:1mm; }
#estimate-doc .contact .lines .ph { color:#9a9a9c; }
#estimate-doc .qr { text-align:center; }
#estimate-doc .qr svg { width:31mm; height:31mm; display:block; margin:0 auto 1.5mm; }
#estimate-doc .qr .cap { font-family:var(--display); font-weight:600; font-size:6.2pt; letter-spacing:.1em;
  text-transform:uppercase; }
#estimate-doc .qr .cap span { display:block; font-weight:400; letter-spacing:0; text-transform:none;
  color:var(--ink-soft); font-size:6.4pt; margin-top:.6mm; }

#estimate-doc .smallprint { font-size:6.8pt; color:var(--ink-soft); line-height:1.4; margin-top:3mm; }
