/* Mishnah Max — the free reader (/learn/), and the live sentence on the home
   page. Loaded after site.css and built on its palette and type. The rule the
   app keeps: a mishnah is read on flat white paper ("scripture never sits on a
   sky"); the lists around it — the whole Mishnah, a tractate, the concepts —
   sit on the dawn backdrop like the app's hub screens. One mishnah to a page,
   one sentence to a block. */

.reader { background: var(--paper); }
/* Hub pages: the library, a tractate, the concepts. */
.reader:has(.library),
.reader:has(.tractate) {
  background:
    radial-gradient(ellipse 80% 45% at 50% 100%, rgba(201, 161, 58, 0.16), rgba(201, 161, 58, 0) 70%) fixed,
    linear-gradient(180deg, var(--sky) 0%, var(--blush) 55%, var(--paper) 100%) fixed;
}
.reader__main { padding: calc(var(--header-h) + 32px) var(--gutter) 88px; }

.mishnah,
.tractate { max-width: 760px; margin: 0 auto; }
.library { max-width: 1080px; margin: 0 auto; }

.reader h1 { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.08; margin: 14px 0 12px; font-weight: 500; }
[dir="rtl"] .reader h1,
.reader [dir="rtl"] h1 { line-height: 1.2; }
.reader h2 { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; margin: 0; font-weight: 500; }
.reader [lang="he"] { font-family: var(--hebrew); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 26px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-500);
}
.crumbs a { padding: 6px 0; text-decoration: none; }
.crumbs a:hover { color: var(--wine); }
.crumbs [aria-current] { color: var(--ink-900); }
.crumbs__sep { opacity: 0.6; }
.crumbs__sep::before { content: "›"; }
[dir="rtl"] .crumbs__sep::before { content: "‹"; }

.mishnah__head { margin-bottom: 12px; }
.mishnah__head .eyebrow { flex-wrap: wrap; }
/* A mishnah's heading is its reference and its title together (search
   engines read the h1); the reference keeps the eyebrow's look above it. */
.reader h1.mishnah__h1 { margin-top: 0; }
.mishnah__h1 .eyebrow { margin-bottom: 14px; line-height: 1.4; }
.mishnah__title { display: block; }
.mishnah__he-name,
.tractate__he,
.seder__he,
.perek__he,
.siman-section__he { margin-left: 14px; font-weight: 400; letter-spacing: 0; color: var(--ink-500); }
/* The names are dir="rtl", so their own inline-start is the right edge: the gap is set per page direction. */
[dir="rtl"] :is(.mishnah__he-name, .tractate__he, .seder__he, .perek__he, .siman-section__he) { margin-left: 0; margin-right: 14px; }
.mishnah__he-name { font-size: 19px; }
.how { margin-top: 14px; font-family: var(--sans); font-size: 15px; color: var(--ink-500); }
/* Hebrew has no italic. */
[dir="rtl"] :is(.how, .unit__hint, .perek__gloss, .pop__translit, .mishnah__shape) { font-style: normal; }

/* --- a sentence ----------------------------------------------------------- */

.units { margin: 0; padding: 0; list-style: none; }
.unit { padding: 34px 0 30px; border-top: 1px solid var(--rule); }

/* The reader's header for a sentence: its number in a wine tile, its step. */
.unit__label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px !important;
  font-size: 21px !important;
  line-height: 1.3;
  color: var(--ink-900);
}
.unit__n {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(180deg, var(--wine-2), var(--wine));
  color: var(--paper);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1;
  box-shadow: 0 6px 14px -6px rgba(92, 35, 24, 0.55);
}
[dir="rtl"] .unit__n { font-family: var(--hebrew); font-size: 19px; }
.unit__hint { margin: 0 0 18px; font-size: 17px; font-style: italic; line-height: 1.5; color: var(--ink-500); }

.unit__he {
  margin: 0;
  font-size: clamp(27px, 3.6vw, 34px);
  line-height: 1.95;
  color: var(--ink-900);
  text-align: start;
}
.w,
.pn { border-radius: 6px; transition: background-color 0.15s, color 0.15s, box-shadow 0.15s; }
.w { padding: 2px 1px; }
.w[data-g] { cursor: pointer; }
.w[data-g]:hover { background: var(--card); }
/* Lit and open outrank hover, or pointing at the open word hides it. The
   app lights a phrase in beige with a gold line under it. */
.w.lit,
.pn.lit,
.w[data-g].lit:hover { background: var(--lit); box-shadow: inset 0 -2px 0 var(--lit-line); }
.w[data-g].is-open,
.w[data-g].is-open:hover { background: var(--wine); color: var(--cream); box-shadow: none; }
/* Keyboard focus on a word or phrase (one Tab stop a sentence, arrows within). */
.w[data-g]:focus-visible,
.unit__en b[data-h]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* Heard, not seen: what a lit phrase lights, for screen readers. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.unit__en { margin: 18px 0 0; font-size: 20px; line-height: 1.68; color: var(--ink-700); }
.unit__en b { font-weight: 650; color: var(--ink-900); }
.unit__en b[data-h] {
  cursor: pointer;
  border-radius: 4px;
  text-decoration: underline dotted rgba(92, 35, 24, 0.45);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
  transition: background-color 0.15s, box-shadow 0.15s;
}
.unit__en b[data-h]:hover,
.unit__en b.lit { background: var(--lit); box-shadow: inset 0 -2px 0 var(--lit-line); text-decoration-color: transparent; }

.unit__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.unit__chips-label {
  margin-inline-end: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.chip {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  min-height: 34px;
  padding: 5px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-900);
  font-family: var(--serif);
  font-size: 15px;
  line-height: normal;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(27, 23, 19, 0.05);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.chip:lang(he),
[dir="rtl"] .chip { font-family: var(--hebrew); font-size: 17px; }
.chip:hover { border-color: rgba(92, 35, 24, 0.4); }
.chip.is-open { background: var(--wine); border-color: var(--wine); color: var(--cream); }

.unit__notes { margin-top: 18px; }
.unit__notes summary {
  display: inline-block;
  padding: 8px 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-500);
  cursor: pointer;
  list-style: none;
}
.unit__notes summary:hover { color: var(--wine); }
.unit__notes summary::-webkit-details-marker { display: none; }
.unit__notes summary::after { content: " +"; }
.unit__notes[open] summary::after { content: " –"; }

.cnote {
  margin-top: 10px;
  padding: 18px 22px 20px;
  border: 1px solid var(--rule);
  border-inline-start: 3px solid var(--gold);
  border-radius: 14px;
  background: var(--card);
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink-700);
}
.cnote__phrase { margin-bottom: 8px; font-size: 22px; line-height: 1.6; color: var(--ink-900); text-align: start; }
.cnote p { margin: 0; }
.cnote p + p,
.cnote ul + p,
.summary p + p { margin-top: 12px; }
.cnote ul,
.summary ul { margin: 10px 0 0; padding-inline-start: 22px; }
.cnote li + li,
.summary li + li { margin-top: 8px; }
.cnote__src { margin-top: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--ink-500); }

/* The summary page's card: "In summary". */
.summary {
  margin-top: 12px;
  padding: 26px 28px 28px;
  border: 1px solid var(--rule);
  border-radius: 22px;
  background: var(--card);
  font-size: 18px;
  line-height: 1.64;
  color: var(--ink-700);
}
.summary h2 {
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-500);
}

/* --- the definition: the app's dark word bar --------------------------------- */

/* Night glass (site.css .glass--night): smoked, so the sentence behind stays
   faintly there and you keep your place; its one action is the cream pill. */
.pop {
  position: absolute;
  z-index: 60;
  width: min(340px, calc(100vw - 24px));
  padding: 18px 20px 18px;
  border-radius: 22px;
  background: rgba(36, 28, 22, 0.84);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  backdrop-filter: blur(22px) saturate(1.6);
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.16),
    0 0 0 0.5px rgba(255, 255, 255, 0.1),
    0 22px 44px -12px rgba(30, 12, 8, 0.5),
    0 2px 6px rgba(30, 12, 8, 0.2);
  color: rgba(244, 236, 218, 0.82);
}
.pop[hidden] { display: none; }
.pop p { margin: 0; }
.pop__word { font-family: var(--hebrew); font-size: 36px; line-height: 1.25; color: var(--gold-on-wine); text-align: left; }
[dir="rtl"] .pop__word { text-align: right; }
.pop__more {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: 14px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--cream);
  box-shadow: inset 0 1px 0 #fff, 0 6px 14px -8px rgba(0, 0, 0, 0.7);
  color: var(--wine-3);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s, scale 0.42s var(--spring);
}
.pop__more:hover { background: #FFF8EA; color: var(--wine-3); }
.pop__more:active { scale: 0.95; }
.pop__translit { margin-top: 2px !important; font-style: italic; font-size: 17px; color: rgba(244, 236, 218, 0.7); }
.pop__gloss { margin-top: 10px !important; font-size: 19px; line-height: 1.4; color: var(--cream); }
.pop__why { margin-top: 10px !important; font-size: 16px; line-height: 1.55; }
.pop__root { margin-top: 12px !important; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: rgba(244, 236, 218, 0.55); }
.pop__root span { font-family: var(--hebrew); font-size: 17px; letter-spacing: 0.04em; color: var(--cream); }

/* --- getting around --------------------------------------------------------- */

.pager { display: flex; gap: 14px; margin-top: 36px; }
.pager__link {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--paper);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pager__link.is-empty { border-color: transparent; background: none; }
.pager__link--next { align-items: flex-end; text-align: end; }
/* "Next" is the app's wine button. */
a.pager__link--next { background: linear-gradient(180deg, var(--wine-2), var(--wine)); border-color: transparent; }
a.pager__link--next .pager__dir { color: rgba(244, 236, 218, 0.7); }
a.pager__link--next .pager__ref { color: var(--cream); }
a.pager__link:hover { box-shadow: var(--shadow-soft); }
a.pager__link--prev:hover { border-color: rgba(92, 35, 24, 0.35); }
.pager__dir { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--wine); }
.pager__ref { font-size: 18px; color: var(--ink-900); }

/* The reading capsule (reader.py's readbar): one glass capsule that floats
   at the foot of the window while the mishnah is on screen and settles at its
   end. The way back (a symbol) and the tools (reader.ts: Watch, Ask,
   Bookmark, Learned) sit on the glass with the lens under the one pointed
   at; the way on is the wine pill. */
.readbar {
  position: sticky;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  display: flex;
  justify-content: center;
  margin-top: 36px;
  pointer-events: none;
}
.readbar__bar { display: flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px; border-radius: 999px; pointer-events: auto; }
.readbar__list { position: relative; display: flex; align-items: center; gap: 2px; min-width: 0; border-radius: 999px; }
.readbar__bar:not(:has(.readbar__prev, .readbar__tools:not([hidden]))) .readbar__list { display: none; }
.readbar__tools { display: flex; gap: 2px; }
.readbar__tools[hidden], .readbar__tool[hidden] { display: none; }
.readbar__prev, .readbar__tool {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 15px 0 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-700);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s, scale 0.42s var(--spring);
}
[dir="rtl"] .readbar__tool { padding: 0 12px 0 15px; }
.readbar__prev { width: 42px; padding: 0; }
.readbar__prev svg { width: 20px; height: 20px; transform: scaleX(var(--dir)); }
.readbar__tool > svg { flex: none; width: 18px; height: 18px; }
.readbar__label { font: inherit; }
.readbar__prev:hover, .readbar__tool:hover { color: var(--ink-900); }
.readbar__list:not(.has-lens) :is(.readbar__prev, .readbar__tool):hover { background: rgba(255, 255, 255, 0.75); }
:is(.readbar__prev, .readbar__tool, .readbar__next):active { scale: 0.94; transition-duration: 0.2s, 0.2s, 0.1s; }
:is(.readbar__prev, .readbar__tool, .readbar__next):focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
.readbar__next:focus-visible { outline-color: var(--gold); }
/* Bookmarked: a gold star. Learned: an olive check in its ring. */
.readbar__tool[aria-pressed="true"] { color: var(--ink-900); }
.readbar__tool[aria-pressed="true"] > svg { color: var(--gold); }
.readbar__check {
  display: grid;
  place-items: center;
  flex: none;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.6px var(--ink-300);
  color: transparent;
  transition: background-color 0.25s, color 0.2s, box-shadow 0.25s;
}
.readbar__check svg { width: 11px; height: 11px; }
.readbar__tool--learned[aria-pressed="true"] { color: #4A5A36; }
.readbar__tool--learned[aria-pressed="true"] .readbar__check { background: var(--olive); box-shadow: none; color: #fff; }
.readbar__next {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 18px 0 20px;
  border-radius: 999px;
  background: var(--wine);
  box-shadow: var(--wine-shadow);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.2s, scale 0.42s var(--spring);
}
[dir="rtl"] .readbar__next { padding: 0 20px 0 18px; }
.readbar__next:hover { background: var(--wine-2); color: var(--cream); }
/* The system face, as the tab names: a :lang() rule would make them serif. */
.readbar__next-label, .readbar__next-ref { font: inherit; }
.readbar__next-ref { font-variant-numeric: tabular-nums; }
.readbar__next-ref::before { content: "·"; margin-inline-end: 7px; opacity: 0.55; }
/* A hairline between the tools and the way on, when there are tools. */
.readbar__bar:has(.readbar__prev, .readbar__tools:not([hidden])) .readbar__next { margin-inline-start: 7px; }
.readbar__bar:has(.readbar__prev, .readbar__tools:not([hidden])) .readbar__next::before {
  content: "";
  position: absolute;
  inset-inline-start: -7px;
  top: 50%;
  width: 1px;
  height: 24px;
  margin-top: -12px;
  background: rgba(27, 23, 19, 0.12);
}
@media (max-width: 760px) {
  /* Where :has() isn't known the tab bar can't fold: the capsule floats above it. */
  .readbar { position: fixed; inset-inline: 12px; bottom: calc(82px + env(safe-area-inset-bottom, 0px)); margin: 0; }
  .readbar__tool .readbar__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .readbar__tool, [dir="rtl"] .readbar__tool { width: 42px; padding: 0; }
  /* Narrower than its tools, the row scrolls rather than spill. */
  .readbar__list { overflow-x: auto; scrollbar-width: none; }
  .readbar__list::-webkit-scrollbar { display: none; }
  .readbar__list :focus-visible { outline-offset: -2px; }
  .readbar__next, [dir="rtl"] .readbar__next { padding: 0 16px; }
  .readbar__next-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .readbar__next-ref::before { content: none; }
  /* The fold (app.css): the tab bar is one glass circle at the row's start
     and the capsule takes the rest of the row; opening the tabs (reader.js,
     .tabs-open) sends the capsule down out of the way. */
  body:has(.readbar) .readbar {
    inset-inline: 80px 12px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    justify-content: flex-end;
    transition: translate 0.45s var(--glide), opacity 0.25s;
  }
  body:has(.readbar) .readbar__bar { flex: 1; justify-content: space-between; min-width: 0; }
  .tabs-open .readbar { translate: 0 140%; opacity: 0; pointer-events: none; }
  .tabs-open .readbar__bar { pointer-events: none; }
}
@media (max-width: 400px) {
  /* Room for the tools: on the narrowest phones the way back is the crumbs. */
  .readbar__bar:has(.readbar__tools:not([hidden]) .readbar__tool:not([hidden])) .readbar__prev { display: none; }
}

/* The app's own invitation: the wine of the Welcome screen. */
.app-block {
  margin-top: 40px;
  padding: 30px 30px 32px;
  border-radius: 24px;
  background: radial-gradient(120% 80% at 85% 0%, rgba(214, 176, 84, 0.16), transparent 60%),
    linear-gradient(160deg, var(--wine-2), var(--wine-3));
  color: rgba(244, 236, 218, 0.86);
  font-size: 17px;
  line-height: 1.6;
}
.app-block p { margin: 0; }
.app-block__title { margin-bottom: 8px !important; font-size: 25px; line-height: 1.2; color: var(--cream); }
.app-block__more { margin-top: 10px !important; color: var(--gold-on-wine); }
.app-block .badge,
.app-block .button { margin-top: 20px; }
/* On the wine block the wine button would vanish: cream, like the story's Next. */
.app-block .button--wine { background: var(--cream); color: var(--wine-3); box-shadow: none; }
.app-block .button--wine:hover { background: #FFF8EA; }
.app-block .badge img { height: 48px; }

/* --- a tractate ------------------------------------------------------------- */

.tractate__he { font-size: 0.7em; }
.perek { margin-top: 44px; }
.perek__he { font-size: 0.9em; }
.perek__gloss { margin-top: 6px; font-size: 17px; font-style: italic; color: var(--ink-500); }
.perek__intro { margin-top: 8px; font-size: 17px; line-height: 1.6; color: var(--ink-700); }
.rows {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--rule);
  border-radius: 18px;
  overflow: hidden;
}
.rows > li + li { border-top: 1px solid var(--rule); }
.row {
  display: flex;
  gap: 18px;
  padding: 16px 18px;
  text-decoration: none;
  transition: background-color 0.15s;
}
.row:hover { background: var(--card); }
.row__n { flex: none; width: 3.4em; padding-top: 3px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; color: var(--wine); }
.row__text { display: flex; flex-direction: column; gap: 3px; }
.row__title { font-size: 19px; line-height: 1.3; color: var(--ink-900); }
.row__hint { font-size: 16px; line-height: 1.5; color: var(--ink-500); }

/* --- the whole Mishnah ------------------------------------------------------- */

.seder { margin-top: 52px; }
.seder__he { font-size: 0.9em; }
.seder__theme { margin-top: 6px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--wine); }
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 18px 20px 16px;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(27, 23, 19, 0.04);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.tile:hover { transform: translateY(-2px); border-color: rgba(92, 35, 24, 0.3); box-shadow: var(--shadow-soft); }
.tile__he { font-size: 27px; line-height: 1.35; color: var(--ink-900); text-align: start; }
.tile__name { font-size: 18px; color: var(--ink-900); }
.tile__count { margin-top: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-500); }

.site-footer__fine a { color: inherit; }

@media (max-width: 599px) {
  .reader__main { padding-top: calc(var(--header-h) + 16px); }
  .unit { padding: 26px 0 22px; }
  .unit__en { font-size: 18px; }
  .pager { flex-direction: column; }
  .pager__link--next { align-items: flex-start; text-align: start; }
  .pager__link.is-empty { display: none; }
  .summary,
  .app-block { padding: 22px 20px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .w, .pn, .unit__en b[data-h], .tile { transition: none; }
}

/* --- the question, diagrams ---------------------------------------------------- */

.mishnah__q {
  margin-top: 22px;
  padding: 16px 20px 18px;
  border: 1px solid var(--rule);
  border-inline-start: 3px solid var(--wine);
  border-radius: 14px;
  background: var(--card);
}
.mishnah__q p { margin: 0; }
.mishnah__q-label,
.unit__chips-label,
.row__siman-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wine);
}
[dir="rtl"] :is(.mishnah__q-label, .unit__chips-label, .row__siman-label, .unit__notes summary, .summary h2,
  .pager__dir, .seder__theme, .eyebrow, .scene__label) { font-family: var(--sans); letter-spacing: 0.02em; font-size: 14px; font-weight: 600; }
.mishnah__q-text { margin-top: 6px !important; font-size: 21px; line-height: 1.4; color: var(--ink-900); }
.mishnah__shape { margin-top: 8px !important; font-size: 16px; font-style: italic; color: var(--ink-500); }
.mishnah__chips { margin-top: 16px; }

/* "THE PICTURE": the app's white card around a sentence's steps. */
.scene {
  max-width: 460px;
  margin: 24px auto 4px;
  padding: 14px 14px 10px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--card);
}
.scene__label {
  display: block;
  margin: 2px 4px 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.scene__frame { display: block; width: 100%; height: 340px; border: 0; background: transparent; }
/* The picture's own words, folded under it (reader.py picture_words). */
.scene__words { margin: 4px 4px 0; border-top: 1px solid var(--rule); }
.scene__words summary {
  display: inline-block;
  padding: 10px 0 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-500);
  cursor: pointer;
  list-style: none;
}
.scene__words summary:hover { color: var(--wine); }
.scene__words summary::-webkit-details-marker { display: none; }
.scene__words summary::after { content: " +"; }
.scene__words[open] summary::after { content: " –"; }
.scene__words p, .scene__words ol { margin: 4px 0 10px; font-size: 16px; line-height: 1.55; color: var(--ink-700); }
.scene__words ol { padding-inline-start: 1.3em; }
.scene__words li + li { margin-top: 6px; }
[dir="rtl"] .scene__words summary { font-family: var(--sans); letter-spacing: 0.02em; font-size: 13px; font-weight: 600; text-transform: none; }
.live .scene { max-width: none; margin: 0; padding: 16px 16px 12px; box-shadow: var(--shadow-soft); }

/* --- siman ------------------------------------------------------------------ */

.siman-section {
  margin-top: 52px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gold);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wine);
}
[dir="rtl"] .siman-section { font-family: var(--hebrew); font-size: 20px; letter-spacing: 0; text-transform: none; }
.siman-section + .perek { margin-top: 20px; }
.siman-section__he { font-family: var(--hebrew); font-size: 17px; text-transform: none; }
.perek__theme { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 8px; font-size: 17px; color: var(--ink-700); }
.perek__theme [lang="he"] { color: var(--ink-500); }
.row__siman { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; font-size: 15px; color: var(--ink-700); }
.row__siman [lang="he"],
[dir="rtl"] .row__siman-word { font-family: var(--hebrew); font-size: 17px; }

/* --- concepts ----------------------------------------------------------------- */

.tile--concept { gap: 4px; }
.tile__short { font-size: 15px; line-height: 1.45; color: var(--ink-500); }
.concept__say { margin-bottom: 6px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; color: var(--ink-500); }
.concept__def { margin-top: 18px; font-size: 19px; line-height: 1.65; color: var(--ink-700); }
.concept__def p + p { margin-top: 12px; }
.row__n--ref { width: 11em; }
.row__n--day { width: 13em; }

/* The other spellings of a tractate's name, under its blurb. */
.tractate__aka { margin-top: 10px; font-family: var(--sans); font-size: 15px; color: var(--ink-500); }
.library__yomit { margin-top: 14px; font-family: var(--sans); font-size: 16px; }
.library__yomit a { color: var(--wine); text-decoration: none; font-weight: 600; }
.library__yomit a:hover { text-decoration: underline; }
.yomit__date:not(:empty)::before { content: " · "; }
.yomit__date { font-weight: 400; color: var(--ink-500); }
.about__start { margin-top: 36px; }
/* "How to learn Mishnah" under the tractates on /learn/ (reader.guide_html):
   prose at reading width on the hub's dawn backdrop. */
.library__how { margin-top: 6px; }
.guide { max-width: 760px; margin: 72px auto 0; scroll-margin-top: calc(var(--header-h) + 24px); }
.guide > .lede { margin-top: 10px; }
.guide__part { margin-top: 30px; }
.guide__part h3 { font-size: 21px; line-height: 1.3; font-weight: 600; margin: 0; }
.guide__part p { margin-top: 10px; font-size: 18px; line-height: 1.65; color: var(--ink-700); }
.guide__part a { color: var(--wine); }
/* The Android page (home.py android_page): the Play listing's panels in a
   strip that scrolls sideways, as the listing shows them. */
.android__get { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 22px 0 0; }
.android__get .badge img { height: 56px; }
.android__note, .android__other { margin: 10px 0 0; font-family: var(--sans); font-size: 14.5px; color: var(--ink-500); }
.android__other { margin-top: 18px; }
.android__shots {
  display: flex;
  gap: 14px;
  margin: 30px 0 34px;
  padding: 0 0 12px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.android__shots li { flex: none; scroll-snap-align: start; }
.android__shots img { display: block; height: 460px; width: auto; border-radius: 16px; box-shadow: 0 1px 2px rgba(27, 23, 19, 0.08), 0 10px 26px rgba(27, 23, 19, 0.1); }
@media (max-width: 760px) {
  .android__shots img { height: 380px; }
}


/* --- a perek page ------------------------------------------------------------ */

.perek h2 a { color: inherit; text-decoration: none; }
.perek h2 a:hover { color: var(--wine); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.perek-page h1 .perek__he { margin-left: 14px; font-size: 0.62em; font-weight: 400; color: var(--ink-500); }
[dir="rtl"] .perek-page h1 .perek__he { margin-left: 0; margin-right: 14px; }
.perek__lede { margin-top: 12px; }
.pmishnah { padding: 30px 0 26px; border-top: 1px solid var(--rule); }
.pmishnah:first-of-type { margin-top: 18px; }
.pmishnah__head { margin: 0 0 14px; font-size: 22px; line-height: 1.3; font-weight: 500; }
.pmishnah__head a { color: var(--ink-900); text-decoration: none; }
.pmishnah__head a:hover { color: var(--wine); }
.pmishnah__ref { margin-inline-end: 12px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; color: var(--wine); }
[dir="rtl"] .pmishnah__ref { font-family: var(--hebrew); font-size: 17px; letter-spacing: 0; }
.pmishnah__more { margin-top: 14px; font-family: var(--sans); font-size: 15px; }
.pmishnah__more a { color: var(--wine); text-decoration: none; font-weight: 600; }
.pmishnah__more a:hover { text-decoration: underline; }
[dir="rtl"] .row__n { font-family: var(--hebrew); font-size: 16px; letter-spacing: 0; }

@media (max-width: 599px) {
  .mishnah__q-text { font-size: 19px; }
  .row:has(.row__n--ref) { flex-direction: column; gap: 4px; }
  .row__n--ref { width: auto; }
  .scene { padding: 10px 8px 6px; }
}
