/* teestrip.com: a black tee. Bold white type on black cotton with a faint knit, the title's key word in a red
   screen-print ink box; each article a white print laid on the shirt. Atkinson Hyperlegible throughout, served from
   this site. A light screen gets a white tee with black ink. */
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/atkinson-hyperlegible-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/atkinson-hyperlegible-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/atkinson-hyperlegible-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --pad: #111111;           /* the black tee */
  --knit: rgba(255, 255, 255, 0.035);  /* its faint knit */
  --margin: #e8402b;        /* the red ink, for lines */
  --sheet: #fafafa;         /* an article's print */
  --ink: #ffffff;           /* the type on the shirt */
  --text: #161616;          /* the type on a print */
  --muted: #b5b5b5;         /* quieter type on the shirt */
  --pencil: #e8402b;        /* red screen-print ink */
  --on-pencil: #ffffff;
  --line: #e4e4e4;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root { --pad: #f4f4f2; --knit: rgba(0, 0, 0, 0.035); --ink: #111111; --muted: #555555; color-scheme: light; }
}

* { box-sizing: border-box; }
html { background: var(--pad); }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 18px/1.65 var(--body);
  background-color: var(--pad);
  /* the cotton's knit: fine diagonal threads */
  background-image:
    repeating-linear-gradient(45deg, var(--knit) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(-45deg, var(--knit) 0 1px, transparent 1px 4px);
}
main { max-width: 800px; margin: 0 auto; padding: 22px 20px 40px; display: grid; gap: 26px; }

/* the title and tagline written on the pad */
.site { display: grid; gap: 6px; color: var(--ink); }
h1 { margin: 0; font: 700 34px/1.15 var(--body); letter-spacing: 0.005em; overflow-wrap: anywhere; }
[data-page="article"] h1 { font-size: clamp(26px, 4.4vw, 34px); }
.tagline { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 700; color: var(--muted); }
.byline { margin: 0; font-size: 16px; color: var(--muted); }
/* the title's key word in an angled box, in red pencil */
.hl {
  display: inline-block; color: var(--on-pencil); padding: 0 0.16em; margin-left: 0.06em;
  border-radius: 6px; background: var(--pencil); transform: rotate(-2deg);
  box-shadow: 0 3px 12px rgba(232, 64, 43, 0.35);
}
.ad a:focus-visible, .home:focus-visible { outline: 3px solid var(--pencil); outline-offset: 3px; }

/* an article: a sheet on the pad */
.article {
  background: var(--sheet); border-radius: 4px; padding: 28px 32px 32px; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
  display: grid; gap: 14px;
}
.article > * { margin: 0; max-width: 66ch; }
/* the opening paragraph, the answer: larger than the rest, then the banner */
.article .lead { font-size: 21px; line-height: 1.55; }
.article h2, .article h3, .article h4 { color: var(--text); line-height: 1.2; margin-top: 12px; }
.article h2 { font-size: 28px; }
.article h3 { font-size: 22px; }
.article ul, .article ol { padding-left: 1.4em; }
.article li + li { margin-top: 6px; }
.article a { color: var(--text); text-decoration-color: var(--pencil); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.article a:hover { color: var(--pencil); }
.article blockquote { border-left: 3px solid var(--margin); padding-left: 16px; color: #555555; }
.article figure img { display: block; max-width: 100%; height: auto; border-radius: 3px; }
.article .picture { max-width: none; }
.article code { font: 0.9em/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; background: var(--line); padding: 2px 5px; border-radius: 3px; }
.article pre { overflow-x: auto; background: var(--text); color: var(--sheet); padding: 16px; border-radius: 4px; }
.article pre code { background: none; padding: 0; line-height: 1.5; }
.article hr { border: 0; border-top: 1px solid var(--line); width: 100%; }
/* at an article's end, once its book is out: the link to it */
.article .product { font-weight: 700; border-top: 1px solid var(--line); padding-top: 14px; }

/* the banner, inside the article after its first paragraph */
.ad { display: grid; justify-items: center; gap: 6px; max-width: none; margin: 8px 0; }
/* no banner picked (none in this page's category yet): nothing shows, not even its label */
.ad[hidden] { display: none; }
.ad img { display: block; max-width: 100%; height: auto; border-radius: 3px; }
.ad small { color: #555555; font-size: 13px; line-height: 1.4; text-align: center; max-width: 62ch; }

/* the articles, under the page: on the home page, each series under its heading, numbered */
.more { background: var(--sheet); border-radius: 4px; padding: 24px 32px; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35); display: grid; gap: 28px; }
.more h2 { margin: 0 0 12px; font: 700 22px/1.25 var(--body); color: var(--text); }
.more ul, .more ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
/* a card: the thumbnail beside the title and description; in a series, its number first */
.more li { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.more li.bare { grid-template-columns: 1fr; }
.more ol li { grid-template-columns: 2.2em 220px 1fr; }
.more ol li.bare { grid-template-columns: 2.2em 1fr; }
.more .number { font: 700 22px/1.25 var(--body); color: var(--pencil); text-align: right; }
.more .thumb img { display: block; width: 100%; height: auto; border-radius: 3px; }
.more .title { font: 700 20px/1.3 var(--body); color: var(--text); text-decoration-color: var(--pencil); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.more .title:hover { color: var(--pencil); }
.more p { margin: 6px 0 0; color: #555555; font-size: 16px; line-height: 1.5; }

/* on an article's page: the way back to the home page */
.home { justify-self: start; color: var(--ink); font: 700 20px/1 var(--body); text-decoration: none; padding: 6px 0; }
.home:hover { color: var(--pencil); }
footer { color: var(--muted); font-size: 14px; }
footer p { margin: 0 0 4px; }
/* the links to About, Privacy and Contact, on every page */
footer .pages { margin: 0 0 6px; }
footer .pages a { color: inherit; text-underline-offset: 3px; }

@media (max-width: 520px) {
  main { padding-top: 14px; }
  .article, .more { padding-left: 20px; padding-right: 20px; }
  .article .lead { font-size: 19.5px; }
  .more li, .more ol li, .more ol li.bare { grid-template-columns: 1fr; gap: 10px; }
  .more ol li { grid-template-columns: 2em 1fr; }
  .more ol li .thumb { grid-column: 2; }
  .more ol li > div { grid-column: 2; }
}
