/* Tradie Run Sheet Builder: a foreman's day sheet. Copy paper on a grey desk, near-black ink, each person a docket with a
   run line; danger red only for a red flag, hi-vis lime only for a ticket note. Bitter over Manrope, M PLUS 1 Code for
   every figure and code. Square corners except the stop circles. Prints black on white on one A4 page. */
:root {
  --desk: #e9e8e3; --paper: #ffffff; --ink: #1c1e17; --grey: #5c5e56; --hair: #d6d5cf; --hair2: #ebeae5;
  --red: #c8231a; --lime: #d8ef3a; --limeword: #4f5c00;
  --disp: 'Bitter', Georgia, serif; --body: 'Manrope', system-ui, sans-serif; --mono: 'M PLUS 1 Code', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--desk); color: var(--ink); font: 400 16px/1.55 var(--body); text-rendering: geometricPrecision; }
a { color: var(--ink); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
.m, code { font-family: var(--mono); font-feature-settings: 'tnum'; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--disp); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: clamp(30px, 4.2vw, 46px); }
h2 { font-size: 26px; }
h3 { font-size: 19px; }
p { margin: 0 0 12px; }
.k { font: 600 12px/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--grey); }
.hint { color: var(--grey); font-size: 14px; }
.lede { font-size: 18px; max-width: 60ch; }

/* site header and footer */
header.site { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.brand { font: 700 19px/1 var(--disp); text-decoration: none; }
header.site nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
header.site nav a { text-decoration: none; }
header.site nav a:hover { text-decoration: underline; }
#nav-auth { display: inline-flex; gap: 18px; }
footer.site { margin-top: 56px; padding: 24px 20px 40px; border-top: 2px solid var(--ink); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer.site .long { flex-basis: 100%; color: var(--grey); max-width: 110ch; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px; align-items: start; padding: 34px 0 12px; }
.hero figure { margin: 0; }
.hero img { width: 100%; height: auto; display: block; aspect-ratio: 3 / 2; object-fit: cover; }
.hero figcaption { font-size: 15px; margin-top: 10px; max-width: 52ch; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0 8px; }
.promise { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; font-size: 15px; }
.promise li { padding-left: 18px; position: relative; }
.promise li::before { content: ''; position: absolute; left: 0; top: .62em; width: 9px; height: 2px; background: var(--ink); }

/* buttons and inputs */
.btn { display: inline-block; font: 700 15px/1 var(--body); padding: 12px 18px; background: var(--ink); color: #fff; border: 2px solid var(--ink); text-decoration: none; cursor: pointer; }
.btn:hover { background: #000; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper); }
input, select, textarea { font: 400 15px/1.4 var(--body); color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 0; padding: 9px 10px; width: 100%; }
textarea { font: 400 13px/1.5 var(--mono); min-height: 190px; resize: vertical; }
label.f { display: block; font-size: 14px; font-weight: 600; }
label.f span { display: block; margin-bottom: 4px; }

/* the tool */
.tool { background: var(--paper); border: 1.5px solid var(--ink); padding: 22px; margin: 18px 0 0; }
.tool h2 { font-size: 22px; }
.pre { display: grid; grid-template-columns: 160px 110px minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin: 10px 0 14px; align-items: end; }
.pre .tick { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; }
.pre .tick input { width: auto; }
.pastes { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
#status { font-weight: 600; min-height: 1em; margin: 10px 0 0; }

/* result */
#result { margin-top: 20px; }
.summary { background: var(--paper); border: 1.5px solid var(--ink); padding: 16px 18px; margin-bottom: 16px; }
.summary .board { font: 600 18px/1.4 var(--body); margin: 0 0 6px; }
.summary .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.spec { font: 700 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; border: 1.5px solid var(--ink); padding: 3px 5px; vertical-align: 2px; }

/* the sheet */
.sheet { background: var(--paper); padding: 26px 28px; font-size: 13.5px; line-height: 1.45; box-shadow: 0 1px 0 var(--hair), 0 0 0 1px var(--hair); }
.sh-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 10px; }
.sh-head h2 { font-size: 22px; margin: 2px 0 2px; }
.sh-head .kick { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.sh-lists { margin: 0; color: var(--grey); }
.sh-meta { display: grid; grid-template-columns: repeat(3, auto); gap: 4px 18px; margin: 0; }
.sh-meta div { display: flex; gap: 6px; align-items: baseline; }
.sh-meta dt { font: 600 11px/1 var(--mono); text-transform: uppercase; color: var(--grey); }
.sh-meta dd { margin: 0; font-weight: 600; }
.vicl { border: 1.5px solid var(--ink); padding: 6px 10px; font-weight: 600; }
.runs, .jobs { margin: 0 0 8px; }
.runs h3, .jobs h3, .signon h3 { font: 700 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 6px; }
.runrow { border-top: 2px solid var(--ink); padding: 6px 0 6px; }
.runs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 26px; }
.runs h3 { grid-column: 1 / -1; }
.runrow { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 0 10px; }
.rn { display: flex; flex-direction: column; }
.rn .role, .rn .sum { font-size: 12px; }
.rn b { font: 700 15px/1.2 var(--disp); }
.rn .role { color: var(--grey); font-size: 12.5px; }

/* the run line: one person's day as a line, stops as numbered circles, straight-line km on the line between them */
.rline { list-style: none; margin: 0 0 2px; padding: 2px 0 0; display: flex; flex-wrap: wrap; gap: 5px 0; position: relative; }
.rline > li { position: relative; display: flex; align-items: center; gap: 5px; padding-right: 26px; font-size: 13px; }
.rline > li::before { content: ''; position: absolute; left: 10px; right: 0; top: 50%; height: 2px; background: var(--ink); z-index: 0; }
.rline > li:last-child { padding-right: 0; }
.rline > li:last-child::before { display: none; }
.rline .no { position: relative; z-index: 1; flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); font: 700 11px/16px var(--mono); text-align: center; }
.rline .dp .no { border-radius: 0; width: 14px; height: 14px; }
.rline .st { position: relative; z-index: 1; background: var(--paper); padding: 0 4px 0 2px; }
.rline .leg { position: relative; z-index: 1; background: var(--paper); font-size: 10px; line-height: 1; white-space: nowrap; padding: 0 3px; margin-left: -2px; }
.rline .leg:empty { display: none; }
.rline .leg .m { font-size: 10px; }
.jr { font-weight: 700; }
.sg { font-size: .85em; font-style: italic; color: var(--grey); }
.fn { font-size: .72em; line-height: 0; margin-left: 1px; color: var(--grey); }
.fns { list-style: none; margin: 0 0 3px; padding: 0; columns: 2; column-gap: 20px; }
.fns li { break-inside: avoid; }
.fns .fn { font-size: 1em; line-height: inherit; margin-right: 3px; color: var(--ink); }
.clh { font-weight: 700; margin: 0 0 4px; }
.key { font-weight: 400; color: var(--grey); font-size: 14px; margin-left: 6px; }
.cl-link { color: var(--ink); }
.eyebrow { font-size: 15px; color: var(--grey); margin: 0 0 8px; }
code { overflow-wrap: anywhere; }
.prose .btn + .btn { margin-left: 8px; }
.jobcols { column-count: 2; column-gap: 26px; }
.job { break-inside: avoid; display: inline-block; width: 100%; border-top: 1px solid var(--ink); padding: 5px 0 7px; }
.jh { margin: 0 0 2px; }
.jn { font-weight: 700; border: 1.5px solid var(--ink); padding: 0 3px; margin-right: 2px; }
.job p { margin: 0 0 2px; }
.crw, .ld, .cl { font-size: 12.5px; }
.ldk { margin-left: 6px; }
.jh .task { font-weight: 400; }
.sb .k, .load .k, .job .k { font-size: 10px; margin-right: 4px; }
.notags { font-size: 12px; font-style: italic; color: var(--grey); }
.madewith { margin: 8px 0 0; font: 400 10.5px/1.3 var(--mono); color: var(--grey); }
.madewith a { color: var(--grey); }
.confirm { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; margin-right: 6px; }
.confirm input { width: auto; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.bys { margin: 3px 0 2px; padding: 0 0 0 14px; font-size: 12.5px; }
.bys li { margin: 0 0 1px; }
.opt { font-weight: 700; }
.cite { font-size: 10.5px; color: var(--grey); white-space: normal; }
.sup, .chk { font-size: 12.5px; font-weight: 600; }
.blank { display: inline-block; width: 120px; border-bottom: 1px solid var(--ink); height: 12px; vertical-align: -2px; }
.blank.sm { width: 46px; }
.flag, .note { font-size: 12.5px; margin: 3px 0 !important; }
.flag .tag { background: var(--red); color: #fff; font: 700 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; padding: 2px 4px; margin-right: 3px; }
.note .tag { font: 700 10px/1 var(--mono); text-transform: uppercase; color: var(--limeword); margin-right: 3px; }
.note .hl { background: linear-gradient(transparent 45%, var(--lime) 45%); }
.unk { font-size: 12px; color: var(--grey); font-style: italic; }
.load { border: 1px solid var(--ink); padding: 4px 7px; font-size: 12.5px; margin: 4px 0 2px; }
.unassigned { border-top: 2px solid var(--ink); padding-top: 6px; margin-bottom: 10px; }
.signon { border-top: 2px solid var(--ink); padding-top: 6px; margin-top: 4px; break-inside: avoid; }
.so-l { margin: 0 0 4px; font-weight: 600; }
.signon table { width: 100%; border-collapse: collapse; border: 1.5px solid var(--ink); }
.signon th, .signon td { border: 1px solid var(--ink); padding: 3px 6px; text-align: left; font-size: 12px; }
.signon th { font: 600 10px/1.2 var(--mono); text-transform: uppercase; }
.signon td.sig { width: 26%; height: 24px; }
.signon td.tm { width: 8%; }
.signon td.sig.nb { border: 0; }
.so-c { margin: 4px 0 0; }
.codes { margin-top: 8px; font-size: 10.5px; color: var(--grey); }
.codes ul { margin: 2px 0 2px; padding: 0; list-style: none; }
.codes li { display: inline; }
.codes li + li::before { content: ' / '; }
.codes a { color: var(--grey); }
.codes p { margin: 3px 0 0; }

/* ticks per job */
.ticks { background: var(--paper); border: 1.5px solid var(--ink); padding: 16px 18px; margin-top: 16px; }
.tw { overflow-x: auto; }
.ticks table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ticks th { font: 600 11px/1.2 var(--mono); text-transform: uppercase; text-align: left; border-bottom: 2px solid var(--ink); padding: 6px 8px; }
.ticks td { border-bottom: 1px solid var(--hair); padding: 8px; vertical-align: top; }
.ticks td.n { width: 34px; }
.ticks .sub { font-size: 13px; color: var(--grey); }
.fc { display: inline-block; background: var(--red); color: #fff; font: 700 11px/1 var(--mono); padding: 2px 4px; margin-left: 4px; }
.fc .m { font-size: 11px; }
details.tks summary { cursor: pointer; font-size: 13.5px; }
details.tks .tg { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; }
details.tks .tg .k { flex-basis: 100%; }
label.tk { font-size: 13.5px; display: inline-flex; gap: 5px; align-items: center; }
label.tk input { width: auto; margin: 0; }

/* sections */
.band2 { padding: 34px 0 6px; }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cols3 > div { border-top: 2px solid var(--ink); padding-top: 10px; }
.cols3 .num { font: 700 13px/1 var(--mono); }
.prose { max-width: 76ch; }
.prose h2 { margin-top: 28px; }
.linelist { list-style: none; padding: 0; margin: 0; }
.linelist li { border-top: 1px solid var(--hair); padding: 10px 0; }
.q { color: var(--ink); padding: 0 0 0 16px; margin: 4px 0 6px; font-size: 15px; }
table.plain { border-collapse: collapse; width: 100%; font-size: 14px; background: var(--paper); }
table.plain th, table.plain td { border: 1px solid var(--hair); padding: 6px 8px; text-align: left; vertical-align: top; }
table.plain th { font: 600 11px/1.2 var(--mono); text-transform: uppercase; border-bottom: 2px solid var(--ink); }
.crumbs { font-size: 13px; color: var(--grey); padding: 18px 0 0; }
.notice { background: var(--paper); border: 1.5px solid var(--ink); padding: 10px 12px; font-weight: 600; }
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 16px; }
.pricing > div { background: var(--paper); border: 1.5px solid var(--ink); padding: 20px; display: flex; flex-direction: column; }
.pricing .price { font: 700 40px/1 var(--mono); margin: 6px 0 2px; }
.pricing .price small { font-size: 15px; margin-right: 4px; }
.pricing ul { padding-left: 18px; flex: 1; }
.pricing .btn { align-self: flex-start; }
.faq dt { font-weight: 700; margin-top: 14px; }
.faq dd { margin: 4px 0 0; }

/* sign-in modal */
.modal { display: none; position: fixed; inset: 0; background: rgba(28, 30, 23, .45); z-index: 30; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; }
.modal .box { background: var(--paper); border: 2px solid var(--ink); padding: 22px; max-width: 440px; width: 100%; }
.modal .row { margin-top: 10px; }

/* phone */
@media screen and (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 22px; }
  .pre { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pastes { grid-template-columns: minmax(0, 1fr); }
  .jobcols { column-count: 1; }
  .runs { grid-template-columns: minmax(0, 1fr); }
  .runrow { grid-template-columns: minmax(0, 1fr); }
  .rn { flex-direction: row; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
  .rline > li { padding-right: 22px; }
  .cols3, .pricing { grid-template-columns: minmax(0, 1fr); }
  .sh-head { grid-template-columns: minmax(0, 1fr); }
  .sh-meta { grid-template-columns: repeat(2, auto); }
  .sheet { padding: 16px 14px; }
  .tool { padding: 16px; }
  header.site nav { gap: 12px; font-size: 14px; }
}
@media screen and (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .pre { grid-template-columns: minmax(0, 1fr); }
  .sh-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  header.site nav a[href="/before-you-start/"], header.site nav a[href="/rules/"] { display: none; }
  .prose .btn { margin: 0 0 8px; }
  .blank { width: 90px; }
}

/* print: the sheet only, black on white, one A4 page for a day like the specimen; the product line on every page */
@page { size: A4; margin: 7mm 6mm 8mm; }
@media print {
  html, body { background: #fff !important; }
  body :not(:has(#sheet)):not(#sheet):not(#sheet *) { display: none !important; }
  body :has(#sheet) { margin: 0 !important; padding: 0 !important; border: 0 !important; max-width: none !important; width: auto !important; background: #fff !important; box-shadow: none !important; }
  .sheet { box-shadow: none; padding: 1.5mm 0 0; font-size: 6.4pt; line-height: 1.2; color: #000; }
  .sheet * { color: #000 !important; }
  .sh-head { padding-bottom: 1mm; margin-bottom: 1.2mm; gap: 4mm; }
  .sh-head h2 { font-size: 10.5pt; margin: 0; display: inline; white-space: nowrap; }
  .sh-head .kick { margin-right: 2mm; }
  .sh-lists { display: inline; margin-left: 2mm; }
  .sh-meta { grid-template-columns: repeat(6, auto); align-self: end; }
  .sh-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .sh-head .kick, .sh-meta dt { font-size: 6pt; }
  .sh-meta { gap: .5mm 4mm; }
  .sh-meta dd { font-size: 7pt; }
  .sh-lists { font-size: 6.6pt; }
  .runs h3, .jobs h3, .signon h3 { font-size: 6.4pt; margin-bottom: .8mm; }
  .runs, .jobs { margin-bottom: .6mm; }
  .bys li { margin: 0; }
  .sh-meta div { gap: 1mm; }
  .runs { grid-template-columns: minmax(0, 1fr); }
  .runrow { padding: .5mm 0 .5mm; border-top-width: 1.2px; grid-template-columns: 36mm minmax(0, 1fr); gap: 0 1.2mm; }
  .rn b { font-size: 8.2pt; }
  .rn { display: block; }
  .rn .role, .rn .sum { font-size: 6pt; line-height: 1.15; }
  .rn .role::before { content: ' '; }
  .rn .sum { display: block; }
  .rn { line-height: 1.12; }
  .rline { margin: 0; padding-top: .3mm; gap: .9mm 0; }
  .rline > li { font-size: 6.4pt; padding-right: 3mm; gap: .7mm; }
  .rline > li::before { height: 1.2px; left: 2mm; }
  .rline .no { width: 3.6mm; height: 3.6mm; font-size: 5.6pt; line-height: 2.9mm; border-width: 1.1px; }
  .rline .dp .no { width: 2.6mm; height: 2.6mm; }
  .rline .leg, .rline .leg .m { font-size: 5.2pt; }
  .rline .leg { padding: 0 .6mm; }
  .jobcols { column-gap: 4mm; }
  .job { padding: .5mm 0 .6mm; border-top-width: .8px; }
  .crw, .ld, .cl, .bys, .sup, .chk, .flag, .note, .load, .task, .notags, .unk { font-size: 6.2pt; }
  .sheet .k { font-size: 5.2pt; font-weight: 400; letter-spacing: .02em; }
  .fn { font-size: 5pt; }
  .fns { columns: 2; column-gap: 4mm; margin-bottom: .6mm; }
  .fns li { font-size: 5pt; line-height: 1.15; }
  .jh { font-size: 6.8pt; }
  .bys { margin: .3mm 0; padding-left: 3mm; }
  .cite { font-size: 4.9pt; }
  .sg { font-size: 5pt; padding: 0 1px; }
  .jn { padding: 0 .6mm; border-width: 1px; }
  .flag, .note { margin: .4mm 0 !important; }
  .flag .tag { background: #000 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 5.4pt; }
  .note .tag { border: 1px dashed #000; padding: 0 2px; font-size: 5.4pt; }
  .note .hl { background: none; }
  .load { padding: 0; border: 0; margin-top: .3mm; }
  .blank { width: 22mm; height: 2.6mm; }
  .blank.sm { width: 9mm; }
  .signon { padding-top: .8mm; margin-top: .6mm; border-top-width: 1.2px; }
  .so-l { font-size: 6.6pt; margin-bottom: .6mm; }
  .signon td.sig { height: 3.7mm; }
  .signon th, .signon td { font-size: 6.2pt; padding: .3mm 1.2mm; }
  .so-c { margin-top: .5mm; }
  .codes { margin-top: 1mm; }
  .codes, .codes a { font-size: 4.7pt; line-height: 1.15; color: #333 !important; text-decoration: none; }
  .codes ul { margin: 0; }
  .madewith { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding-top: .6mm; font-size: 6pt; background: #fff; }
  .sheet { padding-bottom: 4.5mm !important; }
  .madewith a { color: #000 !important; }
  a { text-decoration: none; }
}
