/* Yard Plotted, the printable guide.
   Quieter than the site. The screen version leans on warm paper and four or
   five colours at once, which prints as a lot of ink for very little gain, so
   the plot variables get redefined here for plain white stock. */

:root {
  --ink:   #14181F;
  --muted: #5A6472;
  --line:  #C9D2DE;

  --plot-grid:      #EDF1F6;
  --plot-lawn:      #FBFCFD;
  --plot-house:     #E4EAF2;
  --plot-porch:     #D3DCE8;
  --plot-walk:      #F0F3F7;
  --plot-line:      #7C8B9E;
  --plot-dim:       #5A6472;
  --plot-slot-fill: #FFF1DD;
  --plot-slot-line: #B4741F;
  --cut-stock:      #FFFFFF;
  --cut-line:       #14181F;
  --cut-grid:       #C9D2DE;
  --cut-piece-1:    #FFFFFF;
  --cut-piece-2:    #FFFFFF;
  --cut-piece-3:    #FFFFFF;
  --cut-piece-4:    #FFFFFF;

  --plot-street:    #E8ECF1;
  --plot-drive:     #EFF2F6;
  --plot-wall:      #8A6A4C;
  --plot-fence:     #7C8B9E;
}

@page {
  size: letter;
  margin: 16mm 15mm;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 10.5pt/1.55 'Karla', Georgia, serif;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.sheet { max-width: 190mm; margin-inline: auto; padding: 8mm 0; }

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 .4em;
}
h1 { font-size: 23pt; letter-spacing: -0.02em; }
h2 { font-size: 14pt; border-bottom: 2px solid var(--line); padding-bottom: .3em; margin-bottom: .8em; }
h3 { font-size: 11pt; margin-top: 1.4em; }

p { margin: 0 0 .75em; }

/* --- Document head -------------------------------------------------------- */

.doc-kicker {
  font-family: 'Caveat', cursive;
  font-size: 15pt; line-height: 1; color: #B24A27;
  margin-bottom: .4em;
}
.doc-lede { font-size: 11.5pt; color: #2C3542; }
.doc-disclosure {
  font-size: 8.5pt; color: var(--muted);
  border: 1px solid var(--line); border-left-width: 3px;
  padding: .6em .8em; margin-top: 1.2em;
}

/* --- Blocks --------------------------------------------------------------- */

.block { margin-top: 1.8em; }
.block--break { break-before: page; page-break-before: always; }

.plan { border: 1px solid var(--line); padding: 4mm; }
.plot { width: 100%; height: auto; display: block; }
.plot__label, .plot__slot-id { font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif; font-size: 10px; fill: var(--muted); }
.plot__slot-id { fill: var(--plot-slot-line); font-weight: 700; }
.plot__dim-text { font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif; font-size: 9px; fill: var(--plot-dim); }
.plot__cap { font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif; font-size: 8px; fill: var(--muted); }
.plot__street-label { font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif; font-size: 8px; font-weight: 700; letter-spacing: .18em; fill: var(--muted); }

.caption { font-size: 8.5pt; color: var(--muted); margin-top: .6em; }

/* --- Item tables ---------------------------------------------------------- */

/* Named for a screen reader, never drawn or printed. This sheet has its own
   stylesheet and does not load site.css, so it needs its own copy. */
.vh {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

table.items { width: 100%; border-collapse: collapse; margin-top: 1em; }
/* Scoped to thead: the spot letter in each row is a <th scope="row"> now, and
   unscoped this rule would set it in tiny uppercase muted type. */
table.items thead th {
  font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif;
  font-size: 7.5pt; letter-spacing: .11em; text-transform: uppercase; color: var(--muted);
  text-align: left; border-bottom: 1px solid var(--line); padding: .4em .5em .3em 0;
}
table.items td,
table.items tbody th {
  border-bottom: 1px solid var(--line);
  padding: .6em .5em .6em 0;
  vertical-align: top;
  font-size: 9.5pt;
}
table.items tbody th { text-align: left; font-weight: 700; }
table.items tr { break-inside: avoid; page-break-inside: avoid; }
.num { font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif; font-size: 9pt; white-space: nowrap; }

.tag {
  font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif;
  font-size: 7pt; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--line); padding: .1em .35em; margin-left: .3em; color: var(--muted);
  white-space: nowrap;
}
.link { font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif; font-size: 7.5pt; color: var(--muted); word-break: break-all; margin-top: .25em; }

/* The URL is an anchor so that a PDF made from this sheet carries a real,
   clickable link annotation. It still has to read as printed text rather than
   as a web link, because most copies of this end up on paper: no blue, no
   underline, same muted grey as the line it sits in. */
.link a, .caption a, .doc-foot a { color: inherit; text-decoration: none; }
.note { font-size: 9pt; color: #3B4553; margin-top: .4em; }
.power { font-size: 9pt; border-left: 3px solid var(--plot-slot-line); padding: .5em .8em; background: #FFF9F0; }

/* --- Build plans folded into a tier print --------------------------------- */

ol.steps { margin: .8em 0 0; padding-left: 1.4em; }
ol.steps li { margin-bottom: .7em; break-inside: avoid; page-break-inside: avoid; }
.oops {
  font-size: 8.5pt; margin-top: .3em;
  border-left: 2px solid var(--plot-slot-line); padding: .3em .6em; background: #FFF9F0;
}

/* --- Prompts -------------------------------------------------------------- */

.prompt {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 8pt; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word;
  border: 1px solid var(--line); padding: .7em .9em; margin: 0 0 1em;
  break-inside: avoid; page-break-inside: avoid;
}

/* --- Stencils ------------------------------------------------------------- */

/* The stencil SVG carries its own width in inches so it prints at the size it
   says it does. Nothing here may set a width on it. */
.stencil-wrap { margin: 1em 0; }
.stencil { display: block; }
.cut__dim { font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif; font-size: 9px; fill: var(--muted); }
.cut__label { font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif; font-size: 10px; font-weight: 700; fill: var(--ink); }

.stencil-doc .block--break:first-of-type { break-before: auto; page-break-before: auto; }

/* --- Foot ----------------------------------------------------------------- */

.doc-foot {
  margin-top: 2.5em; padding-top: 1em;
  border-top: 1px solid var(--line);
  font-size: 8pt; color: var(--muted);
}

/* --- The save/print bar --------------------------------------------------- */

/* Never on paper, and never in a PDF: bin/pdf.php renders this very page
   through headless Chrome, so anything not dropped here would be baked into
   every file sold. */
.sheet-actions { display: none; }

@media screen {
  body { background: #F4F6F9; padding: 10mm 4mm; }
  .sheet { background: #fff; padding: 14mm; box-shadow: 0 1px 4px rgba(0,0,0,.14); }

  .sheet-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem .75rem;
    max-width: 210mm;
    margin: 0 auto .8rem;
    padding: 0 2mm;
  }
  .sheet-actions__btn {
    font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif;
    font-size: .9rem; font-weight: 700;
    color: #FDF7EC; background: #D2603A;
    border: 2.5px solid #33261B; border-radius: 999px;
    padding: .5rem 1.1rem;
    box-shadow: 3px 3px 0 #33261B;
    text-decoration: none; cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  }
  .sheet-actions__btn:hover { background: #B24A27; transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #33261B; }
  .sheet-actions__btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #33261B; }
  .sheet-actions__btn:focus-visible { outline: 3px solid #33261B; outline-offset: 3px; }
  .sheet-actions__btn--ghost { background: #FFFCF6; color: #33261B; }
  .sheet-actions__btn--ghost:hover { background: #FBEBC8; }

  .sheet-actions__note {
    flex: 1 1 16rem;
    margin: 0;
    font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif;
    font-size: .8rem; line-height: 1.45; color: #5C4A3A;
  }

  /* A stencil is sized in real inches so it prints right, which can be wider
     than the on-screen sheet. Scroll it here rather than shrinking it, because
     shrinking is the one thing that must not happen to a stencil. */
  .stencil-wrap { overflow-x: auto; }
}

/* The hardware checklist. Tick boxes because this sheet gets carried around. */
.supplies-print { width: 100%; border-collapse: collapse; margin: .4rem 0 .9rem; }
.supplies-print td { padding: .22rem .4rem; border-bottom: 1px solid #ddd; vertical-align: baseline; }
.supplies-print tr:last-child td { border-bottom: 0; border-top: 1.5px solid #999; }
.supplies-print .tick { font-size: 1.15em; width: 1.4em; }
.supplies-print .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }