/* the ✓ of every Check button – the write-in's and dropdown's, an expression or equation line's, column arithmetic's, the
   table's, and its picture in a text (.check-pic) – is a drawn tick, centred in its circle: the ✓ character sits off the
   middle of its own glyph (owner, 2026-11-22). The character stays in the button for screen readers, unpainted; the tick
   takes the button's colour, so it is hidden wherever the button's colour is (a wrong check's quiet red). */
:root { --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.5 12.5l4.2 4.2L18.5 7.8' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
:is(.af-check, .cg-check, .tb-check, .check-pic, .expr-status) { position: relative; -webkit-text-fill-color: transparent; }
:is(.af-check, .cg-check, .tb-check, .check-pic)::after,
:is(.expr-line, .eq-line)[data-state="ok"] .expr-status::after,
html[data-check-row] [data-ask]:not([data-state]) .expr-status::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 62%; height: 62%; background: currentColor;
  -webkit-mask: var(--tick) center / contain no-repeat; mask: var(--tick) center / contain no-repeat;
}
/* the writing in a tool – an expression chain's math, an equation, a table cell, column arithmetic: a little smaller than
   the lesson's text (1.125rem, 1rem on a phone), so a tool weighs less than the text around it; its buttons and keys keep
   their own size (owner, 2026-11-22: tools' writing was much larger than the text) */
:root { --tool-text: 1.05rem; }
@media (max-width: 640px) { :root { --tool-text: 0.95rem; } }
/* Site palette. The --pt-* names come from portugalit.guide, where the fractions workbook
   (assets/css/expression.css) was first written; it uses --pt-tile, --pt-tile-soft, --pt-sand
   and --pt-accent. Starting values – change them when the site gets its own design. */
:root {
  --pt-tile: #1f4fa3;
  --pt-tile-soft: #eaf1fb;
  --pt-accent: #c98a12;
  --pt-sand: #fffcf6;
  --pt-accent-soft: #fdf5e1;
  --pt-ink: #1e2a3b;
  --pt-muted: #6b7280;     /* secondary text */
}

html.dark {
  --pt-tile: #8fb2f0;
  --pt-tile-soft: rgba(143, 178, 240, 0.1);
  --pt-accent: #f0bf55;
  --pt-accent-soft: rgba(240, 191, 85, 0.1);
  --pt-muted: #a3a3a3;
}

html:not(.dark) body { background-color: var(--pt-sand); }

/* The site's font: Rubik (SIL OFL, static/fonts/, Hebrew, Arabic and Latin subsets – one family drawn
   for both scripts, so a page reads the same size in every language; the system font's Latin is
   much smaller than its Hebrew). Variable weight. The handwriting is nb-hand (notebook.css). */
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/rubik-v31-hebrew.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/rubik-v31-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/rubik-v31-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/rubik-v31-latin.woff2") format("woff2");
  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;
}
html body { font-family: "Rubik", ui-sans-serif, system-ui, sans-serif; }

/* Math is always left to right, in every language: KaTeX lays a formula out as a row of spans, and
   in a right-to-left paragraph the browser would reverse them (3:5=⅗ read as ⅗=5:3). Isolated, a
   formula is one left-to-right piece of the sentence. */
/* A formula too long for its line goes on to the next only after an "=" (render-passthrough.html).
   As an inline block it wraps inside itself: a short one sits in the sentence as before, a long one
   takes lines of its own, left-aligned and read left to right, in every language; a list of formulas
   only runs left to right too (assets/js/math-lists.js). */
.katex { direction: ltr; unicode-bidi: isolate; display: inline-block; max-width: 100%; text-align: left; }
/* its parts in a wrapping row, so the formula's first line is the one that sits on the sentence's
   line (an inline block would sit on its last): a list's bullet stays beside the start */
:not(.katex-display) > .katex > .katex-html { display: inline-flex; flex-wrap: wrap; align-items: baseline; }
/* math in a sentence the size of the text (KaTeX draws it 1.21 times larger): with the display style's full-size
   fractions, a fraction was nearly three lines of text tall and crossed a box's top edge (owner, 2026-11-03) */
:not(.katex-display) > .katex { font-size: 1em; }
/* room on both sides of a formula in a sentence: a word's space beside an inline block read as none ("$a$ כי $b$",
   "$0.35$, $\frac{3}{5}$" – owner, 2026-11-18) */
/* more before it (in reading order) than after, so a comma or a full stop still hugs it; KaTeX's own direction is LTR,
   so the page's is read from :dir() */
:is(p, li, td, th) > .katex:dir(ltr) { margin-left: 0.25em; margin-right: 0.08em; }
/* two formulas with only a short word or a comma between them get more room facing each other (math-gaps.js) */
:is(p, li, td, th) > .katex.math-gap-after:dir(rtl) { margin-left: 0.6em; }
:is(p, li, td, th) > .katex.math-gap-after:dir(ltr) { margin-right: 0.6em; }
:is(p, li, td, th) > .katex.math-gap-before:dir(rtl) { margin-right: 0.6em; }
:is(p, li, td, th) > .katex.math-gap-before:dir(ltr) { margin-left: 0.6em; }
/* in an RTL sentence the punctuation after a formula lands at its left – beside the formula's first symbol, not its
   last – so there it stands apart on both sides: "$AB=6$, $AD=8$" had read "AD = 8 ,AB = 6", pairing 8 with AB
   (owner, 2026-11-18) */
:is(p, li, td, th) > .katex:dir(rtl) { margin-right: 0.25em; margin-left: 0.22em; }
/* a formula in a sentence holds together like a word: thin spaces round "=", "<" … (KaTeX's thick space, 0.2778em)
   and round "+", "−" … (its medium space, 0.2222em), so the gap between two formulas is wider than any inside one */
:is(p, li, td, th) > .katex .mspace[style*="margin-right:0.2778em"] { margin-right: 0.17em !important; }
:is(p, li, td, th) > .katex .mspace[style*="margin-right:0.2222em"] { margin-right: 0.14em !important; }
/* a formula taller than a line of text – a fraction, an integral's limits, |…| round a fraction: render-passthrough.html
   puts KaTeX's measure on it, --m-u above the baseline and --m-d below (in em; its ink rises a little past them). Outside
   the paper, room above and below it. A side note's text is no paragraph, so its formulas are named too. Only math in a
   sentence – a drawing's labels keep their places.
   On the page's paper a row – the space between two rules – is two squares, as in a squared notebook: a fraction
   (render-passthrough.html sets it close to its bar, 1.5em) stays inside the rules, raised only as far as its
   denominator must go to clear the rule, so it stays level with the words beside it (owner, 2026-11-22: centred on the
   middle line, it floated over its words). Its line keeps its height. A formula taller than a row gets whole rows above its
   line and is centred in them; it never reaches past a rule (owner, 2026-11-17: fractions climbed on each other). */
:is(p, li, .nb-note) > .katex[style*="--m-u"] { padding-block: max(0px, calc(var(--m-u) + 0.15em - 0.95em)) max(0px, calc(var(--m-d) + 0.1em - 0.3em)); }
.nb-box :is(p, li) > .katex[style*="--m-u"] {
  --above: calc(0.5 * var(--nb-line) + 0.34em); --below: calc(0.5 * var(--nb-line) - 0.34em);   /* the line box round the baseline (Rubik: 0.34em under the middle) */
  --band: max(var(--nb-line), round(up, var(--m-u) + var(--m-d) + 0.25em, var(--nb-line)));     /* whole rows */
  padding-block: 0;
  margin-top: calc(var(--above) + var(--band) - var(--nb-line) - var(--m-u));   /* rows above the line for a tall one */
  margin-bottom: calc(var(--below) - var(--m-d));
  /* raised only as far as its foot must go to clear the rule by a thin gap (0.2em), so it stays level with the words beside it */
  position: relative;
  top: calc(-1 * max(0px, var(--above) + var(--m-d) + 0.2em - var(--nb-rule-at) * var(--nb-line)));
}
/* a formula wider than its column (assets/js/long-math.js): it slides sideways, the side hiding more of it fading out */
.katex.st-slide { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; vertical-align: middle; padding-block: 0.15em; }
.katex.st-slide::-webkit-scrollbar { display: none; }
.katex.st-slide[data-more="end"] { mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent); }
.katex.st-slide[data-more="start"] { mask-image: linear-gradient(to left, #000 calc(100% - 2rem), transparent); }
.katex.st-slide[data-more="both"] { mask-image: linear-gradient(to right, transparent, #000 2rem, #000 calc(100% - 2rem), transparent); }

/* ---------- Navbar (layouts/_partials/navbar.html) ----------
   The same in every language: the logo at the left, the menu centred, the accessibility menu and
   the language chooser at the right. Physical sides here on purpose (the navbar row is
   dir="ltr"); everywhere else start/end. The outer groups share the rest equally, so the middle
   one is centred. */
.st-nav-start, .st-nav-end { flex: 1 1 0; display: flex; align-items: center; }
.st-nav-end { justify-content: flex-end; }
/* the logo is Neta: in dark theme the same picture, framed in white (owner, 2026-11-07) */
html.dark .st-logo { background: #fff; border-radius: 0.5rem; padding: 2px; }
/* her large picture on the blog's pages (_partials/post-neta.html): at the left in every language, like the logo; a phone: above the title */
.st-post-neta { float: left; width: 200px; height: auto; margin: 0.5rem 1.5rem 1rem 0; }
html.dark .st-post-neta { background: #fff; border-radius: 1rem; padding: 0.5rem; }
@media (max-width: 40rem) { .st-post-neta { float: none; display: block; width: 140px; margin: 0 auto 0.75rem 0; } }

/* Search dialog: the theme centres it with left: 50% + translateX(-50%), but in RTL the
   browser's dialog default (inset-inline-start: 0 = right: 0) wins and pushes it off-screen */
.hextra-search-dialog { right: auto; }

/* The side menu's folders: the name opens the folder's page, the arrow – a button of its own, on a soft tile –
   opens and closes it in place (_partials/sidebar.html; on a phone a finger-sized one, below). The name keeps clear of it. */
.hextra-sidebar-container .hextra-sidebar-collapsible-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  background: var(--pt-tile-soft);
}
.hextra-sidebar-container .hextra-sidebar-collapsible-button:hover { background: #d6e4f7; }
html.dark .hextra-sidebar-container .hextra-sidebar-collapsible-button:hover { background: rgba(143, 178, 240, 0.22); }
.hextra-sidebar-container .hextra-sidebar-collapsible-button svg { height: 20px; min-width: 20px; }
.hextra-sidebar-container .hextra-sidebar-collapsible-button svg:hover { background: none; }
.hextra-sidebar-container .hextra-sidebar-item:has(> button) > a { padding-inline-end: 2.75rem; }
/* The arrow at the start of its row, before the name (in Hebrew at the right), and every name that opens a page – or
   a list, Help – on a faint tile, so it is seen to be clickable (owner, 2026-11-23). Every name in the tree starts after
   the arrow's column, a leaf's too, so names under one another line up. */
.hextra-sidebar-container .hextra-sidebar-collapsible-button { left: auto; right: auto; inset-inline-start: 0.125rem; }
.hextra-sidebar-container .hextra-sidebar-item > a,
.hextra-sidebar-container .hextra-sidebar-item > span,
.hextra-sidebar-container .hextra-sidebar-item:has(> button) > a { padding-left: 0.5rem; padding-right: 0.5rem; padding-inline-start: 2.5rem; }
.hextra-sidebar-container .hextra-sidebar-item > a:not(.hextra-sidebar-active-item),
.hextra-sidebar-container .hextra-sidebar-item > span {
  background: color-mix(in srgb, var(--pt-tile-soft) 55%, transparent);
}
.hextra-sidebar-container .hextra-sidebar-item > a:not(.hextra-sidebar-active-item):hover,
.hextra-sidebar-container .hextra-sidebar-item > span:hover { background: var(--pt-tile-soft); }
.hextra-sidebar-container .hextra-sidebar-item + *, .hextra-sidebar-container li + li { margin-top: 2px; }
/* Each level of the tree is moved toward the end by a row's height (--st-menu-row; a phone's rows are taller) and keeps
   its width, so a folder is a row's height shorter than what is in it at the end, and indented as much at the start;
   the line down its contents is centred in that indent (owner, 2026-11-19). The top level leaves room at its end for
   the deepest one: Math › Grades 4–6 › Grade 5 › a course, three levels down. */
.hextra-sidebar-container { --st-menu-row: 2rem; }
/* the menu on a desktop is wider than the theme's 16rem, for those levels (owner, 2026-11-19) */
@media (min-width: 768px) { .hextra-sidebar-container.hx\:md\:w-64 { width: 20rem; } }
.hextra-sidebar-container .hextra-scrollbar > ul { padding-inline-end: calc(3 * var(--st-menu-row)); }
.hextra-sidebar-container .hextra-sidebar-children { margin-inline-end: calc(-1 * var(--st-menu-row)); }
.hextra-sidebar-container .hextra-sidebar-children > ul {
  margin-inline: 0;
  padding-inline: var(--st-menu-row) 0;
}
.hextra-sidebar-container .hextra-sidebar-children > ul::before {
  left: auto;
  right: auto;
  inset-inline-start: calc(var(--st-menu-row) / 2);
}

/* ---------- Phones: logo row on top (scrolls away), navigation bar at the bottom ---------- */
.st-tabbar { display: none; }
@media (max-width: 767px) {
  :root { --st-tabbar-height: 3rem; }   /* owner, 2026-11-04: 3.75rem looked very high */
  /* the top row keeps only the logo and the site name, and is no longer sticky */
  .hextra-nav-container { position: relative; }
  .st-nav-center { display: none; }   /* the menu is in the bar */
  .hextra-sidebar-container > [data-toggle-animation] { display: none; }   /* the language chooser is in the top row, not in the menu panel */

  .st-tabbar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    height: calc(var(--st-tabbar-height) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff;
    border-top: 1px solid #e3e9f2;
    box-shadow: 0 -4px 16px -8px rgba(30, 58, 110, 0.25);
  }
  html.dark .st-tabbar { background: #111; border-color: #2a2a2a; }
  .st-tab {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    min-width: 0;
    padding: 0.2rem 0.1rem;
    border: 0;
    background: none;
    color: var(--pt-muted);
    font: inherit;
    font-weight: 500;
    line-height: 1.1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .st-tab svg { width: 1.3rem; height: 1.3rem; }
  .st-tab[aria-current="page"],
  .st-tab[aria-expanded="true"] { color: var(--pt-tile); font-weight: 700; }
  .st-tab[aria-current="page"] svg,
  .st-tab[aria-expanded="true"] svg { color: var(--pt-accent); }
  .st-tab:active { background: var(--pt-tile-soft); }

  /* an entry's list (Help): a small panel rising from the bar above its button */
  .st-tab-group { position: relative; flex: 1 1 0; display: flex; min-width: 0; }
  .st-tab-pop {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    right: 0;
    z-index: 31;
    min-width: 13rem;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    background: #fff;
    border: 1px solid #e3e9f2;
    border-radius: 0.9rem;
    box-shadow: 0 -10px 30px -10px rgba(30, 58, 110, 0.35);
  }
  .st-tab-pop.st-tab-pop-right { right: auto; left: 0; }
  .st-tab-pop[hidden] { display: none; }
  html.dark .st-tab-pop { background: #111; border-color: #2a2a2a; }
  .st-tab-pop a {
    display: block;
    padding: 0.7rem 0.8rem;
    border-radius: 0.6rem;
    color: inherit;
    font-size: 1.05rem;
    text-decoration: none;
    white-space: nowrap;
  }
  .st-tab-pop a:active { background: var(--pt-tile-soft); }
  .st-tab-pop a[aria-current="page"] { color: var(--pt-tile); font-weight: 700; }

  /* room for the bar under the page */
  body { padding-bottom: calc(var(--st-tabbar-height) + env(safe-area-inset-bottom)); }

  /* The theme's menu drawer becomes a panel rising from the bar at the right, under the menu
     button, and reaching to the left – in every language */
  .hextra-sidebar-container {
    top: auto;
    bottom: calc(var(--st-tabbar-height) + env(safe-area-inset-bottom));
    inset-inline: auto;
    right: 0;
    z-index: 25;
    width: 100vw;   /* the whole width: it closes once a page is chosen (owner, 2026-11-19) */
    max-height: calc(100dvh - var(--st-tabbar-height) - env(safe-area-inset-bottom) - 3rem);
    padding-top: 0.5rem;
    border-top-left-radius: 1.25rem;
    box-shadow: 0 -10px 30px -10px rgba(30, 58, 110, 0.35);
    transform: translate3d(0, calc(100% + 5rem), 0) !important;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0.3s;
  }
  html.st-menu-open .hextra-sidebar-container {
    transform: none !important;
    visibility: visible;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .hextra-sidebar-container > .hextra-scrollbar { min-height: 0; }
  .st-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 24;
    background: rgba(30, 42, 59, 0.35);
  }
  .st-menu-backdrop[hidden] { display: none; }
  html.st-menu-open .side-tabs { display: none; }   /* the side rail's tabs would lie over the full-width menu */

  .hextra-sidebar-container { --st-menu-row: 2.75rem; }
  /* larger text in the menu */
  .hextra-sidebar-container .hextra-sidebar-item > a,
  .hextra-sidebar-container .hextra-sidebar-item > span,
  .hextra-sidebar-container li > a { font-size: 1.05rem; padding-block: 0.5rem; }
  /* open/close arrows: a finger-sized (44px) tap target, the link text keeps clear of it */
  .hextra-sidebar-container .hextra-sidebar-collapsible-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    inset-inline-start: 0;
    border-radius: 0.5rem;
  }
  .hextra-sidebar-container .hextra-sidebar-collapsible-button:active { background: var(--pt-tile-soft); }
  .hextra-sidebar-container .hextra-sidebar-collapsible-button svg { height: 24px; min-width: 24px; }
  .hextra-sidebar-container .hextra-sidebar-item > a,
  .hextra-sidebar-container .hextra-sidebar-item > span,
  .hextra-sidebar-container .hextra-sidebar-item:has(> button) > a { padding-left: 0.5rem; padding-right: 0.5rem; padding-inline-start: 3.25rem; }   /* clear of the arrow at the start */
  .st-tab { font-size: 0.72rem; }
}

/* ---------- Accessibility menu (layouts/_partials/a11y.html, assets/js/a11y.js; from portugalit.guide) ---------- */
.st-a11y { position: relative; display: flex; }
.st-a11y-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  color: var(--pt-tile);
  cursor: pointer;
}
.st-a11y-button:hover, .st-a11y-button[aria-expanded="true"] { background: var(--pt-tile-soft); }
.st-a11y-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.4rem);
  right: 0;   /* under the button, towards the page (the button is at the right in every language) */
  width: min(21rem, calc(100vw - 2rem));
  padding: 0.9rem;
  border: 1px solid #d5deeb;
  border-radius: 1rem;
  background: #fff;
  color: var(--pt-ink);
  box-shadow: 0 14px 36px -14px rgba(30, 58, 110, 0.5);
}
.st-a11y-panel[hidden] { display: none; }
html.dark .st-a11y-panel { background: #171717; border-color: #2a2a2a; color: #e5e7eb; }
.st-a11y-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.st-a11y-head h2 { font-size: 1.15rem; font-weight: 800; }
.st-a11y-close { display: inline-flex; padding: 0.4rem; border-radius: 999px; cursor: pointer; }
.st-a11y-close:hover { background: var(--pt-tile-soft); }
.st-a11y-size {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.6rem;
  border-radius: 0.7rem;
  background: var(--pt-tile-soft);
}
.st-a11y-size span { flex: 1; font-weight: 600; }
.st-a11y-size output { min-width: 3.2rem; text-align: center; font-variant-numeric: tabular-nums; }
.st-a11y-size button {
  width: 2.5rem;
  height: 2.5rem;
  border: 1.5px solid var(--pt-tile);
  border-radius: 0.6rem;
  background: #fff;
  color: var(--pt-tile);
  font-weight: 800;
  cursor: pointer;
}
html.dark .st-a11y-size button { background: transparent; }
.st-a11y-size button:disabled { opacity: 0.35; cursor: default; }
.st-a11y-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
.st-a11y-options button {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.6rem;
  border: 1.5px solid #d5deeb;
  border-radius: 0.7rem;
  text-align: start;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
}
html.dark .st-a11y-options button { border-color: #2a2a2a; }
.st-a11y-options button::before {   /* on/off mark */
  content: "";
  flex: none;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid currentColor;
  border-radius: 0.3rem;
  opacity: 0.6;
}
.st-a11y-options button:hover { border-color: var(--pt-tile); }
.st-a11y-options button[aria-pressed="true"] { border-color: var(--pt-tile); background: var(--pt-tile-soft); color: var(--pt-tile); font-weight: 700; }
.st-a11y-options button[aria-pressed="true"]::before {
  opacity: 1;
  background: var(--pt-tile) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100%;
  border-color: var(--pt-tile);
}
.st-a11y-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.75rem; }
.st-a11y-reset { padding: 0.35rem 0.9rem; border-radius: 999px; border: 1.5px solid var(--pt-accent); font-weight: 600; cursor: pointer; }
.st-a11y-reset:hover { background: var(--pt-accent-soft); }
.st-a11y-foot a { color: var(--pt-tile); text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- Site-wide settings (layouts/_partials/settings.html, assets/js/settings.js; owner, 2026-11-23) ---------- */
.st-settings { position: relative; display: flex; }
.st-settings-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  color: var(--pt-tile);
  cursor: pointer;
}
.st-settings-button:hover, .st-settings-button[aria-expanded="true"] { background: var(--pt-tile-soft); }
.st-settings-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.4rem);
  right: 0;   /* under the gear, towards the page (the gear is at the right edge in every language) */
  width: min(18rem, calc(100vw - 2rem));
  padding: 0.9rem;
  border: 1px solid #d5deeb;
  border-radius: 1rem;
  background: #fff;
  color: var(--pt-ink);
  box-shadow: 0 14px 36px -14px rgba(30, 58, 110, 0.5);
}
.st-settings-panel[hidden] { display: none; }
/* the settings in the phone's bottom bar (custom/footer.html; owner, 2026-11-26): the top row's gear gives way to a tab,
   and its panel rises from the bar at the right, as the menu's does; from 768px up only the gear is there */
.st-settings-bar { display: none; }
@media (max-width: 767px) {
  .st-nav-end .st-settings { display: none; }
  .st-tabbar .st-settings-bar { position: static; display: flex; flex: 1 1 0; min-width: 0; }
  .st-tabbar .st-settings-button { width: auto; height: auto; border-radius: 0; color: var(--pt-muted); }
  .st-tabbar .st-settings-button:hover { background: none; }
  .st-tabbar .st-settings-button[aria-expanded="true"] { color: var(--pt-tile); background: none; }
  .st-tabbar .st-settings-panel { top: auto; bottom: calc(100% + 0.4rem); right: 0.5rem; }
}
html.dark .st-settings-panel { background: #171717; border-color: #2a2a2a; color: #e5e7eb; }
.st-settings-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.st-settings-head h2 { font-size: 1.15rem; font-weight: 800; }
.st-settings-close { display: inline-flex; padding: 0.4rem; border-radius: 999px; cursor: pointer; }
.st-settings-close:hover { background: var(--pt-tile-soft); }
.st-settings-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.7rem;
  background: var(--pt-tile-soft);
  font-weight: 600;
  cursor: pointer;
}
.st-settings-row span { flex: 1; }
/* the colours: three choices side by side, the chosen one filled (settings.html; owner, 2026-11-26) */
.st-choice-row { flex-wrap: wrap; cursor: default; }
.st-choice { display: flex; border: 1.5px solid var(--pt-tile); border-radius: 999px; overflow: hidden; }
.st-choice button { padding: 0.2rem 0.65rem; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.st-choice button + button { border-inline-start: 1.5px solid var(--pt-tile); }
.st-choice button[aria-checked="true"] { background: var(--pt-tile); color: #fff; }
.st-settings-row + .st-settings-row { margin-top: 0.45rem; }
/* a switch: off at the left, on at the right, in every language (owner, 2026-11-23); the track filled when on */
.st-switch {
  position: relative;
  flex: none;
  width: 2.75rem;
  height: 1.5rem;
  border: 1.5px solid var(--pt-tile);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}
html.dark .st-switch { background: transparent; }
.st-switch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: var(--pt-tile);
  transform: translateY(-50%);
  transition: left 0.15s;
}
.st-switch[aria-checked="true"] { background: var(--pt-tile); }
.st-switch[aria-checked="true"]::after { left: calc(100% - 1.2rem); background: #fff; }

/* Keyboard focus is always visible (the theme hides it on some controls) */
:focus-visible { outline: 2px solid var(--pt-tile); outline-offset: 2px; }

/* Text size: the whole site is sized in rem, so it grows with the root font size */
html.a11y-size-1 { font-size: 112%; }
html.a11y-size-2 { font-size: 125%; }
html.a11y-size-3 { font-size: 140%; }
html.a11y-size-4 { font-size: 160%; }

/* High contrast: black on white (white on black in dark mode), darker blue and ochre */
html.a11y-contrast:not(.dark) {
  --pt-tile: #0a3378;
  --pt-tile-soft: #e3ecfa;
  --pt-accent: #7a4d00;
  --pt-accent-text: #6a4300;
  --pt-ink: #000;
  --pt-sand: #fff;
}
html.a11y-contrast.dark {
  --pt-tile: #bcd3ff;
  --pt-accent: #ffd27a;
  --pt-accent-text: #ffd27a;
}
html.a11y-contrast:not(.dark) body { background: #fff; color: #000; }
html.a11y-contrast.dark body { background: #000; color: #fff; }
html.a11y-contrast:not(.dark) :is([class*="text-gray"], [class*="text-neutral"], .st-tab) { color: #1a1a1a !important; }
html.a11y-contrast.dark :is([class*="text-gray"], [class*="text-neutral"], .st-tab) { color: #f0f0f0 !important; }
html.a11y-contrast:not(.dark) :is(table, th, td, .st-a11y-options button) { border-color: #444 !important; }
html.a11y-contrast.dark :is(table, th, td, .st-a11y-options button) { border-color: #bbb !important; }

/* Grayscale (on the root, where a filter doesn't move the fixed phone bar) */
html.a11y-gray { filter: grayscale(1); }

/* Links: underlined, and bold in the text */
html.a11y-links a:not(.st-tab):not(.st-nav-start a) { text-decoration: underline !important; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
html.a11y-links .content a { font-weight: 700; }

/* Readable font: one plain sans-serif everywhere */
html.a11y-font body, html.a11y-font body * { font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important; }

/* Text spacing */
html.a11y-spacing body { letter-spacing: 0.04em; word-spacing: 0.14em; }
html.a11y-spacing :is(p, li, td, th, dd, figcaption, blockquote) { line-height: 1.95 !important; }

/* Stop animations: the reader's choice in the accessibility menu – everything, a lesson's animations
   too. The device's "reduce motion" setting stops the rest, but not an animation's picture
   (animation.css): there the motion is the lesson, and it moves only when the reader presses ▶ or ›. */
html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after {
  animation-duration: 0s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0s !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  *:not(.anim-stage *), *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* The links at the foot of every page: privacy, accessibility */
.st-site-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding-block: 1.5rem 0; font-size: 0.875rem; }
.st-site-links a { text-decoration: underline; }

/* Recently visited (js/recent.js): under a page's title, where it is and the box last worked in */
.st-recent-where { display: block; font-size: 0.8em; opacity: 0.75; }
.hextra-sidebar-container .st-recent > .hextra-sidebar-item > span { min-width: 0; padding-inline-end: 0.5rem; }
.hextra-sidebar-container .st-recent > .hextra-sidebar-item > :is(.tool-bin, .tool-bin-ask) { margin-inline-end: calc(var(--st-menu-row) + 0.375rem); flex-shrink: 0; }
/* its question is wider than the row: it opens just under it, over the list's first entry */
.hextra-sidebar-container .st-recent > .hextra-sidebar-item > .tool-bin-ask {
  position: absolute; top: 100%; inset-inline-end: 0; z-index: 2; margin: 0.25rem 0 0; white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px var(--pt-accent), 0 4px 14px -6px rgba(30, 58, 110, 0.35);
}
html.dark .hextra-sidebar-container .st-recent > .hextra-sidebar-item > .tool-bin-ask { background: color-mix(in srgb, #f0bf55 10%, #111); }   /* solid: the list is under it */

/* The side menu's current page in the dark theme: the theme's blue is just under 4.5:1 on its tint */
html.dark .hextra-sidebar-active-item { color: #3aa5ec; }

/* A closed folder of the side menu: the theme only gives it no height (so Tab walked through its hidden links) and
   clips it; an open one may not be clipped – each level reaches a row's height past its folder's end (above) */
.hextra-sidebar-container li:not(.open) > .hextra-sidebar-children { display: none; }
.hextra-sidebar-container .hextra-sidebar-children { overflow: visible; }

/* Big cursor: black arrow, blue over links and buttons */
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 24 24'%3E%3Cpath d='M4 2l15 11.5-6.5.8 3.8 7.4-2.8 1.4-3.8-7.5L4 20z' fill='black' stroke='white' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") 8 4, auto !important;
}
html.a11y-cursor :is(a, button, summary, label, [role="button"]) , html.a11y-cursor :is(a, button, summary, label, [role="button"]) * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 11.5-6.5.8 3.8 7.4-2.8 1.4-3.8-7.5L4 20z' fill='%231f4fa3' stroke='white' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") 8 4, pointer !important;
}

/* Focus highlight: a thick, contrasting ring around whatever has the keyboard focus */
html.a11y-focus :focus, html.a11y-focus :focus-visible {
  outline: 3px solid var(--pt-accent) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 6px var(--pt-accent-soft) !important;
}

/* ---------- A course's pages (layouts/_partials/course.html) ----------
   Above the content: the course, page N of M, learn / practice. Below: previous and next, at the
   start and end sides – they follow the page's direction. */
.st-course-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; margin-bottom: 1.5rem; font-size: 0.9rem; color: var(--pt-muted); }
.st-course-head a { color: var(--pt-tile); font-weight: 600; }
.st-course-head a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
/* previous / next at the top: short, at the end of the row (the end side follows the page's direction) */
.st-course-steps { display: flex; gap: 0.4rem; margin-inline-start: auto; }
.st-course-steps a { text-decoration: none !important; padding: 0.15rem 0.7rem; border-radius: 999px; border: 1.5px solid rgba(128, 128, 128, 0.3); font-weight: 600; }
.st-course-steps a:hover { border-color: var(--pt-tile); background: var(--pt-tile-soft); text-decoration: none; }
.st-course-kind { padding: 0.1rem 0.65rem; border-radius: 999px; font-weight: 600; background: var(--pt-tile-soft); color: var(--pt-tile); }
.st-course-kind[data-kind="practice"] { background: var(--pt-accent-soft); color: var(--pt-ink); border: 1px solid var(--pt-accent); }
html.dark .st-course-kind[data-kind="practice"] { color: var(--pt-accent); }
.st-course-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(128, 128, 128, 0.25); }
.st-course-pager a { display: flex; flex-direction: column; gap: 0.15rem; max-width: 48%; padding: 0.6rem 1rem; border-radius: 0.6rem; border: 1.5px solid transparent; font-weight: 600; color: var(--pt-tile); }
.st-course-pager a:hover { border-color: var(--pt-tile); background: var(--pt-tile-soft); }
.st-course-pager a span { font-size: 0.85rem; font-weight: 400; color: var(--pt-muted); }
.st-course-next { margin-inline-start: auto; text-align: end; }
.st-course-prev span::before { content: "‹ "; }
.st-course-next span::after { content: " ›"; }
@media print { .st-course-pager, .st-course-steps { display: none; } }

/* ---------- Breadcrumbs (layouts/_partials/breadcrumb.html) ----------
   Home › Math › … › this page, above the title. They run in the page's direction and the arrows
   point the reading direction. A long crumb is cut with "…". Phones: the crumbs wrap, and the ones
   between home and the parent fold into a "…" button; the tap targets grow. */
.st-crumbs { margin: 0.25rem 0 0.5rem; font-size: 0.875rem; color: var(--pt-muted); }
.st-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.st-crumbs li { display: flex; align-items: center; min-width: 0; max-width: 100%; }
.st-crumbs a, .st-crumbs [aria-current], .st-crumbs button {
  display: block;
  min-width: 0;
  padding: 0.25rem 0.35rem;
  border-radius: 0.375rem;
  line-height: 1.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.st-crumbs li:not(:last-child) a { max-width: 16rem; }
.st-crumbs a { color: inherit; text-decoration: none; }
.st-crumbs a:hover, .st-crumbs button:hover { color: var(--pt-tile); background: var(--pt-tile-soft); }
.st-crumbs li:first-child a { display: flex; align-items: center; height: 2rem; }
.st-crumbs [aria-current] { font-weight: 600; color: var(--pt-ink); }
html.dark .st-crumbs [aria-current] { color: #f3f4f6; }
.st-crumbs button { border: 0; background: none; font: inherit; font-weight: 700; color: inherit; cursor: pointer; }
.st-crumb-sep { flex: none; opacity: 0.7; }
[dir="rtl"] .st-crumb-sep { transform: scaleX(-1); }
.st-crumbs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.st-crumbs li.st-crumbs-more { display: none; }
@media (max-width: 767px) {
  .st-crumbs li.st-crumbs-more { display: flex; }
  .st-crumbs:not(.st-crumbs-open) .st-crumbs-fold, .st-crumbs-open li.st-crumbs-more { display: none; }
  .st-crumbs li:not(:last-child) a { max-width: 11rem; }
  .st-crumbs a, .st-crumbs [aria-current], .st-crumbs button { padding-block: 0.5rem; }   /* 2.5rem tall: a finger's tap */
  .st-crumbs li:first-child a { height: 2.5rem; padding-inline: 0.5rem; }
  .st-crumbs button { min-width: 2.5rem; }
}
@media print { .st-crumbs { display: none; } }

/* ---------- Number line (layouts/_shortcodes/number-line.html) ----------
   Math: always left to right, so physical sides. */
.st-numline { padding: 0.9rem 1.5rem 2.6rem; max-width: 40rem; }
/* a label two lines tall (a fraction): room for it under the line */
.st-numline:has(.st-numline-label .katex[style*="--m-u"]) { padding-bottom: 4rem; }
/* the axis box spans the first tick to the last (ticks placed by % of it); the line drawn (::before) runs 1rem past both
   ends – a line, not a segment (owner, 2026-11-19: "הוא ישר ולא קטע"); the padding above leaves room for it */
.st-numline-axis { position: relative; height: 2px; }
.st-numline-axis::before { content: ""; position: absolute; inset: 0 -1rem; background: currentColor; }
/* the arrow, always, at the right end – the numbers grow toward it (owner, 2026-11-24, P21): its tip just past the line's
   right end */
.st-numline-axis::after { content: ""; position: absolute; right: calc(-1rem - 10px); top: -5px; border: 6px solid transparent; border-left: 10px solid currentColor; }
.st-numline-tick { position: absolute; top: -6px; width: 2px; height: 14px; margin-left: -1px; background: currentColor; }
.st-numline-major { top: -9px; height: 20px; }
.st-numline-label { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 0.95rem; }
/* a point to read: a dot on the line, its name above it */
/* a part counted, lit as a step page plays the line (steppage.js play) */
.st-numline-run { position: absolute; top: -3px; height: 8px; border-radius: 4px; background: color-mix(in srgb, #e08a00 55%, transparent); }
.st-numline-point { position: absolute; top: -6px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: #e08a00; }
.st-numline-name { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); font-weight: 700; color: #b45309; }
/* a course page's intro: its first sentence, then a "Subjects ▾" line that opens the rest under it
   (_partials/course-intro.html) */
.st-course-intro > summary { display: grid; justify-items: start; gap: 0.2rem; cursor: pointer; list-style: none; margin-top: 1.25rem; }
.st-course-intro > summary::-webkit-details-marker { display: none; }
.st-intro-toggle { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; color: var(--pt-tile); }
.st-intro-toggle::after { content: "▾"; font-size: 1.35em; line-height: 1; transition: transform 0.2s; }
.st-course-intro[open] .st-intro-toggle::after { transform: rotate(180deg); }
.st-course-intro > summary:hover .st-intro-toggle { text-decoration: underline; }
.st-course-list { counter-reset: course; display: grid; gap: 0.6rem; margin-top: 1.5rem; }
.st-course-list li { counter-increment: course; }
.st-course-list a { display: grid; grid-template-columns: 2.2rem 1fr auto; align-items: center; gap: 0.2rem 0.75rem; padding: 0.7rem 1rem; border-radius: 0.7rem; border: 1.5px solid rgba(128, 128, 128, 0.25); }
.st-course-list a::before { content: counter(course); grid-row: span 2; font-size: 1.3rem; font-weight: 800; color: var(--pt-tile); text-align: center; }
.st-course-list a:hover { border-color: var(--pt-tile); background: var(--pt-tile-soft); }
.st-course-title { font-weight: 700; }
.st-course-desc { grid-column: 2 / 4; font-size: 0.9rem; color: var(--pt-muted); }

/* Dots for counting models in a lesson: <div class="st-dots">●●●<br>…</div>, a group marked with
   <span class="st-dots-mark"> */
.st-dots { direction: ltr; text-align: left; font-size: 1.25rem; letter-spacing: 0.35em; line-height: 1.6; color: var(--pt-muted); }
.st-dots-mark { color: var(--pt-tile); }
/* A coordinate system (_shortcodes/coordinates.html): always LTR, drawn in the text's colour */
.st-coords { padding: 0.5rem 0; }
.st-coords svg { display: block; width: 100%; height: auto; }
.st-coords-grid line { stroke: currentColor; stroke-opacity: 0.18; stroke-width: 1; }
.st-coords-axis line { stroke: currentColor; stroke-width: 1.6; }
.st-coords-axis path { fill: currentColor; }
.st-coords text { fill: currentColor; font-size: 11px; font-family: inherit; }
.st-coords .st-coords-name { font-style: italic; font-size: 13px; }
.st-coords-point { fill: var(--pt-tile); }
.st-coords .st-coords-label { font-size: 13px; font-weight: 700; fill: var(--pt-tile); paint-order: stroke; stroke: var(--nb-paper, var(--body-bg, #fff)); stroke-width: 3px; stroke-linejoin: round; }  /* a halo: a name stays readable over the grid and the axis numbers */
.st-coords-path { fill: none; stroke: var(--pt-tile); stroke-width: 2; }
.st-coords-curve { fill: none; stroke: var(--pt-tile); stroke-width: 2.2; stroke-linejoin: round; }
.st-coords-curve:not(.st-coords-curve-0) { stroke: var(--pt-accent); stroke-dasharray: 7 4; }

/* The phone menu (the theme's sidebar, custom/footer.html) lists sections and pages only: the theme
   would also list the current page's headings under it – a long explanation in the middle of the
   menu. The headings' links are the ones to #anchors. */
.hextra-sidebar-container ul:has(> li > a[href^="#"]) { display: none; }

/* The side rail: tabs at the right edge of the screen and the drawers they pull out – the practice
   tool's helpers (practice.js) and the formula pages (formula-page.js); one drawer is open at a time.
   On the right in every language, like the page's frame (math runs left to right); the text in them
   follows the page's direction. The tabs scroll when there are more than fit. */
.side-tabs {
  --side-drawer: min(26rem, 85vw);
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 60vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding-block: 0.25rem;
  transition: right 0.2s ease;
}
.side-tabs:not(:has(.side-tab:not([hidden]))) { display: none; }
/* while a tab shows, the page keeps clear of the rail: nothing it shows (the practice panel, the side menu, a line
   of text in a right-to-left page) lies under the tabs */
body:has(.side-tabs .side-tab:not([hidden])) { padding-right: 2.1rem; }
@media print { body:has(.side-tabs .side-tab:not([hidden])) { padding-right: 0; } }
.side-tab[hidden] { display: none; }
.side-drawer-open .side-tabs { right: var(--side-drawer); }
.side-tab {
  writing-mode: vertical-rl;
  max-height: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: none;
  padding: 0.6rem 0.35rem;
  border: 1px solid var(--pt-line, #d0d7de);
  border-right: 0;
  border-radius: 0.5rem 0 0 0.5rem;
  background: #fff8d6;
  color: #333;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: -1px 1px 3px rgb(0 0 0 / 0.12);
}
.side-tab[aria-expanded="true"] { background: #ffe98a; font-weight: 600; }
.side-drawer {
  position: fixed;
  right: 0;
  top: 4rem;
  bottom: calc(var(--st-tabbar-height, 0px) + env(safe-area-inset-bottom));   /* above the phone's menu bar */
  z-index: 26;
  width: min(26rem, 85vw);
  overflow-y: auto;
  padding: 0 1rem 1.5rem;
  background: #fffdf3;
  color: #222;
  border-left: 1px solid var(--pt-line, #d0d7de);
  box-shadow: -4px 0 12px rgb(0 0 0 / 0.15);
}
.side-drawer[hidden] { display: none; }
.side-drawer-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-block: 0.75rem 0.5rem;
  background: inherit;
  z-index: 1;   /* over KaTeX's positioned spans scrolling under it */
}
.side-drawer-title { flex: 1; margin: 0; font-size: 1.15rem; font-weight: 700; }
.side-drawer-close {
  border: 0;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
}
html.dark .side-drawer { background: #2a2820; color: #eee; }
html.dark .side-tab { background: #4a4425; color: #eee; }
html.dark .side-tab[aria-expanded="true"] { background: #6b6130; }
@media print { .side-tabs, .side-drawer { display: none !important; } }
/* a phone: the rail is at the left edge, in every language – the side menu is behind the menu button there, and
   the tabs lie over the paper's margin, kept empty on a phone (notebook.css) – so the page keeps no strip clear;
   a page with a sheet runs nearly to the screen's edges */
@media (max-width: 767px) {
  body:has(.side-tabs .side-tab:not([hidden])) { padding-right: 0; }
  .side-tabs { right: auto; left: 0; transition: left 0.2s ease; }
  .side-drawer-open .side-tabs { right: auto; left: var(--side-drawer); }
  .side-tab { padding: 0.5rem 0.15rem; font-size: 0.75rem; border-right: 1px solid var(--pt-line, #d0d7de); border-left: 0; border-radius: 0 0.5rem 0.5rem 0; box-shadow: 1px 1px 3px rgb(0 0 0 / 0.12); }
  .side-drawer { right: auto; left: 0; border-left: 0; border-right: 1px solid var(--pt-line, #d0d7de); box-shadow: 4px 0 12px rgb(0 0 0 / 0.15); }
  .side-drawer:not([hidden]) { animation: side-drawer-in 0.2s ease-out; }
  #content:has(.nb) { padding-inline: 0.5rem; }
}
@keyframes side-drawer-in { from { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .side-drawer:not([hidden]) { animation: none; } }


/* a category page: the line between one grade's courses and the next's (_shortcodes/courses.html) */
.content hr.st-grade-rule { margin: 1.5rem 0 0.5rem; border: 0; border-top: 1px solid rgba(128, 128, 128, 0.35); }

/* Squares in a grid, some shaded (_shortcodes/squares.html): a hundred square, a ratio's strip */
.st-squares { direction: ltr; text-align: left; margin: 0.4rem 0; }
.st-squares svg { max-width: 100%; height: auto; }
.st-squares rect { fill: transparent; stroke: var(--pt-muted); stroke-width: 1; }
.st-squares rect.st-sq-a { fill: var(--pt-tile); fill-opacity: 0.55; }
.st-squares rect.st-sq-b { fill: var(--pt-accent); fill-opacity: 0.6; }

/* A chart of data (_shortcodes/chart.html): bars or a line, drawn at build time; always LTR. */
.st-chart { --ch-1: #0f7f8a; --ch-2: #c77c00; --ch-3: #b0306a; --ch-4: #7a4fb0; --ch-5: #3f7f2a; --ch-6: #6b7280; direction: ltr; margin: 0.75rem 0; max-width: 36rem; }
html.dark .st-chart { --ch-1: #5fc7d0; --ch-2: #f2b55a; --ch-3: #f08ab8; --ch-4: #c9a0e6; --ch-5: #8fd07a; --ch-6: #b4bac4; }
.st-chart svg { width: 100%; height: auto; overflow: visible; }
.st-chart text { font-size: 14px; fill: currentColor; }
.st-chart .st-ch-num { font-size: 12px; fill: var(--pt-muted); }
.st-chart .st-ch-title { font-weight: 600; }
.st-ch-axis { stroke: currentColor; stroke-width: 1.2; }
.st-ch-grid { stroke: currentColor; stroke-opacity: 0.12; }
.st-ch-bar { fill-opacity: 0.8; }
polyline.st-ch-line { fill: none; stroke-width: 2.5; }
.st-ch-1 { fill: var(--ch-1); stroke: var(--ch-1); } .st-ch-2 { fill: var(--ch-2); stroke: var(--ch-2); }
.st-ch-3 { fill: var(--ch-3); stroke: var(--ch-3); } .st-ch-4 { fill: var(--ch-4); stroke: var(--ch-4); }
rect.st-ch-bar { stroke: none; }
.st-ch-5 { fill: var(--ch-5); stroke: var(--ch-5); } .st-ch-6 { fill: var(--ch-6); stroke: var(--ch-6); }
/* a pie's slices, parted by thin lines of the paper's colour; its key's percents in figures of one width */
.st-chart .st-ch-slice { stroke: var(--nb-paper, var(--pt-sand)); stroke-width: 2; stroke-linejoin: round; }
html.dark .st-chart .st-ch-slice { stroke: var(--nb-paper, #111); }
.st-chart-pie { max-width: 30rem; }
.st-chart .st-ch-pct { font-variant-numeric: tabular-nums; font-weight: 600; }
circle.st-ch-dot { stroke: none; }
/* a histogram's bars touch, parted by a thin line of the paper's colour */
rect.st-ch-hist { stroke: var(--nb-paper, var(--pt-sand)); stroke-width: 1.5; }
html.dark rect.st-ch-hist { stroke: var(--nb-paper, #111); }
/* a box plot: the box lightly filled, its median and whiskers in the box's colour */
rect.st-ch-box { fill-opacity: 0.22; stroke-width: 2; }
line.st-ch-whisker { stroke-width: 2; }
line.st-ch-median { stroke-width: 3.5; }
/* a normal curve: the bell, the shaded area under it, the lines at μ±σ, μ±2σ and the bands' percents */
polyline.st-ch-curve { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
polygon.st-ch-shade { fill-opacity: 0.3; stroke: none; }
.st-ch-sd { stroke: currentColor; stroke-opacity: 0.45; stroke-dasharray: 3 3; }
.st-chart .st-ch-band { font-size: 12px; }
/* a scatter diagram: the points, the regression line dashed through them, the means graph's squares joined */
line.st-ch-reg { stroke: var(--ch-3); stroke-width: 2.2; stroke-dasharray: 7 4; }
polyline.st-ch-means { fill: none; stroke: var(--ch-5); stroke-width: 2.2; }
rect.st-ch-mean { fill: var(--ch-5); stroke: none; }
.st-chart .st-ch-r { font-weight: 600; }
/* the drawing shrinks with its box (a page's box on a phone is ~230px): its words grow in the drawing's units */
.st-chart { container-type: inline-size; }
@container (max-width: 440px) { .st-chart text { font-size: 19px; } .st-chart .st-ch-num { font-size: 16px; } }
@container (max-width: 340px) { .st-chart text { font-size: 24px; } .st-chart .st-ch-num { font-size: 20px; } }
@container (max-width: 260px) { .st-chart text { font-size: 28px; } .st-chart .st-ch-num { font-size: 24px; } }

/* a program's plan (_shortcodes/program.html): a column a grade, a course a cell */
.content table.st-program { display: table; width: 100%; table-layout: fixed; }
.content table.st-program th, .content table.st-program td { vertical-align: top; text-align: start; padding: 0.5rem 0.75rem; }

/* the blog list's "read more" (layouts/blog/list.html), in the site's blue: the theme's fell short on contrast */
.st-blog-more { color: var(--pt-tile); }
/* the way on to the courses, under the post on the home page (layouts/hextra-home.html) */
.st-home-courses { margin-block-start: 2rem; font-size: 1.25rem; font-weight: 700; }
.st-home-courses a { color: var(--pt-tile); text-decoration: underline; text-underline-offset: 0.2em; }

/* {{< fraction-named >}}: a fraction with its parts named, as in the animation three-fifths */
.fr-named { display: inline-grid; grid-template-columns: auto auto; align-items: center; column-gap: 0.6rem; margin: 0.4rem 0; font-weight: 700; }
.fr-named .fr-n, .fr-named .fr-d { grid-column: 2; font-size: 2.6rem; line-height: 1.05; text-align: center; }
.fr-named .fr-n { color: var(--pt-tile); }
.fr-named .fr-d { color: var(--pt-accent); }
.fr-named .fr-bar { grid-column: 2; height: 0.3rem; border-radius: 999px; background: #059669; }
.fr-named .fr-name { grid-column: 1; text-align: end; font-size: 1rem; }
.fr-named .fr-name-n { color: var(--pt-tile); grid-row: 1; }
.fr-named .fr-name-d { color: var(--pt-accent); grid-row: 3; }
/* the bar's name, in the bar's green, "→" pointing at it (owner, 2026-11-19: "חסר בשרטוט כיתוב המצביע על קו השבר"); its line
   no taller than the bar, so the numerator stays close over the bar – the name spills into the rows' free space */
.fr-named .fr-name-bar { color: #047857; grid-row: 2; line-height: 0.3rem; white-space: nowrap; }
html.dark .fr-named .fr-name-bar { color: #34d399; }
/* the arrow after the words, to their right, toward the bar: a flex row, so Hebrew or Arabic words cannot carry it to their left */
.fr-named .fr-name-bar { display: flex; justify-content: flex-end; align-items: center; gap: 0.3rem; }
.fr-named .fr-name-bar::after { content: "→"; }
html.dark .fr-named .fr-bar { background: #10b981; }
.fr-named .fr-n { grid-row: 1; } .fr-named .fr-bar { grid-row: 2; } .fr-named .fr-d { grid-row: 3; }

/* the home page's post titles link to the posts' own addresses (layouts/hextra-home.html): headings, underlined only under the pointer */
.st-home-post { color: inherit; text-decoration: none; }
.st-home-post:hover, .st-home-post:focus-visible { text-decoration: underline; text-underline-offset: 0.2em; }
.st-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The 🗑 that asks first (tool-bin.js): since 2026-11-22 only the side menu's recent list has one – no tool does. Its
   question in its place – Yes in the red of what cannot be undone, No first to the keyboard */
.tool-bin {
  display: inline-grid; place-items: center; flex: none; width: 1.9rem; height: 1.9rem; padding: 0;
  border: 1.5px solid color-mix(in srgb, var(--pt-tile) 45%, transparent); border-radius: 8px;
  background: color-mix(in srgb, #fff 55%, transparent); font-size: 0.95rem; line-height: 1; cursor: pointer;
}
html.dark .tool-bin { background: color-mix(in srgb, #000 30%, transparent); }
@media (hover: hover) { .tool-bin:hover { background: var(--pt-tile-soft); } }
.tool-bin-ask {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; padding: 0.15rem 0.2rem 0.15rem 0.6rem;
  padding-inline: 0.6rem 0.2rem; border-radius: 999px; background: var(--pt-accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--pt-accent); font-size: 0.9rem;
}
.tool-bin-q { font-weight: 700; }
.tool-bin-ask button { padding: 0.1rem 0.7rem; border: 1.5px solid color-mix(in srgb, currentColor 30%, transparent); border-radius: 999px; background: transparent; cursor: pointer; }
.tool-bin-ask .tool-bin-yes { border-color: #dc2626; background: #dc2626; color: #fff; }
html.dark .tool-bin-ask .tool-bin-yes { color: #111; }

/* ---------- The account button (layouts/_partials/account.html, assets/js/account.js, docs/auth.md) ----------
   Shown only to someone signed in: html.st-signed-in is set before the page paints, so its place is kept from the start. */
.st-account { display: none; }   /* no position: the panel hangs from the right group (.st-nav-end), so it stays on a phone's screen */
.st-nav-end { position: relative; }
/* a phone: with the account button the right group holds five buttons, more than half the row – the logo and the
   site name keep their own width, the buttons take the rest with no gaps, the row's sides are narrower, and below
   400px the 44px buttons become 40px; so nothing overlaps the site name down to a 360px screen (owner, 2026-11-26) */
@media (max-width: 767px) {
  .st-nav-start { flex: 0 0 auto; }
  .st-nav-end { flex: 1 1 auto; min-width: 0; gap: 0; }
  .hextra-nav-container .hextra-max-navbar-width { padding-inline: 0.75rem; }
}
@media (max-width: 400px) {
  .st-a11y-button, .st-settings-button, .st-account-button { width: 2.5rem; height: 2.5rem; }
}
html.st-signed-in .st-account, .st-account.st-account-open { display: flex; }
html:not(.st-signed-in) .st-account-in, html.st-signed-in .st-account-signin { display: none; }   /* signed out: only the sign-in */
html:not(.st-signed-in) .st-account-dot { display: none; }
.st-account-signin a { display: inline-block; text-decoration: none; }
.st-account-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  color: var(--pt-tile);
  cursor: pointer;
}
.st-account-button:hover, .st-account-button[aria-expanded="true"] { background: var(--pt-tile-soft); }
/* the sign that someone is signed in: a green dot on the icon's lower right */
.st-account-dot {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 2px #fff;
}
html.dark .st-account-dot { box-shadow: 0 0 0 2px #111; }
.st-account-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.4rem);
  right: 0;   /* under the right group's end, towards the page (the group is at the right edge in every language) */
  width: min(18rem, calc(100vw - 2rem));
  padding: 0.9rem;
  border: 1px solid #d5deeb;
  border-radius: 1rem;
  background: #fff;
  color: var(--pt-ink);
  box-shadow: 0 14px 36px -14px rgba(30, 58, 110, 0.5);
}
.st-account-panel[hidden] { display: none; }
html.dark .st-account-panel { background: #171717; border-color: #2a2a2a; color: #e5e7eb; }
.st-account-label { font-size: 0.9rem; opacity: 0.75; }
.st-account-email { margin-bottom: 0.75rem; font-weight: 600; overflow-wrap: anywhere; text-align: start; }
.st-account-panel[dir="rtl"] .st-account-email { text-align: right; }
.st-account-page { margin-bottom: 0.75rem; }
.st-account-page a { text-decoration: underline; }
.st-account-logout { padding: 0.35rem 0.9rem; border-radius: 999px; border: 1.5px solid var(--pt-accent); font-weight: 600; cursor: pointer; }
.st-account-logout:hover { background: var(--pt-accent-soft); }
.st-account-error { margin-top: 0.5rem; font-size: 0.9rem; }

/* a link to a lesson this reader cannot open (assets/js/access.js; docs/backend/functional.md, "Paid content"): a lock
   after its words, named by its title and aria-label, so a click never meets a wall unannounced */
.st-lock {
  display: inline-block; width: 0.85em; height: 0.85em; margin-inline-start: 0.3em; vertical-align: -0.05em;
  background-color: currentColor; opacity: 0.7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1zm2 0h6V7a3 3 0 0 0-6 0v3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1zm2 0h6V7a3 3 0 0 0-6 0v3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
