:root {
  color-scheme: dark;
  --base: #0d1420;
  --panel: #141f2e;
  --edge: #2c394c;
  --text: #f6f1e7;
  --muted: #b5becc;
  --gold: #efc583;
  --display: "Noto Serif Hebrew", "Times New Roman", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--base); color: var(--text); font: 16px/1.55 system-ui, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.shell { width: min(1100px, calc(100% - 56px)); margin-inline: auto; }
.header { background: #101926; border-bottom: 1px solid var(--edge); }
.nav { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font: 700 1.5rem var(--display); color: var(--gold); }
.nav-link { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); }
.nav-link:hover, .listen:hover { text-decoration: underline; text-underline-offset: .25em; }
.hero {
  position: relative; isolation: isolate; display: grid; align-items: center;
  min-height: 380px; margin-block-start: 24px; padding: clamp(25px, 6vw, 67px);
  background: #111a27; border: 1px solid var(--edge); border-radius: 20px; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(270deg,#111a27 12%,#111a27e6 32%,#111a2740 72%,#111a2722 100%),
    url("./assets/etude.webp") left center / 76% auto no-repeat;
}
h1, h2, h3 { margin: 0; line-height: 1.14; }
.hero h1 { font: 700 clamp(2.55rem, 5.7vw, 5.2rem)/1.05 var(--display); }
.hero strong { color: var(--gold); }
.hero p { color: #d7dde6; margin: 16px 0 24px; }
.button { display: inline-flex; align-items: center; min-height: 46px; border-radius: 9px; padding: 9px 16px; font-weight: 700; }
.gold { color: #21190f; background: var(--gold); }
.gold:hover { filter: brightness(1.08); }
.catalog { padding: 32px 0 42px; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 15px; }
.section-head h2 { font: 700 clamp(1.8rem, 3.8vw, 2.55rem)/1.15 var(--display); }
.section-head p, .card p, .status { color: var(--muted); margin: 5px 0 0; }
.search { width: min(100%, 300px); }
.search input { width: 100%; color: var(--text); background: #111b29; border: 1px solid var(--edge); border-radius: 9px; padding: 10px 13px; min-height: 46px; }
.search input::placeholder { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters button { min-height: 42px; cursor: pointer; padding: 6px 14px; color: var(--muted); background: #111b29; border: 1px solid var(--edge); border-radius: 30px; }
.filters button[aria-pressed="true"] { color: var(--gold); background: #342a20; border-color: #80633d; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.card { display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--edge); border-radius: 12px; padding: 17px 20px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .88rem; }
.topic { color: var(--gold); }
.card h3 { font: 700 1.5rem/1.22 var(--display); margin-top: 10px; }
.listen { display: inline-flex; align-items: center; align-self: start; min-height: 44px; margin-top: 7px; color: var(--gold); font-weight: 650; }
.listen::before { content: ""; width: .65em; height: .75em; margin-inline-end: .58em; background: currentColor; clip-path: polygon(0 0,100% 50%,0 100%); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media(max-width: 620px) {
  .shell { width: calc(100% - 28px); }
  .nav { min-height: 59px; }
  .hero { min-height: 325px; margin-block-start: 15px; border-radius: 15px; }
  .hero::before { background: linear-gradient(270deg,#111a27f7 4%,#111a27a8 62%,#111a2760), url("./assets/etude.webp") 68% center / cover no-repeat; }
  .section-head { align-items: stretch; flex-direction: column; gap: 12px; }
  .search { width: 100%; }
  .cards { grid-template-columns: 1fr; }
}
@media(prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.card-meta .topic { font-size: .88rem; }
.pending { color: var(--muted); font-size: .875rem; margin-top: 14px; }
.listen { background: none; border: 0; padding: 0; cursor: pointer; }
.player { background: var(--panel); border: 1px solid var(--edge); border-radius: 14px; padding: 20px; margin-block: 0 42px; }
.player-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.player-heading h2 { font: 700 1.6rem/1.15 var(--display); }
.player-heading p { color: var(--muted); margin: 6px 0 0; }
.player-heading label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
.player-heading select { font: inherit; min-height: 42px; border: 1px solid var(--edge); border-radius: 8px; padding-inline: 8px; background: #111b29; color: var(--text); }
audio { display: block; width: 100%; }
