/* Guides blog: article and index layout on top of /css/emt.css.
   emt.css supplies the tokens, the fixed .top header, the footer and .btn; this file
   only styles what the blog template adds (.doc, .crumbs, .post__cta, .post__more,
   .blog__*), mirroring the site's own text pages (.page / .page__body). */

.doc { padding: calc(var(--nav-h) + clamp(40px, 7vh, 80px)) 0 clamp(72px, 11vh, 120px); position: relative; z-index: 2; }
.doc__in { max-width: calc(720px + 2 * var(--gut)); }

/* breadcrumb */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; color: var(--faint); margin: 0 0 22px; }
.doc .crumbs a { color: var(--dim); text-decoration: none; }
.doc .crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs a::after { content: "/"; margin: 0 9px; color: var(--alu-mid); }
.crumbs span { flex: 1 1 0; min-width: 0; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* title and date */
.doc h1 { font-family: var(--disp); font-optical-sizing: auto; font-weight: 700;
  font-size: clamp(32px, 4.4vw, 48px); line-height: 1.06; letter-spacing: -.026em; color: var(--ink);
  margin: 0; text-wrap: balance; }
.doc .doc__stamp { font-family: var(--mono); font-size: 13px; line-height: 1.5; color: var(--faint); margin: 16px 0 36px; }
.doc__in:has(.blog__grid) .doc__stamp { font-family: var(--body); font-size: clamp(16px, 1.8vw, 19px); line-height: 1.55;
  color: var(--dim); max-width: 36em; margin: 18px 0 44px; }

/* body copy */
.doc h2 { font-family: var(--disp); font-optical-sizing: auto; font-weight: 700; font-size: clamp(22px, 2.4vw, 27px);
  line-height: 1.2; letter-spacing: -.016em; color: var(--ink); margin: 48px 0 14px; text-wrap: balance; }
.doc h3 { font-family: var(--body); font-weight: 650; font-size: 18.5px; line-height: 1.35; color: var(--ink); margin: 32px 0 10px; }
.doc p, .doc li { font-size: 17.5px; line-height: 1.72; color: var(--ink-2); text-wrap: pretty; }
.doc p { margin: 0 0 1.05em; }
.doc ul, .doc ol { margin: 0 0 1.2em; padding-left: 1.35em; }
.doc li { margin: 0 0 .5em; padding-left: .2em; }
.doc li::marker { color: var(--faint); }
.doc ol li::marker { font-family: var(--mono); font-size: .88em; }
.doc strong { color: var(--ink); font-weight: 650; }
.doc a { color: var(--brand-ink); text-decoration: underline; text-decoration-color: rgba(29, 95, 208, .35);
  text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.doc a:hover { text-decoration-color: currentColor; }
.doc code { font-family: var(--mono); font-size: .86em; background: var(--paper); border: 1px solid var(--hair-2);
  border-radius: 6px; padding: .12em .4em; color: var(--ink); word-break: break-word; }
.doc pre { background: #17181a; color: #eef0f4; border-radius: 12px; padding: 16px 18px; margin: 0 0 1.3em;
  overflow-x: auto; font-size: 14.5px; line-height: 1.6; }
.doc pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; word-break: normal; }
.doc blockquote { margin: 0 0 1.3em; padding: 4px 0 4px 18px; border-left: 3px solid var(--brand); }
.doc blockquote p { color: var(--dim); }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 15.5px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--hair); }
.doc th { font-weight: 650; color: var(--ink); }
.doc td { color: var(--ink-2); }
.doc hr { border: 0; border-top: 1px solid var(--hair); margin: 40px 0; }
.doc img { border-radius: 12px; }

/* end-of-post card */
.post__cta { display: flex; gap: 18px; align-items: flex-start; margin: 56px 0 0; padding: 22px 24px;
  background: var(--paper); border-radius: 18px; box-shadow: 0 1px 0 var(--hair-2), 0 12px 32px -20px rgba(23, 24, 26, .28); }
.post__cta img { width: 48px; height: 48px; flex: none; border-radius: 12px; }
.post__cta b { display: block; font-family: var(--disp); font-size: 19px; letter-spacing: -.01em; color: var(--ink); margin: 2px 0 6px; }
.post__cta p { font-size: 15.5px; line-height: 1.6; color: var(--dim); margin: 0 0 14px; }
.btn--sm { padding: 11px 18px; font-size: 14.5px; }
.post__cta .btn, .post__cta .btn:hover { color: var(--bg); text-decoration: none; }

/* related posts */
.post__more { margin: 44px 0 0; padding-top: 28px; border-top: 1px solid var(--hair); }
.post__more h2 { font-family: var(--mono); font-weight: 500; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 12px; }
.post__more a { display: block; padding: 11px 0; border-bottom: 1px solid var(--hair-2); color: var(--ink);
  font-weight: 560; text-decoration: none; line-height: 1.4; }
.post__more a:hover { color: var(--brand-ink); }

/* blog index */
.doc__in:has(.blog__grid) { max-width: calc(880px + 2 * var(--gut)); }
.blog__grid { margin-top: 8px; }
.blog__cat { font-family: var(--mono) !important; font-weight: 500 !important; font-size: 12.5px !important;
  letter-spacing: .08em; text-transform: uppercase; color: var(--faint) !important; margin: 44px 0 6px !important; scroll-margin-top: calc(var(--nav-h) + 16px); }
.blog__cat:first-child { margin-top: 0 !important; }
.blog__item { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 13px 0;
  border-bottom: 1px solid var(--hair-2); text-decoration: none !important; color: var(--ink) !important; }
.blog__item b { font-weight: 560; line-height: 1.4; }
.blog__item span { flex: none; font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.blog__item:hover b { color: var(--brand-ink); }

@media (max-width: 600px) {
  .post__cta { flex-direction: column; gap: 12px; padding: 20px; }
  .doc p, .doc li { font-size: 17px; }
}
