/* Lesson page: brought in line with the homepage. The first part is the homepage footer and scroll thumb, taken from main.css. */
.site-footer { background: var(--black); color: var(--grey); padding: 0 var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px)); }
.sbar { position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; width: 12px; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
.sbar.show { opacity: 1; }
.sbar i { position: absolute; top: 0; right: 3px; width: 5px; border-radius: 5px; background: #8E939B; pointer-events: auto; touch-action: none; }
.sbar.drag i { background: #A3A8AF; }
@media (hover: none), (pointer: coarse) {
.sbar { display: none; }
}
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid #303030; border-radius: 50%; color: #DBA426; transition: border-color .2s, background .2s; }
.social-link svg { width: 19px; height: 19px; }
.social-link:hover, .social-link:focus-visible { background: #14120b; border-color: #DBA426; }
.social-link[aria-disabled="true"] { cursor: default; }
.site-footer .social-link {width:32px;height:40px;border:0;border-radius:0;background:transparent;box-shadow:none;transition:transform .2s,opacity .2s}
.site-footer .social-link svg {width:25px;height:25px;stroke:none}
.site-footer .social-link:hover, .site-footer .social-link:focus-visible {background:transparent;border:0;transform:translateY(-2px)}
@media(prefers-reduced-motion:reduce) {
.site-footer .social-link {transition:none}
}
.site-footer {padding-bottom:calc(26px + env(safe-area-inset-bottom, 0px))}
.site-footer .social-link {width:38px;height:38px;border-radius:50%;opacity:.92;transition:transform .2s,opacity .2s,background-color .2s}
.site-footer .social-link svg {width:21px;height:21px;shape-rendering:geometricPrecision}
.site-footer .social-link[data-social="youtube"] svg {width:23px;height:23px}
.site-footer .social-link:hover, .site-footer .social-link:focus-visible {opacity:1;background:rgba(255,255,255,.06);transform:none}
.site-footer .social-link:focus-visible {outline:1px solid var(--gold);outline-offset:1px}
.dpf-social .social-link svg { transition: filter .3s ease, transform .3s cubic-bezier(.2,.8,.2,1); }
@media (hover: hover) {
.dpf-social .social-link:hover svg { filter: drop-shadow(0 0 7px rgba(240,200,101,.5)); transform: scale(1.08); }
}
.dpf-grid { display: grid; grid-template-columns: minmax(250px, 1.3fr) minmax(0, 1.5fr) minmax(0, .65fr) minmax(0, .85fr); gap: 40px clamp(28px, 4vw, 64px); align-items: start; }
.dpf-social { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 20px 0 0 -8px; }
@media (max-width: 1000px) {
.dpf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 32px; }
}
.dpf-social .social-link { position: relative; transition: transform .4s cubic-bezier(.2,.9,.3,1.35), opacity .3s ease, background-color .2s; }
.dpf-social .social-link::before { content: ""; position: absolute; inset: 1px; border-radius: 50%; border: 1px solid rgba(219,164,38,.85); opacity: 0; transform: scale(.72); transition: opacity .3s ease, transform .5s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
@media (hover: hover) {
.dpf-social.settled:hover .social-link:not(:hover) { opacity: .38; }
.dpf-social .social-link:hover { transform: translate3d(0,-3px,0); background: transparent; }
.dpf-social .social-link:hover::before, .dpf-social .social-link:focus-visible::before { opacity: 1; transform: none; }
}
.dpf-social .social-link:active { transform: scale(.9); transition-duration: .1s; }
@media (prefers-reduced-motion: reduce) {
.dpf-social .social-link, .dpf-social .social-link::before { transition: none; }
}
.f2 { padding: 0 var(--gutter) calc(26px + env(safe-area-inset-bottom, 0px)); background: var(--black); color: var(--grey); }
.f2-in { max-width: 1360px; margin: 0 auto; zoom: var(--zw, 1); padding-top: clamp(48px, 5vw, 72px);   /* grows evenly with the page on large monitors and TVs */ border-top: 1px solid rgba(255,255,255,.1); }
.f2-grid { display: grid; grid-template-columns: minmax(260px, 1.3fr) minmax(0, 1.3fr) minmax(0, .7fr); gap: 40px clamp(32px, 4vw, 72px); align-items: start; }
.f2-brand .brand { display: inline-flex; align-items: center; gap: 12px; }
.f2-brand .mark { height: 42px; width: auto; }
.f2-brand .wordmark { height: 18px; width: auto; }
.f2-tag { margin: 18px 0 0; max-width: 24em; font-size: 15px; line-height: 1.6; color: #A3A8B0; text-wrap: balance; }
.f2 .dpf-social { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 22px 0 0 -9px; }
.f2 .social-link { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent !important; opacity: 1;
  transition: transform .45s cubic-bezier(.34,1.56,.64,1), opacity .3s ease; }
.f2 .social-link svg { width: 22px; height: 22px; filter: none !important; transform: none !important; }
.f2 .social-link::before { display: none !important; }
@media (hover: hover) {
.f2 .dpf-social .social-link:hover { transform: translate3d(0,-4px,0) scale(1.1); }
}
.f2 .dpf-social .social-link:active { transform: scale(.92); transition-duration: .12s; }
.f2-h { margin: 0 0 16px; font: 600 12.5px/20px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.f2-links { display: grid; gap: 12px; padding-top: 36px; font-size: 15px; line-height: 1.4; }
.f2-links a { position: relative; color: #D5D8DD; transition: color .2s ease; }
.f2-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.f2-links a:hover, .f2-links a:focus-visible { color: #fff; }
.f2-links a:hover::after, .f2-links a:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }
.f2-note { margin: clamp(40px, 4.5vw, 64px) 0 0; font-size: 13px; line-height: 1.6; color: #7C818A; }
.f2-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 32px; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; line-height: 1.6; color: #A3A8B0; }
.f2-bottom p { margin: 0; }
.f2-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.f2-legal a { color: #A3A8B0; text-decoration: none; transition: color .2s ease; }
.f2-legal a:hover, .f2-legal a:focus-visible { color: #fff; }
@media (min-width: 1360px) {
.f2-note { white-space: nowrap; }
}
@media (max-width: 1023px) {
.f2-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px 40px; }
.f2-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
.f2-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
.f2-links { padding-top: 0; grid-template-columns: repeat(2, minmax(0, max-content)); column-gap: 40px; }
.f2-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media print {
.f2 { display: none; }
}
.f2-in { padding-top: clamp(40px, 4vw, 56px); }
.f2-tag { margin-top: 14px; }
.f2 .dpf-social { margin-top: 16px; }
.f2-h { margin-bottom: 14px; }
.f2-links { padding-top: 34px; gap: 11px; }
.f2-note { margin-top: clamp(32px, 3.4vw, 48px); }
.f2-bottom { margin-top: 14px; padding-top: 14px; }
@media (max-width: 1023px) {
.f2-grid { gap: 32px 40px; }
}
@media (max-width: 560px) {
.f2-grid { gap: 28px; }
.f2-links { padding-top: 0; grid-template-columns: none; }
}
.f2-grid { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 28px 48px; grid-template-columns: none; }
.f2-brand { grid-column: auto !important; }
.f2-links { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 0; padding-top: 11px; font-size: 15px; }
.f2-tag { max-width: 21em; }
@media (max-width: 760px) {
.f2-grid { flex-direction: column; gap: 28px; }
.f2-links { flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 0; }
}
.f2 .dpf-social { margin-top: 18px; }
.f2-note { margin-top: 20px; }
.f2-links { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 0; }
@media (max-width: 760px) {
.f2-grid { gap: 20px; }
.f2-links { align-self: flex-start; align-items: center; }
}
@media (max-width: 760px) {
.f2-grid { align-items: center; text-align: center; }
.f2-brand { display: flex; flex-direction: column; align-items: center; }
.f2-tag { margin-left: auto; margin-right: auto; }
.f2 .dpf-social { justify-content: center; margin-left: 0; margin-right: 0; }
.f2-links { align-self: center; align-items: center; }
.f2-note { text-align: center; text-wrap: balance; }
.f2-bottom { align-items: center; text-align: center; }
.f2-legal { justify-content: center; }
}
@media (max-width: 760px) {
.f2-note { text-align: left; text-wrap: pretty; }
.f2-bottom { flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center; gap: 16px; text-align: left; }
.f2-bottom > p:first-child { flex: 1 1 auto; min-width: 0; }
.f2-legal { flex: none; justify-content: flex-end; gap: 6px 16px; flex-wrap: nowrap; }
}
@media (max-width: 380px) {
.f2-bottom { font-size: 12px; }
.f2-legal { gap: 6px 12px; }
}
.f2-links { display: grid !important; grid-template-columns: repeat(2, max-content); column-gap: clamp(40px, 5vw, 80px); align-items: start !important; justify-items: start; padding-top: 4px; }
.f2-col { display: grid; justify-items: start; gap: 11px; font-size: 15px; line-height: 1.4; }
.f2-col .f2-h { margin: 0 0 3px; }
.f2-col a { position: relative; color: #D5D8DD; transition: color .2s ease; }
.f2-col a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.f2-col a:hover, .f2-col a:focus-visible { color: #fff; }
.f2-col a:hover::after, .f2-col a:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }
@media (max-width: 760px) {
.f2-grid { align-items: flex-start !important; text-align: left !important; }
.f2-brand { display: block !important; }
.f2-tag { margin-left: 0 !important; margin-right: 0 !important; }
.f2 .dpf-social { justify-content: flex-start !important; margin-left: -9px !important; }
.f2-links { align-self: flex-start !important; column-gap: 64px; padding-top: 0; }
.f2-note { text-align: left !important; text-wrap: wrap !important; max-width: none !important; }
}
.f2-note { max-width: none; text-wrap: wrap; }
@media (min-width: 761px) {
.f2-grid { grid-template-columns: minmax(240px, auto) minmax(0, 1fr) auto; align-items: end; }
.f2 .f2-soc { justify-self: center; align-self: end; margin: 0 !important; justify-content: center; flex-wrap: nowrap; gap: 8px; }
}
@media (max-width: 760px) {
.f2 .f2-soc { margin: 22px 0 0 -9px !important; }
}
.dpf-social { -webkit-user-select: none; user-select: none; }
@media (max-width: 760px) {
.f2-grid { grid-template-columns: minmax(0, 1fr) !important; row-gap: 0; }
.f2 .f2-soc { margin: 20px 0 0 -9px !important; }
.f2-links { padding-top: 28px; }
}
@media (min-width: 761px) {
html body .f2 .f2-soc { align-self: center; }
}
@media (max-width: 760px) {
html body .f2 .f2-soc { margin-top: 12px !important; }
}
@media (min-width: 761px) {
.f2-links { margin-right: clamp(0px, 9vw, 170px); }
}
@media (max-width: 760px) {
.f2-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "logo logo" "tag links" "social social"; column-gap: 24px; row-gap: 0 !important; align-items: start !important; }
.f2-brand { display: contents !important; }
.f2-brand > .brand { grid-area: logo; justify-self: start; }
.f2-tag { grid-area: tag; margin: 14px 0 0 !important; max-width: none !important; font-size: 14.5px; text-wrap: pretty; }
.f2 .dpf-social { grid-area: social; margin: 18px 0 0 -9px !important; }
.f2-links { grid-area: links; justify-self: end; align-self: start !important; margin: 16px 0 0 !important; padding: 0 !important; column-gap: 26px !important; }
.f2-col { gap: 9px; font-size: 14.5px; }
}
@media (max-width: 420px) {
.f2-links { column-gap: 20px !important; }
.f2-grid { column-gap: 18px; }
}
@media (max-width: 359px) {
.f2-links { grid-template-columns: max-content !important; row-gap: 18px; }
}
@media (min-width: 481px) and (max-width: 760px) {
.f2-grid { grid-template-areas: "logo logo" "tag links" "social links"; grid-template-rows: auto auto 1fr; }
.f2 .dpf-social { align-self: start; margin-top: 14px !important; }
}
@media (max-width: 480px) {
.f2 .dpf-social { margin-top: 14px !important; }
}
html body .f2 { padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px)); }
html body .f2-in { padding-top: clamp(64px, 6vw, 96px); }
html body .f2-tag { margin-top: 22px; line-height: 1.65; }
html body .f2-col { gap: 16px; }
html body .f2-col .f2-h { margin: 0 0 6px; }
html body .f2-note { margin-top: clamp(56px, 5.5vw, 84px); line-height: 1.7; }
html body .f2-bottom { margin-top: 30px; padding-top: 30px; }
html body .f2-legal { gap: 8px 32px; }
@media (max-width: 760px) {
html body .f2 { padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px)); }
html body .f2-in { padding-top: 56px; }
html body .f2-tag { margin: 20px 0 0 !important; }
html body .f2-links { margin: 22px 0 0 !important; }
html body .f2 .dpf-social, html body .f2 .f2-soc { margin: 30px 0 0 -9px !important; }
html body .f2-col { gap: 14px; }
html body .f2-note { margin-top: 38px; }
html body .f2-bottom { margin-top: 24px; padding-top: 24px; }
html body .f2-legal { gap: 6px 18px; }
}
@media (max-width: 380px) {
html body .f2-legal { gap: 6px 12px; }
}
@media (min-width: 761px) and (max-width: 1239px) {
html body .f2-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand links" "social links"; gap: 28px 56px; align-items: start; }
html body .f2-brand { grid-area: brand; }
html body .f2 .f2-soc { grid-area: social; justify-self: start; align-self: start; margin: 0 0 0 -9px !important; }
html body .f2-links { grid-area: links; justify-self: end; align-self: start; margin-right: 0; padding-top: 6px; }
}

/* ---- Header: the homepage's proportions on laptops and larger ---- */
.site-header, .site-footer { --gutter: calc(max(clamp(16px, 3vw, 40px), 2.9vw) + env(safe-area-inset-right, 0px)); }
.site-header .nav { max-width: none; padding-left: var(--gutter); padding-right: var(--gutter); }
@media (hover: hover) and (pointer: fine) {
  html { scrollbar-width: none; }
  html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; display: none; }
}
.btn { letter-spacing: .005em; }
@media (min-width: 1025px) {
  :root { --u: max(1px, calc(0.25px + 0.052vw)); --header-h: calc(80 * var(--u)); --mark-h: calc(56 * var(--u)); --wordmark-h: calc(24 * var(--u)); }
  .site-header .nav-link { height: calc(46 * var(--u)); font-size: calc(17 * var(--u)); }
  .site-header .nav-link svg { width: calc(18 * var(--u)); height: calc(18 * var(--u)); }
  .site-header .icon-btn { width: calc(46 * var(--u)); }
  .site-header .icon-btn svg { width: calc(22 * var(--u)); height: calc(22 * var(--u)); }
  .site-header .btn { height: calc(46 * var(--u)); padding: 0 calc(22 * var(--u)); font-size: calc(16.5 * var(--u)); }
  .nav-right .btn-outline + .btn-blue { margin-left: calc(10 * var(--u)); }
  .site-header .brand { gap: calc(12 * var(--u)); }
  .site-header .nav-left { gap: calc(4 * var(--u)); margin-left: clamp(28px, 4vw, calc(56 * var(--u))); }
  .site-header .nav-right { gap: calc(4 * var(--u)); }
  .site-header .nav-link:not(.icon-btn) { padding-left: calc(12 * var(--u)); padding-right: calc(12 * var(--u)); }
}

/* ---- Reading theme: one continuous blend. Every colour token moves together on the page root. ---- */
@property --page { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
@property --surface-2 { syntax: "<color>"; inherits: true; initial-value: #F7F5F1; }
@property --text { syntax: "<color>"; inherits: true; initial-value: #0F172A; }
@property --text-2 { syntax: "<color>"; inherits: true; initial-value: #4B5563; }
@property --text-3 { syntax: "<color>"; inherits: true; initial-value: #8A8F98; }
@property --rule { syntax: "<color>"; inherits: true; initial-value: #ECE8E1; }
@property --rule-strong { syntax: "<color>"; inherits: true; initial-value: #D9D3C8; }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #9C6B17; }
@property --accent-soft { syntax: "<color>"; inherits: true; initial-value: rgba(219,164,38,.13); }
@property --hl-yellow { syntax: "<color>"; inherits: true; initial-value: #FFE58A; }
@property --hl-green { syntax: "<color>"; inherits: true; initial-value: #C2EFC6; }
@property --hl-orange { syntax: "<color>"; inherits: true; initial-value: #FFCB94; }
@property --hl-blue { syntax: "<color>"; inherits: true; initial-value: #BFDBFF; }
@property --hl-pink { syntax: "<color>"; inherits: true; initial-value: #FFC9E6; }
@property --c-accent { syntax: "<color>"; inherits: true; initial-value: #9C6B17; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #0F172A; }
@property --ink2 { syntax: "<color>"; inherits: true; initial-value: #5F5E5A; }
@property --z-ring { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --z-ring-s { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --z-chain { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --z-chain-s { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --z-amino { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --z-amino-s { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --g1 { syntax: "<color>"; inherits: true; initial-value: #D9A12A; }
@property --g2 { syntax: "<color>"; inherits: true; initial-value: #B9800F; }
@property --g3 { syntax: "<color>"; inherits: true; initial-value: #8F5E09; }
@property --cb { syntax: "<color>"; inherits: true; initial-value: #ECE8E1; }
@property --gs { syntax: "<percentage>"; inherits: true; initial-value: 55%; }
@property --cm1 { syntax: "<percentage>"; inherits: true; initial-value: 5%; }
@property --cm2 { syntax: "<percentage>"; inherits: true; initial-value: 16%; }
:root { --blend: .34s cubic-bezier(.4,0,.2,1); --c-accent: var(--accent); --g1: #D9A12A; --g2: #B9800F; --g3: #8F5E09; --gs: 55%; --cm1: 5%; --cm2: 16%; --cb: #ECE8E1;
  --gilt: linear-gradient(180deg, var(--g1) 0%, var(--g2) var(--gs), var(--g3) 100%); }
html[data-theme="dark"] { --c-accent: var(--accent); --g1: #F0C865; --g2: #D9A12A; --g3: #B9800F; --gs: 40%; --cm1: 7%; --cm2: 22%; --cb: transparent;
  --gilt: linear-gradient(180deg, var(--g1) 0%, var(--g2) var(--gs), var(--g3) 100%); }
html.theme-blend { transition: --page var(--blend), --surface-2 var(--blend), --text var(--blend), --text-2 var(--blend), --text-3 var(--blend), --rule var(--blend), --rule-strong var(--blend), --accent var(--blend), --accent-soft var(--blend), --hl-yellow var(--blend), --hl-green var(--blend), --hl-orange var(--blend), --hl-blue var(--blend), --hl-pink var(--blend), --ink var(--blend), --ink2 var(--blend), --g1 var(--blend), --g2 var(--blend), --g3 var(--blend), --cb var(--blend), --gs var(--blend), --cm1 var(--blend), --cm2 var(--blend); }
/* while blending, elements follow the tokens directly instead of adding their own delay on top */
html.theme-blend *, html.theme-blend *::before, html.theme-blend *::after { transition-property: transform, translate, opacity, max-width, grid-template-rows !important; }
html.theme-blend .callout:is(.scribe, .healer, .mnemonic, .study, .clinical, .evidence, [class*="t-"]) { transition: --c-accent var(--blend) !important; }
html.theme-blend .la-mech { transition: --ink var(--blend), --ink2 var(--blend), --rule var(--blend) !important; }
html.theme-blend .ifig { transition: --z-ring var(--blend), --z-ring-s var(--blend), --z-chain var(--blend), --z-chain-s var(--blend), --z-amino var(--blend), --z-amino-s var(--blend) !important; }
html.theme-blend :is(.la-mech .m-b ellipse, .la-mech .m-b text, .la-mech .m-bh ellipse, .la-mech .m-bh text, .la-mech .m-h circle, .la-mech .m-h rect, .la-mech .m-h text, .la-mech .m-na circle, .la-mech .m-na text, .la-mech .la-ticks .t-inf, .la-mech .la-ticks .t-norm, .la-mech .la-split, .la-mech .sp-bh, .fc-verdict .ok, .fc-verdict .no, .term-pop, .fsel-menu) {
  transition: fill var(--blend), stroke var(--blend), color var(--blend), background-color var(--blend), box-shadow var(--blend) !important; }

/* ---- Selecting or highlighting never moves a letter: each letter keeps a fixed width, whatever is next to it ---- */
.lsec-body { font-kerning: none; font-variant-ligatures: none; font-feature-settings: "kern" 0, "liga" 0, "clig" 0, "calt" 0; text-rendering: geometricPrecision; }
.lsec-body p, .lsec-body li { text-wrap: wrap; }
mark.hl { padding: 0; -webkit-box-decoration-break: slice; box-decoration-break: slice; }

/* ---- Flashcards: each face keeps its own side in every theme and browser ---- */
.fc-card { -webkit-transform-style: preserve-3d; }
.fc-front { transform: rotateY(0deg) translateZ(1px); }
.fc-back { transform: rotateY(180deg) translateZ(1px); }

/* ---- Mark lesson as complete: gold throughout, with the Sign Up button's lift and passing light ---- */
.complete-btn { background: #D9A43A; color: #1A1305; border: 1px solid transparent; box-shadow: none;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), background-color .25s ease, color .25s ease, border-color .25s ease; }
.complete-btn.done { background: transparent; color: var(--text); border-color: #D9A43A; }
@media (hover: hover) {
  .complete-btn:hover { background: #E3B24C; transform: translateY(-1px); }
  .complete-btn.done:hover { background: rgba(217,164,58,.12); }
}

/* ---- One calm motion for everything that opens, closes or changes ---- */
@keyframes lxIn { from { opacity: 0; translate: 0 5px; } to { opacity: 1; translate: 0 0; } }
@keyframes lxFade { from { opacity: 0; } to { opacity: 1; } }
.read-pop.open, .cite-pop.show, .hl-pop.show, .toc-mod-body.open { animation: lxIn .22s cubic-bezier(.2,.8,.2,1); }
.tool-panel.active, .study-full.open { animation: lxFade .26s ease; }
html.drawer-left .scrim, html.drawer-right .scrim { animation: lxFade .28s ease; }
.lesson.size-shift { animation: lxFade .3s ease; }
.lsec-wrap { transition: grid-template-rows .36s cubic-bezier(.3,.7,.2,1); }
.lsec-inner { transition: opacity .3s ease; }
.lsec:not(.open) .lsec-inner { opacity: 0; }
@media (max-width: 1100px) { .side { transition: transform .34s cubic-bezier(.3,.7,.2,1); } }
@media (prefers-reduced-motion: reduce) {
  .complete-btn, .lsec-wrap, .lsec-inner, .side { transition: none !important; }
  .read-pop.open, .cite-pop.show, .hl-pop.show, .toc-mod-body.open, .tool-panel.active, .study-full.open, .scrim, .lesson.size-shift { animation: none !important; }
}

/* ---- The lesson fits every screen: text wraps, nothing scrolls sideways ---- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
@supports not (overflow: clip) { html { overflow-x: hidden; } }
body { overflow-wrap: break-word; }
.lesson-shell, .lesson-main, .lesson { min-width: 0; }
@media (max-width: 340px) {
  :root { --wordmark-h: min(12.5px, 3.5vw); --mark-h: min(34px, 10vw); }
  .site-header .brand { gap: 5px; min-width: 0; }
  .site-header .nav .icon-btn { width: 32px; }
  .site-header .nav-right { gap: 0; }
  .f2-brand .brand { max-width: 100%; }
  .f2-brand .mark { height: min(42px, 12vw); }
  .f2-brand .wordmark { height: min(18px, 5vw); }
  .lsec-head { min-width: 0; }
  .lsec-head > :not(.chev) { min-width: 0; overflow-wrap: anywhere; }
  .lsec-head .chev { flex: none; }
}

/* ---- Interactive figures are controls, never selectable text ---- */
html body :is(.ifig, .la-mech, .la-canvas), html body :is(.ifig, .la-mech, .la-canvas) *:not(input, textarea) { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }


/* ---- Flashcards and Question Bank: the homepage's own rules, then how they fit the lesson's panels ---- */
.btn-gold { background: var(--gold-btn); color: var(--gold-btn-ink); box-shadow: 0 6px 18px -12px rgba(219,164,38,.24); }
.btn-gold:hover { background: var(--gold-btn-hover); }
.round-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--rule-strong); color: var(--text-2); transition: border-color .15s, color .15s; }
.round-btn:hover { color: var(--text); border-color: var(--text-2); }
.round-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fc-stage { flex: 1; min-height: 220px; display: flex; perspective: 1400px; }
.fc-card { position: relative; flex: 1; cursor: pointer; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.7,.2,1); outline: none; }
.fc-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 18px; }
.fc-card.flipped { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 44px 40px;
    border-radius: 18px; border: 1px solid var(--rule-strong); background: var(--page); }
.fc-back { transform: rotateY(180deg); background: var(--surface-2); }
.fc-tag { position: absolute; top: 18px; left: 22px; font: 700 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.fc-text { max-width: 26em; font: 600 22px/1.45 var(--display); letter-spacing: -0.01em; text-wrap: balance; }
.fc-back .fc-text { font: 500 17.5px/1.65 var(--sans); letter-spacing: 0; }
.fc-hint { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; font-size: 12.5px; color: var(--text-3); }
.fc-controls { flex: none; display: grid; grid-template-columns: 38px 1fr 1fr 38px; gap: 10px; align-items: center; margin-top: 16px; }
.fc-rate { height: 42px; border-radius: 12px; border: 1px solid var(--rule-strong); font-size: 14.5px; font-weight: 600; color: var(--text-2); transition: border-color .15s, color .15s; }
.fc-rate:hover { color: var(--text); border-color: var(--text-2); }
.meter { height: 4px; border-radius: 4px; background: var(--rule); overflow: hidden; margin: -4px 0 16px; }
.meter i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .4s ease; }
.qb-top { flex: none; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-3); margin-bottom: 10px; font-weight: 600; }
.qb-stem { flex: none; font: 600 18.5px/1.45 var(--display); letter-spacing: -0.01em; margin: 0 0 16px; }
.qb-opts { display: grid; gap: 9px; }
.qb-opt { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; text-align: left;
    padding: 11px 15px; border-radius: 12px; border: 1px solid var(--rule-strong); font-size: 15px; line-height: 1.5; color: var(--text);
    transition: border-color .15s, background .15s; }
.qb-opt:hover { border-color: var(--text-2); }
.qb-opt .k { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 12px var(--display); border: 1px solid var(--rule-strong); color: var(--text-2); }
.qb-opt.sel { border-color: var(--text); }
.qb-opt.sel .k { background: var(--text); color: var(--page); border-color: var(--text); }
.qb-opt.right { border-color: #1E9E62; background: rgba(30,158,98,0.09); }
.qb-opt.right .k { background: #1E9E62; border-color: #1E9E62; color: #fff; }
.qb-opt.wrong { border-color: #D2452F; background: rgba(210,69,47,0.08); }
.qb-opt.wrong .k { background: #D2452F; border-color: #D2452F; color: #fff; }
.qb-opt[disabled] { cursor: default; }
.qb-explain { margin-top: 14px; padding: 13px 16px; border-radius: 12px; background: var(--surface-2); font-size: 14.5px; line-height: 1.6; }
.qb-explain.wait { visibility: hidden; }
.qb-explain b { display: block; margin-bottom: 2px; font: 600 14px var(--display); }
.qb-actions { flex: none; display: flex; gap: 10px; margin-top: auto; padding-top: 16px; }
.qb-actions .btn { flex: 1; }
.btn-line { border: 1px solid var(--rule-strong); color: var(--text); }
.btn-line:hover { border-color: var(--text-2); }
.qb-score { margin: auto 0; text-align: center; }
.qb-score .big { font: 600 54px var(--display); letter-spacing: -0.02em; }
.qb-score p { color: var(--text-2); font-size: 15.5px; margin: 6px 0 22px; }
@media (prefers-reduced-motion: reduce) {
.fc-card { transition: none; }
}
.tool-meta { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; font-size: 13px; color: var(--text-3); }
.tool-meta b { font-weight: 600; color: var(--text-2); white-space: nowrap; }
.tool-meta .meter { flex: 1; margin: 0; height: 4px; }
.qb-host { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.qb-mini { flex: none; display: flex; gap: 18px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.qb-mini b { color: var(--text); font-weight: 700; }
.btn-gold::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 36%, rgba(255,255,255,.2) 50%, transparent 64%); transform: translate3d(-120%,0,0); transition: transform .75s cubic-bezier(.2,.8,.2,1); }
@media (hover: hover) {
.btn-gold:hover { box-shadow: 0 8px 20px -12px rgba(219,164,38,.32); }
.btn-gold:hover::after { transform: translate3d(120%,0,0); }
}
.fc-rate[disabled], .fc-rate button[disabled] { opacity: .38; cursor: default; pointer-events: none; }
button.fc-rate, .fc-rate button { transition: opacity .3s ease, border-color .15s, color .15s, transform .2s cubic-bezier(.2,.8,.2,1); }
button.fc-rate:active, .fc-rate button:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
.fc-stage.fc-in .fc-card, .qb-opt, .qb-explain, .qb-score .big { animation: none !important; }
.btn-gold::after { display: none; }
}
.fc-face { border-radius: 18px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 16px 32px -24px rgba(15,23,42,.38); transition: border-color .25s ease, box-shadow .3s ease; }
.fc-face::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 2px; border-radius: 0 0 2px 2px; pointer-events: none;
  background: linear-gradient(90deg, rgba(196,140,30,0), rgba(196,140,30,.9) 30%, #F4D27A 50%, rgba(196,140,30,.9) 70%, rgba(196,140,30,0)); }
.fc-tag { letter-spacing: .1em; }
@media (hover: hover) {
.fc-card:hover .fc-face { border-color: var(--text-3); box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 20px 36px -24px rgba(15,23,42,.5); }
}
@keyframes fcIn { from { opacity: 0; transform: translate3d(16px,0,0); } to { opacity: 1; transform: none; } }
.fc-stage.fc-in .fc-card { animation: fcIn .42s cubic-bezier(.2,.8,.2,1); }
.fc-card.fc-swap { transition: none !important; }
button.fc-rate, .fc-rate button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.fc-rate svg, button.fc-rate svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes qbIn { from { opacity: 0; transform: translate3d(0,8px,0); } to { opacity: 1; transform: none; } }
@keyframes qbRight { 0% { transform: scale(1); } 45% { transform: scale(1.018); } 100% { transform: scale(1); } }
@keyframes qbWrong { 0%, 100% { transform: translate3d(0,0,0); } 20% { transform: translate3d(-5px,0,0); } 40% { transform: translate3d(4px,0,0); } 60% { transform: translate3d(-3px,0,0); } 80% { transform: translate3d(2px,0,0); } }
@keyframes qbScore { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
.qb-opt { transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, opacity .3s ease, transform .22s cubic-bezier(.2,.8,.2,1); animation: qbIn .4s cubic-bezier(.2,.8,.2,1) both; }
.qb-opt:nth-child(2) { animation-delay: .04s; }
.qb-opt:nth-child(3) { animation-delay: .08s; }
.qb-opt:nth-child(4) { animation-delay: .12s; }
.qb-opt:nth-child(5) { animation-delay: .16s; }
.qb-opt .k { transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
@media (hover: hover) {
.qb-opt:not([disabled]):not(.sel):hover { background: var(--surface-2); }
}
.qb-opt:not([disabled]):active { transform: scale(.99); }
.qb-opt.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.qb-opt.sel .k { background: var(--accent); border-color: var(--accent); color: #fff; }
.qb-opt[disabled]:not(.right):not(.wrong) { opacity: .55; }
.qb-opt.right { animation: qbRight .5s ease; }
.qb-opt.wrong { animation: qbWrong .42s ease; }
.qb-opt.right .k, .qb-opt.wrong .k { font-size: 0; }
.qb-opt.right .k::after, .qb-opt.wrong .k::after { content: ""; width: 12px; height: 12px; background: #fff;
  -webkit-mask: var(--qi) center / contain no-repeat; mask: var(--qi) center / contain no-repeat; }
.qb-opt.right .k { --qi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.qb-opt.wrong .k { --qi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E"); }
.qb-explain.show, .qb-explain:not(.wait) { animation: qbIn .45s cubic-bezier(.2,.8,.2,1) both; }
.qb-explain[data-v] { border-left: 3px solid #1E9E62; }
.qb-explain[data-v="wrong"] { border-left-color: #D2452F; }
.qb-explain[data-v]::before { display: block; margin-bottom: 4px; font: 600 13.5px var(--display); content: "Correct"; color: #1E9E62; }
.qb-explain[data-v="wrong"]::before { content: "Not quite"; color: #D2452F; }
.qb-score .big { animation: qbScore .6s cubic-bezier(.2,.8,.2,1) both; }
.qb-opt.right .k, .qb-opt.wrong .k { background: var(--page); }
.qb-opt.right .k { border: 1.5px solid #1E9E62; }
.qb-opt.right .k::after { background: #1E9E62; }
.qb-opt.wrong .k { border: 1.5px solid #D2452F; }
.qb-opt.wrong .k::after { background: #D2452F; }
.qb-opt.right .k::after, .qb-opt.wrong .k::after { width: 14px; height: 14px; }
.qb-top span.tp { display: inline; padding: 0; border: 0; border-radius: 0; background: none; font: 600 13px var(--sans); color: var(--text-3); }
.qb-opt.right .k { --qi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4 4L18.5 7.5'/%3E%3C/svg%3E"); }
.qb-opt.wrong .k { --qi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E"); }
.qb-opt .k { display: grid; place-items: center; }
.qb-opt .k { position: relative; }
.qb-opt.right .k::after, .qb-opt.wrong .k::after { position: absolute; inset: 0; margin: auto; display: block; width: 13px; height: 13px; }
.btn-gold { background: #D9A43A; color: #1A1305; box-shadow: none; }
.btn-gold:hover { background: #E3B24C; box-shadow: none; }
@media (hover: hover) {
.btn-gold:hover { box-shadow: none; transform: translateY(-1px); }
}
.btn-gold::after { background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.16) 50%, transparent 62%); }

.qb-explain { display: block; }
.fc-controls .fc-rate { margin: 0; min-width: 0; padding: 1px 4px; white-space: nowrap; }
.fc-front { transform: rotateY(0deg) translateZ(1px); }
.fc-back { transform: rotateY(180deg) translateZ(1px); }
.fc-card { min-height: 0; width: auto; }
.fc-stage { height: 260px; min-height: 0; flex: none; }
.fc-face { padding: 40px 24px; }
.fc-text { font-size: 18px; }
.fc-back .fc-text { font-size: 15.5px; }
.qb-stem { font-size: 16.5px; }
.qb-opt { font-size: 14.5px; }
.qb-actions .btn { height: 42px; font-size: 14.5px; white-space: nowrap; min-width: 0; padding: 0 18px; }
.qb-score .btn { height: 42px; padding: 0 22px; font-size: 14.5px; }
.btn-gold { position: relative; overflow: hidden; }
.btn[disabled] { opacity: .4; cursor: default; pointer-events: none; }
.sidebar-study .fc-controls { grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1fr) 38px; gap: 6px; }
.sidebar-study .fc-rate { font-size: 13px; gap: 5px; }
.sidebar-study .qb-mini { flex-wrap: wrap; gap: 4px 18px; }
.study-full .fc-stage { height: min(52vh, 420px); }
.study-full .fc-text { font-size: 22px; }
.study-full .fc-back .fc-text { font-size: 17.5px; }
.study-full .qb-stem { font-size: 18.5px; }
.study-full .fc-rate { font-size: 14.5px; }
/* small phones: the study panel uses the full width, so both buttons keep their full labels */
@media (max-width: 430px) { .side { width: 100vw; } }
@media (max-width: 389px) {
  .sidebar-study .fc-rate { font-size: 12.5px; gap: 4px; }
  .sidebar-study .fc-rate svg { width: 13px; height: 13px; }
  .sidebar-study .qb-actions .btn { padding: 0 8px; font-size: 13.5px; }
}
@media (max-width: 300px) {
  .sidebar-study .fc-controls { grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 4px; }
  .sidebar-study .fc-controls .round-btn { width: 32px; height: 32px; }
  .sidebar-study .fc-rate { font-size: 11.5px; }
  .sidebar-study .fc-rate svg { display: none; }
  .sidebar-study .qb-actions .btn { padding: 0 5px; font-size: 12px; }
}
.sidebar-study .qb-actions .btn { padding-left: 8px; padding-right: 8px; }
@media (max-width: 300px) { .sidebar-study .qb-actions .btn { padding-left: 4px; padding-right: 4px; } }
@media (max-width: 260px) {
  .sidebar-study .fc-rate { font-size: 10.5px; padding: 1px 2px; }
  .sidebar-study .qb-actions .btn { font-size: 11px; padding-left: 2px; padding-right: 2px; }
}
@media (max-width: 260px) {
  .sidebar-study .fc-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sidebar-study .fc-rate { order: 1; font-size: 11.5px; }
  .sidebar-study .fc-controls .round-btn { order: 2; justify-self: center; }
}

/* ---- Card counter, and citations inside question explanations ---- */
.tool-meta .fc-count { flex: none; font-size: 13px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.qb-explain .cite { margin-left: 3px; background: transparent; box-shadow: inset 0 0 0 1px var(--rule-strong); color: var(--text-3); font-weight: 600; transition: background-color .15s, color .15s, box-shadow .15s; }
.qb-explain .cite + .cite { margin-left: 2px; }
.qb-explain .cite:hover, .qb-explain .cite[aria-expanded="true"] { background: var(--accent); color: var(--page); box-shadow: none; }
.cite-pop { z-index: 100; }

/* ---- Tables keep their real columns and one header row on every screen ---- */
.table-wrap:has(.t-pair) { overflow: hidden; }
.table-wrap .t-pair th, .table-wrap .t-pair td, .table-wrap .t-pair tbody th { min-width: 0; }
@media (max-width: 640px) {
  .table-wrap .t-pair { table-layout: auto; font-size: calc(12.5px * var(--fs, 1)); line-height: 1.45; }
  .table-wrap .t-pair caption { padding: 12px 10px; }
  .table-wrap .t-pair th, .table-wrap .t-pair td { padding: 10px 6px; overflow-wrap: normal; -webkit-hyphens: manual; hyphens: manual; }
  .table-wrap .t-pair thead th { font-size: calc(12px * var(--fs, 1)); }
  .table-wrap .t-pair tbody th { width: auto; font-size: calc(12.5px * var(--fs, 1)); }
  .table-wrap .t-pair tr > :first-child { padding-left: 10px; }
  .table-wrap .t-pair tr > :last-child { padding-right: 8px; }
}
@media (max-width: 359px) {
  .table-wrap .t-pair, .table-wrap .t-pair tbody th { font-size: calc(11.5px * var(--fs, 1)); }
  .table-wrap .t-pair thead th { font-size: calc(11px * var(--fs, 1)); }
  .table-wrap .t-pair th, .table-wrap .t-pair td { padding-left: 4px; padding-right: 4px; }
}
@media (max-width: 289px) {
  .table-wrap .t-pair th, .table-wrap .t-pair td { overflow-wrap: anywhere; }
}

/* ---- Sections: last line to divider equals divider to next title ---- */
.lesson { --lsec-gap: 40px; }
.lsec-head { padding: var(--lsec-gap) 0 18px; transition: padding-bottom .36s cubic-bezier(.3,.7,.2,1); }
.lsec:not(.open) .lsec-head { padding-bottom: var(--lsec-gap); }
.lsec-body { padding-bottom: var(--lsec-gap); }
.lsec-body > :last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  .lesson { --lsec-gap: 34px; }
  .lsec-head { padding: var(--lsec-gap) 0 16px; align-items: start; }
  .lsec-head .chev { margin-top: -2px; }
  .lsec:not(.open) .lsec-head { padding-bottom: var(--lsec-gap); }
}
.lsec.refs .lsec-head { align-items: start; }
.lsec.refs .lsec-head .chev { margin-top: -2px; }
.lsec-body .forms li + li { margin-top: .85em; }

/* ---- Glossary pop-ups end with the plain citation number ---- */
.term-pop .tp-body .cite { margin-left: 3px; }

/* ---- Black behind the page, as on the homepage: Safari's bottom bar and overscroll never show white past the footer ---- */
html { background: #000; }

/* ---- Search: the X appears only when there is text; results show the exact passage ---- */
.search-close[hidden] { display: none !important; }
.sr-item svg { grid-row: 1 / span 3; }
.sr-item .sr-snip { display: block; margin-top: 3px; color: #C4C8CE; line-height: 1.45; overflow-wrap: anywhere; }
.sr-item .sr-snip mark { background: none; color: #F0C865; font-weight: 600; }
.sr-fixed { padding-bottom: 6px; }
.sr-fixed b { color: #F0C865; font-weight: 600; }
@keyframes srHit { 0%, 45% { background-color: rgba(217,164,58,.3); box-shadow: 0 0 0 5px rgba(217,164,58,.3); } 100% { background-color: transparent; box-shadow: 0 0 0 5px transparent; } }
.sr-hit { border-radius: 3px; animation: srHit 2.3s ease-out; }
@media (prefers-reduced-motion: reduce) { .sr-hit { animation-duration: 1.2s; } }

/* ---- Search: one best answer, then a few related topics ---- */
.search-results { gap: 3px; }
.sr-label { margin: 8px 0 3px; padding: 0 14px; font: 700 11px/1.4 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: #9AA0A9; }
.sr-label:first-child { margin-top: 2px; }
.sr-item.sr-best { padding: 13px 14px; border: 1px solid rgba(219,164,38,.42); background: rgba(255,255,255,.045); }
.sr-item.sr-best:hover, .sr-item.sr-best.act { background: rgba(255,255,255,.08); }
.sr-item.sr-best b { font-size: 16px; }
.sr-item .sr-over { display: block; margin-top: 4px; color: #D5D8DD; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.sr-item .sr-path { display: block; margin-top: 6px; color: #9AA0A9; font-size: 12px; }
.sr-item.sr-rel { padding: 8px 14px; }
.sr-item.sr-rel b { font-size: 14px; font-weight: 500; color: #E6E8EB; }
.sr-item.sr-rel svg { grid-row: 1; }

/* ---- Footer icons: the same enlarge and fade from a cursor or a tap ---- */
.f2 .dpf-social .social-link.fx-on { opacity: 1; transform: translate3d(0,-4px,0) scale(1.1); }
.f2 .dpf-social.fx-group .social-link:not(.fx-on) { opacity: .38; }
.dpf-social .social-link { -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: reduce) { .f2 .dpf-social .social-link.fx-on { transform: none; } }

/* ---- Signed-in header ---- */
.dp-hide { display: none !important; }
.dp-account { display: inline-flex; align-items: center; gap: 12px; }
.mm-actions .dp-account { flex: 1; display: flex; min-width: 0; }
.mm-actions .dp-logout { flex: 1 1 auto !important; }

/* ---- Touch highlighting: the live stroke, with no competing text selection or long-press menu ---- */
.pen-live { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 40; pointer-events: none; }
.pen-live i { position: absolute; display: block; border-radius: 2px; background: var(--pen-sel, rgba(255,216,77,.55)); }
/* with a colour chosen, every pointer paints (assets/js/paint.js), whatever the device: no native selection or menu competes */
html.pen-on .lsec-body, html.pen-on .lsec-body * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.pen-on .lsec-body { cursor: text; }
html.pen-dragging, html.pen-dragging body { -webkit-user-select: none; user-select: none; }

/* ---- Highlighter menu: every icon sits in the exact center of its button, and all fit on small phones ---- */
.pen-tray .pen { padding: 0; }
@media (max-width: 400px) {
  .pen-wrap.open .pen-tray { gap: 0; padding: 0 2px; }
  .pen-tray .pen { width: 22px; height: 24px; }
  .pen-tray .pen svg { width: 15px; height: 15px; }
  .pen-tray .pen-sep { margin: 0 1px; }
}

/* ---- The live stroke looks exactly like the finished highlight ---- */
.pen-live i { background: var(--live, var(--pen-sel)); border-radius: 3px; mix-blend-mode: multiply; }
html[data-theme="dark"] .pen-live i { mix-blend-mode: screen; }

/* ---- Live stroke: a plain layer behind this paragraph's letters, in the finished highlight's color ---- */
.pen-host { position: relative; isolation: isolate; }
.pen-host mark.hl { background: transparent !important; transition: none !important; }
.pen-under, .pen-under > span { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.pen-under { z-index: -1; }
.pen-under i { position: absolute; display: block; border-radius: 3px; }

/* ---- One unbroken highlight: no hairline where a word, bold term or line of text meets the next ---- */
.pen-under i { border-radius: 0; }
mark.hl-yellow { --hl-ink: var(--hl-yellow); } mark.hl-green { --hl-ink: var(--hl-green); } mark.hl-orange { --hl-ink: var(--hl-orange); } mark.hl-blue { --hl-ink: var(--hl-blue); } mark.hl-pink { --hl-ink: var(--hl-pink); }
mark.hl:not(.hl-e) { box-shadow: .6px 0 0 var(--hl-ink); }
.pen-host mark.hl { box-shadow: none !important; }
html.ann-off mark.hl { box-shadow: none; }

/* ---- Highlighter from the homepage preview: finished color appears at once, with nothing fading ---- */
mark.hl { transition: none; }

/* ---- Strokes with any pointer (assets/js/paint.js): the live stroke in the finished highlight's colour ---- */
html.pen-painting, html.pen-painting * { -webkit-user-select: none !important; user-select: none !important; cursor: text !important; }
.lsec-body ::highlight(dp-yellow) { background-color: var(--hl-yellow); color: inherit; }
.lsec-body ::highlight(dp-green)  { background-color: var(--hl-green);  color: inherit; }
.lsec-body ::highlight(dp-orange) { background-color: var(--hl-orange); color: inherit; }
.lsec-body ::highlight(dp-blue)   { background-color: var(--hl-blue);   color: inherit; }
.lsec-body ::highlight(dp-pink)   { background-color: var(--hl-pink);   color: inherit; }
.lsec-body ::highlight(dp-erase)  { background-color: var(--page); color: inherit; text-decoration: line-through; text-decoration-color: var(--text-3); }
.dp-paint-layer { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 40; pointer-events: none; mix-blend-mode: multiply; }
html[data-theme="dark"] .dp-paint-layer { mix-blend-mode: screen; opacity: .45; }
.dp-paint-layer i { position: absolute; border-radius: 2px; }
.dp-paint-layer .c-yellow { background: #FFE58A; } .dp-paint-layer .c-green { background: #C2EFC6; } .dp-paint-layer .c-orange { background: #FFCB94; }
.dp-paint-layer .c-blue { background: #BFDBFF; } .dp-paint-layer .c-pink { background: #FFC9E6; } .dp-paint-layer .c-erase { background: rgba(15,23,42,.10); }
/* hints name the gesture of the pointer in use */
.for-touch { display: none; }
html[data-input="touch"] .for-fine { display: none; }
html[data-input="touch"] .for-touch { display: inline; }

/* ---- Footer, compact (the homepage's own rules): the same order, the texts closer together, less height ---- */
html body .f2 { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
html body .f2-in { padding-top: clamp(36px, 3.2vw, 52px); }
html body .f2-tag { margin-top: 12px; line-height: 1.55; }
html body .f2-col { gap: 9px; }
html body .f2-col .f2-h { margin: 0 0 2px; }
html body .f2-note { margin-top: clamp(24px, 2.4vw, 34px); line-height: 1.6; }
html body .f2-bottom { margin-top: 14px; padding-top: 14px; }
html body .f2-legal { gap: 8px 24px; }
@media (min-width: 761px) and (max-width: 1239px) { html body .f2-grid { gap: 16px 48px; } }
@media (max-width: 760px) {
  html body .f2 { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  html body .f2-in { padding-top: 36px; }
  html body .f2-tag { margin: 12px 0 0 !important; }
  html body .f2-links { margin: 14px 0 0 !important; }
  html body .f2 .dpf-social, html body .f2 .f2-soc { margin: 16px 0 0 -9px !important; }
  html body .f2-col { gap: 9px; }
  html body .f2-note { margin-top: 22px; }
  html body .f2-bottom { margin-top: 14px; padding-top: 14px; }
  html body .f2-legal { gap: 6px 16px; }
}
@media (max-width: 380px) { html body .f2-legal { gap: 6px 12px; } }
.dp-paint-layer.on-dark { mix-blend-mode: screen; opacity: .45; }

/* ---- Reading theme switch: one cross-fade of the whole screen (see lesson script 07) ---- */
html.theme-vt .site-header { view-transition-name: none; }
html.theme-vt::view-transition-group(root) { animation: none; }
html.theme-vt::view-transition-image-pair(root) { isolation: auto; }
html.theme-vt::view-transition-old(root) { animation: none; mix-blend-mode: normal; opacity: 1; }
html.theme-vt::view-transition-new(root) { animation: dpThemeIn .26s cubic-bezier(.25,.1,.25,1) both; mix-blend-mode: normal; }
@keyframes dpThemeIn { from { opacity: 0; } to { opacity: 1; } }

/* The face turned away is hidden outright, swapping the moment the card is edge-on (about 0.09 s into the
   0.6 s turn). Safari can ignore backface-visibility while the page repaints, for example when the theme
   changes, and then showed the answer mirrored through the question. */
.fc-card .fc-face { transition: border-color .25s ease, box-shadow .3s ease, visibility 0s linear .087s; }
.fc-card .fc-back, .fc-card.flipped .fc-front { visibility: hidden; }
.fc-card.flipped .fc-back { visibility: visible; }
.fc-card.fc-swap .fc-face { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .fc-card .fc-face { transition: none; } }
