/* Blog posts and the /blogs index. Markup: tools/build_blog.py.
   Layout, type and colour are inline, like the rest of the site; the shared pieces
   (breadcrumb, inline links, FAQ accordion, video facade, cards) use the rules in
   procedure.css. This file only holds what inline styles can't express. */

/* Reading layout: one column on phones and tablets; from 1024px a sticky
   "On this page" list beside an article column of about 70 characters. */
.bl-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
.bl-body{width:100%;max-width:37.5em;margin:0 auto}
.bl-toc-side{display:none !important}
@media (min-width:1024px){
  .bl-layout{grid-template-columns:240px minmax(0,37.5em);justify-content:center;column-gap:clamp(56px,6vw,96px)}
  .bl-body{margin:0}
  .bl-toc-side{display:flex !important}
  .bl-toc-fold{display:none}
}
.bl-body h2,.bl-body h3{scroll-margin-top:24px}

/* Hero meta line: tighter tracking on phones so it wraps to two lines, not three */
@media (max-width:599px){.bl-meta{font-size:12px !important;letter-spacing:.06em !important}}

/* Card rows: three across (two for 1, 2 or 4 cards), a short last row centered */
.bl-cards>li{flex:0 1 calc((100% - 48px)/3)}
.bl-cards.bl-two>li{flex-basis:calc((100% - 24px)/2)}
@media (max-width:1099px){.bl-cards>li{flex-basis:calc((100% - 24px)/2)}}
@media (max-width:759px){.bl-cards>li,.bl-cards.bl-two>li{flex-basis:100%}}

/* "On this page" links */
.bl-toc a:hover>span:last-child{text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:1px}
.bl-toc a:focus-visible{outline:2px solid #111317;outline-offset:2px}

/* The folded list on small screens: native <details>, no script */
.bl-toc-fold summary{list-style:none}
.bl-toc-fold summary::-webkit-details-marker{display:none}
.bl-toc-fold summary::marker{content:''}
.bl-toc-fold summary:focus-visible{outline:2px solid #111317;outline-offset:3px}
.bl-toc-ind::before{content:'+'}
.bl-toc-fold details[open] .bl-toc-ind::before{content:'\2212'}
.bl-toc-fold summary:hover .bl-toc-ind{border-color:#111317 !important}

/* Table: one card per row under 760px. The ARIA roles in the markup keep the
   table semantics when the display changes. */
@media (max-width:759px){
  .bl-table,.bl-table tbody,.bl-table tr,.bl-table th,.bl-table td{display:block;width:auto !important}
  .bl-table{border-bottom:0 !important}
  .bl-table caption{display:block;padding-bottom:12px !important;border-bottom:1px solid #111317}
  .bl-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
  .bl-table tbody{display:flex;flex-direction:column;gap:12px;padding-top:12px}
  .bl-table tbody tr{padding:4px 18px 12px;background:#FFFFFF;border:1px solid #D5D9DE}
  .bl-table tbody th{padding:14px 0 6px !important;border:0 !important;font-family:'Playfair Display',Georgia,serif !important;font-size:17px !important;line-height:23px !important;font-weight:600 !important;letter-spacing:.03em !important;color:#111317 !important}
  .bl-table td{padding:8px 0 !important;border:0 !important}
  .bl-table td+td{border-top:1px solid #E3E6EA !important}
  .bl-table td::before{content:attr(data-label);display:block;margin-bottom:2px;font-size:10px;line-height:14px;font-weight:500;letter-spacing:.18em;text-transform:uppercase;color:#4E555D}
}

/* Video facade inside the reading column: the procedure rule stacks it under 600px */
.bl-body figure .pr-yt:focus-visible{outline-color:#111317}

@media print{
  .skip-link,.bl-toc,#consult,#related-procedures,#related-articles,footer{display:none !important}
  .bl-layout{display:block}
}
