/* words.css — the glossary & Bible dictionary (#/words…). Every class starts with "wd-" (see ARCHITECTURE.md). */

/* ------------------------------------------------------------------ Words home */
.wd-hhead { text-align: center; margin: 6px 0 18px; }
.wd-h1 { font-family: var(--display); font-weight: 600; font-size: 40px; line-height: 1.08; margin: 6px 0 8px; letter-spacing: .005em; color: var(--ink); }
.wd-amp { font-style: italic; color: var(--rubric); font-weight: 500; }
.wd-hsub { font-family: var(--serif); font-style: italic; color: var(--ink-2); font-size: 17px; line-height: 1.45; margin: 0 auto; max-width: 34rem; }
@media (max-width: 520px) { .wd-h1 { font-size: 31px; } .wd-hsub { font-size: 15.5px; } }

.wd-wotd { display: flex; gap: 16px; align-items: flex-start; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-3);
  padding: 16px 18px; margin: 0 0 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.wd-wotd::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--gold-2), var(--rubric)); }
.wd-wotd:hover .wd-wotd-t { color: var(--rubric); }
.wd-wotd-oi { --oi: 64px; flex: none; line-height: 0; }
.wd-wotd-oi .oi { --oi: 64px; }
.wd-wotd-b { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.wd-wotd-k { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.wd-dot { margin: 0 .45em; opacity: .7; }
.wd-wotd-t { font-family: var(--display); font-size: 29px; font-weight: 600; line-height: 1.1; color: var(--ink); margin-top: 2px; }
.wd-wotd-c { font-variant: small-caps; letter-spacing: .06em; color: var(--rubric); font-size: 15px; }
.wd-wotd-s { font-family: var(--serif); font-size: 16.5px; line-height: 1.45; color: var(--ink-2); margin-top: 4px; }
.wd-wotd-go { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--link); margin-top: 6px; }
@media (max-width: 520px) { .wd-wotd { padding: 14px 14px; gap: 12px; } .wd-wotd-oi, .wd-wotd-oi .oi { --oi: 50px; } .wd-wotd-t { font-size: 25px; } .wd-wotd-s { font-size: 15.5px; } }

.wd-segwrap { display: flex; justify-content: center; margin: 4px 0 12px; }
.wd-seg button { padding: 8px 16px; font-size: 14px; }
.wd-segn { font-weight: 500; color: var(--muted); margin-left: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.wd-filters { margin: 0 0 10px; }
.wd-chips { justify-content: center; }
@media (max-width: 699px) {
  /* one scrolling row of chips on phones */
  .wd-filters { margin: 0 -16px 8px; }
  .wd-chips { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding: 2px 16px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .wd-chips::-webkit-scrollbar { display: none; }
  .wd-chips .ui-chip { flex: none; white-space: nowrap; }
}

/* sticky filter + A–Z strip */
.wd-bar { position: sticky; top: var(--nxh); z-index: 6; margin: 0 -16px; padding: 8px 16px 4px; background: var(--bar-bg); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--border); transition: top .2s ease; }
body.nx-hdaway .wd-bar { top: 0; }
.wd-qrow { position: relative; display: flex; align-items: center; }
.wd-qi { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); line-height: 0; pointer-events: none; }
.wd-q { padding-left: 40px; padding-right: 40px; font-size: 17px; font-family: var(--serif); }
.wd-q::-webkit-search-cancel-button { display: none; }
.wd-qx { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; line-height: 0; display: grid; place-items: center; }
.wd-qx:hover { color: var(--rubric); background: var(--surface-2); }
.wd-qx.is-hidden { display: none; }
.wd-az { display: flex; margin: 6px 0 0; }
.wd-az.is-hidden { display: none; }
.wd-azb { flex: 1 1 0; min-width: 0; border: 0; background: transparent; padding: 5px 0; font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--rubric); cursor: pointer; border-radius: 6px; line-height: 1.1; }
.wd-azb:hover:not(:disabled) { background: var(--surface-2); }
.wd-azb:disabled { color: var(--faint); cursor: default; opacity: .55; }
@media (max-width: 520px) { .wd-azb { font-size: 13.5px; padding: 6px 0; } }

.wd-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-family: var(--sans); font-size: 13px; color: var(--muted); padding: 10px 2px 4px; }
.wd-info b { color: var(--ink-2); font-weight: 600; }
.wd-other { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--link); cursor: pointer; }
.wd-other:hover { text-decoration: underline; }

/* the virtual list: rows are absolutely placed; heights must match ROW_H / HEAD_H in words.js */
.wd-vl { position: relative; contain: layout; }
.wd-vl > * { position: absolute; left: 0; right: 0; top: 0; }
.wd-lh { display: flex; align-items: flex-end; gap: 12px; height: 46px; padding: 0 2px 5px; box-sizing: border-box; }
.wd-lh-l { font-family: var(--display); font-weight: 700; font-size: 27px; line-height: 1; color: var(--rubric); min-width: 1ch; }
.wd-lh-r { flex: 1; height: 1px; margin-bottom: 7px; background: linear-gradient(90deg, var(--gold-2), transparent); opacity: .7; }
.wd-row { display: flex; flex-direction: column; justify-content: center; height: 68px; box-sizing: border-box; padding: 6px 10px; text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.wd-row:hover, .wd-row:focus-visible { background: var(--surface); }
.wd-row:hover .wd-row-t { color: var(--rubric); }
.wd-row-top { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.wd-row-t { font-family: var(--serif); font-size: 19px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.wd-row-t em { font-style: normal; background: color-mix(in srgb, var(--gold-2) 30%, transparent); border-radius: 2px; }
.wd-row-k { margin-left: auto; flex: none; font-variant: small-caps; letter-spacing: .06em; font-size: 14px; color: var(--gold); white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.wd-row.is-g .wd-row-k { color: var(--rubric); }
.wd-row-s { font-family: var(--serif); font-size: 15px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.wd-empty:empty { display: none; }
.wd-credit { margin: 36px auto 0; font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--muted); text-align: center; max-width: 34rem; line-height: 1.5; }

/* ------------------------------------------------------------------ an entry */
.wd-ehead { text-align: center; margin: 10px 0 18px; }
.wd-cat { font-variant: small-caps; letter-spacing: .12em; font-size: 16px; color: var(--rubric); text-decoration: none; font-family: var(--serif); text-transform: lowercase; }
.wd-cat:hover { text-decoration: underline; text-underline-offset: 3px; }
.wd-title { font-family: var(--display); font-weight: 600; font-size: 44px; line-height: 1.06; margin: 6px 0 6px; color: var(--ink); overflow-wrap: anywhere; }
.wd-meaning { font-family: var(--serif); font-size: 18px; color: var(--ink-2); margin: 4px 0 0; }
.wd-meaning-l { font-variant: small-caps; letter-spacing: .08em; color: var(--muted); font-size: 16px; }
.wd-rule { color: var(--gold); font-size: 20px; margin-top: 10px; line-height: 1; }
@media (max-width: 520px) { .wd-title { font-size: 34px; } }

.wd-body { margin: 0 0 26px; }
.wd-body p { margin: 0 0 .85em; }
.wd-body .wd-p1 { min-height: 3em; }
.wd-drop { float: left; line-height: 0; margin: .3em .5em 0 0; }
.wd-drop .oi { --oi: calc((var(--lh) * 3 - .45) * 1em); float: none; margin: 0; }
.wd-body.is-short .wd-drop .oi { --oi: calc((var(--lh) * 2 - .3) * 1em); }
.wd-body.is-short .wd-p1 { min-height: 0; }
.wd-body::after { content: ""; display: block; clear: both; }
.wd-cite { color: var(--rubric); text-decoration: none; border-bottom: 1px dotted color-mix(in srgb, var(--rubric) 55%, transparent); white-space: nowrap; }
.wd-cite:hover { border-bottom-style: solid; }

.wd-note { border: 1px solid color-mix(in srgb, var(--gold-2) 55%, var(--border)); background: color-mix(in srgb, var(--gold-2) 11%, var(--surface)); border-radius: var(--r-2);
  padding: 12px 16px 14px; margin: 0 0 22px; font-family: var(--serif); font-size: 16.5px; line-height: 1.5; color: var(--ink-2); }
.wd-note p { margin: 4px 0 8px; }
.wd-note-h { display: flex; align-items: center; gap: 8px; font-family: var(--sans); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.wd-note-i { color: var(--rubric); font-size: 15px; line-height: 0; }
.wd-note.is-dc { border-color: var(--border-2); background: var(--surface); }

.wd-sees { display: flex; flex-wrap: wrap; gap: 7px; }
.wd-see { display: inline-block; font-family: var(--serif); font-size: 16px; line-height: 1.3; padding: 4px 12px; border-radius: var(--r-pill); border: 1px solid var(--border-2); background: var(--surface);
  color: var(--ink); text-decoration: none; }
.wd-see:hover { border-color: var(--rubric); color: var(--rubric); }
.wd-see.is-g { border-color: color-mix(in srgb, var(--rubric) 35%, var(--border-2)); }
.wd-see.is-book { font-family: var(--sans); font-size: 13.5px; font-weight: 600; color: var(--link); }

.wd-refs { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-ref, .wd-refmore { font-family: var(--serif); font-variant: small-caps; letter-spacing: .04em; font-weight: 600; color: var(--rubric); border: 1px solid var(--border-2); border-radius: var(--r-pill);
  padding: 1px 10px; font-size: 15.5px; line-height: 1.6; background: var(--surface); cursor: pointer; }
.wd-ref:hover { border-color: var(--rubric); }
.wd-catref { color: var(--c-cat); font-variant: normal; font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0; padding: 3px 10px; }
.wd-refmore { color: var(--link); font-variant: normal; font-family: var(--sans); font-size: 13px; border-style: dashed; }
.wd-hint { font-family: var(--sans); font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.wd-summas { display: flex; flex-direction: column; gap: 6px; }
.wd-summa { display: flex; gap: 10px; align-items: baseline; text-decoration: none; color: var(--ink-2); font-family: var(--serif); font-size: 16.5px; padding: 6px 12px; border-radius: var(--r-1);
  background: var(--surface); border: 1px solid var(--border); }
.wd-summa b { color: var(--c-st); font-family: var(--sans); font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.wd-summa:hover { border-color: var(--c-st); }
.wd-summa-t { min-width: 0; font-style: italic; }
.wd-entry .ui-sec { margin: 0 0 22px; }

.wd-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 30px 0 10px; border-top: 1px solid var(--border); padding-top: 14px; }
.wd-nav a { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); min-width: 0; padding: 4px 2px; }
.wd-nav a small { font-family: var(--sans); font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.wd-nav a span { font-family: var(--display); font-weight: 600; font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-nav a:hover span { color: var(--rubric); }
.wd-nav-n { text-align: right; align-items: flex-end; }
.wd-src { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--muted); line-height: 1.5; margin: 18px 0 0; }
.wd-src a { color: var(--link); font-style: normal; font-family: var(--sans); font-size: 13px; font-weight: 600; text-decoration: none; }

/* ------------------------------------------------------------------ previews & the look-up sheet */
.wd-pv { min-width: min(30rem, 80vw); }
.wd-pvtext p { margin: 0 0 .5em; }
.wd-vn { color: var(--rubric); font-family: var(--sans); font-size: .6em; font-weight: 700; }
.wd-pvsrc { font-variant: small-caps; letter-spacing: .06em; color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.wd-muted { color: var(--muted); font-style: italic; }
.wd-lklist { display: flex; flex-direction: column; margin: 0 -8px; }
.wd-lk .wd-row { height: 68px; }
.wd-lkfoot { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
.wd-lkmore { font-family: var(--sans); font-size: 13.5px; font-weight: 600; color: var(--link); text-decoration: none; }
.wd-lkmore:hover { text-decoration: underline; }
/* your notes & links on an entry */
.wd-nlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wd-n { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--gold-2); border-radius: var(--r-2); padding: 10px 12px; }
.wd-n.is-xref, .wd-n.is-inc { border-left-color: var(--link); }
.wd-nq { display: block; font-style: italic; color: var(--ink-2); margin-bottom: 4px; }
.wd-nto { font-family: var(--sans); font-weight: 650; font-size: 14.5px; color: var(--link); text-decoration: none; }
.wd-nlab { color: var(--muted); font-weight: 500; }
.wd-nt { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.wd-nmeta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-family: var(--sans); font-size: 12.5px; color: var(--muted); }
.wd-etools { justify-content: center; gap: 6px; margin-top: 10px; }
