/* ============================================================
   RG DIGITAL WORKSHOP — stage 2: micro-interactions & final polish
   Loaded last. Nothing here changes a layout, a section order or a
   timing of the existing animations. See docs/POLISH_NOTES.md.
   ============================================================ */

:root{
  --rg-ease:cubic-bezier(.2,.8,.2,1);
  --rg-spring:cubic-bezier(.34,1.56,.64,1);
  --rg-clay:#b4503a;
  /* hand-drawn rules (each one is used in a different place, so none repeats) */
  --sep-pencil-a:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 8' preserveAspectRatio='none'%3E%3Cpath d='M1 4.8C52 3.2 98 5.6 160 4.1S290 3.6 399 4.6' fill='none' stroke='%232B4C38' stroke-opacity='.5' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M20 3.4C120 2.7 230 4.4 380 3.3' fill='none' stroke='%232B4C38' stroke-opacity='.2' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
  --sep-pencil-b:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.2C70 3.4 130 5.4 200 4.3S330 3.5 380 4.4' fill='none' stroke='%232B4C38' stroke-opacity='.45' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M392 1.6V7M389.3 4.3H394.7' fill='none' stroke='%2319734F' stroke-opacity='.7' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
  --sep-pencil-c:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 8' preserveAspectRatio='none'%3E%3Cpath d='M1 3.6C40 5.2 90 3 150 4.6S270 5.4 330 3.9 385 4.2 399 4' fill='none' stroke='%232B4C38' stroke-opacity='.4' stroke-width='1.1' stroke-linecap='round' stroke-dasharray='120 4 60 3 90 5 400'/%3E%3C/svg%3E");
  --sep-pencil-dark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 8' preserveAspectRatio='none'%3E%3Cpath d='M1 4.4C60 3 120 5.4 190 4S320 3.4 399 4.6' fill='none' stroke='%238BE2C2' stroke-opacity='.4' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M6 1.6V7M3.3 4.3H8.7' fill='none' stroke='%23D5F36A' stroke-opacity='.75' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
  --sep-ink:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10'%3E%3Cpath d='M2 6.4C20 2.4 38 8.2 60 5.2S100 3.2 114 6' fill='none' stroke='%2319734F' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M104 2C108 4 111 7 113 9' fill='none' stroke='%2319734F' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  --sep-reg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 22'%3E%3Cg fill='none' stroke='%2319734F' stroke-opacity='.62' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M3 11.6C22 10.2 46 11.8 70 10.6'/%3E%3Cpath d='M110 11.2C134 12.2 158 10.4 177 11.4'/%3E%3Ccircle cx='90' cy='11' r='4.6'/%3E%3Cpath d='M90.4 2.4L89.6 19.6M81.2 11.3L98.8 10.7'/%3E%3C/g%3E%3C/svg%3E");
  --sep-ink-line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5C60 3 110 6.4 170 4.2S270 3.4 298 4.8' fill='none' stroke='%23D5F36A' stroke-width='4.2' stroke-linecap='round'/%3E%3Cpath d='M2 4.4C70 2.8 120 5.4 180 3.8S270 3 298 4.2' fill='none' stroke='%2319734F' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
}
@property --fl{syntax:'<length>';inherits:false;initial-value:0px}
@property --fr{syntax:'<length>';inherits:false;initial-value:0px}

.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---------- E · selection, caret, focus ---------- */
::selection{background:#c9e57a;color:#0e2a1e}
::-moz-selection{background:#c9e57a;color:#0e2a1e}
input,textarea{caret-color:var(--em)}
/* the lime dashed ring is for dark surfaces; on paper it is nearly invisible, so paper gets emerald */
.paper :focus-visible,.final-letter-section :focus-visible,.nav-index-panel :focus-visible{outline-color:var(--em)}
[tabindex="-1"]:focus{outline:none}

/* ---------- 09 · physical buttons ---------- */
.btn,.letter-project-button,.book-cta,.nav-index-start,.svs-arrow,.opt,.nav-menu-toggle,.soc a{
  transition-timing-function:var(--rg-ease)}
.btn{transition:transform .42s var(--rg-spring),box-shadow .25s,background .25s,border-color .25s}
.letter-project-button,.nav-index-start,.book-cta{transition:transform .42s var(--rg-spring),box-shadow .25s,background-color .25s}
.svs-arrow{transition:transform .42s var(--rg-spring),box-shadow .25s,background-color .25s,opacity .25s}
.opt{transition:transform .35s var(--rg-spring),box-shadow .25s,background-color .25s,border-color .25s}
@media(hover:hover){
  .btn:hover:not(:disabled){transform:translateY(-2px);border-color:var(--lime)}
  .btn.dk:hover:not(:disabled){border-color:var(--em)}
  .btn.pri:hover:not(:disabled){box-shadow:0 9px 18px -7px rgba(25,115,79,.8)}
  .btn.ghost:hover:not(:disabled){box-shadow:0 7px 14px -9px rgba(0,0,0,.55)}
}
/* pressed: sink and compress; releasing springs back past rest (the .42s curve above) */
.btn:active:not(:disabled),.btn.prs,
.letter-project-button:active,.book-cta:active,.nav-index-start:active,.svs-arrow:not(:disabled):active,.opt:active,
.nav-menu-toggle:active,.soc a:active,.letter-stamp:active,.letter-copy:active{
  transform:translateY(1px) scale(.97);transition-duration:.08s}
.btn:active:not(:disabled),.btn.prs{box-shadow:inset 0 3px 8px rgba(0,0,0,.4)}
.letter-project-button:active{box-shadow:1px 2px 0 rgba(29,65,39,.28)}
.book-cta:active{box-shadow:1px 1px 0 rgba(20,47,30,.25)}
.svs-arrow:not(:disabled):active{box-shadow:0 1px 0 var(--em)}
.opt:active{box-shadow:1px 2px 0 var(--em)}
.svs-arrow:disabled{transform:none;box-shadow:none;background:rgba(255,255,255,.3)}
.btn:disabled{filter:saturate(.55)}

/* ---------- 10 · arrows with a little personality ---------- */
.arr{display:inline-block;transition:transform .28s var(--rg-ease)}
.finale-link span,.letter-project-button span,.book-cta span{transition:transform .28s var(--rg-ease)}
@media(hover:hover){
  .btn:hover:not(:disabled) .arr,.svs-arrow:hover:not(:disabled) .arr,.nav-index-start:hover .arr{transform:translateX(4px)}
  .btn:hover:not(:disabled) .arr.l,.svs-arrow:hover:not(:disabled) .arr.l{transform:translateX(-4px)}
  .nav-index-start:hover .arr.d,.btn:hover:not(:disabled) .arr.d{transform:translate(3px,-3px) rotate(6deg)}
  .book-cta:hover span{transform:translate(3px,-3px) rotate(6deg)}
}
.btn:focus-visible .arr,.svs-arrow:focus-visible .arr{transform:translateX(4px)}
.btn:focus-visible .arr.l,.svs-arrow:focus-visible .arr.l{transform:translateX(-4px)}
.finale-link{transition:color .25s,border-color .25s}
.finale-link:hover,.finale-link:focus-visible{color:#123e2c;border-bottom-color:var(--lime)}

/* ---------- 11 · light sweep along the edge of a project frame ---------- */
.frame-light{position:absolute;left:0;top:0;width:100%;height:3px;z-index:7;pointer-events:none;opacity:0;transform:translateX(-100%);
  background:linear-gradient(90deg,rgba(213,243,106,0) 0,rgba(213,243,106,0) 20%,rgba(213,243,106,.95) 50%,rgba(213,243,106,0) 80%,rgba(213,243,106,0) 100%)}
@keyframes frameSweep{0%{opacity:0;transform:translateX(-100%)}12%{opacity:1}88%{opacity:1}100%{opacity:0;transform:translateX(100%)}}
@media(hover:hover){.capture-shell:hover .frame-light{animation:frameSweep 1.05s cubic-bezier(.45,.05,.25,1) both}}
/* touch: no hover, so the light passes once when the project settles into view */
@media(hover:none){.work-slide.is-active .frame-light{animation:frameSweep 1.3s cubic-bezier(.45,.05,.25,1) .9s both}}

/* ---------- 12 · handwritten callouts on a few previews ---------- */
.capture-screen .frame-note{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none;overflow:hidden;
  --ink:#19734F;--halo:rgba(255,255,255,.8)}
.frame-note.tone-dark{--ink:#D5F36A;--halo:rgba(11,23,18,.75)}
.frame-note path{fill:none;stroke:var(--ink);stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset .12s}
.frame-note .n-text{font:700 58px var(--hand);fill:var(--ink);stroke:var(--halo);stroke-width:9px;paint-order:stroke;stroke-linejoin:round;opacity:0;transform:translateY(8px);transition:opacity .12s,transform .12s}
.capture-shell.is-annotated .n-ring,.capture-shell.is-annotated .n-arrow,.capture-shell.is-annotated .n-head{stroke-dashoffset:0}
.capture-shell.is-annotated .n-ring{transition:stroke-dashoffset .5s cubic-bezier(.4,.1,.3,1) .3s}
.capture-shell.is-annotated .n-arrow{transition:stroke-dashoffset .3s ease .78s}
.capture-shell.is-annotated .n-head{transition:stroke-dashoffset .18s ease 1.05s}
.capture-shell.is-annotated .n-text{opacity:1;transform:none;transition:opacity .35s ease 1.05s,transform .35s var(--rg-ease) 1.05s}
@media(hover:hover){
  .capture-shell:hover .n-ring,.capture-shell:hover .n-arrow,.capture-shell:hover .n-head{stroke-dashoffset:0}
  .capture-shell:hover .n-ring{transition:stroke-dashoffset .5s cubic-bezier(.4,.1,.3,1) .3s}
  .capture-shell:hover .n-arrow{transition:stroke-dashoffset .3s ease .78s}
  .capture-shell:hover .n-head{transition:stroke-dashoffset .18s ease 1.05s}
  .capture-shell:hover .n-text{opacity:1;transform:none;transition:opacity .35s ease 1.05s,transform .35s var(--rg-ease) 1.05s}
}
img.is-broken{visibility:hidden}

/* ---------- 13 · hand-drawn separators (same space as before, different line) ---------- */
.nav-index-topline{border-bottom-color:transparent}
.nav-index-topline::after{content:"";position:absolute;left:0;right:0;bottom:-3px;height:6px;background:var(--sep-pencil-a) 0 0/100% 100% no-repeat;pointer-events:none}
.letter-technical-footer{position:relative;border-top-color:transparent}
.letter-technical-footer::before{content:"";position:absolute;left:0;right:0;top:-3px;height:7px;background:var(--sep-pencil-b) 0 0/100% 100% no-repeat;pointer-events:none}
.finale-foot{position:relative;border-top-color:transparent}
.finale-foot::before{content:"";position:absolute;left:0;right:0;top:-3px;height:6px;background:var(--sep-pencil-c) 0 0/100% 100% no-repeat;pointer-events:none}
.lab-footerline{position:relative;border-top-color:transparent}
.lab-footerline::before{content:"";position:absolute;left:0;right:0;top:-3px;height:7px;background:var(--sep-pencil-dark) 0 0/100% 100% no-repeat;pointer-events:none}
.safe{position:relative}
.safe::before{content:"";position:absolute;left:0;top:-10px;width:96px;height:10px;background:var(--sep-ink) 0 0/96px 10px no-repeat;pointer-events:none}
/* the seams between paper chapters used to be invisible and the two grids never lined up */
#about::after,#start::after{content:"";position:absolute;left:50%;top:0;z-index:2;pointer-events:none;transform:translate(-50%,-50%);background-repeat:no-repeat;background-position:center}
#about::after{width:120px;height:10px;background-image:var(--sep-ink);background-size:120px 10px}
#start::after{width:180px;height:22px;background-image:var(--sep-reg);background-size:180px 22px}

/* ---------- 14 · selection marks in the brief ---------- */
.opt{position:relative}
.opt>span{flex:1;padding-right:22px}
.opt::after,.opt[aria-pressed=true]::after{content:none}
.opt .opt-mark{position:absolute;right:11px;top:50%;width:22px;height:19px;margin-top:-9.5px;overflow:visible;pointer-events:none;flex:none}
.opt-mark{opacity:0;transition:opacity 0s .14s}
.opt[aria-pressed=true] .opt-mark{opacity:1;transition:none}
.opt-mark path{fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset .12s ease}
.opt-mark .hi{stroke:var(--lime);stroke-width:6;opacity:.95}
.opt-mark .tk{stroke:var(--em);stroke-width:2.6}
.opt[aria-pressed=true] .opt-mark .hi{stroke-dashoffset:0;transition:stroke-dashoffset .26s ease-out}
.opt[aria-pressed=true] .opt-mark .tk{stroke-dashoffset:0;transition:stroke-dashoffset .34s cubic-bezier(.45,.05,.25,1) .14s}

/* ---------- 15 · ink-inspired field focus ---------- */
.opts .fld{position:relative;grid-column:1/-1}
.opts .fld input,.opts .fld textarea{display:block;width:100%;transition:border-color .25s,background-color .25s}
.fld-l{position:absolute;left:11px;top:-.64em;z-index:1;padding:0 6px;font:700 .68rem/1.25 var(--h);letter-spacing:.12em;text-transform:uppercase;color:#56665c;
  background:linear-gradient(#f8f4ec,#f8f4ec);transition:color .25s;pointer-events:none}
.fld:focus-within .fld-l{color:var(--em);
  background:linear-gradient(transparent 56%,rgba(213,243,106,.85) 56%,rgba(213,243,106,.85) 90%,transparent 90%),linear-gradient(#f8f4ec,#f8f4ec)}
.opts input::placeholder,.opts textarea::placeholder{color:#66746b;opacity:1}
.opts .fld input:focus,.opts .fld textarea:focus{border-color:var(--em);background:#fff}
.opts .fld input:focus-visible,.opts .fld textarea:focus-visible{outline:2px solid var(--em);outline-offset:3px}
.fld-ink{position:absolute;left:8px;right:8px;bottom:-3px;height:6px;pointer-events:none;background:var(--sep-ink-line) 0 0/100% 100% no-repeat;clip-path:inset(0 100% 0 0);transition:clip-path .15s}
.fld:focus-within .fld-ink{clip-path:inset(0 0 0 0);transition:clip-path .55s cubic-bezier(.45,.05,.25,1)}
.opts input[aria-invalid=true]{border-color:var(--rg-clay)}
.fld:has(input[aria-invalid=true]) .fld-l{color:#8e3624}
.fld-err{grid-column:1/-1;margin:-4px 0 0;font:600 .84rem/1.35 var(--b);color:#8e3624}
.fld-err:empty{display:none}

/* ---------- F · feedback: errors, success, sending ---------- */
.toast.err{border-color:var(--rg-clay)}
.fmsg{margin:16px 0 0;padding:10px 12px;border-left:3px solid var(--rg-clay);background:rgba(180,80,58,.09);font:600 .9rem/1.45 var(--b);color:#7a2f1e}
.fmsg[hidden]{display:none}
.fmsg-link{color:var(--em);font-weight:700;text-decoration:underline;text-decoration-color:var(--lime);text-decoration-thickness:3px;text-underline-offset:3px}
.fmsg-link:hover{color:#123e2c}
.fmsg-note{grid-column:1/-1;margin-top:12px;font:.88rem/1.45 var(--b);color:#4b574f}
.fdone{grid-column:1/-1;display:flex;align-items:center;gap:16px;padding:18px 16px;border:1.5px dashed rgba(36,87,51,.5);border-radius:12px;background:rgba(213,243,106,.2)}
.fdone-seal{width:64px;height:64px;flex:none;fill:none;stroke:var(--em);stroke-linecap:round;stroke-linejoin:round}
.fdone-seal path{stroke-dasharray:1;stroke-dashoffset:1}
.fdone-seal .r{stroke-width:2.6;animation:fdraw .7s ease .05s forwards}
.fdone-seal .t{stroke-width:4.2;animation:fdraw .5s ease .65s forwards}
@keyframes fdraw{to{stroke-dashoffset:0}}
.fdone b{display:block;font:800 .78rem var(--h);letter-spacing:.16em;color:var(--em)}
.fdone span{display:block;margin-top:2px;color:#33423a}
.fdone-again{grid-column:1/-1;justify-self:start;margin-top:14px}
.fcard.is-done .fnav{display:none}
.fcard[aria-busy=true] #opts{opacity:.7}

/* ---------- 16 · copy the email ---------- */
.letter-email-row{display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px 18px}
.letter-email-row .letter-email{min-width:0;max-width:100%}
.letter-copy{flex:none;align-self:flex-end;margin-bottom:12px;min-width:9.4em;padding:9px 14px;text-align:center;font:800 .78rem var(--h);letter-spacing:.14em;color:#285a3c;
  background:rgba(255,255,255,.3);border:1.5px dashed rgba(36,87,51,.56);opacity:0;
  transition:transform .42s var(--rg-spring),background-color .25s,color .25s,border-color .25s}
.letter-sheet.is-arrived .letter-copy{animation:letterContactIn .55s var(--rg-ease) 3.9s both}
@media(hover:hover){.letter-copy:hover{background:#e3eccd;transform:translateY(-2px)}}
.letter-copy.is-copied{background:#dcec9c;color:#164d31;border-style:solid;border-color:#285a3c}

/* ---------- 17 · hint that the hero key rail scrolls sideways ---------- */
.keys[data-more]{-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 var(--fl),#000 calc(100% - var(--fr)),transparent 100%);mask-image:linear-gradient(90deg,transparent 0,#000 var(--fl),#000 calc(100% - var(--fr)),transparent 100%);transition:--fl .25s,--fr .25s}
.keys-more{position:absolute;right:11px;bottom:calc(58px + 21px);z-index:6;width:24px;height:24px;display:grid;place-items:center;border-radius:50%;
  background:rgba(11,23,18,.78);border:1px solid rgba(213,243,106,.55);color:var(--lime);font:700 1rem/1 var(--h);pointer-events:none;opacity:0;visibility:hidden;transition:opacity .3s,visibility .3s}
.keys-more.is-on{opacity:1;visibility:visible;animation:keysNudge 1.4s ease-in-out 3}
@keyframes keysNudge{0%,100%{transform:translateX(0)}50%{transform:translateX(4px)}}

/* ---------- 18 · keyboard hint inside the chapter index ---------- */
.nav-index-hint{position:relative;display:flex;align-items:center;justify-content:center;gap:7px;margin:9px 0 0;color:#8d9786;font:800 .66rem var(--h);letter-spacing:.13em;text-transform:uppercase}
.nav-index-hint kbd{font:inherit;padding:0 6px;color:#285a3c;background:rgba(255,255,255,.55);border:1px solid rgba(36,83,51,.35);border-bottom-width:2px;border-radius:3px;letter-spacing:.04em}
.nav-index-hint i{width:14px;height:1px;background:#9baa91}
@media(hover:none),(pointer:coarse){.nav-index-hint{display:none}}

/* ---------- B · images ---------- */
.fig img{height:auto}          /* width/height attributes only reserve space; they must not stretch the picture */
.fig.sm img{aspect-ratio:1228/1024}

/* ---------- D / C · type and spacing corrections ---------- */
.letter-technical-footer{row-gap:6px}
@media(max-width:820px){
  .bundle-stats span{font-size:.62rem;letter-spacing:.06em}
  .finale-mini-gallery .mini-frame>b{font-size:.62rem}
}
@media(max-width:560px){
  .bk-fig{font-size:.64rem}
  .bundle-stats span{font-size:.64rem}
  .bundle-page .popular-stamp{width:62px;height:34px}
  .bundle-page .popular-stamp small,.bundle-page .popular-stamp b{font-size:.6rem}
  /* the two stage captions wrapped onto a second line and ran into the notebook; the footnote below says the same thing */
  .bundle-stage-meta span:first-child,.book-stage-caption span:last-child{display:none}
  .bundle-stage-meta{justify-content:flex-end}
  .book-stage-caption span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
}

/* ---------- H · touch ---------- */
@media(pointer:coarse){
  .nav-menu-toggle{height:44px;min-width:44px}
  .svs-arrow{width:40px;height:40px}
  .svs-nav button{min-width:36px;min-height:40px;justify-content:center}
  .soc a{width:44px;height:44px}
  .rg-top{width:44px;height:44px}
  .nav-index-list a{min-height:46px}
  .nav-index-close{position:relative}
  .nav-index-close::before{content:"";position:absolute;inset:-8px}
  .nav-index-start{min-height:46px}
  .opt{min-height:48px}
  .finale-link{min-height:44px;align-items:center}
}
@media(max-width:860px){
  .scroll{bottom:calc(10px + env(safe-area-inset-bottom,0px))}
  .keys-more{bottom:calc(50px + 21px)}
}

/* ---------- reduced motion: keep colour and state changes, drop movement ---------- */
@media(prefers-reduced-motion:reduce){
  .btn:hover:not(:disabled),.btn:active:not(:disabled),.btn.prs,.letter-project-button:active,.book-cta:active,.nav-index-start:active,
  .svs-arrow:not(:disabled):active,.opt:active,.soc a:active,.letter-copy:hover,.letter-copy:active,.nav-menu-toggle:active{transform:none}
  .arr,.arr.l,.arr.d,.book-cta:hover span{transform:none!important}
  .frame-light{display:none}
  .frame-note .n-text{transform:none}
  .frame-note path,.opt-mark path{transition:none!important}
  .fdone-seal path{stroke-dashoffset:0;animation:none}
  .keys-more.is-on{animation:none}
  .letter-copy{opacity:1;animation:none!important}
  .fld-ink{transition:none!important}
}

/* ---------- final pass (v30) ---------- */
/* logo: letter top line + footer share one size; the line may shrink, the sheet number never clips */
.letter-topline .letter-brand{min-width:0}.letter-topline .letter-brand img{height:24px}
.letter-topline>span:last-child{flex:none;white-space:nowrap}
@media(max-width:480px){
  .letter-topline{gap:10px}
  .letter-topline .letter-brand{flex:1 1 auto;flex-wrap:wrap;row-gap:2px}
  .letter-topline .letter-brand i{display:none}
  .letter-topline>span:last-child{font-size:0.66rem;letter-spacing:.06em}
}
/* the desktop nav already marks the current chapter, so the text read-out beside it is redundant there.
   It stays in the DOM for screen readers and is shown again where the nav collapses into the index. */
@media(min-width:1001px){
  .nav-chapter{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
}
/* chapter index header: one line, never wraps under the logo */
.nav-index-topline span{white-space:nowrap}
@media(max-width:560px){
  .nav-index-topline small,.nav-index-topline span>i{display:none}
}
/* work header: the archive label collides with the progress dots on narrow screens */
@media(max-width:560px){
  .work-archive-label{display:none}
}
/* Services (homepage): "Learn more" goes to the matching service on /services, next to "Start a project" */
.svs-btns{display:flex;flex-wrap:wrap;gap:10px;margin-top:4px}
.svs-btns .svs-cta{margin-top:0}
.svs-btns .svs-more{color:var(--em);border-color:var(--em);background:rgba(255,255,255,.45)}
.svs-btns .svs-more:hover,.svs-btns .svs-more:focus-visible{background:var(--em);color:var(--paper)}
@media(max-width:860px){
  .svs-btns .svs-cta{display:none}
  .svs-btns .svs-more{display:inline-flex;padding:8px 18px;font-size:.82rem}
}
/* Work (homepage): link to the dedicated /work page, under the progress dots */
.work-all{font:700 .78rem var(--h);letter-spacing:.04em;color:var(--em);text-decoration:underline;text-underline-offset:3px;white-space:nowrap;padding:2px 0}
.work-all:hover,.work-all:focus-visible{background:var(--lime);color:var(--ink)}
.work-all:focus-visible{outline:2px solid var(--em);outline-offset:2px}
@media(max-width:560px){.work-all{font-size:.72rem}}
/* Lab (homepage): link to the dedicated /lab page, inside the experiment counter */
.lab-all{display:inline-block;margin-top:8px;font:700 .78rem var(--h);letter-spacing:.08em;text-transform:uppercase;color:var(--lime);text-decoration:underline;text-underline-offset:3px}
.lab-all:hover,.lab-all:focus-visible{background:var(--lime);color:var(--ink);text-decoration:none}
.lab-all:focus-visible{outline:2px solid var(--lime);outline-offset:2px}

