/* Biblical Hebrew study center. Colours follow REIGN's tokens so light and dark both work. */

@font-face {
	font-family: "THS Hebrew";
	src: url("fonts/noto-serif-hebrew-400.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
	unicode-range: U+0590-05FF, U+FB1D-FB4F;
}
@font-face {
	font-family: "THS Hebrew";
	src: url("fonts/noto-serif-hebrew-700.woff2") format("woff2");
	font-weight: 700;
	font-display: swap;
	unicode-range: U+0590-05FF, U+FB1D-FB4F;
}
@font-face {
	font-family: "THS Paleo";
	src: url("fonts/noto-sans-phoenician-400.woff2") format("woff2");
	font-display: swap;
	unicode-range: U+10900-1091F;
}

.thb {
	--thb-bg: var(--reign-site-sections-bg-color, #161927);
	--thb-bg2: var(--reign-site-secondary-bg-color, #1c2033);
	--thb-line: var(--reign-site-border-color, #262b3d);
	--thb-text: var(--reign-site-body-text-color, #c9d1dc);
	--thb-head: var(--reign-site-headings-color, #f3f4f8);
	--thb-muted: var(--reign-site-alternate-text-color, #8b96a5);
	--thb-accent: #cc342d;
	--thb-accent-h: #e5484d;
	--thb-ok: #2f9e6e;
	--thb-radius: 10px;
	--thb-heb: "THS Hebrew", "SBL Hebrew", "Times New Roman", serif;
	color: var(--thb-text);
	font-size: 17px;
	line-height: 1.6;
	max-width: 1120px;
	margin: 0 auto;
	box-sizing: border-box;
}
.thb *, .thb *::before, .thb *::after { box-sizing: border-box; }
.thb h1, .thb h2, .thb h3 { color: var(--thb-head); line-height: 1.2; }
.thb h2 { font-size: 1.6rem; margin: 0 0 .5rem; }
.thb h3 { font-size: 1.1rem; margin: 1.25rem 0 .5rem; }
.thb a { color: var(--thb-accent-h); }
.thb [hidden] { display: none !important; }

/* The page title is repeated by each view's own heading. */
.ths-hebrew-page .entry-header { display: none; }
/* The reader needs the width, so the theme's generic sidebar goes on these pages. */
.ths-hebrew-page #reign-sidebar-right { display: none; }
.ths-hebrew-page .site-content-grid > .content-wrapper { flex: 0 0 100%; width: 100%; max-width: 100%; }

.thb-he, [lang="he"] { font-family: var(--thb-heb); }
.thb-he { unicode-bidi: isolate; }

/* ---------- Section nav ---------- */
.thb-nav { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 1.5rem; padding-bottom: .75rem; border-bottom: 1px solid var(--thb-line); }
.thb-nav a { padding: .35rem .8rem; border-radius: 999px; color: var(--thb-text); text-decoration: none; font-size: .92rem; }
.thb-nav a:hover { background: var(--thb-bg2); }
.thb-nav a[aria-current="page"] { background: var(--thb-accent); color: #fff; }

/* ---------- Buttons ---------- */
.thb-btn { display: inline-block; padding: .65rem 1.2rem; border: 1px solid var(--thb-accent); border-radius: var(--thb-radius); background: var(--thb-accent); color: #fff !important; font-weight: 600; font-size: .98rem; line-height: 1.2; text-decoration: none; cursor: pointer; }
.thb-btn:hover { background: var(--thb-accent-h); border-color: var(--thb-accent-h); }
.thb-btn--ghost { background: transparent; border-color: var(--thb-line); color: var(--thb-text) !important; }
.thb-btn--ghost:hover { background: var(--thb-bg2); border-color: var(--thb-muted); }
.thb-mini { padding: .4rem .75rem; border: 1px solid var(--thb-line); border-radius: 8px; background: var(--thb-bg); color: var(--thb-text); font-size: .9rem; line-height: 1.2; cursor: pointer; }
.thb-mini:hover, .thb-mini[aria-pressed="true"] { border-color: var(--thb-accent-h); color: var(--thb-head); }
.thb button:focus-visible, .thb a:focus-visible, .thb input:focus-visible, .thb select:focus-visible { outline: 2px solid var(--thb-accent-h); outline-offset: 2px; }

/* ---------- Hub ---------- */
.thb-hero { position: relative; padding: 2.5rem 0 1.5rem; }
.thb-hero-he { margin: 0 0 .75rem; color: var(--thb-accent-h); font-family: var(--thb-heb); font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.5; text-align: left; }
.thb-eyebrow { display: block; margin-bottom: .4rem; color: var(--thb-muted); font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.thb-hero h1 { margin: 0 0 .75rem; font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
.thb-lede { max-width: 44rem; margin: 0 0 1.25rem; font-size: 1.15rem; }
.thb-cta { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }
.thb-continue { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0 0 1.5rem; padding: 1rem 1.25rem; border: 1px solid var(--thb-line); border-left: 4px solid var(--thb-accent); border-radius: var(--thb-radius); background: var(--thb-bg); }
.thb-continue p { margin: 0; flex: 1 1 14rem; }
.thb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.thb-stats li { padding: 1rem 1.15rem; border: 1px solid var(--thb-line); border-radius: var(--thb-radius); background: var(--thb-bg); font-size: .95rem; }
.thb-stats strong { display: block; color: var(--thb-head); font-size: 1.7rem; line-height: 1.2; }
.thb-section { margin: 0 0 2.75rem; }
.thb-sub { max-width: 46rem; margin: 0 0 1rem; color: var(--thb-muted); }
.thb-day { margin: 0; padding-left: 1.4rem; }
.thb-day li { margin-bottom: .4rem; }
.thb-stage { margin-bottom: 1rem; padding: 1.25rem 1.4rem; border: 1px solid var(--thb-line); border-radius: var(--thb-radius); background: var(--thb-bg); }
.thb-stage header { display: flex; align-items: center; gap: .85rem; }
.thb-stage h3 { margin: 0; font-size: 1.2rem; }
.thb-stage-n { display: grid; flex: 0 0 2.25rem; height: 2.25rem; place-items: center; border-radius: 50%; background: var(--thb-accent); color: #fff; font-weight: 700; }
.thb-stage-when { margin: 0; color: var(--thb-muted); font-size: .88rem; }
.thb-stage-goal { margin: .75rem 0; }
.thb-steps { margin: 0; padding: 0; list-style: none; }
.thb-steps li { display: flex; align-items: flex-start; gap: .6rem; padding: .3rem 0; }
.thb-steps input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin-top: .3rem; accent-color: var(--thb-accent); }
.thb-steps input:checked + a { color: var(--thb-muted); text-decoration: line-through; }
.thb-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.thb-cards a { display: block; height: 100%; padding: 1.1rem 1.2rem; border: 1px solid var(--thb-line); border-radius: var(--thb-radius); background: var(--thb-bg); color: var(--thb-text); text-decoration: none; }
.thb-cards a:hover { border-color: var(--thb-accent-h); }
.thb-cards strong { display: block; color: var(--thb-head); }
.thb-cards span { font-size: .93rem; }
.thb-decks { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.thb-decks a { display: block; padding: .45rem .85rem; border: 1px solid var(--thb-line); border-radius: 999px; color: var(--thb-text); font-size: .93rem; text-decoration: none; }
.thb-decks a:hover { border-color: var(--thb-accent-h); }
.thb-ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .5rem; margin: 0; padding: 0; list-style: none; }
.thb-ladder a { display: grid; grid-template-columns: 1fr auto; padding: .7rem 1rem; border: 1px solid var(--thb-line); border-radius: var(--thb-radius); background: var(--thb-bg); color: var(--thb-text); text-decoration: none; }
.thb-ladder a:hover { border-color: var(--thb-accent-h); }
.thb-ladder strong { color: var(--thb-head); }
.thb-ladder span { grid-row: 2; color: var(--thb-muted); font-size: .9rem; }
.thb-ladder em { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--thb-head); font-size: 1.1rem; font-style: normal; font-weight: 700; }
.thb-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.thb-links { margin: 0; padding: 0; list-style: none; }
.thb-links li { margin-bottom: .75rem; }
.thb-links span { display: block; color: var(--thb-muted); font-size: .93rem; }
.thb-credits { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--thb-line); color: var(--thb-muted); font-size: .82rem; }
.thb-credits a { color: inherit; }

/* ---------- Tools ---------- */
.thb-toolhead { margin-bottom: 1.25rem; }
.thb-toolhead h1 { margin: 0 0 .35rem; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.thb-toolhead p { margin: 0; color: var(--thb-muted); }
.thb-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: 1rem; }
.thb-pick, .thb-opts, .thb-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; }
.thb select, .thb input[type="search"] { padding: .45rem .6rem; border: 1px solid var(--thb-line); border-radius: 8px; background: var(--thb-bg); color: var(--thb-text); font-size: .95rem; }
.thb-toggle { display: inline-flex; align-items: center; gap: .3rem; font-size: .9rem; white-space: nowrap; }
.thb-loading, .thb-hint { color: var(--thb-muted); }
.thb-error { padding: 1rem; border-left: 4px solid var(--thb-accent); background: var(--thb-bg); }
.thb-note { color: var(--thb-muted); font-size: .9rem; }

/* ---------- Reader ---------- */
.thb-readgrid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; }
.thb-text { --thb-size: 1; }
.thb-verse { padding: .5rem .25rem; border-bottom: 1px solid var(--thb-line); scroll-margin-top: 100px; }
.thb-verse.is-hit { background: var(--thb-bg2); }
.thb-heb { font-size: calc(1.6rem * var(--thb-size)); line-height: 1.9; text-align: right; }
.thb-vn { margin-inline-end: .4rem; color: var(--thb-muted) !important; font-family: inherit; font-size: .8rem; text-decoration: none; vertical-align: super; }
.thb-w { display: inline; margin: 0; padding: 0 .08em; border: 0; border-radius: 4px; background: none; color: var(--thb-head); font: inherit; line-height: inherit; cursor: pointer; }
.thb-w:hover, .thb-w.is-on { background: var(--thb-bg2); }
.thb-w.is-on { box-shadow: 0 0 0 1px var(--thb-accent-h); }
.thb-w:not(.is-joined)::after { content: " "; }
.thb-w.is-k .thb-t { color: var(--thb-muted); font-size: .8em; }
.thb-w.is-q .thb-t::after { content: "\05E7"; margin-inline-start: .1em; color: var(--thb-accent-h); font-size: .55em; vertical-align: super; }
.has-gloss .thb-heb { display: flex; flex-wrap: wrap; gap: .35rem .25rem; line-height: 1.5; }
.has-gloss .thb-vn { align-self: flex-start; }
.has-gloss .thb-w { display: inline-flex; flex-direction: column; align-items: center; padding: .1em .25em; }
.has-gloss .thb-w::after { content: none; }
.thb-g { max-width: 7.5rem; overflow: hidden; color: var(--thb-muted); font-family: var(--reign-body-font-family, inherit); font-size: .72rem; line-height: 1.2; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.thb-para { align-self: center; color: var(--thb-muted); font-size: .7em; }
.thb-en { margin: .35rem 0 .25rem; color: var(--thb-muted); font-size: .98rem; }
.thb-chapfoot { margin: 1rem 0 .5rem; color: var(--thb-muted); font-size: .88rem; }
.thb-panel { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow: auto; padding: 1rem 1.1rem; border: 1px solid var(--thb-line); border-radius: var(--thb-radius); background: var(--thb-bg); }
.thb-close { display: none; position: absolute; top: .4rem; right: .6rem; border: 0; background: none; color: var(--thb-text); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.thb-big { display: block; color: var(--thb-head); font-size: 2.2rem; line-height: 1.5; text-align: right; }
.thb-seg { display: grid; grid-template-columns: minmax(3.5rem, auto) 1fr; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--thb-line); }
.thb-seg > div > * { display: block; font-size: .9rem; }
.thb-seg strong { color: var(--thb-head); font-size: 1rem; }
.thb-part { color: var(--thb-accent-h); font-size: 1.5rem; line-height: 1.3; text-align: right; }
.thb-lemma .thb-he { display: inline; font-size: 1.05rem; }
.thb-ask { display: inline-block; margin-top: .75rem; font-size: .92rem; }

/* ---------- Word study ---------- */
.thb-search { width: 100%; max-width: 34rem; padding: .7rem .9rem !important; font-size: 1.05rem !important; }
.thb-results { margin: .75rem 0; padding: 0; list-style: none; }
.thb-results a { display: grid; grid-template-columns: 7rem 1fr auto; gap: .75rem; align-items: baseline; padding: .4rem .5rem; border-bottom: 1px solid var(--thb-line); color: var(--thb-text); text-decoration: none; }
.thb-results a:hover { background: var(--thb-bg2); }
.thb-results .thb-he { color: var(--thb-head); font-size: 1.3rem; text-align: right; }
.thb-results em { color: var(--thb-muted); font-style: normal; }
.thb-enhead { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; margin-top: 1rem; }
.thb-enhead h2 { margin: 0; }
.thb-enhead p { margin: 0; color: var(--thb-muted); font-size: .93rem; }
.thb-enhead .thb-big { font-size: 3rem; }
.thb-count strong { color: var(--thb-head); font-size: 1.4rem; }
.thb-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.thb-chips li { padding: .15rem .65rem; border: 1px solid var(--thb-line); border-radius: 999px; font-size: .92rem; }
.thb-chips .thb-he { font-size: 1.15rem; }
.thb-bars { margin: 0; padding: 0; list-style: none; }
.thb-bars li { display: grid; grid-template-columns: 8.5rem 1fr 3rem; gap: .6rem; align-items: center; font-size: .88rem; }
.thb-bars b { display: block; height: .6rem; }
.thb-bars i { display: block; height: 100%; border-radius: 3px; background: var(--thb-accent); }
.thb-bars em { color: var(--thb-muted); font-style: normal; text-align: right; }
.thb-sample { padding: .6rem 0; border-bottom: 1px solid var(--thb-line); }
.thb-sample p { margin: .2rem 0; }
.thb-sample .thb-he { display: block; color: var(--thb-head); font-size: 1.35rem; line-height: 1.7; }
.thb-sample mark { padding: 0 .15em; border-radius: 3px; background: var(--thb-accent); color: #fff; }
.thb details { margin-top: 1rem; }
.thb summary { cursor: pointer; }
.thb-refs { font-size: .9rem; }

/* ---------- Vocabulary ---------- */
.thb-tablewrap { overflow-x: auto; }
.thb-table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; font-size: .95rem; }
.thb-table th { color: var(--thb-muted); font-weight: 600; text-align: left; }
.thb-table th, .thb-table td { padding: .45rem .6rem; border: 0; border-bottom: 1px solid var(--thb-line); background: none; }
.thb-table a { color: var(--thb-head); text-decoration: none; }
.thb-table .thb-he { font-size: 1.35rem; }

/* ---------- Alphabet ---------- */
.thb-letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; margin: 0; padding: 0; list-style: none; }
.thb-letters li { padding: .8rem .9rem; border: 1px solid var(--thb-line); border-radius: var(--thb-radius); background: var(--thb-bg); }
.thb-letters strong { display: block; color: var(--thb-head); }
.thb-letters .thb-note { display: block; line-height: 1.35; }
.thb-glyphs { display: flex; align-items: baseline; gap: .75rem; }
.thb-letter { color: var(--thb-head); font-size: 2.4rem; line-height: 1.3; }
.thb-final { color: var(--thb-muted); font-size: .8rem; }
.thb-final .thb-he { color: var(--thb-head); font-size: 1.5rem; }
.thb-paleo { margin-inline-start: auto; color: var(--thb-accent-h); font-family: "THS Paleo", sans-serif; font-size: 1.7rem; line-height: 1; }

/* ---------- Quiz ---------- */
.thb-quiz { max-width: 40rem; padding: 1.25rem 1.4rem; border: 1px solid var(--thb-line); border-radius: var(--thb-radius); background: var(--thb-bg); }
.thb-prompt { text-align: center; }
.thb-prompt p { margin: .25rem 0 1rem; }
.thb-huge { display: block; color: var(--thb-head); font-size: 3.2rem; line-height: 1.5; margin-inline-start: 0; }
.thb-choices { display: grid; gap: .45rem; margin-bottom: .75rem; }
.thb-choice { padding: .6rem .8rem; border: 1px solid var(--thb-line); border-radius: 8px; background: var(--thb-bg2); color: var(--thb-text); font-size: .98rem; text-align: left; cursor: pointer; }
.thb-choice:hover { border-color: var(--thb-muted); }
.thb-choice.is-right { border-color: var(--thb-ok); background: var(--thb-ok); color: #fff; }
.thb-choice.is-wrong { border-color: var(--thb-accent); background: var(--thb-accent); color: #fff; }
.thb-feedback p { margin: .2rem 0 .6rem; }
.thb-tally { margin: .75rem 0 0; color: var(--thb-muted); font-size: .88rem; }
.thb-quiz + .thb-tabs { margin-top: 1rem; }
.thb-tabs { margin-bottom: .85rem; }

/* ---------- Coach ---------- */
.thb-coach .mwai-chatgpt-theme {
	--mwai-backgroundPrimaryColor: var(--thb-bg) !important;
	--mwai-backgroundSecondaryColor: var(--thb-bg2) !important;
	--mwai-backgroundHeaderColor: var(--thb-bg2) !important;
	--mwai-fontColor: var(--thb-text) !important;
	--mwai-headerColor: var(--thb-head) !important;
	--mwai-borderColor: var(--thb-line) !important;
	--mwai-accentColor: var(--thb-accent-h) !important;
	--mwai-bubbleColor: var(--thb-bg2) !important;
	--mwai-conversationsBackgroundColor: var(--thb-bg) !important;
	--mwai-conversationsTextColor: var(--thb-text) !important;
	--mwai-linkColor: var(--thb-accent-h) !important;
	--mwai-maxHeight: 62vh !important;
	--mwai-width: 100% !important;
	color: var(--thb-text);
}
.thb-coach .mwai-content, .thb-coach .mwai-text { font-family: inherit; font-size: 1rem; line-height: 1.7; }
.thb-coach .mwai-content p, .thb-coach .mwai-content li, .thb-coach .mwai-content td, .thb-coach .mwai-content th, .thb-coach .mwai-text p, .thb-coach .mwai-text li, .thb-coach .mwai-text td, .thb-coach .mwai-text th { unicode-bidi: plaintext; }
.thb-coach table { display: block; overflow-x: auto; border-collapse: collapse; }
.thb-coach td, .thb-coach th { padding: .35rem .6rem; border: 1px solid var(--thb-line); }
.thb-coach { font-family: inherit; }
.thb-tryrow { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.thb-gate { padding: 1.5rem; border: 1px solid var(--thb-line); border-left: 4px solid var(--thb-accent); border-radius: var(--thb-radius); background: var(--thb-bg); }
.thb-gate p { margin: 0 0 .75rem; }
.thb-coachgrid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1rem; align-items: start; }

/* ---------- The shared flashcard page, on Hebrew decks ---------- */
.shed-lt-flashcards[data-deck^="biblical-hebrew"] .shed-lt-fc-card { text-align: center; }
.shed-lt-flashcards[data-deck^="biblical-hebrew"] .shed-lt-fc-question { font-family: "THS Hebrew", "SBL Hebrew", "Times New Roman", serif; font-size: clamp(2.2rem, 7vw, 3.2rem); font-weight: 400; line-height: 1.5; unicode-bidi: plaintext; }
.shed-lt-flashcards[data-deck^="biblical-hebrew"] .shed-lt-fc-answer { font-size: 1.1rem; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
	.thb { font-size: 16px; }
	.thb-readgrid { grid-template-columns: minmax(0, 1fr); padding-bottom: 2rem; }
	.thb-panel { display: none; position: fixed; top: auto; right: 0; bottom: 0; left: 0; z-index: 9999; max-height: 60vh; border-radius: 14px 14px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .45); }
	.thb-panel.is-open { display: block; }
	.thb-close { display: block; }
	.thb-coachgrid { grid-template-columns: minmax(0, 1fr); }
	.thb-coachgrid > :first-child { order: 2; }
	.thb-bars li { grid-template-columns: 6.5rem 1fr 2.5rem; }
}

/* ---------- Phones ---------- */
/* The skin paints every <footer> black, which suits the site footer but not this source note. */
.thb .thb-credits { background: none !important; color: var(--thb-muted) !important; }
.thb .thb-credits a { color: var(--thb-text) !important; text-decoration: underline; }

@media (max-width: 860px) {
	/* A smaller field makes iPhones zoom the page on focus. */
	.thb select, .thb input[type="search"] { min-height: 44px; font-size: 16px; }
	.thb-close { width: 44px; height: 44px; top: .15rem; right: auto; left: .15rem; }
	.thb-panel { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); max-height: 70dvh; overscroll-behavior: contain; }
}
@media (max-width: 560px) {
	.thb-nav {
		flex-wrap: nowrap;
		gap: .25rem;
		margin: 0 -15px 1.25rem;
		padding: 0 15px .65rem;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		scroll-padding-inline: 15px;
	}
	.thb-nav::-webkit-scrollbar { display: none; }
	.thb-nav a { display: inline-flex; flex: none; align-items: center; min-height: 40px; padding: 0 .9rem; white-space: nowrap; }

	.thb-hero { padding: 1rem 0 .5rem; }
	.thb-lede { font-size: 1.05rem; }
	.thb-cta .thb-btn, .thb-continue .thb-btn { flex: 1 1 100%; padding-block: .85rem; text-align: center; }

	.thb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
	.thb-stats li { padding: .75rem .85rem; font-size: .88rem; line-height: 1.35; }
	.thb-stats li:last-child:nth-child(odd) { grid-column: 1 / -1; }
	.thb-stats strong { font-size: 1.4rem; }

	.thb-stage, .thb-quiz, .thb-gate { padding: 1rem; }
	.thb-steps li { align-items: center; min-height: 40px; }
	.thb-steps input { margin-top: 0; }
	.thb-ladder, .thb-two, .thb-cards { grid-template-columns: minmax(0, 1fr); }
	.thb-letters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.thb-choice { min-height: 48px; }
	.thb-tabs .thb-mini { min-height: 40px; }
	.thb-huge { font-size: 2.8rem; }

	/* Reader controls: book and chapter, then Previous and Next, then the display options. */
	.thb-toolbar { display: block; }
	.thb-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 7.5rem); gap: .5rem; margin-bottom: .6rem; }
	.thb-pick select { width: 100%; }
	.thb-pick .thb-mini { min-height: 44px; }
	.thb-opts { gap: .35rem .55rem; }
	.thb-toggle { min-height: 40px; gap: .2rem; font-size: .84rem; }
	.thb-opts .thb-mini { min-width: 40px; min-height: 40px; padding-inline: .3rem; }
	.thb-opts .thb-mini:first-of-type { margin-inline-start: auto; }
	.thb-read { display: block; width: 100%; min-height: 44px; }

	.thb-verse { padding: .6rem 0; }
	.has-gloss .thb-heb { gap: .5rem .35rem; }
	.has-gloss .thb-w { min-width: 2.75rem; padding: .15em .2em; }
	.thb-g { max-width: 5.75rem; font-size: .75rem; }

	/* Vocabulary: each word is a compact row, so nothing is cut off at the right edge. */
	.thb-tablewrap { overflow: visible; }
	.thb-table, .thb-table tbody { display: block; }
	.thb-table thead { display: none; }
	.thb-table tr {
		display: grid;
		grid-template-columns: 2.25rem minmax(0, 1fr) auto;
		grid-template-areas: "rank word times" "rank say say" "rank mean mean";
		column-gap: .5rem;
		padding: .6rem 0;
		border-bottom: 1px solid var(--thb-line);
	}
	.thb .thb-table td { padding: 0; border: 0; }
	.thb-table td:nth-child(1) { grid-area: rank; color: var(--thb-muted); font-size: .85rem; line-height: 2.4; }
	.thb-table td:nth-child(2) { grid-area: word; }
	.thb-table td:nth-child(2) a { display: inline-block; min-height: 40px; line-height: 1.5; }
	.thb-table td:nth-child(3) { grid-area: say; color: var(--thb-muted); font-size: .9rem; font-style: italic; }
	.thb-table td:nth-child(4) { grid-area: mean; color: var(--thb-head); }
	.thb-table td:nth-child(5) { grid-area: times; color: var(--thb-muted); font-size: .85rem; line-height: 2.4; text-align: right; }
	.thb-table td:nth-child(5)::after { content: "×"; }

	/* Word study */
	.thb-results a { grid-template-columns: minmax(4.5rem, 5.5rem) minmax(0, 1fr) auto; gap: .5rem; min-height: 48px; padding: .5rem 0; align-items: center; }
	.thb-bars li { grid-template-columns: 5.5rem minmax(0, 1fr) 2.25rem; }
	.thb-enhead .thb-big { font-size: 2.5rem; }
}
@media (max-width: 380px) {
	.thb-opts { gap: .3rem .4rem; }
	.thb-toggle { font-size: .78rem; }
	.thb-opts .thb-mini { min-width: 36px; }
}
