/* The blog (2026-11-03): /blog/ and /blog/<slug>/. Built on main.css tokens (Steel Orange via themes.css).
   Index: Cole's title and line, a big search box and topic chips, the newest post as a wide card, then a grid.
   Post: breadcrumb, title, Cole's description as the lede, meta; the contents list sticks beside the article on wide
   screens and folds into a sticky "On this page" bar on narrow ones; a thin progress line runs along the top. */

.blog { --warm: #F3ECE2; --ease: cubic-bezier(0.22, 1, 0.36, 1); padding-block: clamp(40px, 6vw, 80px) var(--section-space); }

/* ---------- Index ---------- */
.bidx__head { max-width: 44em; margin-bottom: clamp(28px, 4vw, 44px); }
.bidx__eyebrow, .bcard__eyebrow, .bsign__eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #9A5508;
}
.bidx__title {
  margin-top: 10px; font-family: var(--font-head); font-weight: var(--head-weight);
  font-size: clamp(2.6rem, 1.5rem + 3.4vw, 4.4rem); line-height: 1.02; letter-spacing: -0.035em;
}
.bidx__lede { margin-top: 16px; font-size: clamp(17px, 1rem + 0.3vw, 19px); line-height: 1.55; color: var(--ink-2); }

.bidx__tools { display: grid; gap: 16px; }
.bidx__search { position: relative; display: flex; align-items: center; max-width: 640px; }
.bidx__search > svg { position: absolute; left: 20px; width: 20px; height: 20px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.bidx__search input {
  width: 100%; height: 58px; padding: 0 56px 0 52px; border: 1px solid var(--line); border-radius: 999px;
  font: 400 17px/1 var(--font-body); color: var(--ink); background: var(--surface);
  box-shadow: 0 10px 30px -24px rgb(var(--shadow) / 0.5);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bidx__search input::placeholder { color: color-mix(in srgb, var(--ink-2) 80%, transparent); }
.bidx__search input:focus { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 4px rgb(242 137 27 / 0.18); }
.bidx__search input::-webkit-search-cancel-button { display: none; }
.bidx__kbd, .bidx__clear { position: absolute; right: 16px; }
.bidx__kbd {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line);
  font: 500 13px/1 ui-monospace, Menlo, Consolas, monospace; color: var(--ink-2); background: var(--paper);
}
.bidx__clear { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--steel); cursor: pointer; }
.bidx__clear svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.bidx__clear:hover { background: var(--line); }

.bidx__topics { display: flex; flex-wrap: wrap; gap: 8px; }
.bidx__topic {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: 500 15px/1 var(--font-body); cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease-out;
}
.bidx__topic span { min-width: 22px; padding: 3px 6px; border-radius: 999px; font-size: 12.5px; font-variant-numeric: tabular-nums; background: var(--paper); color: var(--ink-2); }
.bidx__topic:hover { border-color: var(--ink-2); }
.bidx__topic:active { transform: scale(0.97); }
.bidx__topic[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.bidx__topic[aria-pressed="true"] span { background: rgb(255 255 255 / 0.16); color: #FFFFFF; }
.bidx__topic:focus-visible, .bcard:focus-visible, .toc a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.bidx__count { min-height: 1.5em; margin: 20px 0 12px; font-size: 15px; color: var(--ink-2); }

/* cards: the whole card is the link */
.bcard {
  position: relative; display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 28px;
  border-radius: 22px; background: var(--surface); color: var(--ink); text-decoration: none;
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow 0.25s var(--ease, ease), transform 0.25s var(--ease, ease);
}
.bcard:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--line) 60%, var(--ink-2)), 0 24px 48px -32px rgb(var(--shadow) / 0.45); transform: translateY(-2px); }
.bcard__title { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 21px; line-height: 1.25; letter-spacing: -0.015em; text-wrap: balance; }
.bcard__desc { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bcard__meta { display: flex; flex-wrap: wrap; gap: 0 8px; margin-top: auto; padding-top: 8px; font-size: 14px; color: var(--ink-2); }
.bcard mark { padding: 0 2px; border-radius: 3px; background: rgb(242 137 27 / 0.24); color: inherit; }
@media (prefers-reduced-motion: reduce) { .bcard, .bcard:hover { transition: none; transform: none; } }

/* the newest post, wide, until someone searches or filters */
.bcard--lead {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; gap: 14px clamp(32px, 5vw, 72px);
  margin-bottom: 16px; padding: clamp(28px, 4vw, 52px);
  background: radial-gradient(120% 140% at 0% 0%, #FFFFFF 40%, var(--warm) 100%);
}
.bcard--lead .bcard__eyebrow { grid-column: 1 / -1; display: flex; gap: 8px; }
.bcard--lead .bcard__title { grid-column: 1; grid-row: 2 / span 3; align-self: start; font-size: clamp(1.9rem, 1.2rem + 1.8vw, 2.9rem); line-height: 1.08; letter-spacing: -0.03em; }
.bcard--lead .bcard__desc { grid-column: 2; grid-row: 2; font-size: 17px; -webkit-line-clamp: 5; }
.bcard--lead .bcard__meta { grid-column: 2; grid-row: 3; margin-top: 0; align-self: start; }
.bcard__go { grid-column: 2; grid-row: 4; display: inline-flex; align-items: center; gap: 8px; justify-self: start; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; background: var(--btn); color: var(--on-btn); }
.bcard__go span { transition: translate 0.2s var(--ease, ease); }
.bcard--lead:hover .bcard__go span { translate: 3px 0; }

.bidx__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0; list-style: none; }
.bidx__empty { display: grid; justify-items: start; gap: 8px; padding: clamp(32px, 5vw, 56px); border-radius: 22px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: var(--ink-2); }
.bidx__empty-title { font-size: 22px; font-weight: 500; color: var(--ink); }
.bidx__empty .btn { margin-top: 12px; border-radius: 999px; }

@media (max-width: 1000px) { .bidx__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .bcard--lead { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .bcard--lead > * { grid-column: 1 !important; grid-row: auto !important; }
}
@media (max-width: 640px) {
  .bidx__grid { grid-template-columns: minmax(0, 1fr); }
  .bidx__topics { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter); scrollbar-width: none; }
  .bidx__topic { flex: none; }
  .bidx__kbd { display: none; }
}

/* ---------- Signup (src/app/blog/signup.tsx): Cole's first name and email capture ---------- */
.bsign {
  margin-top: clamp(48px, 6vw, 80px); padding: clamp(28px, 4vw, 48px); border-radius: 24px;
  background: var(--warm); box-shadow: 0 0 0 1px rgb(var(--shadow) / 0.06);
}
.bsign__title { max-width: 26em; margin-top: 10px; font-family: var(--font-head); font-weight: var(--head-weight); font-size: clamp(1.4rem, 1rem + 1vw, 1.9rem); line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
.bsign__form { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 10px; margin-top: 24px; }
.bsign__form input:not(.news__hp) {
  height: 54px; padding: 0 18px; border: 1px solid var(--line); border-radius: 14px;
  font: 400 16px/1 var(--font-body); color: var(--ink); background: var(--surface);
}
.bsign__form input::placeholder { color: var(--ink-2); }
.bsign__form input:focus { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 4px rgb(242 137 27 / 0.18); }
.bsign__btn.btn--call { width: auto; min-height: 54px; margin: 0; padding: 0 28px; border-radius: 14px; font-size: 16px; }
.bsign__btn:disabled { opacity: 0.6; cursor: default; }
.bsign__error { grid-column: 1 / -1; font-size: 14px; color: #B3261E; }
.bsign__error:empty { display: none; }
.bsign__done { margin-top: 20px; font-size: 17px; font-weight: 500; }
.bsign__form .ts-box { grid-column: 1 / -1; }
@media (max-width: 700px) { .bsign__form { grid-template-columns: minmax(0, 1fr); } .bsign__btn.btn--call { width: 100%; } }

/* ---------- Post ---------- */
.bpost__progress { display: none; }
@supports (animation-timeline: scroll()) {
  .bpost__progress {
    display: block; position: fixed; inset: 0 0 auto; z-index: 60; height: 3px; background: var(--signal);
    transform-origin: 0 50%; animation: bpost-progress linear both; animation-timeline: scroll(root);
  }
}
@keyframes bpost-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.bpost__crumbs { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.bpost__crumbs a { color: var(--ink-2); text-decoration: none; }
.bpost__crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.bpost__crumbs svg { width: 16px; height: 16px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bpost__head { max-width: 50em; margin: 20px 0 clamp(36px, 5vw, 56px); }
.bpost__title { font-family: var(--font-head); font-weight: var(--head-weight); font-size: clamp(2.3rem, 1.4rem + 2.8vw, 3.8rem); line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
.bpost__lede { max-width: 40em; margin-top: 18px; font-size: clamp(18px, 1rem + 0.4vw, 20px); line-height: 1.55; color: var(--ink-2); }
.bpost__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 24px; font-size: 15px; color: var(--ink-2); }
.bpost__meta strong { font-weight: 600; color: var(--ink); }
.bpost__avatar, .bauthor__icon { display: grid; place-items: center; flex: none; border-radius: 50%; font-weight: 600; color: var(--on-btn); background: var(--btn); }
.bpost__avatar { width: 34px; height: 34px; font-size: 15px; }

.bpost__grid { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: clamp(40px, 5vw, 80px); align-items: start; }
.bpost__aside { position: sticky; top: 96px; }
.bpost__main { min-width: 0; }

/* contents (src/app/blog/[slug]/toc.tsx) */
.toc__title { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.toc--side .toc__title { margin-bottom: 14px; }
.toc__list { max-height: calc(100vh - 160px); overflow-y: auto; padding: 0; list-style: none; border-left: 1px solid var(--line); scrollbar-width: thin; }
.toc__list a {
  position: relative; display: block; padding: 7px 0 7px 16px; font-size: 14.5px; line-height: 1.4; color: var(--ink-2); text-decoration: none;
  transition: color 0.2s ease;
}
.toc__list a::before {
  content: ""; position: absolute; left: -1px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--signal);
  transform: scaleY(0); transition: transform 0.25s var(--ease, ease);
}
.toc__list a:hover { color: var(--ink); }
.toc__list a[aria-current="location"] { color: var(--ink); font-weight: 500; }
.toc__list a[aria-current="location"]::before { transform: scaleY(1); }
.toc--fold { display: none; }
@media (prefers-reduced-motion: reduce) { .toc__list a, .toc__list a::before { transition: none; } }

@media (max-width: 1080px) {
  .bpost__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .bpost__main { max-width: 720px; }
  .bpost__aside { position: sticky; top: 84px; z-index: 20; /* just under the floating nav pill (12px down, 64px tall) */ margin-inline: calc(-1 * var(--gutter)); margin-bottom: 28px; }
  .toc--side { display: none; }
  .toc--fold {
    position: relative; display: block; padding: 0 var(--gutter);
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    -webkit-backdrop-filter: saturate(140%) blur(12px); backdrop-filter: saturate(140%) blur(12px);
    border-block: 1px solid var(--line);
  }
  .toc--fold summary { display: flex; align-items: center; gap: 12px; min-height: 52px; list-style: none; cursor: pointer; }
  .toc--fold summary::-webkit-details-marker { display: none; }
  .toc--fold .toc__now { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 500; }
  .toc--fold summary svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: rotate 0.25s var(--ease, ease); }
  .toc--fold[open] summary svg { rotate: 180deg; }
  /* the open list floats over the article, so opening it never moves the page; it fades and slides in */
  .toc--fold nav {
    position: absolute; left: 0; right: 0; top: 100%; padding: 6px var(--gutter) 16px;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgb(var(--shadow) / 0.35);
    transition: opacity 0.2s ease, translate 0.25s var(--ease, ease);
  }
  @starting-style { .toc--fold[open] nav { opacity: 0; translate: 0 -6px; } }
  .toc--fold .toc__list { max-height: 55vh; }
}

/* Cole's post body, as he wrote it */
.prose { font-size: 18px; line-height: 1.7; color: color-mix(in srgb, var(--ink) 88%, var(--ink-2)); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.1em; font-family: var(--font-head); font-weight: var(--head-weight); font-size: clamp(1.6rem, 1.2rem + 1vw, 2rem); line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); }
.prose h3 { margin-top: 1.8em; font-size: 1.25rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; color: var(--ink); }
.prose h4 { margin-top: 1.6em; font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.6em; }
.prose > :first-child { margin-top: 0; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: text-decoration-color 0.15s ease; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose :is(ul, ol) { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--signal); }
.prose ol li::marker { font-weight: 600; }
.prose code { padding: 0.12em 0.4em; border-radius: 6px; font: 0.88em/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; background: var(--steel); }
.prose .callout { padding: 22px 26px; border-radius: 18px; background: var(--warm); border-left: 3px solid var(--signal); }
.prose .callout > * + * { margin-top: 0.8em; }
.prose .formula {
  padding: 18px 22px; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line);
  font: 15px/1.6 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; overflow-wrap: anywhere;
}
.prose .post-video { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; background: var(--band); box-shadow: 0 24px 48px -32px rgb(var(--shadow) / 0.55); }
.prose .post-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose figure img, .prose > img { display: block; width: 100%; height: auto; border-radius: 18px; }
.prose figcaption { margin-top: 10px; font-size: 14.5px; color: var(--ink-2); }
/* the course posts' price box */
.prose .cta-box { padding: clamp(26px, 4vw, 40px); border-radius: 22px; background: var(--band); color: var(--on-ink); }
.prose .cta-box h2 { margin-top: 0; color: #FFFFFF; }
.prose .cta-box .price { font-size: 1.15rem; font-weight: 600; color: #FFFFFF; }
.prose .cta-box li::marker { color: var(--signal); }
.prose .cta-box strong { color: #FFFFFF; }
.prose .btn { margin-top: 1.1em; min-height: 52px; padding: 0 24px; border-radius: 999px; background: var(--btn); color: var(--on-btn); text-decoration: none; }
.prose .btn:hover { background: color-mix(in srgb, var(--btn) 86%, var(--paper)); }
.prose .btn-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.prose .cta-box .btn-outline { color: #FFFFFF; box-shadow: inset 0 0 0 1px var(--line-on-ink); }

/* Cole's author card */
.bauthor { display: flex; gap: 18px; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.bauthor__icon { width: 52px; height: 52px; font-size: 20px; }
.bauthor__name { font-size: 18px; font-weight: 600; }
.bauthor p { margin-top: 6px; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.bauthor a { color: var(--ink); text-underline-offset: 3px; }

/* three more guides */
.bmore { margin-top: var(--section-space); }
.bmore__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.bmore__title { font-family: var(--font-head); font-weight: var(--head-weight); font-size: clamp(1.8rem, 1.3rem + 1.4vw, 2.6rem); letter-spacing: -0.025em; }
.bmore__all { display: inline-flex; gap: 8px; font-weight: 600; color: var(--ink); text-decoration: none; }
.bmore__all:hover { text-decoration: underline; text-underline-offset: 3px; }

/* on narrow screens a heading jumped to lands below the nav and the folded contents bar, not under them */
@media (max-width: 1080px) { html:has(.bpost) { scroll-padding-top: 152px; } }
