/* web.css — single-page reading version.
 *
 * Deliberately close to print.css in feel, but built for a phone, because
 * that is where someone will actually read the bathroom section: standing
 * up, one-handed, in a hurry. Wide line-height, large tap targets on links,
 * no fixed headers eating the viewport.
 */

:root {
  --ink: #14140f;
  --paper: #faf8f3;
  --rule: #14140f;
  --muted: #5c5a52;
  --accent: #7a2020;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8e4dc;
    --paper: #14140f;
    --rule: #e8e4dc;
    --muted: #9a968c;
    --accent: #d98a8a;
  }
}

* { box-sizing: border-box; }

html {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 18px;
  line-height: 1.62;
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body { margin: 0; }

.zine {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3rem 1.25rem 8rem;
}

h1, h2, h3, h4 {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 4.5rem 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--rule);
  scroll-margin-top: 1rem;
}

h3 { font-size: 1.12rem; margin: 2.4rem 0 0.6rem; }
h4 { font-size: 1rem; margin: 1.6rem 0 0.4rem; }

p { margin: 0 0 1rem; }

ul, ol { padding-left: 1.3rem; margin: 0 0 1.2rem; }
li { margin-bottom: 0.55rem; }

blockquote {
  margin: 1.4rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 3px solid var(--accent);
  font-size: 1.04rem;
}
blockquote p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  word-break: break-word;
  padding: 0.15em 0;   /* larger tap target */
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
}
th {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  border-bottom: 2px solid var(--rule);
  padding: 0.4rem 0.75rem 0.4rem 0;
}
td {
  vertical-align: top;
  padding: 0.7rem 0.75rem 0.7rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

hr {
  border: none;
  border-top: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  margin: 3rem 0;
}

/* Cover. build.py wraps it in section.cover — it has no heading of its own. */
.zine > .cover {
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
}
.zine > .cover p:last-child { margin-bottom: 0; color: var(--muted); }

.zine > .cover p:first-of-type strong {
  display: block;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

/* Downloads strip — above the cover, because a fair number of people arrive
 * here wanting the printable file, not the web read. */
.downloads {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.downloads-label { color: var(--muted); }
.downloads a { padding: 0.35em 0; }

/* Colophon — the same two files, described, plus where this came from. */
.colophon-web {
  margin-top: 5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--rule);
}
.colophon-web h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}
.downloads-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.6rem;
}
.downloads-list li { margin-bottom: 1.1rem; }
.downloads-list a {
  display: block;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
}
.downloads-list span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.colophon-web h3 { margin-top: 2.4rem; }
.colophon-web p {
  color: var(--muted);
  font-size: 0.95rem;
}
.help-list {
  color: var(--muted);
  font-size: 0.95rem;
  padding-left: 1.1rem;
  margin-bottom: 0;
}
.help-list li { margin-bottom: 0.8rem; }
.help-list strong { color: var(--ink); }

@media print {
  /* Browser "print this page" should be usable even without the PDF. */
  .zine { max-width: none; padding: 0; }
  a { color: inherit; }
  /* Links to the PDFs are useless on paper. */
  .downloads, .colophon-web { display: none; }
}
