:root {
  --fv-bg: #f7f8f7;
  --fv-surface: #ffffff;
  --fv-text: #171717;
  --fv-muted: #626b66;
  --fv-line: #d8ddd8;
  --fv-accent: #0f766e;
  --fv-gold: #b7791f;
  --fv-burgundy: #7f1d1d;

  /* design tokens per plan */
  --fv-radius-sm: 6px;
  --fv-radius-md: 10px;
  --fv-shadow-card: 0 2px 12px rgba(0,0,0,0.06);
  --fv-font-display: clamp(28px, 4vw, 48px);
  --fv-font-body: 17px;
  --fv-font-small: 13px;
  --fv-hover: #f8fafc;
}

body {
  background: var(--fv-bg);
  color: var(--fv-text);
}

.gh-navigation {
  background: rgba(247, 248, 247, 0.94);
  border-bottom: 1px solid var(--fv-line);
  backdrop-filter: blur(12px);
}

.gh-navigation-logo,
.gh-footer-logo {
  font-weight: 850;
}

.gh-navigation-menu a,
.gh-navigation-actions a {
  font-weight: 650;
}

.gh-navigation-menu .nav-current a {
  color: var(--fv-accent);
}

.gh-navigation-menu .nav-telegram a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 6px;
  color: #ffffff;
  background: #0f766e;
  text-decoration: none;
}

.gh-navigation-menu .nav-telegram a::before {
  content: "TG";
  margin-right: 7px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  font-weight: 850;
}

.gh-navigation-menu .nav-telegram a:hover {
  background: #0b5f58;
}

.gh-navigation-members {
  display: none;
}

/* Ghost theme hides nav until JS adds is-dropdown-loaded — override for static site */
#gh-navigation .gh-navigation-menu,
#gh-navigation .gh-navigation-actions {
  opacity: 1 !important;
  position: static !important;
  visibility: visible !important;
}

#gh-navigation .gh-navigation-menu .nav > li {
  opacity: 1 !important;
}

/* Mobile nav */
@media (max-width: 991px) {
  .gh-navigation-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--fv-bg);
    border-bottom: 1px solid var(--fv-line);
    padding: 12px 0;
    z-index: 1000;
  }
  .gh-navigation-menu.is-open {
    display: flex;
  }
  .gh-navigation-menu .nav {
    flex-direction: column;
    gap: 0;
    padding: 0 clamp(24px, 4vw, 56px);
  }
  .gh-navigation-menu .nav li a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--fv-line);
  }
  #gh-navigation {
    position: relative;
  }
}

.gh-button {
  border-radius: 6px;
  background: var(--fv-accent);
}

.gh-card-tag,
.gh-article-tag {
  color: var(--fv-accent);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-template .gh-header {
  padding-top: clamp(28px, 4vw, 52px);
}

.gh-card {
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.gh-card:hover {
  transform: translateY(-2px);
}

.gh-card-link {
  border-color: var(--fv-line);
}

.gh-card-title {
  font-weight: 820;
}

.gh-card-excerpt,
.gh-article-excerpt,
.gh-card-date,
.gh-article-meta-content {
  color: var(--fv-muted);
}

.gh-card-image {
  filter: saturate(0.92) contrast(1.04);
}

.gh-content h2 {
  margin-top: 1.55em;
  padding-top: 0.9em;
  border-top: 1px solid var(--fv-line);
  font-size: 2.4rem;
}

.gh-content p,
.gh-content li {
  font-size: 1.85rem;
  line-height: 1.8;
}

.gh-content a {
  color: var(--fv-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.gh-content table,
.kg-html-card table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  white-space: normal;
  border-top: 2px solid var(--fv-text);
}

.gh-content table th,
.gh-content table td,
.kg-html-card table th,
.kg-html-card table td {
  white-space: normal;
  word-break: break-word;
  vertical-align: top;
  padding: 9px 12px;
  border-bottom: 1px solid var(--fv-line);
  font-size: 1.45rem;
  line-height: 1.5;
}

.gh-content table th,
.kg-html-card table th {
  color: var(--fv-muted);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.kg-html-card table td:first-child,
.gh-content table td:first-child {
  font-weight: 700;
}

.gh-footer {
  border-top: 1px solid var(--fv-line);
  background: #101413;
  color: #f3f7f5;
}

.gh-footer a,
.gh-footer-signup-subhead {
  color: rgba(243, 247, 245, 0.76);
}

.gh-footer-signup {
  display: none;
}

.gh-footer-copyright {
  display: none;
}



/* ── Кнопка «наверх» ───────────────────────────────── */
#fv-back-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--fv-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
  pointer-events: none;
}

#fv-back-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

#fv-back-top:hover {
  background: #0b5f58;
}

@media (max-width: 600px) {
  .gh-content table,
  .kg-html-card table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .gh-content table th,
  .gh-content table td,
  .kg-html-card table th,
  .kg-html-card table td {
    font-size: 1.2rem;
    padding: 6px 8px;
  }
}

/* ── Analytics articles ─────────────────────────────── */

.fva-match-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: var(--fv-hover);
  border: 1px solid var(--fv-line);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 0.5rem;
  flex-wrap: wrap;
}
.fva-team {
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  flex: 1;
  min-width: 100px;
}
.fva-vs {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--fv-muted);
  flex-shrink: 0;
}
.fva-meta {
  text-align: center;
  font-size: 0.85rem;
  color: var(--fv-muted);
  margin: 0.25rem 0 1.5rem !important;
}

.fva-standings {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}
.fva-standings th {
  background: var(--fv-accent);
  color: #fff;
  padding: 0.45rem 0.7rem;
  text-align: left;
  font-weight: 600;
}
.fva-standings td {
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--fv-line);
}
.fva-standings tr:nth-child(even) td { background: var(--fv-hover); }
.fva-standings .hl td { font-weight: 700; color: var(--fv-accent); }

.fva-formation-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 580px) { .fva-formation-wrap { grid-template-columns: 1fr; } }

.fva-formation {
  background: #064e3b;
  border-radius: 10px;
  padding: 1rem;
  color: #fff;
}
.fva-formation-title {
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fva-row {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.fva-p {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 5px;
  padding: 0.25rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  min-width: 52px;
  text-align: center;
}
.fva-p.k { background: rgba(251,191,36,0.3); border-color: rgba(251,191,36,0.6); }

.fva-battle {
  border-left: 3px solid var(--fv-accent);
  padding: 0.7rem 1rem;
  background: #f0fdf4;
  border-radius: 0 8px 8px 0;
  margin: 0.75rem 0;
}
.fva-battle strong { color: var(--fv-accent); display: block; margin-bottom: 0.3rem; }

.fva-quote {
  border-left: 4px solid var(--fv-accent);
  padding: 0.9rem 1.25rem;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--fv-text);
  margin: 1.25rem 0;
  background: #f0fdf4;
  border-radius: 0 8px 8px 0;
}

/* Winline banner in analytics articles */
.fva-partner {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0 1rem;
  text-align: center;
}
.fva-partner-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fv-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.6rem !important;
}
.fva-partner-cta {
  display: inline-block;
  background: #1d4ed8;
  color: #fff !important;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none !important;
  font-size: 0.95rem;
}
.fva-partner-cta:hover { background: #1e40af; }
.fva-partner-disclaimer {
  font-size: 0.72rem;
  color: var(--fv-muted);
  margin: 0.6rem 0 0 !important;
}

/* ── RatingWidget (extracted) ─────────────────────────── */
.fv-rating {
  background: var(--fv-surface);
  border: 1px solid var(--fv-line);
  min-width: min(340px, 100%);
  border-radius: var(--fv-radius-sm);
  overflow: hidden;
}
.fv-rating-head {
  padding: 8px 14px 7px;
  border-bottom: 1px solid var(--fv-line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.fv-rating-kicker {
  font-size: 1rem;
  font-weight: 800;
  color: var(--fv-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
}
.fv-rating-meta {
  font-size: 1rem;
  color: var(--fv-muted);
  white-space: nowrap;
}
.fv-rating-row {
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fv-rating-row.has-border {
  border-bottom: 1px solid var(--fv-line);
}
.fv-rating-rank {
  font-size: 14px;
  min-width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.fv-rating-model {
  flex: 1;
  min-width: 0;
}
.fv-rating-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fv-text);
  line-height: 1;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fv-rating-bar {
  height: 4px;
  background: var(--fv-line);
  border-radius: 2px;
}
.fv-rating-fill {
  height: 4px;
  background: var(--fv-accent);
  border-radius: 2px;
}
.fv-rating-score {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fv-text);
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
}
.fv-rating-denom { font-weight: 400; color: var(--fv-muted); }
.fv-rating-pct {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--fv-muted);
  line-height: 1;
}
.fv-rating-foot {
  padding: 7px 14px;
  border-top: 1px solid var(--fv-line);
  text-align: right;
}
.fv-rating-foot a {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fv-accent);
  text-decoration: none;
}

/* ── Sidebar for II-prognozy posts ───────────────────── */
.fv-sidebar {
  border: 1px solid var(--fv-line);
  background: var(--fv-surface);
  border-radius: var(--fv-radius-sm);
  align-self: start;
}
.fv-sidebar.is-mini {
  border: none;
  background: transparent;
}
.fv-sidebar-widget {
  padding: 14px;
}
.fv-sidebar-widget + .fv-sidebar-widget {
  border-top: 1px solid var(--fv-line);
  padding-top: 14px;
}
.fv-sidebar-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--fv-muted);
  margin: 0 0 10px;
}
.fv-sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}
.fv-sidebar-list li a {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  color: inherit;
  text-decoration: none;
}
.fv-sidebar-list li.is-current a {
  color: var(--fv-accent);
  font-weight: 700;
}
.fv-sidebar-date {
  color: var(--fv-muted);
  white-space: nowrap;
  min-width: 42px;
  flex-shrink: 0;
}
.fv-sidebar-label {
  line-height: 1.3;
}
.fv-sidebar-rating {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  font-size: 14px;
}
.fv-sidebar-rating li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.fv-sidebar-rating .is-first { font-weight: 700; }
.fv-sr-rank { width: 18px; }
.fv-sr-name { flex: 1; }
.fv-sr-pct { color: var(--fv-accent); font-weight: 700; }
.fv-sidebar-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--fv-accent);
  text-decoration: none;
}

/* ── AI post layout with sidebar ─────────────────────── */
.fv-ai-post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 24px);
}
@media (max-width: 860px) {
  .fv-ai-post-layout {
    grid-template-columns: 1fr;
  }
  .fv-ai-post-layout .fv-sidebar:not(.is-mini) {
    display: none; /* desktop sidebar hidden on mobile */
  }
}
.fv-ai-post-layout .gh-article {
  min-width: 0;
}

/* Mobile collapsible releases */
.fv-ai-mobile-nav {
  margin: 0 0 16px;
  border: 1px solid var(--fv-line);
  border-radius: var(--fv-radius-sm);
  background: var(--fv-surface);
  font-size: 14px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.fv-ai-mobile-nav summary {
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.fv-ai-mobile-nav summary::-webkit-details-marker { display: none; }
.fv-ai-mobile-nav[open] summary {
  border-bottom: 1px solid var(--fv-line);
}
.fv-ai-mobile-nav .fv-sidebar {
  border: none;
  padding: 8px 14px 12px;
}
@media (min-width: 861px) {
  .fv-ai-mobile-nav { display: none; } /* hide mobile on desktop */
}

/* Refine ai home grid slightly using tokens */
.fv-ai-item { border-radius: var(--fv-radius-sm); }

/* Breadcrumbs global tweaks */
.fv-breadcrumbs {
  margin-bottom: 0.75rem;
}

/* SEO improvements for articles */
.seo-intro {
  font-size: 1.1rem;
  color: var(--fv-muted);
  margin: 1rem 0 1.5rem;
  line-height: 1.5;
}

.gh-content h2 {
  margin-top: 1.8rem;
}

.gh-content > ul {
  margin: 0.8rem 0 1.2rem;
  padding-left: 1.1rem;
}

.gh-content > ul li {
  margin-bottom: 0.35rem;
}

/* Avoid duplicate tag navigation when breadcrumbs present */
.gh-article-header .fv-breadcrumbs + a.gh-article-tag,
.gh-article-header .fv-breadcrumbs ~ a.gh-article-tag {
  display: none;
}

/* Let breadcrumbs be fluid inside article containers (gh-canvas already constrains) */
.gh-article .fv-breadcrumbs,
.fv-ai-post-layout .fv-breadcrumbs {
  max-width: none;
  padding: 0;
  margin-left: 0;
  margin-right: 0;
}

/* When placed inside .fva-list-header, inherit the parent's padding/max-width */
.fva-list-header .fv-breadcrumbs {
  max-width: none;
  margin: 0;
  padding: 0;
  margin-bottom: 0.5rem;
}

/* Inside gh-header-inner (Casper theme) */
.gh-header-inner .fv-breadcrumbs {
  max-width: none;
  margin: 0 0 0.5rem;
  padding: 0;
}

.fv-section-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Footer note */
.fv-footer-note {
  margin-top: 10px;
  font-size: var(--fv-font-small);
  color: rgba(243, 247, 245, 0.65);
  text-align: center;
}
