/* The blog: its front page (blog/index.php) and the article template (inc/blog/article.php).
   Tokens and shared components live in landing.css. */

/* Category labels, on cards and rows */
.lp .b-card-cat {
  display: inline-block;
  width: fit-content;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--blush);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--magenta);
}

/* ---------- Front page ---------- */

.lp .b-index-hero { padding-bottom: 72px; }

.lp .b-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }

.lp .b-cats a {
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.2s;
}

.lp .b-cats a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.lp .b-cats a[aria-current] { background: var(--magenta); box-shadow: none; }

.lp .b-empty { padding: 24px 0; text-align: center; font-size: 1.08rem; color: var(--mute); }

/* The newest article, printed large */
.lp .b-featured-wrap { margin-bottom: 44px; }

.lp .b-featured {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 42px 46px calc(38px + var(--zz));
  color: var(--ink);
  text-decoration: none;
}

.lp .b-featured:hover { color: var(--ink); }

.lp .b-featured-stamp {
  position: absolute;
  top: 30px;
  inset-inline-end: 34px;
  padding: 5px 12px 2px;
  border: 2px solid var(--magenta);
  border-radius: 6px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--magenta);
  opacity: 0.9;
  transform: rotate(-6deg);
}

.lp .b-featured-title {
  max-width: 16em;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 0.98;
}

.lp .b-featured:hover .b-featured-title { color: var(--magenta); }
.lp .b-featured-text { max-width: 44em; font-size: 1.08rem; color: var(--mute); }
.lp .b-featured-meta { margin-top: 6px; font-size: 0.9rem; font-weight: 700; color: var(--magenta); }

/* The other articles, one row each, dated like a log */
.lp .b-list > li { border-bottom: 1px dashed var(--rule); }
.lp .b-list > li:first-child { border-top: 2px solid var(--ink); }

.lp .b-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 0;
  color: var(--ink);
  text-decoration: none;
}

.lp .b-row:hover { color: var(--ink); }

.lp .b-row-date { font-size: 0.85rem; color: var(--mute); }

.lp .b-row-date b {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 3.4rem;
  line-height: 0.9;
  color: var(--magenta);
}

.lp .b-row-body { display: grid; gap: 8px; }

.lp .b-row-body strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1;
  transition: color 0.2s;
}

.lp .b-row:hover strong { color: var(--magenta); }
.lp .b-row-text { max-width: 46em; color: var(--mute); }

.lp .b-pages { display: flex; justify-content: center; gap: 8px; margin-top: 36px; }

.lp .b-pages a {
  display: grid;
  min-width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--rule);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.lp .b-pages a[aria-current] { background: var(--ink); box-shadow: none; color: #fff; }
.lp .b-pages[hidden] { display: none; }

/* More articles: js/blog.js loads the next page into the list as the reader reaches its end */
.lp .b-more-wrap { display: flex; justify-content: center; margin-top: 36px; }
.lp .b-more.is-busy { opacity: 0.6; pointer-events: none; }
.lp .b-list > li.is-new { animation: b-rise 0.5s ease-out both; }

@keyframes b-rise {
  from { opacity: 0; transform: translateY(14px); }
}

@media (prefers-reduced-motion: reduce) {
  .lp .b-list > li.is-new { animation: none; }
}

/* ---------- Article ---------- */

/* Reading progress, along the top of the window */
.lp .b-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10001;
  height: 3px;
  pointer-events: none;
}

.lp .b-progress span {
  display: block;
  height: 100%;
  background: var(--magenta);
  transform: scaleX(0);
  transform-origin: right center;
}

.lp .b-hero { padding: 140px 0 72px; }
.lp .b-hero-in { max-width: 920px; }

.lp .b-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.9rem; color: rgba(255, 255, 255, 0.5); }
.lp .b-crumbs a { font-weight: 700; color: var(--rose); text-decoration: none; }
.lp .b-crumbs a:hover { color: #fff; }

.lp .b-title {
  max-width: 18em;
  margin-top: 18px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 0.98;
  color: #fff;
}

.lp .b-lead { max-width: 40em; margin-top: 22px; font-size: 1.2rem; color: rgba(255, 255, 255, 0.82); }

.lp .b-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; }
.lp .b-meta li { font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); }
.lp .b-meta i { margin-inline-end: 4px; color: var(--rose); }

.lp .b-scheduled {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(242, 179, 207, 0.15);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rose);
}

.lp .b-main { padding: 64px 0 96px; }

.lp .b-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 72px;
  align-items: start;
}

.lp .b-article { max-width: 760px; }

/* The short version, before the article */
.lp .b-takeaways { padding: 22px 26px; border-radius: 16px; background: var(--blush); }

.lp .b-takeaways-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--magenta);
}

.lp .b-takeaways li { position: relative; margin-top: 10px; padding-inline-start: 26px; line-height: 1.7; }

.lp .b-takeaways li::before {
  content: '\f00c';
  position: absolute;
  top: 0.15em;
  inset-inline-start: 0;
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--magenta);
}

/* The article's text */
.lp .b-prose { margin-top: 36px; }

.lp .b-prose h2,
.lp .b-faq h2 {
  margin-top: 56px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--ink);
  scroll-margin-top: 100px;
}

.lp .b-prose > h2:first-child { margin-top: 0; }
.lp .b-prose h3 { margin-top: 32px; font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.lp .b-prose p { margin-top: 14px; font-size: 1.08rem; line-height: 1.9; color: #3a2a3d; }
.lp .b-prose strong { color: var(--ink); }
.lp .b-prose a { font-weight: 600; color: var(--magenta); text-decoration: underline; text-underline-offset: 3px; }

.lp .b-prose ul,
.lp .b-prose ol { margin-top: 14px; }

.lp .b-prose ul > li,
.lp .b-prose ol > li {
  position: relative;
  margin-top: 10px;
  padding-inline-start: 28px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #3a2a3d;
}

.lp .b-prose ul > li::before {
  content: '';
  position: absolute;
  top: 0.78em;
  inset-inline-start: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--magenta);
}

.lp .b-prose ol { counter-reset: b-step; }
.lp .b-prose ol > li { counter-increment: b-step; padding-inline-start: 36px; }

.lp .b-prose ol > li::before {
  content: counter(b-step);
  position: absolute;
  top: -0.05em;
  inset-inline-start: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--magenta);
}

/* Commands and code run left to right, in a monospace face, on a dark sheet */
.lp .b-prose code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--blush);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--ink);
  direction: ltr;
  unicode-bidi: isolate;
}

.lp .b-prose pre {
  margin-top: 18px;
  padding: 18px 20px;
  overflow-x: auto;
  border-radius: 14px;
  background: var(--plum-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #f7eef2;
  direction: ltr;
  text-align: left;
}

.lp .b-prose pre code { padding: 0; background: none; font-size: inherit; color: inherit; }

.lp .b-prose blockquote {
  margin-top: 22px;
  padding-inline-start: 20px;
  border-inline-start: 4px solid var(--magenta);
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--ink);
}

/* Notes and warnings inside the text */
.lp .b-prose .b-note,
.lp .b-prose .b-warn {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: 14px;
  border-inline-start: 4px solid var(--magenta);
  background: var(--blush);
}

.lp .b-prose .b-warn { border-color: #c98a00; background: #fdf3dc; }
.lp .b-prose .b-note p:first-child,
.lp .b-prose .b-warn p:first-child { margin-top: 0; }

/* Tables: wrapped in div.b-table so they scroll on phones */
.lp .b-prose .b-table { margin-top: 20px; overflow-x: auto; }
.lp .b-prose table { width: 100%; border-collapse: collapse; }

.lp .b-prose th {
  padding: 10px 12px;
  border-bottom: 2px solid var(--ink);
  font-size: 0.88rem;
  color: var(--mute);
  text-align: right;
  white-space: nowrap;
}

.lp .b-prose td { padding: 12px; border-bottom: 1px dashed var(--rule); font-size: 0.98rem; vertical-align: top; }

.lp .b-faq { margin-top: 56px; }
.lp .b-faq .w-faq-list { margin-top: 20px; }

.lp .b-author {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 52px;
  padding-top: 26px;
  border-top: 2px dashed var(--rule);
}

.lp .b-author-mark {
  display: grid;
  flex: none;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  background: var(--plum);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--rose);
}

.lp .b-author p { font-size: 0.95rem; color: var(--mute); }
.lp .b-author strong { display: block; margin-bottom: 2px; font-size: 1.02rem; color: var(--ink); }

/* Beside the article: the contents and the service */
.lp .b-side { display: grid; gap: 20px; }

.lp .b-toc {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}

.lp .b-toc summary {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}

.lp .b-toc summary::-webkit-details-marker { display: none; }

.lp .b-toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lp .b-toc summary::after {
  content: '\f078';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 0.8rem;
  color: var(--mute);
  transition: transform 0.2s;
}

.lp .b-toc[open] summary::after { transform: rotate(180deg); }
.lp .b-toc ol { margin-top: 10px; counter-reset: b-toc; }
.lp .b-toc li { counter-increment: b-toc; }

.lp .b-toc a {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--mute);
  text-decoration: none;
}

.lp .b-toc a::before { content: counter(b-toc); flex: none; width: 1.2em; font-weight: 700; color: var(--rule); }
.lp .b-toc a:hover,
.lp .b-toc a.is-active { color: var(--ink); }
.lp .b-toc a.is-active::before { color: var(--magenta); }

.lp .b-service { padding: 22px; border-radius: 16px; background: var(--plum); color: #fff; }
.lp .b-service-kicker { font-size: 0.82rem; font-weight: 700; color: var(--rose); }

.lp .b-service-name {
  margin-top: 6px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
}

.lp .b-service p:not([class]) { margin-top: 8px; font-size: 0.92rem; color: rgba(255, 255, 255, 0.78); }
.lp .b-service .w-btn { width: 100%; margin-top: 16px; }

/* More from the blog */
.lp .b-related-title { margin-bottom: 28px; }

.lp .b-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.lp .b-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 24px;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow 0.2s;
}

.lp .b-card:hover { box-shadow: inset 0 0 0 2px var(--magenta); color: var(--ink); }
.lp .b-card strong { font-family: var(--display); font-weight: 700; font-size: 1.9rem; line-height: 1; }
.lp .b-card-text { font-size: 0.92rem; color: var(--mute); }
.lp .b-card-date { margin-top: auto; padding-top: 6px; font-size: 0.82rem; color: var(--mute); }

@media (max-width: 1000px) {
  .lp .b-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .lp .b-side { order: -1; }
  .lp .b-service { display: none; }
  .lp .b-cards { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .lp .b-featured { padding: 30px 20px calc(26px + var(--zz)); }
  .lp .b-featured-stamp { position: static; justify-self: start; margin-bottom: 4px; }
  .lp .b-row { grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 22px 0; }
  .lp .b-row-date b { font-size: 2.6rem; }
  .lp .b-row-body strong { font-size: 1.8rem; }
  .lp .b-hero { padding: 120px 0 56px; }
  .lp .b-main { padding: 40px 0 72px; }
  .lp .b-prose h2,
  .lp .b-faq h2 { font-size: 2.15rem; }
  .lp .b-takeaways { padding: 18px 20px; }
}
