/* ==========================================================
   WEB ACADEMY — BLOG  ·  shared stylesheet (same canvas design system)
   RTL · mobile-first
   ========================================================== */

/* ------------------------------------------------------------------
   FONTS

   The @font-face block that used to sit here was a verbatim copy of
   assets/fonts.css — ~3 KB of duplicate declarations and two places to
   change one URL. The declarations now live only in fonts.css, which the
   page links directly (see wa_page_head in api/blog.php).

   A <link> rather than an @import on purpose: @import serialises the
   request behind blog.css, which is exactly the wrong thing to do to the
   stylesheet that carries the above-the-fold typeface.
   ------------------------------------------------------------------ */

:root{
  --paper:#fbfcfe; --paper-2:#f3f6fb; --ink:#0e1c36; --ink-2:#12294f;
  --soft:#47597b; --faint:#8093ae; --line:#e3eaf5; --line-2:#cdd9ec;
  --steel:#2c64ad; --steel-deep:#1d426f; --sky:#dceafb; --sky-2:#eaf2fc;
  --brass:#c09547; --brass-soft:#f2e3c3; --green:#4e9168;
  --card-sh:0 12px 34px -20px rgba(14,28,54,.25);
  --card-sh-lg:0 30px 70px -34px rgba(14,28,54,.35);
  --r:14px; --max:1200px; --ease:cubic-bezier(.16,1,.3,1);
}
*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth; scroll-padding-top:96px;}
html,body{max-width:100%;}
body{font-family:'Tajawal',sans-serif; background:var(--paper); color:var(--ink);
  line-height:1.7; -webkit-font-smoothing:antialiased; overflow-x:clip;}
img,svg{display:block; max-width:100%; height:auto;}
a{color:inherit; text-decoration:none;}
button{font-family:inherit; cursor:pointer;}
h1,h2,h3,h4{font-weight:800; color:var(--ink); letter-spacing:-.01em; text-wrap:balance;}
.en{font-family:'Poppins','Tajawal',sans-serif; direction:ltr; unicode-bidi:isolate;}
.wrap{max-width:var(--max); margin:0 auto; padding:0 20px; min-width:0;}
::selection{background:var(--steel); color:#fff;}
:focus-visible{outline:2.5px solid var(--steel); outline-offset:3px; border-radius:6px;}

.canvas{position:relative;}
.canvas::before{content:""; position:absolute; inset:0; pointer-events:none;
  background-image:radial-gradient(circle,#d5dff0 1.15px,transparent 1.15px); background-size:24px 24px;
  -webkit-mask-image:radial-gradient(85% 80% at 50% 40%,#000 30%,transparent 100%);
          mask-image:radial-gradient(85% 80% at 50% 40%,#000 30%,transparent 100%);}
.canvas > *{position:relative;}

.q{display:inline-flex; align-items:center; gap:8px; font-size:13.5px; font-weight:700; color:var(--steel-deep);
  background:var(--sky-2); border:1px solid var(--sky); padding:7px 16px; border-radius:100px; margin-bottom:16px;}
.q::before{content:"؟"; display:inline-flex; width:20px; height:20px; border-radius:50%; background:var(--steel);
  color:#fff; font-size:12px; align-items:center; justify-content:center; font-weight:800;}
.script{font-family:'Aref Ruqaa',serif; font-weight:700; color:var(--steel); position:relative;
  display:inline-block; padding:0 .12em; line-height:1.25;}
.script::before{content:""; position:absolute; inset:8% -2% 4%; z-index:-1; background:var(--sky);
  border-radius:6px; transform:rotate(-1.6deg);}

.btn{display:inline-flex; align-items:center; justify-content:center; gap:10px; padding:15px 26px;
  border-radius:13px; font-weight:800; font-size:15.5px; border:1.5px solid transparent;
  transition:transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s; white-space:nowrap;}
.btn-primary{background:linear-gradient(180deg,#1d3a66,var(--ink-2)); color:#fff;
  box-shadow:0 14px 30px -14px rgba(18,41,79,.65), inset 0 1px 0 rgba(255,255,255,.16);}
.btn-primary:hover{transform:translateY(-2px);}
.btn-primary img{width:22px; height:22px;}
.btn-ghost{background:#fff; color:var(--ink-2); border-color:var(--line-2);}
.btn-ghost:hover{border-color:var(--steel); background:var(--sky-2); transform:translateY(-2px);}
.card{background:#fff; border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--card-sh);}
.chip{display:inline-flex; align-items:center; gap:7px; background:#fff; border:1px solid var(--line);
  border-radius:100px; padding:8px 14px; font-size:12.5px; font-weight:700; color:var(--soft);
  box-shadow:var(--card-sh); white-space:nowrap;}
.chip b{color:var(--ink-2);}

.rv{opacity:0; transform:translateY(22px); transition:opacity .7s var(--ease), transform .7s var(--ease);}
.rv.in{opacity:1; transform:none;}
@media (prefers-reduced-motion:reduce){*{animation:none !important; transition:none !important;} .rv{opacity:1; transform:none;}}

/* nav */
header{position:fixed; top:12px; inset-inline:0; z-index:300; display:flex; justify-content:center; padding:0 12px; pointer-events:none;}
.nav{pointer-events:all; width:100%; max-width:1120px;
  background:rgba(255,255,255,.72); backdrop-filter:blur(18px) saturate(170%); -webkit-backdrop-filter:blur(18px) saturate(170%);
  border:1px solid rgba(220,230,246,.95); border-radius:16px; box-shadow:0 14px 40px -20px rgba(14,28,54,.28);
  padding:10px 14px; display:flex; align-items:center; justify-content:space-between; gap:14px; transition:background .3s;}
header.scrolled .nav{background:rgba(255,255,255,.95);}
.nav-logo img{height:34px; width:auto;}
.nav-links{display:none; gap:20px; align-items:center;}
.nav-links a{font-size:14px; font-weight:700; color:var(--soft); position:relative; padding:4px 0;}
.nav-links a.on, .nav-links a:hover{color:var(--ink-2);}
.nav-links a::after{content:""; position:absolute; bottom:-2px; inset-inline:0; height:2.5px; border-radius:2px;
  background:var(--steel); transform:scaleX(0); transition:transform .2s var(--ease);}
.nav-links a.on::after, .nav-links a:hover::after{transform:scaleX(1);}
.nav-cta .btn{padding:11px 20px; font-size:13.5px;}
@media(min-width:800px){ .nav-links{display:flex;} }
@media(max-width:799px){ .nav-cta .btn{padding:10px 16px; font-size:12.5px;} .nav-logo img{height:29px;} }

/* blog hero */
.b-hero{padding:130px 0 30px; text-align:center;}
.b-hero h1{font-size:clamp(32px,7.5vw,58px); line-height:1.3; font-weight:900;}
.b-hero p{font-size:clamp(14.5px,2vw,17px); color:var(--soft); max-width:620px; margin:16px auto 0; font-weight:500;}
@media(min-width:900px){ .b-hero{padding:160px 0 44px;} }

/* posts grid */
.posts{padding:34px 0 80px;}
.p-grid{display:grid; grid-template-columns:1fr; gap:20px;}
@media(min-width:680px){ .p-grid{grid-template-columns:1fr 1fr;} }
@media(min-width:1020px){ .p-grid{grid-template-columns:repeat(3,1fr); gap:24px;} }
.p-card{display:flex; flex-direction:column; overflow:hidden; transition:transform .25s var(--ease), box-shadow .25s;}
.p-card:hover{transform:translateY(-6px); box-shadow:var(--card-sh-lg);}
.p-band{height:118px; display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden;}
.p-band::before{content:""; position:absolute; inset:0;
  background-image:radial-gradient(circle,rgba(255,255,255,.22) 1.1px,transparent 1.1px); background-size:20px 20px;}
.p-band svg{width:42px; height:42px; color:#fff; position:relative; filter:drop-shadow(0 6px 14px rgba(5,12,28,.35));}
.p-band .num{position:absolute; bottom:-14px; inset-inline-start:14px; font-family:'Aref Ruqaa',serif;
  font-size:54px; color:rgba(255,255,255,.28); line-height:1;}
.band-steel{background:linear-gradient(150deg,#2c64ad,#1d426f);}
.band-ink{background:linear-gradient(150deg,#28497e,#0e1c36);}
.band-brass{background:linear-gradient(150deg,#c09547,#8a6526);}
.band-green{background:linear-gradient(150deg,#4e9168,#2f5f43);}
.p-cont{padding:18px 20px 20px; display:flex; flex-direction:column; flex:1;}
.p-tag{font-size:11px; font-weight:800; color:var(--steel-deep); background:var(--sky-2); border:1px solid var(--sky);
  border-radius:100px; padding:4px 12px; width:fit-content; margin-bottom:11px;}
.p-cont h3{font-size:16.5px; line-height:1.55; margin-bottom:8px;}
.p-cont p{font-size:13px; color:var(--soft); font-weight:500; line-height:1.7; flex:1;}
.p-meta{display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:14px;
  padding-top:13px; border-top:1px solid var(--line); font-size:11.5px; color:var(--faint); font-weight:700;}
.p-meta .go{color:var(--steel); font-weight:800; font-size:12.5px;}

/* article */
.post-hero{padding:126px 0 10px; text-align:center;}
.post-hero .crumb{font-size:12.5px; font-weight:700; color:var(--faint); margin-bottom:14px; display:flex; gap:7px; justify-content:center; flex-wrap:wrap;}
.post-hero .crumb a{color:var(--steel);}
.post-hero h1{font-size:clamp(26px,5.6vw,44px); line-height:1.45; max-width:860px; margin:6px auto 18px;}
.post-hero .pmeta{display:flex; gap:8px 18px; justify-content:center; flex-wrap:wrap; font-size:12.5px; color:var(--faint); font-weight:700;}
.post-hero .pmeta b{color:var(--steel-deep);}
@media(min-width:900px){ .post-hero{padding:158px 0 16px;} }
/* ==========================================================================
   ARTICLE BODY

   THE RULE THIS SECTION EXISTS TO ENFORCE:

     A container that holds prose is NEVER display:flex or display:grid.

   Flex and grid promote every child — including every bare text node — to
   an independent layout item. `<li><b>Label:</b> sentence</li>` in a
   `grid-template-columns:20px 1fr` container therefore became three items:
   the ✓ marker, the <b>, and the sentence. The <b> took the 1fr track and
   the sentence was pushed to the next row into the 20px track, where it
   wrapped one word per line. Every list item rendered ~299px tall instead
   of ~30px, on 64 of the 71 list items on the blog, and the identical bug
   in .callout hit 19 of 20 callouts.

   Nothing looked wrong in the CSS, which is why it survived review: the
   rule is only wrong in the presence of an inline child, and every author
   writes `<li><b>…` without thinking about it.

   Markers are therefore positioned, not laid out. scripts/verify-design.php
   asserts the rule statically and e2e/blog-layout.spec.ts asserts the
   rendered heights, because a comment alone would not have stopped it.
   ========================================================================== */
.post-body{max-width:min(720px,70ch); margin:0 auto; padding:28px 20px 30px;
  font-size:17px; color:#33445f; font-weight:500; line-height:1.95;}
.post-body > p{margin-bottom:20px; line-height:1.95;}
.post-body .lead{font-size:19.5px; color:var(--ink-2); font-weight:700; line-height:1.9; margin-bottom:22px;}
.post-body h2{font-size:clamp(23px,4vw,30px); margin:44px 0 16px; line-height:1.5; scroll-margin-top:104px;}
.post-body h3{font-size:19.5px; margin:30px 0 11px; line-height:1.6; scroll-margin-top:104px;}
.post-body b{color:var(--ink-2);}
.post-body a{color:var(--steel); font-weight:700; text-decoration:underline;
  text-decoration-thickness:1.5px; text-underline-offset:3px; text-decoration-color:var(--line-2);
  transition:text-decoration-color .2s, color .2s;}
.post-body a:hover{color:var(--steel-deep); text-decoration-color:var(--steel);}

/* heading anchors — the ToC and any AI engine citing a section need these */
.post-body h2, .post-body h3{position:relative;}
.post-body .h-anchor{position:absolute; inset-inline-end:100%; padding-inline-end:8px;
  color:var(--line-2); font-weight:700; opacity:0; transition:opacity .18s; text-decoration:none;}
.post-body h2:hover .h-anchor, .post-body h3:hover .h-anchor,
.post-body .h-anchor:focus-visible{opacity:1;}
@media(max-width:900px){ .post-body .h-anchor{display:none;} }

/* lists — block flow, absolutely positioned marker. See the rule above. */
.post-body ul, .post-body ol{margin:0 0 20px; padding-inline-start:0; list-style:none;}
.post-body li{position:relative; padding-inline-start:30px; line-height:1.9; margin-bottom:10px;}
.post-body li:last-child{margin-bottom:0;}
.post-body ul > li::before{content:"✓"; position:absolute; inset-inline-start:0; top:0;
  color:var(--green); font-weight:900; line-height:1.9;}
.post-body ol{counter-reset:wa-step;}
.post-body ol > li{counter-increment:wa-step; padding-inline-start:34px;}
.post-body ol > li::before{content:counter(wa-step); position:absolute; inset-inline-start:0; top:4px;
  width:22px; height:22px; display:grid; place-items:center; border-radius:50%;
  background:var(--sky-2); color:var(--steel-deep); font-size:12.5px; font-weight:900; line-height:1;}
/* nested lists keep the rhythm without re-numbering from 1 */
.post-body li > ul, .post-body li > ol{margin:10px 0 0;}

/* callout — same rule: positioned marker, block flow. */
.callout{position:relative; padding:20px 22px; padding-inline-start:54px; margin:26px 0;
  border-inline-start:3px solid var(--brass); background:#fff; border-radius:0 var(--r) var(--r) 0;
  border-top:1px solid var(--line); border-bottom:1px solid var(--line); border-inline-end:1px solid var(--line);
  box-shadow:var(--card-sh); font-size:15px; line-height:1.9;}
.callout::before{content:"✦"; position:absolute; inset-inline-start:22px; top:20px;
  color:var(--brass); font-size:18px; line-height:1.9;}
.post-cta{margin:40px auto 0; max-width:780px; text-align:center;
  background:linear-gradient(175deg,#14294e,#0b1730); border-radius:22px; padding:38px 24px; color:#fff;}
.post-cta h2{color:#fff; font-size:clamp(21px,4.6vw,30px); margin-bottom:8px;}
.post-cta h2 .script{color:#8fb4e4;}
.post-cta h2 .script::before{background:rgba(95,159,230,.16);}
.post-cta p{color:#aebdd8; font-size:14.5px; max-width:460px; margin:0 auto 22px;}
.post-cta .row{display:flex; gap:11px; justify-content:center; flex-wrap:wrap;}
.post-cta .btn-ghost{background:transparent; color:#fff; border-color:rgba(255,255,255,.3);}
.post-cta .btn-ghost:hover{background:rgba(255,255,255,.08); border-color:#fff;}
.related{max-width:780px; margin:0 auto; padding:44px 20px 80px;}
.related h2{font-size:20px; margin-bottom:18px;}
.rel-grid{display:grid; grid-template-columns:1fr; gap:12px;}
@media(min-width:720px){ .rel-grid{grid-template-columns:repeat(3,1fr);} }
.rel-card{padding:16px 18px; font-size:13.5px; font-weight:800; color:var(--ink-2); line-height:1.6;
  transition:transform .2s var(--ease), box-shadow .2s;}
.rel-card:hover{transform:translateY(-4px); box-shadow:var(--card-sh-lg);}
.rel-card small{display:block; margin-top:8px; color:var(--steel); font-weight:800; font-size:12px;}

/* footer */
footer{background:#0b1730; color:#93a5c6; padding:46px 0 26px; margin-top:20px;}
.f-in{display:flex; flex-direction:column; gap:18px; align-items:center; text-align:center;}
.f-in img{height:96px; width:auto;}
.f-in p{font-size:13px; max-width:420px; font-weight:500;}
.f-links{display:flex; gap:8px 22px; flex-wrap:wrap; justify-content:center;}
.f-links a{font-size:13.5px; color:#c2d0e8; font-weight:600;}
.f-links a:hover{color:#fff;}
.f-cr{font-size:12px; padding-top:18px; border-top:1px solid rgba(255,255,255,.1); width:100%; text-align:center;}

/* ==========================================================================
   ARTICLE COMPONENTS
   
   The vocabulary a post body may use, beyond p/h2/h3/ul/ol. Every one of
   these is authored as plain HTML inside data/posts.json, so each must be
   safe to hand to a writer: no component below puts a flex or grid
   container around prose (see the rule at the top of the article section).
   Where a component needs columns, the columns wrap ELEMENTS only.
   ========================================================================== */

/* --- key takeaways -------------------------------------------------------
   Placed directly under the lead. This is the block answer engines quote,
   so it is real markup in the HTML, never JS-built. */
.wa-takeaways{background:linear-gradient(170deg,var(--sky-2),#fff); border:1px solid var(--sky);
  border-radius:var(--r); padding:20px 22px; margin:0 0 26px; box-shadow:var(--card-sh);}
.wa-takeaways > h2, .wa-takeaways > p.t{font-size:13px; font-weight:800; color:var(--steel-deep);
  letter-spacing:.02em; margin:0 0 12px; text-transform:none;}
.wa-takeaways ul{margin:0;}
.wa-takeaways li{font-size:15.5px; line-height:1.85; margin-bottom:9px; color:var(--ink);}
.wa-takeaways li:last-child{margin-bottom:0;}
.wa-takeaways ul > li::before{content:"◆"; color:var(--brass); font-size:11px; top:4px;}

/* --- stat row ------------------------------------------------------------
   Grid wraps .wa-stat ELEMENTS; the prose lives inside each cell as normal
   block flow. */
.wa-stats{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:26px 0;}
@media(min-width:620px){ .wa-stats.c3{grid-template-columns:repeat(3,1fr);}
                         .wa-stats.c4{grid-template-columns:repeat(4,1fr);} }
.wa-stat{background:#fff; border:1px solid var(--line); border-radius:var(--r);
  padding:18px 16px; text-align:center; box-shadow:var(--card-sh);}
.wa-stat .n{display:block; font-size:clamp(24px,5vw,32px); font-weight:900; color:var(--steel);
  line-height:1.15; letter-spacing:-.02em;}
.wa-stat .l{display:block; font-size:12.5px; font-weight:700; color:var(--soft); margin-top:7px; line-height:1.6;}

/* --- comparison table ----------------------------------------------------
   Always scrolls inside its own wrapper; the page body must never scroll
   sideways on a phone. */
.wa-table-wrap{overflow-x:auto; -webkit-overflow-scrolling:touch; margin:26px 0;
  border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--card-sh); background:#fff;}
.wa-table{width:100%; border-collapse:collapse; font-size:14.5px; min-width:520px;}
.wa-table caption{caption-side:top; text-align:start; padding:14px 18px 0;
  font-size:12.5px; font-weight:800; color:var(--faint);}
.wa-table th, .wa-table td{padding:13px 16px; text-align:start; border-bottom:1px solid var(--line);
  line-height:1.7; vertical-align:top;}
.wa-table thead th{background:var(--sky-2); color:var(--ink-2); font-weight:800; font-size:13.5px;
  border-bottom:1.5px solid var(--sky); white-space:nowrap;}
.wa-table tbody tr:last-child th, .wa-table tbody tr:last-child td{border-bottom:0;}
.wa-table tbody th{font-weight:800; color:var(--ink-2); background:#fbfcfe;}
.wa-table .yes{color:var(--green); font-weight:900;}
.wa-table .no{color:#c0574c; font-weight:900;}
.wa-table .us{background:rgba(44,100,173,.055);}
.wa-table thead th.us{background:var(--sky);}

/* --- step-by-step playbook ----------------------------------------------- */
.wa-steps{margin:26px 0; counter-reset:wa-bigstep; padding:0; list-style:none;}
.wa-steps > li{position:relative; padding-inline-start:52px; padding-bottom:24px; margin:0;
  counter-increment:wa-bigstep; line-height:1.9;}
.wa-steps > li::before{content:counter(wa-bigstep); position:absolute; inset-inline-start:0; top:0;
  width:34px; height:34px; display:grid; place-items:center; border-radius:11px;
  background:linear-gradient(180deg,#1d3a66,var(--ink-2)); color:#fff;
  font-size:15px; font-weight:900; line-height:1;
  box-shadow:0 8px 18px -10px rgba(18,41,79,.7);}
/* the connecting rail between steps */
.wa-steps > li::after{content:""; position:absolute; inset-inline-start:16.5px; top:38px; bottom:6px;
  width:1.5px; background:linear-gradient(180deg,var(--line-2),transparent);}
.wa-steps > li:last-child{padding-bottom:0;}
.wa-steps > li:last-child::after{display:none;}
.wa-steps > li > b:first-child{display:block; color:var(--ink-2); font-size:16.5px; margin-bottom:4px;}

/* --- pull quote ---------------------------------------------------------- */
.wa-quote{position:relative; margin:30px 0; padding:24px 26px; padding-inline-start:56px;
  background:linear-gradient(170deg,#14294e,#0b1730); border-radius:var(--r); color:#dce7f8;
  font-size:16.5px; line-height:1.9; font-weight:600;}
.wa-quote::before{content:"❝"; position:absolute; inset-inline-start:20px; top:18px;
  color:#5f9fe6; font-size:28px; line-height:1;}
.wa-quote cite{display:block; margin-top:12px; font-style:normal; font-size:13px;
  font-weight:700; color:#8fb4e4;}

/* --- note / warning ------------------------------------------------------ */
.wa-note{position:relative; margin:24px 0; padding:16px 18px; padding-inline-start:48px;
  border-radius:var(--r); font-size:14.5px; line-height:1.85;
  background:var(--sky-2); border:1px solid var(--sky); color:var(--ink);}
.wa-note::before{content:"ℹ"; position:absolute; inset-inline-start:18px; top:16px;
  font-size:16px; font-weight:900; color:var(--steel);}
.wa-note.warn{background:#fdf6e9; border-color:var(--brass-soft); }
.wa-note.warn::before{content:"⚠"; color:#b07f2a;}
.wa-note.tip{background:#eef7f1; border-color:#cfe5d8;}
.wa-note.tip::before{content:"★"; color:var(--green);}

/* --- figure -------------------------------------------------------------- */
.wa-figure{margin:30px 0;}
.wa-figure img{width:100%; height:auto; border-radius:var(--r); border:1px solid var(--line);
  box-shadow:var(--card-sh-lg); background:var(--paper-2);}
.wa-figure figcaption{margin-top:10px; font-size:12.5px; color:var(--faint);
  font-weight:600; line-height:1.7; text-align:center;}

/* --- FAQ (details/summary — works with JS off, and is real text for
       crawlers whether open or closed) ------------------------------------ */
.wa-faq{margin:34px 0 10px;}
.wa-faq > h2{margin-bottom:14px;}
.wa-faq-item{background:#fff; border:1px solid var(--line); border-radius:var(--r);
  margin-bottom:10px; box-shadow:var(--card-sh); overflow:hidden;}
.wa-faq-item > summary{position:relative; cursor:pointer; list-style:none;
  padding:15px 20px; padding-inline-end:48px;
  font-size:15.5px; font-weight:800; color:var(--ink-2); line-height:1.7;}
.wa-faq-item > summary::-webkit-details-marker{display:none;}
.wa-faq-item > summary::after{content:"+"; position:absolute; inset-inline-end:18px; top:50%;
  transform:translateY(-50%); width:24px; height:24px; display:grid; place-items:center;
  border-radius:50%; background:var(--sky-2); color:var(--steel-deep);
  font-size:16px; font-weight:900; line-height:1; transition:transform .2s var(--ease);}
.wa-faq-item[open] > summary::after{content:"−"; transform:translateY(-50%) rotate(180deg);}
.wa-faq-item > summary:hover{background:var(--sky-2);}
.wa-faq-a{padding:0 20px 16px; font-size:15px; line-height:1.9; color:#33445f;}
.wa-faq-a > p:last-child{margin-bottom:0;}

/* --- inline CTA ---------------------------------------------------------- */
.wa-inline-cta{margin:30px 0; padding:20px 22px; border-radius:var(--r);
  background:var(--sky-2); border:1px solid var(--sky); text-align:center;}
.wa-inline-cta p{font-size:15px; font-weight:700; color:var(--ink-2); margin-bottom:14px; line-height:1.8;}
.wa-inline-cta .btn{padding:12px 22px; font-size:14.5px;}

/* ==========================================================================
   PAGE FURNITURE — reading progress, ToC, author, share, prev/next
   ========================================================================== */

/* --- reading progress ---------------------------------------------------- */
.read-progress{position:fixed; top:0; inset-inline:0; height:3px; z-index:400; pointer-events:none;}
.read-progress i{display:block; height:100%; width:0;
  background:linear-gradient(90deg,var(--steel),var(--brass)); border-end-end-radius:3px;
  transition:width .08s linear;}

/* --- post hero ----------------------------------------------------------- */
.post-hero .cat-chip{display:inline-block; font-size:11.5px; font-weight:800; color:var(--steel-deep);
  background:var(--sky-2); border:1px solid var(--sky); border-radius:100px; padding:5px 14px;
  margin-bottom:14px;}
.post-hero .cat-chip:hover{background:var(--sky); border-color:var(--steel);}
.post-hero .sub{font-size:clamp(15px,2.2vw,17.5px); color:var(--soft); font-weight:500;
  max-width:680px; margin:0 auto 20px; line-height:1.8;}
.post-figure-hero{max-width:1000px; margin:26px auto 0; padding:0 20px;}
.post-figure-hero img{width:100%; height:auto; aspect-ratio:1200/630; object-fit:cover;
  border-radius:18px; border:1px solid var(--line); box-shadow:var(--card-sh-lg);}

/* --- layout: ToC rail + article ------------------------------------------
   Grid children are ELEMENTS only (nav + article), never bare text — the
   prose itself stays in normal block flow inside <article>. */
.post-layout{max-width:1160px; margin:0 auto; padding:0 20px;}
@media(min-width:1120px){
  .post-layout{display:grid; grid-template-columns:250px minmax(0,1fr); gap:40px; align-items:start;}
  .post-layout .post-body{padding-inline:0; margin:0; max-width:min(720px,70ch);}
}

.post-toc{margin:26px 0 0;}
@media(min-width:1120px){
  .post-toc{position:sticky; top:104px; margin-top:34px; max-height:calc(100vh - 140px); overflow-y:auto;}
}
.post-toc > details{background:#fff; border:1px solid var(--line); border-radius:var(--r);
  box-shadow:var(--card-sh); overflow:hidden;}
.post-toc summary{cursor:pointer; list-style:none; padding:13px 18px; font-size:13px; font-weight:800;
  color:var(--steel-deep); position:relative; padding-inline-end:40px;}
.post-toc summary::-webkit-details-marker{display:none;}
.post-toc summary::after{content:"⌄"; position:absolute; inset-inline-end:18px; top:9px;
  font-size:15px; color:var(--faint); transition:transform .2s;}
.post-toc details[open] summary::after{transform:rotate(180deg);}
.post-toc ol{list-style:none; margin:0; padding:0 18px 16px; counter-reset:toc;}
.post-toc li{counter-increment:toc; margin-bottom:9px; line-height:1.65;}
.post-toc li:last-child{margin-bottom:0;}
.post-toc a{font-size:13.5px; font-weight:700; color:var(--soft);
  border-inline-start:2px solid transparent; padding-inline-start:11px; display:block;
  transition:color .18s, border-color .18s;}
.post-toc a:hover, .post-toc a.on{color:var(--steel); border-inline-start-color:var(--steel);}
.post-toc li.lvl3{padding-inline-start:14px;}
.post-toc li.lvl3 a{font-size:12.5px; font-weight:600;}
@media(min-width:1120px){ .post-toc summary{pointer-events:none;} }

/* --- author card --------------------------------------------------------- */
.post-author{max-width:min(720px,70ch); margin:34px auto 0; padding:18px 20px;
  background:#fff; border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--card-sh);
  display:grid; grid-template-columns:56px minmax(0,1fr); gap:16px; align-items:center;}
.post-author img{width:56px; height:56px; border-radius:50%; object-fit:cover;
  border:2px solid var(--sky); background:var(--sky-2);}
.post-author .who{min-width:0;}
.post-author .nm{font-size:15px; font-weight:800; color:var(--ink-2); line-height:1.5;}
.post-author .rl{font-size:12.5px; font-weight:700; color:var(--steel); margin-top:2px;}
.post-author .bio{font-size:13px; color:var(--soft); font-weight:500; line-height:1.7; margin-top:6px;}
@media(min-width:1120px){ .post-author{margin-inline:0;} }

/* --- share --------------------------------------------------------------- */
.post-share{max-width:min(720px,70ch); margin:20px auto 0; padding:0 20px;}
.post-share .lbl{font-size:12.5px; font-weight:800; color:var(--faint); margin-bottom:10px;}
.post-share .row{display:flex; gap:9px; flex-wrap:wrap;}
.post-share a, .post-share button{display:inline-flex; align-items:center; gap:7px;
  background:#fff; border:1px solid var(--line); border-radius:100px; padding:8px 15px;
  font-size:12.5px; font-weight:700; color:var(--soft); box-shadow:var(--card-sh);
  transition:transform .18s var(--ease), border-color .18s, color .18s;}
.post-share a:hover, .post-share button:hover{transform:translateY(-2px); border-color:var(--steel); color:var(--steel);}
@media(min-width:1120px){ .post-share{margin-inline:0; padding-inline:0;} }

/* --- prev / next --------------------------------------------------------- */
.post-nav{max-width:min(720px,70ch); margin:34px auto 0; padding:0 20px;
  display:grid; grid-template-columns:1fr; gap:12px;}
@media(min-width:680px){ .post-nav{grid-template-columns:1fr 1fr;} }
@media(min-width:1120px){ .post-nav{margin-inline:0; padding-inline:0;} }
.post-nav a{background:#fff; border:1px solid var(--line); border-radius:var(--r); padding:15px 18px;
  box-shadow:var(--card-sh); transition:transform .2s var(--ease), box-shadow .2s;}
.post-nav a:hover{transform:translateY(-3px); box-shadow:var(--card-sh-lg);}
.post-nav .dir{display:block; font-size:11.5px; font-weight:800; color:var(--steel); margin-bottom:6px;}
.post-nav .ttl{display:block; font-size:14px; font-weight:800; color:var(--ink-2); line-height:1.6;}
.post-nav a.nxt{text-align:end;}

/* --- sticky mobile CTA --------------------------------------------------- */
.sticky-cta{position:fixed; bottom:0; inset-inline:0; z-index:290;
  padding:10px 14px; padding-bottom:calc(10px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.94); backdrop-filter:blur(16px) saturate(160%);
  -webkit-backdrop-filter:blur(16px) saturate(160%);
  border-top:1px solid var(--line); box-shadow:0 -10px 30px -18px rgba(14,28,54,.4);
  transform:translateY(120%); transition:transform .32s var(--ease);}
.sticky-cta.on{transform:none;}
.sticky-cta .btn{width:100%; padding:13px 20px; font-size:15px;}
@media(min-width:900px){ .sticky-cta{display:none;} }

/* ==========================================================================
   BLOG INDEX & CATEGORY HUBS
   ========================================================================== */
.cat-bar{display:flex; gap:9px; flex-wrap:wrap; justify-content:center; margin:0 0 28px;}
.cat-bar a{display:inline-flex; align-items:center; gap:7px; background:#fff; border:1px solid var(--line);
  border-radius:100px; padding:8px 16px; font-size:12.5px; font-weight:700; color:var(--soft);
  box-shadow:var(--card-sh); transition:transform .18s var(--ease), border-color .18s, color .18s, background .18s;}
.cat-bar a:hover{transform:translateY(-2px); border-color:var(--steel); color:var(--steel);}
.cat-bar a.on{background:var(--ink-2); border-color:var(--ink-2); color:#fff;}
.cat-bar a .n{font-size:11px; opacity:.72; font-weight:800;}

.hub-intro{max-width:760px; margin:0 auto 30px; font-size:16px; line-height:1.95;
  color:#33445f; font-weight:500;}
.hub-intro p{margin-bottom:16px;}
.hub-intro p:last-child{margin-bottom:0;}
.hub-intro b{color:var(--ink-2);}

.pager{display:flex; gap:8px; justify-content:center; align-items:center; flex-wrap:wrap; margin-top:38px;}
.pager a, .pager span{min-width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center;
  padding:0 13px; border-radius:11px; font-size:13.5px; font-weight:800;
  background:#fff; border:1px solid var(--line); color:var(--soft); box-shadow:var(--card-sh);}
.pager a:hover{border-color:var(--steel); color:var(--steel);}
.pager .on{background:var(--ink-2); border-color:var(--ink-2); color:#fff;}
.pager .gap{background:transparent; border:0; box-shadow:none; min-width:20px;}

/* post card cover image (replaces the flat colour band when a post has one) */
.p-band img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.34;}
.p-band .num{z-index:1;}
.p-band svg{z-index:1;}

/* ==========================================================================
   PRINT — instructors print the playbooks. Give them something readable.
   ========================================================================== */
@media print{
  header, .post-cta, .related, .sticky-cta, .post-share, .read-progress,
  .post-toc, .post-nav, footer, .cat-bar, .pager{display:none !important;}
  body{background:#fff; color:#000; font-size:12pt;}
  .post-hero{padding:0 0 12pt;}
  .post-hero h1{font-size:22pt;}
  .canvas::before{display:none;}
  .post-layout{display:block; max-width:none; padding:0;}
  .post-body{max-width:none; font-size:12pt; color:#000; padding:0;}
  .post-body a{color:#000; text-decoration:underline;}
  .post-body a[href^="/"]::after{content:" (webacademy.me" attr(href) ")"; font-size:9pt; color:#444;}
  .wa-faq-item{break-inside:avoid;}
  .wa-faq-a{display:block !important;}
  .card, .callout, .wa-takeaways, .wa-stat, .wa-table-wrap{box-shadow:none;}
}
