/* Trill blog: everydaymactools.com/trill/blog/
   Loaded after css/trill.css, which brings the tokens, Mona Sans, the nav, the footer and the
   buttons. This file only styles the article, the blog index and the breadcrumbs, in the page's
   own vocabulary: cool white, hairlines, jade links, mint only as a marker. The blog pages are
   built by everydaymactools/scripts/build-blogs.py. */

/* ---------- breadcrumbs ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 14px; color: var(--text-3); }
.crumbs a { color: var(--link); text-decoration: none; }
.crumbs a:hover { color: var(--deep); text-decoration: underline; }
.crumbs a::after { content: "/"; margin-left: 8px; color: var(--hair); }
.crumbs span[aria-current] { max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- article ---------- */
.post { padding: clamp(40px, 6vw, 84px) 0 clamp(72px, 9vw, 120px); }
.post__head { max-width: 780px; }
.post__head h1 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.04; font-stretch: 106%; }
.post__head .sub { margin-top: 18px; font-size: clamp(18px, 1.5vw, 20px); line-height: 1.55; color: var(--text-2); max-width: 36em; text-wrap: pretty; }
.post__meta { margin-top: 18px; font-size: 14.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.post__body { max-width: 700px; margin-top: clamp(28px, 4vw, 44px); }
.post__body h2 { margin: 48px 0 12px; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.15; font-stretch: 106%; letter-spacing: -.022em; }
.post__body h3 { margin: 30px 0 8px; font-size: 19px; }
.post__body p, .post__body li { font-size: 17.5px; line-height: 1.7; color: var(--text-2); text-wrap: pretty; }
.post__body p + p, .post__body ul + p, .post__body ol + p, .post__body table + p, .post__body pre + p { margin-top: 1em; }
.post__body ul, .post__body ol { display: grid; gap: .45em; margin: .7em 0 1em; padding-left: 1.3em; }
.post__body ul { list-style: disc; }
.post__body ol { list-style: decimal; }
.post__body li::marker { color: var(--mint-2); }
.post__body a { color: var(--link); }
.post__body a:hover { color: var(--deep); }
.post__body strong, .post__body b { color: var(--text); font-weight: 640; }
.post__body code { padding: 1px 6px; border-radius: 6px; background: var(--mist); color: var(--text); font: .86em/1.4 "SF Mono", ui-monospace, Menlo, monospace; }
.post__body pre { margin: 1em 0; padding: 16px 18px; border-radius: 14px; overflow-x: auto; background: var(--ink); color: var(--on-ink); }
.post__body pre code { padding: 0; background: none; color: inherit; }
.post__body blockquote { margin: 1.2em 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--mint-2); }
.post__body blockquote p { color: var(--text); }
.post__body hr { margin: 2em 0; border: 0; border-top: 1px solid var(--hair); }

/* comparison tables: hairlines on white, scroll sideways on a phone rather than squash */
.post__body table { display: block; max-width: 100%; overflow-x: auto; margin: 1.2em 0; border-collapse: collapse; border-radius: 14px; background: var(--white); box-shadow: 0 0 0 1px var(--mist-2); font-size: 15.5px; line-height: 1.5; }
.post__body th, .post__body td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--mist-2); }
.post__body th { color: var(--text); font-weight: 650; background: var(--mist); white-space: nowrap; }
.post__body td { color: var(--text-2); }
.post__body tr:last-child td { border-bottom: 0; }

/* ---------- the call to action and Read next ---------- */
.post__cta { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: center; max-width: 700px; margin-top: 52px; padding: 26px 28px; border-radius: 20px; background: var(--white); box-shadow: 0 0 0 1px var(--mist-2), 0 24px 50px -36px rgba(16, 40, 32, .3); }
.post__cta img { width: 56px; height: 56px; transform: scale(1.12); }
.post__cta b { display: block; color: var(--text); font-size: 19px; font-weight: 680; font-stretch: 106%; letter-spacing: -.012em; }
.post__cta p { margin-top: 4px; color: var(--text-2); font-size: 15.5px; line-height: 1.55; }
.post__cta .btn { margin-top: 14px; }

.post__more { max-width: 700px; margin-top: 44px; border-top: 1px solid var(--text); }
.post__more h2 { padding: 16px 0 6px; font-size: 15px; font-weight: 650; letter-spacing: 0; font-stretch: 100%; color: var(--text); }
.post__more a { display: block; padding: 12px 0; border-bottom: 1px solid var(--hair); color: var(--text); font-weight: 560; text-decoration: none; }
.post__more a:hover { color: var(--link); }

/* ---------- the blog index ---------- */
.blog__grid { display: grid; max-width: 860px; margin-top: clamp(32px, 4vw, 52px); }
.blog__cat { margin: 48px 0 0; padding-bottom: 12px; border-bottom: 1px solid var(--text); font-size: 22px; line-height: 1.2; font-stretch: 108%; letter-spacing: -.02em; }
.blog__cat:first-child { margin-top: 0; }
.blog__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 15px 6px; border-bottom: 1px solid var(--hair); color: var(--text); text-decoration: none; transition: background-color .2s var(--ease); }
.blog__item:hover { background: var(--mist); color: var(--text); }
.blog__item b { font-size: 17px; font-weight: 600; }
.blog__item span { color: var(--text-3); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .post__cta { grid-template-columns: 1fr; padding: 22px 20px; }
  .crumbs span[aria-current] { display: none; }
  .crumbs a:nth-last-child(2)::after { display: none; } /* no dangling "/" once the title is hidden */
  .post__body table { font-size: 14.5px; }
  .post__body th, .post__body td { padding: 10px 12px; }
  .post__body td + td, .post__body th + th { min-width: 8em; } /* scroll sideways before columns get too thin */
  .post__body p, .post__body li { font-size: 17px; }
  .blog__item { padding: 14px 2px; }
}
