/* Gentium Plus and Noto Serif Hebrew are under the SIL Open Font License. See fonts/OFL-GentiumPlus.txt and fonts/OFL-NotoSerifHebrew.txt. */

@font-face {
  font-family: "Gentium Plus";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/gentium-plus-greek-400-italic.woff2") format("woff2");
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

@font-face {
  font-family: "Gentium Plus";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/gentium-plus-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Gentium Plus";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/gentium-plus-greek-ext-400-italic.woff2") format("woff2");
  unicode-range: U+1F00-1FFF;
}

@font-face {
  font-family: "Gentium Plus";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/gentium-plus-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Gentium Plus";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/gentium-plus-greek-700-italic.woff2") format("woff2");
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

@font-face {
  font-family: "Gentium Plus";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/gentium-plus-latin-700-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Gentium Plus";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/gentium-plus-greek-ext-700-italic.woff2") format("woff2");
  unicode-range: U+1F00-1FFF;
}

@font-face {
  font-family: "Gentium Plus";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/gentium-plus-latin-ext-700-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Gentium Plus";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/gentium-plus-greek-400-normal.woff2") format("woff2");
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

@font-face {
  font-family: "Gentium Plus";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/gentium-plus-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Gentium Plus";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/gentium-plus-greek-ext-400-normal.woff2") format("woff2");
  unicode-range: U+1F00-1FFF;
}

@font-face {
  font-family: "Gentium Plus";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/gentium-plus-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Gentium Plus";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/gentium-plus-greek-700-normal.woff2") format("woff2");
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

@font-face {
  font-family: "Gentium Plus";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/gentium-plus-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Gentium Plus";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/gentium-plus-greek-ext-700-normal.woff2") format("woff2");
  unicode-range: U+1F00-1FFF;
}

@font-face {
  font-family: "Gentium Plus";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/gentium-plus-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Noto Serif Hebrew";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/noto-serif-hebrew-hebrew-400-normal.woff2") format("woff2");
  unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;
}

@font-face {
  font-family: "Noto Serif Hebrew";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/noto-serif-hebrew-hebrew-700-normal.woff2") format("woff2");
  unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;
}

:root {
  color-scheme: light;
  --bg: #f3efe6;
  --text: #221e1a;
  --muted: #5e574e;
  --rule: #ddd6c8;
  --link: #6e342b;
  --glow: #b86a28;
  --code-bg: rgba(34, 30, 26, 0.05);
  --selection: #e4d2b0;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #161412;
    --text: #f3eee6;
    --muted: #c1b7a9;
    --rule: #3a342c;
    --link: #f0c2b0;
    --glow: #e0b15c;
    --code-bg: rgba(243, 238, 230, 0.06);
    --selection: #6a5344;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Gentium Plus", "Noto Serif Hebrew", "Iowan Old Style", Palatino, "Palatino Linotype", "Times New Roman", serif;
  font-size: 1.1875rem;
  line-height: 1.7;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  font-variant-numeric: oldstyle-nums;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--selection);
  color: var(--text);
}

.sheet {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.75rem 1.05rem 3.75rem;
}

@media (min-width: 42rem) {
  .sheet {
    padding: 3.25rem 1.5rem 5rem;
  }
}

.mast {
  margin: 0 0 1.65rem;
}

.mark {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-decoration: none;
  text-transform: uppercase;
}

.mark:hover {
  color: var(--text);
}

h1, h2, h3 {
  font-weight: 400;
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  margin: 0 0 0.9rem;
  font-size: 2.05rem;
  letter-spacing: -0.015em;
}

h2 {
  margin: 2.5rem 0 0.9rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-size: 1.5rem;
}

h3 {
  margin: 1.8rem 0 0.6rem;
  font-size: 1.25rem;
}

p, ul, ol, blockquote, pre {
  margin: 0 0 1em;
}

p, li, blockquote {
  text-wrap: pretty;
}

.lede {
  margin: 0;
  max-width: 28em;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.5;
}

.dateline {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.98rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.16em;
}

article a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

[lang="grc"] {
  font-family: "Gentium Plus", "Times New Roman", serif;
}

[lang="he"] {
  font-family: "Noto Serif Hebrew", "Gentium Plus", "Times New Roman", serif;
  font-variant-numeric: normal;
}

blockquote {
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
}

blockquote p:last-child {
  margin-bottom: 0;
}

ul, ol {
  padding-left: 1.25rem;
}

li {
  margin: 0.25em 0;
}

li::marker {
  color: var(--muted);
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
}

pre {
  overflow-x: auto;
  padding: 0.8rem 1rem;
  background: var(--code-bg);
}

pre code {
  font-size: 0.8rem;
}

.studies {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.studies li {
  border-top: 1px solid var(--rule);
}

.studies li:last-child {
  border-bottom: 1px solid var(--rule);
}

.studies a {
  display: block;
  padding: 0.95rem 0;
  color: inherit;
  text-decoration: none;
}

.studies time,
.studies .song-by {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.songs {
  margin-top: 0.35rem;
}

.study-title {
  display: block;
  font-size: 1.35rem;
  line-height: 1.3;
}

.studies a:hover .study-title,
.studies a:focus-visible .study-title {
  color: var(--link);
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

footer p {
  margin: 0;
}

body.song {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body.song .sheet {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding-bottom: 1rem;
}

body.song main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

body.song h1 {
  margin-bottom: 0.3rem;
}

.credit,
.song-note {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.player-frame {
  position: relative;
  width: 100%;
  margin: 0.35rem 0 0.55rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #221c16;
  border-radius: 0.4rem;
}

.player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

#lyrics-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

#lyrics {
  list-style: none;
  margin: 0;
  padding: 0;
}

#lyrics li {
  margin: 0;
}

.lyric {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.85rem;
  width: 100%;
  margin: 0.12rem 0;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--muted);
  font: inherit;
  line-height: 1.35;
  text-align: start;
  cursor: pointer;
}

.lyric-text {
  flex: 1 1 12rem;
}

.lyric-verse {
  flex: none;
  color: var(--glow);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.lyric.is-current {
  color: var(--text);
  background: color-mix(in srgb, var(--glow) 20%, transparent);
  box-shadow: inset 3px 0 0 var(--glow);
}

.lyric:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .lyric {
    transition: color 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease;
  }

  .lyric.is-current {
    animation: lyric-glow 2.8s ease-in-out infinite;
  }
}

@keyframes lyric-glow {
  0%,
  100% {
    background-color: color-mix(in srgb, var(--glow) 16%, transparent);
  }

  50% {
    background-color: color-mix(in srgb, var(--glow) 34%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lyric,
  .lyric.is-current {
    transition: none;
    animation: none;
  }
}

body.song footer {
  margin-top: 0.85rem;
}

@media print {
  :root {
    --bg: #fff;
    --text: #000;
    --muted: #222;
    --rule: #ccc;
    --link: #000;
    --glow: #555;
  }

  .sheet {
    max-width: none;
    padding: 0;
  }

  a {
    text-decoration: none;
  }
}
