/* =========================================================================
   Ledgerstone blog — index and post (rework, Nov 2026).

   Built on the homepage's atoms (ls-wrap, ls-h1/h2, ls-lead, ls-body,
   ls-eyebrow, ls-btn, ls-band, ls-section) so a visitor who clicks Blog in
   the header does not feel the floor change. Tokens only; a raw hex in a
   component is a bug. Mobile-first, one breakpoint at 720px and the grid's
   own at 960px.
   ========================================================================= */

/* Atoms the blog needs that marketing.css defines for the homepage only.
   Duplicated here rather than loading marketing.css (345 lines of carousel
   and pricing) on every post. */
.ls-section { padding-block: var(--section-y); }
.ls-section--compact { padding-block: var(--section-y-compact); }
.ls-band { background: var(--ground); border-block: 1px solid var(--rule-on-ground); }
.ls-band--top { border-bottom: 0; }
.ls-h1 {
  font: 600 var(--fs-h1)/1.06 var(--font-ui); letter-spacing: -.035em;
  margin: 20px 0 0; text-wrap: balance; color: var(--ink);
}
.ls-h2 {
  font: 600 var(--fs-h2)/1.1 var(--font-ui); letter-spacing: -.03em;
  margin: 0; text-wrap: balance; color: var(--ink);
}
.ls-h2--compact { font-size: var(--fs-h2-compact); }
.ls-lead { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.ls-body { font-size: 16px; line-height: 1.55; color: var(--text-2); }
.ls-tick { color: var(--ink); flex: none; }
.ls-subscribe__ok .ls-tick { color: var(--success-text); }

/* --- Index: head ------------------------------------------------------------ */
.ls-blog-head { padding-top: clamp(40px, 8vw, 72px); padding-bottom: clamp(28px, 5vw, 44px); }
.ls-blog-head .ls-h1 { max-width: 760px; font-size: clamp(32px, 4.4vw, 48px); }
.ls-blog-head__lead { max-width: 640px; margin: 18px 0 0; }
/* Topic chips. One swipeable row on phones instead of four wrapped lines. */
.ls-blog-jump {
  display: flex; gap: 8px; margin-top: 26px; font: 500 14px var(--font-ui);
  overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
}
.ls-blog-jump::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .ls-blog-jump { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; } }
.ls-blog-jump a {
  flex: none; color: var(--text-2); text-decoration: none; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); white-space: nowrap;
}
.ls-blog-jump a:hover { color: var(--ink); border-color: var(--border-input); }

/* Latest: four newest posts as a compact list, so new and updated posts surface. */
.ls-blog-latest { padding-bottom: clamp(32px, 6vw, 48px); }
.ls-blog-latest__h {
  font: 600 11.5px/1.4 var(--font-ui); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 8px;
}
.ls-blog-latest__list { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--border); }
@media (min-width: 960px) { .ls-blog-latest__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; } }
.ls-blog-latest__item {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 16px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.ls-blog-latest__item a { font: 600 16px/1.35 var(--font-ui); color: var(--ink); text-decoration: none; }
.ls-blog-latest__item a:hover { color: var(--primary); }
.ls-blog-latest__meta { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* --- Index: featured band and topic sections ------------------------------------ */
.ls-blog-featured .ls-h2 { margin-bottom: 28px; }
.ls-blog-topic + .ls-blog-topic .ls-section, .ls-blog-topic--ruled .ls-section { border-top: 1px solid var(--border); }
.ls-blog-topic .ls-section { padding-block: clamp(40px, 7vw, 64px); }
.ls-blog-topic__head { margin-bottom: 24px; }
.ls-blog-topic__lede { max-width: 620px; margin: 10px 0 0; }

.ls-blog-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .ls-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 960px) { .ls-blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* The card: the homepage's form card, lighter. Whole card is the link target
   (the title link is stretched), text stays selectable where it is not. */
.ls-postcard {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--panel-border); border-radius: var(--r-card);
  box-shadow: var(--shadow-panel); padding: 22px 22px 20px; transition: background-color .15s ease;
}
/* App F4: no hover lift — the row-hover inset instead. */
.ls-postcard:hover { background: var(--surface-inset); }
.ls-postcard--featured { padding: 26px 24px 22px; }
.ls-postcard--hub { border-left: 3px solid var(--decorative); }
.ls-postcard__topic {
  font: 500 12px/1.4 var(--font-ui); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0;
}
.ls-postcard__title { font: 600 19px/1.25 var(--font-ui); letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.ls-postcard--featured .ls-postcard__title { font-size: 21px; }
.ls-postcard__title a { color: var(--ink); text-decoration: none; }
.ls-postcard__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ls-postcard__blurb { font-size: 15px; line-height: 1.5; color: var(--text-2); margin: 0; }
.ls-postcard__meta { font-size: 13px; color: var(--muted); margin: auto 0 0; padding-top: 6px; }

.ls-blog-foot { display: grid; gap: 24px; align-items: end; }
@media (min-width: 720px) { .ls-blog-foot { grid-template-columns: minmax(0, 1fr) auto; } }
.ls-blog-foot__lede { max-width: 520px; margin: 12px 0 20px; }
.ls-blog-foot__feeds { font-size: 14px; color: var(--muted); margin: 0; }

/* --- Post: layout --------------------------------------------------------------
   One column on phones and tablets. From 1080px the article sits on the
   header's own left edge (the 1200px ls-wrap) with a sticky sidebar beside
   it, so the page no longer floats as a narrow column in a wide gutter. */
.ls-post__grid { display: block; }
.ls-post__main { max-width: 760px; min-width: 0; }
.ls-post__side { display: none; }
@media (min-width: 1080px) {
  .ls-post__grid {
    display: grid; grid-template-columns: minmax(0, 760px) 272px;
    justify-content: space-between; gap: 56px;
  }
  .ls-post__side { display: block; padding-top: clamp(32px, 6vw, 56px); }
  .ls-toc--inline { display: none; }
}
.ls-post__sticky { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }

.ls-sidetoc { padding: 4px 0 4px; }
.ls-sidetoc__label, .ls-sidecard__eyebrow {
  font: 600 11.5px/1.4 var(--font-ui); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px;
}
.ls-sidetoc__list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.ls-sidetoc__list a {
  display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent;
  font-size: 14px; line-height: 1.4; color: var(--text-2); text-decoration: none;
}
.ls-sidetoc__list a:hover { color: var(--ink); }
.ls-sidetoc__list a[aria-current="true"] { color: var(--ink); font-weight: 600; border-left-color: var(--accent); }

.ls-sidecard {
  padding: 16px 18px; background: var(--surface-alt);
  border: 1px solid var(--border); border-radius: var(--r-item);
}
.ls-sidecard__eyebrow { color: var(--primary); margin-bottom: 6px; }
.ls-sidecard__title { font: 600 16px/1.3 var(--font-ui); color: var(--ink); margin: 0 0 4px; }
.ls-sidecard__text { font-size: 14px; line-height: 1.5; color: var(--text-2); margin: 0 0 10px; }
.ls-sidecard__link { font: 500 14px var(--font-ui); color: var(--primary); text-decoration: none; }
.ls-sidecard__link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --- Post: head --------------------------------------------------------------- */
.ls-post__head { padding-top: clamp(32px, 6vw, 56px); padding-bottom: clamp(24px, 4vw, 40px); }
.ls-post__byline { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.ls-post__avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-tint); color: var(--primary-hover); font: 600 16px var(--font-ui);
}
.ls-post__byline .ls-post__meta { margin: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.4; }
.ls-post__by { color: var(--text-2); }
.ls-post__crumb { font-size: 14px; color: var(--muted); }
.ls-post__crumb a { color: var(--muted); text-decoration: none; }
.ls-post__crumb a:hover { color: var(--ink); }
.ls-post__title { font-size: clamp(30px, 4.2vw, 44px); margin-top: 14px; }
.ls-post__lead { margin: 16px 0 0; }
.ls-post__meta { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.ls-post__meta a { color: var(--ink); text-decoration: none; font-weight: 500; }
.ls-post__meta a:hover { text-decoration: underline; }

/* "In short": the quotable answer, on the warm ground with a bronze rule. */
.ls-inshort {
  margin: 28px 0 0; padding: 18px 20px 16px; background: var(--ground);
  border: 1px solid var(--rule-on-ground); border-left: 3px solid var(--decorative); border-radius: var(--r-item);
}
.ls-inshort__label {
  font: 500 12px/1.4 var(--font-ui); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 8px;
}
.ls-inshort__list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.ls-inshort__list li { font-size: 16px; line-height: 1.5; color: var(--ink); }
.ls-post__note { font-size: 13.5px; line-height: 1.5; color: var(--muted); margin: 14px 0 0; }

/* Phones and tablets: a collapsed jump list, one tap to open. */
.ls-toc.ls-toc--inline { margin: 24px 0 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r-item); background: var(--surface); }
.ls-toc__label {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer;
  padding: 14px 16px; list-style: none;
  font: 600 11.5px/1.4 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0;
}
.ls-toc__label::-webkit-details-marker { display: none; }
.ls-toc__label::after { content: "+"; font: 400 20px/1 var(--font-ui); color: var(--primary); }
.ls-toc[open] .ls-toc__label::after { content: "−"; }
.ls-toc__count { margin-left: auto; font: 400 13px var(--font-ui); letter-spacing: 0; text-transform: none; }
.ls-toc__list { margin: 0; padding: 0 16px 14px 36px; font-size: 15px; line-height: 1.5; }
.ls-toc__list li { padding: 2px 0; }
.ls-toc__list a { color: var(--text-2); text-decoration: none; }
.ls-toc__list a:hover { color: var(--primary); }

/* --- Post: body ---------------------------------------------------------------- */
.ls-post__body { padding-bottom: clamp(48px, 8vw, 80px); }
.ls-prose { max-width: 68ch; font-size: 17px; line-height: 1.65; color: var(--ink); }
.ls-prose p, .ls-prose li { color: var(--ink); }
.ls-prose p { margin: 0 0 1.15em; }
.ls-prose h2 {
  font: 600 clamp(22px, 2.6vw, 26px)/1.2 var(--font-ui); letter-spacing: -.025em;
  margin: 2.4em 0 .6em; color: var(--ink); scroll-margin-top: 84px;
}
.ls-prose h2:first-child { margin-top: 0; }
.ls-prose h3 { font: 600 18px/1.3 var(--font-ui); letter-spacing: -.015em; margin: 1.8em 0 .5em; color: var(--ink); }
.ls-prose ul, .ls-prose ol { padding-left: 1.3em; margin: 0 0 1.15em; }
.ls-prose li { margin: .3em 0; }
.ls-prose li::marker { color: var(--decorative); }
.ls-prose a { color: var(--primary); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent); text-underline-offset: 2px; }
.ls-prose a:hover { text-decoration-color: var(--primary); }
.ls-prose strong { color: var(--ink); font-weight: 600; }
.ls-prose blockquote {
  border-left: 3px solid var(--rule-on-ground); padding: 2px 0 2px 18px; margin: 1.5em 0; color: var(--text-2);
}
.ls-prose blockquote p { margin: 0; }
.ls-prose .table-responsive { margin: 1.2em 0 1.6em; border: 1px solid var(--border); border-radius: var(--r-control); }
.ls-prose .table-responsive[tabindex]:focus-visible { outline-offset: 2px; }
.ls-prose table { margin: 0; font-size: 15px; }
.ls-prose .ls-table thead th { background: var(--surface-inset); border-bottom: 1px solid var(--rule); padding: .6rem .75rem; }
.ls-prose .ls-table td { padding: .6rem .75rem; border-bottom: 1px solid var(--row-rule); vertical-align: top; color: var(--ink); }
.ls-prose .ls-table tbody tr:last-child td { border-bottom: 0; }
/* Figures in a cell are numbers: right-align and tabular. */
.ls-prose .ls-table td:not(:first-child) { font-variant-numeric: tabular-nums; }
@media (max-width: 719.98px) {
  .ls-prose { font-size: 16px; }
  .ls-prose .table-responsive { font-size: 14px; }
  .ls-prose .table-responsive table { min-width: 32rem; }
  /* Mobile first (Nov 2026): no sideways swiping. Two-column tables fit as
     they are; wider ones become one card per row, each value labelled with
     its column header (data-label, written by build_index.py). */
  .ls-prose .table-responsive table.ls-table--two { min-width: 0; }
  .ls-prose .table-responsive:has(.ls-table--stack) { border: 0; border-radius: 0; }
  .ls-prose .table-responsive table.ls-table--stack { min-width: 0; }
  .ls-prose .ls-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ls-prose .ls-table--stack tbody, .ls-prose .ls-table--stack tr, .ls-prose .ls-table--stack td { display: block; }
  .ls-prose .ls-table--stack tr { border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface); margin: 0 0 10px; padding: 4px 0; }
  .ls-prose .ls-table--stack td { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 12px; padding: .4rem .75rem; border-bottom: 0; }
  .ls-prose .ls-table--stack td::before { content: attr(data-label); color: var(--muted); font-size: 13px; }
  .ls-prose .ls-table--stack td:first-child { display: block; font-weight: 600; border-bottom: 1px solid var(--divider); padding-bottom: .5rem; margin-bottom: 2px; }
  .ls-prose .ls-table--stack td:first-child::before { content: none; }
  .ls-prose .ls-table--stack td:empty, .ls-prose .ls-table--stack td[data-label=""]:first-child:empty { display: none; }
}

.ls-postshot { margin: 2em 0; }
.ls-postshot picture { display: block; border: 1px solid var(--border); border-radius: var(--r-control); overflow: hidden; }
.ls-postshot img { width: 100%; height: auto; display: block; }
.ls-postshot figcaption { margin-top: .6rem; font-size: 13.5px; color: var(--muted); }
/* Step screenshots in the calculator guides are taken at phone width; on a
   wider screen they stay phone-sized rather than blowing up to the column. */
.ls-postshot--phone { max-width: 390px; margin-inline: auto; }
.ls-postshot--phone figcaption { text-align: center; }

/* A post that is also a free file: one button and one line, under the byline. */
.ls-download {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin: 1.4rem 0 0; padding: 16px 18px; background: var(--ground);
  border: 1px solid var(--rule-on-ground); border-radius: var(--r-item);
}
.ls-download .ls-btn { flex: 0 0 auto; }
.ls-download__note { margin: 0; flex: 1 1 260px; font-size: 14.5px; line-height: 1.45; color: var(--text-2); }
@media (max-width: 575.98px) { .ls-download .ls-btn { width: 100%; justify-content: center; } }

/* The one on-site ask at the first pause. Quiet: a line and a mist button. */
.ls-ask {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  margin: 2.2em 0; padding: 16px 20px; background: var(--ground);
  border: 1px solid var(--rule-on-ground); border-radius: var(--r-item);
}
.ls-ask__line { margin: 0; font-size: 15.5px; color: var(--text-2); }
/* The same box inside a post body (CTA: lines). Prose links are underlined;
   a button is not. */
.ls-prose .ls-ask .ls-btn--primary, .ls-prose .ls-ask .ls-btn--primary:hover { color: var(--surface); text-decoration: none; }
.ls-prose .ls-ask__line { margin: 0; font-size: 16px; color: var(--ink); flex: 1 1 280px; }
/* The end of a post with end_ctas: true. The buttons are the home hero's
   (.ls-hero__actions, brand.css). */
.ls-post__ctas { margin: 2.6em 0; padding-top: 1.6em; border-top: 1px solid var(--border); }
.ls-post__ctas-line { margin: 0; font: 600 20px/1.3 var(--font-ui); letter-spacing: -.015em; color: var(--ink); }
.ls-post__ctas .ls-hero__actions { margin-top: 16px; }

/* FAQ: definition list, one rule between items. */
.ls-post__faq { margin-top: 3em; }
.ls-post__faq h2 { font: 600 clamp(22px, 2.6vw, 26px)/1.2 var(--font-ui); letter-spacing: -.025em; margin: 0 0 .6em; }
.ls-faqlist { margin: 0; max-width: 68ch; }
.ls-faqlist__item { padding: 14px 0; border-top: 1px solid var(--border); }
.ls-faqlist__item:last-child { border-bottom: 1px solid var(--border); }
.ls-faqlist dt { font: 600 17px/1.35 var(--font-ui); color: var(--ink); margin: 0 0 6px; }
.ls-faqlist dd { margin: 0; font-size: 16px; line-height: 1.55; color: var(--text-2); }

.ls-post__strip { margin-top: 2.6em; padding-top: 1.4em; border-top: 1px solid var(--border); max-width: 68ch; }
.ls-gloss__strip { line-height: 1.9; margin: 0; font-size: 15.5px; }

/* Author block. */
.ls-author { margin-top: 2.6em; padding-top: 1.4em; border-top: 1px solid var(--border); max-width: 68ch; }
.ls-author__name { font: 600 16px var(--font-ui); color: var(--ink); margin: 0; }
.ls-author__role { font-size: 14px; color: var(--muted); margin: 2px 0 8px; }
.ls-author__bio { font-size: 15.5px; line-height: 1.55; color: var(--text-2); margin: 0; }

/* Subscribe: the homepage's form card, one row. The demo gets one sentence under it. */
.ls-subscribe {
  margin-top: 2.6em; padding: clamp(20px, 4vw, 28px);
  background: var(--ground); border: 1px solid var(--rule-on-ground); border-radius: var(--r-frame);
  max-width: 68ch;
}
.ls-subscribe__h { font: 600 22px/1.2 var(--font-ui); letter-spacing: -.02em; margin: 0; color: var(--ink); }
.ls-subscribe__lede { font-size: 15px; color: var(--text-2); margin: 6px 0 16px; }
.ls-subscribe__label { font: 600 14px var(--font-ui); color: var(--ink); display: block; margin-bottom: 6px; }
.ls-subscribe__row { display: flex; flex-direction: column; gap: 10px; }
/* In the stacked (column) layout flex: 1 collapsed the input to its text height. */
@media (min-width: 560px) { .ls-subscribe__row { flex-direction: row; } .ls-subscribe__row .ls-btn { flex: none; } }
.ls-subscribe__row .ls-input {
  height: 48px; width: 100%; min-width: 0; padding: 0 14px; flex: none;
  border: 1px solid var(--border-input); border-radius: var(--r-control);
  background: var(--surface); color: var(--ink); font: 16px var(--font-ui);
}
.ls-subscribe__row .ls-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--focus-halo); outline: none; }
.ls-subscribe__ok[hidden], [data-subscribe-ask][hidden] { display: none; }
.ls-subscribe__ok:focus { outline: none; }
.ls-subscribe__ok { display: flex; gap: 10px; align-items: center; font: 600 17px var(--font-ui); color: var(--ink); margin: 0; }
.ls-field__error { font: 500 13px var(--font-ui); color: var(--danger-text); margin: 8px 0 0; }
.hp-field { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); border: 0; }

/* Keep reading: cards with the post's one-line description, two up on wider screens. */
.ls-post__links { list-style: none; padding: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .ls-post__links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ls-post__links li { margin: 0; position: relative; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-item); background: var(--surface); }
.ls-post__links li:hover { border-color: var(--border-input); }
.ls-post__links a { font: 600 15.5px/1.3 var(--font-ui); color: var(--ink); text-decoration: none; }
.ls-post__links a::after { content: ""; position: absolute; inset: 0; }
.ls-post__links p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.ls-post__strip:has(.ls-post__links) { max-width: none; }

/* Tools for this topic: a row of compact links under the FAQ. */
.ls-post__tools { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ls-post__tools a {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--r-control);
  background: var(--mist); color: var(--ink); font: 500 14px var(--font-ui); text-decoration: none;
}
.ls-post__tools a:hover { background: var(--primary-tint); }

/* Blog index card dates. */
.ls-postcard__meta time { white-space: nowrap; }

/* After the base input rule so it wins: one row from 560px. */
@media (min-width: 560px) { .ls-subscribe__row .ls-input { flex: 1; } }
