/* Modern Monks - wordplays page. Plain CSS, no build step. P15: the reader's self-hosted fonts, same origin. */
@font-face { font-family: "EB Garamond"; src: url("/reader-assets/fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/reader-assets/fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); font-style: italic; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("/reader-assets/fonts/cinzel-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Gentium Book Plus"; src: url("/reader-assets/fonts/gentium-book-plus-greek-400-normal.woff2") format("woff2"); unicode-range: U+0370-03FF, U+1F00-1FFF; font-display: swap; }
@font-face { font-family: "Noto Serif Hebrew"; src: url("/reader-assets/fonts/noto-serif-hebrew-hebrew-400-normal.woff2") format("woff2"); unicode-range: U+0590-05FF, U+FB1D-FB4F; font-display: swap; }

:root, [data-theme="lamp"] {
  --bg: #15120d;  --bg2: #1d1813;  --panel: #221c15;
  --ink: #f2e8d5; --muted: #b8ab92;
  --accent: #e9b251;   /* Shadow amber */
  --accent2: #5ec0a8;  /* Paradox teal */
  --line: rgba(233, 178, 81, .18);
  --hit: rgba(233, 178, 81, .20);
  --glow: radial-gradient(1200px 600px at 70% -10%, #241d14 0%, #15120d 55%);
  --header: rgba(21, 18, 13, .92);
}
[data-theme="night"] {
  --bg: #0f141b;  --bg2: #141b25;  --panel: #18212d;
  --ink: #e9eef5; --muted: #93a4b8;
  --accent: #6aa9ff;
  --accent2: #a9c8f5;
  --line: rgba(106, 169, 255, .20);
  --hit: rgba(106, 169, 255, .20);
  --glow: radial-gradient(1200px 600px at 70% -10%, #17202c 0%, #0f141b 55%);
  --header: rgba(15, 20, 27, .92);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--glow) fixed, var(--bg);
  color: var(--ink);
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 18px; line-height: 1.5;
  overflow-x: hidden;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 18px; }

/* Header */
header { position: sticky; top: 0; z-index: 10; background: var(--header);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; }
.brand:hover { text-decoration: none; }
.lamp-dot { flex: 0 0 14px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand .name { font-family: Cinzel, "Trajan Pro", Georgia, serif; font-size: 1.3rem; letter-spacing: .04em; }
.tools { display: flex; gap: 8px; flex: 0 0 auto; }
.nav { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 7px;
  padding: 6px 11px; font: inherit; font-size: .9rem; cursor: pointer; }
.nav:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Intro and filters */
h1 { font-family: Cinzel, "Trajan Pro", Georgia, serif; font-weight: 500; color: var(--accent);
  font-size: 1.9rem; margin: 28px 0 6px; letter-spacing: .03em; }
.lede { color: var(--muted); max-width: 46em; margin: 0 0 18px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 18px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: var(--panel); color: var(--muted); border: 0; padding: 6px 13px; font: inherit;
  font-size: .9rem; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--bg2); color: var(--accent); }
.kind { color: var(--muted); font-size: .9rem; display: inline-flex; gap: 8px; align-items: center; }
select { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 7px;
  padding: 5px 8px; font: inherit; font-size: .9rem; max-width: 100%; }
.count { color: var(--muted); font-size: .85rem; }
.status { color: var(--muted); }
.status:empty { display: none; }

/* Pair cards */
.pairs { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.pair { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; min-width: 0; }
.pair[hidden] { display: none; }
.head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 12px; }
.head .en { font-style: italic; color: var(--ink); font-size: 1.05rem; }
.chip { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent2);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.head .where { color: var(--muted); font-size: .85rem; margin-left: auto; }

.words { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px; }
.words[dir="rtl"] { direction: rtl; }
.word { background: var(--bg2); border-radius: 10px; padding: 10px 12px; min-width: 0; text-align: center; }
.word .sur { color: var(--mm-orig, var(--accent)); font-size: 1.9rem; line-height: 1.3; overflow-wrap: anywhere; }
.hbo .sur { font-family: "SBL Hebrew", "Ezra SIL", "Frank Ruhl Libre", "Noto Serif Hebrew", "Times New Roman", serif; direction: rtl; }
.grc .sur { font-family: "Gentium Book Plus", "Gentium Plus", "SBL Greek", "Palatino Linotype", Georgia, serif; }
.word .seg-hit { color: var(--accent2); text-decoration: underline; text-underline-offset: .18em; }
.word .tr { direction: ltr; color: var(--muted); font-style: italic; font-size: .9rem; overflow-wrap: anywhere; }
.word .gl { direction: ltr; color: var(--accent2); font-size: .95rem; }
.word .go { direction: ltr; display: inline-block; margin-top: 4px; font-size: .82rem; }
.amp { align-self: center; color: var(--accent); font-size: 1.3rem; }

/* Skeletons: two rows of letter tiles; matched letters stand in the same column */
.skel { margin: 12px auto 4px; display: grid; gap: 4px; justify-content: center; }
.skel[dir="rtl"] { direction: rtl; }
.skel .t { width: 30px; height: 34px; display: grid; place-items: center; border-radius: 6px;
  font-size: 1.25rem; color: var(--muted); border: 1px solid transparent; }
.hbo .skel .t { font-family: "SBL Hebrew", "Ezra SIL", "Frank Ruhl Libre", "Noto Serif Hebrew", "Times New Roman", serif; }
.grc .skel .t { font-family: "Gentium Book Plus", "Gentium Plus", "Palatino Linotype", Georgia, serif; }
.skel .t.on { color: var(--ink); background: var(--hit); border-color: var(--accent); }
.skel .t.gap { border: 1px dashed var(--line); }
.skel-note { text-align: center; color: var(--muted); font-size: .78rem; margin: 0; }

.cite { margin: 12px 0 0; font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }
.cite b { color: var(--ink); font-weight: 500; }
.cite .also { display: block; font-size: .8rem; }

/* Footer */
footer { margin-top: 36px; border-top: 1px solid var(--line); padding: 8px 0 28px; color: var(--muted); font-size: .85rem; }
h2.sec { font-family: Cinzel, "Trajan Pro", Georgia, serif; font-size: .78rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent2); font-weight: 500; }
.sources { padding-left: 18px; margin: 0 0 10px; }
.sources li { margin: 2px 0; }
.credit { margin: 4px 0; }

/* Phone */
@media (max-width: 560px) {
  body { font-size: 17px; }
  .bar { padding: 10px 12px; }
  .wrap { padding: 0 12px; }
  .brand .name { font-size: 1.1rem; }
  h1 { font-size: 1.5rem; margin-top: 20px; }
  .pair { padding: 12px; }
  .head .where { margin-left: 0; width: 100%; }
  .words { grid-template-columns: 1fr 1fr; }
  .amp { display: none; }
  .word { padding: 8px 6px; }
  .word .sur { font-size: 1.5rem; }
  .skel .t { width: 25px; height: 30px; font-size: 1.1rem; }
}

/* P15: 40 px targets for every finger press (phone first). */
.nav, .seg button, select { min-height: 40px; }
a.nav { display: inline-flex; align-items: center; }
.word .go { display: inline-flex; align-items: center; min-height: 40px; }
.brand { min-height: 40px; }
@media (max-width: 560px) { .tools { gap: 6px; } .nav { padding: 6px 9px; } }
@media (max-width: 420px) {
  .bar { flex-wrap: nowrap; gap: 6px; padding: 8px; }
  .brand .name { font-size: .78rem; }
  .tools { flex: 1 1 auto; min-width: 0; }
}
