/* ============================================================
   Tavla: what the WordPress theme adds to styles.css and brand.css.
   1) covers from a featured icon   2) the blog grid past three posts
   3) everything a post written in the editor can contain
   4) the privacy page (was a <style> block inside the page)
   ============================================================ */

/* ---------- 1. Covers ----------
   The featured image is used as a stencil: the span is filled with the ink of the cover and
   the icon cuts its shape out of it. So the icon's own color never matters, and the ink
   follows the light and dark themes exactly as the drawn covers did. */
.cover-icon {
  position: relative; z-index: 1; display: block;
  height: 56%; aspect-ratio: var(--ratio, 1); max-width: 54%;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
}
.post-cover .cover-icon { height: 62%; max-width: 40%; }
.cover-orange .cover-icon { color: #171310; }
:root[data-theme="dark"] .cover-orange .cover-icon { color: var(--stamp); }
.cover-blue .cover-icon { color: var(--ink2-ink); }
:root[data-theme="dark"] .cover-blue .cover-icon { color: #f2f0ea; }
.cover-paper .cover-icon { color: var(--fg); }
.cover-blue .corner, .cover-blue .corner .n { color: var(--ink2); }

/* A picture instead of an icon. It keeps its own shape and is never cropped: on the cards it
   sits inside a margin of paper, so two drawings never touch; on a post it is held to a reading
   width on wide screens (the drawings are not large enough to fill a desktop) and runs edge to
   edge on a phone. */
/* The drawings have no background of their own: they sit on graph paper, a light sheet in
   both themes (their ink is near-black, so a dark sheet would swallow it). */
.cover-picture {
  min-height: 0; height: auto; display: block;
  background:
    linear-gradient(rgba(23, 22, 20, .07) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(23, 22, 20, .07) 1px, transparent 1px) 0 0 / 24px 24px,
    #f4f3f0;
}
.cover-picture img { display: block; width: 100%; height: auto; }
.post .cover-picture { aspect-ratio: auto; padding: clamp(.75rem, 1.6vw, 1.25rem); }
.post-cover.cover-picture { aspect-ratio: auto; padding: clamp(1.5rem, 4vw, 3rem) 1rem; }
.post-cover.cover-picture img { max-width: 960px; margin: 0 auto; }
@media (max-width: 900px) {
  .post-cover.cover-picture { padding: 0; }
}

/* ---------- 2. The blog grid ---------- */
.posts .post:nth-child(n+4) { border-top: 1px solid var(--rule); }
.pager { border-top: 1px solid var(--rule); }
.pager .cell { padding-top: 1.1rem; padding-bottom: 1.1rem; }
.pager a { font-family: "Geist Pixel", ui-monospace, monospace; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.pager a:hover { color: var(--fg); }
.pager-next { text-align: right; }
.next .next-title a { color: inherit; text-decoration: none; }
.next .next-title a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule); }
@media (max-width: 900px) {
  .posts .post:nth-child(n+2) { border-top: 1px solid var(--rule); }
}

/* ---------- 3. A post written in the editor ----------
   .article keeps its 64-character measure for text; wide and full blocks may go past it. */
.article.entry { max-width: none; }
.article.entry > * { max-width: 64ch; }
.article.entry > .alignwide { max-width: min(100%, 60rem); }
.article.entry > .alignfull { max-width: none; }
.article.entry > * + * { margin-top: 0; }

.article.entry > p:first-child,
.article.entry p.is-style-lede { font-size: 1.3rem; line-height: 1.5; color: var(--muted); }
.article.entry p.is-style-label {
  font-family: "Geist Pixel", ui-monospace, monospace; font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; line-height: 1.4; color: var(--muted);
}
.article.entry strong { font-weight: 600; }
.article.entry a { color: var(--fg); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article.entry a:hover { text-decoration-color: var(--stamp); }

.article.entry h2, .article.entry h3, .article.entry h4 {
  font-family: "Clash Display", ui-sans-serif, system-ui, sans-serif; font-weight: 600;
  letter-spacing: -0.01em; line-height: 1.1; text-wrap: balance;
}
.article.entry h2 { font-size: 1.6rem; margin: 2.2rem 0 .8rem; }
.article.entry h3 { font-size: 1.25rem; margin: 1.9rem 0 .6rem; }
.article.entry h4 { font-size: 1.05rem; margin: 1.6rem 0 .5rem; }

.article.entry ul, .article.entry ol { margin: 0 0 1.25em; padding-left: 1.3em; font-size: 1.12rem; line-height: 1.65; }
.article.entry li { margin-bottom: .4em; }
.article.entry li::marker { color: var(--muted); }

/* The pull quote, and an ordinary quote, both on the orange rule. */
.article.entry .wp-block-pullquote,
.article.entry blockquote.pull {
  margin: 2rem 0; padding: 1.2rem 0 1.2rem 1.4rem; border: 0; border-left: 4px solid var(--stamp);
  text-align: left; color: var(--fg);
}
.article.entry .wp-block-pullquote blockquote { margin: 0; padding: 0; border: 0; }
.article.entry .wp-block-pullquote p {
  font-family: "Clash Display", ui-sans-serif, system-ui, sans-serif; font-weight: 600;
  letter-spacing: -0.015em; font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.15; margin: 0;
}
.article.entry .wp-block-quote {
  margin: 1.6rem 0; padding: .2rem 0 .2rem 1.2rem; border-left: 2px solid var(--rule);
}
.article.entry .wp-block-quote p { color: var(--muted); margin-bottom: .6em; }
.article.entry cite, .article.entry .wp-block-pullquote cite {
  display: block; margin-top: .8rem; font-style: normal;
  font-family: "Geist Pixel", ui-monospace, monospace; font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}

/* Pictures, with the caption as a pixel label. */
.article.entry figure { margin: 2rem 0; }
.article.entry img { max-width: 100%; height: auto; display: block; }
.article.entry .wp-block-image img { border: 1px solid var(--rule); }
.article.entry figcaption, .article.entry .wp-element-caption {
  margin-top: .6rem; text-align: left;
  font-family: "Geist Pixel", ui-monospace, monospace; font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; line-height: 1.4; color: var(--muted);
}
.article.entry .wp-block-gallery { gap: 8px; }
.article.entry .wp-block-embed iframe { max-width: 100%; }
.article.entry .wp-block-embed__wrapper { border: 1px solid var(--rule); }

/* A rule, a table, code, footnotes. */
.article.entry hr, .article.entry .wp-block-separator {
  border: 0; border-top: 1px solid var(--rule); margin: 2.4rem 0; max-width: 64ch; opacity: 1;
}
.article.entry table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.article.entry th, .article.entry td { text-align: left; padding: .6rem .8rem .6rem 0; border-bottom: 1px solid var(--rule); border-top: 0; border-left: 0; border-right: 0; vertical-align: top; }
.article.entry th {
  font-family: "Geist Pixel", ui-monospace, monospace; font-weight: 400; font-size: .68rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.article.entry code, .article.entry kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em;
  background: var(--bg-2); padding: .1em .35em; border-radius: 4px;
}
.article.entry pre {
  background: var(--bg-2); border: 1px solid var(--rule); padding: 1rem 1.2rem; overflow-x: auto;
  font-size: .92rem; line-height: 1.55; margin: 1.6rem 0;
}
.article.entry pre code { background: none; padding: 0; }
.article.entry .wp-block-footnotes { font-size: .95rem; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 1.2rem; margin-top: 2.4rem; }
.article.entry sup.fn a { text-decoration: none; color: var(--ink2); }
:root[data-theme="dark"] .article.entry sup.fn a { color: var(--stamp); }

/* A button inside a post looks like the site's button. */
.article.entry .wp-block-button__link {
  background: var(--stamp); color: var(--stamp-ink); border-radius: 12px; padding: .8rem 1.3rem;
  font-weight: 600; font-size: 1rem; text-decoration: none;
}
.article.entry .is-style-outline .wp-block-button__link { background: none; color: var(--fg); border: 1px solid var(--fg); }

/* Columns and groups keep the measure honest. */
.article.entry .wp-block-columns { gap: 2rem; margin: 1.6rem 0; }
.article.entry .wp-block-group.has-background { padding: 1.4rem 1.6rem; }

/* ---------- 4. The privacy page ---------- */
.legal { max-width: 44rem; margin: 0 auto; padding: 3rem 6vw 5rem; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: .4rem; }
.legal .updated { color: var(--muted); font-size: .9rem; margin-bottom: .4rem; }
.legal h2 { font-size: 1.25rem; margin: 2.2rem 0 .6rem; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .4rem; }
.legal a { color: var(--fg); }

/* ---------- The 404: the padlock, still, ink on the orange field like the app icon ---------- */
.lost-fig .lost-lock { width: min(34%, 200px); height: auto; color: #171310; position: relative; z-index: 1; shape-rendering: crispEdges; }
