/* ---- Newsprint primitives (verbatim from "The Daily Compiler" design) ---- */
* { font-variant-ligatures: common-ligatures; }
.font-mast { font-family: 'Playfair Display', 'Old Standard TT', Times New Roman, serif; }
.font-body { font-family: 'EB Garamond', Times New Roman, serif; }
.font-mono { font-family: 'Courier Prime', Courier New, monospace; }
.paper {
  background-color: #FFFEF8;
  background-image:
    radial-gradient(rgba(0,0,0,0.06) 0.8px, transparent 0.8px),
    radial-gradient(rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
}
.paper-aged { background-color: #F5F1E8; }
.justify-hyphen { text-align: justify; hyphens: auto; }
.small-caps { font-variant: all-small-caps; letter-spacing: 0.08em; }
.double-rule { border-top: 3px double #111; border-bottom: 3px double #111; }
.double-rule-top { border-top: 4px double #111; }
.double-rule-bottom { border-bottom: 4px double #111; }
.single-rule { border-bottom: 1px solid #111; }
.ink-bleed { text-shadow: 0 0 0.4px rgba(0,0,0,0.6); }

/* ---- Article body (Markdown output styled as the "Inside Page") ---- */
.article p { margin-bottom: 0.75rem; }
.article > p:first-of-type::first-letter {
  float: left;
  font-family: 'Playfair Display', 'Old Standard TT', Times New Roman, serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 0.8;
  padding-right: 0.5rem;
  padding-top: 0.25rem;
}
.article a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.article a:hover { color: #FF6C37; }
.article em { font-style: italic; }
.article strong { font-weight: 700; }

/* Section heads break the two-column flow so long articles read top-to-bottom. */
.article h2, .article h3 {
  column-span: all;
  font-family: 'Playfair Display', 'Old Standard TT', Times New Roman, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  border-top: 1px solid #111;
  padding-top: 0.6rem;
  margin: 1.25rem 0 0.75rem;
}
.article h2 { font-size: 24px; }
.article h3 { font-size: 18px; border-top-style: dashed; }

.article ul, .article ol { margin: 0 0 0.75rem 1.25rem; }
.article ul { list-style: square; }
.article ol { list-style: decimal; }
.article li { margin-bottom: 0.25rem; }

.article blockquote {
  break-inside: avoid;
  border-left: 4px solid #111;
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
  font-size: 18px;
  line-height: 1.2;
}

.article hr { border: 0; border-top: 3px double #111; margin: 1.25rem 0; column-span: all; }

.article img { max-width: 100%; border: 1px solid #111; filter: grayscale(1) contrast(1.1); margin: 0.5rem 0; }

/* Inline code — the design's `if(!Array.from)throw 0` chip */
.article :not(pre) > code {
  font-family: 'Courier Prime', Courier New, monospace;
  font-size: 12px;
  background: #F5F1E8;
  padding: 0 0.25rem;
  border: 1px solid rgba(0,0,0,0.2);
  hyphens: none;
  overflow-wrap: anywhere;
}

/* Code listings — the design's "Listing 1 — From the Lab" box */
.article div.highlighter-rouge { position: relative; margin: 0.5rem 0 1rem; padding-top: 0.75rem; break-inside: avoid; }
.listing-frame { border: 1px dashed #111; background: #F5F1E8; }
.listing-head {
  font-family: 'Courier Prime', Courier New, monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: #000;
  color: #fff;
  padding: 0.25rem 0.5rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.listing-stamp {
  position: absolute; top: 0.25rem; right: -0.5rem; z-index: 10;
  border: 2.5px solid #FF6C37; color: #FF6C37; background: #FFFEF8;
  font-family: 'Courier Prime', Courier New, monospace; font-weight: 700; font-size: 11px;
  padding: 0.25rem 0.75rem; letter-spacing: 0.2em; transform: rotate(-5deg);
  box-shadow: 1px 1px 0 #FF6C37;
}
.article .highlight { overflow-x: auto; margin: 0; background: transparent; }
.article .highlight pre { margin: 0; }
.article .highlight table, .article .highlight tbody, .article .highlight tr { border: 0; border-collapse: collapse; }
.article .highlight td { padding: 0; vertical-align: top; }
.article .highlight .rouge-gutter {
  font-family: 'Courier Prime', Courier New, monospace;
  font-size: 11px; line-height: 1.4;
  color: rgba(0,0,0,0.4); text-align: right;
  padding: 0.5rem; user-select: none;
  border-right: 1px solid rgba(0,0,0,0.2);
  background: rgba(0,0,0,0.02);
}
.article .highlight .rouge-gutter pre { font-size: 11px; line-height: 16.8px; padding: 0; }
.article .highlight .rouge-code pre, .article pre {
  font-family: 'Courier Prime', Courier New, monospace;
  font-size: 12px; line-height: 16.8px;
  padding: 0.5rem; text-align: left; hyphens: none; white-space: pre;
}
/* Monochrome newsprint: comments are the only ink variation. */
.article .highlight .c, .article .highlight .c1, .article .highlight .cm, .article .highlight .cs { color: rgba(0,0,0,0.5); font-style: italic; }
.article .highlight .k, .article .highlight .kd, .article .highlight .kr, .article .highlight .kt, .article .highlight .kc { font-weight: 700; }

/* Recipe card (cookbook posts) */
.recipe-card code { font-family: 'Courier Prime', Courier New, monospace; background: #FFFEF8; padding: 0 0.2rem; border: 1px solid rgba(0,0,0,0.2); overflow-wrap: anywhere; }

/* Recipe kitchen screenshots (FIG. blocks) */
.article .kitchen-fig {
  column-span: all; break-inside: avoid;
  margin: 1rem 0 1.25rem; padding: 0.9rem 0 0.6rem;
  border-top: 1px solid #111; border-bottom: 1px solid #111;
}
.kitchen-fig-shots { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; }
.kitchen-shot { width: 220px; max-width: 100%; }
.kitchen-shot.is-ipad { width: 640px; }
.article .kitchen-shot img {
  display: block; width: 100%; margin: 0;
  filter: none; /* screenshots stay in colour: the glass effects are the point */
  border: 4px solid #111; border-radius: 28px; background: #fff;
}
.article .kitchen-shot.is-ipad img { border-radius: 16px; }
.kitchen-shot-label, .kitchen-fig figcaption {
  font-family: 'Courier Prime', Courier New, monospace; text-align: center;
}
.kitchen-shot-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.15em; margin-top: 0.4rem; }
.kitchen-fig figcaption { font-size: 10.5px; margin-top: 0.6rem; }
