/* ════════════════════════════════════════════════════════════════
   blog.css  -  Nagari Guntha

   THIS FILE DID NOT EXIST. blog.php and blog-post.php both use
   .bl-* and .bp-* class names, but nothing ever defined them, so
   the browser fell back to raw defaults - Times New Roman headings,
   unstyled lists, no grid. That is the "school project" look.

   Covers every class the two pages actually use:
     .bl-*  blog index   (17 classes)
     .bp-*  single post  (17 classes)

   Tokens match css/style.css so the blog belongs to the same site.
   ════════════════════════════════════════════════════════════════ */

.bl-wrap, .bp-shell {
  --o:#FF8C42; --od:#E67529; --os:#FFF3E9; --oline:#F5D9C2;
  --ink:#16130D; --ink2:#3D372E; --soft:#5A5348; --mute:#918A7C;
  --line:#EFE8DB; --line2:#F5F0E6; --paper:#FFFDF9; --card:#fff;
  --blue:#1B5BA8;
  --serif:'Fraunces',Georgia,serif;
  --sans:'Poppins',system-ui,-apple-system,sans-serif;
  --shell:min(1180px,100% - 2.5rem);
  --ease:cubic-bezier(.22,.61,.36,1);
  /* ONE spacing scale. Every margin and pad below is a step on it.
     The previous values were arbitrary (22px, 34px, 18px, 26px...)
     with no relationship between them, which is what made the
     page feel unresolved. */
  --s1:.5rem; --s2:.875rem; --s3:1.25rem; --s4:2rem;
  --s5:3rem; --s6:4.5rem; --s7:6.5rem;
}

/* ══════════════════════════════════════════════════════════════
   BLOG INDEX
   ══════════════════════════════════════════════════════════════ */
.bl-wrap{
  width:var(--shell);margin-inline:auto;
  padding:clamp(84px,7vw,96px) 0 var(--s6);
  font-family:var(--sans);color:var(--ink);
}

/* Only the prose is measure-limited. The search bar, filter chips and
   topic grid are inside .bl-head in the markup, so a max-width here
   was squeezing all of them into the left two-thirds of the page and
   leaving a dead column on the right - that is what made the index
   look unfinished. Constrain the text, let the tools breathe. */
/* The intro block was taking half the viewport before a single
   article appeared. Reference blogs give it a third of that and put
   articles above the fold - which is the whole job of this page. */
.bl-head{margin:0 0 var(--s4);padding-bottom:var(--s4);border-bottom:1px solid var(--line2)}
.bl-head .bl-h1,
.bl-head .bl-sub{max-width:38rem}
.bl-eyebrow{
  display:inline-flex;align-items:center;gap:.5rem;
  font:500 .68rem/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;
  color:var(--od);margin:0 0 .6rem;
}
.bl-eyebrow::before{content:"";width:22px;height:1.5px;background:currentColor}
.bl-h1{
  font-family:var(--serif);font-weight:700;letter-spacing:-.025em;line-height:1.04;
  font-size:clamp(1.75rem,3.8vw,2.4rem);margin:0;
}
.bl-h1 em{font-style:italic;color:var(--od)}
.bl-sub{margin:.6rem 0 0;font-size:.98rem;line-height:1.6;color:var(--soft);max-width:52ch}

/* search + chips */
.bl-tools{display:flex;flex-wrap:wrap;gap:var(--s2);align-items:center;margin:var(--s3) 0 0}
@media(min-width:900px){
  /* The heading block and the search share a row - the search was
     eating a whole band of the page on its own. */
  .bl-head{display:grid;grid-template-columns:minmax(0,1fr) auto;
    gap:var(--s4);align-items:end}
  .bl-head .bl-eyebrow,.bl-head .bl-h1,.bl-head .bl-sub{grid-column:1}
  .bl-tools{grid-column:2;grid-row:1/4;margin:0;align-self:center}
}
/* markup is <div class="bl-search"><input><button>Search</button></div>
   The button was never styled, so it wrapped onto its own line and the
   icon floated loose. It now sits inside the pill on the right. */
.bl-search{
  position:relative;flex:1 1 260px;max-width:380px;
  display:flex;align-items:center;
  border:1px solid #E4DBCC;border-radius:999px;background:#fff;
  transition:border-color .16s var(--ease),box-shadow .16s var(--ease);
}
.bl-search:focus-within{border-color:var(--o);box-shadow:0 0 0 4px rgba(255,140,66,.13)}
.bl-search input{
  flex:1;min-width:0;
  padding:11px 8px 11px 40px;min-height:46px;
  border:0;border-radius:999px 0 0 999px;background:transparent;
  font:400 .93rem var(--sans);color:var(--ink);outline:none;
}
.bl-search button{
  flex:none;margin:4px;padding:0 17px;min-height:38px;
  border:0;border-radius:999px;background:var(--ink);color:#fff;
  font:600 .84rem var(--sans);cursor:pointer;
  transition:background-color .16s var(--ease);
}
.bl-search button:hover{background:var(--od)}
.bl-search input::placeholder{color:#B5AD9E}
.bl-search::before{
  content:"";position:absolute;left:17px;top:50%;width:15px;height:15px;z-index:1;
  transform:translateY(-50%);opacity:.45;pointer-events:none;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.5-3.5'/></svg>") center/contain no-repeat;
          mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.5-3.5'/></svg>") center/contain no-repeat;
}

.bl-chips{display:flex;flex-wrap:wrap;gap:6px;margin:var(--s3) 0 0}
.bl-chip,
.bl-chips a{
  display:inline-block;padding:7px 14px;border-radius:999px;
  border:1px solid var(--line);background:#fff;color:var(--soft);
  font:600 .81rem var(--sans);text-decoration:none;white-space:nowrap;
  transition:border-color .16s var(--ease),color .16s var(--ease),background-color .16s var(--ease);
}
.bl-chip:hover,
.bl-chips a:hover{border-color:var(--oline);color:var(--od);background:var(--os)}
.bl-chip.on,
.bl-chips a.on{background:var(--ink);border-color:var(--ink);color:#fff}

/* featured hero */
.bl-hero{
  display:grid;gap:0;margin:0 0 clamp(28px,4vw,44px);
  background:var(--card);border:1px solid var(--line);border-radius:26px;overflow:hidden;
  box-shadow:0 30px 70px -50px rgba(22,19,13,.5);
}
@media(min-width:860px){.bl-hero{grid-template-columns:1.1fr .9fr;align-items:stretch;min-height:300px}}
.bl-hero img{
  width:100%;height:100%;min-height:200px;max-height:320px;
  object-fit:cover;display:block;
  /* a missing cover shows a quiet tile, not sprawling alt text */
  background:var(--line2) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%23C9BFAC' stroke-width='1.4'><rect x='3' y='5' width='18' height='14' rx='2'/><circle cx='8.5' cy='10' r='1.5'/><path d='M21 15l-5-5L5 19'/></svg>") center/48px no-repeat;
  color:transparent;font-size:0;
}
.bl-hero-b{padding:clamp(1.25rem,2.6vw,1.9rem);display:flex;flex-direction:column;justify-content:center;gap:.55rem}
.bl-hero-b .bl-tag{align-self:flex-start}
.bl-hero-b::before{
  content:"Featured";
  align-self:flex-start;
  font:600 .64rem/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;
  color:var(--od);background:var(--os);border:1px solid var(--oline);
  padding:5px 11px;border-radius:999px;margin-bottom:4px;
}
.bl-hero-b h2{
  font-family:var(--serif);font-weight:700;letter-spacing:-.02em;line-height:1.14;
  font-size:clamp(1.25rem,2.4vw,1.65rem);margin:0;
}
.bl-hero-b h2 a{color:inherit;text-decoration:none}
.bl-hero-b h2 a:hover{color:var(--od)}
.bl-hero-b p{margin:0;font-size:.88rem;line-height:1.6;color:var(--soft);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* ── Topic filter ────────────────────────────────────────────
   One uniform pill per topic. The count sits in a small counter
   rather than floating at its own size, which is what made the old
   version look broken. Scrolls sideways on a phone instead of
   wrapping into ragged rows. */
.bl-topics{
  display:flex;gap:7px;align-items:center;
  margin:var(--s3) 0 var(--s4);
  overflow-x:auto;padding-bottom:3px;
  scrollbar-width:none;-ms-overflow-style:none;
}
.bl-topics::-webkit-scrollbar{display:none}
.bl-pill{
  --tc:#918A7C;
  flex:0 0 auto;display:inline-flex;align-items:center;gap:7px;
  padding:8px 8px 8px 14px;border-radius:999px;text-decoration:none;
  border:1px solid var(--line);background:#fff;
  font:600 .82rem/1 var(--sans);color:var(--soft);white-space:nowrap;
  transition:border-color .16s var(--ease),color .16s var(--ease),background-color .16s var(--ease);
}
.bl-pill em{font-style:normal;font-size:.9rem;line-height:1}
.bl-pill i{
  font-style:normal;font:700 .7rem/1 var(--data);
  background:var(--line2);color:var(--mute);
  border-radius:999px;padding:4px 8px;min-width:22px;text-align:center;
}
.bl-pill:hover{border-color:var(--tc);color:var(--ink)}
.bl-pill.on{background:var(--ink);border-color:var(--ink);color:#FFFDF9}
.bl-pill.on i{background:rgba(255,255,255,.18);color:#FFFDF9}
/* A topic with nothing in it is still worth showing - it tells the
   reader what is coming - but it should not compete for the click. */
.bl-pill.empty{opacity:.45}
.bl-pill.empty:hover{opacity:.75}

/* Global link hover underlines everything inside a card. On a card
   whose title, excerpt and meta are all inside the link, that reads
   as a fault rather than a hover state. */
.bl-card a,.bl-card a:hover,.bl-hero a,.bl-hero a:hover,
.bl-pill,.bl-pill:hover,.bp-rel-card,.bp-rel-card:hover{text-decoration:none}
.bl-card-b h3 a:hover,.bl-hero-b h2 a:hover{color:var(--od)}

/* card grid */
.bl-grid{display:grid;gap:1.15rem;grid-template-columns:1fr}
.bl-grid > *{min-width:0}
@media(min-width:620px){.bl-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1000px){.bl-grid{grid-template-columns:repeat(3,1fr)}}

.bl-card{
  position:relative;
  display:flex;flex-direction:column;
  background:var(--card);border:1px solid var(--line);border-radius:20px;overflow:hidden;
  transition:transform .24s var(--ease),box-shadow .24s var(--ease),border-color .24s var(--ease);
}
.bl-card:hover{transform:translateY(-3px);border-color:#E4D9C6;
  box-shadow:0 22px 44px -30px rgba(22,19,13,.5)}
/* The whole card is the link target. A 40px title is a poor tap
   target on a phone; the card is a good one. */
.bl-card{position:relative}
.bl-card-b h3 a::after{content:"";position:absolute;inset:0;z-index:1}
.bl-card .bl-tag{z-index:2}
.bl-card img{width:100%;aspect-ratio:16/10;object-fit:cover;display:block;
  background:var(--line2);color:transparent;font-size:0}
.bl-card-b{padding:.9rem 1rem 1.05rem;display:flex;flex-direction:column;gap:.45rem;flex:1}
.bl-card-b h3{
  font-family:var(--serif);font-weight:600;letter-spacing:-.012em;line-height:1.25;
  font-size:1.02rem;margin:0;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.bl-card-b h3 a{color:inherit;text-decoration:none}
.bl-card-b h3 a:hover{color:var(--od)}
.bl-card-b p{margin:0;font-size:.84rem;line-height:1.58;color:var(--soft);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bl-card-b .bl-meta{margin-top:auto;padding-top:.65rem}

/* Over the image, as in every reference: it labels the card without
   stealing a line of vertical space from the copy. */
.bl-tag{
  display:inline-block;padding:5px 11px;border-radius:999px;
  background:rgba(255,253,249,.94);color:var(--ink);border:1px solid rgba(22,19,13,.08);
  font:600 .67rem/1.5 var(--sans);letter-spacing:.04em;text-transform:uppercase;
  text-decoration:none;backdrop-filter:blur(6px);
}
.bl-card > .bl-tag{position:absolute;top:10px;left:10px;z-index:2}
.bl-card-b > .bl-tag{display:none}
.bl-meta{
  display:flex;flex-wrap:wrap;align-items:center;gap:5px 10px;
  font-size:.75rem;color:var(--mute);border-top:1px solid var(--line2);
}
.bl-meta span{display:inline-flex;align-items:center;gap:5px}

.bl-empty{
  text-align:center;padding:clamp(48px,8vw,84px) 20px;color:var(--mute);
  border:1px dashed var(--line);border-radius:22px;background:var(--paper);
}
.bl-empty h3{margin:0 0 8px;font:600 1.15rem var(--serif);color:var(--ink)}
.bl-empty p{margin:0 auto;max-width:44ch;font-size:.92rem;line-height:1.65}

.bl-pager{display:flex;flex-wrap:wrap;gap:var(--s1);justify-content:center;margin-top:var(--s5)}
.bl-pager a,.bl-pager span{
  min-width:42px;min-height:42px;display:inline-flex;align-items:center;justify-content:center;
  padding:0 14px;border-radius:999px;border:1px solid var(--line);background:#fff;
  font:600 .86rem var(--sans);color:var(--soft);text-decoration:none;
  transition:border-color .16s var(--ease),color .16s var(--ease);
}
.bl-pager a:hover{border-color:var(--od);color:var(--od)}
.bl-pager .on{background:var(--ink);border-color:var(--ink);color:#fff}

/* ══════════════════════════════════════════════════════════════
   SINGLE POST
   ══════════════════════════════════════════════════════════════ */
.bp-prog{
  position:fixed;top:0;left:0;height:3px;width:0;z-index:120;
  background:linear-gradient(90deg,var(--o),var(--od));
  transition:width .12s linear;
}
.bp-shell{
  width:var(--shell);margin-inline:auto;
  padding:clamp(96px,11vw,128px) 0 var(--s6);
  font-family:var(--sans);color:var(--ink);
  display:grid;gap:var(--s5);
}
@media(min-width:1000px){
  .bp-shell{grid-template-columns:minmax(0,1fr) 272px;align-items:start}
  .bp-side{position:sticky;top:96px}
}

.bp-back{
  display:inline-flex;align-items:center;gap:7px;margin:0 0 18px;
  font:600 .84rem var(--sans);color:var(--mute);text-decoration:none;
  transition:color .16s var(--ease);
}
.bp-back:hover{color:var(--od)}

.bp-tag{
  display:inline-block;padding:5px 13px;border-radius:999px;
  background:var(--os);color:var(--od);border:1px solid var(--oline);
  font:600 .7rem/1.5 var(--sans);letter-spacing:.04em;text-transform:uppercase;text-decoration:none;
}
.bp-h1{
  font-family:var(--serif);font-weight:700;letter-spacing:-.026em;line-height:1.08;
  font-size:clamp(1.85rem,4.6vw,3rem);margin:14px 0 0;max-width:22ch;
}
.bp-meta{
  display:flex;flex-wrap:wrap;align-items:center;gap:6px var(--s3);
  margin:var(--s3) 0 0;padding-bottom:var(--s3);border-bottom:1px solid var(--line);
  font-size:.83rem;color:var(--mute);
}
.bp-meta b{color:var(--ink2);font-weight:600}

/* Phone photos are portrait. Without an explicit object-position the
   crop takes the middle, which on a building shot means sky and road.
   Top-weighted keeps the subject. object-fit must win over any width
   or height attributes on the tag. */
.bp-cover{
  width:100%;aspect-ratio:16/9;height:auto;
  object-fit:cover;object-position:center 35%;
  display:block;border-radius:20px;margin:var(--s4) 0 0;background:var(--line2);
  box-shadow:0 28px 60px -44px rgba(22,19,13,.55);
}
@media(max-width:760px){.bp-cover{aspect-ratio:4/3;border-radius:14px}}

/* ── article body - the part that looked worst ─────────────── */
.bp-body{
  margin-top:var(--s4);
  font-size:clamp(1rem,1.9vw,1.08rem);line-height:1.8;color:var(--ink2);
  max-width:68ch;
}
.bp-body > * + *{margin-top:1.15em}
.bp-body h2{
  font-family:var(--serif);font-weight:700;letter-spacing:-.018em;line-height:1.2;
  font-size:clamp(1.4rem,3vw,1.85rem);color:var(--ink);
  margin-top:2em;scroll-margin-top:96px;
}
.bp-body h3{
  font-family:var(--serif);font-weight:600;letter-spacing:-.012em;line-height:1.28;
  font-size:clamp(1.16rem,2.3vw,1.35rem);color:var(--ink);
  margin-top:1.7em;scroll-margin-top:96px;
}
.bp-body h4{font:600 1.02rem var(--sans);color:var(--ink);margin-top:1.5em}
.bp-body p{margin:0}
.bp-body a{color:var(--od);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1.5px}
.bp-body a:hover{color:var(--ink)}
.bp-body strong{color:var(--ink);font-weight:600}
.bp-body ul,.bp-body ol{margin:0;padding-left:1.35em}
.bp-body li + li{margin-top:.5em}
.bp-body li::marker{color:var(--o)}
.bp-body img{width:100%;height:auto;border-radius:16px;margin:1.6em 0;border:1px solid var(--line)}
.bp-body figure{margin:1.6em 0}
.bp-body figcaption{margin-top:.6em;font-size:.82rem;color:var(--mute);text-align:center}
.bp-body blockquote{
  margin:1.6em 0;padding:18px 22px;border-left:3px solid var(--o);
  background:var(--os);border-radius:0 14px 14px 0;
  font-family:var(--serif);font-size:1.1rem;line-height:1.6;color:var(--ink);
}
.bp-body blockquote p{margin:0}
.bp-body code{
  background:var(--line2);padding:2px 6px;border-radius:5px;
  font:500 .88em ui-monospace,'SF Mono',Menlo,monospace;color:var(--ink);
}
.bp-body pre{
  background:var(--ink);color:#F7F2E8;padding:18px;border-radius:14px;overflow-x:auto;
  font:400 .85rem/1.6 ui-monospace,'SF Mono',Menlo,monospace;
}
.bp-body pre code{background:none;padding:0;color:inherit}
.bp-body hr{border:0;border-top:1px solid var(--line);margin:2.2em 0}
.bp-body table{
  width:100%;border-collapse:collapse;font-size:.92rem;
  border:1px solid var(--line);border-radius:12px;overflow:hidden;
}
.bp-body th,.bp-body td{padding:11px 14px;text-align:left;border-bottom:1px solid var(--line2)}
.bp-body th{background:var(--os);font-weight:600;color:var(--ink);font-size:.82rem;
  letter-spacing:.05em;text-transform:uppercase}
.bp-body tr:last-child td{border-bottom:0}

/* ── table of contents ─────────────────────────────────────── */
.bp-toc{
  background:var(--card);border:1px solid var(--line);border-radius:18px;padding:var(--s3);
}
.bp-toc b{display:block;font:600 .72rem var(--sans);letter-spacing:.12em;
  text-transform:uppercase;color:var(--mute);margin-bottom:12px}
.bp-toc ol,.bp-toc ul{margin:0;padding:0;list-style:none;counter-reset:toc}
.bp-toc li{counter-increment:toc;margin-bottom:2px}
.bp-toc a{
  display:flex;gap:9px;padding:7px 9px;border-radius:9px;
  font-size:.85rem;line-height:1.45;color:var(--soft);text-decoration:none;
  transition:background-color .14s var(--ease),color .14s var(--ease);
}
.bp-toc a::before{content:counter(toc,decimal-leading-zero);
  font:600 .7rem ui-monospace,monospace;color:var(--o);flex:none;padding-top:2px}
.bp-toc a:hover,.bp-toc a.on{background:var(--os);color:var(--ink)}

/* ── share ─────────────────────────────────────────────────── */
.bp-share{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.bp-share a{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-height:42px;padding:0 15px;border-radius:999px;
  border:1px solid var(--line);background:#fff;color:var(--soft);
  font:600 .82rem var(--sans);text-decoration:none;
  transition:border-color .16s var(--ease),color .16s var(--ease),background-color .16s var(--ease);
}
.bp-share a:hover{border-color:var(--od);color:var(--od);background:var(--os)}

/* ── FAQ ───────────────────────────────────────────────────── */
.bp-faq{margin-top:var(--s5);max-width:68ch}
.bp-faq > b,.bp-faq > h2{
  display:block;font-family:var(--serif);font-weight:700;letter-spacing:-.018em;
  font-size:clamp(1.35rem,2.8vw,1.75rem);color:var(--ink);margin:0 0 16px;
}
.bp-faq details{
  border:1px solid var(--line);border-radius:14px;background:#fff;
  margin-bottom:10px;overflow:hidden;transition:border-color .16s var(--ease);
}
.bp-faq details[open]{border-color:var(--oline)}
.bp-faq summary{
  padding:15px 18px;cursor:pointer;list-style:none;
  font:600 .95rem var(--sans);color:var(--ink);
  display:flex;justify-content:space-between;align-items:center;gap:14px;
}
.bp-faq summary::-webkit-details-marker{display:none}
.bp-faq summary::after{content:"+";color:var(--od);font-size:1.3rem;line-height:1;
  flex:none;transition:transform .2s var(--ease)}
.bp-faq details[open] summary::after{transform:rotate(45deg)}
.bp-faq .a,.bp-faq details > div,.bp-faq details > p{
  padding:0 18px 16px;font-size:.9rem;line-height:1.7;color:var(--soft);margin:0;
}

/* ── tags ──────────────────────────────────────────────────── */
.bp-tags{display:flex;flex-wrap:wrap;gap:var(--s1);margin-top:var(--s5);
  padding-top:var(--s3);border-top:1px solid var(--line)}
.bp-tags a,.bp-tags span{
  padding:7px 14px;border-radius:999px;border:1px solid var(--line);
  background:var(--paper);color:var(--soft);font:500 .8rem var(--sans);text-decoration:none;
}
.bp-tags a:hover{border-color:var(--od);color:var(--od)}

/* ── CTA ───────────────────────────────────────────────────── */
.bp-cta{
  margin-top:var(--s5);padding:clamp(var(--s4),4vw,var(--s5));
  background:var(--ink);color:var(--paper);border-radius:24px;text-align:center;
}
.bp-cta h3{font-family:var(--serif);font-weight:700;letter-spacing:-.02em;line-height:1.15;
  font-size:clamp(1.3rem,3vw,1.9rem);margin:0 0 10px;color:#fff}
.bp-cta p{margin:0 auto 20px;max-width:46ch;font-size:.94rem;line-height:1.65;
  color:rgba(255,253,249,.72)}
.bp-cta a{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:52px;padding:0 26px;border-radius:999px;
  background:var(--o);color:#16130d;font:600 .93rem var(--sans);text-decoration:none;
  transition:transform .18s var(--ease),background-color .18s var(--ease);
}
.bp-cta a:hover{background:#FFA163;transform:translateY(-2px)}

/* ── related ───────────────────────────────────────────────── */
.bp-rel{margin-top:var(--s6)}
.bp-rel > b,.bp-rel > h2{
  display:block;font-family:var(--serif);font-weight:700;letter-spacing:-.018em;
  font-size:clamp(1.3rem,2.8vw,1.7rem);color:var(--ink);margin:0 0 18px;
}
.bp-rel-grid{display:grid;gap:var(--s3);grid-template-columns:1fr}
@media(min-width:620px){.bp-rel-grid{grid-template-columns:repeat(3,1fr)}}
.bp-rel-card{
  display:flex;flex-direction:column;background:var(--card);
  border:1px solid var(--line);border-radius:16px;overflow:hidden;
  text-decoration:none;color:inherit;
  transition:transform .22s var(--ease),border-color .22s var(--ease),box-shadow .22s var(--ease);
}
.bp-rel-card:hover{transform:translateY(-3px);border-color:#E4D9C6;
  box-shadow:0 20px 40px -30px rgba(22,19,13,.5)}
.bp-rel-card img{width:100%;aspect-ratio:16/10;object-fit:cover;background:var(--line2)}
.bp-rel-card b{display:block;padding:14px 15px 6px;font:600 .92rem/1.35 var(--serif);color:var(--ink)}
.bp-rel-card span{display:block;padding:0 15px 15px;font-size:.78rem;color:var(--mute)}

/* ══════════════════════════════════════════════════════════════
   MOBILE - 99% of traffic. Verified against the rendered markup:
   <main> > .bp-shell > <article> + <aside class="bp-side">
   ══════════════════════════════════════════════════════════════ */
@media(max-width:760px){
  .bp-shell{
    /* the shell is the only horizontal padding on the page, so it
       must never collapse - full-bleed text was the whole problem */
    width:100%;
    padding-inline:20px;
    padding-top:88px;
    gap:var(--s4);
  }
  .bp-h1{font-size:clamp(1.55rem,7vw,2.1rem);line-height:1.14;max-width:none;margin-top:10px}
  .bp-meta{font-size:.78rem;gap:4px 12px;margin-top:12px;padding-bottom:14px}
  .bp-cover{margin-top:18px}
  .bp-body{font-size:1rem;line-height:1.72;max-width:none}
  .bp-body > * + *{margin-top:1.05em}
  .bp-body h2{font-size:1.32rem;margin-top:1.7em}
  .bp-body h3{font-size:1.12rem;margin-top:1.4em}
  .bp-body ul,.bp-body ol{padding-left:1.15em}
  .bp-body img{border-radius:12px;margin:1.2em 0}
  .bp-body blockquote{padding:14px 16px;font-size:1rem}
  /* A table wrapped by the editor scrolls inside its own box. One
     pasted without a wrapper still must not blow the layout out. */
  .bp-body table{display:block;overflow-x:auto;white-space:nowrap;
    -webkit-overflow-scrolling:touch}
  /* the TOC is noise on mobile; the article is the page */
  .bp-side{display:none}
  .bp-cta{padding:24px 20px;border-radius:18px;margin-top:var(--s4)}
  .bp-cta h3{font-size:1.3rem}
  .bp-rel-grid{gap:12px}
  .bp-share a{min-height:44px}
  .bl-wrap{padding-top:88px}
  .bl-h1{font-size:clamp(1.9rem,8vw,2.4rem)}
  .bl-search{flex:1 1 100%;max-width:none}
  .bl-search button{padding:0 15px;font-size:.8rem}
  .bl-hero img{min-height:180px}
}

/* very small phones */
@media(max-width:380px){
  .bp-shell{padding-inline:16px}
  .bl-wrap{padding-inline:0}
  .bp-body{font-size:.97rem}
}

@media(prefers-reduced-motion:reduce){
  .bl-card:hover,.bp-rel-card:hover,.bp-cta a:hover{transform:none}
  *{transition:none!important}
}


/* ══════════════════════════════════════════════════════════════
   CONTENT FROM THE EDITOR
   Anything the editor can produce has to survive a 360px screen.
   These rules are the safety net for pasted markup - a hardcoded
   width or an inline style that got through the paste cleaner.
   ══════════════════════════════════════════════════════════════ */
.bp-body .tbl-scroll{
  overflow-x:auto;margin:1.6em 0;-webkit-overflow-scrolling:touch;
  border:1px solid var(--line);border-radius:12px;
}
.bp-body .tbl-scroll table{
  margin:0;border:0;border-radius:0;min-width:440px;display:table;white-space:normal;
}
.bp-body .tbl-scroll::-webkit-scrollbar{height:6px}
.bp-body .tbl-scroll::-webkit-scrollbar-thumb{background:var(--line);border-radius:99px}

/* A wide table gives no clue it scrolls. This fades the right edge
   so it is obvious there is more. */
@media(max-width:760px){
  .bp-body .tbl-scroll{position:relative}
  .bp-body .tbl-scroll::after{
    content:"";position:sticky;right:0;top:0;float:right;
    width:26px;height:100%;pointer-events:none;
    background:linear-gradient(90deg,transparent,var(--card));
  }
}

/* Pasted content routinely carries fixed widths and inline sizes.
   These win over anything inline that survived. */
.bp-body img,.bp-body iframe,.bp-body video,.bp-body embed{
  max-width:100%!important;height:auto!important;
}
.bp-body iframe{aspect-ratio:16/9;width:100%;border:0;border-radius:12px}
.bp-body [style*="width"]{max-width:100%!important}
.bp-body font{font-size:inherit!important;font-family:inherit!important}
.bp-body *{max-width:100%}

/* Long unbroken strings - a URL, an account number - push the page
   sideways on a phone. */
.bp-body{overflow-wrap:break-word;word-break:break-word}
.bp-body pre{white-space:pre-wrap;word-break:break-word}

/* Indent levels from the editor */
.bp-body .ql-indent-1{padding-left:2.2em}
.bp-body .ql-indent-2{padding-left:4.4em}
.bp-body .ql-indent-3{padding-left:6.6em}
@media(max-width:600px){
  .bp-body .ql-indent-1{padding-left:1.3em}
  .bp-body .ql-indent-2{padding-left:2.6em}
  .bp-body .ql-indent-3{padding-left:3.9em}
}
.bp-body .ql-align-center{text-align:center}
.bp-body .ql-align-right{text-align:right}
.bp-body .ql-align-justify{text-align:justify}

/* ══════════════════════════════════════════════════════════════
   CONTENT BLOCKS
   Inserted by the editor's block picker. Every one has to work at
   360px, because that is where nearly all of the reading happens.
   ══════════════════════════════════════════════════════════════ */
.bp-body .blk{
  margin:1.9em 0;padding:clamp(15px,2.4vw,20px) clamp(16px,2.6vw,22px);
  border-radius:16px;border:1px solid var(--line);background:var(--paper);
}
.bp-body .blk > b{
  display:block;font:600 .93rem/1.4 var(--sans);color:var(--ink);margin:0 0 9px;
}
.bp-body .blk p{margin:0;max-width:none}
.bp-body .blk p + p{margin-top:.7em}
.bp-body .blk ul,.bp-body .blk ol{margin:0;padding-left:1.25em}
.bp-body .blk li + li{margin-top:.45em}

/* Key takeaways - sits near the top and gets read first */
.bp-body .blk-take{background:var(--os);border-color:var(--oline)}
.bp-body .blk-take > b{color:var(--od)}
.bp-body .blk-take li::marker{color:var(--o)}

/* Warning - the legal traps. Red, because it should interrupt. */
.bp-body .blk-warn{background:#FFF6F5;border-color:#F3D5D1}
.bp-body .blk-warn > b{color:#B3261E;display:flex;align-items:center;gap:7px}
.bp-body .blk-warn > b::before{content:"\26A0";font-size:1.05rem}

.bp-body .blk-tip{background:var(--os);border-color:var(--oline)}
.bp-body .blk-tip > b{color:var(--od);display:flex;align-items:center;gap:7px}
.bp-body .blk-tip > b::before{content:"\1F4A1"}

/* Checklist - ticks, not bullets. It is a thing you carry. */
.bp-body .blk-check{background:#F1FAF4;border-color:#CBEBD8}
.bp-body .blk-check > b{color:#1B7F45}
.bp-body .blk-check ul{list-style:none;padding-left:0}
.bp-body .blk-check li{position:relative;padding-left:27px}
.bp-body .blk-check li::before{
  content:"";position:absolute;left:0;top:.35em;width:15px;height:15px;
  border:1.5px solid #7FC79B;border-radius:4px;
}

/* Numbered steps */
.bp-body .blk-steps{background:#fff}
.bp-body .blk-steps ol{list-style:none;padding-left:0;counter-reset:s}
.bp-body .blk-steps li{
  counter-increment:s;position:relative;padding-left:40px;
  padding-bottom:14px;margin:0;
}
.bp-body .blk-steps li:not(:last-child){border-left:1px solid var(--line2);margin-left:13px;padding-left:27px}
.bp-body .blk-steps li::before{
  content:counter(s);position:absolute;left:-13px;top:0;
  width:26px;height:26px;border-radius:50%;display:grid;place-items:center;
  background:var(--ink);color:#fff;font:700 .76rem var(--sans);
}
.bp-body .blk-steps li:last-child{margin-left:13px;padding-left:27px}
.bp-body .blk-steps b{display:block;font-weight:600;color:var(--ink)}
.bp-body .blk-steps span{display:block;font-size:.89rem;color:var(--soft);margin-top:2px;line-height:1.6}

/* This or that */
.bp-body .blk-vs{
  display:grid;gap:12px;grid-template-columns:1fr 1fr;
  background:none;border:0;padding:0;
}
.bp-body .blk-vs > div{
  border:1px solid var(--line);border-radius:14px;padding:15px 17px;background:#fff;
}
.bp-body .blk-vs > div > b{display:block;font:600 .92rem var(--sans);margin-bottom:8px}
.bp-body .blk-vs-a > b{color:var(--od)}
.bp-body .blk-vs-b > b{color:var(--blue)}
.bp-body .blk-vs ul{padding-left:1.1em;font-size:.89rem}
@media(max-width:600px){.bp-body .blk-vs{grid-template-columns:1fr}}

/* Pull quote */
.bp-body .blk-quote{
  background:none;border:0;border-left:3px solid var(--o);border-radius:0;
  padding:4px 0 4px 20px;margin:2em 0;
}
.bp-body .blk-quote p{
  font-family:var(--serif);font-size:clamp(1.1rem,2.4vw,1.32rem);
  line-height:1.5;color:var(--ink);font-style:italic;
}

/* FAQ - also feeds FAQPage schema */
.bp-body .blk-faq{background:#fff}
.bp-body .blk-faq details{border-top:1px solid var(--line2);padding:2px 0}
.bp-body .blk-faq details:first-of-type{border-top:0}
.bp-body .blk-faq summary{
  cursor:pointer;list-style:none;padding:11px 26px 11px 0;position:relative;
  font:600 .93rem/1.45 var(--sans);color:var(--ink);
}
.bp-body .blk-faq summary::-webkit-details-marker{display:none}
.bp-body .blk-faq summary::after{
  content:"+";position:absolute;right:2px;top:9px;
  font-size:1.2rem;color:var(--od);transition:transform .2s var(--ease);
}
.bp-body .blk-faq details[open] summary::after{transform:rotate(45deg)}
.bp-body .blk-faq details p{padding:0 0 12px;font-size:.91rem;color:var(--soft)}

/* Editor note */
.bp-body .blk-note{
  background:none;border:0;border-left:2px solid var(--line);border-radius:0;
  padding:2px 0 2px 16px;margin:1.5em 0;
}
.bp-body .blk-note p{font-size:.9rem;color:var(--mute);line-height:1.65}

@media(max-width:600px){
  .bp-body .blk{margin:1.5em 0;border-radius:13px}
  .bp-body .blk-steps li{padding-left:24px}
  .bp-body .blk-steps li::before{width:22px;height:22px;font-size:.7rem;left:-11px}
}