/* Sundry Mill · the blog (/blog and /blog/<slug>)
   Loaded after site.css on the blog pages only. Phone first, on the site's own
   tokens, fonts and buttons: Fraunces for heads, Satoshi for reading. */

:root { --code-bg: #F4ECDD; --media-line: rgba(23, 32, 44, .14); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --code-bg: #0E1628; --media-line: rgba(242, 234, 220, .14); }
}
:root[data-theme="dark"] { --code-bg: #0E1628; --media-line: rgba(242, 234, 220, .14); }

.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .9375rem; font-weight: 600; color: var(--text-3); }
.crumbs a { color: var(--text-2); text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }

/* ------------------------------------------------------------------ one post */
.post {
  max-width: 760px; margin: 0 auto;
  padding: calc(var(--bar-h) + clamp(24px, 5vw, 64px)) var(--gutter) clamp(56px, 8vw, 96px);
}
.post-title {
  margin-top: 4px;
  font: 650 clamp(1.875rem, 1.3rem + 2.3vw, 3rem)/1.14 var(--display);
  font-variation-settings: 'opsz' 48, 'SOFT' 50;
  letter-spacing: -.012em;
  text-wrap: balance;
}
.post-meta, .post-item-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  font-size: .9375rem; font-weight: 600; color: var(--text-3);
}
.post-meta { margin-top: 20px; padding-bottom: 24px; border-bottom: 2px solid var(--line-strong); }

.post-body { margin-top: 28px; font-size: 1.125rem; line-height: 1.7; color: var(--text-2); }
.post-body > * + * { margin-top: 18px; }
.post-body h2 {
  margin-top: 52px;
  font: 700 clamp(1.5rem, 1.25rem + 1vw, 2rem)/1.15 var(--display);
  letter-spacing: -.018em; color: var(--text); text-wrap: balance;
}
.post-body h3 { margin-top: 36px; font: 700 1.25rem/1.3 var(--sans); letter-spacing: -.005em; color: var(--text); }
.post-body h2 + *, .post-body h3 + * { margin-top: 12px; }
.post-body strong { color: var(--text); font-weight: 700; }
.post-body a { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.post-body a:hover { color: var(--accent-text); }
.post-body ul, .post-body ol { padding-left: 1.3em; margin-bottom: 0; }
.post-body li + li { margin-top: 10px; }
.post-body li::marker { color: var(--accent-text); font-weight: 700; }
.post-body > p:first-child { font-size: 1.1875rem; color: var(--text); }
.post-body blockquote { margin-left: 0; margin-right: 0; padding-left: 18px; border-left: 3px solid var(--sun-hot); }
.post-body code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: .9em; background: var(--code-bg); padding: .12em .38em; border-radius: 6px; }
.post-body pre { background: var(--code-bg); padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-size: .9375rem; line-height: 1.55; }
.post-body pre code { background: none; padding: 0; }

.post-body figure { margin: 32px 0 0; }
.post-body figure img, .post-body figure video {
  width: 100%; height: auto; border-radius: 14px; background: var(--paper-2);
  box-shadow: 0 0 0 1px var(--media-line), 0 24px 44px -30px rgba(23, 32, 44, .6);
}
.post-body figure + p { margin-top: 28px; }

/* ------------------------------------------------------------------ the product box */
.post-cta {
  --cta-bg: #17202C; --cta-fg: #F2EADC; --cta-2: #CFC7B9; --cta-accent: #FFB23F; --cta-btn: #FFB23F; --cta-on: #17202C;
  margin-top: 56px; padding: 24px 22px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 18px; align-items: start;
  background: var(--cta-bg); color: var(--cta-fg); border-radius: 20px;
  box-shadow: 0 30px 60px -36px rgba(0, 0, 0, .7);
}
.post-cta--framok { --cta-bg: #000; --cta-fg: #f5f5f7; --cta-2: rgba(245, 245, 247, .74); --cta-accent: #6aa2ff; --cta-btn: #1d62dc; --cta-on: #fff; }
.post-cta--qulok { --cta-bg: #0b0d10; --cta-fg: #f2f4f7; --cta-2: #a9b2c1; --cta-accent: #f0b76a; --cta-btn: #f0b76a; --cta-on: #1a1206; }
.post-cta--novrl { --cta-bg: #14152a; --cta-fg: #f7f7fb; --cta-2: #c3c4d8; --cta-accent: #b9b2ff; --cta-btn: #5b4bff; --cta-on: #fff; }
.post-cta-icon { width: 52px; height: 52px; border-radius: 14px; }
@media (min-width: 640px) { .post-cta-icon { width: 56px; height: 56px; } }
.post-cta-kicker { font-size: .8125rem; font-weight: 700; letter-spacing: .01em; color: var(--cta-accent); }
.post-cta-name { margin-top: 2px; font: 700 1.75rem/1.05 var(--display); letter-spacing: -.02em; }
.post-cta-line { margin-top: 10px; color: var(--cta-2); text-wrap: pretty; }
.post-cta-price { margin-top: 10px; font-weight: 700; font-size: .9375rem; }
.post-cta-btn { grid-column: 1 / -1; justify-self: start; --b-bg: var(--cta-btn); --b-fg: var(--cta-on); }

/* ------------------------------------------------------------------ lists of posts */
.post-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--line-strong); }
.post-item article { padding: 26px 0 28px; border-bottom: 1px solid var(--line); }
.post-item-title { margin-top: 8px; font: 650 clamp(1.375rem, 1.1rem + 1.2vw, 2.125rem)/1.16 var(--display); letter-spacing: -.01em; text-wrap: balance; max-width: 34ch; }
.post-item-title a { text-decoration: none; }
.post-item-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.post-item-desc { margin-top: 10px; max-width: 62ch; color: var(--text-2); }

.blog-index { padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(64px, 9vw, 120px); }
.blog-index > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.blog-rss { margin-top: 28px; font-weight: 600; }
.blog-rss a, .post-rss { color: var(--text-2); }

.post-more { background: var(--paper-2); padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(56px, 8vw, 96px); }
.post-more-inner { max-width: 760px; margin: 0 auto; }
.post-more-title { font: 700 clamp(1.5rem, 1.2rem + 1vw, 2rem)/1.1 var(--display); letter-spacing: -.02em; margin-bottom: 18px; }
.post-more .post-item-title { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); }
.post-more-links { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; font-weight: 600; }

@media (min-width: 640px) {
  .post-cta { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; padding: 28px 30px; }
  .post-cta-btn { grid-column: auto; }
}
@media (min-width: 1100px) {
  /* screenshots get a little more room than the text column */
  .post-body figure { margin-left: -90px; margin-right: -90px; }
}
