/* ==================================================================
   idinsayit: print

   Two jobs, one sheet.

   1. The standalone documents produced by inc/portal.php
      (admin-post.php?action=idz_print_response and the HTML export).
      Those pages carry .idz-print-view on <body> and load this file at
      media="all", so they look like a document on screen as well as on
      paper.

   2. The public site, where this file is loaded at media="print" only.
      A piece printed from single.php loses the chrome, the artwork and
      the furniture, and keeps the wordmark, the text and a dated footer.

   White ground, black text, serif body. No nav, no buttons, and no
   prompt block broken across a page.
   ================================================================== */

/* Neither document loads site.css, so the tokens the bar of buttons needs are
   declared here. The values are site.css's own, so that bar rests, hovers and
   presses exactly as a button does anywhere else on the site. The ink and the
   greys stay off the printed page: everything set for paper is black on white. */
:root {
  --ink: #0F0D0B;
  --ink-soft: #55504A;
  --ink-press: #3A3631;
  --paper: #FFFCF7;
  --rule: #E2DBCD;
}

@page {
  margin: 18mm 16mm;
}

/* ------------------------------------------------------------------
   1. The standalone document
   ------------------------------------------------------------------ */

.idz-print-view {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: "Libre Caslon Text", "Adobe Caslon Pro", Georgia, "Times New Roman", serif;
  font-size: 12pt;
  line-height: 1.55;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.idz-print {
  max-width: 44em;
  margin: 0 auto;
  padding: 28px 26px 40px;
}

.idz-print-actions {
  max-width: 44em;
  margin: 0 auto;
  padding: 16px 26px 0;
  font-family: "Jost", "Futura", -apple-system, Helvetica, Arial, sans-serif;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.idz-print-actions button {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 9px 20px;
  margin-right: 14px;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
/* The slab lightens to the soft grey under the pointer and darkens to the press
   grey while it is held, the two steps every filled button on the site takes. The
   label stays paper through both, so the slab is the only thing that moves. */
.idz-print-actions button:hover {
  background: var(--ink-soft);
  border-color: var(--ink-soft);
  color: var(--paper);
}
.idz-print-actions button:active {
  background: var(--ink-press);
  border-color: var(--ink-press);
  color: var(--paper);
}
.idz-print-actions a { color: var(--ink); }

/* head ---------------------------------------------------------- */
.idz-print-head {
  border-bottom: 2px solid #000;
  padding-bottom: 12px;
  margin-bottom: 22px;
}
.idz-print-mark {
  display: flex;
  justify-content: center;
}
.idz-print-mark svg {
  height: 30px;
  width: auto;
  color: #000;
  display: block;
}
.idz-print-kicker {
  margin: 12px 0 0;
  text-align: center;
  font-family: "Jost", "Futura", -apple-system, Helvetica, Arial, sans-serif;
  font-size: 8.5pt;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #000;
}

.idz-print-title {
  margin: 0 0 16px;
  font-family: "Bodoni Moda", "Didot", Georgia, serif;
  font-weight: 700;
  font-size: 21pt;
  line-height: 1.14;
  letter-spacing: -.01em;
  color: #000;
}

/* meta ---------------------------------------------------------- */
.idz-print-meta {
  margin: 0 0 26px;
  padding: 10px 0;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 4px 14px;
  font-family: "Jost", "Futura", -apple-system, Helvetica, Arial, sans-serif;
  font-size: 9pt;
  line-height: 1.5;
}
.idz-print-meta dt {
  margin: 0;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #000;
}
.idz-print-meta dd {
  margin: 0;
  color: #000;
}

/* prompt blocks: never split across a page ---------------------- */
.idz-print-block {
  margin: 0 0 22px;
  padding: 0 0 4px;
  break-inside: avoid;
  page-break-inside: avoid;
}
.idz-print-prompt {
  margin: 0 0 8px;
  font-family: "Jost", "Futura", -apple-system, Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 10.5pt;
  line-height: 1.4;
  letter-spacing: .01em;
  color: #000;
}
.idz-print-num { font-variant-numeric: tabular-nums; }
.idz-print-scale {
  margin: 0 0 8px;
  font-family: "Jost", "Futura", -apple-system, Helvetica, Arial, sans-serif;
  font-size: 9pt;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.idz-print-answer {
  border-left: 2px solid #000;
  padding-left: 14px;
}
.idz-print-answer p { margin: 0 0 .7em; }
.idz-print-answer p:last-child { margin-bottom: 0; }
.idz-print-blank,
.idz-print-empty {
  font-style: italic;
  color: #000;
}

.idz-print-feedback {
  margin-top: 30px;
  padding-top: 14px;
  border-top: 2px solid #000;
}
.idz-print-feedback h2 {
  margin: 0 0 10px;
  font-family: "Jost", "Futura", -apple-system, Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 9pt;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.idz-print-feedback p { margin: 0 0 .7em; }

/* footer line: the date is supplied by the markup, set by this sheet */
.idz-print-foot {
  margin: 30px 0 0;
  padding-top: 9px;
  border-top: 1px solid #000;
  font-family: "Jost", "Futura", -apple-system, Helvetica, Arial, sans-serif;
  font-size: 8pt;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #000;
}
.idz-print-foot::after {
  content: ", printed " attr(data-date);
}

/* The site carries the same footer line, but only on paper. */
body:not(.idz-print-view) .idz-print-foot { display: none; }

/* ------------------------------------------------------------------
   2. On paper
   ------------------------------------------------------------------ */

@media print {

  /* white ground, black text, serif body */
  html,
  body {
    margin: 0;
    padding: 0;
    background: #fff !important;
    color: #000 !important;
    font-family: "Libre Caslon Text", "Adobe Caslon Pro", Georgia, "Times New Roman", serif;
    font-size: 11.5pt;
    line-height: 1.5;
  }
  * {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* the chrome goes: nav, menu, burger, footer, sign-up, buttons, forms */
  .navbar,
  .nav,
  .nav-tag,
  .standing,
  .burger,
  .menu,
  .menu-panel,
  .menu-scrim,
  #idz-menu,
  .foot,
  .signup,
  .idz-actions,
  .idz-savestate,
  .idz-login,
  .paywall,
  .idz-print-actions,
  .no-print,
  button,
  input,
  select,
  textarea,
  form,
  iframe,
  video,
  #wpadminbar {
    display: none !important;
  }

  /* index furniture has no business on a printed piece; the older/newer nav is
     also a .mod, which the piece rules below show, so it is named with both */
  .mod.idz-adj,
  .mix,
  .idz-bs,
  .grid,
  .rail,
  .ngrid,
  .tail,
  .lead2,
  .hdr,
  .photoband,
  .slab,
  .fiction,
  .opener,
  .sechero {
    display: none !important;
  }

  /* the piece itself */
  .piece,
  article,
  main,
  .mod,
  .wrap,
  .measure,
  .body {
    display: block !important;
    max-width: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    float: none !important;
  }

  /* the wordmark stays, at the top */
  .mast,
  .idz-print-head {
    display: block !important;
    text-align: center;
    padding: 0 0 10px !important;
    margin: 0 0 14px !important;
    border-bottom: 2px solid #000 !important;
    break-after: avoid;
    page-break-after: avoid;
  }
  .mast svg,
  .idz-print-mark svg {
    height: 26pt !important;
    width: auto !important;
    color: #000 !important;
  }
  .mast-rule { display: none !important; }

  /* artwork is decorative and costs a cartridge */
  .art,
  .p-art,
  .p-cap,
  canvas,
  img[aria-hidden="true"] {
    display: none !important;
  }

  .rubric,
  .stamp,
  .byline {
    font-family: "Jost", "Futura", -apple-system, Helvetica, Arial, sans-serif;
    font-size: 8.5pt;
    letter-spacing: .16em;
    text-transform: uppercase;
  }
  .p-head { text-align: center; }
  .p-head h1,
  h1 {
    font-family: "Bodoni Moda", "Didot", Georgia, serif;
    font-size: 24pt;
    line-height: 1.1;
    max-width: none;
    margin: 8pt 0;
    break-after: avoid;
    page-break-after: avoid;
  }
  h2, h3, h4 {
    break-after: avoid;
    page-break-after: avoid;
  }
  .dek {
    font-style: italic;
    font-size: 12pt;
    margin: 0 auto 10pt;
    max-width: none;
  }
  .body {
    font-size: 11.5pt !important;
    line-height: 1.5 !important;
  }
  .body p + p { margin-top: .9em; }
  .body > p:first-of-type::first-letter { font-size: 1em; float: none; padding: 0; }
  .body > p:first-of-type::first-line { font-variant: normal; letter-spacing: 0; }
  p, blockquote, li { orphans: 3; widows: 3; }

  .pull,
  .marginal,
  .creds,
  .crisis,
  .idz-crisis,
  .idz-ro-row,
  .idz-print-block,
  figure,
  blockquote,
  table {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .marginal {
    float: none !important;
    width: auto !important;
    margin: 1.2em 0 !important;
    border-top: 1px solid #000;
    padding-top: 8px;
    font-family: "Jost", "Futura", -apple-system, Helvetica, Arial, sans-serif;
    font-size: 9pt;
  }
  .pull {
    border-top: 2px solid #000;
    border-bottom: 1px solid #000;
    font-size: 14pt;
  }
  .creds,
  .crisis,
  .idz-crisis {
    border: 0;
    border-left: 2px solid #000;
    padding: 8px 0 8px 12px;
    font-family: "Jost", "Futura", -apple-system, Helvetica, Arial, sans-serif;
    font-size: 9pt;
  }
  .brk svg,
  .endmark svg { height: 10pt; width: auto; }

  /* a printed link is worth nothing without its address */
  .body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-family: "Jost", "Futura", -apple-system, Helvetica, Arial, sans-serif;
    font-size: 8.5pt;
    word-break: break-all;
  }
  a { text-decoration: none; }

  /* the dated footer line, on the site as well as in the export */
  body:not(.idz-print-view) .idz-print-foot {
    display: block !important;
    margin-top: 18pt;
  }
  .idz-print-foot {
    border-top: 1px solid #000 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* nothing animates on paper */
  .js-reveal,
  .js-reveal.is-in {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ------------------------------------------------------------------
   4. What may not be printed.

   The programme is proprietary. A session, its slides and the shape
   of the programme itself are the practice's own work and are not
   documents to be taken away, so the browser's own print produces a
   single line saying so rather than the material.

   What a client has written is theirs, and prints from the worksheet
   through admin-post.php?action=idz_print_mine. That document carries
   .idz-print-view and is untouched by this block.
   ------------------------------------------------------------------ */
@media print {
  body:not(.idz-print-view) .idz-deck,
  body:not(.idz-print-view) .idz-workspace,
  body:not(.idz-print-view) .idz-worksheet {
    display: none !important;
  }

  body:not(.idz-print-view) .idz-deck::after,
  body:not(.idz-print-view) .idz-workspace::after,
  body:not(.idz-print-view) .idz-worksheet::after {
    content: "This is programme material and is not for printing. To keep a copy of your own written work, open a worksheet and use Print or save as PDF there.";
    display: block !important;
    font: 11pt/1.6 Georgia, serif;
    margin: 30mm 0;
  }

  body:not(.idz-print-view) .idz-deck,
  body:not(.idz-print-view) .idz-workspace,
  body:not(.idz-print-view) .idz-worksheet {
    display: block !important;
    visibility: visible;
  }

  body:not(.idz-print-view) .idz-deck > *,
  body:not(.idz-print-view) .idz-workspace > *,
  body:not(.idz-print-view) .idz-worksheet > * {
    display: none !important;
  }
}

/* ------------------------------------------------------------------
   The practice page's drop-down prints open. Shut, it printed as an
   empty frame with a heading in it, and the plus means nothing on
   paper. A browser without ::details-content prints it as it stands.
   ------------------------------------------------------------------ */

@media print {
  .idz-whobox::details-content {
    content-visibility: visible;
  }

  .idz-whobox > summary > h2::after {
    display: none;
  }
}

/* ------------------------------------------------------------------
   The note a client added beside a marked answer, in print.
   ------------------------------------------------------------------ */

.idz-print-note {
  margin: 6mm 0 0 8mm;
  padding: 3mm 4mm;
  border-left: 1px solid #999;
  font-size: 10pt;
}

.idz-print-note-lab {
  display: block;
  font-size: 7.5pt;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 1mm;
}

/* Print has no second colour to spend, so the two kinds of answer are told apart by
   their rule: the solid edge this file already gives an answer for words the client
   typed, and a dotted one for an option they marked from a list.

   The modifiers only. Restating the bare .idz-print-answer here reset the 2px edge and
   14px indent set at the top of this file, and the printed journal, which is nothing to
   do with worksheets, uses that same class and lost its rule with it. */

.idz-print-answer--choice {
  border-left-style: dotted;
}

/* The client's note and the clinician's are two voices, and on paper they were set
   identically: same indent, same hairline, told apart by a word. The clinician's comes
   back out to the answer's own left edge and carries a heavier rule, so which is which
   survives a photocopy. */

.idz-print-note--clinician {
  margin-left: 0;
  border-left-width: 3px;
  border-left-color: #000;
}

.idz-print-note--clinician .idz-print-note-lab {
  color: #000;
}

/* An answer that moved after the review: when, and what it was. */
.idz-print-chg { margin: 6pt 0 0 12pt; padding: 6pt 9pt; border-left: 2pt solid #7B2D26; }
.idz-print-chg-lab { display: block; font-size: 8pt; letter-spacing: .12em; text-transform: uppercase; color: #7B2D26; margin: 4pt 0 2pt; }
.idz-print-chg-lab:first-child { margin-top: 0; }
.idz-print-chg-was { font-size: 9.5pt; line-height: 1.45; color: #55504A; }
.idz-print-chg-was-lab { display: inline-block; font-size: 8pt; letter-spacing: .12em; text-transform: uppercase; color: #6E6860; margin-right: 4pt; }
.idz-print-chg-was p { display: inline; margin: 0; }
.idz-print-chg-was p + p { display: block; margin-top: 3pt; }
.idz-print-chg-blank { font-style: italic; color: #6E6860; }
