/* The blog: an index of articles and the article page. Built by
   tools/blog/build.js; site.css carries the bar and the footer. */

/* ---- index ---- */
.bl-hero{background:linear-gradient(180deg,var(--bg2),#fff);border-bottom:1px solid var(--line)}
.bl-hero .wrap{padding-top:4.2rem;padding-bottom:2.8rem}
.bl-hero h1{font-size:clamp(2rem,4.6vw,3.2rem);font-weight:700;letter-spacing:-1.4px;line-height:1.08;margin:.9rem 0 1rem;max-width:16em}
.bl-hero h1 em{font-style:normal;color:var(--blue)}
.bl-hero p{font-size:1.06rem;line-height:1.7;color:var(--text2);max-width:40em}
/* the topics sit on one line that scrolls sideways, rather than wrapping into
   an uneven second row; the fade at the end shows there is more */
.bl-chips{display:flex;flex-wrap:nowrap;gap:8px;margin-top:2rem;overflow-x:auto;scrollbar-width:none;padding-bottom:4px;
  -webkit-mask-image:linear-gradient(90deg,#000 88%,transparent);mask-image:linear-gradient(90deg,#000 88%,transparent)}
.bl-chips::-webkit-scrollbar{display:none}
.bl-chip{flex-shrink:0}
.bl-chip{font:600 .82rem 'Inter',sans-serif;color:var(--text2);background:#fff;border:1px solid var(--line);padding:8px 14px;border-radius:999px;cursor:pointer;
  transition:color .15s,border-color .15s,background .15s}
.bl-chip:hover{color:var(--blue);border-color:#bfd0f7}
.bl-chip[aria-pressed="true"]{background:var(--navy);border-color:var(--navy);color:#fff}

.bl-main{padding-top:3rem}
.bl-feature{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);border:1px solid var(--line);border-radius:22px;overflow:hidden;text-decoration:none;background:#fff;
  box-shadow:0 1px 2px rgba(15,23,42,.04);transition:box-shadow .3s var(--ease),transform .3s var(--ease)}
.bl-feature:hover{box-shadow:0 22px 50px rgba(13,46,122,.13);transform:translateY(-2px)}
/* the picture fills whatever height the text needs, so image and text always
   line up top and bottom instead of the image towering over the words */
.bl-feature .bl-img{position:relative;min-height:340px}
.bl-feature .bl-img img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.bl-feature .bl-text{padding:2.6rem 2.6rem;display:flex;flex-direction:column;justify-content:center;gap:.2rem}
.bl-feature h2{font-size:clamp(1.3rem,2vw,1.6rem);font-weight:700;letter-spacing:-.5px;line-height:1.25;margin:.6rem 0 .7rem;text-wrap:balance}
.bl-feature p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.bl-more{margin-top:1.3rem;font:700 .9rem 'Sora',sans-serif;color:var(--blue)}
.bl-feature:hover .bl-more{text-decoration:underline;text-underline-offset:4px}
.bl-feature p{color:var(--text2);line-height:1.7;font-size:.97rem}
.bl-flag{display:inline-block;font-size:.68rem;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;color:var(--red);margin-bottom:.4rem}
@media(max-width:820px){.bl-feature{grid-template-columns:1fr}.bl-feature .bl-img{min-height:0;aspect-ratio:16/9}.bl-feature .bl-text{padding:1.6rem 1.4rem}}

.bl-img{position:relative;overflow:hidden;background:var(--bg2)}
.bl-img img{width:100%;height:100%;object-fit:cover;transition:transform .7s var(--ease)}
a:hover .bl-img img{transform:scale(1.04)}
.bl-cat{font-size:.7rem;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;color:var(--blue)}
.bl-meta{font-size:.8rem;color:var(--text3);margin-top:1rem}

.bl-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.6rem;margin-top:2.4rem}
.bl-card{display:flex;flex-direction:column;text-decoration:none;border-radius:18px;overflow:hidden;background:#fff;border:1px solid var(--line);
  transition:box-shadow .3s var(--ease),transform .3s var(--ease)}
.bl-card:hover{box-shadow:0 18px 40px rgba(13,46,122,.12);transform:translateY(-3px)}
.bl-card .bl-img{aspect-ratio:16/9}
.bl-card .bl-body{padding:1.3rem 1.3rem 1.4rem;display:flex;flex-direction:column;flex:1}
.bl-card h3{font-size:1.06rem;font-weight:700;letter-spacing:-.3px;line-height:1.35;margin:.55rem 0 .55rem}
.bl-card p{font-size:.88rem;color:var(--text2);line-height:1.62;flex:1}
.bl-card[hidden]{display:none}
@media(max-width:960px){.bl-grid{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.bl-grid{grid-template-columns:1fr}}
.bl-empty{color:var(--text3);padding:2rem 0}

.bl-band{margin-top:4.5rem;background:var(--navy);border-radius:24px;color:#fff;padding:3rem 2.4rem;display:grid;grid-template-columns:1.4fr 1fr;gap:2rem;align-items:center;
  background-image:radial-gradient(circle at 90% 10%,rgba(248,113,113,.22),transparent 45%),radial-gradient(circle at 0% 100%,rgba(26,86,219,.55),transparent 55%)}
.bl-band h2{font-size:clamp(1.4rem,2.6vw,1.9rem);font-weight:700;letter-spacing:-.7px;line-height:1.2}
.bl-band p{color:rgba(255,255,255,.75);line-height:1.7;margin-top:.7rem}
.bl-band .eyebrow{color:#fca5a5}
.bl-band-btns{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end}
@media(max-width:820px){.bl-band{grid-template-columns:1fr;padding:2.2rem 1.5rem}.bl-band-btns{justify-content:flex-start}}

/* ---- article ---- */
.rd-bar{position:fixed;top:0;left:0;height:3px;width:0;background:#f87171;z-index:120;transition:width .1s linear}
/* One column for everything that belongs to the article: the heading, the
   picture, the text and the share row all start and end on the same lines. */
.po{--po-w:760px}
.po-head,.po-fig,.po-body,.po-share{max-width:calc(var(--po-w) + 3rem);margin-left:auto;margin-right:auto;padding-left:1.5rem;padding-right:1.5rem}
.po-head{padding-top:3.4rem}
.po-crumb{display:flex;align-items:center;gap:8px;font-size:.78rem;font-weight:600}
.po-crumb a{color:var(--blue);text-decoration:none}
.po-crumb a:hover{text-decoration:underline;text-underline-offset:3px}
.po-crumb span{color:var(--text3)}
.po-crumb .po-cat{color:var(--text2);background:var(--bg2);border:1px solid var(--line);padding:3px 10px;border-radius:999px}
.po-head h1{font-size:clamp(1.85rem,3.6vw,2.6rem);font-weight:700;letter-spacing:-1px;line-height:1.16;margin:1rem 0 .9rem;text-wrap:balance}
.po-dek{font-size:1.1rem;line-height:1.7;color:var(--text2);text-wrap:pretty}
.po-by{display:flex;align-items:center;gap:12px;margin-top:1.5rem;padding-top:1.3rem;border-top:1px solid var(--line)}
.po-avatar{width:44px;height:44px;border-radius:12px;flex-shrink:0;box-shadow:0 2px 8px rgba(13,46,122,.12)}
.po-by div{display:flex;flex-direction:column;gap:2px;font-size:.84rem;color:var(--text3)}
.po-by .po-rev{color:var(--text2)}
.po-by .po-rev a{color:var(--blue);text-decoration:none;font-weight:600}
.po-by .po-rev a:hover{text-decoration:underline}
.po-by strong{color:var(--text);font-weight:600;font-size:.92rem}
.po-fig{margin-top:2rem}
.po-fig img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:18px;box-shadow:0 20px 50px rgba(13,46,122,.14)}

.po-body{padding-top:2.6rem;font-size:1.08rem;line-height:1.85;color:var(--text2)}
.po-body > p:first-child{font-size:1.18rem;line-height:1.75;color:var(--text)}
.po-body p{margin-bottom:1.25rem}
.po-body h2{font-size:1.5rem;font-weight:700;color:var(--text);letter-spacing:-.6px;line-height:1.25;margin:2.8rem 0 1rem}
.po-body h3{font-size:1.14rem;font-weight:700;color:var(--text);letter-spacing:-.3px;margin:2.1rem 0 .7rem}
.po-body ul,.po-body ol{margin:0 0 1.4rem 1.3rem}
.po-body li{margin-bottom:.6rem;padding-left:.3rem}
.po-body li::marker{color:var(--blue)}
.po-body strong{color:var(--text);font-weight:600}
.po-body a{color:var(--blue);text-underline-offset:3px}
.po-body .hl{background:linear-gradient(transparent 58%,#fde68a 58%);color:var(--text);font-weight:500}
@media(max-width:620px){.po-head{padding-top:2.4rem}.po-body{font-size:1.02rem}.po-body > p:first-child{font-size:1.08rem}.po-body h2{font-size:1.3rem}.po-fig img{border-radius:14px}}

/* ---- the long guides: contents, examples, tables, questions, sources ---- */
.po-toc{margin:0 0 2.4rem;padding:1.2rem 1.4rem;border:1px solid var(--line);border-radius:14px;background:var(--bg2)}
.po-toc-lab{font-size:.72rem;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;color:var(--text3);margin-bottom:.6rem}
.po-body .po-toc ol{margin:0;padding-left:1.3rem;columns:2;column-gap:2rem}
.po-body .po-toc li{margin:0 0 .35rem;font-size:.93rem;break-inside:avoid}
.po-body .po-toc a{color:var(--text);text-decoration:none}
.po-body .po-toc a:hover{color:var(--blue);text-decoration:underline}
@media(max-width:620px){.po-body .po-toc ol{columns:1}}
.po-body h2[id]{scroll-margin-top:84px}
.po-body code{font:500 .9em ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:var(--bg2);border:1px solid var(--line);padding:1px 6px;border-radius:6px;color:var(--text);word-break:break-all}
.ex{margin:1.6rem 0;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff}
.ex-lab{font-size:.72rem;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:#9a3412;background:#fff7ed;padding:.55rem 1rem;border-bottom:1px solid #fed7aa}
.ex-msg{padding:1rem 1.1rem;font-size:.98rem;line-height:1.7;color:var(--text);background:var(--bg2);border-bottom:1px solid var(--line);white-space:pre-line}
.ex-why{padding:.9rem 1.1rem;font-size:.95rem;line-height:1.7}
.ex-why ul{margin:.4rem 0 0 1.2rem}
.ex-why li{margin-bottom:.3rem}
.po-tbl{overflow-x:auto;margin:1.6rem 0;border:1px solid var(--line);border-radius:14px}
.po-body table{width:100%;border-collapse:collapse;font-size:.93rem;line-height:1.6}
.po-body th,.po-body td{text-align:left;padding:.75rem .95rem;border-bottom:1px solid var(--line);vertical-align:top}
.po-body th{background:var(--bg2);color:var(--text);font-size:.8rem;font-weight:700}
.po-body tr:last-child td{border-bottom:0}
.po-faq{display:flex;flex-direction:column;gap:.6rem;margin-bottom:1.4rem}
.po-faq details{border:1px solid var(--line);border-radius:12px;background:#fff}
.po-faq summary{cursor:pointer;padding:.9rem 1.1rem;font-weight:600;color:var(--text);list-style:none;display:flex;justify-content:space-between;gap:12px}
.po-faq summary::-webkit-details-marker{display:none}
.po-faq summary::after{content:'+';color:var(--blue);font-weight:700;flex-shrink:0}
.po-faq details[open] summary::after{content:'\2212'}
.po-faq details p{padding:0 1.1rem 1rem;margin:0;font-size:.98rem}
.po-refs{font-size:.92rem}
.po-refs li{margin-bottom:.45rem}

.note{border-radius:14px;padding:1.1rem 1.3rem;margin:1.8rem 0;font-size:.98rem;line-height:1.75;border:1px solid}
.note p:last-child,.note ul:last-child{margin-bottom:0}
.note ul{margin-top:.6rem}
.note-warn{background:#fff7ed;border-color:#fed7aa;color:#7c2d12}
.note-warn strong{color:#7c2d12}
.note-tip{background:#f0fdf4;border-color:#bbf7d0;color:#14532d}
.note-tip strong{color:#14532d}
.note-info{background:var(--blue-light);border-color:#c7d7fb;color:#1e3a8a}
.note-info strong{color:#1e3a8a}

.po-share{margin-top:2.6rem}
.po-share{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.po-share::before{content:'';flex-basis:100%;height:1px;background:var(--line);margin-bottom:.9rem}
.po-share-lab{font-size:.86rem;font-weight:600;color:var(--text)}
.po-share-btns{display:flex;gap:8px;flex-wrap:wrap}
.sh{display:inline-flex;align-items:center;gap:8px;font:600 .84rem 'Inter',sans-serif;color:#fff;border:0;padding:9px 15px;border-radius:999px;
  text-decoration:none;cursor:pointer;transition:transform .15s,box-shadow .15s,filter .15s}
.sh svg{width:16px;height:16px;flex-shrink:0}
.sh:hover{transform:translateY(-1px);filter:brightness(1.08);box-shadow:0 6px 16px -6px rgba(15,23,42,.45)}
.sh:active{transform:none}
.sh-li{background:#0a66c2}
.sh-wa{background:#25d366}
.sh-x{background:#000}
.sh-copy{background:var(--bg2);color:var(--text);box-shadow:inset 0 0 0 1px var(--line)}
.sh-copy:hover{filter:none;box-shadow:inset 0 0 0 1px #bfd0f7,0 6px 16px -8px rgba(15,23,42,.3)}
.sh-copy.done{background:#f0fdf4;color:var(--green);box-shadow:inset 0 0 0 1px #bbf7d0}
@media(max-width:520px){.po-share{flex-direction:column;align-items:flex-start}}

.po-cta{max-width:1080px;margin:4rem auto 0;padding:0 1.5rem}
.po-related{max-width:1080px;margin:4.5rem auto 0;padding:0 1.5rem}
.po-related-head{display:flex;justify-content:space-between;align-items:end;gap:12px}
.po-related-head h2{font-size:1.5rem;font-weight:700;letter-spacing:-.6px}
.po-related-head a{font-size:.88rem;font-weight:600;color:var(--blue);text-decoration:none}
.po-related .bl-grid{margin-top:1.4rem}
/* on a phone the topics scroll sideways rather than stacking five rows deep */
@media(max-width:620px){
  .bl-chips{margin:1.6rem -1.5rem 0;padding:0 1.5rem 4px}
}
