/* Folio · Concept O · Opus 5.5 — white ground, Anchor ink and restrained accents */
:root {
  --paper: #fff;
  --ink: #23322d;
  --ink-2: #4d5c56;
  --ink-3: #6b7873;
  --green: #0b5c3e;
  --green-press: #084630;
  --mint: #f1f9f6;
  --mint-2: #cee9df;
  --plum: #433968;
  --plum-soft: #eeecf5;
  --tone: #f6f8f7;
  --sans: "DM Sans", system-ui, sans-serif;
  --book: "Frank Ruhl Libre", "Times New Roman", serif;
  --he: "Frank Ruhl Libre", "SBL Hebrew", "Arial Hebrew", serif;
  --m: clamp(16px, 3.2vw, 40px);
  --bar: 64px;
  --r: 22px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 16px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--sans); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--mint-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 99; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 10px; }
[lang="he"], .he { font-family: var(--he); direction: rtl; }
.noscript { padding: 40px var(--m); }

/* ---------- bar ---------- */
.bar { position: sticky; top: 0; z-index: 40; height: var(--bar); display: flex; align-items: center; gap: 28px; padding: 0 var(--m); background: #fff; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 19px; letter-spacing: -.02em; }
.nav { display: flex; gap: 6px; margin-left: 8px; }
.nav a { white-space: nowrap; text-decoration: none; padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 500; transition: background .15s, color .15s; }
.nav a:hover { background: var(--tone); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--mint); color: var(--green); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--mint-2); color: var(--green); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
#gesture-replay { margin-left: auto; }
#gesture-replay img { width: 16px; height: auto; margin: -4px 2px -4px -4px; }
.concept { font-size: 13px; color: var(--ink-3); white-space: nowrap; }

/* ---------- controls ---------- */
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; font-weight: 500; text-decoration: none; cursor: pointer; transition: background .15s, transform .12s var(--ease), color .15s; white-space: nowrap; }
.pill:active { transform: scale(.97); }
.pill.primary { background: var(--green); color: #fff; }
.pill.primary:hover { background: var(--green-press); }
.pill.ghost { background: var(--mint); color: var(--ink); }
.pill.ghost:hover { background: var(--mint-2); }
.pill.quiet { background: transparent; color: var(--ink-2); padding: 0 12px; }
.pill.quiet:hover { background: var(--tone); color: var(--ink); }
.pill.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.pill[aria-pressed="true"] { background: var(--ink); color: #fff; }
.icon { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; border-radius: 999px; background: var(--mint); cursor: pointer; transition: background .15s, transform .12s; }
.icon:hover { background: var(--mint-2); }
.icon:active { transform: scale(.94); }
.icon:disabled { opacity: .35; cursor: default; }
.icon svg { width: 20px; height: 20px; }
.link { color: var(--green); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

main { min-height: calc(100vh - var(--bar)); outline: none; }
.view { animation: viewIn .45s var(--ease) backwards; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } }

/* Titan-style expansion curtain */
.unfold-curtain { position: fixed; z-index: 60; background: var(--mint); border-radius: var(--r); pointer-events: none; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); padding: clamp(24px, 4vw, 56px) var(--m) 0; align-items: start; }
.hero-copy { position: sticky; top: calc(var(--bar) + 32px); padding-top: clamp(8px, 4vw, 64px); }
.hero h1 { font-size: clamp(42px, 4.5vw, 76px); line-height: .98; letter-spacing: -.04em; font-weight: 600; margin: 0 0 32px; max-width: 9.5em; }
.lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; max-width: 32em; margin: 0 0 32px; }
.searchbox { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: var(--tone); max-width: 560px; transition: background .2s; }
.searchbox:focus-within { background: var(--mint); }
.searchbox input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 16px; font-size: 17px; min-height: 48px; }
.searchbox input:focus { outline: none; }
.searchbox .pill { min-height: 48px; }
.tries { margin: 16px 0 0; color: var(--ink-2); font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.tries a { color: var(--green); text-decoration: none; padding: 4px 12px; border-radius: 999px; background: var(--mint); }
.tries a:hover { background: var(--mint-2); }
.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 40px; margin: 48px 0 0; }
.facts div { font-size: 14px; color: var(--ink-2); }
.facts strong { display: block; font-size: 40px; font-weight: 600; color: var(--ink); letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* Heron-like source canvas */
.canvas { margin: 0; }
.sheet { position: relative; background: var(--tone); border-radius: var(--r); padding: clamp(16px, 3vw, 44px); overflow: hidden; }
.sheet-tools { position: absolute; z-index: 3; top: 14px; right: 14px; display: flex; gap: 6px; }
.layers { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; align-items: center; }
.layers span { color: var(--ink-2); font-size: 14px; margin-right: 6px; }
.scanview { position: relative; overflow: hidden; touch-action: pan-y; border-radius: 6px; background: #fff; user-select: none; -webkit-user-select: none; }
.scanview.zoomed { touch-action: none; cursor: grab; }
.scanview .stage { position: relative; transform-origin: 0 0; will-change: transform; }
.scanview img { width: 100%; height: auto; pointer-events: none; }
.region { position: absolute; border-radius: 3px; background: rgba(206, 233, 223, .5); mix-blend-mode: multiply; transition: background .2s, opacity .2s; }
.region.row { background: rgba(11, 92, 62, .22); }
.region.note { background: rgba(67, 57, 104, .2); }
.region.sel { background: rgba(11, 92, 62, .38); }
.region.sec.sel { background: rgba(11, 92, 62, .2); }
.pin.secpin { background: var(--mint-2); color: var(--green); }
.region.note.sel { background: rgba(67, 57, 104, .42); }
.pin { position: absolute; z-index: 2; transform: translate(-50%, -50%); min-width: 30px; height: 30px; padding: 0 7px; border: 0; border-radius: 8px; background: var(--green); color: #fff; font: 600 13px/30px var(--sans); cursor: pointer; transition: transform .15s var(--ease), background .15s; }
.pin.note { background: var(--plum); border-radius: 999px; min-width: 24px; height: 24px; line-height: 24px; font-size: 12px; padding: 0 5px; }
.pin:hover, .pin[aria-expanded="true"] { transform: translate(-50%, -50%) scale(1.15); }
.hide-pass .pin.pass, .hide-pass .region.row, .hide-notes .pin.note, .hide-notes .region.note { opacity: 0; pointer-events: none; }
.callout { position: absolute; z-index: 4; width: min(360px, calc(100% - 24px)); background: #fff; border-radius: 16px; padding: 18px 20px; box-shadow: 0 18px 50px rgba(35, 50, 45, .18); animation: pop .3s var(--ease); } /* taste-skill-ignore: floating overlay, sheet or sticky bar */
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.callout .k { font-size: 13px; color: var(--ink-2); margin: 0 0 6px; }
.callout .he { font-size: 20px; line-height: 1.7; margin: 0 0 8px; }
.callout .en { font-family: var(--book); font-size: 17px; line-height: 1.5; margin: 0 0 14px; }
.callout .x { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; }
figcaption { color: var(--ink-2); font-size: 14px; margin-top: 12px; max-width: 46em; }

section.block { padding: clamp(96px, 12vw, 180px) var(--m) 0; }
.block-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: end; margin-bottom: 40px; }
.block-head h2 { font-size: clamp(34px, 4.2vw, 64px); line-height: 1; letter-spacing: -.035em; font-weight: 600; margin: 0; }
.block-head p { font-size: 18px; margin: 0; max-width: 34em; }

/* Titan-style unfolding work card */
.unfold { padding-top: clamp(96px, 12vw, 180px); }
.unfold-frame { margin: 0 calc(var(--m) * (1 - var(--p, 0))); border-radius: calc(var(--r) * 1.4 * (1 - var(--p, 0))); background: var(--mint); padding: clamp(28px, 5vw, 80px) var(--m); transition: margin .1s linear; }
.unfold-frame h2 { font-size: clamp(34px, 4.2vw, 64px); line-height: 1; letter-spacing: -.035em; font-weight: 600; margin: 0 0 12px; text-align: center; }
.unfold-frame > p { text-align: center; font-size: 18px; margin: 0 auto 36px; max-width: 36em; }
.tabs { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 40px; }
.tabs button { border: 0; background: transparent; padding: 10px 18px; border-radius: 999px; cursor: pointer; color: var(--ink-2); font-weight: 500; transition: background .15s, color .15s; }
.tabs button:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); }
.workpanel { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 80px); align-items: center; animation: viewIn .4s var(--ease); }
.workpanel h3 { font-size: clamp(26px, 2.6vw, 38px); letter-spacing: -.025em; line-height: 1.1; margin: 0 0 6px; font-weight: 600; }
.workpanel .he-title { font-size: 26px; margin: 0 0 18px; color: var(--ink-2); }
.workpanel .meta { color: var(--ink-2); margin: 0 0 18px; font-size: 15px; }
.workpanel .intro { font-family: var(--book); font-size: 19px; line-height: 1.6; margin: 0 0 24px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0 0 28px; }
.stats div { font-size: 14px; color: var(--ink-2); }
.stats strong { display: block; font-size: 28px; color: var(--ink); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.workpanel figure { margin: 0; }
.workpanel figure img { border-radius: 10px; background: #fff; aspect-ratio: 3/4; object-fit: cover; object-position: top; width: 100%; }
.chapters { margin: 24px 0 0; padding: 0; list-style: none; columns: 2; column-gap: 32px; font-size: 15px; }
.chapters li { break-inside: avoid; padding: 6px 0; color: var(--ink-2); }

/* authors band */
.authors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.author-card { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 240px; padding: 28px; border-radius: var(--r); background: var(--tone); text-decoration: none; transition: background .2s, transform .2s var(--ease); }
.author-card:hover { background: var(--mint); transform: translateY(-3px); }
.author-card h3 { font-size: 26px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 10px; font-weight: 600; }
.author-card p { margin: 10px 0 0; color: var(--ink-2); font-size: 16px; }
.author-card .n { font-size: 64px; font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.author-card .n small { font-size: 16px; letter-spacing: 0; font-weight: 500; color: var(--ink-2); margin-left: 8px; }

/* etched gesture plates on home */
.plates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.plate { display: flex; flex-direction: column; border: 0; text-align: left; padding: 24px 24px 22px; border-radius: var(--r); background: var(--tone); cursor: pointer; transition: box-shadow .2s, transform .2s var(--ease); }
.plate:hover { background: var(--mint); transform: translateY(-3px); }
.plate .art { height: 230px; display: grid; place-items: center; margin-bottom: 14px; position: relative; }
.plate .art img { max-height: 220px; width: auto; }
.plate .art img + img { position: absolute; opacity: 0; transition: opacity .4s; }
.plate:hover .art img + img, .plate:focus-visible .art img + img { opacity: 1; }
.plate:hover .art img:first-child:not(:last-child), .plate:focus-visible .art img:first-child:not(:last-child) { opacity: 0; }
.plate .art img:first-child { transition: opacity .4s; }
.plate h3 { font-size: 21px; margin: 0 0 6px; letter-spacing: -.015em; font-weight: 600; }
.plate p { margin: 0; color: var(--ink-2); font-size: 15px; }
.plate .go { margin-top: 14px; color: var(--green); font-weight: 500; font-size: 15px; }

/* research */
.research { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 80px); align-items: center; padding: clamp(32px, 5vw, 72px); border-radius: var(--r); background: var(--plum-soft); }
.research h2 { font-size: clamp(32px, 3.6vw, 56px); line-height: 1.02; letter-spacing: -.035em; margin: 0 0 18px; font-weight: 600; }
.research p { margin: 0; font-size: 18px; max-width: 32em; }
.research ul { margin: 0 0 24px; padding-left: 20px; font-size: 16px; }
.research ul li { margin: 6px 0; }
.research .pill.primary { background: var(--plum); }
.research .pill.primary:hover { background: #352c55; }

/* footer */
.foot { padding: clamp(96px, 12vw, 180px) var(--m) 40px; }
.foot .big { font-size: clamp(64px, 15vw, 240px); font-weight: 600; letter-spacing: -.06em; line-height: .85; margin: 0 0 40px; color: var(--ink); }
.foot .big span { color: var(--green); }
.foot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; font-size: 14px; color: var(--ink-2); }
.foot-grid strong { display: block; color: var(--ink); margin-bottom: 6px; font-weight: 600; }
.foot-grid p { margin: 0 0 6px; }

/* ---------- shared page head ---------- */
.page { padding: clamp(24px, 4vw, 56px) var(--m) 80px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; color: var(--ink-2); margin: 0 0 18px; }
.crumbs a { text-decoration: none; padding: 4px 10px; margin: -4px -2px; border-radius: 999px; }
.crumbs a:hover { background: var(--tone); }
.page h1 { font-size: clamp(36px, 4.6vw, 72px); line-height: 1; letter-spacing: -.04em; font-weight: 600; margin: 0 0 16px; }
.page .sub { font-size: 17px; color: var(--ink-2); margin: 0 0 32px; max-width: 46em; }

/* search */
.search-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.filters { position: sticky; top: calc(var(--bar) + 24px); display: grid; gap: 28px; }
.filters fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
.filters legend { font-weight: 600; margin-bottom: 8px; font-size: 15px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; cursor: pointer; font-size: 15px; transition: background .15s; }
.opt:hover { background: var(--tone); }
.opt input { accent-color: var(--green); width: 18px; height: 18px; margin: 0; }
.opt .n { margin-left: auto; color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.results h2 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 16px; font-weight: 600; }
.results h2 small { font-size: 15px; font-weight: 400; color: var(--ink-2); margin-left: 8px; }
.res-section + .res-section { margin-top: 56px; }
.hits { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hit a, .hit .row-like { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; padding: 16px 18px; border-radius: 16px; text-decoration: none; transition: background .15s; }
.hit a:hover, .hit a:focus-visible { background: var(--mint); }
.hit .t { font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.hit .d { color: var(--ink-2); font-size: 14px; grid-column: 1; }
.hit .s { grid-column: 1 / -1; font-family: var(--book); font-size: 17px; line-height: 1.55; }
.hit .s.he { font-family: var(--he); font-size: 19px; line-height: 1.8; }
.hit .tag { grid-row: 1; grid-column: 2; align-self: start; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--mint-2); color: var(--green); font-weight: 500; }
.hit .tag.out { background: var(--tone); color: var(--ink-2); }
mark { background: var(--mint-2); color: inherit; border-radius: 3px; padding: 0 2px; }
.empty { padding: 48px; border-radius: var(--r); background: var(--tone); }
.empty h2 { font-size: 28px; margin: 0 0 8px; letter-spacing: -.02em; }
.empty p { margin: 0 0 20px; color: var(--ink-2); max-width: 40em; }
.more { margin-top: 16px; }

/* catalogue */
.acc { display: grid; gap: 12px; }
.acc-item { border-radius: var(--r); background: var(--tone); overflow: hidden; transition: background .25s; }
.acc-item.open { background: var(--mint); }
.acc-head { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 24px; align-items: center; padding: clamp(20px, 3vw, 36px); border: 0; background: transparent; text-align: left; cursor: pointer; }
.acc-head h2 { font-size: clamp(26px, 3vw, 44px); letter-spacing: -.03em; line-height: 1.05; margin: 0; font-weight: 600; }
.acc-head .sub2 { display: block; color: var(--ink-2); font-size: 15px; margin-top: 6px; font-weight: 400; letter-spacing: 0; }
.acc-head .n { font-size: clamp(32px, 4vw, 56px); font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.acc-head .chev { width: 48px; height: 48px; border-radius: 999px; background: #fff; display: grid; place-items: center; transition: transform .35s var(--ease); }
.acc-item.open .chev { transform: rotate(180deg); }
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.acc-item.open .acc-body { grid-template-rows: 1fr; }
.acc-body > div { overflow: hidden; }
.series { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 0 clamp(20px, 3vw, 36px) clamp(20px, 3vw, 36px); }
.series a { display: flex; flex-direction: column; gap: 6px; min-height: 150px; padding: 22px; border-radius: 18px; background: #fff; text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s; }
.series a:hover { transform: translateY(-3px); }
.series .t { font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.series .d { color: var(--ink-2); font-size: 14px; }
.series .r { margin-top: auto; color: var(--green); font-size: 14px; font-weight: 500; }
.series a.all { background: var(--mint-2); }

/* list */
.list-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 24px; }
.list-tools label { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.list-tools select { min-height: 40px; border: 0; border-radius: 999px; background: var(--tone); padding: 0 14px; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lrow { position: relative; border-radius: 16px; overflow: hidden; background: var(--paper); }
.lrow .bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding: 0 24px; background: var(--plum); color: #fff; font-weight: 500; }
.lrow .fg { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 14em) 6em auto; gap: 8px 24px; align-items: center; padding: 16px 18px; background: var(--paper); border-radius: 16px; transition: background .15s, transform .3s var(--ease); touch-action: pan-y; }
.lrow .fg:hover { background: var(--tone); }
.lrow .t { font-weight: 600; font-size: 18px; letter-spacing: -.01em; text-decoration: none; }
.lrow .t:hover { text-decoration: underline; text-underline-offset: 3px; }
.lrow .t small { display: block; font-weight: 400; color: var(--ink-2); font-size: 14px; letter-spacing: 0; }
.lrow .he { font-size: 19px; text-align: right; color: var(--ink-2); }
.lrow .y { color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.lrow .acts { display: flex; gap: 6px; justify-content: flex-end; }
.swipe-hint { font-size: 14px; color: var(--ink-2); margin: -8px 0 20px; }

/* ---------- reader ---------- */
.reader { position: relative; background: var(--paper); }
.grip { display: flex; justify-content: center; align-items: center; height: 26px; cursor: grab; touch-action: none; border: 0; background: transparent; width: 100%; }
.grip span { width: 56px; height: 5px; border-radius: 999px; background: #c9d3cf; transition: background .15s, width .2s; }
.grip:hover span, .grip:focus-visible span { background: var(--green); width: 72px; }
.reader > .grip { position: sticky; top: var(--bar); z-index: 31; background: #fff; }
.rbar { position: sticky; top: calc(var(--bar) + 26px); z-index: 30; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 6px var(--m) 12px; background: #fff; box-shadow: 0 10px 20px -18px rgba(35, 50, 45, .5); } /* taste-skill-ignore: floating overlay, sheet or sticky bar */
.rbar .titles { min-width: 0; }
.rbar .titles b { display: block; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rbar .titles span { display: block; color: var(--ink-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.secnav { display: flex; align-items: center; gap: 8px; }
.secnav output { font-size: 14px; color: var(--ink-2); min-width: 7.5em; text-align: center; font-variant-numeric: tabular-nums; }
.rtools { display: flex; gap: 6px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--tone); }
.seg button { border: 0; background: transparent; min-height: 36px; padding: 0 12px; border-radius: 999px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); }

.rgrid { display: grid; grid-template-columns: minmax(300px, 26vw) minmax(0, 1fr) minmax(280px, 22vw); gap: clamp(20px, 2.6vw, 44px); padding: 8px var(--m) 140px; align-items: start; }
.scanpane, .notes { position: sticky; top: calc(var(--bar) + 110px); max-height: calc(100vh - var(--bar) - 130px); }
.scanpane { display: flex; flex-direction: column; gap: 10px; }
.scanpane .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scanpane h2, .notes h2 { font-size: 17px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.scanpane .head small { display: block; color: var(--ink-2); font-size: 13px; font-weight: 400; }
.pagetabs { display: flex; gap: 4px; flex-wrap: wrap; }
.pagetabs button { border: 0; min-width: 40px; min-height: 34px; border-radius: 999px; background: var(--tone); cursor: pointer; font-size: 14px; font-variant-numeric: tabular-nums; }
.pagetabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.scanbox { background: var(--tone); border-radius: 16px; padding: 12px; overflow: hidden; min-height: 0; }
.scanpane .scanview { max-height: calc(100vh - var(--bar) - 300px); }
.zoombar { display: flex; gap: 6px; align-items: center; }
.zoombar .icon { width: 36px; height: 36px; }
.zoombar small { color: var(--ink-2); font-size: 13px; margin-left: 4px; }
.geo-note { font-size: 13px; color: var(--ink-2); margin: 0; }

.textcol { min-width: 0; touch-action: pan-y; }
.swipe-track { will-change: transform; }
.chap { color: var(--ink-2); font-size: 15px; margin: 8px 0 8px; }
.textcol h1 { font-size: clamp(30px, 3vw, 46px); line-height: 1.05; letter-spacing: -.03em; font-weight: 600; margin: 0 0 14px; }
.purpose { font-size: 17px; color: var(--ink-2); margin: 0 0 32px; max-width: 42em; }
.colheads { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; font-size: 13px; color: var(--ink-3); padding: 0 16px 8px; }
.colheads span:last-child { text-align: right; }
.prow { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 16px; border-radius: 14px; cursor: pointer; transition: background .2s; scroll-margin-top: calc(var(--bar) + 140px); }
.prow:hover { background: var(--tone); }
.prow[aria-current="true"] { background: var(--mint); }
.prow .en { font-family: var(--book); font-size: 19px; line-height: 1.62; }
.prow .he { font-size: 25px; line-height: 1.78; text-align: right; }
.prow .ex { grid-column: 1; font-size: 14px; color: var(--ink-2); margin: 6px 0 0; line-height: 1.5; }
.prow .ex b { font-weight: 600; color: var(--ink); }
.hide-ex .prow .ex { display: none; }
.mode-en .prow { grid-template-columns: 1fr; } .mode-en .prow .he, .mode-en .colheads span:last-child { display: none; }
.mode-he .prow { grid-template-columns: 1fr; } .mode-he .prow .en, .mode-he .prow .ex, .mode-he .colheads span:first-child { display: none; }
.nm { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; margin: 0 2px; vertical-align: super; font: 600 12px/1 var(--sans); color: #fff; background: var(--plum); border: 0; border-radius: 999px; cursor: pointer; transition: transform .15s; }
.nm:hover { transform: scale(1.15); }
.next-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-top: 48px; padding: 28px 32px; border-radius: var(--r); background: var(--mint); text-decoration: none; transition: background .2s; }
.next-card:hover { background: var(--mint-2); }
.next-card small { display: block; color: var(--ink-2); font-size: 14px; }
.next-card b { font-size: 22px; letter-spacing: -.02em; font-weight: 600; }
.end-card { margin-top: 48px; padding: 28px 32px; border-radius: var(--r); background: var(--tone); }
.end-card h2 { margin: 0 0 8px; font-size: 22px; }
.end-card p { margin: 0 0 16px; font-family: var(--book); font-size: 18px; line-height: 1.55; }

.notes { display: flex; flex-direction: column; background: var(--paper); }
.notes .nhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; }
.notes .nhead small { color: var(--ink-2); font-size: 13px; }
.notes > .grip { display: none; }
.notes ol { list-style: none; margin: 0; padding: 0 4px 0 0; overflow: auto; overscroll-behavior: contain; }
.note { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px 10px; padding: 12px; border-radius: 12px; transition: background .2s; scroll-margin: 12px; }
.note.on { background: var(--plum-soft); }
.note .num { grid-row: span 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--plum-soft); color: var(--plum); font-weight: 600; font-size: 13px; }
.note.on .num { background: var(--plum); color: #fff; }
.note .where { font-size: 13px; color: var(--ink-2); }
.note .txt { font-family: var(--book); font-size: 16.5px; line-height: 1.5; grid-column: 2; }
.note .txt button { margin: 6px 0 0 -12px; font-family: var(--sans); color: var(--green); }
.notes .lang { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; }

.rail { position: fixed; z-index: 35; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(720px, calc(100% - 32px)); display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 999px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); box-shadow: 0 12px 40px -12px rgba(35, 50, 45, .3); } /* taste-skill-ignore: floating overlay, sheet or sticky bar */
.rail .track { position: relative; flex: 1; height: 36px; display: flex; gap: 2px; align-items: center; cursor: pointer; touch-action: none; border-radius: 999px; }
.rail .track:focus-visible { outline-offset: 4px; }
.rail .tick { flex: var(--w) 1 0; height: 8px; border-radius: 4px; background: #dfe6e3; transition: background .2s, height .2s; }
.rail .tick.done { background: var(--mint-2); }
.rail .tick.on { background: var(--green); height: 14px; }
.rail .tip { position: absolute; bottom: 44px; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 10px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.rail.scrub .tip { opacity: 1; }
.rail .lbl { font-size: 13px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

.toast { position: fixed; z-index: 80; left: 50%; bottom: 84px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; display: flex; gap: 12px; align-items: center; padding: 10px 10px 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 15px; transition: opacity .2s, transform .3s var(--ease); }
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { border: 0; background: rgba(255, 255, 255, .16); color: #fff; min-height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer; }
.toast:empty { display: none; }

/* ---------- teaching overlay ---------- */
.teach { position: fixed; inset: 0; z-index: 90; }
.teach[hidden] { display: none; }
.teach-glaze { position: absolute; inset: 0; animation: glaze .35s ease backwards; }
.teach-glaze .pane { position: absolute; background: rgba(250, 252, 251, .6); backdrop-filter: blur(9px) saturate(1.25); -webkit-backdrop-filter: blur(9px) saturate(1.25); }
@keyframes glaze { from { opacity: 0; } }
.teach.has-hole::before { content: ""; position: absolute; left: var(--hx); top: var(--hy); width: var(--hw); height: var(--hh); border-radius: 14px; box-shadow: 0 0 0 4px rgba(11, 92, 62, .55), 0 0 0 12px rgba(206, 233, 223, .6); pointer-events: none; z-index: 1; animation: halo 1.6s ease-in-out infinite alternate; } /* taste-skill-ignore: floating overlay, sheet or sticky bar */
@keyframes halo { to { box-shadow: 0 0 0 4px rgba(11, 92, 62, .25), 0 0 0 18px rgba(206, 233, 223, .3); } } /* taste-skill-ignore: floating overlay, sheet or sticky bar */
.teach-hand { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.teach-arrow { position: absolute; inset: 0; filter: drop-shadow(0 2px 0 #fff); } /* taste-skill-ignore: floating overlay, sheet or sticky bar */
.teach-img { position: absolute; left: 0; top: 0; filter: drop-shadow(0 18px 22px rgba(35, 50, 45, .22)); } /* taste-skill-ignore: floating overlay, sheet or sticky bar */
.teach-img.ghost { opacity: .3; }
.teach-ring { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 999px; background: rgba(11, 92, 62, .28); box-shadow: 0 0 0 3px rgba(11, 92, 62, .6); } /* taste-skill-ignore: floating overlay, sheet or sticky bar */
.teach-dot { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 999px; background: rgba(11, 92, 62, .3); box-shadow: 0 0 0 3px rgba(11, 92, 62, .65); } /* taste-skill-ignore: floating overlay, sheet or sticky bar */
.teach-plate { position: absolute; z-index: 3; background: rgba(255, 255, 255, .94); border-radius: 24px; padding: 24px 26px 22px; box-shadow: 0 30px 80px -20px rgba(35, 50, 45, .35); animation: pop .35s var(--ease) both; } /* taste-skill-ignore: floating overlay, sheet or sticky bar */
.teach-count { margin: 0 0 4px; font-size: 13px; color: var(--ink-2); }
.teach-plate h2 { margin: 0 0 14px; font-size: 26px; letter-spacing: -.025em; line-height: 1.1; }
.teach-steps { margin: 0 0 16px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 6px; }
.teach-steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; color: var(--ink-2); transition: background .25s, color .25s; font-size: 16px; }
.teach-steps li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--tone); font-weight: 600; font-size: 14px; color: var(--ink); }
.teach-steps li.on { background: var(--mint); color: var(--ink); }
.teach-steps li.on::before { background: var(--green); color: #fff; }
.teach-alt { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); }
.teach-alt strong { color: var(--ink); font-weight: 600; }
.teach-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .rgrid { grid-template-columns: minmax(260px, 32vw) minmax(0, 1fr); }
  .notes { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; top: auto; max-height: none; height: 72vh; border-radius: 24px 24px 0 0; box-shadow: 0 -20px 60px -20px rgba(35, 50, 45, .35); padding: 0 var(--m) 16px; transform: translateY(calc(100% - var(--peek, 64px))); transition: transform .4s var(--ease); } /* taste-skill-ignore: floating overlay, sheet or sticky bar */
  .notes.open { transform: translateY(0); }
  .notes.dragging { transition: none; }
  .notes > .grip { display: flex; height: 30px; }
  .notes .nhead { cursor: pointer; }
  .rail { bottom: calc(var(--peek, 64px) + 10px); }
  .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .concept { display: none; }
  .hero, .block-head, .workpanel, .research { grid-template-columns: 1fr; }
  .hero-copy { position: static; padding-top: 8px; }
  .authors { grid-template-columns: 1fr; }
  .author-card { min-height: 0; gap: 24px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .search-grid { grid-template-columns: 1fr; }
  .filters { position: static; grid-template-columns: 1fr 1fr; }
  .rgrid { grid-template-columns: minmax(0, 1fr); }
  .scanpane { position: sticky; top: calc(var(--bar) + 26px + var(--rbar-h, 100px)); z-index: 29; max-height: none; order: -1; background: #fff; padding-bottom: 8px; margin: 0 calc(var(--m) * -1); padding-left: var(--m); padding-right: var(--m); }
  .scanpane .head, .scanpane .geo-note { display: none; }
  .scanpane:not(.open) #zoomslot { display: none; }
  .scanpane .scanbox { max-height: var(--scan-h, 0px); padding: 0 12px; transition: max-height .4s var(--ease), padding .3s; }
  .scanpane.open .scanbox { --scan-h: 62vh; padding: 12px; }
  .scanpane.dragging .scanbox { transition: none; }
  .scanpane .scanview { max-height: calc(62vh - 24px); }
  .scanpane .pullbar { display: flex; }
  .lrow .fg { grid-template-columns: minmax(0, 1fr) auto; }
  .lrow .he { grid-column: 1; text-align: right; }
  .lrow .y { grid-column: 1; }
  .lrow .acts { grid-row: 1 / span 3; grid-column: 2; flex-direction: column; }
  .chapters { columns: 1; }
}
.pullbar { display: none; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 14px; border: 0; border-radius: 14px; background: var(--tone); cursor: grab; touch-action: none; text-align: left; }
.pullbar .grip { width: auto; height: auto; }
.pullbar b { font-weight: 600; font-size: 15px; }
.pullbar small { color: var(--ink-2); font-size: 13px; margin-left: auto; }
@media (max-width: 640px) {
  :root { --bar: 56px; }
  .bar { gap: 8px; }
  .mark span { display: none; }
  .nav { margin-left: 0; gap: 0; }
  .nav a { padding: 8px 9px; font-size: 15px; }
  .nav a .lt, .secnav .lt { display: none; }
  .secnav output { min-width: 4.5em; }
  #gesture-replay { padding: 0 12px; font-size: 0; gap: 0; min-height: 40px; }
  #gesture-replay img { margin: 0; width: 18px; }
  .facts { grid-template-columns: repeat(3, auto); gap: 8px 20px; }
  .facts strong { font-size: 30px; }
  .plates { grid-template-columns: 1fr; }
  .plate .art { height: 190px; }
  .foot-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .rbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 8px; padding-bottom: 8px; }
  .rbar .secnav { grid-row: 2; grid-column: 1 / span 2; }
  .rbar .rtools { grid-row: 2; grid-column: 3; }
  .rbar .rtools .icon { display: none; }
  .rbar .titles { grid-column: 2 / span 2; }
  .seg button { padding: 0 9px; }
  .nav a .lt, .secnav .lt { display: none; }
  .secnav output { min-width: 4.5em; }
  .prow { grid-template-columns: 1fr; gap: 8px; padding: 14px 12px; }
  .prow .he { order: -1; font-size: 23px; }
  .colheads { display: none; }
  .acc-head { grid-template-columns: minmax(0, 1fr) auto; }
  .acc-head .n { display: none; }
  .next-card { padding: 22px; }
  .rail .lbl { display: none; }
  .lrow .fg { gap: 4px 12px; padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* the reading lens beside the canvas (desktop) */
.lens { margin-top: 40px; padding: 24px 26px; border-radius: var(--r); background: var(--mint); max-width: 560px; }
.lens .k { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); }
.lens .he { font-size: 22px; line-height: 1.75; margin: 0 0 8px; }
.lens .en { font-family: var(--book); font-size: 18px; line-height: 1.55; margin: 0 0 16px; }
.lens.note { background: var(--plum-soft); }
.lens.note .pill.primary { background: var(--plum); }
@media (max-width: 900px) { .lens { display: none; } }

@media (pointer: coarse) { .teach-alt.mouse { display: none; } }
@media (max-width: 640px) {
  .teach-plate { padding: 16px 18px 14px; border-radius: 20px; }
  .teach-plate h2 { font-size: 21px; margin-bottom: 8px; }
  .teach-steps { gap: 2px; margin-bottom: 10px; }
  .teach-steps li { padding: 5px 8px; font-size: 15px; grid-template-columns: 26px 1fr; }
  .teach-steps li::before { width: 24px; height: 24px; font-size: 13px; }
  .teach-alt { font-size: 13px; margin-bottom: 4px; }
  .teach-actions { margin-top: 10px; }
  .teach-actions .pill { min-height: 40px; padding: 0 16px; }
}

/* entrance layer */
.rise { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease) var(--d, 0ms), transform .7s var(--ease) var(--d, 0ms); }
.rise.in { opacity: 1; transform: none; }
.workpanel figure img { transition: transform 1.2s var(--ease); }
.workpanel figure:hover img { transform: scale(1.02) rotate(-.4deg); }
@media (prefers-reduced-motion: reduce) { .rise { opacity: 1; transform: none; } }
/* phones and tablets: the page comes before the figures */
@media (max-width: 900px) {
  .hero { gap: 0; }
  .hero-copy { display: contents; }
  .hero .canvas { order: 2; margin-top: 40px; }
  .hero .facts { order: 3; margin-top: 40px; }
}
@media (max-width: 640px) { .stats { display: grid; grid-template-columns: repeat(4, auto); gap: 8px 18px; } .stats strong { font-size: 24px; } }
