/* Blog pages only. Builds on the variables defined in style.css. */

/* ---------- Blog index ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  max-width: 1100px;
  margin: 0 auto;
}
.blog-card { padding: 0; overflow: hidden; transition: transform .18s ease, border-color .18s ease; }
.blog-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.blog-card-link { display: flex; flex-direction: column; height: 100%; padding: 26px 24px; color: inherit; }
.blog-card-img { width: calc(100% + 48px); margin: -26px -24px 18px; aspect-ratio: 1200 / 630; object-fit: cover; }
.blog-card-title {
  font-family: var(--font-header); font-size: 20px; line-height: 1.3;
  color: var(--text); margin: 10px 0 10px;
}
.blog-card-desc { font-size: 15px; line-height: 1.7; color: #a9aebb; margin-bottom: 18px; flex: 1; }
.blog-card-more { font-size: 14px; font-weight: 700; color: var(--accent); }

.blog-meta { font-size: 13px; color: var(--text-muted); letter-spacing: .2px; }
.blog-meta .sep { margin: 0 8px; opacity: .6; }
.blog-empty { text-align: center; color: var(--text-muted); padding: 40px 0; }

/* ---------- Post page ---------- */
.blog-breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.blog-breadcrumb a { color: var(--text-muted); }
.blog-breadcrumb a:hover { color: var(--accent); }
.blog-breadcrumb .sep { margin: 0 8px; opacity: .6; }
.blog-post-hero h1 { font-size: 40px; max-width: 820px; margin-left: auto; margin-right: auto; }
.blog-post-hero .blog-meta { margin-top: 6px; }

.blog-article { max-width: 760px; margin: 0 auto; padding: 38px 40px; }
.blog-body { color: #c4c9d6; font-size: 17px; line-height: 1.85; }
.blog-body > :first-child { margin-top: 0; }
.blog-body p { margin: 0 0 20px; }
.blog-body h2 {
  font-family: var(--font-header); font-size: 26px; line-height: 1.25;
  color: var(--text); margin: 42px 0 14px;
}
.blog-body h3 {
  font-family: var(--font-header); font-size: 20px; line-height: 1.3;
  color: var(--text); margin: 30px 0 10px;
}
.blog-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.blog-body a:hover { color: #f08b72; }
.blog-body strong { color: var(--text); }
.blog-body ul, .blog-body ol { margin: 0 0 22px; padding-left: 26px; }
.blog-body li { margin-bottom: 8px; padding-left: 4px; }
.blog-body li::marker { color: var(--accent); }
.blog-body blockquote {
  margin: 26px 0; padding: 14px 22px; border-left: 3px solid var(--accent);
  background: var(--accent-dim); border-radius: 0 10px 10px 0; color: var(--text-body);
}
.blog-body blockquote p:last-child { margin-bottom: 0; }
.blog-body img { border-radius: 12px; margin: 26px auto; max-width: 100%; height: auto; }
.blog-body hr { border: 0; border-top: 1px solid var(--border); margin: 36px 0; }
.blog-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em;
  background: rgba(255, 255, 255, 0.08); padding: 2px 6px; border-radius: 6px; color: var(--text);
  overflow-wrap: anywhere;
}
.blog-body pre {
  background: #0b0d14; border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; overflow-x: auto; margin: 0 0 22px;
}
.blog-body pre code { background: none; padding: 0; font-size: 14px; line-height: 1.6; overflow-wrap: normal; }
.blog-body .table-wrap, .blog-body table { max-width: 100%; }
.blog-body table { border-collapse: collapse; margin: 0 0 24px; display: block; overflow-x: auto; }
.blog-body th, .blog-body td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; font-size: 15px; }
.blog-body th { background: rgba(255, 255, 255, 0.06); color: var(--text); font-family: var(--font-header); }

.blog-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.blog-tag {
  font-size: 12px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; background: var(--accent-dim);
  border: 1px solid rgba(224, 111, 82, 0.35); color: var(--accent);
}

.blog-cta { max-width: 760px; margin: 28px auto 0; text-align: center; }
.blog-cta h2 { font-family: var(--font-header); font-size: 22px; color: var(--text); margin-bottom: 10px; }
.blog-cta p { color: #a9aebb; margin-bottom: 20px; }

.blog-pager { max-width: 760px; margin: 22px auto 0; display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.blog-pager a {
  flex: 1 1 280px; padding: 16px 20px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--panel); transition: border-color .18s ease;
}
.blog-pager a:hover { border-color: var(--border-strong); }
.blog-pager .dir { display: block; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.blog-pager .ttl { font-family: var(--font-header); color: var(--text); font-size: 16px; }
.blog-pager .next { text-align: right; }

@media (max-width: 640px) {
  .blog-post-hero h1 { font-size: 28px; }
  .blog-article { padding: 26px 20px; }
  .blog-body { font-size: 16px; line-height: 1.8; }
  .blog-body h2 { font-size: 22px; margin-top: 34px; }
  .blog-grid { grid-template-columns: 1fr; }
}

/* Space between the post's date line and the article card */
.blog-post-hero .blog-meta { margin-bottom: 36px; }

/* >>> m2m-categories (managed by deploy.sh: do not edit between markers) >>> */
.blog-cats { max-width: 1100px; margin: 26px auto 0; padding: 0 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.blog-cats-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.blog-cat { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border); font-size: 14px; font-weight: 600; color: var(--text-muted); transition: border-color .15s, color .15s, background .15s; }
.blog-cat:hover { border-color: var(--border-strong); color: var(--text); }
.blog-cat.active { background: rgba(255,255,255,.08); border-color: var(--accent); color: var(--text); }
.blog-card-cat { color: var(--accent); font-weight: 700; }
.blog-pager a.prev { text-align: left; }
.blog-pager a.next { text-align: right; margin-left: auto; }

/* images and videos woven through the article */
.blog-figure { margin: 30px 0; }
.blog-figure img { display: block; width: auto; max-width: 100%; height: auto; max-height: 680px; margin: 0 auto; object-fit: contain; border-radius: 12px; }
.blog-figcap { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 8px; }
.blog-figcap a { color: var(--text-muted); text-decoration: underline; }
.blog-video { max-width: 100%; }

/* banner slots (top / mid / end) */
.m2m-promo { position: relative; margin: 34px 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--panel); }
.m2m-promo.is-loading { aspect-ratio: 4 / 1; }
.m2m-promo a { display: block; }
.m2m-promo img { width: 100%; height: auto; display: block; }
.m2m-promo-label { position: absolute; top: 8px; right: 8px; font-size: 10px; letter-spacing: .6px; text-transform: uppercase; background: rgba(0,0,0,.65); color: #fff; padding: 3px 9px; border-radius: 999px; pointer-events: none; }
@media (max-width: 640px) { .m2m-promo.is-loading { aspect-ratio: 8 / 5; } }

/* card images: the width/height attributes (1200x630) must not force a fixed 630px height */
.blog-card-img { max-width: none; width: calc(100% + 48px); height: auto; aspect-ratio: 1200 / 630; object-fit: contain; background: rgba(8,11,20,.55); }
/* category buttons and pager must not behave like the sticky site header */
.blog-cats, .blog-pager { position: static; }
.blog-cats { margin-bottom: 34px; }
/* date and "N min read" never break in the middle */
.blog-meta time, .blog-meta .blog-read, .blog-card-cat { white-space: nowrap; }
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; row-gap: 2px; }
.blog-post-hero .blog-meta { justify-content: center; }
/* related articles, topic hubs, editor's note */
.blog-related { max-width: 1100px; margin: 54px auto 0; padding: 0 4px; }
.blog-related > h2 { font-size: 22px; margin: 0 0 18px; }
.blog-hubnote { font-size: 14px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; display: inline-block; padding: 6px 16px; margin: 0 0 22px; }
.blog-hubnote a { color: var(--accent); font-weight: 700; }
.blog-guide-list { padding-left: 20px; }
.blog-guide-list li { margin: 8px 0; }
.blog-guide-list span { color: var(--text-muted); font-size: 14px; }
.blog-editor-note { margin: 26px 0; padding: 16px 20px; border-left: 4px solid var(--accent); background: rgba(255,255,255,.04); border-radius: 0 12px 12px 0; }
.blog-editor-note strong { display: block; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.blog-editor-note p { margin: 0; }
/* reactions (inside the article) and comments */
[hidden] { display: none !important; }
.m2m-react-slot { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--border); }
.m2m-react-title { margin: 0 0 12px; font-weight: 700; font-size: 16px; }
.m2m-react { display: flex; flex-wrap: wrap; gap: 10px; }
.m2m-react-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; font-size: 14px; transition: border-color .15s, transform .1s, background .15s; }
.m2m-react-btn:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.m2m-react-btn.on { border-color: var(--accent); background: rgba(224,111,82,.14); color: var(--accent); }
.m2m-react-btn svg { display: block; flex: 0 0 auto; } .m2m-react-btn .n { font-weight: 700; }
.m2m-feedback { margin: 30px 0 0; padding-top: 26px; border-top: 1px solid var(--border); scroll-margin-top: 90px; }
.m2m-ctitle { font-size: 20px; margin: 0 0 14px; }
.m2m-form { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.03); margin-bottom: 20px; }
.m2m-form input[type=text], .m2m-form input[type=email], .m2m-form textarea { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border-strong, #3a3f50); background: rgba(0,0,0,.25); color: var(--text); font: inherit; }
.m2m-form textarea { resize: vertical; min-height: 96px; }
.m2m-row { display: flex; gap: 12px; flex-wrap: wrap; } .m2m-row > input { flex: 1 1 200px; min-width: 0; } .m2m-row.end { justify-content: space-between; align-items: center; }
.m2m-trap { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0; }
.m2m-captcha { max-width: 100%; overflow: hidden; }
.m2m-send { background: var(--accent); color: #1a0d09; border: 0; border-radius: 999px; padding: 10px 22px; font-weight: 700; cursor: pointer; font-size: 14px; }
.m2m-send:disabled { opacity: .55; cursor: wait; }
.m2m-status { margin: 0; font-size: 14px; flex: 1 1 180px; min-width: 0; } .m2m-status.err { color: #ff9b8a; } .m2m-status.ok { color: #7cc47f; }
.m2m-privacy { margin: 0; font-size: 12px; color: var(--text-muted); }
.m2m-replychip { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 6px 12px; border-radius: 10px; background: rgba(224,111,82,.14); }
.m2m-x { background: none; border: 0; color: var(--text); font-size: 18px; cursor: pointer; }
.m2m-comment { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--border); }
.m2m-comment.reply { margin-left: 54px; }
.m2m-comment img { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; background: var(--panel); }
.m2m-cbody { min-width: 0; } .m2m-cbody p { margin: 4px 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.m2m-chead { font-size: 14px; } .m2m-chead span { color: var(--text-muted); }
.m2m-cactions { display: flex; gap: 14px; align-items: center; }
.m2m-clike, .m2m-creply { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--text-muted); cursor: pointer; font-size: 13px; padding: 0; }
.m2m-clike svg { width: 16px; height: 16px; }
.m2m-clike.on { color: var(--accent); } .m2m-clike:hover, .m2m-creply:hover { color: var(--text); }
.m2m-empty { color: var(--text-muted); }
@media (max-width: 520px) { .m2m-form { padding: 14px; } .m2m-comment.reply { margin-left: 24px; } .m2m-react-btn { padding: 8px 12px; } .m2m-row.end { flex-direction: column; align-items: stretch; } .m2m-send { width: 100%; } }
/* banner images keep their own size (small banners are not stretched) */
.m2m-promo { display: flex; justify-content: center; background: transparent; border: 0; border-radius: 0; overflow: visible; }
.m2m-promo.is-loading { aspect-ratio: auto; min-height: 90px; background: var(--panel); border-radius: 14px; }
.m2m-promo-in { position: relative; display: inline-block; max-width: 100%; line-height: 0; }
.m2m-promo-in a { display: inline-block; max-width: 100%; }
.m2m-promo img { width: auto; max-width: 100%; height: auto; border-radius: 12px; }
.m2m-promo-label { top: 8px; right: 8px; }
@media (max-width: 640px) { .m2m-promo.is-loading { aspect-ratio: auto; } }
/* spacing of the blocks below the article */
.blog-related { margin-top: 40px; }
.blog-pager { margin-top: 28px; }
/* v5h: article continues into reactions + comments; robustness on phones and desktop */
.blog-article { min-width: 0; max-width: 100%; }
.blog-body { overflow-wrap: break-word; min-width: 0; }
.blog-body img, .blog-body iframe, .blog-body video { max-width: 100%; }
.blog-body table { display: block; max-width: 100%; overflow-x: auto; }
.blog-body pre { max-width: 100%; overflow-x: auto; }
.blog-post-hero h1 { overflow-wrap: break-word; font-size: clamp(28px, 5.2vw, 46px); line-height: 1.15; }
.m2m-react-slot { margin-top: 30px; }
.m2m-react-btn { min-height: 42px; }
.m2m-comment { scroll-margin-top: 90px; transition: background .6s; }
.m2m-comment.fresh { background: rgba(224,111,82,.12); border-radius: 12px; padding-left: 10px; padding-right: 10px; }
.m2m-comment:first-child { border-top: 0; }
@media (max-width: 640px) {
  .blog-meta { justify-content: center; text-align: center; }
  .m2m-form input[type=text], .m2m-form input[type=email], .m2m-form textarea { font-size: 16px; }  /* stops iOS zooming into the field */
  .m2m-react { gap: 8px; }
  .m2m-react-btn { flex: 1 1 calc(33% - 8px); justify-content: center; }
  .blog-related { margin-top: 30px; }
}
@media (max-width: 380px) { .m2m-comment { gap: 10px; } .m2m-comment img { width: 34px; height: 34px; } .m2m-comment.reply { margin-left: 14px; } }
/* article paragraphs: readable size and colour on every screen (the site's .feature-card p rule would make them 14px and dim) */
.blog-article .blog-body p, .blog-article .blog-body li { color: #d3d7e2; }
@media (max-width: 999px) { .blog-article .blog-body p, .blog-article .blog-body li { font-size: var(--m2m-body-phone, 17px); line-height: 1.75; } }

/* ===== v5i: scale, text size, whole images, phone layout =====
   --m2m-zoom : overall size of the blog on desktop (1 = as before, 0.9 = 10% smaller)
   --m2m-body : article text size on desktop                                              */
:root { --m2m-zoom: .9; --m2m-body: 22px; --m2m-body-phone: 17px; }
@media (min-width: 1000px) {
  .content { zoom: var(--m2m-zoom); }
  .blog-body { font-size: var(--m2m-body); line-height: 1.75; }
  .blog-article .blog-body p, .blog-article .blog-body li, .blog-article .blog-body blockquote { font-size: var(--m2m-body); line-height: 1.75; }
  .blog-article .blog-body th, .blog-article .blog-body td { font-size: calc(var(--m2m-body) * .8); }
  .blog-body h2 { font-size: 1.55em; } .blog-body h3 { font-size: 1.28em; }
  .m2m-cbody p { font-size: 17px; line-height: 1.6; }
  .m2m-ctitle { font-size: 24px; }
  .m2m-form input[type=text], .m2m-form input[type=email], .m2m-form textarea { font-size: 16px; }
  .blog-card h2, .blog-card h3 { font-size: 1.3em; }
  .content .blog-card p, .content .blog-card .blog-excerpt { font-size: 17.5px; line-height: 1.6; }
  .blog-card .blog-meta, .blog-meta { font-size: 15px; }
  .blog-pager a .ttl { font-size: 18px; line-height: 1.35; }
  .blog-pager a .dir { font-size: 13px; }
  .blog-hero p, .blog-intro { font-size: 19px; }
}
/* room between "Newer / Older" and the e-mail box, on every screen size */
.blog-pager { margin-top: 40px; margin-bottom: 48px; }
.m2m-captcha { max-height: 150px; }
.m2m-captcha:empty { display: none; }
@media (max-width: 640px) {
  .feature-card.blog-article { padding: 18px 16px; }
  .blog-pager { flex-direction: column; gap: 10px; margin-top: 28px; margin-bottom: 36px; }
  .blog-pager a { box-sizing: border-box; width: 100%; max-width: 100%; flex: 0 0 auto; min-height: 0; height: auto; margin-left: 0; text-align: left; }
  .m2m-feedback { margin-top: 22px; padding-top: 18px; }
  .m2m-ctitle { font-size: 18px; margin-bottom: 10px; }
  .m2m-react-title { font-size: 16px; }
  .m2m-form { padding: 12px; gap: 10px; margin-bottom: 12px; }
  .m2m-form textarea { min-height: 84px; }
  .m2m-privacy { font-size: 11px; line-height: 1.45; }
  .m2m-comment { padding: 12px 0; gap: 10px; }
  .m2m-comment img { width: 34px; height: 34px; }
  .m2m-cbody p { font-size: 15px; }
}
/* ===== Scrollbars (whole site) =====
   Chrome / Edge / Safari: slim rounded thumb in the site's orange on a dark track.
   Firefox: the standard properties (same colours). Touch devices keep their own overlay scrollbars. */
html{scrollbar-gutter:auto}
@supports selector(::-webkit-scrollbar){
  html::-webkit-scrollbar,body::-webkit-scrollbar{width:13px;height:13px}
  html::-webkit-scrollbar-track,body::-webkit-scrollbar-track{background:#090b12;border-left:1px solid rgba(255,255,255,.06)}
  html::-webkit-scrollbar-thumb,body::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#ec8765,#c85a3d);border-radius:999px;border:3px solid #090b12;min-height:60px}
  html::-webkit-scrollbar-thumb:hover,body::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#f39a7b,#d9694a)}
  html::-webkit-scrollbar-thumb:active,body::-webkit-scrollbar-thumb:active{background:#b34d33}
  html::-webkit-scrollbar-corner,body::-webkit-scrollbar-corner{background:#090b12}
  /* panels that scroll inside the page (wallet picker, long lists): thinner, same look */
  .wk-dialog::-webkit-scrollbar,.scroll-themed::-webkit-scrollbar{width:9px;height:9px}
  .wk-dialog::-webkit-scrollbar-track,.scroll-themed::-webkit-scrollbar-track{background:transparent;margin:10px 0}
  .wk-dialog::-webkit-scrollbar-thumb,.scroll-themed::-webkit-scrollbar-thumb{background:rgba(224,111,82,.55);border-radius:999px;border:2px solid transparent;background-clip:padding-box}
  .wk-dialog::-webkit-scrollbar-thumb:hover,.scroll-themed::-webkit-scrollbar-thumb:hover{background:rgba(236,135,101,.9);background-clip:padding-box}
}
@supports not selector(::-webkit-scrollbar){
  html{scrollbar-color:#d9694a #090b12;scrollbar-width:auto}
  .wk-dialog,.scroll-themed{scrollbar-color:rgba(224,111,82,.7) transparent;scrollbar-width:thin}
}
@media (pointer:coarse){html::-webkit-scrollbar{width:0;height:0}}

/* ===== Back to top ===== */
.btt{position:fixed;right:max(22px,env(safe-area-inset-right));bottom:max(22px,env(safe-area-inset-bottom));z-index:9000;width:52px;height:52px;border-radius:50%;border:0;padding:0;display:grid;place-items:center;cursor:pointer;color:#fff;background:rgba(20,24,36,.88);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:0 10px 28px rgba(0,0,0,.45);opacity:0;visibility:hidden;transform:translateY(14px) scale(.9);transition:opacity .25s,transform .25s cubic-bezier(.2,.9,.3,1.2),visibility 0s linear .25s,background .2s,box-shadow .2s}
.btt.show{opacity:1;visibility:visible;transform:none;transition-delay:0s}
.btt svg{display:block;position:absolute;inset:0;width:100%;height:100%}
.btt-ring{fill:none;stroke:rgba(255,255,255,.14);stroke-width:3}
.btt-bar{fill:none;stroke:var(--accent,#e06f52);stroke-width:3;stroke-linecap:round;transform:rotate(-90deg);transform-origin:50% 50%;transition:stroke-dashoffset .12s linear}
.btt-arrow{position:relative;width:20px;height:20px;transition:transform .25s cubic-bezier(.3,1.6,.5,1)}
.btt-arrow path{fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.btt:hover,.btt:focus-visible{background:rgba(224,111,82,.95);color:#1a0d09;box-shadow:0 14px 34px rgba(224,111,82,.4);outline:none}
.btt:hover .btt-arrow,.btt:focus-visible .btt-arrow{transform:translateY(-3px)}
.btt:hover .btt-ring{stroke:rgba(26,13,9,.25)}
.btt:hover .btt-bar,.btt:focus-visible .btt-bar{stroke:#1a0d09}
@media (max-width:640px){.btt{width:46px;height:46px;right:max(14px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom))}}
@media (prefers-reduced-motion:reduce){.btt,.btt-arrow,.btt-bar{transition:none}}
/* floating button clear of the footer's last line */
footer{padding-bottom:104px}
@media (max-width:640px){footer{padding-bottom:100px}}
/* the desktop scale-down is for the article area only: header and footer keep the exact size they have on the other pages */
@media (min-width:1000px){ .content > nav, .content > footer { zoom: calc(1 / var(--m2m-zoom, 1)); } }
/* <<< m2m-categories <<< */
