/* The guides (/blog and /blog/<slug>): Read mode on the site's system. base.css keeps the tokens,
   header, footer and focus ring; this file sets Archivo for text as the homepage does, a reading
   column of about 70 characters (40rem at 17px; rem so the grid and the text agree), the guide's
   contents beside it on wide screens and above it on narrow ones, and the editorial list on the
   index. Static pages: no scripts. */

.blog { --font: "Archivo", "Segoe UI", system-ui, sans-serif; --measure: 40rem; }

.skip-link { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

/* Header and footer: the brand, Guides and Account stay visible at every width. */
.blog .site-header-inner { height: 72px; }
.blog .brand { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-stretch: 104%; }
.blog .site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.blog .site-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; border-radius: var(--radius); }
.blog .site-nav a:hover { background: var(--surface); }
.blog .site-nav a[aria-current] { color: var(--text); text-decoration: underline 2px var(--accent); text-underline-offset: 8px; }
.blog .site-footer-inner { justify-content: space-between; }
.blog .footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* Index: a plain editorial list, date beside title and description. */
.blog-main { padding-top: clamp(40px, 7vw, 88px); }
.blog-intro { display: grid; gap: 16px; max-width: 46rem; padding-bottom: clamp(32px, 5vw, 56px); }
.blog-intro h1, .guide-head h1 { font-stretch: 104%; font-weight: 600; letter-spacing: -0.03em; }
.blog-intro h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.05; }
.blog-lede { max-width: 52ch; color: var(--text-2); font-size: 17px; line-height: 1.65; }

.post-list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line-soft); }
.post-list > li { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 8px 32px; padding: 28px 0 30px; border-top: 1px solid var(--line-soft); }
.post-date { padding-top: 5px; color: var(--text-3); font-size: 14px; font-variant-numeric: tabular-nums; }
.post-list h2 { font-size: clamp(21px, 2.2vw, 26px); font-stretch: 100%; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; }
.post-list h2 a { text-decoration: none; }
.post-list h2 a:hover { text-decoration: underline 2px var(--accent); text-underline-offset: 5px; }
.post-list h2 + p { max-width: 62ch; margin-top: 10px; color: var(--text-2); font-size: 15.5px; line-height: 1.65; }
.post-mods { margin-top: 8px; color: var(--text-3); font-size: 13.5px; }

.blog-about { max-width: var(--measure); margin-top: 40px; color: var(--text-3); font-size: 14px; line-height: 1.65; }
.blog-about h2 { margin-bottom: 6px; color: var(--text-2); font-size: 15px; font-stretch: 100%; font-weight: 600; letter-spacing: 0; }
.blog-about a { color: var(--text-2); }

/* A guide: head and body in the reading column, the contents in a column of its own. */
.guide { padding-top: clamp(28px, 5vw, 56px); }
.guide-head { display: grid; gap: 18px; max-width: var(--measure); }
.guide-head h1 { font-size: clamp(32px, 4.2vw, 50px); line-height: 1.08; }
.guide-dek { color: var(--text-2); font-size: 18px; line-height: 1.6; }
.byline { color: var(--text-3); font-size: 14px; }
.byline .dot { margin-inline: 8px; }
.guide-note { padding: 14px 18px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--surface); color: var(--text-2); font-size: 14px; line-height: 1.6; }
.guide-note strong { color: var(--text); font-weight: 600; }

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; color: var(--text-3); font-size: 13.5px; }
.breadcrumb li + li::before { content: "/"; content: "/" / ""; margin-inline: 9px; color: var(--line); }
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); }

.toc { margin-top: 32px; padding: 16px 10px 18px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--surface); }
.toc h2 { margin-bottom: 8px; padding-inline: 8px; color: var(--text-2); font-size: 14px; font-stretch: 100%; font-weight: 600; letter-spacing: 0; }
.toc ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.toc a { display: block; padding: 6px 8px; border-radius: 4px; color: var(--text-2); font-size: 14.5px; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.toc a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); }
.toc a:focus-visible { outline-offset: -2px; border-radius: 4px; }

/* The reading column. */
.prose { max-width: var(--measure); margin-top: 8px; color: var(--text-2); font-size: 17px; line-height: 1.72; overflow-wrap: break-word; }
.prose > section { padding-top: 8px; }
.prose h2 { margin: 48px 0 14px; color: var(--text); font-size: clamp(23px, 2.4vw, 28px); font-stretch: 100%; font-weight: 600; line-height: 1.22; letter-spacing: -0.02em; scroll-margin-top: 24px; }
.prose h3 { margin: 32px 0 10px; color: var(--text); font-size: 19px; font-stretch: 100%; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; scroll-margin-top: 24px; }
.prose p, .prose ul, .prose ol, .prose dl, .prose table { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--text-3); font-variant-numeric: tabular-nums; }
.prose strong, .prose b { color: var(--text); font-weight: 600; }
.prose q { color: var(--text); }
.prose a { text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose code { padding: 1px 5px; border-radius: 4px; background: var(--raised); color: var(--text); overflow-wrap: anywhere; }
.prose kbd { font-size: 0.78em; }

.callout { margin: 0 0 22px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }

.legend { padding-left: 0; list-style: none; }
.legend li { display: flex; align-items: baseline; gap: 10px; }
.swatch { flex: none; width: 10px; height: 10px; border-radius: 50%; transform: translateY(-1px); }
.swatch-reach { background: rgb(255 115 26); }
.swatch-area { background: rgb(204 89 255); }
.swatch-item { background: rgb(64 204 255); }

.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.55; }
.prose caption { padding-bottom: 8px; color: var(--text-3); font-size: 14px; text-align: left; }
.prose th { padding: 0 16px 8px 0; border-bottom: 1px solid var(--line); color: var(--text-3); font-size: 13.5px; font-weight: 600; text-align: left; }
.prose td { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.prose td:first-child { color: var(--text); white-space: nowrap; }

.faq dt { margin-top: 22px; color: var(--text); font-weight: 600; line-height: 1.5; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 6px 0 0; }

.sources { font-size: 15px; line-height: 1.6; }
.sources li { overflow-wrap: anywhere; }
.sources .host { color: var(--text-3); }

.related { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.related h2 { margin-top: 0; font-size: 19px; }
.related ul { padding-left: 0; list-style: none; }
.related li + li { margin-top: 12px; }
.related a { color: var(--text); font-weight: 600; }
.related span { display: block; color: var(--text-3); font-size: 14.5px; }

@media (min-width: 1040px) {
  .guide { display: grid; grid-template-columns: 13.5rem minmax(0, var(--measure)); grid-template-rows: auto 1fr; column-gap: clamp(40px, 5vw, 72px); }
  .guide-head { grid-column: 2; }
  .toc { grid-column: 1; grid-row: 2; align-self: start; position: sticky; top: 24px; max-height: calc(100vh - 48px); margin-top: 64px; padding: 0 0 0 6px; overflow-y: auto; border: 0; border-left: 1px solid var(--line-soft); border-radius: 0; background: none; }
  .toc a { font-size: 14px; }
  .prose { grid-column: 2; grid-row: 2; }
}

@media (max-width: 720px) {
  .blog .site-header-inner { flex-wrap: nowrap; height: 64px; padding: 0; gap: 12px; }
  .blog .site-nav { gap: 0; }
  .blog .site-nav a { min-height: 44px; padding: 0 8px; }
  .post-list > li { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 24px 0 26px; }
  .post-date { padding-top: 0; }
  .guide-dek { font-size: 17px; }
  .prose { font-size: 16.5px; line-height: 1.7; }
  .prose h2 { margin-top: 40px; }
  .prose td:first-child { white-space: normal; }
  .blog .site-footer { margin-top: 64px; }
}

@media (max-width: 420px) {
  .blog .page, .blog .site-header-inner { width: calc(100% - 32px); }
  .blog .brand { gap: 7px; font-size: 13.5px; }
  .blog .brand img { width: 24px; height: 24px; }
  .blog .site-nav a { padding: 0 6px; font-size: 13.5px; }
  .toc { padding: 14px 6px 16px; }
}
