/* Styling for the published guides. Phone first: most testers read these on
   the same device they're scanning with. */

:root {
  color-scheme: light dark;
  --bg:      #ffffff;
  --surface: #f5f6f8;
  --text:    #1b1d21;
  --muted:   #5b6069;
  --border:  #dfe2e7;
  --accent:  #2f5bd7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #14161a;
    --surface: #1d2026;
    --text:    #e8eaee;
    --muted:   #a2a8b4;
    --border:  #2c313a;
    --accent:  #7ba0ff;
  }
}

* { box-sizing: border-box; }

/* Pandoc's standalone template prints the title above the body. The guides
   already open with their own H1, so this would show it twice; the metadata
   is still wanted for the browser tab. */
#title-block-header { display: none; }

body {
  margin: 0 auto;
  padding: 24px 16px 96px;
  max-width: 44rem;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-wrap: break-word;
}

/* Sections are separated by the markdown's own --- rule, so headings carry no
   border: anything between the rule and the heading (an anchor tag, say) would
   otherwise leave two lines. */
h1 { font-size: 1.85rem; line-height: 1.2; letter-spacing: -0.02em; margin: 1.4em 0 0.5em; }
h2 { font-size: 1.4rem;  line-height: 1.25; margin: 1.5em 0 0.5em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 0.4em; }
h1:first-child { margin-top: 0.2em; }

a { color: var(--accent); }
strong { font-weight: 650; }

/* The guides size screenshots with a width attribute for the PDF; on a phone
   that must never exceed the column. */
img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: block;
  margin: 1.2em 0;
}

blockquote {
  margin: 1.4em 0;
  padding: 0.8em 1em;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
}
blockquote > :first-child { margin-top: 0; }
blockquote > :last-child  { margin-bottom: 0; }

code {
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 5px;
  font-size: 0.9em;
}
pre { background: var(--surface); padding: 1em; border-radius: 10px; overflow-x: auto; }
pre code { background: none; padding: 0; }

/* Tables carry the discrepancy and troubleshooting reference. */
.table-wrap { overflow-x: auto; margin: 1.4em 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--surface); font-weight: 650; }

/* On a phone there is no room for columns of prose — three of them leaves a
   word per line. Each row becomes a card instead, with the column heading
   printed above its cell (scripts/label-table-cells.php puts it there). */
@media (max-width: 34rem) {
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: auto; }
  .table-wrap thead { display: none; }
  .table-wrap tr {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px 12px 10px;
    margin: 0 0 12px;
    background: var(--surface);
  }
  .table-wrap td { border: 0; padding: 8px 0 0; }
  .table-wrap td:empty { display: none; }
  .table-wrap td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 2px;
  }
}

hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }

ul, ol { padding-left: 1.3em; }
li { margin: 0.35em 0; }

.home { display: inline-block; margin-bottom: 1.5em; font-size: 0.95rem; }
.updated { color: var(--muted); font-size: 0.9rem; margin-top: 3em; }
