/* talmud.css - /mishnah/ and /talmud/ (builder B07). Reads jewish.css tokens. Layout of a text page: each line
   (tl-row) is its number, the text (Hebrew, then English) and a <details class="tl-com"> with the commentary;
   on wide screens with English the Hebrew and English sit side by side and an open commentary takes a third column. */

.tl-cards .jw-he { font-size: 1.05em; color: var(--jw-gold); margin-inline-start: .2em; }
.jw-block h2 small { font-family: system-ui, sans-serif; font-size: .8rem; font-weight: 400; margin-inline-start: .4em; }
.jw-block h2 a { color: inherit; text-decoration: none; }
.jw-block h2 a:hover { text-decoration: underline; }
.tl-small { font-size: .92rem; }
.tl-eds dd { margin-bottom: .5em; }

/* today's daf */
.tl-today { border: 1px solid var(--jw-line); background: var(--jw-soft); border-radius: var(--jw-radius); padding: 12px 16px; margin: 14px 0 6px; }
.tl-today p { margin: 0 0 4px; }
.tl-today-k { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--jw-gold); font-weight: 600; }
.tl-today-k small { text-transform: none; letter-spacing: 0; color: var(--jw-muted); font-weight: 400; margin-inline-start: .4em; }
.tl-today-v { font-family: var(--jw-serif); font-size: 1.35rem; }
.tl-today-q { color: var(--jw-muted); max-width: 70ch; }

/* tractate: daf grid and chapter lists */
.tl-legend { font-size: .85rem; }
.tl-sum-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--jw-gold); vertical-align: middle; }
.tl-dafgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.tl-dafgrid li { display: flex; align-items: center; gap: 4px; border: 1px solid var(--jw-line); border-radius: 8px; padding: 4px 6px; background: var(--jw-card); }
.tl-dn { flex: 1; font-variant-numeric: tabular-nums; font-size: .9rem; white-space: nowrap; }
.tl-dn .jw-he { font-size: .95em; color: var(--jw-muted); }
.tl-dafgrid a { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; border-radius: 6px; text-decoration: none; border: 1px solid var(--jw-line); font-size: .9rem; position: relative; }
.tl-dafgrid a:hover { border-color: var(--jw-accent); }
.tl-dafgrid a.tl-sum::after { content: ""; position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; border-radius: 50%; background: var(--jw-gold); }
.tl-chlist { margin: 0; padding-left: 1.4em; }
.tl-chlist li { margin: 0 0 .7em; }
.tl-chlist li > a { font-weight: 600; }
.tl-open { display: block; font-size: .95rem; }
.tl-open .jw-he { font-size: 1.05rem; line-height: 1.6; color: var(--jw-ink); }
.tl-open-en { display: block; color: var(--jw-muted); font-size: .88rem; }
.tl-orders { margin: 12px 0 4px; }
.tl-trow { padding: 10px 0; border-bottom: 1px solid var(--jw-line); }
.tl-trow:last-child { border-bottom: 0; }
.tl-trow h3 { margin: 0 0 2px; font-family: var(--jw-serif); font-size: 1.15rem; }
.tl-trow h3 a { text-decoration: none; }
.tl-trow p { margin: 0 0 6px; font-size: .88rem; }
.tl-chchips a { min-width: 34px; text-align: center; padding: 3px 8px; }

/* reading tools */
.tl-tools { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.jw-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tl-tools .jw-btn[aria-pressed="true"] { background: var(--jw-accent); border-color: var(--jw-accent); color: #fff; }

/* summary */
.tl-summary { border: 1px solid var(--jw-line); border-left: 4px solid var(--jw-gold); background: var(--jw-soft); border-radius: var(--jw-radius); padding: 14px 18px; }
.tl-summary > h2 { border-bottom: 0; margin-bottom: 6px; font-size: 1.1rem; color: var(--jw-gold); text-transform: uppercase; letter-spacing: .04em; font-family: system-ui, sans-serif; }
.tl-summary p { max-width: 75ch; line-height: 1.6; margin: 0 0 .7em; }
.tl-terms-h { font-size: .95rem; margin: 12px 0 4px; }
.tl-terms { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 8px; font-size: .92rem; }
.tl-terms dt { font-weight: 600; }
.tl-terms dd { margin: 0; color: var(--jw-muted); }
@media (max-width: 600px) { .tl-terms { grid-template-columns: 1fr; } .tl-terms dd { margin-bottom: 6px; } }

/* the text */
.tl-daf > h2 .jw-he { color: var(--jw-gold); font-size: .9em; }
.tl-row { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--jw-line); scroll-margin-top: 70px; }
.tl-row:target { background: var(--jw-soft); }
.tl-n { font-size: .75rem; color: var(--jw-muted); text-decoration: none; padding-top: .5em; font-variant-numeric: tabular-nums; }
.tl-mrow .tl-n { font-size: .72rem; }
.tl-line { min-width: 0; }
.tl-he { font-family: var(--jw-hebrew); font-size: 1.3rem; line-height: 1.85; text-align: right; margin: 0; unicode-bidi: isolate; }
.tl-he big { font-size: 1.12em; }
.tl-en { margin: .4em 0 0; line-height: 1.6; font-size: 1rem; max-width: 75ch; }
.tl-en sup, .tl-he sup { font-size: .7em; color: var(--jw-accent-ink); }
.tl-com { grid-column: 2; min-width: 0; font-size: .95rem; }
.tl-com > summary { cursor: pointer; color: var(--jw-accent-ink); font-size: .85rem; padding: 2px 0; width: max-content; }
.tl-com[open] > summary { margin-bottom: 4px; }
.tl-com .tl-rashi, .tl-com .tl-tos { background: var(--jw-soft); border-radius: 8px; padding: 6px 10px; margin: 0 0 6px; }
.tl-com p { margin: 0 0 .45em; }
.tl-com p[lang="he"] { font-family: var(--jw-hebrew); font-size: 1.08rem; line-height: 1.7; text-align: right; }
.tl-com .tl-ltr p { font-size: .92rem; line-height: 1.55; }
.tl-com-h { font-size: .78rem !important; font-family: system-ui, sans-serif !important; text-align: left !important; text-transform: uppercase; letter-spacing: .04em; color: var(--jw-gold); font-weight: 600; }
.tl-com-h .jw-he { font-size: 1.1em; text-transform: none; letter-spacing: 0; }
.tl-notes ol { margin: 0; padding-left: 1.6em; font-size: .9rem; line-height: 1.55; color: var(--jw-muted); }
.tl-notes li { margin-bottom: .4em; }
.tl-lic { margin-top: 18px; }

@media (min-width: 900px) {
  .tl-has-en .tl-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 22px; align-items: start; }
  .tl-has-en .tl-en { margin-top: .2em; }
}
@media (min-width: 1100px) {
  .tl-row:has(> .tl-com[open]) { grid-template-columns: 2.4em minmax(0, 1fr) minmax(0, .62fr); }
  .tl-daf:not(.tl-has-en) .tl-row:has(> .tl-com[open]) { grid-template-columns: 2.4em minmax(0, 1fr) minmax(0, .8fr); }
  .tl-row:has(> .tl-com[open]) > .tl-com { grid-column: 3; grid-row: 1; max-height: 34rem; overflow-y: auto; overscroll-behavior: contain; }
}

/* the reader's switches */
html.jw-hide-english .tl-en, html.jw-hide-english .tl-ltr { display: none; }
html.jw-hide-english .tl-has-en .tl-line { display: block; }

@media print {
  .tl-tools, .jw-pager, .tl-com > summary { display: none; }
  .tl-com { display: block; }
}
