/* Файл MERIFONT.TTF — внутри TTF семейство называется «Chess Merida». */
@font-face {
  font-family: 'Chess Merida';
  /* Абсолютный путь: страница с /, CSS с /repertoire.css — относительный url ломался. */
  src: url('/repertoire/MERIFONT.TTF') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border-main: #d1d5db;
  --border-soft: #e5e7eb;
  --bg-soft: #f9fafb;
  --bg-hover: #f3f4f6;
  --accent: #ea580c;
  --accent-bg: #fff7ed;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  margin: 24px;
  color: var(--text-main);
}

h1 {
  margin: 0 0 14px;
}

h2 {
  margin: 0;
}

section {
  margin-bottom: 22px;
  padding: 14px 16px;
  border: 1px solid var(--border-main);
  border-radius: 10px;
  background: #fff;
}

.repertoire-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 12px;
}

.repertoire-section-head h2 {
  line-height: 1.25;
}

.repertoire-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  align-items: baseline;
}

.repertoire-toolbar button {
  padding: 6px 12px;
  border: 1px solid var(--border-main);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.95em;
  line-height: 1.25;
  color: var(--text-main);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.repertoire-toolbar button:hover {
  background: var(--bg-hover);
}

.repertoire-section > ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.repertoire-section > ul > li {
  list-style: none;
  margin: 0 0 10px;
}

.repertoire-section > ul > li:last-child {
  margin-bottom: 0;
}

details.repertoire-debut {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 6px 10px;
}

details.repertoire-debut > summary {
  cursor: pointer;
  list-style: none;
  display: block;
  position: relative;
  margin: 0;
  padding: 2px 0 2px 18px;
}

details.repertoire-debut > summary::-webkit-details-marker {
  display: none;
}

details.repertoire-debut > summary::marker {
  content: '';
}

details.repertoire-debut > summary::before {
  content: '▶';
  position: absolute;
  left: 0;
  top: 0.45em;
  flex: 0 0 auto;
  margin-top: 0;
  font-size: 0.7em;
  line-height: 1;
  color: var(--text-muted);
  transform: rotate(0deg);
  transition: transform 0.15s ease;
}

details.repertoire-debut[open] > summary::before {
  transform: rotate(90deg);
}

details.repertoire-debut > ul,
details.repertoire-debut > p {
  margin-top: 8px;
  margin-bottom: 2px;
  margin-left: 0;
  padding-left: 18px;
}

ul {
  margin: 0;
  padding-left: 1.2em;
}

li {
  margin-bottom: 5px;
}

li:last-child {
  margin-bottom: 0;
}

ul ul {
  margin-top: 6px;
}

.priority {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.priority h2 {
  color: #c2410c;
}

.note {
  color: var(--text-muted);
  font-size: 14px;
}

.san {
  font-family: ui-monospace, 'Cascadia Mono', 'Consolas', monospace;
  font-weight: 600;
  white-space: nowrap;
}

/* Как в chess-anki: фигура из SAN рисуется отдельным шрифтом. */
.figurine {
  font-family: 'Chess Merida', monospace;
  font-size: 1.08em;
  line-height: 1;
  position: relative;
  top: 1px;
  display: inline-block;
  min-width: 0.6em;
}

@media (max-width: 720px) {
  body {
    margin: 14px;
  }

  section {
    padding: 12px;
  }

  .repertoire-section-head {
    align-items: baseline;
  }

  .repertoire-toolbar button {
    padding: 6px 10px;
  }
}
