/* ==========================================================================
   אותו הטעם — base: faces, tokens, type, buttons, the chrome around the film
   Palette "Crust": charcoal ground, cream type, the gold of a golden crumb.
   ========================================================================== */

@font-face { font-family: "Heebo"; src: url("/assets/fonts/heebo-hebrew.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Heebo"; src: url("/assets/fonts/heebo-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Clash Display"; src: url("/assets/fonts/clash_display_600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Clash Display"; src: url("/assets/fonts/clash_display_700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/assets/fonts/satoshi_500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/assets/fonts/satoshi_700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #161412;          /* charcoal ground */
  --ink-2: #1D1A17;        /* a raised surface */
  --ink-3: #26221E;
  --cream: #F2EADB;        /* type */
  --cream-2: #CFC5B3;      /* secondary type  ~11:1 on ink */
  --cream-3: #9A8F7E;      /* tertiary        ~5.6:1 on ink */
  --gold: #E6A53B;         /* the crumb: numbers, buttons */
  --gold-hi: #F3BE62;
  --paprika: #D4482E;      /* the old number */
  --steel: #1B222A;        /* the diet: night steel */
  --steel-type: #C6CED5;
  --steel-2: #808D98;
  --line: rgba(242, 234, 219, .12);
  --line-2: rgba(242, 234, 219, .22);

  --he: "Heebo", "Arial Hebrew", Arial, system-ui, sans-serif;
  --num: "Clash Display", "Satoshi", "Heebo", system-ui, sans-serif;
  --latin: "Satoshi", "Heebo", system-ui, sans-serif;

  --gutter: clamp(20px, 6vw, 96px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--cream);
  font: 400 17px/1.7 var(--he);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, canvas { display: block; max-width: 100%; }
/* a closed dialog is hidden by the browser's own sheet; before Safari 15.4 there is no such sheet
   (assets/js/shim.js opens and closes them there) */
dialog:not([open]) { display: none; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
p { margin: 0; }
bdi { unicode-bidi: isolate; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* A release notice stays readable above the book/checkout without trapping focus. */
.update-notice {
  position: fixed; inset: auto 12px; top: calc(env(safe-area-inset-top, 0px) + 12px);
  z-index: 2147483000; inline-size: min(520px, calc(100% - 24px)); max-block-size: calc(100vh - 24px);
  margin: 0 auto; padding: 16px 20px; border: 1px solid var(--gold); border-radius: 4px;
  background: var(--ink); color: var(--cream); box-shadow: 0 8px 32px #0008;
  font: 400 15px/1.65 var(--he); text-align: start; overflow: auto;
}
.update-notice[hidden], .update-notice [hidden] { display: none !important; }
.update-notice p { margin: 0; }
.update-notice > div { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 10px; }
.update-notice button { min-block-size: 44px; padding: 8px 14px; border: 1px solid var(--line-2); background: transparent; color: var(--cream); cursor: pointer; }
.update-notice [data-update-now] { border-color: var(--gold); background: var(--gold); color: var(--ink); }
.update-notice button:disabled { opacity: .55; cursor: default; }

/* film grain over everything — the difference between "rendered" and "shot" */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .075;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0) } 20% { transform: translate(-3%, 2%) } 40% { transform: translate(2%, -3%) }
  60% { transform: translate(-2%, -1%) } 80% { transform: translate(3%, 3%) } 100% { transform: translate(0, 0) }
}
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }
/* On a phone the grain holds still, one screen large: a jittering layer four screens in size, over
   everything, was redrawn with the whole page on every frame — and at arm's length it looks the same */
@media (hover: none) and (pointer: coarse) { body::after { inset: 0; animation: none; } }

/* ---------------------------------------------------------------- accessibility (assets/js/accessibility.js)
   The site's own menu (Ben, 2026-10-18: Enable's server turned it off and on by itself). The button opens it on every
   page and in every flow of the book; what it changes is a class on <html>, set before the first paint. */
.a11y-trigger { display: inline-flex; align-items: center; justify-content: center; flex: none; min-inline-size: 44px; min-block-size: 44px; padding: 10px; border: 1px solid var(--line-2); background: var(--ink); color: var(--cream); cursor: pointer; }
.a11y-trigger svg { inline-size: 22px; block-size: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.a11y-trigger:hover { color: var(--gold); border-color: var(--gold); }
.a11y-trigger--flow { margin-inline-start: auto; }
/* the legal pages and the thank-you page: the button in their header, opposite the name */
.page-top .a11y-trigger--page { margin-inline-start: auto; }
.page-top:has(.a11y-trigger--page) { display: flex; align-items: center; gap: 12px; }

.a11y-panel {
  color-scheme: dark; inline-size: min(460px, calc(100% - 24px)); max-inline-size: calc(100% - 24px);
  max-block-size: calc(100vh - 24px); max-block-size: calc(100dvh - 24px); margin: auto; padding: 0; border: 0; border-radius: 22px;
  background: radial-gradient(130% 70% at 100% 0%, rgba(230, 165, 59, .1), transparent 55%), var(--ink-2); color: var(--cream);
  box-shadow: 0 0 0 1px var(--line-2), 0 40px 90px rgba(0, 0, 0, .7); overflow: auto; overscroll-behavior: contain;
  font: 400 16px/1.5 var(--he);
}
.a11y-panel[open] { animation: a11y-in .38s cubic-bezier(.2, .9, .25, 1); }
@keyframes a11y-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.a11y-panel::backdrop { background: rgb(8 7 5 / .66); }
.a11y-panel__in { display: grid; gap: 16px; padding: 18px 18px 20px; }
.a11y-panel__head { display: flex; align-items: center; gap: 12px; }
.a11y-panel__ico { flex: none; display: grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: 50%; background: var(--gold); color: var(--ink); }
.a11y-panel__ico svg { inline-size: 24px; block-size: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.a11y-panel__head h2 { flex: 1 1 auto; margin: 0; font: 800 24px/1.2 var(--he); outline: none; }
.a11y-panel__x { flex: none; inline-size: 44px; block-size: 44px; border: 0; border-radius: 50%; background: rgba(242, 234, 219, .06); color: var(--cream); font-size: 26px; line-height: 1; cursor: pointer; }
.a11y-panel__x:hover { background: rgba(242, 234, 219, .12); }
.a11y-panel__lead { margin: -6px 0 0; font-size: 14px; color: var(--cream-3); }
.a11y-size h3 { margin: 0 0 8px; font-size: 15px; font-weight: 800; color: var(--cream-2); }
.a11y-size__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 4px; border-radius: 16px; background: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.a11y-size__row button { display: grid; justify-items: center; align-content: center; gap: 2px; min-block-size: 64px; padding: 6px 2px; border: 0; border-radius: 12px; background: none; color: var(--cream-2); font: inherit; cursor: pointer; transition: background-color .2s, color .2s; }
.a11y-size__row button b { font-weight: 800; line-height: 1; }
.a11y-size__row button span { font-size: 12px; font-weight: 700; }
.a11y-size__row button:hover { color: var(--cream); background: rgba(242, 234, 219, .05); }
.a11y-size__row button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.a11y-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 520px) { .a11y-grid { grid-template-columns: repeat(3, 1fr); } }
.a11y-tile { position: relative; display: grid; justify-items: start; align-content: start; gap: 10px; min-block-size: 92px; padding: 14px 14px 12px; border: 0; border-radius: 16px; background: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); color: var(--cream); font: inherit; font-size: 14.5px; font-weight: 700; line-height: 1.3; text-align: start; cursor: pointer; transition: box-shadow .2s, background-color .2s; }
.a11y-tile svg { inline-size: 26px; block-size: 26px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.a11y-tile svg .fill { fill: var(--gold); stroke: none; }
.a11y-tile i { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; inline-size: 20px; block-size: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.a11y-tile:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.a11y-tile[aria-pressed="true"] { background: rgba(230, 165, 59, .14); box-shadow: inset 0 0 0 1.5px var(--gold); }
.a11y-tile[aria-pressed="true"] i { background: var(--gold); box-shadow: none; }
.a11y-tile[aria-pressed="true"] i::after { content: ""; position: absolute; inset: 5px 4px 6px 5px; border-inline-start: 2px solid var(--ink); border-block-end: 2px solid var(--ink); transform: rotate(-45deg) translate(1px, -1px); inline-size: 10px; block-size: 5px; }
.a11y-panel__note { margin: -6px 0 0; min-block-size: 0; font-size: 14px; color: var(--gold); }
.a11y-panel__note:empty { display: none; }
.a11y-reset { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-block-size: 48px; border: 0; border-radius: 999px; background: none; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--cream); font: inherit; font-weight: 800; cursor: pointer; }
.a11y-reset svg { inline-size: 20px; block-size: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.a11y-reset:disabled { opacity: .4; cursor: default; }
.a11y-panel__foot { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--cream-3); text-align: center; }
.a11y-panel__foot a { color: var(--cream-2); }
/* a phone: it rises from the foot of the screen, as the book's sheets do */
@media (max-width: 640px) {
  .a11y-panel { inline-size: 100%; max-inline-size: 100%; margin: auto 0 0; border-radius: 22px 22px 0 0; max-block-size: 88vh; max-block-size: 88dvh; }
  .a11y-panel__in { padding-block-end: calc(20px + env(safe-area-inset-bottom, 0px)); }
  .a11y-panel[open] { animation: a11y-up .42s cubic-bezier(.2, .9, .25, 1); }
}
@keyframes a11y-up { from { transform: translateY(40%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .a11y-panel[open] { animation: none; } }

/* what each choice does to the page */
/* the text's size: the page zoomed as a browser zooms it (its sizes are in pixels); a phone's last step is smaller */
html.a11y-t1 body { zoom: 1.15; }
html.a11y-t2 body { zoom: 1.3; }
html.a11y-t3 body { zoom: 1.5; }
@media (max-width: 640px) { html.a11y-t3 body { zoom: 1.4; } }
/* high contrast: white type on black, a brighter gold, lines that show */
html.a11y-contrast { --ink: #000; --ink-2: #0b0b0b; --ink-3: #161616; --cream: #fff; --cream-2: #fff; --cream-3: #f2f2f2; --gold: #FFD24A; --gold-hi: #FFE48A; --line: rgba(255, 255, 255, .5); --line-2: rgba(255, 255, 255, .75); }
html.a11y-contrast body { background: #000; }
html.a11y-contrast :is(p, small, li, dd, dt, label, figcaption, summary, blockquote):not(.page *, .fin__card *, .btn *, button *, [class*="paper"] *) { color: #fff !important; }
html.a11y-contrast body::after { display: none; }
/* grays: the page and what stands over it (the top layer is not the page's) */
html.a11y-gray, html.a11y-gray dialog, html.a11y-gray [popover] { filter: grayscale(1); }
/* links and headings, marked */
html.a11y-links a[href] { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px !important; outline: 2px solid var(--gold) !important; outline-offset: 2px; }
html.a11y-heads :is(h1, h2, h3, h4, h5, h6) { outline: 2px dashed var(--gold) !important; outline-offset: 4px; }
/* text spacing (WCAG 1.4.12's kind): taller lines, wider words and letters, in running text */
html.a11y-spacing :is(p, li, dd, dt, label, small, summary, figcaption, blockquote, td) { line-height: 1.85 !important; letter-spacing: .05em !important; word-spacing: .16em !important; }
html.a11y-spacing p { margin-block-end: 1em; }
/* a plain font: one face for everything, the display faces and the paper's serif gone */
html.a11y-font { --he: Arial, "Heebo", system-ui, sans-serif; --num: Arial, "Heebo", system-ui, sans-serif; --latin: Arial, system-ui, sans-serif; }
html.a11y-font body :not(svg, svg *) { font-family: Arial, "Heebo", system-ui, sans-serif !important; font-stretch: normal !important; }
/* the focus ring: on everything that takes focus, by touch or by key */
html.a11y-focus :focus { outline: 3px solid #FFD24A !important; outline-offset: 3px !important; box-shadow: 0 0 0 7px rgba(0, 0, 0, .85) !important; }
/* the movement stopped (the page is .still after its reload: no scripted motion; this stops the CSS's own) */
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
/* a big cursor (a computer) */
html.a11y-cursor, html.a11y-cursor * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M8 4v35l9.5-9.2 6.4 14.4 6.6-2.9-6.3-14.1H38z' fill='%23111' stroke='%23fff' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 8 4, auto !important; }

/* what a screen reader hears of a rolling number (odometer.js) */
.odo__sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; inset-inline-start: 12px; top: -80px; z-index: 200; background: var(--gold); color: var(--ink); padding: 12px 16px; font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- type ---------- */
.wrap { width: min(1240px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.h2 { margin: 0; font-weight: 900; font-size: clamp(36px, 5.4vw, 76px); line-height: 1.02; text-wrap: balance; }
.h3 { margin: 0; font-weight: 800; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; }
.lead { margin-top: 22px; max-inline-size: 40em; font-size: clamp(18px, 1.35vw, 21px); line-height: 1.7; color: var(--cream-2); }
.gold { color: var(--gold); }

/* words rise out of a mask — Hebrew is always split by word, never by letter */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-block: .06em; margin-block: -.06em; }
.w > span { display: inline-block; }

/* ---------- buttons: square, never pills ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-block-size: 56px; padding: 0 30px; border: 0; border-radius: 0; cursor: pointer;
  font-weight: 800; font-size: 17px; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: transform .35s var(--ease), background-color .25s, color .25s, box-shadow .35s var(--ease);
  overflow: hidden; isolation: isolate;
}
.btn bdi { font-family: var(--num); font-weight: 600; letter-spacing: .01em; }
.btn--gold { background: var(--gold); color: var(--ink); box-shadow: 0 10px 30px -12px rgba(230, 165, 59, .55); }
.btn--gold::after { /* the shine that crosses the button */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 48%, transparent 66%);
  transform: translateX(-120%); transition: transform .9s var(--ease);
}
.btn--gold:hover { background: var(--gold-hi); transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(230, 165, 59, .7); }
.btn--gold:hover::after { transform: translateX(120%); }
.btn--gold:active { transform: translateY(0); }
.btn--ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1px var(--line-2); min-block-size: 44px; padding: 0 18px; font-size: 15px; font-weight: 700; }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold); }
.btn--wide { inline-size: 100%; }
.icon-btn { inline-size: 52px; block-size: 52px; display: grid; place-items: center; border: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--cream); font-size: 22px; cursor: pointer; transition: box-shadow .25s, color .25s; }
.icon-btn:hover { box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold); }
.icon-btn:disabled { opacity: .3; cursor: default; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 60; display: flex; align-items: center; justify-content: flex-end;
  gap: 16px; padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter) 14px;
  transition: background-color .5s, backdrop-filter .5s, box-shadow .5s;
}
.topbar.is-solid { background: rgba(22, 20, 18, .82); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; min-block-size: 44px; font-weight: 900; font-size: 20px; text-decoration: none; color: var(--cream); }
.wordmark__dot { display: none; }

/* the price, wherever it appears next to a button */
.tag { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.tag b { font-family: var(--num); font-weight: 700; font-size: 30px; line-height: 1; color: var(--gold); }
.tag s { font-family: var(--num); font-weight: 600; font-size: 19px; color: var(--cream-3); text-decoration-thickness: 2px; }
.tag span { font-size: 15px; color: var(--cream-2); }
.btn s { font-family: var(--num); font-weight: 600; opacity: .55; text-decoration-thickness: 2px; }
