/* AI Brain research mini-site — julienlescure.io
   Same visual identity as the deck: purple #401f4c, turquoise #2dffd9, white,
   Urbanist 500/700/800, tiret bars, small-caps eyebrows, 999px pills,
   turquoise number badges. Turquoise text only ever sits on purple.
   The deck's content classes (.rows .row .card .pill .fig .qt …) are reused
   inside finding cards, rescaled here for the web. */
:root{
  --purple:#401f4c;--deep:#32163c;--turq:#2dffd9;--white:#fff;
  --ink:rgba(64,31,76,.86);--muted:rgba(64,31,76,.72);--line:rgba(64,31,76,.16);
  --bar:136px;--bar-tall:136px;--bar-x:74px;--logo:168px;--panel:360px;--wrap:1260px;--gutter:clamp(18px,4vw,40px);
}
/* the header follows julienlescure.io: logo 168px, 64px from the top, 74px from the side;
   it tightens once you start reading so it doesn't eat the screen */
html.compact{--bar:84px;--logo:128px}
@media (max-width:1280px){:root{--bar-x:80px}}
@media (max-width:960px){:root{--bar:112px;--bar-tall:112px;--bar-x:56px;--logo:150px}html.compact{--bar:72px;--logo:120px}}
@media (max-width:560px){:root{--bar:96px;--bar-tall:96px;--bar-x:24px;--logo:132px}html.compact{--bar:66px;--logo:112px}}
*{box-sizing:border-box}
/* `hidden` must always win over component display rules (.form, .thanks, .fl are flex) */
[hidden]{display:none!important}
html{scroll-behavior:smooth;scroll-padding-top:calc(var(--bar) + 20px)}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important;animation:none!important}}
body{margin:0;background:var(--white);color:var(--purple);font-family:Urbanist,system-ui,sans-serif;
  font-weight:500;font-size:18px;line-height:1.55;-webkit-font-smoothing:antialiased}
a{color:var(--purple)}a:hover{color:var(--deep)}
b,strong{font-weight:800}
img,svg{max-width:100%}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:fixed;left:12px;top:-60px;z-index:100;background:var(--turq);color:var(--purple);padding:10px 16px;border-radius:999px;font-weight:800;text-decoration:none}
.skip:focus{top:12px}

/* focus — visible on every surface */
:focus-visible{outline:3px solid var(--purple);outline-offset:3px;border-radius:6px}
.on-purple :focus-visible,.bar :focus-visible,.hero :focus-visible,.qs-block :focus-visible,.about :focus-visible{outline-color:var(--turq)}

/* ── top bar ─────────────────────────────────────────────────── */
.bar{position:fixed;inset:0 0 auto;z-index:50;height:var(--bar);background:var(--purple);color:var(--white);transition:height .25s ease}
.bar__in{height:100%;padding:0 var(--bar-x);display:flex;align-items:center;gap:28px}
.bar__logo{display:flex;flex:none;margin-right:auto}.bar__logo img{width:var(--logo);height:auto;display:block;transition:width .25s ease}
.bar nav{display:flex;align-items:center;gap:40px}
.nav{display:flex;align-items:center;gap:40px;margin:0;padding:0;list-style:none}
.nav a{position:relative;display:block;padding:0 0 6px;color:var(--white);text-decoration:none;font-weight:400;font-size:16px;letter-spacing:-.01em;line-height:1.2;white-space:nowrap;transition:color .2s ease}
.nav a:hover{color:var(--turq)}
.nav a[aria-current="true"]{color:var(--turq);font-weight:700}
.nav a[aria-current="true"]::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:var(--turq)}
.lang{display:flex;align-items:center;gap:14px;flex:none}
.lang a,.lang span{display:block;padding:0 0 6px;font-weight:400;font-size:16px;line-height:1.2;text-decoration:none;color:var(--white)}
.lang span{color:var(--turq);font-weight:700}
.lang a:hover{color:var(--turq)}
.progress{position:absolute;left:0;bottom:-3px;height:3px;width:100%;background:transparent}
.progress i{display:block;height:100%;width:0;background:var(--turq)}
/* mobile: one line showing the current section */
.navbtn{display:none;flex:0 1 auto;min-width:0;align-items:center;gap:10px;background:none;border:0;padding:8px 0;color:var(--white);
  font:inherit;font-weight:800;font-size:16px;cursor:pointer;text-align:left}
.navbtn b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.navbtn i{flex:none;width:9px;height:9px;border-right:2.5px solid var(--turq);border-bottom:2.5px solid var(--turq);transform:rotate(45deg) translateY(-3px);transition:transform .2s}
.navbtn[aria-expanded="true"] i{transform:rotate(-135deg) translateY(-1px)}

/* ── layout: content + fixed form panel ──────────────────────── */
.page{padding-top:var(--bar-tall)}
.wrap{max-width:var(--wrap);margin:0 auto;padding:0 var(--gutter)}
.main{max-width:1120px}
@media (min-width:1200px){
  /* the form is a pull-out drawer, so the reading column gets the room back */
  .main{max-width:1120px;margin:0 auto}
}
section.block{padding:40px 0 8px}

/* share buttons */
.share{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.share__btn{display:inline-flex;align-items:center;gap:9px;padding:10px 18px;border-radius:999px;border:1.5px solid currentColor;background:none;
  font:inherit;font-weight:800;font-size:14px;line-height:1;color:inherit;text-decoration:none;cursor:pointer}
.share__btn svg{width:16px;height:16px;flex:none}
.share__btn:hover{background:var(--purple);color:var(--white);border-color:var(--purple)}
.on-purple .share__btn:hover,.hero .share__btn:hover{background:var(--turq);color:var(--purple);border-color:var(--turq)}
.share__ok{font-weight:700;font-size:14px}
.hero .share{margin-top:28px}

.endrow{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:18px;margin:22px 0 0;padding:22px 0 0}
.next{display:inline-flex;align-items:center;gap:12px;padding:14px 24px;border-radius:999px;background:var(--turq);color:var(--purple);font-weight:800;font-size:16px;line-height:1.1;text-decoration:none}
.next:hover{background:var(--purple);color:var(--white)}
.next span{font-size:20px;line-height:1}

/* ── join (end of page) ──────────────────────────────────────── */
.join{padding:64px 0 96px}
.footer{padding:28px 0 40px;border-top:1.5px solid var(--line);font-size:14px;color:var(--muted)}
.footer a{color:inherit;text-decoration:none}.footer a:hover{color:var(--purple);text-decoration:underline}
.footer .wrap{display:flex;flex-wrap:wrap;gap:8px 16px}

/* ── the form ────────────────────────────────────────────────── */
.form{display:flex;flex-direction:column;gap:12px;margin-top:22px}
.form h2,.form .fh{margin:0;font-weight:800;font-size:24px;line-height:1.1;letter-spacing:-.025em}
.fl{display:flex;flex-direction:column;gap:5px}
.fl > span,.fs legend{font-weight:800;font-size:12.5px;letter-spacing:.1em;text-transform:uppercase}
.fl em{font-style:normal;font-weight:700;letter-spacing:0;text-transform:none;opacity:.72}
.in{width:100%;min-height:44px;padding:10px 14px;border:0;border-radius:12px;background:var(--white);
  font:inherit;font-size:16px;font-weight:500;color:var(--purple)}
.in:focus{outline:none;box-shadow:0 0 0 3px rgba(64,31,76,.32)}
.in:focus-visible{outline:none;border-radius:12px}
.in[aria-invalid="true"]{box-shadow:0 0 0 2px #b3261e}
textarea.in{min-height:84px;resize:vertical}
/* custom select arrow, inset from the edge to match the field padding */
select.in{appearance:none;-webkit-appearance:none;padding-right:44px;cursor:pointer;
  background:var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5l5.5 5.5 5.5-5.5' fill='none' stroke='%23401f4c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center}
.pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.fs{margin:4px 0 0;padding:0;border:0;display:flex;flex-direction:column;gap:4px}
.fs legend{margin-bottom:6px;padding:0}
.ck{display:grid;grid-template-columns:22px 1fr;gap:10px;align-items:start;padding:7px 0;font-size:15px;line-height:1.35;cursor:pointer}
.ck input{appearance:none;-webkit-appearance:none;width:20px;height:20px;margin:0;border:0;border-radius:6px;background:var(--white);cursor:pointer;display:grid;place-content:center}
.ck input::before{content:"";width:11px;height:6px;border-left:2.5px solid var(--purple);border-bottom:2.5px solid var(--purple);transform:rotate(-45deg) translate(1px,-1px);opacity:0}
.ck input:checked{background:var(--purple)}
.ck input:checked::before{border-color:var(--turq);opacity:1}
.ck input:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(64,31,76,.32)}
.msgtoggle{align-self:flex-start;background:none;border:0;padding:4px 0;font:inherit;font-weight:800;font-size:14.5px;color:var(--purple);text-decoration:underline;text-underline-offset:4px;cursor:pointer}
.consent{margin:0;font-size:13px;line-height:1.45;color:rgba(64,31,76,.78)}
.send{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:50px;padding:0 26px;border:0;border-radius:999px;background:var(--purple);color:var(--white);
  font:inherit;font-weight:800;font-size:16px;cursor:pointer}
.send:hover{background:var(--deep)}
.send[disabled]{opacity:.7;cursor:progress}
.spin{width:16px;height:16px;border-radius:999px;border:2.5px solid rgba(255,255,255,.35);border-top-color:var(--white);animation:spin .7s linear infinite;display:none}
.form.is-loading .spin{display:inline-block}
@keyframes spin{to{transform:rotate(360deg)}}
.err{margin:0;padding:12px 14px;border-radius:12px;background:#fff;border:1.5px solid #b3261e;color:#7a1712;font-size:14.5px;line-height:1.45}
.fieldmsg{margin:0;font-size:13.5px;font-weight:700;color:#8c1d18}
.thanks{display:flex;flex-direction:column;gap:14px;margin-top:22px}
.thanks h3{margin:0;font-weight:800;font-size:26px;line-height:1.1;letter-spacing:-.025em}
.thanks p{margin:0;font-size:16px}
.thanks .share{margin-top:6px}

/* desktop: a drawer that pulls out from the right edge */
.panel{display:none}
@media (min-width:1200px){
  .panel{display:block;position:fixed;z-index:40;top:calc(var(--bar) + 16px);bottom:16px;right:0;width:calc(var(--panel) + 24px);
    transform:translateX(100%);transition:transform .32s cubic-bezier(.2,.7,.2,1)}
  .panel.is-open{transform:none}
  .panel__in{height:100%;overflow:auto;background:var(--turq);color:var(--purple);border-radius:22px 0 0 22px;padding:26px 24px 24px;overscroll-behavior:contain}
  .panel__in .form,.panel__in .thanks{margin-top:0}
  .panel .form{gap:10px}
  .panel .ck{padding:5px 0;font-size:14.5px}
  .ptab{position:absolute;right:100%;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:10px;
    padding:20px 13px;border:0;border-radius:14px 0 0 14px;background:var(--turq);color:var(--purple);cursor:pointer;
    font:inherit;font-weight:800;font-size:14px;letter-spacing:.04em;line-height:1;box-shadow:-6px 0 18px rgba(20,8,25,.18);
    transition:opacity .2s,visibility .2s}
  .panel.is-open .ptab{opacity:0;visibility:hidden}
  .ptab span{writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap}
  .ptab i{width:9px;height:9px;border-left:2.5px solid currentColor;border-bottom:2.5px solid currentColor;transform:rotate(45deg);transition:transform .25s}
  .panel.is-open .ptab i{transform:rotate(-135deg)}
  .ptab:hover{background:var(--white)}
  .pclose{position:absolute;right:16px;top:14px;width:36px;height:36px;border-radius:999px;border:0;background:rgba(64,31,76,.1);color:var(--purple);font:inherit;font-weight:800;font-size:19px;line-height:1;cursor:pointer}
  .pclose:hover{background:rgba(64,31,76,.2)}
  .send.join__desk{display:inline-flex}
  .join__inline{display:none}
  .fab,.sheet,.navbtn{display:none!important}
}
@media (min-width:1200px) and (prefers-reduced-motion:reduce){.panel{transition:none}}

/* mobile / tablet */
@media (max-width:1199px){
  .nav{display:none}
  .navbtn{display:flex}
  .bar nav{gap:22px}
  .lang{gap:12px}
  .navlist{position:fixed;z-index:49;top:var(--bar);left:0;right:0;background:var(--purple);padding:8px var(--gutter) 18px;border-top:1px solid rgba(255,255,255,.12);
    box-shadow:0 18px 30px rgba(20,8,25,.28)}
  .navlist[hidden]{display:none}
  .navlist a{display:block;padding:13px 4px;border-bottom:1px solid rgba(255,255,255,.12);color:var(--white);text-decoration:none;font-weight:700;font-size:17px}
  .navlist a[aria-current="true"]{color:var(--turq)}
  .fab{position:fixed;z-index:45;left:50%;bottom:max(16px,env(safe-area-inset-bottom));transform:translateX(-50%);
    display:inline-flex;align-items:center;gap:10px;padding:15px 26px;border:0;border-radius:999px;background:var(--turq);color:var(--purple);
    font:inherit;font-weight:800;font-size:16px;line-height:1;cursor:pointer;box-shadow:0 8px 24px rgba(20,8,25,.28);transition:opacity .2s,transform .2s;white-space:nowrap}
  .fab[data-hidden="true"]{opacity:0;pointer-events:none;transform:translate(-50%,20px)}
  .page{padding-bottom:84px}
}
@media (min-width:1200px){.navlist{display:none!important}}

/* bottom sheet */
.sheet{position:fixed;inset:0;z-index:60}
.sheet[hidden]{display:none}
.sheet__bg{position:absolute;inset:0;background:rgba(32,14,40,.55)}
.sheet__in{position:absolute;left:0;right:0;bottom:0;max-height:92vh;overflow:auto;background:var(--turq);color:var(--purple);
  border-radius:22px 22px 0 0;padding:14px var(--gutter) max(24px,env(safe-area-inset-bottom));overscroll-behavior:contain}
.sheet__top{display:flex;justify-content:space-between;align-items:center}
.sheet__grab{width:44px;height:5px;border-radius:999px;background:rgba(64,31,76,.3);margin:0 auto}
.sheet__close{position:absolute;right:14px;top:10px;width:40px;height:40px;border-radius:999px;border:1.5px solid rgba(64,31,76,.35);background:none;color:var(--purple);font:inherit;font-weight:800;font-size:20px;line-height:1;cursor:pointer}
.sheet .form,.sheet .thanks{margin-top:14px}

@media (max-width:640px){
  body{font-size:17px}
}
@media (max-width:400px){.pair{grid-template-columns:1fr}}

/* ── page-level additions around the slides ─────────────────── */
.hero-ext{display:flex;flex-direction:column;gap:22px;margin-top:calc(44px * var(--k))}
.hero-ext .sub{margin:0;font-weight:500;font-size:max(17px,calc(36px * var(--k)));line-height:1.4;color:rgba(255,255,255,.88);max-width:40ch}
.hero-ext .upd{margin:0;font-size:15px;color:rgba(255,255,255,.75)}
.hero-ext .upd time{color:var(--white);font-weight:700}
.contrib{margin:calc(44px * var(--k)) 0 0;padding-top:20px;border-top:1.5px solid rgba(255,255,255,.2);font-size:max(16px,calc(28px * var(--k)));color:rgba(255,255,255,.88)}
.contrib a{color:var(--turq);font-weight:800}
.endrow{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:18px;margin:4px 0 0;padding:0 0 18px}
.next{display:inline-flex;align-items:center;gap:12px;padding:14px 24px;border-radius:999px;background:var(--turq);color:var(--purple);font-weight:800;font-size:16px;line-height:1.1;text-decoration:none}
.next:hover{background:var(--purple);color:var(--white)}
.next span{font-size:20px;line-height:1}
.slide.close .close__panel .send{align-self:flex-start;margin-top:calc(40px * var(--k))}
.slide.close .close__panel .formunit{margin-top:calc(30px * var(--k))}
.slide.close .close__panel .form .fh{display:none}
@media (min-width:1200px){.slide.close .join__inline{display:none}}
@media (max-width:1199px){.slide.close .join__desk{display:none!important}}
.join{padding:0 0 64px}

/* ── header CTA ──────────────────────────────────────────────── */
.hcta{display:inline-flex;align-items:center;min-height:44px;padding:0 22px;border:0;border-radius:999px;background:var(--turq);color:var(--purple);
  font:inherit;font-weight:800;font-size:15px;line-height:1;white-space:nowrap;cursor:pointer;transition:background .2s,color .2s}
.hcta:hover{background:var(--white)}
@media (max-width:760px){.hcta{display:none}}
@media (min-width:761px){.fab{display:none!important}.page{padding-bottom:0}}

/* ── left index (desktop) ────────────────────────────────────── */
.toc,.toc__show{display:none}
@media (min-width:1200px){
  :root{--toc-w:300px}
  .nav,.navbtn{display:none!important}
  .toc{display:block;position:fixed;z-index:30;left:0;top:var(--bar);bottom:0;width:var(--toc-w);overflow:auto;overscroll-behavior:contain;
    padding:26px 20px 40px var(--bar-x);border-right:1.5px solid var(--line);background:var(--white);
    transition:transform .3s cubic-bezier(.2,.7,.2,1),top .25s ease}
  .toc__head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}
  .toc__head span{font-weight:800;font-size:12.5px;letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}
  .toc__hide,.toc__show{border:0;cursor:pointer;font:inherit;color:var(--purple)}
  .toc__hide{width:34px;height:34px;border-radius:999px;background:rgba(64,31,76,.07);display:grid;place-content:center}
  .toc__hide:hover{background:rgba(64,31,76,.14)}
  .toc__hide i,.toc__show i{width:9px;height:9px;border-left:2.5px solid currentColor;border-bottom:2.5px solid currentColor;transform:rotate(45deg) translate(1px,-1px)}
  .toc__show i{transform:rotate(-135deg) translate(1px,-1px)}
  .toc__sec{border-top:1.5px solid var(--line);padding:4px 0}
  .toc__l1{display:block;padding:11px 0;font-weight:800;font-size:15.5px;line-height:1.25;color:var(--purple);text-decoration:none}
  .toc__l1:hover{color:var(--deep);text-decoration:underline;text-underline-offset:4px}
  .toc__l1[aria-current="true"]{box-shadow:inset 3px 0 0 var(--turq);padding-left:12px}
  .toc__l2{display:none;list-style:none;margin:0 0 10px;padding:0}
  .toc__sec.is-open .toc__l2{display:block}
  .toc__l2 a{display:grid;grid-template-columns:30px 1fr;gap:6px;padding:7px 8px 7px 0;border-radius:8px;font-size:14px;line-height:1.35;color:var(--muted);text-decoration:none}
  .toc__l2 a:not(:has(b)){grid-template-columns:1fr;padding-left:0}
  .toc__l2 b{font-weight:800;font-size:12.5px;color:var(--purple);padding-top:1px}
  .toc__l2 a:hover{color:var(--purple)}
  .toc__l2 a[aria-current="true"]{color:var(--purple);font-weight:700;background:rgba(45,255,217,.28);padding-left:8px;margin-left:-8px}
  .toc__l2 a[aria-current="true"]:not(:has(b)){padding-left:8px}
  .toc__show{display:inline-flex;position:fixed;z-index:30;left:0;top:calc(var(--bar) + 20px);align-items:center;gap:10px;padding:12px 16px 12px 14px;
    border-radius:0 999px 999px 0;background:var(--purple);color:var(--white);font-weight:800;font-size:14px;line-height:1}
  .toc__show i{color:var(--turq)}
  .toc__show[hidden]{display:none}
  html.toc-hidden .toc{transform:translateX(-100%)}
  .page{padding-left:var(--toc-w);transition:padding-left .3s cubic-bezier(.2,.7,.2,1)}
  html.toc-hidden .page{padding-left:0}
  .page .wrap{max-width:calc(1120px + 2 * var(--gutter))}
}
@media (min-width:1200px) and (prefers-reduced-motion:reduce){.toc,.page{transition:none}}

/* cover extras sit on the white page under the cover slide */
.hero-ext{margin:0 0 30px;display:flex;flex-direction:column;gap:14px}
.hero-ext .sub{color:var(--purple)!important;font-size:19px!important;max-width:60ch}
.hero-ext .upd{color:var(--muted)!important}
.hero-ext .upd time{color:var(--purple)!important}

/* ── index rail: indented lines at rest, titles on hover / keyboard focus ── */
@media (min-width:1200px){
  :root{--toc-w:64px}
  html .toc{width:var(--toc-w);padding:26px 0 30px 22px;overflow:hidden;transform:none!important;
    transition:width .24s cubic-bezier(.2,.7,.2,1),box-shadow .24s,top .25s ease}
  html .toc:hover,html .toc:focus-within{width:340px;padding-right:22px;overflow-y:auto;box-shadow:14px 0 34px rgba(32,14,40,.14)}
  html .toc__head,html .toc__show{display:none!important}
  html .page,html.toc-hidden .page{padding-left:var(--toc-w)}
  html .toc__sec{border-top:0;padding:0 0 6px}
  html .toc__l2{display:block!important;margin:0}
  html .toc a{display:flex!important;align-items:center;gap:14px;min-height:0;margin:0!important;padding:4px 0!important;border-radius:0;background:none!important;box-shadow:none!important;
    white-space:nowrap;text-decoration:none!important}
  html .toc__l1{padding:9px 0 5px!important}
  html .toc a::before{content:"";flex:none;border-radius:2px;transition:background .2s,width .2s}
  html .toc__l1::before{width:22px;height:3px;background:var(--purple)}
  html .toc__l2 a::before{width:12px;height:2px;margin-left:10px;background:rgba(64,31,76,.3)}
  html .toc a[aria-current="true"]::before{background:var(--turq);height:4px}
  html .toc__l1[aria-current="true"]::before{width:26px}
  html .toc__l2 a[aria-current="true"]::before{width:18px;margin-left:4px}
  html .toc a > span,html .toc a > b{opacity:0;transition:opacity .15s}
  html .toc:hover a > span,html .toc:hover a > b,html .toc:focus-within a > span,html .toc:focus-within a > b{opacity:1;transition:opacity .2s .08s}
  html .toc:hover a,html .toc:focus-within a{white-space:normal}
  html .toc__l1 > span{font-weight:800;font-size:15px;line-height:1.25;color:var(--purple)}
  html .toc__l2 a > b{flex:none;width:26px;font-weight:800;font-size:12.5px;color:var(--purple)}
  html .toc__l2 a > span{font-size:14px;line-height:1.35;color:var(--muted)}
  html .toc a:hover > span{color:var(--purple);text-decoration:underline;text-underline-offset:3px}
  html .toc a[aria-current="true"] > span{color:var(--purple);font-weight:700}
}
@media (min-width:1200px) and (prefers-reduced-motion:reduce){html .toc,html .toc a > span{transition:none}}

/* rail at rest: compact pitch so every line fits the screen; full rows return on hover / focus */
@media (min-width:1200px){
  html .toc:not(:hover):not(:focus-within) a{height:10px;padding:0!important;overflow:hidden}
  html .toc:not(:hover):not(:focus-within) a.toc__l1{height:12px;margin-top:10px!important}
  html .toc:not(:hover):not(:focus-within) a > span,html .toc:not(:hover):not(:focus-within) a > b{font-size:0;line-height:0}
  html .toc:not(:hover):not(:focus-within) .toc__sec{padding:0}
  html .toc a.toc__l1{padding:12px 0 5px!important}
  html .toc .toc__sec:first-child a.toc__l1{margin-top:0!important;padding-top:0!important}
}

/* rail v3: lines flush to the left edge, no divider, a peak around the current part
   (or the pointer). Titles sit in a fixed column so they don't shift as lines grow. */
@media (min-width:1200px){
  html .toc{padding:26px 0 30px 0!important;border-right:0;background:transparent;box-shadow:none}
  html .toc:hover,html .toc:focus-within{background:var(--white);box-shadow:16px 0 38px rgba(32,14,40,.12);padding-right:24px!important}
  html .toc a{position:relative;display:block!important;padding-left:70px!important}
  html .toc a::before{position:absolute;left:0;top:50%;transform:translateY(-50%);margin:0!important;width:var(--w,10px)!important;
    border-radius:0 3px 3px 0;transition:width .22s cubic-bezier(.2,.7,.2,1),background .2s}
  html .toc__l1::before{height:3px!important;background:var(--purple)}
  html .toc__l2 a::before{height:2px!important;background:rgba(64,31,76,.32)}
  html .toc a[aria-current="true"]::before{background:var(--turq)!important;height:4px!important}
  html .toc__l2 a > b{display:inline-block;width:32px}
  html .toc:hover .toc__l2 a,html .toc:focus-within .toc__l2 a{display:flex!important}
}
@media (min-width:1200px) and (prefers-reduced-motion:reduce){html .toc a::before{transition:none}}

/* rail v4: centred in height, thinner lines, and it pushes the page instead of covering it */
@media (min-width:1200px){
  html .toc{display:flex;flex-direction:column}
  html .toc__nav{margin:auto 0}                      /* safe centring: never clips the top when it overflows */
  html .toc:hover,html .toc:focus-within{box-shadow:none;background:var(--white)}
  html .toc__l1::before{height:2px!important}
  html .toc__l2 a::before{height:1px!important;background:rgba(64,31,76,.4)}
  html .toc a[aria-current="true"]::before{height:3px!important}
  body{overflow-x:hidden}
  .page{transition:padding-left .3s cubic-bezier(.2,.7,.2,1),transform .24s cubic-bezier(.2,.7,.2,1)}
  html:has(.toc:hover) .page,html:has(.toc :focus-visible) .page{transform:translateX(276px)}
}
@media (min-width:1200px) and (prefers-reduced-motion:reduce){.page{transition:none}}

/* rail v5 — dock-style magnification: each title starts right after its own line and
   grows with the same peak as the lines; outside the peak it shrinks to nothing */
@media (min-width:1200px){
  html .toc:hover,html .toc:focus-within{width:440px}
  html:has(.toc:hover) .page,html:has(.toc :focus-visible) .page{transform:translateX(376px)}
  html .toc:hover a,html .toc:focus-within a{display:flex!important;align-items:center;gap:0;white-space:nowrap!important;
    padding:calc(1px + 5px * var(--f,0)) 0 calc(1px + 5px * var(--f,0)) calc(var(--w,10px) + 14px)!important;
    transition:padding .18s cubic-bezier(.2,.7,.2,1)}
  html .toc:hover a.toc__l1,html .toc:focus-within a.toc__l1{margin-top:calc(4px + 6px * var(--f,0))!important}
  html .toc:hover a > span,html .toc:focus-within a > span{min-width:0;overflow:hidden;text-overflow:ellipsis;line-height:1.2;
    font-size:calc(10px + 7px * var(--f,0))!important;opacity:var(--f,0)!important;
    transition:font-size .18s cubic-bezier(.2,.7,.2,1),opacity .18s}
  html .toc:hover .toc__l1 > span,html .toc:focus-within .toc__l1 > span{font-size:calc(11px + 8px * var(--f,0))!important}
  html .toc:hover a > b,html .toc:focus-within a > b{flex:none;width:auto;margin-right:calc(4px + 6px * var(--f,0));
    font-size:calc(9px + 4px * var(--f,0))!important;opacity:var(--f,0)!important;transition:font-size .18s,opacity .18s,margin .18s}
  html .toc:hover a:hover > span{text-decoration:none}
}
@media (min-width:1200px) and (prefers-reduced-motion:reduce){html .toc a,html .toc a > span,html .toc a > b{transition:none!important}}

/* peak titles wrap instead of being cut — only the rows near the pointer are visible, so only they grow */
@media (min-width:1200px){
  html .toc:hover a,html .toc:focus-within a{white-space:normal!important;align-items:baseline}
  html .toc:hover a::before,html .toc:focus-within a::before{top:calc(4px + 9px * var(--f,0));transform:none}
  html .toc:hover a > span,html .toc:focus-within a > span{overflow:visible;text-overflow:clip;text-wrap:balance}
}

/* every title readable while the menu is open; the peak only magnifies */
@media (min-width:1200px){
  html .toc:hover a > span,html .toc:focus-within a > span{opacity:calc(.62 + .38 * var(--f,0))!important;font-size:calc(13px + 4px * var(--f,0))!important}
  html .toc:hover .toc__l1 > span,html .toc:focus-within .toc__l1 > span{opacity:calc(.8 + .2 * var(--f,0))!important;font-size:calc(14px + 5px * var(--f,0))!important}
  html .toc:hover a > b,html .toc:focus-within a > b{opacity:calc(.62 + .38 * var(--f,0))!important;font-size:calc(11px + 2px * var(--f,0))!important}
  html .toc:hover a,html .toc:focus-within a{padding-top:calc(3px + 3px * var(--f,0))!important;padding-bottom:calc(3px + 3px * var(--f,0))!important}
}

/* contrast: off-peak titles stay at full opacity (muted colour alone ≈ 5.8:1); size alone carries the magnification */
@media (min-width:1200px){
  html .toc:hover a > span,html .toc:focus-within a > span,
  html .toc:hover a > b,html .toc:focus-within a > b{opacity:1!important}
  html .toc:hover .toc__l2 a > span,html .toc:focus-within .toc__l2 a > span{color:rgba(64,31,76,calc(.72 + .28 * var(--f,0)))}
}

/* header: CTA then FR/EN */
.bar nav .hcta{margin-left:4px}
/* the form drawer pushes the page to the left, as the index pushes it to the right */
@media (min-width:1200px){
  html:has(.panel.is-open) .page{transform:translateX(calc(-1 * (var(--panel) + 24px)))}
}

.hshare{display:inline-flex;align-items:center;gap:9px;min-height:44px;padding:0 20px;border:1.5px solid rgba(255,255,255,.45);border-radius:999px;background:none;color:var(--white);
  font:inherit;font-weight:800;font-size:15px;line-height:1;white-space:nowrap;cursor:pointer;transition:border-color .2s,color .2s}
.hshare svg{width:16px;height:16px;flex:none}
.hshare:hover{border-color:var(--turq);color:var(--turq)}
.hactions{display:flex;align-items:center;gap:10px;flex:none}
@media (max-width:960px){.hshare .lbl{display:none}.hshare{padding:0 13px}}
@media (max-width:760px){.hshare{display:none}}

/* "last updated" above the cover */
.upd--top{margin:22px 0 12px;font-size:15px;color:var(--muted)}
.upd--top time{color:var(--purple);font-weight:700}

/* rail v7: as tall as one slide, centred in the reading area; main titles only, in full */
@media (min-width:1200px){
  html .toc{top:max(calc(var(--bar) + 12px), calc(var(--bar) + (100vh - var(--bar) - var(--slideh,600px)) / 2));
    bottom:auto;height:min(var(--slideh,600px), calc(100vh - var(--bar) - 24px))}
  html .toc__l2 a{padding-top:0!important;padding-bottom:0!important;height:10px!important;overflow:hidden}
  html .toc:hover .toc__l2 a,html .toc:focus-within .toc__l2 a{height:12px!important;padding:0!important}
  html .toc:hover a.toc__l1,html .toc:focus-within a.toc__l1{white-space:normal!important}
  html .toc:hover .toc__l1 > span,html .toc:focus-within .toc__l1 > span{text-wrap:balance;max-width:330px}
}

/* rail v8: section lines only — the untitled per-slide lines are gone; a tighter list */
@media (min-width:1200px){
  html .toc__l2{display:none!important}
  html .toc a.toc__l1{margin-top:0!important;padding:7px 0!important}
  html .toc:not(:hover):not(:focus-within) a.toc__l1{height:auto;padding:9px 0!important;margin-top:0!important}
  html .toc:hover a.toc__l1,html .toc:focus-within a.toc__l1{padding:calc(6px + 4px * var(--f,0)) 0 calc(6px + 4px * var(--f,0)) calc(var(--w,10px) + 14px)!important;margin-top:0!important}
}

.footer .wrap{justify-content:center;text-align:center}

/* rail v9: much gentler magnification */
@media (min-width:1200px){
  html .toc:hover .toc__l1 > span,html .toc:focus-within .toc__l1 > span{font-size:calc(14px + 2px * var(--f,0))!important}
  html .toc:hover a.toc__l1,html .toc:focus-within a.toc__l1{padding-top:calc(6px + 1px * var(--f,0))!important;padding-bottom:calc(6px + 1px * var(--f,0))!important}
}

/* rail v10: titles on one line — the open panel is wide enough for the longest one */
@media (min-width:1200px){
  html .toc:hover,html .toc:focus-within{width:600px}
  html:has(.toc:hover) .page,html:has(.toc :focus-visible) .page{transform:translateX(536px)}
  html .toc:hover a.toc__l1,html .toc:focus-within a.toc__l1{white-space:nowrap!important}
  html .toc:hover .toc__l1 > span,html .toc:focus-within .toc__l1 > span{max-width:none;text-wrap:nowrap;overflow:visible}
}

/* mobile menu extras + section stepper */
.navlist__share{display:block;width:100%;margin-top:6px;padding:14px 4px;border:0;background:none;text-align:left;color:var(--turq);font:inherit;font-weight:800;font-size:16px;cursor:pointer}
.steps-nav{display:none}
@media (max-width:760px){
  .steps-nav{display:flex;flex-direction:column;gap:8px;position:fixed;z-index:44;right:14px;bottom:max(16px,env(safe-area-inset-bottom))}
  .step-btn{width:46px;height:46px;border:0;border-radius:999px;background:var(--purple);color:var(--turq);display:grid;place-content:center;cursor:pointer;
    box-shadow:0 6px 18px rgba(20,8,25,.28)}
  .step-btn[hidden]{display:none}
  .step-btn i{width:11px;height:11px;border-left:2.5px solid currentColor;border-top:2.5px solid currentColor;transform:translateY(2px) rotate(45deg)}
  .step-btn--down i{transform:translateY(-2px) rotate(225deg)}
  .fab{left:16px;transform:none}
  .fab[data-hidden="true"]{transform:translateY(20px)}
}

/* mobile header: the current-section label is clipped so logo and FR/EN always fit */
@media (max-width:1199px){
  .bar__in{min-width:0}
  .bar nav{flex:1 1 auto;min-width:0;justify-content:flex-end}
  .navbtn{flex:0 1 auto;min-width:0;max-width:100%;overflow:hidden}
  .navbtn b{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .bar nav .lang,.bar nav .hactions{flex:none}
}

/* mobile header: only the label clips; the chevron keeps its own room */
@media (max-width:1199px){
  .navbtn{overflow:visible;padding-right:6px}
  .navbtn i{flex:none;margin:0 2px 0 0}
}

/* mobile menu: "Copy link" reads as a button, not as another section */
.navlist__share{display:inline-flex;align-items:center;justify-content:center;gap:9px;width:auto;margin:18px 0 4px;padding:0 22px;min-height:46px;
  border:1.5px solid rgba(255,255,255,.55);border-radius:999px;background:none;color:var(--white);font-weight:800;font-size:15px;line-height:1;text-align:center}
.navlist__share:hover,.navlist__share:active{border-color:var(--turq);color:var(--turq)}
.navlist__share::before{content:"";width:15px;height:15px;flex:none;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M10 14a4 4 0 0 0 5.66 0l3-3a4 4 0 0 0-5.66-5.66l-1 1'/%3E%3Cpath d='M14 10a4 4 0 0 0-5.66 0l-3 3a4 4 0 0 0 5.66 5.66l1-1'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M10 14a4 4 0 0 0 5.66 0l3-3a4 4 0 0 0-5.66-5.66l-1 1'/%3E%3Cpath d='M14 10a4 4 0 0 0-5.66 0l-3 3a4 4 0 0 0 5.66 5.66l1-1'/%3E%3C/svg%3E") center/contain no-repeat}
