/* product.css — the visitor-facing page.
 *
 * Same ink, paper and rules as the sheet itself, so the result does not look
 * like it arrived from somewhere else.
 */
:root {
  --paper: #efece4;
  --ink: #16150f;
  --rule: #16150f;
  --red: #c8442c;
  --green: #2f6d4f;
  --amber: #9a6b12;
  --dim: #726f66;
  --wire: #c9c5bb;
}
* { box-sizing: border-box; }

body {
  margin: 0;
  background: #d9d6ce;
  color: var(--ink);
  font-family: "Futura", "Century Gothic", "Avenir Next", ui-sans-serif, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: 30px 16px 60px;
}

.wrap { max-width: 940px; margin: 0 auto; background: var(--paper); padding: 34px 40px 26px;
  box-shadow: 0 2px 30px rgba(0, 0, 0, .16); }

.brand { display: flex; align-items: baseline; font-size: 27px; font-weight: 600;
  letter-spacing: .15em; line-height: 1; margin: 0 0 22px; padding-bottom: 13px;
  border-bottom: 1.5px solid var(--rule); }
.brand .sp { width: .62em; }
.brand em { margin-left: auto; font-style: normal; font-size: 8.5px; font-weight: 400;
  letter-spacing: .24em; text-transform: uppercase; color: var(--dim); }

.step { padding-bottom: 6px; }
.step.hidden { display: none; }

h1 { font-size: 34px; line-height: 1.15; margin: 6px 0 12px; font-weight: 500; letter-spacing: .01em; }
.stepnum { font-size: 9.5px; letter-spacing: .28em; text-transform: uppercase; margin: 4px 0 10px;
  border-top: 3px solid var(--rule); padding-top: 12px; }
.lede { font-size: 14px; line-height: 1.65; color: #3a382f; margin: 0 0 22px; max-width: 68ch; }
.lede.small { font-size: 12.5px; }

/* ------------------------------------------------------------------ dropzone */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; height: 190px; border: 2px dashed rgba(22, 21, 15, .45); background: #fff;
  cursor: pointer; margin-bottom: 26px; transition: background .12s, border-color .12s; }
.drop:hover, .drop.over { background: #fbfaf7; border-color: var(--ink); }
.drop b { font-size: 19px; font-weight: 600; }
.drop span { font-size: 12px; color: var(--dim); }

/* --------------------------------------------------------------------- rules */
.rules { border-top: 1px solid var(--rule); padding-top: 14px; }
.rules h2 { font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; margin: 0 0 10px; }
.rules ol { margin: 0; padding-left: 20px; }
.rules li { font-size: 12.5px; line-height: 1.62; color: #3a382f; margin-bottom: 9px; }
.rules b { font-weight: 600; }

/* The paper diagram.
 *
 * Written instructions about where to hold a sheet of paper are read and then
 * not followed, which is how references end up on a couch. A picture of the one
 * arrangement that works costs a few lines of SVG. */
.howto { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: center;
  margin: 10px 0 10px; padding: 12px 14px; border: 1px solid var(--wire); background: #fbfaf7; }
.howto svg { width: 220px; height: auto; display: block; }
.howto .lbl { font-size: 11px; fill: var(--dim); font-family: inherit; }
.howto .cap { font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  fill: var(--dim); font-family: inherit; }
.howto p { margin: 0; font-size: 12px; line-height: 1.6; color: #45433a; }

.fine { font-size: 11px; line-height: 1.6; color: var(--dim); margin: 18px 0 0;
  border-top: 1px dotted var(--wire); padding-top: 12px; }

/* ------------------------------------------------------------------ step two */
.checkgrid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; align-items: start; }
#canvas { width: 100%; height: auto; display: block; border: 1.5px solid var(--rule); background: #fff; }
.caption { font-size: 10.5px; line-height: 1.55; color: var(--dim); margin: 8px 0 0; }

.findings { list-style: none; margin: 0 0 16px; padding: 0; }
.findings li { font-size: 12px; line-height: 1.6; padding: 9px 0 9px 16px; position: relative;
  border-bottom: 1px dotted var(--wire); color: #3a382f; }
.findings li:last-child { border-bottom: none; }
.findings li::before { content: ""; position: absolute; left: 0; top: 14px; width: 7px; height: 7px; }
.findings li.good::before { background: var(--green); }
.findings li.warn::before { background: var(--amber); }
.findings li.bad::before { background: var(--red); }

/* ---------------------------------------------------------------- step three */
.hairq { border: 1.5px solid var(--rule); padding: 0; margin: 0 0 14px; display: grid; }
.hairq label { display: flex; align-items: baseline; gap: 10px; padding: 11px 14px; cursor: pointer; }
.hairq label + label { border-top: 1px solid rgba(22, 21, 15, .18); }
.hairq label:hover { background: rgba(22, 21, 15, .04); }
.hairq label:has(input:checked) { background: rgba(22, 21, 15, .07); }
.hairq input { margin: 0; flex: 0 0 auto; }
.hairq b { font-size: 13.5px; font-weight: 600; }
.hairq s { text-decoration: none; font-size: 11px; color: var(--dim); }

.help { border-top: 1px dotted var(--wire); padding-top: 10px; margin-bottom: 16px; }
.help summary { font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase;
  cursor: pointer; color: var(--dim); }
.help p { font-size: 11.5px; line-height: 1.65; color: #45433a; margin: 10px 0 0; max-width: 70ch; }

/* -------------------------------------------------------------------- buttons */
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { font: inherit; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  padding: 11px 20px; background: transparent; color: var(--ink);
  border: 1.5px solid var(--rule); cursor: pointer; }
.btn:hover { background: rgba(22, 21, 15, .07); }
.btn.pri { background: var(--ink); color: var(--paper); }
.btn.pri:hover { background: #000; }

/* --------------------------------------------------------------------- result */
.resultbar { display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  flex-wrap: wrap; border-top: 3px solid var(--rule); padding-top: 14px; margin-bottom: 14px; }
.resultbar b { font-size: 30px; letter-spacing: .07em; font-weight: 500; }
.resultbar span { font-size: 12px; color: var(--dim); margin-left: 12px; }

#sheet { width: 100%; height: 78vh; min-height: 560px; border: 1.5px solid var(--rule);
  background: #d9d6ce; }

/* --------------------------------------------------------------------- status */
.status { font-size: 12px; line-height: 1.6; margin: 16px 0 0; padding-left: 13px;
  border-left: 3px solid var(--wire); color: #3a382f; }
.status:empty { display: none; }
.status.bad { border-left-color: var(--red); }

.sitefoot { border-top: 1px solid var(--rule); margin-top: 26px; padding-top: 12px;
  display: flex; justify-content: center; gap: 16px;
  font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.sitefoot a { color: var(--dim); }

/* MOBILE TYPE.
 *
 * The desktop page uses small letterspaced capitals for its labels, which read
 * well at arm's length on a large screen and badly on a phone held close. Two
 * rules: nothing below about eleven pixels, and less tracking as type gets
 * smaller, since spacing that looks considered at 12px looks broken at 8px.
 * The instructions in particular are the thing people read on a phone before
 * taking the photo, so they get proper body size. */
@media (max-width: 760px) {
  body { padding: 10px 7px 40px; }
  .wrap { padding: 20px 16px 20px; }
  .brand { font-size: 20px; letter-spacing: .09em; flex-wrap: wrap; }
  .brand em { margin-left: 0; flex-basis: 100%; margin-top: 9px; font-size: 9.5px;
    letter-spacing: .16em; }
  h1 { font-size: 27px; line-height: 1.2; }
  .stepnum { font-size: 11px; letter-spacing: .16em; }
  .lede { font-size: 15px; line-height: 1.7; }
  .lede.small { font-size: 14px; }
  .rules h2 { font-size: 11px; letter-spacing: .14em; }
  .rules ol { padding-left: 18px; }
  .rules li { font-size: 14.5px; line-height: 1.65; margin-bottom: 12px; }
  .howto { grid-template-columns: 1fr; gap: 10px; justify-items: center; padding: 12px; }
  .howto p { font-size: 13.5px; }
  .fine { font-size: 12.5px; line-height: 1.65; }
  .drop { height: 160px; }
  .drop b { font-size: 19px; }
  .drop span { font-size: 13px; }
  .checkgrid { grid-template-columns: 1fr; gap: 16px; }
  .caption { font-size: 12.5px; line-height: 1.6; }
  .findings li { font-size: 14px; line-height: 1.65; padding: 11px 0 11px 17px; }
  .findings li::before { top: 17px; }
  .hairq b { font-size: 15px; }
  .hairq s { font-size: 12.5px; }
  .hairq label { padding: 13px 14px; gap: 11px; }
  .help summary { font-size: 11px; letter-spacing: .14em; }
  .help p { font-size: 13px; line-height: 1.7; }
  .btn { font-size: 12px; letter-spacing: .12em; padding: 13px 20px; }
  .actions { gap: 9px; }
  .resultbar b { font-size: 26px; }
  .resultbar span { margin-left: 0; font-size: 13px; flex-basis: 100%; }
  .status { font-size: 13.5px; line-height: 1.65; }
  .sitefoot { font-size: 10px; letter-spacing: .08em; text-align: center; }
  #sheet { height: 72vh; }
}

@media (max-width: 480px) {
  h1 { font-size: 24px; }
  .brand { font-size: 17px; }
}
