
:root { color-scheme:light; --ink:#2e281f; --muted:#685e50; --page:#f4f2ec; --surface:#fffefa; --accent:#844618; --accent-dark:#59351d; --line:#ded7c9; --gold:#dfbb83; --inset:#f7f2e8; --tint:#f5e4ce; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font: 1rem/1.5 system-ui, -apple-system, sans-serif;
}
main { width: min(1120px, calc(100% - clamp(28px, 8vw, 110px))); margin: clamp(20px, 4vw, 52px) auto 64px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: Georgia, serif; }
h1 { font: 400 clamp(3.25rem, 7.5vw, 6rem)/.98 Georgia, serif; letter-spacing: -.045em; }
h2 { font-size: clamp(1.48rem, 3.3vw, 1.95rem); line-height: 1.2; letter-spacing: -.024em; font-weight: 500; }
h3 { font-size: 1.22rem; line-height: 1.25; font-weight: 600; }
[lang="he"], .hebrew { font-family: "Noto Serif Hebrew", "Times New Roman", "Arial Hebrew", serif; }

.masthead {
  --banner-width: min(1160px, calc(100vw - clamp(40px, 5vw, 96px)));
  width: var(--banner-width);
  margin-inline: calc((100% - var(--banner-width)) / 2);
  isolation: isolate;
  overflow: hidden;
  position: relative;
  min-height: clamp(210px, 19vw, 280px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  border: 1px solid #694326;
  border-radius: 14px;
  background: var(--accent-dark);
  color: #fff7e6;
  box-shadow: 0 10px 28px #50341d26;
}
.masthead::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid #d7b88975;
  border-radius: 7px;
  pointer-events: none;
}
.masthead-copy { z-index: 1; align-self: center; padding: clamp(28px, 3.8vw, 54px); padding-inline-end: clamp(20px, 3.4vw, 42px); }
.masthead-description { max-width: 35ch; margin-top: 20px; color: #f4e4cc; }
.masthead-description::before { content: ""; display: block; width: 44px; height: 1px; background: var(--gold); margin: 0 0 16px; }
.masthead-photo { position: relative; min-width: 0; min-height: 0; }
.masthead-photo img { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; object-position: 64% 52%; }
.masthead-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--accent-dark) 0%, #59351d80 12%, transparent 48%); }
@media (min-width: 601px) {
  .masthead h1 { width: max-content; max-width: calc(100vw - 120px); }
}
@media (min-width: 601px) and (max-width: 625px) {
  .masthead-description { min-height: calc(6rem + 17px); }
}

.card {
  margin-top: 19px;
  padding: clamp(15px, 2.7vw, 25px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 3px 12px #48341b09;
  min-width: 0;
}
@media (max-width: 600px) {
  main { margin-top: 12px; }
  .masthead { --banner-width: calc(100vw - 24px); grid-template-columns: 1fr; min-height: 175px; }
  .masthead-photo { position: absolute; inset: 0; z-index: -1; }
  .masthead-photo img { object-position: 65% 55%; }
  .masthead-photo::after { background: linear-gradient(90deg, #59351d 5%, #59351ded 38%, #59351d80 74%, #59351d1f); }
  .masthead-copy { padding: 26px; }
  .masthead-description { max-width: 26ch; margin-top: 14px; }
  .masthead-description::before { display: none; }
}
a {color:var(--accent);text-underline-offset:.16em}
button,input,select {font:inherit}
button,select {cursor:pointer}
button,input,select {border:1px solid #aa9984;border-radius:8px;color:var(--ink);background:#fffefa}
button {min-height:42px;padding:7px 13px;font-size:.92rem}
button:disabled {opacity:.45;cursor:default}
button:hover:enabled {border-color:var(--accent);background:var(--inset)}
:focus-visible {outline:3px solid #ac6534;outline-offset:3px}
h2:focus {outline:none}
label {display:block;font-weight:650;font-size:.89rem;min-width:0}
input,select {display:block;width:100%;margin-top:5px;height:47px;font-weight:400;font-size:1rem;padding:8px 11px}
input:dir(rtl) {font:1.35rem/1.3 "Times New Roman",serif}
select {appearance:none;padding-right:32px;background-image:linear-gradient(45deg,transparent 50%,#735338 50%),linear-gradient(135deg,#735338 50%,transparent 50%);background-size:5px 5px;background-repeat:no-repeat;background-position:calc(100% - 17px) 52%,calc(100% - 12px) 52%}
.fields {display:grid;grid-template-columns:minmax(0,1fr) minmax(136px,.34fr) auto;gap:12px;align-items:end;margin-top:15px}
.primary {min-height:47px;font-size:1rem;font-weight:700;padding-inline:25px;background:var(--accent);border-color:var(--accent);color:white}
.primary:hover:enabled {background:#693612}
.examples,.reading-footer,.evidence,.step,.pagination,.word-head,.word-stats,.lookup-head,.choice-list {display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}
.examples {margin-top:13px;font-size:.86rem;color:var(--muted)}
.examples button,.evidence button,.choice-list button {min-height:30px;border-radius:6px;font-size:.86rem;padding:2px 9px;border-color:#d6c7b1;background:#fcf8f0;color:#69421f}
.examples bdi {font-size:1.01rem;margin-inline-start:5px}
.options {margin-top:13px;border-top:1px solid var(--line);padding-top:11px}
summary {color:var(--accent);font-weight:650;cursor:pointer;width:fit-content}
summary:hover {text-decoration:underline;text-underline-offset:.16em}
.options summary {font-size:.89rem}
#option-label {color:var(--muted);font-weight:400;margin-left:6px}
.option-fields {display:flex;gap:12px;flex-wrap:wrap;margin-top:12px}
.hint,.meta,#status,.word-stats,.step span,.pagination span,.lookup .meta {font-size:.9rem;color:var(--muted)}
.hint,#status:not(:empty) {margin-top:8px}
#status.error {color:#963e25}
.section-head {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:15px}
#study .section-head {padding-bottom:12px;border-bottom:1px solid var(--line)}
.word-block + .word-block {border-top:1px solid var(--line);margin-top:12px;padding-top:12px}
.word-head {gap:6px 13px;overflow-wrap:anywhere}
.headword {font-size:2rem;font-weight:600;line-height:1.4;color:var(--accent-dark)}
.translit {font-family:Georgia,serif;font-style:italic;font-size:1.06rem;color:var(--muted)}
.gloss {font-size:1.08rem;font-weight:650}
.word-stats {font-size:.88rem;margin-top:2px}
.word-stats bdi {font-size:1.12rem}
.reading-sense {margin-top:10px;max-width:80ch}
.evidence {margin-top:8px;gap:5px 7px}
.evidence button {background:transparent}
.choice-list {align-items:baseline;gap:5px 7px}
.choice-list button bdi {font-size:1.15rem;margin-inline-end:6px}
.word-details {margin-top:6px}
.word-details summary,.scope-link {font-size:.87rem}
.word-details .choice-list {margin-top:8px}
.eyebrow {color:var(--accent);font-size:.79rem;letter-spacing:.07em;text-transform:uppercase;font-weight:700;margin-bottom:3px}
.step,.pagination {gap:8px}
.step span {font-variant-numeric:tabular-nums}
.verse {border:1px solid var(--line);padding:16px 18px;display:grid;grid-template-columns:1fr 1fr;gap:5px 27px;background:var(--surface)}
.verse:first-child {border-radius:8px 8px 0 0}
.verse:last-child {border-radius:0 0 8px 8px}
.verse:only-child {border-radius:8px}
.verse + .verse {border-top:none}
.verse.current {background:#fcf8f0}
.verse-label {grid-column:1/-1;color:var(--muted);font-size:.84rem;font-weight:650}
.verse-he {font:1.5rem/1.75 "Times New Roman",serif;text-align:right;overflow-wrap:anywhere;align-self:center}
.verse-en {line-height:1.55;align-self:center;overflow-wrap:anywhere}
.word {border:0;background:transparent;margin:0;padding:0;min-height:0;font:inherit;line-height:inherit;border-radius:3px}
.word:hover:enabled {background:#eadbc7;text-decoration:underline;text-underline-offset:.13em}
.word[aria-pressed=true] {outline:1px solid var(--accent)}
.hit,mark,.word.hit {background:#f1d8ae;color:#4f2c13;border-radius:3px}
.reading-footer {margin-top:10px;justify-content:space-between}
.reading-footer a,.lookup a {font-size:.9rem;font-weight:600}
.subtle {font-size:.88rem;background:var(--surface);min-height:36px;border-color:#c8bba8}
.reading-note {margin-top:12px;padding-inline-start:11px;border-inline-start:2px solid #bc915d;color:#574a3b;max-width:86ch}
.lookup {margin-top:12px;background:var(--inset);padding:10px 12px;border-radius:7px}
.lookup-head {justify-content:space-between}
.lookup-head strong {font-size:1.2rem}
.lookup .choice-list {margin-top:6px}
.book-filter {width:min(100%,14rem)}
.book-filter select {height:39px}
.table-wrap {overflow:hidden;border:1px solid var(--line);border-radius:9px}
table {border-collapse:collapse;table-layout:fixed;width:100%}
th,td {padding:8px 13px;text-align:left;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
th {background:#f1ecdf;color:#61503c;font-size:.89rem}
th:first-child {width:clamp(128px,24%,245px)}
tbody tr {cursor:pointer}
tbody tr:nth-child(even) {background:#fbfaf6}
tbody tr:last-child td {border:0}
tbody tr:hover {background:var(--inset)}
tbody tr.active {background:var(--tint);box-shadow:inset 3px 0 var(--accent)}
.ref-button {min-height:34px;background:transparent;border:0;text-align:left;padding:0;color:var(--accent-dark);font-weight:650}
.he-snippet {font:1.24rem/1.5 "Times New Roman",serif;text-align:right}
.en-snippet {font-size:.95rem}
.pagination {justify-content:flex-end;margin-top:12px}
.pagination button {min-height:36px}
.empty {padding:13px;background:var(--inset);border-radius:8px;color:var(--muted)}
.scope-link {background:transparent;border:none;text-decoration:underline;color:var(--accent);min-height:30px}
.method {padding-block:15px}
.method div {max-width:85ch}
.method h3 {margin-top:16px}
.method p {margin-top:6px}
@media (max-width:600px) {
  .verse {grid-template-columns:1fr;gap:5px;padding:12px}
  .fields {grid-template-columns:1fr 1fr;gap:8px 10px}
  .query-field {grid-column:1/-1}
  .option-fields label {width:100%}
  .book-filter {width:100%}
  .examples {gap:5px 7px}
  #option-label {display:block;margin-left:17px}
  .pagination {justify-content:center}
  th,td {padding:6px 8px}
  th:first-child {width:32%}
  .step button {min-height:36px}
}
@media (max-width:520px) {main {width:calc(100% - 26px)}}
@media (max-width:360px) {.masthead h1 {width:max-content;margin-inline-start:min(0px,calc(100vw - 338px))}}
@media (min-width:626px) and (max-width:840px) {
  .masthead-description {min-height:calc(3lh + 17px)}
}
.word-details[open] > .meta {margin-top:10px}
.senses {margin:7px 0;padding-inline-start:22px;max-width:76ch;color:var(--muted)}
