/* ── variables ───────────────────────────────────────────── */

:root {
  --accent:      #3D3B8E;
  --accent-dark: #2f2d7a;
  --accent-light: #EEEEF8;
  --text:        #1a1a1a;
  --text-body:   #555;
  --muted:       #888;
  --muted-light: #aaa;
  --muted-warm:  #B4B2A9;
  --border:      #e0e0e0;
  --bg:          #fff;
  --bg-hover:    #f5f5f5;
}

/* ── reset & base ────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── animations ──────────────────────────────────────────────── */

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.2s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* ── layout ──────────────────────────────────────────────── */

.screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.inner {
  max-width: 560px;
  width: 100%;
}

.wide {
  max-width: 680px;
}

/* ── navbar ──────────────────────────────────────────────── */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 52px;
  border-bottom: 0.5px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.navbar-logo {
  font-family: 'Bricolage Grotesque', Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--accent);
}

.navbar-desc {
  font-size: 12px;
  color: var(--muted-light);
}

.navbar-links {
  display: flex;
  gap: 16px;
}

.navbar-link {
  font-size: 12px;
  color: var(--muted-light);
  text-decoration: none;
  transition: color 0.15s;
}

.navbar-link:hover { color: var(--accent); }

/* ── typography ──────────────────────────────────────────── */

.title {
  font-family: 'Bricolage Grotesque', Helvetica, sans-serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.next-title {
  font-family: 'Bricolage Grotesque', Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.next-body {
  font-size: 16px;
  color: var(--text-body);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.big-number {
  font-family: 'Bricolage Grotesque', Helvetica, sans-serif;
  font-size: 96px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1.5rem;
}

.divider {
  width: 32px;
  height: 1px;
  background: var(--border);
  margin-bottom: 2rem;
}

.source-link {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 0.5px solid var(--border);
}

.source-link:hover { color: var(--accent); }

.chart-source {
  font-size: 12px;
  color: var(--muted-light);
  margin-top: 0.25rem;
}

/* ── buttons ─────────────────────────────────────────────── */

.cbtn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.cbtn:hover:not(:disabled) { background: var(--bg-hover); }
.cbtn:disabled { opacity: 0.25; cursor: not-allowed; }

.nbtn {
  border: 0.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.nbtn:hover { background: var(--bg-hover); }

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

.nbtn.primary:hover { background: var(--accent-dark); }

.nbtn.back {
  color: var(--muted);
  border-color: var(--border);
}

.nbtn.back:hover { background: var(--bg-hover); color: var(--text); }

.option-btn {
  border: 0.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  padding: 14px 20px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}

.option-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── nav ─────────────────────────────────────────────────── */

.nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ── screen 1: counter ───────────────────────────────────── */

.counter-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.cnum {
  font-family: 'Bricolage Grotesque', Helvetica, sans-serif;
  font-size: 64px;
  font-weight: 400;
  color: var(--accent);
  min-width: 80px;
  text-align: center;
  line-height: 1;
}

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

.comment {
  min-height: 48px;
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 2rem;
  transition: opacity 0.3s;
}

/* ── screens 4 & 7: quiz ─────────────────────────────────── */

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1rem;
}

.s4-reaction {
  font-family: 'Bricolage Grotesque', Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

/* ── charts ──────────────────────────────────────────────── */

#chart-s4,
#chart-s5 {
  width: 100%;
  min-height: 300px;
  margin: 1.5rem 0;
}

#chart-s7 {
  width: 100%;
  min-height: 320px;
  margin: 1.5rem 0;
}

/* ── screen 8: publishers ────────────────────────────────── */

.pub-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.pub-head {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.pub-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--border);
  gap: 8px;
}

.pub-item:last-child { border-bottom: none; }

.pub-name {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.pub-count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

/* ── screen 9: authors lollipop ──────────────────────────── */

#chart-s9 {
  min-height: 320px;
}

.s9-col-heads {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.s9-col-head {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.s9-col-head--count {
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.s9-col-head--bar {
  flex: 2;
  padding-left: 2px;
}

.s9-col-head--name {
  flex: 1;
  padding-left: 10px;
}

.s9-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.s9-row--visible {
  opacity: 1;
  transform: translateY(0);
}

.s9-count {
  font-size: 12px;
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.s9-bar {
  flex: 2;
  display: flex;
  align-items: center;
}

.s9-line {
  height: 1px;
  background: var(--border);
}

.s9-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.s9-author {
  flex: 1;
  display: flex;
  gap: 0.5rem;
  padding-left: 10px;
}

.s9-name {
  font-size: 13px;
  color: var(--text);
  line-height: 1.3;
}

.s9-years {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.s9-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 0.5rem;
}

.s9-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.s9-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ── screen 11: amelina ──────────────────────────────────── */

.s11-separator {
  width: 32px;
  height: 1px;
  background: var(--border);
  margin: 2rem 0 1.25rem;
}

.s11-book-title {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

/* ── modifiers: spacing ──────────────────────────────────── */

.subtitle--quiz    { margin-bottom: 2rem; }
.nav--mt           { margin-top: 1.5rem; }
.nav--mt-2         { margin-top: 2rem; }
.next-body--mt     { margin-top: 1.5rem; }
.next-body--intro  { margin-top: 1rem; margin-bottom: 1.5rem; }
.next-body--shared { margin-top: 0.75rem; font-style: italic; }
.chart-source--mt  { margin-top: 1rem; }

/* ── modifiers: language colour ──────────────────────────── */

.s9-legend-dot--ukr { background: var(--accent); }
.s9-legend-dot--rus { background: var(--muted-warm); }
.pub-head--ukr      { color: var(--accent); }
.pub-head--rus      { color: var(--muted); }
.s9-count--ukr      { color: var(--accent); }
.s9-count--rus      { color: var(--muted); }
.s9-dot--ukr        { background: var(--accent); }
.s9-dot--rus        { background: var(--muted-warm); }

/* ── mobile ──────────────────────────────────────────────── */

@media (max-width: 600px) {
  .navbar {
    padding: 0 1rem;
  }

  .navbar-desc {
    display: none;
  }

  .navbar-links {
    gap: 12px;
  }
}