/* ============================================================
   modus. — blog.css
   /blogue (FR · Québec) and /blog (EN · Canada).
   Two single-language sections, not a translation pair — the
   posts differ by market, so a post page never carries both
   languages in its body. Only the chrome does.
   Depends on base.css tokens.
   ============================================================ */

/* ============ HEAD (shared by both indexes and posts) ============ */
.blog-head{padding:180px 0 84px;overflow:hidden}
.blog-head .wrap{position:relative;z-index:2}
#blog-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:0;opacity:0}
.blog-veil{
  position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(180deg,rgba(22,40,60,.35) 0%,rgba(22,40,60,.72) 55%,var(--navy) 100%);
}

.crumb{font-family:var(--mono);font-size:12.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--slate);
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:30px}
.crumb a{transition:color .25s}
.crumb a:hover{color:var(--green-on-navy)}
.crumb .sep{opacity:.45}
/* resources.css has carried this since the guides shipped; blog.css never got
   it, so the four blog pages served an 18px-tall breadcrumb link on touch.
   A breadcrumb is navigation, not prose — the WCAG 2.5.8 inline-text
   exemption does not cover it. */
@media(pointer:coarse){
  .crumb a{display:inline-flex;align-items:center;min-height:44px}
  /* The FR/EN control on the blog. Both live in their own box, standalone —
     not links inside a sentence — so the 2.5.8 prose exemption does not apply.
     22px on the section indexes, 27px on the articles. */
  .other-lang a,.lang-note a{display:inline-flex;align-items:center;min-height:44px}
}

.blog-head h1{
  font-size:clamp(34px,5.4vw,62px);line-height:1.03;max-width:19ch;
}
.blog-head .lead{max-width:56ch}

.blog-count{font-family:var(--mono);font-size:12.5px;letter-spacing:.08em;color:var(--slate);margin-top:34px}

/* the one-line pointer at the other language's blog. Not a translation
   offer — a different section for a different market, and it says so. */
.other-lang{
  margin-top:40px;padding:18px 22px;border:1px solid rgba(255,255,255,.14);border-radius:12px;
  display:flex;align-items:center;gap:16px;flex-wrap:wrap;max-width:640px;
  background:rgba(255,255,255,.03);
}
.other-lang p{font-size:14.5px;color:rgba(248,249,247,.72);margin:0}
.other-lang a{font-weight:700;font-size:14.5px;color:var(--green-on-navy);white-space:nowrap}
/* #langNote sits on a mint panel (#e4f1eb), not on paper. --green-ink was
   validated at 4.70:1 against --paper (#F8F9F7) and measures 4.27:1 here —
   17px/700 is below the 18.66px large-text cutoff, so 4.5:1 applies and it
   fails. Same defect class as the old --green-on-navy problem: a green
   validated on one surface, reused on another. #136A4E clears it at 5.65:1
   on the mint, and still clears on paper (6.22:1) and white (6.56:1) if this
   panel is ever restyled. */
#langNote a{color:#136A4E}
.other-lang a:hover{text-decoration:underline}

/* ============ INDEX — the post list ============ */
.posts{border-top:1px solid rgba(22,40,60,.14)}
.post-row{
  display:grid;grid-template-columns:92px 1fr 210px;gap:34px;align-items:start;
  padding:40px 0;border-bottom:1px solid rgba(22,40,60,.14);
}
.post-n{font-family:var(--mono);font-size:13px;color:var(--slate-ink);padding-top:7px;letter-spacing:.06em}
.post-row h2{font-size:clamp(23px,2.5vw,32px);line-height:1.15;max-width:24ch;letter-spacing:-.025em}
.post-row h2 a{transition:color .25s}
.post-row h2 a:hover{color:var(--green-ink)}
.post-row p{margin-top:14px;color:var(--muted);max-width:62ch;font-size:16.5px}
.post-meta{
  font-family:var(--mono);font-size:12px;letter-spacing:.06em;color:var(--slate-ink);
  display:flex;flex-direction:column;gap:9px;padding-top:9px;text-align:right;
}
.post-meta .tag{color:var(--green-ink);font-weight:500}
.post-cta{margin-top:22px}

.upcoming{
  display:grid;grid-template-columns:92px 1fr;gap:34px;padding:40px 0 0;
}
.upcoming h3{font-size:19px;letter-spacing:-.02em}
.upcoming p{color:var(--muted);margin-top:10px;max-width:60ch;font-size:16px}
.upcoming ul{margin-top:16px;padding-left:0;list-style:none;display:flex;flex-direction:column;gap:9px}
.upcoming li{color:var(--muted);font-size:15.5px;padding-left:20px;position:relative}
.upcoming li::before{content:"";position:absolute;left:0;top:.62em;width:8px;height:1.5px;background:var(--green)}

@media(max-width:860px){
  .post-row{grid-template-columns:1fr;gap:0}
  .post-n{padding-top:0;margin-bottom:10px}
  .post-meta{text-align:left;flex-direction:row;flex-wrap:wrap;gap:6px 20px;padding-top:22px}
  .upcoming{grid-template-columns:1fr;gap:0}
  .upcoming .post-n{margin-bottom:14px}
}

/* ============ ARTICLE ============ */
.article-sec{padding:84px 0 96px}
.article{max-width:720px;margin:0 auto}

.article-meta{
  font-family:var(--mono);font-size:12.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--slate-ink);
  display:flex;gap:10px;flex-wrap:wrap;align-items:center;
  padding-bottom:28px;margin-bottom:40px;border-bottom:1px solid rgba(22,40,60,.14);
}
.article-meta .dotsep{opacity:.4}
.article-meta .tag{color:var(--green-ink);font-weight:500}

/* long-form body. 17.5px/1.68 on a 720px measure ≈ 72ch — the readable band. */
.article-body{font-size:17.5px;line-height:1.68;color:var(--navy)}
.article-body > * + *{margin-top:26px}
.article-body p{color:#22333f}
.article-body strong{font-weight:700;color:var(--navy)}

.article-body h2{
  font-size:clamp(25px,3vw,33px);line-height:1.18;letter-spacing:-.025em;max-width:22ch;
  margin-top:58px;padding-top:6px;
}
.article-body h2 + p{margin-top:18px}
.article-body h3{font-size:20px;letter-spacing:-.02em;margin-top:40px}

.article-body a{
  color:var(--green-ink);font-weight:500;
  border-bottom:1px solid rgba(23,127,94,.34);transition:border-color .2s,color .2s;
}
.article-body a:hover{border-bottom-color:var(--green-ink)}

.article-body ul,.article-body ol{padding-left:0;list-style:none;display:flex;flex-direction:column;gap:13px}
.article-body li{position:relative;padding-left:26px;color:#22333f}
.article-body ul > li::before{content:"";position:absolute;left:0;top:.72em;width:11px;height:1.5px;background:var(--green)}
.article-body ol{counter-reset:n}
.article-body ol > li{counter-increment:n}
.article-body ol > li::before{
  content:counter(n);position:absolute;left:0;top:0;
  font-family:var(--mono);font-size:13px;color:var(--green-ink);font-weight:500;
}

/* tables — navy header band, per the house visual standard */
.article-table{width:100%;border-collapse:collapse;font-size:15.5px;margin-top:30px}
.article-table th{
  background:var(--navy);color:var(--paper);text-align:left;font-weight:700;font-size:13px;
  letter-spacing:.05em;text-transform:uppercase;padding:13px 16px;
}
.article-table th:first-child{border-radius:8px 0 0 0}
.article-table th:last-child{border-radius:0 8px 0 0}
.article-table td{padding:13px 16px;border-bottom:1px solid rgba(22,40,60,.13);color:#22333f;vertical-align:top}
.article-table tr:last-child td{border-bottom:0}
.article-table tbody tr:nth-child(even){background:rgba(22,40,60,.028)}
.article-table strong{color:var(--navy)}
.table-scroll{overflow-x:auto;margin-top:30px}
.table-scroll .article-table{margin-top:0;min-width:520px}

/* the copy-this-block callout (standing instructions, prompts) */
.callout{
  background:var(--navy);color:var(--paper);border-radius:14px;padding:26px 30px;
  font-size:16px;line-height:1.62;margin-top:30px;
}
.callout p{color:rgba(248,249,247,.86)}
.callout .callout-k{
  font-family:var(--mono);font-size:11.5px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--green-on-navy);display:block;margin-bottom:14px;
}

/* the single pulled-out line per article */
.pull{
  border-left:2px solid var(--green);padding:4px 0 4px 26px;margin-top:36px;
  font-size:clamp(19px,2.2vw,23px);line-height:1.42;font-weight:700;letter-spacing:-.02em;color:var(--navy);
  max-width:26ch;
}

.article-body hr{border:0;border-top:1px solid rgba(22,40,60,.16);margin-top:54px}

/* sign-off + sources */
.signoff{font-size:15.5px;color:var(--muted);font-style:normal;margin-top:30px}
.sources{margin-top:54px;padding-top:30px;border-top:1px solid rgba(22,40,60,.16)}
.sources h2{font-size:15px!important;font-family:var(--mono);letter-spacing:.12em;text-transform:uppercase;
  color:var(--slate-ink);margin-top:0!important;font-weight:500;max-width:none}
.sources ol{margin-top:20px;gap:14px}
.sources li{font-size:14.5px;line-height:1.55;color:var(--muted)}
.sources li::before{top:.5em}

/* language mismatch notice — the chrome flipped, the article can't */
.lang-note{
  background:rgba(29,158,117,.09);border:1px solid rgba(23,127,94,.3);border-radius:12px;
  padding:16px 20px;margin-bottom:36px;display:flex;gap:14px;align-items:center;flex-wrap:wrap;
}
.lang-note p{font-size:14.5px;color:var(--muted);margin:0}
.lang-note a{font-weight:700;color:var(--green-ink);white-space:nowrap;border-bottom:1px solid rgba(23,127,94,.34)}
.lang-note[hidden]{display:none}

@media(max-width:560px){
  .blog-head{padding:150px 0 64px}
  .article-sec{padding:64px 0 76px}
  .article-body{font-size:17px}
  .callout{padding:22px 20px}
  .pull{padding-left:20px}
}

/* ============ NEXT STEP band (reused shape from /ressources) ============ */

/* base.css styles .btn-ghost for navy sections: paper-coloured text on a
   transparent background. Dropped onto a .paper section that is paper text
   on paper — contrast ratio 1.00, an invisible button. resources.css carries
   this same override for /ressources; the blog pages don't load that file,
   so it has to be repeated here. Caught by the contrast sweep, not by eye. */
.paper .btn-ghost{border-color:rgba(22,40,60,.22);color:var(--navy)}
.paper .btn-ghost::before{background:var(--navy)}
.paper .btn-ghost:hover{color:var(--paper)}

.next-band{border-top:1px solid rgba(22,40,60,.14)}
.next-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:56px;align-items:start}
.next-actions{display:flex;flex-direction:column;align-items:flex-start;gap:14px}
.next-note{font-family:var(--mono);font-size:12.5px;line-height:1.85;color:var(--slate-ink);margin-top:8px}
@media(max-width:860px){.next-grid{grid-template-columns:1fr;gap:34px}}

@media(prefers-reduced-motion:reduce){
  #blog-canvas{display:none}
}

/* The standing notice, when the header EN/FR control points at it instead of
   navigating away (see js/app/blog-main.js). A brief ring rather than a
   colour change, so nothing in the panel has to shift or restyle. */
.lang-note{transition:box-shadow .35s var(--ease)}
.lang-note.is-flagged{animation:noteFlag 1.9s var(--ease) 1}
@keyframes noteFlag{
  0%   {box-shadow:0 0 0 0 rgba(29,158,117,.55)}
  18%  {box-shadow:0 0 0 5px rgba(29,158,117,.38)}
  100% {box-shadow:0 0 0 0 rgba(29,158,117,0)}
}
.lang-note:focus{outline:none}
.lang-note:focus-visible{outline:2px solid var(--green-ink);outline-offset:3px}
@media(prefers-reduced-motion:reduce){
  .lang-note.is-flagged{animation:none;box-shadow:0 0 0 3px rgba(29,158,117,.45)}
}
