/* Dot & Dash blog: dotanddash.everydaymactools.com/blog/
   Loaded after css/site.css, which brings the tokens (--page #f5f5f7, --paper, --plate, --ink #16171a, --ink-2,
   --ink-3, --line, --accent #0a66ff), the SF system fonts, the sticky nav, the footer and the buttons. This file only
   styles the article, the blog index and the breadcrumbs, in the page's own vocabulary: the light page, white paper
   for anything set apart, hairline rules, one blue accent for links and focus, Morse set in the readout's mono. Light
   only, as the page is; no gradients, no warm or tinted colours. Built by everydaymactools/scripts/build-blogs.py. */

.skip-link { position: absolute; left: -9999px; top: 10px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: #fff; }
.skip-link:focus { left: 10px; }

/* ---------- breadcrumbs ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 22px; font-size: 13.5px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs a::after { content: "\203A"; margin-left: 8px; color: var(--ink-3); }
.crumbs span[aria-current] { max-width: 38ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- article ---------- */
/* the nav is sticky, so the page flows under it with no offset */
.post { padding: clamp(40px, 6vw, 84px) 0 clamp(72px, 9vw, 120px); }
.post__head { max-width: 780px; }
.post__head h1 { font: 650 clamp(34px, 4.4vw, 52px) / 1.06 var(--display); letter-spacing: -0.034em; }
.post__head .sub { margin-top: 18px; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 36em; text-wrap: pretty; }
.post__meta { margin-top: 16px; font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.post__body { max-width: 700px; margin-top: clamp(28px, 4vw, 44px); padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid var(--line); }
.post__body h2 { margin: 48px 0 12px; font: 650 clamp(23px, 2.3vw, 28px) / 1.18 var(--display); letter-spacing: -0.024em; }
.post__body h3 { margin: 30px 0 8px; font: 600 18.5px / 1.32 var(--display); letter-spacing: -0.012em; }
.post__body p, .post__body li { font-size: 17.5px; line-height: 1.66; color: var(--ink-2); text-wrap: pretty; }
.post__body p + p, .post__body ul + p, .post__body ol + p, .post__body table + p, .post__body pre + p, .post__body blockquote + p { margin-top: 1em; }
.post__body h3 + p { margin-top: 0; }
.post__body ul, .post__body ol { display: grid; gap: .45em; margin: .8em 0 1em; padding-left: 1.3em; }
.post__body ul { list-style: disc; }
.post__body ol { list-style: decimal; }
.post__body li::marker { color: var(--ink-3); }
.post__body a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(10, 102, 255, .32); }
.post__body a:hover { text-decoration-color: currentColor; }
.post__body strong, .post__body b { color: var(--ink); font-weight: 600; }

/* Morse and other code: the readout's mono, a touch of tracking so dits and dahs stay apart, on white paper */
.post__body code { padding: 2px 7px; border-radius: 6px; background: var(--paper); color: var(--ink); box-shadow: 0 0 0 0.5px var(--line);
  font: 500 .88em/1.4 var(--mono); letter-spacing: .08em; white-space: pre-wrap; }
.post__body pre { margin: 1.1em 0; padding: 18px 20px; border-radius: 14px; overflow-x: auto; background: var(--paper); color: var(--ink);
  box-shadow: 0 0 0 0.5px var(--line); font: 500 14.5px/1.75 var(--mono); letter-spacing: .08em; }
.post__body pre code { padding: 0; background: none; box-shadow: none; color: inherit; font: inherit; letter-spacing: inherit; }
.post__body blockquote { margin: 1.2em 0; padding: 14px 20px; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 0.5px var(--line-2); }
.post__body blockquote p { color: var(--ink); }
.post__body hr { margin: 2.2em 0; border: 0; border-top: 1px solid var(--line); }

/* tables: white paper, hairline rows, the column's full width; on a phone they scroll sideways rather than squash */
.post__body table { display: table; width: 100%; margin: 1.2em 0; border-collapse: separate; border-spacing: 0;
  border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 0.5px var(--line); font-size: 15.5px; line-height: 1.5; }
.post__body th, .post__body td { padding: 11px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-2); }
.post__body th { color: var(--ink); font-weight: 600; white-space: nowrap; border-bottom-color: var(--line); }
.post__body td { color: var(--ink-2); }
.post__body td code, .post__body th code { padding: 0; background: none; box-shadow: none; white-space: nowrap; }
.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: 28px 30px;
  border-radius: 22px; background: var(--paper); box-shadow: 0 0 0 0.5px var(--line-2), 0 24px 48px -36px rgba(14, 20, 36, 0.3); }
.post__cta img { width: 56px; height: 56px; }
.post__cta b { display: block; color: var(--ink); font: 650 21px / 1.2 var(--display); letter-spacing: -0.022em; }
.post__cta p { margin-top: 6px; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.post__cta .btn { margin-top: 16px; }

.post__more { max-width: 700px; margin-top: 44px; border-top: 1px solid var(--ink); }
.post__more h2 { padding: 16px 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ink-3); }
.post__more a { display: block; padding: 13px 0; border-bottom: 1px solid var(--line-2); color: var(--ink); font-weight: 500; text-decoration: none; transition: color .2s; }
.post__more a:hover { color: var(--accent); }
.post__more:not(:has(a)) { display: none; } /* a post with no neighbour yet */

/* ---------- the blog index ---------- */
.blog__grid { display: grid; max-width: 860px; margin-top: clamp(32px, 4vw, 52px); }
.blog__cat { margin: 52px 0 0; padding-bottom: 12px; border-bottom: 1px solid var(--ink); font: 650 22px / 1.2 var(--display); letter-spacing: -0.022em; scroll-margin-top: 72px; }
.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 10px; border-bottom: 1px solid var(--line-2);
  color: var(--ink); text-decoration: none; transition: background-color .2s var(--ease); }
.blog__item:hover { background: var(--paper); }
.blog__item b { font-size: 17px; font-weight: 500; }
.blog__item:hover b { color: var(--accent); }
.blog__item span { color: var(--ink-3); font-size: 13px; 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 separator once the title is hidden */
  .post__body table { display: block; width: fit-content; max-width: 100%; overflow-x: auto; font-size: 14.5px; } /* the card hugs its table */
  .post__body th, .post__body td { padding: 10px 12px; }
  .post__body th { white-space: normal; }
  .post__body td:first-child { min-width: 5.6em; }
  .post__body p, .post__body li { font-size: 17px; }
  .blog__item { padding: 14px 2px; }
}
