:root {
  --bg: #e6eef5;
  --panel: #f3f7fb;
  --panel-hover: #eaf1f7;
  --text: #14181e;
  --muted: #5a6570;
  --soft: #2e3842;
  --line: #d5dee8;
  --line-soft: #e2eaf1;
  --yellow: #2c5a7c;
  --cta: #1a2834;
  --on-cta: #f3f7fb;
  --play: #e2eef6;
  --on-play: #1a2834;
  --nav: #4a5866;
  --nav-on: #14181e;
  --header-bg: rgb(243 247 251 / 94%);
  --kicker: #5a6570;
  --foot-text: #3a4550;
  --copy: #6a7580;
  --hover-line: #c9d5e0;
  --play-border: #b4c6d6;
  --inset: inset 0 1px 0 rgb(255 255 255 / 0.35);
  --wash: rgb(220 234 246 / 0.28);
  --grain-blend: multiply;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 1.75rem;
  --space-7: 2.5rem;
  --space-8: 3.5rem;
  --radius: 0.85rem;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0908;
  --panel: #1c1e21;
  --panel-hover: #25272b;
  --text: #f4f4f4;
  --muted: #9b9b9b;
  --soft: #c8c8c8;
  --line: #26241f;
  --line-soft: #1c1b17;
  --yellow: #fff8d2;
  --cta: #f4f4f4;
  --on-cta: #111;
  --play: #fff8d2;
  --on-play: #111;
  --nav: #b8b8b8;
  --nav-on: #fff;
  --header-bg: rgb(28 30 33 / 94%);
  --kicker: #9a9a9a;
  --foot-text: #c8c8c8;
  --copy: #6a6a6a;
  --hover-line: #2c2a24;
  --play-border: #322f22;
  --inset: inset 0 1px 0 rgb(255 248 210 / 0.04);
  --wash: rgb(255 248 210 / 0.07);
  --grain-blend: normal;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

#about {
  scroll-margin-top: 6.75rem;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background-color: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Noto Sans", "Noto Sans Greek", "Helvetica Neue",
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  background-image: url("../img/grain-light.png"),
    url("../img/grain-light.png"),
    radial-gradient(
      ellipse 90% 55% at 50% -12%,
      var(--wash),
      transparent 58%
    );
  background-repeat: repeat, repeat, no-repeat;
  background-size: 80px 80px, 150px 150px, auto;
  background-attachment: fixed, fixed, fixed;
  background-blend-mode: multiply, multiply, normal;
}

html[data-theme="dark"] body {
  background-image: url("../img/grain.png"),
    radial-gradient(
      ellipse 90% 55% at 50% -12%,
      var(--wash),
      transparent 58%
    );
  background-repeat: repeat, no-repeat;
  background-size: 160px 160px, auto;
  background-attachment: fixed, fixed;
  background-blend-mode: var(--grain-blend), normal;
}

::selection {
  background: #1a2834;
  color: #f3f7fb;
}

html[data-theme="dark"] ::selection {
  background: var(--yellow);
  color: var(--on-cta);
}

a {
  color: inherit;
  text-decoration: none;
}

:focus {
  outline: none;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: 720px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 1.15rem var(--space-8);
  background: var(--panel);
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: var(--space-3);
  row-gap: 0.55rem;
  padding: var(--space-3) 0;
  overflow: visible;
  background: var(--header-bg);
}

.top::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  grid-column: 1;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  flex-shrink: 0;
}

.top .brand img {
  width: 72px;
  height: 72px;
}

.brand span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.08rem;
  min-width: 0;
}

.brand strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.brand small {
  display: block;
  font-size: 11px;
  line-height: 1.25;
  color: var(--muted);
  font-weight: 400;
}

.nav {
  display: none;
  align-items: center;
  gap: 1.25rem;
}

.nav a {
  position: relative;
  font-size: 13px;
  line-height: 1;
  color: var(--nav);
  transition: color 0.15s ease;
}

.nav a:hover {
  color: var(--nav-on);
}

.nav a.is-on {
  color: var(--nav-on);
}

.nav a.is-on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.4rem;
  height: 1px;
  background: var(--yellow);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  grid-column: 3;
  grid-row: 1;
  height: 2.25rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  background: var(--cta);
  color: var(--on-cta);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.cta:hover {
  filter: brightness(1.08);
}

.theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  grid-column: 2;
  grid-row: 1;
  height: 2.25rem;
  min-width: 3.6rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.theme:hover {
  background: var(--panel);
  border-color: var(--hover-line);
}

.search {
  position: relative;
  grid-column: 1 / -1;
  justify-self: start;
  width: 100%;
  max-width: 16.5rem;
  min-width: 0;
  margin-left: calc(72px + 0.75rem);
}

.search-input {
  width: 100%;
  height: 2.25rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  appearance: none;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-drop {
  position: fixed;
  z-index: 40;
  margin: 0;
  padding: 0.3rem 0;
  max-height: 18rem;
  overflow: auto;
  list-style: none;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--inset);
}

.search-drop[hidden] {
  display: none;
}

.search-drop:not([hidden]) {
  display: block;
}

.search-drop a {
  display: grid;
  gap: 0.1rem;
  padding: 0.55rem 0.85rem;
}

.search-drop li[aria-selected="true"] a,
.search-drop a:hover {
  background: var(--panel-hover);
}

.search-drop .el {
  font-size: 14px;
  font-weight: 500;
}

.search-drop .latin {
  font-size: 12px;
  color: var(--yellow);
}

.search-drop .en {
  font-size: 12px;
  color: var(--muted);
}

.search-empty {
  padding: 0.7rem 0.85rem;
  font-size: 13px;
  color: var(--muted);
}

.card .el[id] {
  scroll-margin-top: 6.75rem;
}

.hero {
  padding: var(--space-7) 0 0;
}

.kicker {
  margin: 0;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--kicker);
  font-weight: 500;
}

.kicker a {
  color: inherit;
}

.kicker a:hover {
  color: var(--nav-on);
}

.hero h1 {
  margin: var(--space-3) 0 0;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.035em;
}

.deck {
  margin: 0.45rem 0 0;
  font-size: 1.05rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
  font-weight: 400;
  color: var(--soft);
}

.lead {
  margin: var(--space-3) 0 0;
  max-width: 34em;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
  font-weight: 400;
}

.lead a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.lead a:hover {
  color: var(--nav-on);
}

.block {
  margin-top: var(--space-8);
}

.block-list {
  margin-top: var(--space-7);
}

.block h2 {
  margin: var(--space-3) 0 0;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.035em;
}

.title-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.title-link:hover {
  color: var(--yellow);
}

.block-doc {
  margin-top: 4.25rem;
}

.block-doc h2 {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.more-link,
.print-link {
  margin: var(--space-5) 0 0;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.more-link a,
.print-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--yellow);
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: color 0.15s ease;
}

.more-link a span,
.print-link a span {
  display: inline-block;
  font-weight: 400;
  transition: transform 0.15s ease;
}

.more-link a:hover,
.print-link a:hover {
  color: var(--text);
}

.more-link a:hover span,
.print-link a:hover span {
  transform: translateX(0.2em);
}

.faq-grid {
  display: grid;
  gap: 0.65rem;
  margin-top: var(--space-5);
}

.faq-item {
  margin: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--inset);
}

.faq-item[open] {
  background: var(--panel-hover);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.95rem;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin: 0;
  padding: 0 0.95rem 0.9rem;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.faq-item p a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.faq-words {
  margin: 0.15rem 0 0;
  padding: 0 0.95rem 0.95rem;
  list-style: none;
}

.faq-words li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 13px;
  line-height: 1.4;
}

.faq-words li + li {
  margin-top: 0.35rem;
}

.faq-words .el {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.faq-words .latin {
  color: var(--yellow);
}

.faq-words .en {
  color: var(--muted);
}

.faq-words .sep {
  color: var(--kicker);
}

.resources {
  margin-top: var(--space-6);
}

.resources h3 {
  margin: 0;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--kicker);
  font-weight: 500;
}

.resource-list {
  display: grid;
  gap: 0.65rem;
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.resource-list a {
  display: inline-block;
  color: var(--yellow);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.resource-list a:hover {
  color: var(--text);
}

.resource-list .en {
  margin-top: 0.35rem;
}

.player {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: var(--space-5);
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--inset);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.player:hover {
  background: var(--panel-hover);
}

.player.is-playing {
  border-color: var(--play-border);
}

.player button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--play);
  color: var(--on-play);
  cursor: pointer;
  appearance: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.player button:hover {
  filter: brightness(1.08);
}

.player button svg {
  display: block;
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.player .icon-pause,
.player.is-playing .icon-play {
  display: none;
}

.player.is-playing .icon-pause {
  display: block;
}

.player p {
  margin: 0;
}

.player .title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.player .meta {
  margin-top: 0.15rem;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 400;
}

.place {
  margin: var(--space-5) 0 0;
}

.place img {
  display: block;
  width: 100%;
  height: 13.25rem;
  object-fit: cover;
  object-position: 28% 72%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.clip {
  margin: var(--space-5) 0 0;
  max-width: 20.5rem;
}

.clip video {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #111;
}

.place figcaption,
.clip figcaption {
  margin: 0.45rem 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.place figcaption a,
.clip figcaption a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.place figcaption a:hover,
.clip figcaption a:hover {
  color: var(--nav-on);
}

.print-link {
  margin: var(--space-3) 0 0;
}

.grid,
.lists {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  margin: var(--space-6) 0 0;
  list-style: none;
}

.card-link {
  display: block;
  color: inherit;
}

.card-link h2 {
  margin: 0.4rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.card-link .el {
  margin-top: 0.7rem;
}

.card-link .en {
  margin-top: 0.45rem;
}

.card {
  height: 100%;
  margin: 0;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--inset);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) {
  .card:hover {
    background: var(--panel-hover);
    border-color: var(--hover-line);
  }
}

.card .el {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.card .letters {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin: 0;
  font-size: 2rem;
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: 0;
}

.card .letters span {
  font-size: 1.5rem;
  color: var(--soft);
  font-weight: 400;
}

.card .name {
  margin: 0.65rem 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.card .latin {
  margin: 0.3rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  font-weight: 400;
  color: var(--yellow);
}

.card .sound,
.card .translit {
  margin: 0.28rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  font-weight: 400;
  color: var(--muted);
}

.card .sound {
  margin-top: 0.5rem;
}

.card .lbl {
  display: inline;
  margin-right: 0.35rem;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kicker);
  font-weight: 500;
}

.card .en {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  font-weight: 400;
  color: var(--muted);
}

.foot {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.45;
  color: var(--foot-text);
}

.foot h2 {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kicker);
  font-weight: 500;
}

.foot ul {
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.foot li + li {
  margin-top: 0.45rem;
}

.foot a:hover {
  color: var(--nav-on);
}

.copy {
  margin: var(--space-4) 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--copy);
}

@media (max-width: 379px) {
  .wrap {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .top .brand img {
    width: 60px;
    height: 60px;
  }

  .search {
    margin-left: calc(60px + 0.75rem);
  }

  .brand small {
    display: none;
  }
}

@media (min-width: 640px) {
  .wrap {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .top {
    grid-template-columns: auto 1fr auto;
  }

  .nav {
    display: flex;
    justify-content: flex-end;
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
    gap: 1.25rem;
  }

  .theme {
    grid-column: 3;
    grid-row: 1;
  }

  .search {
    max-width: 16.5rem;
  }

  .top .cta {
    display: none;
  }

  .hero h1,
  .block-list h2 {
    font-size: 1.75rem;
  }

  .place img {
    height: 16.25rem;
  }

  .block-doc h2 {
    font-size: 1.3rem;
  }

  .faq-grid,
  .resource-list {
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
  }

  .card .el {
    font-size: 1.28rem;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
  }

  .foot {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: var(--space-5);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .player,
  .player button,
  .card,
  .nav a,
  .cta,
  .theme,
  .search-input,
  .search-drop a,
  .print-link a span,
  .more-link a,
  .more-link a span,
  .faq-item,
  .foot a {
    transition: none;
  }
}
