/* =========================================================
   Blog: listing, cards and article (mobile first)
   ========================================================= */

/* ---------- Listing hero ---------- */
.bhero { padding: calc(var(--header-h) + 28px) 0 34px; background: var(--ivory); }
:is(body[data-page="blog"], body[data-page="legal"]) .header:not(.is-scrolled) { color: var(--ink); }
:is(body[data-page="blog"], body[data-page="legal"]) .header:not(.is-scrolled)::before { opacity: 0; }
:is(body[data-page="blog"], body[data-page="legal"]) .header:not(.is-scrolled) .icon-btn--search,
:is(body[data-page="blog"], body[data-page="legal"]) .header:not(.is-scrolled) .icon-btn--wa { border-color: var(--line); color: var(--ink); }
:is(body[data-page="blog"], body[data-page="legal"]) .header:not(.is-scrolled) .btn--ink { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.crumbs--ink { color: var(--ink-2); margin-bottom: 18px; }
.crumbs--ink a:hover, .crumbs--ink [aria-current] { color: var(--ink); }
.bhero__head { display: grid; gap: 8px; margin-bottom: 28px; }
.bhero__title { font-size: clamp(2.4rem, 9vw, 4.6rem); line-height: 1; letter-spacing: -.03em; font-weight: 600; max-width: 16ch; }
.bhero .lede { margin-top: 6px; }

.bfeature { display: grid; background: var(--white); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid rgba(23,20,20,.06); transition: box-shadow .5s var(--ease); }
.bfeature:hover { box-shadow: 0 30px 70px -40px rgba(23,20,20,.45); }
.bfeature[hidden] { display: none; }
.bfeature__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--mist); }
.bfeature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.bfeature:hover .bfeature__media img { transform: scale(1.03); }
.bfeature__body { padding: 20px; display: grid; gap: 10px; align-content: center; }
.bfeature__label { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--clay); font-weight: 600; }
.bfeature__title { font-size: 1.7rem; line-height: 1.08; letter-spacing: -.02em; font-weight: 600; }
.bfeature__excerpt { color: var(--ink-2); line-height: 1.55; }
.bfeature__cta { font-weight: 600; display: inline-flex; gap: 6px; margin-top: 4px; }
.bfeature__cta .arr { font-style: normal; transition: transform .4s var(--ease); }
.bfeature:hover .bfeature__cta .arr { transform: translateX(4px); }

/* ---------- Filters ---------- */
.bbar { position: sticky; top: var(--header-h); z-index: 4; background: rgba(247,242,237,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); transition: top .45s var(--ease); }
body.header-hidden .bbar { top: 0; }
.bbar__inner { display: grid; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.bcats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); }
.bcats::-webkit-scrollbar { display: none; }
.bcats .chip { flex: 0 0 auto; background: var(--white); white-space: nowrap; }
.bcats .chip i { font-style: normal; opacity: .55; margin-left: 3px; }
.bcats .chip.is-active { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.bsearch { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--ink-2); }
.bsearch input { border: 0; outline: none; background: transparent; font: inherit; color: var(--ink); width: 100%; }
.bsearch input::-webkit-search-cancel-button { -webkit-appearance: none; }
.bsearch:focus-within { border-color: var(--ink); }

/* ---------- Cards ---------- */
.blist { padding-top: 26px; padding-bottom: 90px; }
.blist__count { color: var(--ink-2); font-size: .9rem; margin-bottom: 16px; }
.bgrid { display: grid; gap: 18px; }
.bcard { position: relative; display: grid; grid-template-rows: auto 1fr; background: var(--white); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid rgba(23,20,20,.06); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.bcard:hover { transform: translateY(-4px); box-shadow: 0 26px 60px -38px rgba(23,20,20,.45); }
.bcard__link { position: absolute; inset: 0; z-index: 1; }
.bcard__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--mist); }
.bcard__media img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s var(--ease), transform 1s var(--ease); }
.bcard__media img.is-loaded { opacity: 1; }
.bcard:hover .bcard__media img { transform: scale(1.03); }
.bcard__body { padding: 16px 18px 18px; display: grid; gap: 8px; align-content: start; }
.bcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .74rem; color: var(--ink-2); }
.bcard__cat { font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--teal); }
.bcard__title { font-size: 1.22rem; line-height: 1.15; letter-spacing: -.015em; font-weight: 600; }
.bcard__excerpt { color: var(--ink-2); font-size: .9rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bcard__foot { font-size: .76rem; color: var(--ink-2); margin-top: 4px; }
.blist__more { display: flex; justify-content: center; margin-top: 30px; }
.bempty { background: var(--white); border-radius: var(--radius-lg); padding: 28px; display: grid; gap: 12px; justify-items: start; }
.bempty p { color: var(--ink-2); }

/* ---------- Article ---------- */
.aprogress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 120; pointer-events: none; }
.aprogress span { display: block; height: 100%; background: var(--clay); transform-origin: left; transform: scaleX(0); }
.ahero { position: relative; min-height: 78svh; display: flex; align-items: flex-end; color: var(--white); background: var(--ink); overflow: hidden; }
.ahero__media { position: absolute; inset: 0; }
.ahero__media img { width: 100%; height: 100%; object-fit: cover; }
.ahero__grade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(23,20,20,.45), rgba(23,20,20,.1) 35%, rgba(23,20,20,.88)); }
.ahero__content { position: relative; padding-top: calc(var(--header-h) + 30px); padding-bottom: 40px; display: grid; gap: 14px; }
.ahero__cats { display: flex; flex-wrap: wrap; gap: 6px; }
.ahero__cats .chip-region { color: var(--white); }
.ahero__title { font-size: clamp(2rem, 7.5vw, 4.2rem); line-height: 1.04; letter-spacing: -.03em; font-weight: 600; max-width: 22ch; }
.ahero__excerpt { font-size: 1.02rem; line-height: 1.5; color: rgba(255,255,255,.85); max-width: 60ch; }
.ahero__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .84rem; color: rgba(255,255,255,.8); padding-top: 12px; border-top: 1px solid rgba(255,255,255,.2); }
.ahero__meta b { color: var(--white); font-weight: 600; }

.abody { display: grid; gap: 28px; padding-top: 30px; padding-bottom: 60px; }
.atoc { position: sticky; top: calc(var(--header-h) + 8px); z-index: 3; margin: 0 calc(var(--gutter) * -1); transition: top .45s var(--ease); }
body.header-hidden .atoc { top: 8px; }
.atoc__inner { background: rgba(255,255,255,.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.atoc__toggle { width: 100%; display: flex; justify-content: space-between; padding: 12px var(--gutter); font-weight: 600; font-size: .9rem; }
.atoc__toggle span { font-weight: 400; color: var(--ink-2); margin-left: 4px; margin-right: auto; }
.atoc__toggle::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); margin-top: 3px; transition: transform .3s; }
.atoc.is-open .atoc__toggle::after { transform: rotate(-135deg); margin-top: 8px; }
.atoc__list { display: none; max-height: 55vh; overflow-y: auto; padding: 4px var(--gutter) 14px; counter-reset: toc; }
.atoc.is-open .atoc__list { display: grid; gap: 2px; }
.atoc__list a { display: block; padding: 7px 0 7px 26px; position: relative; font-size: .88rem; color: var(--ink-2); line-height: 1.35; counter-increment: toc; }
.atoc__list a::before { content: counter(toc, decimal-leading-zero); position: absolute; left: 0; top: 8px; font-size: .66rem; letter-spacing: .06em; color: var(--ink-2); opacity: .7; }
.atoc__list a:hover, .atoc__list a.is-active { color: var(--ink); }
.atoc__list a.is-active { font-weight: 600; }
.atoc__list a.is-active::before { color: var(--clay); opacity: 1; }

/* Article text */
.prose { font-size: 1.06rem; line-height: 1.75; color: #2a2626; max-width: 68ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.7rem; line-height: 1.15; letter-spacing: -.02em; font-weight: 600; color: var(--ink); margin-top: 2em; scroll-margin-top: calc(var(--header-h) + 70px); }
.prose h3 { font-size: 1.28rem; line-height: 1.25; letter-spacing: -.01em; font-weight: 600; color: var(--ink); margin-top: 1.7em; scroll-margin-top: calc(var(--header-h) + 70px); }
.prose h4 { font-size: 1.05rem; font-weight: 600; color: var(--ink); margin-top: 1.5em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .6em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--teal); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: .45em; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li::marker { color: var(--clay); }
.prose img { display: block; max-width: 100%; height: auto; border-radius: 16px; margin: 1.6em 0; }
.prose blockquote { margin: 1.6em 0; padding: 18px 20px; border-radius: 16px; background: var(--white); border-left: 3px solid var(--sand); font-size: 1rem; }
.prose blockquote > * + * { margin-top: .6em; }
.prose-table { overflow-x: auto; margin: 1.6em 0; border-radius: 16px; border: 1px solid var(--line); background: var(--white); }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.45; min-width: 420px; }
.prose th, .prose td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose thead th { background: var(--ivory); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }
.prose__loading { color: var(--ink-2); }

.atags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.atags > span, .ashare > span:first-child { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-right: 6px; }
.atags .chip { background: var(--white); font-size: .8rem; }
.ashare { display: flex; align-items: center; gap: 8px; margin-top: 20px; }
.ashare .icon-btn { width: 40px; height: 40px; }
.ashare__done { font-size: .8rem; color: var(--teal); }

.aside__card { background: var(--ink); color: var(--ivory); border-radius: var(--radius-lg); padding: 22px; display: grid; gap: 12px; }
.aside__label { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sand); font-weight: 600; }
.aside__card b { font-size: 1.1rem; line-height: 1.35; font-weight: 500; }
.aside__card .btn--ink { background: var(--ivory); color: var(--ink); }
.aside__card .btn--ghost { color: var(--ivory); border-color: rgba(255,255,255,.25); }
.aside__wa { justify-self: center; font-size: .84rem; color: rgba(247,242,237,.75); text-decoration: underline; text-underline-offset: 3px; }

.aplan { padding: 70px 0 20px; background: var(--white); overflow: hidden; }
.aplan .h2 { margin-bottom: 26px; }
.aplan .more__scroller { margin: 0 calc(var(--gutter) * -1); }
.aplan .more__track { padding-bottom: 50px; }
.amore { padding-top: 70px; }

/* ---------- Home "Stories" section (real posts) ---------- */
.stories .bgrid .bcard__excerpt { -webkit-line-clamp: 2; }

@media (min-width: 720px) {
  .bhero__head { grid-template-columns: 1.3fr 1fr; align-items: end; gap: 40px; }
  .bhero .lede { margin: 0; }
  .bfeature { grid-template-columns: 1.2fr 1fr; }
  .bfeature__media { aspect-ratio: auto; min-height: 380px; }
  .bfeature__body { padding: 34px; }
  .bfeature__title { font-size: 2.2rem; }
  .bbar__inner { grid-template-columns: 1fr 260px; align-items: center; }
  .bgrid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .ahero__content { padding-bottom: 56px; }
  .prose { font-size: 1.1rem; }
  .prose h2 { font-size: 2rem; }
}
@media (min-width: 1080px) {
  .bhero { padding-top: calc(var(--header-h) + 50px); padding-bottom: 50px; }
  .bgrid { grid-template-columns: repeat(3, 1fr); gap: 26px; }
  .bgrid--3 { grid-template-columns: repeat(3, 1fr); }
  .ahero { min-height: 86vh; }
  .ahero__content { padding-bottom: 70px; }
  .abody { grid-template-columns: 250px minmax(0, 1fr) 280px; gap: 56px; padding-top: 60px; align-items: start; }
  .atoc { position: sticky; top: calc(var(--header-h) + 24px); margin: 0; }
  body.header-hidden .atoc { top: 24px; }
  .atoc__inner { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; }
  .atoc__toggle { padding: 0 0 12px; pointer-events: none; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; }
  .atoc__toggle::after { display: none; }
  .atoc__list { display: grid !important; gap: 2px; max-height: calc(100vh - var(--header-h) - 120px); padding: 0 6px 0 0; }
  .aside { position: sticky; top: calc(var(--header-h) + 24px); }
  .abody:not(:has(.atoc:not([hidden]))) { grid-template-columns: minmax(0, 1fr) 280px; }
  .aplan { padding-top: 110px; }
  .aplan .more__scroller { margin: 0; }
  .amore { padding-top: 110px; }
}
@media (min-width: 1080px) { .stories .bgrid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Policy pages (privacy, terms, cancellation, refunds) ---------- */
body[data-page="legal"] { background: var(--ivory); }
.lhero { padding-bottom: 10px; }
.lhero .bhero__title { max-width: none; }
.lhero__date { margin-top: 14px; font-size: .86rem; color: var(--ink-2); }
.legal { display: grid; gap: 26px; padding-top: 24px; padding-bottom: 90px; }
.legal__nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); }
.legal__nav::-webkit-scrollbar { display: none; }
.legal__nav a { flex: 0 0 auto; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: .86rem; color: var(--ink-2); background: var(--white); transition: color .3s, border-color .3s; }
.legal__nav a:hover { color: var(--ink); border-color: var(--ink); }
.legal__nav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.legal__body > h2:first-child { margin-top: 0; }
.legal__contact { list-style: none !important; padding-left: 0 !important; }
.legal .prose-table table { min-width: 0; }
.legal .prose-table th, .legal .prose-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.legal .prose-table tr:last-child td { border-bottom: 0; }
.legal .prose-table th { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; }
@media (min-width: 900px) {
  .legal { grid-template-columns: 220px minmax(0, 1fr); gap: 64px; padding-top: 40px; align-items: start; }
  .legal__nav { flex-direction: column; margin: 0; padding: 0; overflow: visible; position: sticky; top: calc(var(--header-h) + 24px); }
  .legal__nav a { border: 0; background: none; padding: 9px 14px; border-radius: 10px; }
  .legal__nav a:hover { background: var(--white); }
}
