/* Article pages under /learn/ (generated by marketing/sitegen). Loaded after
   site.css, which supplies the tokens, fonts, nav, paper sheet and footer.
   Ink on the paper sheet, the same pairing as the homepage's FAQ section. */

/* No hero behind the bar here, so it starts on its full ground rather than
   fading in (site.js only drives --nav-ground when a hero exists). */
.page-article .nav { --nav-ground: 1; }

.article {
  /* 720 holds a reading line near 75 characters at 18px. */
  width: min(720px, 100%);
  margin-inline: auto;
  padding: calc(160 * var(--u)) 16px 96px;
  color: var(--ink);
  font-size: 18px; line-height: 1.65;
}
.article > * + * { margin-top: 1.1em; }
/* In-page anchors (#about-the-author) land clear of the fixed bar. */
.article [id] { scroll-margin-top: 120px; }

.article-crumbs { font-size: 13px; letter-spacing: .02em; color: #555; }
.article .article-crumbs a { text-decoration: none; }
.article .article-crumbs a:hover { text-decoration: underline; }

.article h1, .article h2, .article h3 {
  font-family: 'Aime', serif; font-weight: 400; line-height: 1.15; color: var(--ink);
}
.article h1 { font-size: clamp(32px, 5vw, 48px); margin-top: .6em; }
.article h2 { font-size: clamp(24px, 3.2vw, 32px); margin-top: 1.8em; }
.article h3 { font-size: 22px; margin-top: 1.4em; }

.article a { color: inherit; text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: 1px; }
.article a:hover { text-decoration-thickness: 2px; }
.article strong { font-weight: 700; }
.article ul, .article ol { padding-left: 1.3em; }
.article li + li { margin-top: .35em; }
.article blockquote { border-left: 3px solid var(--ink); padding-left: 1em; font-style: italic; }
/* Long source URLs must wrap, never push the page sideways on a phone. */
.article p, .article li { overflow-wrap: anywhere; }

/* The /learn/ index: one entry per article, title, summary and link. */
.learn-intro { font-size: 20px; color: #333; }
.learn-list { list-style: none; padding-left: 0 !important; margin-top: 2em !important; }
.learn-list > li { padding: 1.6em 0; border-top: 1px solid rgba(19, 19, 19, 0.15); }
.learn-list > li + li { margin-top: 0; }
.learn-list h2 { margin-top: 0; font-size: clamp(22px, 2.8vw, 28px); }
.learn-list h2 a { text-decoration: none; }
.learn-list h2 a:hover { text-decoration: underline; }
.learn-list p { margin-top: .7em; }
.learn-more { font-size: 15px; font-weight: 600; }

/* Screenshots (content/learn/img/, copied beside the page). The italic line the
   template puts under one is its caption. */
.article img {
  display: block; max-width: 100%; height: auto; margin-inline: auto;
  border: 1px solid rgba(19, 19, 19, 0.15); border-radius: 8px;
}
.article p:has(> img:only-child) + p { margin-top: .6em; font-size: 14px; color: #555; text-align: center; }

/* The house risk line (sitegen/lib/standard.mjs): set apart from the prose. */
.article-risk {
  margin-top: 2.4em !important; padding-top: 1.2em;
  border-top: 1px solid rgba(19, 19, 19, 0.15);
  font-size: 14px; line-height: 1.6; color: #444;
}

/* An unresolved placeholder from the source. Only held/draft articles can
   carry one (the build refuses a published article that does), so it is made
   loud on purpose. */
.open-item {
  background: #fff3a8; color: #6b4e00;
  padding: 0 .3em; border-radius: 2px; font-family: ui-monospace, monospace; font-size: .85em;
}

@media (max-width: 640px) {
  .article { padding-top: 112px; font-size: 17px; }
}
