/* Blog: clean editorial layout (Inter, light weights, hairlines) on top of the home page header, CTA and footer. */
.blog { --b-ink: #1f2429; --b-text: #3b3d40; --b-muted: #6b6f75; --b-line: #e7e4df; --b-soft: #f4f2ef;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--b-ink); }
.blog *, .blog *::before, .blog *::after { box-sizing: border-box; }
.blog h1, .blog h2, .blog h3 { font-family: Inter, system-ui, sans-serif; font-variation-settings: normal; color: var(--b-ink); }
.blog a { color: inherit; }
.blog img { max-width: 100%; display: block; }
.b-wrap { width: min(1200px, 100% - 40px); margin: 0 auto; }

/* ── index ─────────────────────────────────────────── */
.bi-top { padding: 140px 0 48px; text-align: center; }
.bi-top h1 { margin: 0 auto 16px; max-width: 760px; font-size: clamp(36px, 4.6vw, 54px); font-weight: 500; line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; }
.bi-top p { margin: 0 auto; max-width: 620px; font-size: 19px; line-height: 1.6; color: var(--b-text); text-wrap: balance; }

.b-latest { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 12px; margin: 0 auto 56px;
  border: 1px solid var(--b-line); border-radius: 22px; background: #fff; text-decoration: none; transition: border-color .2s ease; }
.b-latest:hover { border-color: #cfcac2; }
.b-latest img { width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 14px; }
.b-latest .tx { padding: 12px 28px 12px 0; display: flex; flex-direction: column; gap: 14px; }
.b-latest .b-lbl { font-size: 14px; color: var(--b-muted); }
.b-latest h2 { margin: 0; font-size: clamp(24px, 2.4vw, 30px); font-weight: 600; line-height: 1.25; letter-spacing: -.02em; text-wrap: balance; }
.b-latest p { margin: 0; font-size: 16.5px; line-height: 1.6; color: var(--b-text); }

.b-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-bottom: 20px; }
.b-card { display: flex; flex-direction: column; padding: 12px; border: 1px solid var(--b-line); border-radius: 22px; background: #fff;
  text-decoration: none; transition: border-color .2s ease; }
.b-card:hover { border-color: #cfcac2; }
.b-card img { width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 14px; }
.b-card .meta { display: flex; justify-content: space-between; gap: 12px; margin: 20px 8px 0; font-size: 14px; color: var(--b-muted); }
.b-card h3 { margin: 10px 8px 0; font-size: 19px; font-weight: 600; line-height: 1.35; letter-spacing: -.015em; text-wrap: balance; }
.b-card p { margin: 10px 8px 0; font-size: 15.5px; line-height: 1.6; color: var(--b-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.b-read { display: inline-flex; align-items: center; gap: 6px; margin: auto 8px 4px; padding-top: 22px; font-size: 15px; font-weight: 500; color: var(--b-ink); }
.b-read svg { width: 16px; height: 16px; transition: transform .2s ease; }
.b-card:hover .b-read svg, .b-latest:hover .b-read svg { transform: translateX(3px); }
.b-latest .b-read { margin: 6px 0 0; padding: 0; }

/* ── post ─────────────────────────────────────────── */
.b-post { display: grid; grid-template-columns: minmax(0, 680px) 240px; justify-content: space-between; gap: 64px; padding: 130px 0 40px; }
.b-crumbs { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--b-muted); }
.b-crumbs a { color: var(--b-muted); text-decoration: none; } .b-crumbs a:hover { color: var(--b-ink); }
.b-crumbs .b-sep { color: #c9c5be; }
.b-post h1 { margin: 18px 0 18px; font-size: clamp(32px, 3.6vw, 42px); font-weight: 500; line-height: 1.15; letter-spacing: -.025em; text-wrap: balance; }
.b-dek { margin: 0 0 18px; font-size: 19px; line-height: 1.6; color: var(--b-text); }
.b-updated { margin: 0; font-size: 14px; color: var(--b-muted); }
.b-author { display: flex; align-items: center; gap: 12px; margin: 30px 0 30px; font-size: 14.5px; line-height: 1.4; }
.b-av { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--b-soft); }
.b-author a { text-decoration: none; } .b-author b { font-weight: 600; }
.b-author small { display: block; color: var(--b-muted); font-size: 14px; }
.b-sum { margin: 0 0 40px; }
.b-sum p { margin: 0 0 12px; font-size: 16px; color: var(--b-text); }
.b-sum .pills { display: flex; flex-wrap: wrap; gap: 8px; }
.b-sum a, .b-sum button { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--b-soft);
  color: var(--b-ink); font: 500 14.5px Inter, sans-serif; text-decoration: none; cursor: pointer; transition: background-color .2s ease; }
.b-sum a:hover, .b-sum button:hover { background: #ebe8e3; }

.b-body { font-size: 18px; line-height: 1.65; color: var(--b-text); }
.b-body p { margin: 0 0 22px; }
.b-body h2 { margin: 52px 0 16px; font-size: 25px; font-weight: 600; line-height: 1.3; letter-spacing: -.015em; scroll-margin-top: 110px; }
.b-body a { color: var(--b-ink); text-decoration: underline; text-decoration-color: #c9c5be; text-underline-offset: 3px; }
.b-body a:hover { text-decoration-color: var(--b-ink); }
.b-body strong { color: var(--b-ink); font-weight: 600; }
.b-body ul, .b-body ol { margin: 0 0 24px; padding-left: 22px; } .b-body li { margin: 0 0 10px; padding-left: 4px; }
.b-body code { font: 500 .86em "Geist Mono", ui-monospace, Menlo, monospace; padding: 2px 6px; border-radius: 6px; background: var(--b-soft); }
.b-body pre { margin: 0 0 26px; padding: 18px 20px; border-radius: 14px; background: var(--b-soft); overflow-x: auto; }
.b-body pre code { padding: 0; background: none; font-size: 14px; line-height: 1.65; color: var(--b-ink); }
.b-body kbd { font: 600 .78em "Geist Mono", ui-monospace, monospace; padding: 2px 7px; border-radius: 6px; border: 1px solid #d6d2cb; background: #fff; color: var(--b-ink); }

.btable { margin: 6px 0 12px; overflow-x: auto; }
.btable table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.btable th { text-align: left; padding: 12px 18px 12px 0; font-weight: 600; color: var(--b-ink); border-bottom: 1px solid #d6d2cb; vertical-align: bottom; white-space: nowrap; }
.btable td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--b-line); vertical-align: top; color: var(--b-text); }
.tnote { margin: 0 0 24px !important; font-size: 14px; color: var(--b-muted); }
.btable + h2, .btable + p, .btable + ul { margin-top: 26px; }
.bsteps { list-style: none; margin: 4px 0 28px !important; padding: 0 !important; }
.bsteps li { display: flex; gap: 16px; margin: 0 !important; padding: 16px 0; border-top: 1px solid var(--b-line); }
.bsteps li:last-child { border-bottom: 1px solid var(--b-line); }
.bsteps .b-n { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #c9c5be; display: grid; place-items: center; font-size: 13.5px; font-weight: 600; color: var(--b-ink); margin-top: 1px; }
.bsteps strong { display: block; font-size: 16.5px; } .bsteps p { margin: 4px 0 0; font-size: 16.5px; line-height: 1.6; }
.bdia { margin: 14px 0 34px; }
.bdia svg { display: block; width: 100%; height: auto; }
.bdia figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--b-muted); text-align: center; }

.b-faq { margin-top: 60px; } .b-faq h2 { margin-top: 0; }
.b-faq details { border-top: 1px solid var(--b-line); } .b-faq details:last-of-type { border-bottom: 1px solid var(--b-line); }
.b-faq summary { list-style: none; cursor: pointer; position: relative; padding: 18px 36px 18px 0; font-size: 17px; font-weight: 600; line-height: 1.45; color: var(--b-ink); }
.b-faq summary::-webkit-details-marker { display: none; }
.b-faq summary::after { content: ""; position: absolute; right: 6px; top: 26px; width: 9px; height: 9px; border-right: 1.6px solid var(--b-muted); border-bottom: 1.6px solid var(--b-muted); transform: rotate(45deg); transition: transform .2s ease; }
.b-faq details[open] summary::after { transform: rotate(-135deg); top: 30px; }
.b-faq details p { margin: 0 0 20px; font-size: 16.5px; }

.b-toc { position: relative; }
.b-toc .stick { position: sticky; top: 110px; padding-top: 34px; }
.b-toc .b-lbl { margin: 0 0 14px; padding-bottom: 12px; font-size: 14px; font-weight: 500; color: var(--b-muted); border-bottom: 1px solid var(--b-line); }
.b-toc ol, .b-toc-m ol { position: relative; list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--b-line); display: grid; gap: 14px; }
.b-toc li, .b-toc-m li { margin: 0; padding: 0; }
.b-toc a, .b-toc-m a { display: block; font-size: 15px; line-height: 1.45; color: var(--b-muted); text-decoration: none; transition: color .25s ease; }
.b-toc a:hover, .b-toc a.on, .b-toc-m a:hover, .b-toc-m a.on { color: var(--b-ink); }
.b-toc a.on, .b-toc-m a.on { font-weight: 500; }
/* the line that marks the section being read; it slides between items */
.toc-bar { position: absolute; left: -2px; top: 0; width: 2px; height: 0; border-radius: 2px; background: var(--b-ink); opacity: 0;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), height .45s cubic-bezier(.22, 1, .36, 1), opacity .2s ease; pointer-events: none; }
.toc-bar.on { opacity: 1; }

/* phone and tablet: the same list in a bar that stays under the header */
.b-toc-m { display: none; }
@media (max-width: 1060px) {
  .b-toc-m { display: block; position: sticky; top: var(--b-hdr, 76px); z-index: 20; margin: -16px 0 36px; }
  .b-toc-m summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 44px 12px 16px; position: relative;
    border: 1px solid var(--b-line); border-radius: 14px; background: #fff; }
  .b-toc-m summary::-webkit-details-marker { display: none; }
  .b-toc-m summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
    border-right: 1.6px solid var(--b-muted); border-bottom: 1.6px solid var(--b-muted); transform: rotate(45deg); transition: transform .2s ease; }
  .b-toc-m[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
  .b-toc-m .k { flex: none; font-size: 13px; color: var(--b-muted); }
  .b-toc-m .cur { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 500; color: var(--b-ink); }
  .b-toc-m .k::after { content: ""; display: inline-block; width: 1px; height: 14px; margin-left: 12px; vertical-align: -2px; background: var(--b-line); }
  /* a strip of page color fills the gap between the header and the bar, so the article never shows through it */
  .b-toc-m::before { content: ""; position: absolute; left: -24px; right: -24px; top: -10px; bottom: 50%; z-index: -1; background: var(--b-bg, #faf8f5); }
  .b-toc-m[open] summary { border-color: #d9d4cc; }
  /* the list: a fixed height that does not jump when the phone's address bar hides, its own layer, and big rows */
  /* the home page also has a .panel (the feature demo, with a fixed shape): undo its size, shape and clipping here */
  .b-toc-m .panel { width: auto; max-width: none; height: auto; aspect-ratio: auto; margin: 0; }
  .b-toc-m .panel { position: absolute; left: 0; right: 0; top: calc(100% + 8px); max-height: 380px; max-height: min(calc(100svh - 200px), 460px);
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; contain: paint; isolation: isolate;
    padding: 8px; border: 1px solid var(--b-line); border-radius: 16px; background: #fff; box-shadow: 0 18px 40px -16px rgba(31, 36, 41, .3);
    animation: b-drop .18s ease-out; scrollbar-width: thin; }
  @keyframes b-drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
  .b-toc-m:not([open]) .panel { display: none; }
  .b-toc-m ol { padding: 0; border-left: 0; gap: 2px; }
  .b-toc-m .toc-bar { display: none; }
  .b-toc-m a { padding: 11px 12px; border-radius: 10px; font-size: 15px; line-height: 1.4; }
  .b-toc-m a.on { background: #f3f1ee; color: var(--b-ink); }
  .b-toc-m a:active { background: #f3f1ee; }
  .b-body h2 { scroll-margin-top: 150px; }
}
@media (max-width: 520px) {
  .b-toc-m summary { flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 44px 9px 16px; }
  .b-toc-m .k { font-size: 12px; }
  .b-toc-m .k::after { display: none; }
  .b-toc-m .cur { max-width: 100%; }
  .b-body h2 { scroll-margin-top: 160px; }
}

.b-related { padding: 70px 0 10px; }
.b-related > h2 { margin: 0 0 24px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.b-related .b-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 1060px) {
  .b-post { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .b-toc { display: none; }
  .b-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .bi-top { padding: 112px 0 32px; }
  .b-latest { grid-template-columns: 1fr; gap: 0; }
  .b-latest .tx { padding: 22px 8px 10px; }
  .b-cards, .b-related .b-cards { grid-template-columns: 1fr; }
  .b-post { padding-top: 104px; }
  .b-body { font-size: 17px; }
  .b-body h2 { font-size: 22px; margin-top: 42px; }
  .b-dek { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .b-read svg, .b-card, .b-latest, .toc-bar { transition: none; } }

.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.b-sum img { width: 16px; height: 16px; flex: none; }
