/* ═══════════════════════════════════════════════════════════════════════════
   journal.css — "The Vitalité Review": editorial-journal design system.
   Scoped to body.jr so pages that have not been redesigned are untouched.
   Paper (light) and Night edition (dark, body.dark). Gold + serif = brand.
   Native CSS only. Load LAST.
   ═══════════════════════════════════════════════════════════════════════════ */
@import url('fonts.css?v=4');

body.jr{
  --jr-paper:#F3EEE4; --jr-paper2:#EAE3D5; --jr-card:#F8F5EE;
  --jr-ink:#17140F; --jr-ink2:#4B453B; --jr-ink3:#857D6F;
  --jr-rule:#CDC3B1; --jr-rule2:#DED6C7;
  --jr-gold:#946A08; --jr-gold-hi:#B8860B; --jr-navy:#14304A;
  --jr-ox:#8C2F2A;
  --jr-display:"Playfair Display","Bodoni Moda SC",Didot,"Songti SC","STSong",serif;
  --jr-text:"EB Garamond",Garamond,Georgia,"Songti SC","STSong",serif;
  --jr-w:1240px; --jr-pad:clamp(20px,4vw,48px);
  --jr-ease:cubic-bezier(.2,.7,.1,1);
  /* keep the shared widgets on-palette.
     NO `--surface:var(--jr-card)` here. design/tokens.css (this file's
     replacement layer, loaded after it) declares `--jr-card:var(--surface)`,
     so deriving --surface back from --jr-card closes a cycle — and a cycle
     makes BOTH names guaranteed-invalid. --surface then reads as the empty
     string on body and every descendant, while still resolving on <html>:
     `background:var(--surface)` went transparent and every
     `color-mix(…, var(--surface))` became invalid at computed-value time,
     which for an SVG fill means black. --surface has a literal in tokens.css
     and inherits correctly; the alias runs one way only. */
  --bg:var(--jr-paper); --surface2:var(--jr-paper2);
  --text:var(--jr-ink); --text2:var(--jr-ink2); --text3:var(--jr-ink3);
  --border:var(--jr-rule2); --border2:var(--jr-rule); --accent:var(--jr-gold-hi);
  --font:var(--jr-text); --font-heading:var(--jr-display);
  background:var(--jr-paper); color:var(--jr-ink);
  font-family:var(--jr-text); font-size:18px; line-height:1.6;
  font-feature-settings:"kern","liga","onum";
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  margin:0; min-height:100vh;
}
body.jr.dark{
  --jr-paper:#0F141C; --jr-paper2:#161D28; --jr-card:#131A24;
  --jr-ink:#ECE5D5; --jr-ink2:#B7AF9F; --jr-ink3:#7F7969;
  --jr-rule:#2E3846; --jr-rule2:#232C38;
  --jr-gold:#E3C277; --jr-gold-hi:#E8C87A; --jr-navy:#9DB8D6; --jr-ox:#D9897F;
}
html.jr-root{background:#F3EEE4}
html.jr-root.jr-dk{background:#0F141C}
/* paper grain — a tiny SVG tiled on the body itself (no overlay element) */
body.jr{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .18 0 0 0 .04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");background-size:160px 160px}
body.jr.dark{background-image:none}
body.jr ::selection{background:var(--jr-gold-hi);color:#17140F}
body.jr a{color:inherit;text-decoration:none}
body.jr img{max-width:100%;display:block}
body.jr :focus-visible{outline:2px solid var(--jr-gold-hi);outline-offset:3px}
body.jr h1,body.jr h2,body.jr h3,body.jr h4{font-family:var(--jr-display);color:var(--jr-ink);letter-spacing:-.01em}
/* margin reset ONLY inside journal-built blocks — legacy pages keep their own heading/paragraph spacing */
:where(.jr-mast,.jr-wrap,.jr-colo,.jr-shead,.jr-auth,.jr-cover,.jr-cols,.jr-notes,.jr-toc,.jr-contents) :is(h1,h2,h3,h4,p){margin:0}

/* ── frame ─────────────────────────────────────────────────────────────── */
.jr-wrap{max-width:var(--jr-w);margin:0 auto;padding:0 var(--jr-pad)}
.jr-rule{border:0;border-top:1px solid var(--jr-rule);margin:0}
.jr-rule2{border:0;height:4px;border-top:1px solid var(--jr-ink);border-bottom:1px solid var(--jr-ink);margin:0}
.jr-k{font-family:var(--jr-text);font-size:.72rem;font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:var(--jr-gold)}
body.lang-zh .jr-k{letter-spacing:.12em;font-size:.78rem}
.jr-k-ink{color:var(--jr-ink3)}
.jr-sec{padding:clamp(56px,8vw,112px) 0}
.jr-sec + .jr-sec{border-top:1px solid var(--jr-rule)}
.jr-head{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:2rem 4rem;align-items:end;margin-bottom:clamp(32px,5vw,64px)}
.jr-head h2{font-size:clamp(2.1rem,4.4vw,3.6rem);line-height:1.02;font-weight:500}
.jr-head h2 em,.jr-h1 em{font-style:italic;color:var(--jr-gold);font-weight:400}
.jr-head p{font-size:1.12rem;color:var(--jr-ink2);max-width:40ch;justify-self:end}
.jr-head .jr-k{display:block;margin-bottom:1rem}

/* ── masthead ──────────────────────────────────────────────────────────── */
.jr-mast{padding-top:14px}
.jr-meta{display:flex;align-items:center;justify-content:space-between;gap:1rem;font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;color:var(--jr-ink3);padding-bottom:12px}
.jr-meta .jr-mid{flex:1;text-align:center}
.jr-bar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:1rem;padding:18px 0 16px}
.jr-nav{display:flex;gap:1.6rem;font-size:.95rem;color:var(--jr-ink2)}
.jr-nav a{position:relative;padding:6px 0}
.jr-nav a::after,.jr-ul::after{content:"";position:absolute;left:0;right:0;bottom:2px;height:1px;background:currentColor;transform:scaleX(0);transform-origin:left;transition:transform .35s var(--jr-ease)}
.jr-nav a:hover::after,.jr-ul:hover::after{transform:scaleX(1)}
.jr-ul{position:relative}
.jr-word{font-family:var(--font-display);font-size:clamp(2rem,4.2vw,3.1rem);line-height:1;font-weight:500;letter-spacing:-.02em;color:var(--jr-ink);text-align:center;white-space:nowrap}
.jr-word em{font-style:italic;color:var(--jr-gold);font-weight:400}
.jr-tools{display:flex;justify-content:flex-end;align-items:center;gap:.4rem}
body.jr .jr-tools .btn-icon{width:40px;height:40px;min-width:40px;border:1px solid var(--jr-rule);border-radius:50%;background:transparent;color:var(--jr-ink);font:600 .8rem/1 var(--jr-text);box-shadow:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:border-color .25s,background .25s}
body.jr .jr-tools .btn-icon:hover{border-color:var(--jr-ink);background:var(--jr-paper2)}
body.jr .jr-tools .btn-login,body.jr .jr-tools #loginBtn{display:inline-flex;align-items:center;gap:.4rem;min-height:40px;padding:0 1.1rem;border:1px solid var(--jr-ink);border-radius:0;background:var(--jr-ink);color:var(--jr-paper);font:600 .74rem/1 var(--jr-text);letter-spacing:.14em;text-transform:uppercase;box-shadow:none;transition:background .25s,color .25s}
body.jr .jr-tools #loginBtn:hover{background:transparent;color:var(--jr-ink)}

/* ── buttons & links ───────────────────────────────────────────────────── */
.jr-btn{display:inline-flex;align-items:center;gap:.7rem;min-height:52px;padding:0 1.6rem;background:var(--jr-ink);color:var(--jr-paper)!important;border:1px solid var(--jr-ink);font:600 .78rem/1 var(--jr-text);letter-spacing:.16em;text-transform:uppercase;transition:background .3s var(--jr-ease),color .3s var(--jr-ease);cursor:pointer}
.jr-btn .jr-arr{transition:transform .35s var(--jr-ease)}
.jr-btn:hover{background:transparent;color:var(--jr-ink)!important}
.jr-btn:hover .jr-arr,.jr-more:hover .jr-arr{transform:translateX(5px)}
.jr-btn-ghost{background:transparent;color:var(--jr-ink)!important}
.jr-btn-ghost:hover{background:var(--jr-ink);color:var(--jr-paper)!important}
.jr-more{display:inline-flex;align-items:center;gap:.5rem;font-size:.95rem;font-style:italic;color:var(--jr-ink);border-bottom:1px solid var(--jr-rule);padding-bottom:3px;transition:border-color .3s}
.jr-more:hover{border-color:var(--jr-gold-hi)}
.jr-arr{display:inline-block;font-style:normal}

/* ── cover (hero) ──────────────────────────────────────────────────────── */
.jr-cover{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:clamp(32px,5vw,80px);padding:clamp(40px,6vw,88px) 0 clamp(40px,5vw,72px);align-items:end}
.jr-h1{font-size:clamp(3rem,7.4vw,6.6rem);line-height:.94;font-weight:500;letter-spacing:-.03em;margin:1.2rem 0 1.6rem!important}
body.lang-zh .jr-h1{letter-spacing:0;line-height:1.1;font-size:clamp(2.6rem,6.2vw,5.4rem)}
.jr-dek{font-size:clamp(1.15rem,1.6vw,1.4rem);line-height:1.5;font-style:italic;color:var(--jr-ink2);max-width:36ch}
.jr-byline{display:flex;flex-wrap:wrap;gap:.4rem 1.4rem;margin:1.8rem 0 2.2rem;font-size:.8rem;letter-spacing:.14em;text-transform:uppercase;color:var(--jr-ink3)}
.jr-byline span+span::before{content:"·";margin-right:1.4rem;color:var(--jr-rule)}
.jr-ctas{display:flex;flex-wrap:wrap;align-items:center;gap:1rem 1.8rem}
.jr-fig{margin:0}
.jr-ph{position:relative;overflow:hidden;background:var(--jr-paper2)}
.jr-fig .jr-ph{aspect-ratio:4/5}
.jr-ph img{width:100%;height:100%;object-fit:cover;filter:grayscale(1) contrast(1.08) brightness(1.02);mix-blend-mode:multiply;transition:transform 1.2s var(--jr-ease)}
body.jr.dark .jr-ph img{mix-blend-mode:normal;filter:grayscale(1) contrast(1.05) brightness(.8)}
.jr-ph::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 55%,rgba(148,106,8,.18));pointer-events:none}
.jr-fig:hover .jr-ph img,.jr-item:hover .jr-ph img{transform:scale(1.035)}
.jr-cap{display:flex;gap:.8rem;margin-top:.8rem;font-size:.85rem;line-height:1.45;color:var(--jr-ink3);font-style:italic}
.jr-cap b{font-style:normal;font-weight:600;color:var(--jr-ink);letter-spacing:.06em;white-space:nowrap}

/* ── contents (numbered columns) ───────────────────────────────────────── */
.jr-cols{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:3rem;border-top:1px solid var(--jr-ink)}
.jr-item{position:relative;display:flex;flex-direction:column;gap:.9rem;padding:1.6rem 0 1.8rem;transition:background .35s var(--jr-ease)}
.jr-item+.jr-item::before{content:"";position:absolute;left:-1.5rem;top:0;bottom:0;border-left:1px solid var(--jr-rule)}
.jr-item .jr-n{font-family:var(--jr-display);font-size:.95rem;font-style:italic;color:var(--jr-gold)}
.jr-item h3{font-size:1.65rem;line-height:1.1;font-weight:500}
.jr-item p{font-size:1rem;color:var(--jr-ink2);flex:1}
.jr-item .jr-ph{aspect-ratio:3/2}
.jr-item .jr-go{font-size:.74rem;letter-spacing:.16em;text-transform:uppercase;font-weight:600;color:var(--jr-ink)}
.jr-item:hover .jr-go{color:var(--jr-gold)}

/* ── figures (numbers) ─────────────────────────────────────────────────── */
.jr-nums{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--jr-rule);border-bottom:1px solid var(--jr-rule)}
.jr-num{padding:2rem 1.4rem;border-right:1px solid var(--jr-rule)}
.jr-num:last-child{border-right:0}
.jr-num b{display:block;font-family:var(--font-display);font-size:clamp(3.2rem,6vw,5.2rem);line-height:1;font-weight:400;color:var(--jr-ink);font-variant-numeric:lining-nums}
.jr-num span{display:block;margin-top:.7rem;font-size:.95rem;color:var(--jr-ink2);font-style:italic}

/* ── essay ─────────────────────────────────────────────────────────────── */
.jr-essay{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:clamp(32px,6vw,96px)}
.jr-body{column-count:2;column-gap:2.6rem;column-rule:1px solid var(--jr-rule2);font-size:1.12rem;line-height:1.7;color:var(--jr-ink2);hyphens:auto}
.jr-body p+p{margin-top:1em;text-indent:1.4em}
.jr-drop::first-letter{float:left;font-family:var(--font-display);font-size:4.6em;line-height:.82;padding:.06em .1em 0 0;color:var(--jr-gold);font-weight:500}
body.lang-zh .jr-drop::first-letter{font-size:2.6em;line-height:1}
.jr-pull{margin:2.4rem 0 0;padding:1.6rem 0;border-top:1px solid var(--jr-ink);border-bottom:1px solid var(--jr-rule);font-family:var(--font-display);font-style:italic;font-size:clamp(1.5rem,2.4vw,2rem);line-height:1.25;color:var(--jr-ink)}
.jr-pull small{display:block;margin-top:.9rem;font-family:var(--jr-text);font-style:normal;font-size:.72rem;letter-spacing:.18em;text-transform:uppercase;color:var(--jr-ink3)}
.jr-notes{list-style:none;margin:0;padding:0;counter-reset:n}
.jr-notes li{counter-increment:n;display:grid;grid-template-columns:2.4rem 1fr;gap:.2rem 0;padding:1.1rem 0;border-top:1px solid var(--jr-rule2)}
.jr-notes li:last-child{border-bottom:1px solid var(--jr-rule2)}
.jr-notes li::before{content:counter(n,decimal-leading-zero);font-family:var(--jr-display);font-style:italic;color:var(--jr-gold);font-size:.95rem;grid-row:span 2}
.jr-notes b{font-family:var(--jr-display);font-weight:500;font-size:1.15rem;color:var(--jr-ink)}
.jr-notes span{font-size:.98rem;color:var(--jr-ink2)}

/* ── table of contents with leaders ────────────────────────────────────── */
.jr-toc{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0 2.4rem}
.jr-part h3{display:flex;align-items:baseline;gap:.7rem;font-size:1.5rem;font-weight:500;padding:0 0 .9rem;border-bottom:1px solid var(--jr-ink)}
.jr-part h3 i{font-family:var(--jr-display);color:var(--jr-gold);font-size:1rem}
.jr-part > p{font-style:italic;color:var(--jr-ink3);font-size:.95rem;line-height:1.45;margin:.7rem 0 .4rem!important;min-height:2.9em}
.jr-part ol{list-style:none;margin:0;padding:0}
.jr-part li a{display:flex;align-items:baseline;gap:.5rem;padding:.62rem 0;border-bottom:1px dotted var(--jr-rule);font-size:1.02rem;color:var(--jr-ink);transition:color .25s,padding .35s var(--jr-ease)}
.jr-part li a:hover{color:var(--jr-gold);padding-left:.35rem}
.jr-part li a .t{flex:1}
.jr-part li a .p{font-family:var(--jr-display);font-style:italic;font-size:.9rem;color:var(--jr-ink3);font-variant-numeric:lining-nums}

/* ── closing / colophon ────────────────────────────────────────────────── */
.jr-close{text-align:center;padding:clamp(72px,10vw,140px) 0}
.jr-close h2{font-size:clamp(2.6rem,6vw,5rem);line-height:1;font-weight:500;letter-spacing:-.02em}
.jr-close h2 em{font-style:italic;color:var(--jr-gold);font-weight:400}
.jr-close p{margin:1.2rem auto 2.4rem!important;font-style:italic;font-size:1.2rem;color:var(--jr-ink2);max-width:40ch}
.jr-close .jr-ctas{justify-content:center}
.jr-colo{border-top:1px solid var(--jr-ink);padding:2.4rem 0 3rem;font-size:.9rem;color:var(--jr-ink3)}
.jr-colo-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:2rem}
.jr-colo h4{font-family:var(--jr-text);font-size:.7rem;font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:var(--jr-ink);margin-bottom:.9rem}
.jr-colo a{display:block;padding:.2rem 0;color:var(--jr-ink2)}
.jr-colo a:hover{color:var(--jr-gold)}
.jr-colo .jr-word{text-align:left;font-size:1.9rem;margin-bottom:.8rem}
.jr-fine{margin-top:2.4rem;padding-top:1.2rem;border-top:1px solid var(--jr-rule2);display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;font-size:.8rem}

/* ── shared widgets on journal pages ───────────────────────────────────── */
body.jr #qnaFab{background:var(--jr-ink)!important;color:var(--jr-paper)!important;box-shadow:0 6px 18px rgba(23,20,15,.18)!important}
body.jr .back-top{background:var(--jr-ink);color:var(--jr-paper);border-radius:0;box-shadow:none}

/* ── entrance: one calm rise, once, on the cover only ──────────────────── */
@keyframes jrRise{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
@keyframes jrFade{from{opacity:0}to{opacity:1}}
.jr-in{animation:jrRise .9s var(--jr-ease) both}
.jr-in.d1{animation-delay:.08s}.jr-in.d2{animation-delay:.18s}.jr-in.d3{animation-delay:.3s}.jr-in.d4{animation-delay:.42s}
.jr-in-f{animation:jrFade 1.4s var(--jr-ease) .2s both}
@media (prefers-reduced-motion:reduce){.jr-in,.jr-in-f{animation:none}.jr-ph img,.jr-btn .jr-arr{transition:none}}

/* ── responsive ────────────────────────────────────────────────────────── */
@media (max-width:1080px){
  .jr-cols,.jr-toc{grid-template-columns:repeat(2,minmax(0,1fr))}
  .jr-item:nth-child(3)::before{display:none}
  .jr-item:nth-child(n+3){border-top:1px solid var(--jr-rule)}
  .jr-toc{gap:2.4rem}
  .jr-colo-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:820px){
  body.jr{font-size:17px}
  .jr-cover,.jr-essay,.jr-head{grid-template-columns:1fr}
  .jr-head p{justify-self:start}
  .jr-cover{align-items:start}
  .jr-fig .jr-ph{aspect-ratio:16/10}
  .jr-body{column-count:1}
  .jr-nav{display:none}
  .jr-bar{grid-template-columns:auto 1fr}
  .jr-word{text-align:left;font-size:1.8rem}
  .jr-meta .jr-hide-s{display:none}
  .jr-nums{grid-template-columns:repeat(2,minmax(0,1fr))}
  .jr-num:nth-child(2){border-right:0}
  .jr-num:nth-child(n+3){border-top:1px solid var(--jr-rule)}
}
@media (max-width:560px){
  .jr-cols,.jr-toc,.jr-colo-grid{grid-template-columns:1fr}
  .jr-item{padding:1.4rem 0!important}
  .jr-item::before{display:none}
  .jr-item+.jr-item{border-top:1px solid var(--jr-rule)}
  .jr-meta{font-size:.62rem;letter-spacing:.12em}
  .jr-meta .jr-mid{display:none}
  body.jr .jr-tools #loginBtn{padding:0 .8rem}
  .jr-btn{width:100%;justify-content:center}
  .jr-byline{gap:.35rem 1.1rem}
  .jr-byline span+span::before{display:none}
  .jr-num{padding:1.4rem .9rem}
}

/* ═══ SHELL (home / toc keep the app shell — re-dressed as a journal) ════ */
body.jr.lin-v2 header.lin-topbar,body.jr.lin-v2 > .page-wrapper > header{background:var(--jr-paper)!important;border-bottom:1px solid var(--jr-ink)!important;box-shadow:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
body.jr .lin-topbar-inner{min-height:72px}
body.jr header .logo{font-family:var(--font-display)!important;font-size:1.65rem!important;font-weight:500!important;letter-spacing:-.02em;color:var(--jr-ink)!important;text-transform:none!important;font-variant:normal!important}
body.jr header .logo span{font-style:italic;font-weight:400;color:var(--jr-gold)}
body.jr header .btn-icon,body.jr .lin-study-btn{width:40px;height:40px;min-width:40px;border:1px solid var(--jr-rule)!important;border-radius:50%!important;background:transparent!important;color:var(--jr-ink)!important;box-shadow:none!important;font:600 .8rem/1 var(--jr-text)!important}
body.jr header .btn-icon:hover,body.jr .lin-study-btn:hover{border-color:var(--jr-ink)!important;background:var(--jr-paper2)!important}
body.jr .lin-search{background:transparent!important;border:0!important;border-bottom:1px solid var(--jr-rule)!important;border-radius:0!important;box-shadow:none!important}
body.jr .lin-search-input{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important;color:var(--jr-ink)!important;font:italic 400 1.02rem/1 var(--jr-text)!important}
body.jr .lin-search-input::placeholder{color:var(--jr-ink3)}
body.jr .lin-search:focus-within{border-bottom-color:var(--jr-ink)!important}
body.jr .lin-kbd{background:transparent!important;border:1px solid var(--jr-rule)!important;border-radius:2px!important;box-shadow:none!important;color:var(--jr-ink3)!important}
body.jr header #loginBtn{min-height:36px;padding:0 .9rem!important;border:1px solid var(--jr-ink)!important;border-radius:0!important;background:transparent!important;color:var(--jr-ink)!important;box-shadow:none!important;font:600 .72rem/1 var(--jr-text)!important;letter-spacing:.14em;text-transform:uppercase}
body.jr header #loginBtn:hover{background:var(--jr-ink)!important;color:var(--jr-paper)!important}
body.jr .log-menu{background:var(--jr-card)!important;border:1px solid var(--jr-ink)!important;border-radius:0!important;box-shadow:0 14px 30px rgba(23,20,15,.12)!important}
body.jr .log-item{font-family:var(--jr-text)!important;color:var(--jr-ink)!important;border-radius:0!important}
body.jr .log-item:hover{background:var(--jr-paper2)!important}
body.jr .sec-switcher{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;gap:0!important}
body.jr .sec-pill{background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;color:var(--jr-ink2)!important;font:600 .72rem/1 var(--jr-text)!important;letter-spacing:.14em;text-transform:uppercase;padding:0 .85rem!important;min-height:40px;position:relative}
body.jr .sec-pill + .sec-pill::before{content:"";position:absolute;left:0;top:30%;bottom:30%;border-left:1px solid var(--jr-rule)}
body.jr .sec-pill:hover,body.jr .sec-pill.on,body.jr .sec-pill[aria-current]{color:var(--jr-ink)!important}
body.jr .sec-pill.on .sec-pill-label,body.jr .sec-pill[aria-current] .sec-pill-label{border-bottom:1px solid var(--jr-gold-hi)}
body.jr .sec-ico{color:var(--jr-gold)}
body.jr .tut-replay{background:transparent!important;border:0!important;box-shadow:none!important;color:var(--jr-ink3)!important}
body.jr .nb-bell{border-radius:50%!important}
body.jr .vt-note{background:transparent!important;border:0!important;border-top:1px solid var(--jr-rule)!important;border-radius:0!important;box-shadow:none!important;font-style:italic;color:var(--jr-ink2)}
body.jr.lin-v2 footer{background:transparent!important;border-top:1px solid var(--jr-ink)!important;color:var(--jr-ink3)!important;font-size:.9rem}
body.jr.lin-v2 footer a{color:var(--jr-gold)!important}

/* ═══ HOME — "your edition" ══════════════════════════════════════════════ */
body.jr-home .hm{max-width:var(--jr-w)!important;margin:0 auto!important;padding:0 var(--jr-pad) clamp(56px,7vw,96px)!important}
body.jr-home .hm > section,body.jr-home .hm > .jr-shead{margin:0!important}
body.jr-home .hm > section.hm-hero{display:grid!important;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);grid-template-areas:"hello level" "hello streak";gap:0 clamp(32px,5vw,72px);padding:clamp(40px,6vw,80px) 0 clamp(36px,5vw,56px)!important;border-bottom:1px solid var(--jr-ink);background:none!important;box-shadow:none!important}
body.jr-home .hm-hello{grid-area:hello;align-self:end}
body.jr-home .hm-date{font:600 .72rem/1 var(--jr-text)!important;letter-spacing:.2em!important;text-transform:uppercase;color:var(--jr-gold)!important;margin:0 0 1.2rem!important}
body.jr-home #hmGreet{font-family:var(--font-display)!important;font-size:clamp(3rem,6.6vw,6rem)!important;line-height:.95!important;font-weight:500!important;letter-spacing:-.022em!important;text-transform:none!important;font-variant:normal!important;color:var(--jr-ink)!important;margin:0 0 1.3rem!important;background:none!important;-webkit-text-fill-color:currentColor!important}
body.lang-zh.jr-home #hmGreet{letter-spacing:0!important;line-height:1.1!important}
body.jr-home .hm-sub{font-size:clamp(1.1rem,1.5vw,1.3rem)!important;font-style:italic;color:var(--jr-ink2)!important;max-width:38ch;line-height:1.5}
body.jr-home .hm-level,body.jr-home .hm-streak-card{background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:1.2rem 0 1.2rem 1.6rem!important;border-left:1px solid var(--jr-rule)!important;margin:0!important}
body.jr-home .hm-level{grid-area:level;align-self:end;display:flex;align-items:center;gap:1rem;border-bottom:1px solid var(--jr-rule2)!important}
body.jr-home .hm-streak-card{grid-area:streak}
body.jr-home .hm-lv-ring{width:64px!important;height:64px!important}
body.jr-home .hm-lv-ring .hm-rbg{stroke:var(--jr-rule2)!important}
body.jr-home .hm-lv-ring .hm-rfg{stroke:var(--jr-gold-hi)!important}
body.jr-home .hm-lv-ring b{font:italic 500 .95rem/1 var(--jr-display)!important;color:var(--jr-ink)!important}
body.jr-home .hm-lv-title{font:500 1.5rem/1.1 var(--font-display)!important;color:var(--jr-ink)!important}
body.jr-home .hm-lv-next{font-style:italic;font-size:.95rem!important;color:var(--jr-ink3)!important}
body.jr-home .hm-k,body.jr-home .sp-k{font:600 .7rem/1 var(--jr-text)!important;letter-spacing:.2em!important;text-transform:uppercase!important;color:var(--jr-ink3)!important}
body.jr-home .hm-streak b{font:400 3rem/1 var(--jr-display)!important;color:var(--jr-ink)!important}
body.jr-home .hm-streak span{font-style:italic;color:var(--jr-ink2)!important}
body.jr-home .hm-day{color:var(--jr-ink3)!important;font-weight:600!important;font-size:.7rem!important}
body.jr-home .hm-day i{border-radius:0!important;max-width:22px!important;background:transparent!important;border:1px solid var(--jr-rule)!important;box-shadow:none!important}
body.jr-home .hm-day.on i{background:var(--jr-ink)!important;border-color:var(--jr-ink)!important}
body.jr-home .hm-day.today{color:var(--jr-ink)!important}
body.jr-home .hm-day.today i{border-color:var(--jr-gold-hi)!important;box-shadow:inset 0 0 0 2px var(--jr-paper)!important}
/* strip → a ruled row of figures.
   Every cell runs the same four rows — label, figure, hairline, caption — and
   the figure row is a fixed-height slot, so the hairline and the caption land
   on one y across the whole strip. Without that slot each cell sized itself
   from its own type (41.6 / 21.6 / 28.8px), so the two rules sat 17px apart
   and the third cell had no rule at all. */
body.jr-home .hm-strip{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:0!important;border-bottom:1px solid var(--jr-rule);margin:0!important}
body.jr-home .sp-card{display:flex!important;flex-direction:column!important;gap:0!important;background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:1.6rem 1.6rem 1.7rem!important;border-right:1px solid var(--jr-rule)!important}
body.jr-home .sp-card:first-child{padding-left:0!important}
/* flush right as well: the rules in the cell above (therapist / streak panels)
   run to the page edge, and a rule that stops one gutter short of them reads
   as a mistake, not as a decision. */
body.jr-home .sp-card:last-child{border-right:0!important;padding-right:0!important}
/* 2.75rem is the line box of the largest figure (41.6px at 1440), so the tall
   cell fills the slot exactly and every smaller figure is bottom-aligned to
   the same edge instead of floating on its own baseline. */
body.jr-home .sp-card > b,
body.jr-home .sp-figs{min-height:2.75rem!important;margin:.85rem 0 .55rem!important}
body.jr-home .sp-card > b{display:flex!important;align-items:flex-end!important;font:400 clamp(1.8rem,3vw,2.6rem)/1.05 var(--jr-display)!important;color:var(--jr-ink)!important}
body.jr-home .sp-card > b i{font-style:italic;font-size:.55em;color:var(--jr-ink3)}
/* study totals carries several figures, not one: same slot, one column each,
   so its numbers share the bottom edge with the single figures beside them.
   home-analytics.js writes the same track list on both rows. */
body.jr-home .sp-figs{display:grid!important;align-items:end!important;grid-template-columns:repeat(auto-fit,minmax(4.2rem,1fr));column-gap:1rem;row-gap:.45rem}
body.jr-home .sp-figs b{font:400 clamp(1.4rem,2.2vw,1.9rem)/1 var(--jr-display)!important;color:var(--jr-ink)!important;white-space:nowrap}
/* five or six totals: the row stays one line, so the figures and their labels
   step down rather than wrapping under the hairline */
body.jr-home .sp-figs.is-dense b{font-size:1.15rem!important}
body.jr-home .sp-lab.is-dense span{font-size:.64em;overflow-wrap:break-word}
body.jr-home .sp-bar{display:block;height:2px!important;background:var(--jr-rule2)!important;border-radius:0!important;overflow:hidden}
body.jr-home .sp-bar i{display:block;height:100%;background:var(--jr-gold-hi)!important;border-radius:0!important}
/* no single percentage to draw: the hairline stays, the fill goes */
body.jr-home .sp-bar.is-rule i{display:none!important}
body.jr-home .sp-sub,
body.jr-home .sp-lab{display:block;margin-top:.55rem!important;font-style:italic;font-size:.92rem!important;color:var(--jr-ink2)!important}
body.jr-home .sp-lab{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(4.2rem,1fr));column-gap:1rem;row-gap:.3rem}
body.jr-home .sp-lab span{font-size:.78em;line-height:1.25;color:var(--jr-ink3)!important;font-style:italic}
/* section heads inside home */
.jr-shead{padding:clamp(48px,6vw,80px) 0 1.6rem}
.jr-shead h2,body.jr-home .hm-sec > h2{font:500 clamp(2rem,3.6vw,3rem)/1.05 var(--font-display)!important;letter-spacing:-.018em!important;color:var(--jr-ink)!important;text-transform:none!important;font-variant:normal!important;margin:.7rem 0 0!important}
.jr-shead h2 em{font-style:italic;font-weight:400;color:var(--jr-gold)}
/* courses → three ruled columns */
body.jr-home .hm-courses{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;column-gap:3rem!important;row-gap:0!important;border-top:1px solid var(--jr-ink);margin:0!important}
body.jr-home .cr{position:relative;background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:1.8rem 0 1rem!important;display:flex;flex-direction:column;gap:1.1rem}
body.jr-home .cr + .cr::before{content:"";position:absolute;left:-1.5rem;top:0;bottom:0;border-left:1px solid var(--jr-rule)}
body.jr-home .cr::after{display:none!important}
body.jr-home .cr-h{display:flex;align-items:baseline;gap:.8rem}
body.jr-home .cr-ico{background:none!important;border:0!important;box-shadow:none!important;width:auto!important;height:auto!important;color:var(--jr-gold)!important}
body.jr-home .cr-name{font:500 1.9rem/1.05 var(--font-display)!important;color:var(--jr-ink)!important;text-transform:none!important;font-variant:normal!important;letter-spacing:-.014em!important}
body.jr-home .cr-meta{font-style:italic;font-size:.95rem!important;color:var(--jr-ink3)!important;margin-top:.3rem}
body.jr-home .cr-prog{height:2px!important;background:var(--jr-rule2)!important;border-radius:0!important;margin:0!important}
body.jr-home .cr-prog i{background:var(--jr-gold-hi)!important;border-radius:0!important}
body.jr-home .cr-cont{display:flex!important;align-items:center;gap:1rem;background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important;color:var(--jr-ink)!important}
body.jr-home .cr-cont-n{width:auto!important;height:auto!important;min-width:0!important;flex:0 0 auto!important;background:none!important;box-shadow:none!important;border-radius:0!important;font:italic 400 2.6rem/1 var(--jr-display)!important;color:var(--jr-gold)!important;white-space:nowrap}
body.jr-home .cr-cont-t{display:block;font:500 1.15rem/1.2 var(--jr-display)!important;color:var(--jr-ink)!important}
body.jr-home .cr-cont-m{display:inline!important;background:none!important;border:0!important;padding:0!important;margin:0!important;font-style:italic;font-size:.9rem!important;color:var(--jr-ink3)!important}
body.jr-home .cr-cont:hover .cr-cont-t{text-decoration:underline;text-decoration-color:var(--jr-gold-hi);text-underline-offset:4px}
body.jr-home .cr-idea{background:none!important;border:0!important;border-left:0!important;border-top:1px solid var(--jr-rule2)!important;border-radius:0!important;padding:1rem 0 0!important;margin:0!important}
body.jr-home .cr-idea::before{content:"Idea of the day";display:block;font:600 .68rem/1 var(--jr-text);letter-spacing:.2em;text-transform:uppercase;color:var(--jr-gold);margin-bottom:.7rem}
body.lang-zh.jr-home .cr-idea::before{content:"今日一念";letter-spacing:.12em}
body.jr-home .cr-idea b{display:block;font:italic 500 1.2rem/1.3 var(--jr-display)!important;color:var(--jr-ink)!important;margin-bottom:.4rem}
body.jr-home .cr-idea p{font-size:.98rem!important;line-height:1.55;color:var(--jr-ink2)!important}
body.jr-home .cr-idea .hm-link{display:inline-block;margin-top:.6rem;font-style:italic;color:var(--jr-ink)!important;border-bottom:1px solid var(--jr-rule)}
body.jr-home .cr-tabs{display:flex!important;gap:0!important;background:none!important;border:0!important;border-top:1px solid var(--jr-rule2)!important;border-radius:0!important;box-shadow:none!important;padding:.8rem 0 0!important;margin-top:auto!important}
body.jr-home .cr-tabs button{flex:1;min-height:40px;background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;color:var(--jr-ink2)!important;font:600 .66rem/1 var(--jr-text)!important;letter-spacing:.14em;text-transform:uppercase;padding:0 .2rem!important}
body.jr-home .cr-tabs button + button{border-left:1px solid var(--jr-rule2)!important}
body.jr-home .cr-tabs button:hover,body.jr-home .cr-tabs button[aria-selected="true"],body.jr-home .cr-tabs button.on{color:var(--jr-ink)!important}
body.jr-home .cr-tabs button::after{background:var(--jr-gold-hi)!important}
body.jr-home .cr-panel-note{font-style:italic;color:var(--jr-ink3)!important;opacity:1!important}
/* directory, membership, jump back in */
body.jr-home .hm-sec{padding:clamp(48px,6vw,80px) 0 0!important;border:0!important;background:none!important;box-shadow:none!important}
body.jr-home .hmx-lead{font-size:1.1rem!important;font-style:italic;color:var(--jr-ink2)!important;max-width:52ch;margin:.8rem 0 1.6rem!important}
body.jr-home .hmx-gh{display:flex!important;width:100%;align-items:center;justify-content:space-between;min-height:56px;margin:0!important;padding:0!important;background:none!important;border:0!important;border-top:1px solid var(--jr-rule)!important;border-radius:0!important;font:500 1.35rem/1 var(--jr-display)!important;letter-spacing:0!important;text-transform:none!important;color:var(--jr-ink)!important;cursor:pointer}
body.jr-home .hmx-gh:hover{color:var(--jr-gold)!important}
body.jr-home .hmx-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:0 2.4rem!important;padding:0 0 1.4rem}
body.jr-home .hmx-card{display:grid!important;grid-template-columns:auto 1fr;gap:.25rem .8rem;align-items:baseline;background:none!important;border:0!important;border-top:1px dotted var(--jr-rule)!important;border-radius:0!important;box-shadow:none!important;padding:1rem 0!important;color:var(--jr-ink)!important;transform:none!important}
body.jr-home .hmx-ico{grid-row:span 2;background:none!important;border:0!important;box-shadow:none!important;width:auto!important;height:auto!important;color:var(--jr-gold)!important}
body.jr-home .hmx-name{font:500 1.15rem/1.2 var(--jr-display)!important;color:var(--jr-ink)!important}
body.jr-home .hmx-desc{font-size:.95rem!important;line-height:1.5;color:var(--jr-ink2)!important}
body.jr-home .hmx-card:hover .hmx-name{color:var(--jr-gold)!important}
/* .hm-member .hmx-grid deliberately has no border-top. It had one while the
   Access cards were still flattened into dotted ruled lines (where a rule
   above the list read as a section boundary). The cards are bento tiles now
   (bento.css:235 restores their block surface and sets the grid padding to
   0), so a rule on the grid lands 1px above the card borders and runs
   straight through the 16px gap between them — a stray line bridging two
   rounded corners. The section's own 48-80px top padding is the separator. */
body.jr-home .hm-admin-badge{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;background:none!important;border:0!important;border-left:2px solid var(--jr-gold-hi)!important;border-radius:0!important;box-shadow:none!important;padding:.6rem 0 .6rem 1.2rem!important;margin-top:1.2rem;color:var(--jr-ink2)!important;font-style:italic}
body.jr-home .hm-admin-badge .qo-btn{margin-left:auto;min-height:44px;border-radius:0!important;background:var(--jr-ink)!important;color:var(--jr-paper)!important;border:1px solid var(--jr-ink)!important;box-shadow:none!important;font:600 .72rem/1 var(--jr-text)!important;letter-spacing:.14em;text-transform:uppercase;padding:0 1.2rem!important}
body.jr-home .hm-actions{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:0 2rem!important;margin-top:1.4rem;border-top:1px solid var(--jr-ink)}
body.jr-home .hm-act{display:flex!important;align-items:center;gap:.9rem;background:none!important;border:0!important;border-bottom:1px dotted var(--jr-rule)!important;border-radius:0!important;box-shadow:none!important;padding:1rem 0!important;color:var(--jr-ink)!important;transform:none!important}
body.jr-home .hm-act-i{background:none!important;border:0!important;box-shadow:none!important;color:var(--jr-gold)!important;width:auto!important;height:auto!important}
body.jr-home .hm-act b,body.jr-home .hm-act strong{font:500 1.1rem/1.2 var(--jr-display)!important;color:var(--jr-ink)!important}
body.jr-home .hm-act small{font-style:italic;color:var(--jr-ink3)!important}
body.jr-home .hm-act:hover b{color:var(--jr-gold)!important}
body.jr-home .hm-stats-card{background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important;margin-top:1.4rem}
body.jr-home .hm-stats-card > .hm-k{display:none}
body.jr-home .hm-stat-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:0!important;border-top:1px solid var(--jr-rule);border-bottom:1px solid var(--jr-rule)}
body.jr-home .hm-stat-grid > div{padding:1.6rem 1.4rem!important;border-right:1px solid var(--jr-rule)}
body.jr-home .hm-stat-grid > div:first-child{padding-left:0!important}
body.jr-home .hm-stat-grid > div:last-child{border-right:0}
body.jr-home .hm-stat-grid b{display:block;font:400 clamp(2.4rem,4vw,3.6rem)/1 var(--jr-display)!important;color:var(--jr-ink)!important}
body.jr-home .hm-stat-grid span{display:block;margin-top:.6rem;font-style:italic;color:var(--jr-ink2)!important}
body.jr-home .hm-foot{margin-top:3rem!important;font-style:italic;color:var(--jr-ink3)!important}
body.jr-home .hm-foot a{color:var(--jr-ink2)!important;border-bottom:1px solid var(--jr-rule)}
@media (max-width:1080px){
  body.jr-home .hm-courses{grid-template-columns:1fr!important}
  body.jr-home .cr + .cr::before{display:none}
  body.jr-home .cr + .cr{border-top:1px solid var(--jr-rule)!important}
  body.jr-home .hmx-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.jr-home .hm-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:820px){
  body.jr-home .hm > section.hm-hero{grid-template-columns:1fr;grid-template-areas:"hello" "level" "streak"}
  body.jr-home .hm-level,body.jr-home .hm-streak-card{border-left:0!important;padding-left:0!important}
  body.jr-home .hm-level{margin-top:1.6rem!important;border-top:1px solid var(--jr-rule2)!important}
  body.jr-home .hm-strip{grid-template-columns:1fr!important}
  body.jr-home .sp-card{padding:1.2rem 0!important;border-right:0!important;border-bottom:1px solid var(--jr-rule2)!important}
  body.jr-home .hm-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.jr-home .hm-stat-grid > div:nth-child(2){border-right:0}
  body.jr-home .hm-stat-grid > div:nth-child(3){padding-left:0!important}
  body.jr-home .hm-stat-grid > div:nth-child(n+3){border-top:1px solid var(--jr-rule)}
}
@media (max-width:560px){
  body.jr-home .hmx-grid,body.jr-home .hm-actions{grid-template-columns:1fr!important}
  body.jr-home .hm-admin-badge .qo-btn{margin-left:0}
}
body.jr-home .cr-idea .hm-link::after,body.jr-home .cr-idea::after{display:none!important}
body.jr-home .hm-admin-badge .qo-btn{display:inline-flex!important;align-items:center;justify-content:center;line-height:1!important}
body.jr-home .cr-idea .hm-link{border-bottom:0!important;text-decoration:underline;text-decoration-color:var(--jr-rule);text-underline-offset:4px}
@media (max-width:900px){
  body.jr header #loginBtn{width:40px;min-width:40px;height:40px;padding:0!important;border-radius:50%!important;border-color:var(--jr-rule)!important;justify-content:center;font-size:0!important;letter-spacing:0}
  body.jr header #loginBtn .bl-name,body.jr header #loginBtn .caret{display:none!important}
  body.jr header #loginBtn::before{content:"";width:16px;height:16px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.4'%3E%3Ccircle cx='8' cy='5.8' r='2.6'/%3E%3Cpath d='M3.4 13.5a4.6 4.6 0 0 1 9.2 0'/%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 16 16' fill='none' stroke='%23000' stroke-width='1.4'%3E%3Ccircle cx='8' cy='5.8' r='2.6'/%3E%3Cpath d='M3.4 13.5a4.6 4.6 0 0 1 9.2 0'/%3E%3C/svg%3E") center/contain no-repeat}
}

/* ═══ KNOWLEDGE HUB (toc) ════════════════════════════════════════════════ */
body.jr-tocp .page-wrapper > main{display:block}
.jr-cover-toc{align-items:start}
.jr-contents{border-top:1px solid var(--jr-ink);padding-top:1rem}
.jr-contents ol{list-style:none;margin:.8rem 0 0;padding:0;counter-reset:c}
.jr-contents li a{display:flex;align-items:baseline;gap:.6rem;padding:.75rem 0;border-bottom:1px dotted var(--jr-rule);font:500 1.2rem/1.2 var(--jr-display);color:var(--jr-ink);transition:color .25s,padding .35s var(--jr-ease)}
.jr-contents li a::after{content:"";order:1;flex:1;border-bottom:1px dotted var(--jr-rule);transform:translateY(-.25em)}
.jr-contents li a .t{order:0}
.jr-contents li a .p{order:2;font-style:italic;font-size:.95rem;color:var(--jr-gold)}
.jr-contents li a:hover{color:var(--jr-gold);padding-left:.35rem}
.jr-cols3{grid-template-columns:repeat(3,minmax(0,1fr))}
.jr-cols3 .jr-item:nth-child(3n+1)::before{display:none}
.jr-cols3 .jr-item:nth-child(n+4){border-top:1px solid var(--jr-rule)}
.jr-tags{font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;color:var(--jr-ink3)}
.jr-notes2{column-count:2;column-gap:4rem}
.jr-notes2 li{break-inside:avoid}
@media (max-width:1080px){
  .jr-cols3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .jr-cols3 .jr-item::before{display:block}
  .jr-cols3 .jr-item:nth-child(odd)::before{display:none}
  .jr-cols3 .jr-item:nth-child(n+3){border-top:1px solid var(--jr-rule)}
}
@media (max-width:820px){.jr-notes2{column-count:1}}
@media (max-width:560px){.jr-cols3{grid-template-columns:1fr}.jr-cols3 .jr-item::before{display:none!important}}
body.jr-tocp #titlepage{background:none!important;padding:0 var(--jr-pad)!important;margin:0 auto!important;max-width:var(--jr-w)!important;text-align:left!important;border:0!important;min-height:0!important}
body.jr-tocp main > section{background:none;box-shadow:none}
body.jr nav.jr-contents,body.jr nav.jr-nav{background:none!important;border-bottom:0!important;overflow:visible!important}
body.jr nav.jr-contents{display:block!important}
/* the legacy dark theme paints h1–h3 as gradient-clipped text; journal headings are ink + gold italics */
body.jr.dark h1,body.jr.dark h2,body.jr.dark h3,body.jr.dark h4{background:none!important;-webkit-background-clip:border-box!important;background-clip:border-box!important;-webkit-text-fill-color:currentColor!important}

/* ═══ home popovers (flashcards / quick check / map) ═════════════════════ */
body.jr .hp-pop{border-radius:0!important;border:1px solid var(--jr-ink)!important;background:var(--jr-card)!important;box-shadow:0 30px 60px rgba(23,20,15,.22)!important}
body.jr .hp-pop *{border-radius:0!important}
body.jr .hp-head{border-bottom:1px solid var(--jr-rule)!important}
body.jr .hp-title{font:500 1.35rem/1.2 var(--jr-display)!important;color:var(--jr-ink)!important}
body.jr .hp-chip,body.jr .hp-pop .kv-btn,body.jr .hp-prev,body.jr .hp-next,body.jr .hp-x,body.jr .hp-opt{background:transparent!important;border:1px solid var(--jr-rule)!important;box-shadow:none!important;color:var(--jr-ink)!important;font-family:var(--jr-text)!important}
body.jr .hp-chip:hover,body.jr .hp-pop .kv-btn:hover,body.jr .hp-opt:hover{border-color:var(--jr-ink)!important}
body.jr .hp-chip.on,body.jr .hp-chip[aria-pressed="true"],body.jr .hp-chip.active{background:var(--jr-ink)!important;color:var(--jr-paper)!important;border-color:var(--jr-ink)!important}
body.jr .hp-pop .kn-face{background:var(--jr-paper2)!important;border:1px solid var(--jr-rule)!important;box-shadow:none!important;color:var(--jr-ink)!important;font:italic 500 1.5rem/1.3 var(--jr-display)!important;letter-spacing:0!important}
body.jr .hp-pop .kn-face:first-child{background:var(--jr-ink)!important;color:var(--jr-paper)!important;border-color:var(--jr-ink)!important}
body.jr .hp-scrim{background:rgba(23,20,15,.42)!important}

/* ═══ CONTENT LAYER — legacy components on every journal page ═══════════════
   The course, exam, health and community pages keep their own markup; this
   re-dresses the shared component kit in the journal language. ═══════════ */
body.jr::before,body.jr::after{display:none!important}
body.jr .page-wrapper{background:transparent!important}
/* h1–h3 are titles, so they get the serif. h4 stays on --jr-display (sans):
   below ~17px a display face stops earning its keep and just looks softer. */
body.jr .page-wrapper h1,body.jr .page-wrapper h2,body.jr .page-wrapper h3{font-family:var(--font-display)!important;color:var(--jr-ink)!important;background:none!important;-webkit-text-fill-color:currentColor!important;text-transform:none!important;font-variant:normal!important;letter-spacing:var(--tr-serif,-.014em)!important}
body.jr .page-wrapper h1{font-weight:500!important;line-height:1.02!important}
body.jr .page-wrapper h2{font-weight:500!important;line-height:1.08!important}
body.jr .page-wrapper h3,body.jr .page-wrapper h4{font-weight:500!important}
body.jr .page-wrapper h4{font-family:var(--jr-display)!important;color:var(--jr-ink)!important}
body.jr .page-wrapper h1 span,body.jr .page-wrapper h2 span{background:none!important;-webkit-text-fill-color:currentColor!important}
body.lang-zh.jr .page-wrapper h1,body.lang-zh.jr .page-wrapper h2{letter-spacing:0!important}
/* Chinese: the roles that carry the Song ────────────────────────────────────
   The serif/hei split is the same decision in Chinese as Newsreader/Nunito Sans
   is in Latin: a Song for anything that names a thing, Hei for anything that is
   read as a sentence. h1–h3 inherit --font-display already; these are the
   title-ish roles built out of spans, which would otherwise sit in PingFang
   right next to a Song heading. Weight comes down to 500 because the Song face
   has one weight and a faux-bold Song closes up its joins. */
body.lang-zh .hmx-name,
body.lang-zh .bt-title,
body.lang-zh .cr-name,
body.lang-zh .hm-lv-title{
  font-family:var(--font-display)!important;
  font-weight:500!important;
  letter-spacing:0!important;
}
body.jr .page-wrapper p,body.jr .page-wrapper li{color:inherit}
body.jr .page-wrapper{color:var(--jr-ink2)}
body.jr .page-wrapper a:not([class]){color:var(--jr-ink);text-decoration:underline;text-decoration-color:var(--jr-rule);text-underline-offset:3px}
body.jr .page-wrapper a:not([class]):hover{text-decoration-color:var(--jr-gold-hi)}

/* hero blocks */
body.jr .hero,body.jr .ch-hero,body.jr .ib-hero,body.jr section.tp,body.jr .exam-hero{background:none!important;box-shadow:none!important;border:0!important;border-bottom:1px solid var(--jr-ink)!important;border-radius:0!important;text-align:left!important}
body.jr .hero::before,body.jr .hero::after,body.jr .ch-hero::before,body.jr .ch-hero::after{display:none!important}
body.jr .hero h1,body.jr .ch-hero h1,body.jr .ib-hero h1{font-size:clamp(2.8rem,6vw,5.4rem)!important;line-height:.98!important;letter-spacing:-.03em!important;margin:1rem 0 1.2rem!important;max-width:16ch}
body.jr .hero p,body.jr .ch-hero p,body.jr .ib-hero p{font-style:italic;font-size:clamp(1.1rem,1.5vw,1.3rem)!important;line-height:1.5!important;color:var(--jr-ink2)!important;max-width:44ch;margin-left:0!important;margin-right:0!important}
body.jr .hero-actions{justify-content:flex-start!important;gap:.9rem 1.2rem!important}
body.jr .hero-badge,body.jr .section-label,body.jr .eyebrow,body.jr .ib-kicker{display:inline-block!important;background:none!important;border:0!important;box-shadow:none!important;padding:0!important;border-radius:0!important;font:600 .72rem/1.3 var(--jr-text)!important;letter-spacing:.2em!important;text-transform:uppercase!important;color:var(--jr-gold)!important}
body.jr .hero-badge .dot{display:none!important}
body.jr .toc-intro{text-align:left!important}
body.jr .toc-intro p,body.jr .toc-sub{margin-left:0!important;font-style:italic;color:var(--jr-ink2)!important}

/* buttons */
body.jr :is(.page-wrapper,main) .qo-btn,body.jr :is(.page-wrapper,main) .btn,body.jr .page-wrapper .aq-btn,body.jr .page-wrapper .reveal-btn,body.jr .page-wrapper .lb-btn,body.jr .page-wrapper .tab-btn{border-radius:0!important;box-shadow:none!important;background:transparent!important;color:var(--jr-ink)!important;border:1px solid var(--jr-ink)!important;font-family:var(--jr-text)!important;font-weight:600!important;letter-spacing:.12em!important;text-transform:uppercase;font-size:.74rem!important;min-height:44px;transform:none!important;transition:background .25s,color .25s!important}
body.jr :is(.page-wrapper,main) .qo-btn.next,body.jr :is(.page-wrapper,main) .btn.primary,body.jr .page-wrapper .tab-btn.active{background:var(--jr-ink)!important;color:var(--jr-paper)!important}
body.jr :is(.page-wrapper,main) .qo-btn:hover,body.jr :is(.page-wrapper,main) .btn:hover,body.jr .page-wrapper .aq-btn:hover,body.jr .page-wrapper .reveal-btn:hover{background:var(--jr-ink)!important;color:var(--jr-paper)!important}
body.jr :is(.page-wrapper,main) .qo-btn.next:hover,body.jr :is(.page-wrapper,main) .btn.primary:hover{background:transparent!important;color:var(--jr-ink)!important}
body.jr :is(.page-wrapper,main) .qo-btn::before,body.jr :is(.page-wrapper,main) .qo-btn::after,body.jr :is(.page-wrapper,main) .btn::after{display:none!important}

/* cards & panels → ruled boxes */
body.jr .page-wrapper :is(.card,.stat-card,.feature-card,.ch-card,.dash-card,.study-step,.video-card,.cl-card,.exam-panel,.rec-item,.progress-item,.quiz,.quiz-item,.fork-card,.resources-section,.pathway-step,.mastery-card,.vt-plan,.adm,.panel,.box){background:var(--jr-card)!important;border:1px solid var(--jr-rule2)!important;border-radius:0!important;box-shadow:none!important;transform:none!important}
body.jr.dark .page-wrapper :is(.card,.stat-card,.feature-card,.ch-card,.dash-card,.study-step,.video-card,.cl-card,.exam-panel,.rec-item,.progress-item,.quiz,.quiz-item,.fork-card,.resources-section,.pathway-step,.mastery-card,.vt-plan,.adm,.panel,.box){background:var(--jr-card)!important}
body.jr .page-wrapper :is(.card,.stat-card,.feature-card,.ch-card,.dash-card,.study-step,.video-card,.cl-card,.fork-card):hover{border-color:var(--jr-ink)!important}
body.jr .page-wrapper :is(.card,.stat-card,.feature-card,.ch-card,.study-step,.video-card,.cl-card)::before,body.jr .page-wrapper :is(.card,.stat-card,.feature-card,.ch-card,.study-step,.video-card)::after{display:none!important}
body.jr .stat-num{font-family:var(--jr-display)!important;font-weight:400!important;color:var(--jr-ink)!important;background:none!important;-webkit-text-fill-color:currentColor!important}
body.jr .stat-label{font-style:italic;color:var(--jr-ink2)!important}
body.jr .ch-num,body.jr .step-num{background:none!important;box-shadow:none!important;border:0!important;border-radius:0!important;color:var(--jr-gold)!important;font:italic 400 1.9rem/1 var(--font-display)!important;width:auto!important;min-width:2.2rem}
body.jr .ch-go{color:var(--jr-ink)!important;font:600 .72rem/1 var(--jr-text)!important;letter-spacing:.14em;text-transform:uppercase}

/* accordions */
body.jr .accordion{background:none!important;border:0!important;box-shadow:none!important;border-top:1px solid var(--jr-ink)!important;border-radius:0!important}
body.jr .acc-item{background:none!important;border:0!important;border-bottom:1px solid var(--jr-rule)!important;border-radius:0!important;box-shadow:none!important;margin:0!important}
body.jr .acc-header{background:none!important;border:0!important;box-shadow:none!important;border-radius:0!important;font:500 1.3rem/1.25 var(--jr-display)!important;color:var(--jr-ink)!important;padding:1.1rem 0!important}
body.jr .acc-header:hover{color:var(--jr-gold)!important}
body.jr .acc-body,body.jr .acc-body-inner{background:none!important}
body.jr .acc-body-inner{font-size:1.05rem;line-height:1.7;color:var(--jr-ink2)}

/* tables */
body.jr .table-wrap,body.jr .vis-table-wrap,body.jr .native-table-wrap{border:0!important;border-top:1px solid var(--jr-ink)!important;border-radius:0!important;box-shadow:none!important;background:none!important}
body.jr .page-wrapper table{border-collapse:collapse!important;background:none!important}
body.jr .page-wrapper th{background:none!important;color:var(--jr-ink)!important;font:600 .7rem/1.3 var(--jr-text)!important;letter-spacing:.14em;text-transform:uppercase;border-bottom:1px solid var(--jr-ink)!important;border-radius:0!important}
body.jr .page-wrapper td{border-bottom:1px solid var(--jr-rule2)!important;background:none!important;color:var(--jr-ink2)}
body.jr .page-wrapper tr:hover td{background:var(--jr-paper2)!important}

/* callouts, facts, test-prep */
body.jr .callout{background:var(--jr-paper2)!important;border:0!important;border-left:2px solid var(--jr-gold-hi)!important;border-radius:0!important;box-shadow:none!important;color:var(--jr-ink2)!important}
body.jr .callout.k-danger{border-left-color:var(--jr-ox)!important}
body.jr .callout.k-info{border-left-color:var(--jr-navy)!important}
body.jr .callout h4{font-family:var(--jr-display)!important}
body.jr .co-ico{background:none!important;box-shadow:none!important;border:0!important;color:var(--jr-gold)!important}
body.jr .test-prep{background:none!important;border:0!important;border-top:1px solid var(--jr-ink)!important;border-bottom:1px solid var(--jr-rule)!important;border-radius:0!important;box-shadow:none!important}
body.jr .facts{border-radius:0!important;box-shadow:none!important}
body.jr .tp-tag{background:none!important;border:0!important;padding:0!important;border-radius:0!important;box-shadow:none!important;color:var(--jr-gold)!important;font:600 .66rem/1 var(--jr-text)!important;letter-spacing:.18em!important;text-transform:uppercase}
body.jr .tp-tag.npte{color:var(--jr-navy)!important}
body.jr .tp-tag.cnx{color:var(--jr-ox)!important}

/* chips & tags */
body.jr .page-wrapper :is(.rec-chip,.habit-chip,.chat-sug-btn,.ne-badge-chip,.evidence-badge,.q-tag,.chip,.pill,.tag,.sec-tag,.kn-chip){border-radius:2px!important;box-shadow:none!important;background:transparent!important;border:1px solid var(--jr-rule)!important;color:var(--jr-ink2)!important;font-family:var(--jr-text)!important}
body.jr .page-wrapper :is(.rec-chip,.habit-chip,.chat-sug-btn,.kn-chip):hover{border-color:var(--jr-ink)!important;color:var(--jr-ink)!important}

/* progress bars */
body.jr .prog-track,body.jr .progress-bar,body.jr .bar-track{height:2px!important;background:var(--jr-rule2)!important;border-radius:0!important;box-shadow:none!important}
body.jr .prog-fill,body.jr .progress-fill,body.jr .bar-fill{background:var(--jr-gold-hi)!important;border-radius:0!important;box-shadow:none!important}

/* form fields inside content */
body.jr .page-wrapper :is(input[type=text],input[type=email],input[type=number],input[type=search],input[type=password],input:not([type]),textarea,select):not(.lin-search-input){background:transparent!important;border:1px solid var(--jr-rule)!important;border-radius:0!important;box-shadow:none!important;color:var(--jr-ink)!important;font-family:var(--jr-text)!important}
body.jr .page-wrapper :is(input,textarea,select):not(.lin-search-input):focus{border-color:var(--jr-ink)!important;outline:none}

/* misc legacy decorations */
body.jr .back-top{border-radius:0!important}
body.jr .inline-img,body.jr .video-thumb{border-radius:0!important;box-shadow:none!important}
body.jr #readingBar{background:var(--jr-gold-hi)!important}
body.jr .page-wrapper :is(h1,h2,h3) :is(span,b,strong,.os-w,.os-wt):not(.cn):not(.en-text){color:inherit!important}
body.jr .page-wrapper :is(h1,h2,h3) em{color:var(--jr-gold)!important;font-weight:400}
body.jr{--serif:var(--jr-display);--font-subhead:var(--jr-display);--font-ui:var(--jr-text);--blue:var(--jr-navy);--blue2:var(--jr-gold)}
body.jr .kicker{display:inline-block!important;background:none!important;border:0!important;padding:0!important;border-radius:0!important;font:600 .72rem/1.3 var(--jr-text)!important;letter-spacing:.2em!important;text-transform:uppercase;color:var(--jr-gold)!important}
body.jr .kpi{font-family:var(--jr-display)!important;font-weight:400!important;color:var(--jr-ink)!important}

/* page-specific components, neutralised into the journal kit */
body.jr :is(.practice-card,.ib-cta,.ch-cta,.ib-rtile,.ch-rtile,.rec-box,.cnq-controls,.usq-controls,.vx-card,.vx-compose,.vx-bubble,.checkup-panel,.checkup-view,.plan-holder,.nw-tabs,.cl-dm-banner,.acct-card,.acct-hero,.acct-level,.acct-stat,.vt-plan,.ia-panel,.nf-card,.cert-gate,.kh-tracks,.ia-mode-toggle,.ia-history-item,.ck-thumb,.vx-kb-i,.pr-card,.ibp-card){border-radius:0!important;box-shadow:none!important;background-image:none!important;background-color:var(--jr-card)!important;border:1px solid var(--jr-rule2)!important}
body.jr :is(.ib-rtile,.ch-rtile,.nf-card,.practice-card):hover{border-color:var(--jr-ink)!important}
body.jr .vt-plan.featured{border-color:var(--jr-ink)!important;border-top:3px solid var(--jr-gold-hi)!important}
body.jr :is(.ib-cta__go,.ch-cta__go,.ch-course__btn--primary,.vx-send,.checkup-btn.primary,.ia-btn--primary,.adm-btn,.btn-acc:not(.ghost)){border-radius:0!important;box-shadow:none!important;background:var(--jr-ink)!important;color:var(--jr-paper)!important;border:1px solid var(--jr-ink)!important;font-family:var(--jr-text)!important;letter-spacing:.1em}
body.jr :is(.ib-cta__go,.ch-cta__go,.ch-course__btn--primary,.vx-send,.checkup-btn.primary,.ia-btn--primary,.adm-btn,.btn-acc:not(.ghost)):hover{background:transparent!important;color:var(--jr-ink)!important}
body.jr :is(.checkup-btn.ghost,.btn-acc.ghost,.ch-course__btn:not(.ch-course__btn--primary),.ia-mode-btn,.for-cat,.ks-tab,.kn-more,.checkup-part,.checkup-cam,.checkup-cam-alt,.vx-chip-s,.cl-dm-x){border-radius:0!important;box-shadow:none!important;background:transparent!important;color:var(--jr-ink2)!important;border:1px solid var(--jr-rule)!important;font-family:var(--jr-text)!important}
body.jr :is(.ia-mode-btn.active,.for-cat.active,.ks-tab.on,.checkup-part.on,.vx-chip-s.on){background:var(--jr-ink)!important;color:var(--jr-paper)!important;border-color:var(--jr-ink)!important}
body.jr :is(.label,.ch-course__label,.mastery-level,.step-status,.trust-chip,.checkup-badge,.checkup-step,.plan-badge,.acct-badge,.cl-dm-tag,.nf-badge,.ia-pc-item,.ib-label){border-radius:2px!important;box-shadow:none!important;background:transparent!important;border:1px solid var(--jr-rule)!important;color:var(--jr-ink2)!important;font-family:var(--jr-text)!important}
body.jr .checkup-step.on{border-color:var(--jr-gold-hi)!important;color:var(--jr-ink)!important}
body.jr main button:not(.btn-icon):not([class*="lin-"]):not(.acct-tab):not(.hmx-gh){border-radius:0}
body.jr :is(.acct-avatar){border-radius:50%!important;background:var(--jr-ink)!important;color:var(--jr-paper)!important;box-shadow:none!important}

/* ═══ study overlays: flashcards, quiz mode, adaptive, diagnostic, AI ═════ */
body.jr :is(.flashcard-box,.qo-body,.aq-body,.diag-overlay > div,.ai-modal){border-radius:0!important;box-shadow:0 30px 60px rgba(23,20,15,.22)!important;border:1px solid var(--jr-ink)!important;background:var(--jr-card)!important;color:var(--jr-ink)!important}
body.jr :is(.quiz-overlay,.aq-overlay,.diag-overlay){background:var(--jr-paper)!important}
body.jr :is(.qo-header,.aq-header,.ai-modal-header){background:none!important;border-bottom:1px solid var(--jr-ink)!important;box-shadow:none!important;color:var(--jr-ink)!important;font-family:var(--jr-display)!important}
body.jr :is(.fc-chip,.qo-opt,.aq-opt,.ai-suggestions button,.fc-nav button,.qo-close,.aq-close,.ai-close,.aq-btn){border-radius:0!important;box-shadow:none!important;background:transparent!important;border:1px solid var(--jr-rule)!important;color:var(--jr-ink)!important;font-family:var(--jr-text)!important;transform:none!important}
body.jr :is(.fc-chip.active,.fc-chip.on,.fc-nav button:last-child,.ai-send-btn){background:var(--jr-ink)!important;color:var(--jr-paper)!important;border-color:var(--jr-ink)!important;border-radius:0!important;box-shadow:none!important}
body.jr :is(.qo-opt,.aq-opt):hover{border-color:var(--jr-ink)!important}
body.jr :is(.qo-opt,.aq-opt).correct{border-color:#2E7D5B!important;background:rgba(46,125,91,.08)!important}
body.jr :is(.qo-opt,.aq-opt).wrong{border-color:var(--jr-ox)!important;background:rgba(140,47,42,.08)!important}
body.jr :is(.qo-question,.aq-question){font-family:var(--jr-display)!important;color:var(--jr-ink)!important}
body.jr :is(.qo-explain,.aq-explain){border-radius:0!important;border:0!important;border-left:2px solid var(--jr-gold-hi)!important;background:var(--jr-paper2)!important;box-shadow:none!important}
body.jr :is(.qo-progress,.aq-progress,.fc-progress,.diag-topic-bar){height:2px!important;background:var(--jr-rule2)!important;border-radius:0!important}
body.jr :is(.qo-progress-bar,.aq-progress-bar,.diag-topic-fill){background:var(--jr-gold-hi)!important;border-radius:0!important}
body.jr .fc-front,body.jr .fc-back{border-radius:0!important;box-shadow:none!important;border:1px solid var(--jr-ink)!important}
body.jr .fc-front{background:var(--jr-ink)!important;color:var(--jr-paper)!important}
body.jr .fc-front::before{display:none!important}
body.jr .fc-front .fc-term{color:var(--jr-paper)!important;font:italic 500 1.6rem/1.25 var(--jr-display)!important;text-shadow:none!important}
body.jr .fc-front .fc-hint{background:transparent!important;border:1px solid rgba(255,255,255,.3)!important;color:rgba(255,255,255,.8)!important;border-radius:0!important}
body.jr.dark .fc-front .fc-hint{border-color:rgba(23,20,15,.3)!important;color:rgba(23,20,15,.75)!important}
body.jr .fc-back{background:var(--jr-card)!important;color:var(--jr-ink)!important}
body.jr .fc-back .fc-def{font-family:var(--jr-text)!important;color:var(--jr-ink)!important}
body.jr .ai-input{border-radius:0!important;border:1px solid var(--jr-rule)!important;background:transparent!important;color:var(--jr-ink)!important;box-shadow:none!important}

/* ═══ IB lesson reader (ib-sehs-lesson.html) ═════════════════════════════ */

/* REMOVED 2026-11-03 — the reader is no longer skinned by this file.

   There used to be ten rules here, all `!important`, that re-dressed the IB
   SEHS reader as an editorial journal page: squared every control to 0 radius,
   cut the progress rail from a 6px pill to a 2px hairline, uppercased the
   Back/Next buttons, and forced the cover h1 onto --jr-display — which
   design/tokens.css points at the *text* face, so the lesson title rendered in
   Nunito Sans while the textbook's rendered in Newsreader.

   That block was written when the reader was its own visual island. It is not
   any more: the reader now takes its colour, radius, type and measure from
   design/tokens.css like every other surface, and the surviving rules here
   were fighting the reader's own stylesheet with a specificity tiebreak rather
   than expressing a decision — `.ib-rail__hub` in ib-sehs-lesson.css even
   carried a `border-radius:10px!important` purely to undo this file.

   One of them was also a real bug, not just a style difference: the
   `--blue2: var(--jr-gold-hi)` override repainted the colour-coded diagram
   models gold on the reader while the identical model on ib-sehs-learn.html
   stayed blue.

   If the reader needs a token that looks wrong, fix it in
   ib-sehs-lesson.css or in design/tokens.css — not here. */



/* ═══ SPACING — one rhythm everywhere: ≥12px between stacked boxes, headings never flush ═══ */
body.jr .page-wrapper :is(h1,h2,h3){margin-bottom:max(.6em,14px)}
body.jr .page-wrapper :is(h2,h3):not(:first-child){margin-top:max(1.4em,28px)}
body.jr :is(.ch-dt__title,.ib-dt__title){margin:0 0 1.4rem!important}
body.jr :is(.ch-crumb,.ib-crumb){margin-bottom:1.1rem!important}
body.jr :is(.ch-strip,.ib-strip){border-radius:0!important;box-shadow:none!important;background:var(--jr-card)!important;border:1px solid var(--jr-rule2)!important;margin-bottom:2rem!important}
body.jr :is(.ch-rsec,.ib-rsec){margin:2.4rem 0 1rem!important;font:500 1.6rem/1.15 var(--jr-display)!important;color:var(--jr-ink)!important}
body.jr :is(.ch-rsec,.ib-rsec):first-child{margin-top:0!important}
body.jr :is(.ch-rgrid,.ib-rgrid){gap:1.25rem!important}
body.jr :is(.ch-rtile,.ib-rtile){border-radius:0!important}
body.jr :is(.hero-badge,.section-label,.kicker,.label,.nf-badge,.checkup-badge,.plan-badge,.kn-more-n){margin-bottom:1rem!important}
body.jr .page-wrapper :is(.rec-item,.progress-item,.study-step,.pathway-step,.vx-kb-i,.ia-pc-item,.quiz-item,.acct-stat,.video-card,.nf-card)+:is(.rec-item,.progress-item,.study-step,.pathway-step,.vx-kb-i,.ia-pc-item,.quiz-item,.acct-stat,.video-card,.nf-card){margin-top:14px}
body.jr :is(.nf-grid,.acct-stats,.video-grid,.feature-grid,.grid,.ch-grid,.stats,.vx-kb){gap:1.25rem!important}
body.jr .habit-input+.habit-input,body.jr .routine-input{margin-bottom:12px}
body.jr :is(.ks-tabs,.cnq-controls,.usq-controls,.checkup-steps,.checkup-parts,.vx-chips,.ia-mode-toggle,.habit-chips,.fc-chapter-select,.hero-actions,.for-cats){gap:10px!important;row-gap:10px!important}
body.jr :is(.ks-tab,.vx-chip-s,.checkup-part,.habit-chip,.checkup-step,.ia-mode-btn,.for-cat,.fc-chip){margin:0!important}
body.jr .kn-more{margin:14px 0!important}
body.jr .page-wrapper .btn+.btn,body.jr .page-wrapper .qo-btn+.qo-btn{margin-left:10px}
body.jr .page-wrapper :is(.card,.practice-card) .btn{margin-top:12px}
body.jr .mastery-title{margin-bottom:14px!important}
body.jr .mastery-bar{margin-bottom:14px!important}
body.jr .mastery-level+.mastery-level{margin-left:4px}
/* textbook section footer: back-to-hub pill + prev/next, no collisions */
body.jr #hubBackRow{display:flex;justify-content:flex-start;margin:3rem auto 1.4rem!important}
body.jr #hubBackRow[hidden]{display:none!important}
body.jr #hubBackRow :is(a,button){border-radius:0!important;box-shadow:none!important;background:transparent!important;border:1px solid var(--jr-rule)!important;color:var(--jr-ink)!important}
body.jr .ch-nav{margin-top:1.4rem!important;padding-top:1.4rem!important;border-top:1px solid var(--jr-rule);gap:1.2rem!important;flex-wrap:wrap}
body.jr .ch-nav .qo-btn{min-height:48px!important;padding:0 1.4rem!important}
body.jr .ch-nav .qo-btn:disabled{opacity:.35!important;background:transparent!important;color:var(--jr-ink)!important}
body.jr #chNext{background:var(--jr-ink)!important;color:var(--jr-paper)!important}
body.jr :is(.vx-kb-list,.vx-sugg,.vx-pick,.vx-kb-filter,.habit-suggest,.checkup-parts){gap:10px!important}
body.jr .nf-grid{row-gap:1.6rem!important}
body.jr .kn-brief .kn-more{display:inline-flex;margin:16px 12px 16px 0!important}

/* ═══ MOTION — feedback on every press, open, switch (native CSS; reduced-motion respected) ═══ */
@keyframes jrPop{from{opacity:0;transform:translateY(14px) scale(.975)}to{opacity:1;transform:none}}
@keyframes jrFadeIn{from{opacity:0}to{opacity:1}}
@keyframes jrSlideIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes jrRipple{from{transform:scale(0);opacity:.32}to{transform:scale(1);opacity:0}}
@keyframes jrTick{0%{transform:scale(1)}40%{transform:scale(1.12)}100%{transform:scale(1)}}
@keyframes jrShake{0%,100%{transform:none}25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
body.jr :is(button,a,.qo-btn,.btn,[role=button],.cr-tabs button,.hmx-card,.jr-item,.ch-rtile,.ib-rtile,.fc-chip,.sec-pill,.sidebar-link,.part-toggle){-webkit-tap-highlight-color:transparent}
/* press: everything you click gives under the finger */
body.jr :is(button,.qo-btn,.btn,.jr-btn,a.jr-more,.sec-pill,.fc-chip,.hp-chip,.kv-btn,.vx-send,.ib-foot__btn,.acct-tab,.soc-btn):not(:disabled){transition:transform .18s var(--jr-ease),background-color .25s,color .25s,border-color .25s,box-shadow .25s!important}
body.jr :is(button,.qo-btn,.btn,.jr-btn,.sec-pill,.fc-chip,.hp-chip,.kv-btn,.vx-send,.ib-foot__btn,.soc-btn):not(:disabled):active{transform:scale(.96)!important}
/* tiles & cards: lift on hover, settle on press */
body.jr :is(.jr-item,.hmx-card,.ch-rtile,.ib-rtile,.nf-card,.practice-card,.study-step,.feature-card,.video-card,.cr,.hm-act,.ch-card){transition:transform .35s var(--jr-ease),border-color .3s,background-color .3s!important}
body.jr :is(.jr-item,.hmx-card,.ch-rtile,.ib-rtile,.nf-card,.study-step,.feature-card,.video-card,.hm-act,.ch-card):hover{transform:translateY(-3px)!important}
body.jr :is(.jr-item,.hmx-card,.ch-rtile,.ib-rtile,.nf-card,.study-step,.feature-card,.video-card,.hm-act,.ch-card):active{transform:translateY(-1px) scale(.99)!important}
body.jr :is(.ch-rtile,.ib-rtile,.hmx-card,.hm-act) :is(svg,.vi-ico,.hmx-ico,.hm-act-i){transition:transform .4s var(--jr-ease)}
body.jr :is(.ch-rtile,.ib-rtile,.hmx-card,.hm-act):hover :is(svg,.vi-ico,.hmx-ico,.hm-act-i){transform:translateX(3px) rotate(-4deg)}
/* the ink ripple journal.js drops where you click */
.jr-ripple{position:absolute;border-radius:50%;pointer-events:none;background:currentColor;animation:jrRipple .6s var(--jr-ease) forwards}
/* things that open: pop up out of the page.
   .tut-card is deliberately NOT in this list. jrPop ends on `transform:none`,
   and with fill-mode `both` that permanently overwrites the tutorial card's
   inline translate3d(x,y) placement -- which pinned the card at 0,0 on top of
   every page's H1. The tour has its own entrance (tut-card-in, tutorial-widget.css). */
body.jr :is(.hp-pop,.flashcard-box,.qo-body,.aq-body,.ai-modal,.log-menu.open,#qnaPanel.open,.nb-pop.open,.lin-study-menu,.cert-view > *){animation:jrPop .42s var(--jr-ease) both}
body.jr :is(.hp-scrim,.quiz-overlay.show,.aq-overlay.show,.flashcard-panel.show){animation:jrFadeIn .3s ease both}
/* things that switch: panels slide in */
body.jr :is(.cr-panel.on,.tab-panel.active,.acc-item.open .acc-body-inner,.hmx-wrap:not([hidden]),.qo-explain,.aq-explain,#paneLogin,#paneSignup,#paneReset,.ib-pane,.ch-pane,.ks-pane.on,.ib-block:last-child){animation:jrSlideIn .38s var(--jr-ease) both}
body.jr :is(.qo-opt,.aq-opt,.exam-opt).correct{animation:jrTick .45s var(--jr-ease)}
body.jr :is(.qo-opt,.aq-opt,.exam-opt).wrong{animation:jrShake .35s ease}
/* flashcard flip gets a softer, longer turn */
body.jr .fc-inner{transition:transform .7s cubic-bezier(.3,1.3,.5,1)!important}
/* underline sweeps on text links + menu items */
body.jr .page-wrapper a:not([class]){transition:text-decoration-color .3s}
body.jr .hmx-gh::after,body.jr .acc-header::after{transition:transform .35s var(--jr-ease)!important}
/* progress fills animate as they change */
body.jr :is(.prog-fill,.sp-bar i,.cr-prog i,.qo-progress-bar,.aq-progress-bar,.ib-top__fill,.hm-rfg,.diag-topic-fill){transition:width .8s var(--jr-ease),stroke-dashoffset .9s var(--jr-ease)!important}
/* toggles: the glyph spins when the theme/language flips */
body.jr :is(#darkToggle,#langToggle){transition:transform .45s var(--jr-ease),border-color .25s!important}
body.jr :is(#darkToggle,#langToggle).jr-spin{transform:rotate(180deg) scale(.9)!important}
@media (prefers-reduced-motion:reduce){
  body.jr *,body.jr *::before,body.jr *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
  .jr-ripple{display:none}
}

/* ── LOG IN stops being a box ─────────────────────────────────────────────
   With the four section pills collapsed into one chip, the top-right went
   from eight competing objects to five, and the full-ink bordered LOG IN
   box became the loudest thing in an otherwise quiet editorial bar — for a
   site whose lessons now open with no account at all. It keeps its place,
   its size and its hover affordance; it just stops drawing a frame until
   you point at it. */
body.jr header #loginBtn{border-color:transparent!important;color:var(--jr-ink2)!important}
body.jr header #loginBtn:hover{border-color:var(--jr-ink)!important;color:var(--jr-ink)!important}
