/* TopOnlineForexBrokers — stylesheet
   Clean white fintech look: navy ink, blue + green accents, bold grotesque headings. */

:root {
  --bg: #ffffff;
  --panel: #f5f8fc;
  --card: #ffffff;
  --ink: #16243a;
  --muted: #5d6b80;
  --line: #e2e8f0;
  --line-soft: #edf1f7;
  --blue: #1d5fd2;
  --blue-dark: #123c8c;
  --blue-soft: #e8f0fe;
  --green: #0e9f6e;
  --green-dark: #0b7d57;
  --gold: #eab308;
  --amber: #b45309;
  --red: #d64533;
  --footer-bg: #0f2036;
  --heading: "Archivo", -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sans: -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  border-top: 4px solid var(--blue-dark);
}

h1, h2, h3 {
  font-family: var(--heading);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- плавающий декор по краям ---------- */

.edge-decor {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 140px;
  z-index: 0;
  pointer-events: none;
  display: none;
  color: #c3d2ea;
}
.edge-decor--left { left: 0; }
.edge-decor--right { right: 0; }

.edge-decor span {
  position: absolute;
  display: block;
  opacity: 0.55;
  animation-name: edge-bob;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
.edge-decor span:nth-child(2n) { animation-name: edge-bob-alt; }
.edge-decor svg { width: 100%; height: 100%; display: block; }

@keyframes edge-bob {
  from { transform: translateY(0) rotate(-5deg); }
  to   { transform: translateY(-26px) rotate(4deg); }
}
@keyframes edge-bob-alt {
  from { transform: translateY(-14px) rotate(5deg); }
  to   { transform: translateY(14px) rotate(-4deg); }
}

@media (min-width: 1440px) {
  .edge-decor { display: block; }
}

.site-header, .main, .footer { position: relative; z-index: 1; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.brand-mark { flex: 0 0 auto; display: block; }

.brand-text {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.04rem;
  letter-spacing: -0.01em;
}
.brand-text b { color: var(--blue); font-weight: 800; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 34px;
  padding: 7px 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

.nav {
  display: flex;
  gap: 2px;
  margin-left: 4px;
}

.nav a {
  position: relative;
  padding: 6px 11px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 6px;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 2px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}
.nav a:hover { text-decoration: none; }
.nav a:hover::after { transform: scaleX(1); }

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-search { position: relative; }

.search {
  width: 190px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.search::placeholder { color: var(--muted); }
.search:focus { border-color: var(--blue); background: #fff; outline: none; }

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 340px;
  max-height: 420px;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(22, 36, 58, 0.14);
  z-index: 40;
}

.search-result {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
}
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: var(--blue-soft); text-decoration: none; }
.search-result strong { display: block; font-size: 0.93rem; }
.search-result span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result--all strong, .search-result--empty strong { color: var(--blue); }

/* ---------- buttons ---------- */

.button {
  display: inline-block;
  padding: 10px 20px;
  background: var(--blue);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--blue);
  border-radius: 8px;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(18, 60, 140, 0.28);
}
.button:active { transform: translateY(0); box-shadow: none; }

.btn-arrow {
  display: inline-block;
  margin-left: 7px;
  transition: transform 0.18s ease;
}
.button:hover .btn-arrow { transform: translateX(4px); }

.button.secondary {
  background: #fff;
  color: var(--blue);
}
.button.secondary:hover {
  background: var(--blue-soft);
  color: var(--blue-dark);
  box-shadow: none;
}

.header-cta { padding: 8px 15px; font-size: 0.9rem; }

/* ---------- layout ---------- */

.main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 20px 48px;
}

.breadcrumbs {
  padding: 14px 2px 4px;
  font-size: 0.82rem;
  color: var(--muted);
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs span { margin: 0 6px; color: var(--line); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  gap: 40px;
  align-items: center;
  padding: 30px 2px 36px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.hero-main, .hero > .score-panel, .hero > .hero-art { position: relative; z-index: 1; }

/* фоновая «биржевая» абстракция: дрейфующие свечи + дорисовывающийся график */
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  color: var(--blue-dark);
  opacity: 0.05;
  pointer-events: none;
}
.hero-backdrop svg { width: 100%; height: 100%; }

.drift-slow { animation: drift-slow 80s linear infinite alternate; }
.drift-fast { opacity: 0.55; animation: drift-fast 52s linear infinite alternate; }

@keyframes drift-slow {
  from { transform: translateX(0); }
  to   { transform: translateX(-120px); }
}
@keyframes drift-fast {
  from { transform: translateX(-40px); }
  to   { transform: translateX(90px); }
}

.chart-line {
  stroke: var(--blue);
  stroke-width: 2.4;
  opacity: 0.9;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: draw-line 2.6s ease-out 0.4s forwards;
}
@keyframes draw-line { to { stroke-dashoffset: 0; } }

.hero-eyebrow, .page-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(14, 159, 110, 0.4);
  animation: pulse-dot 2.4s ease-out infinite;
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(14, 159, 110, 0.4); }
  70%  { box-shadow: 0 0 0 8px rgba(14, 159, 110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 159, 110, 0); }
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
}

.h1-flag { font-size: 0.82em; margin-right: 2px; }

/* рисованный «росчерк» под заголовком */
.h1-flourish {
  display: block;
  width: 190px;
  height: 10px;
  margin: -2px 0 14px;
  stroke: var(--gold);
  stroke-width: 3;
}
.h1-flourish path {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: draw-line 0.9s ease-out 0.25s forwards;
}

.dek {
  margin: 0 0 16px;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.02rem;
}

.trust-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}

.trust-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--ink);
}
.trust-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; }

.hero-art {
  justify-self: center;
  width: min(270px, 80%);
}
.hero-art svg { width: 100%; height: auto; display: block; }

/* анимация мокапа шорт-листа */
.mock-bar {
  transform: scaleX(0);
  transform-origin: left;
  animation: mock-bar-grow 1s cubic-bezier(0.25, 0.9, 0.3, 1) forwards;
}
.mock-bar-1 { animation-delay: 0.5s; }
.mock-bar-2 { animation-delay: 0.8s; }
@keyframes mock-bar-grow { to { transform: scaleX(1); } }

.mock-card-2 { opacity: 0; animation: mock-rise 0.5s ease-out 0.25s forwards; }
.mock-card-3 { opacity: 0; animation: mock-rise 0.5s ease-out 0.45s forwards; }
@keyframes mock-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mock-shield {
  transform: scale(0);
  transform-origin: 236px 34px;
  animation: mock-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 1.15s forwards;
}
@keyframes mock-pop { to { transform: scale(1); } }

/* ---------- stats band (главная) ---------- */

.stats-band {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 0;
  align-items: stretch;
  padding: 26px 2px 22px;
  border-bottom: 1px solid var(--line);
}

.stat {
  text-align: center;
  padding: 0 38px;
  max-width: 220px;
}
.stats-band .stat + .stat { border-left: 1px solid var(--line-soft); }

.stat strong {
  display: block;
  font-family: var(--heading);
  font-weight: 800;
  font-size: 3.1rem;
  line-height: 1;
  color: var(--blue-dark);
  font-variant-numeric: tabular-nums;
}
.stat > span {
  display: block;
  margin-top: 6px;
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--muted);
}
.stat--note strong { color: var(--green); }

/* барабаны одометра: высота ряда и шаг сдвига обязаны совпадать (ровно 1em) */
.stat strong { line-height: 1; }
.odo-digit {
  display: inline-block;
  height: 1em;
  overflow: hidden;
  vertical-align: baseline;
}
.odo-reel {
  display: block;
  transition: transform 1.1s cubic-bezier(0.22, 0.75, 0.25, 1);
  will-change: transform;
}
.odo-reel span {
  display: block;
  height: 1em;
  line-height: 1;
  font-size: inherit;
  color: inherit;
  margin: 0;
}

/* ---------- лента логотипов брокеров ---------- */

.logo-marquee {
  padding: 18px 2px 6px;
  border-bottom: 1px solid var(--line);
}
.marquee-label {
  margin: 0 0 12px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.marquee-viewport {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  padding-bottom: 14px;
  animation: marquee 60s linear infinite;
}
.marquee-viewport:hover .marquee-track { animation-play-state: paused; }

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.marquee-item:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 12px rgba(22, 36, 58, 0.1);
  text-decoration: none;
}
.marquee-item img {
  height: 20px;
  width: 20px;
  object-fit: contain;
  border-radius: 4px;
}
.marquee-item span {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- clone-firm / scam note ---------- */

.scam-note {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 22px 0 4px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  position: relative;
}
.scam-note::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 3px 3px 0;
  background: repeating-linear-gradient(180deg, var(--gold) 0 8px, transparent 8px 14px);
}
.scam-note svg { flex: 0 0 auto; margin-top: 2px; }
.scam-note strong { display: block; margin-bottom: 3px; font-size: 0.95rem; }
.scam-note p { margin: 0; font-size: 0.88rem; color: var(--muted); max-width: 90ch; }

/* ---------- page tools ---------- */

.page-tools {
  margin: 4px 2px 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.88rem;
  color: var(--muted);
}
.page-tools a { margin: 0 2px; font-weight: 500; }

/* ---------- broker fact sheet ---------- */

.score-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 6px 22px rgba(22, 36, 58, 0.07);
}

.logo-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 12px;
}

.logo-initials, .broker-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--blue-dark);
  color: #eef4ff;
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1rem;
}
.broker-initials { width: 30px; height: 30px; font-size: 0.78rem; border-radius: 6px; }

.logo-initials.has-logo, .broker-initials.has-logo {
  background: #fff;
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.logo-initials img, .broker-initials img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.meta-line { margin: 2px 0 0; font-size: 0.8rem; color: var(--muted); }

.score-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.score-line strong {
  font-family: var(--heading);
  font-weight: 800;
  font-size: 2.3rem;
  line-height: 1;
  color: var(--blue-dark);
}
.score-line span { font-size: 0.85rem; color: var(--muted); }

.score-components { margin: 4px 0 12px; }

.component-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 0.82rem;
}
.component-row span { color: var(--muted); }
.component-row strong { font-weight: 600; font-size: 0.8rem; }

.component-track {
  height: 6px;
  background: var(--line-soft);
  border-radius: 3px;
  overflow: hidden;
}
.component-track i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 1.1s cubic-bezier(0.25, 0.9, 0.3, 1);
}

.component-row--note { grid-template-columns: 1fr auto; }
.component-row--note strong { color: var(--red); }

.score-facts { margin: 0 0 10px; }
.score-facts div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 0.85rem;
}
.score-facts dt { color: var(--muted); }
.score-facts dd { margin: 0; }

.score-muted { margin: 0; font-size: 0.78rem; color: var(--muted); }

/* ---------- verdict ---------- */

.verdict-panel {
  margin: 22px 0 6px;
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 10px;
}

.verdict-copy h2 { margin: 0 0 6px; font-size: 1.3rem; }
.verdict-copy p { margin: 0 0 14px; font-size: 0.9rem; color: var(--muted); }

.verdict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.verdict-card strong {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue);
  margin-bottom: 4px;
}
.verdict-card span { font-size: 0.88rem; }

/* ---------- sections ---------- */

.content-grid { display: block; }

.section { padding: 26px 2px 6px; }

/* зигзаг: текст и крупная бледная иконка меняются сторонами от секции к секции */
.prose-body { min-width: 0; }

.section-watermark {
  display: none;
  color: var(--blue-soft);
  align-self: center;
  justify-self: center;
}
.section-watermark svg {
  width: 150px;
  height: 150px;
  stroke: #dbe7fa;
  transform: rotate(-6deg);
}

@media (min-width: 1000px) {
  .prose-section--left, .prose-section--right {
    display: grid;
    gap: 48px;
    align-items: center;
  }
  .prose-section--left { grid-template-columns: minmax(0, 68ch) 1fr; }
  .prose-section--right { grid-template-columns: 1fr minmax(0, 68ch); }
  .prose-section--right .prose-body { order: 2; }
  .prose-section--right .section-watermark { order: 1; }
  .prose-section--right .section-watermark svg { transform: rotate(6deg); }
  .prose-section--left .section-watermark, .prose-section--right .section-watermark { display: block; }
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.section-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue-dark);
}
.section-icon svg { width: 21px; height: 21px; }

.section h2, .faq h2, .sources h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--blue);
  display: inline-block;
}
.section-title h2 { margin: 0; }

.prose-section p {
  max-width: 74ch;
  margin: 0 0 14px;
}

/* карточки Pros / Cons */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 800px) {
  .pros-cons { grid-template-columns: 1fr 1fr; }
}

.pc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: 10px;
  padding: 16px 20px;
}
.pc-card--cons { border-top-color: var(--red); }

.pc-card strong {
  display: block;
  margin-bottom: 10px;
  font-family: var(--heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.pc-card--pros strong { color: var(--green-dark); }
.pc-card--cons strong { color: var(--red); }

.pc-card ul { list-style: none; margin: 0; padding: 0; }
.pc-card li {
  position: relative;
  padding: 5px 0 5px 26px;
  font-size: 0.92rem;
}
.pc-card li + li { border-top: 1px dashed var(--line-soft); }

.pc-card--pros li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.85em;
  width: 11px;
  height: 6px;
  border-left: 2.4px solid var(--green);
  border-bottom: 2.4px solid var(--green);
  transform: rotate(-45deg);
}
.pc-card--cons li::before,
.pc-card--cons li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: calc(0.85em + 2px);
  width: 12px;
  height: 2.4px;
  border-radius: 1px;
  background: var(--red);
  transform: rotate(45deg);
}
.pc-card--cons li::after { transform: rotate(-45deg); }

.pc-note {
  margin: 12px 2px 0;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 90ch;
}

/* панель-вывод для «Our verdict» и подобных */
.prose-section--callout {
  margin-top: 20px;
  padding: 20px 24px 12px;
  background: linear-gradient(135deg, var(--blue-soft), #f2fbf7);
  border: 1px solid #d6e4fb;
  border-radius: 12px;
}
.prose-section--callout .section-title h2 { border-bottom: 0; padding-bottom: 0; }
.prose-section--callout .section-icon { background: #fff; }
.prose-section--callout p { font-size: 1.02rem; }

/* печать вердикта справа */
.prose-section--callout.has-stamp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 26px;
  align-items: center;
}
.callout-copy { min-width: 0; }

.callout-stamp { justify-self: center; }

.verdict-stamp {
  width: 158px;
  height: 158px;
  transform: rotate(-9deg);
  opacity: 0.92;
}
.verdict-stamp--pos { color: var(--green-dark); }
.verdict-stamp--mid { color: #a16207; }
.verdict-stamp--review { color: #5d6b80; }
.verdict-stamp--neg { color: var(--red); }

.verdict-stamp.is-stamped {
  animation: stamp-slam 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes stamp-slam {
  from { transform: rotate(-16deg) scale(1.9); opacity: 0; }
  70%  { transform: rotate(-8deg) scale(0.94); opacity: 1; }
  to   { transform: rotate(-9deg) scale(1); opacity: 0.92; }
}

@media (max-width: 820px) {
  .prose-section--callout.has-stamp { grid-template-columns: 1fr; }
  .callout-stamp { justify-self: end; margin: -8px 8px 8px 0; }
  .verdict-stamp { width: 120px; height: 120px; }
}

/* ---------- tables ---------- */

.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
  background: var(--panel);
  white-space: nowrap;
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
tbody tr:nth-child(even) { background: #fafbfd; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--blue-soft); }

.table-note {
  margin: 10px 2px 0;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 90ch;
}

.broker-cell {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
}

.score-pill {
  position: relative;
  display: inline-block;
  min-width: 72px;
  padding: 3px 8px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
}
.score-pill span {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--green));
  border-radius: 0 2px 2px 0;
  max-width: 100%;
}
.score-pill strong { font-size: 0.88rem; }

.score-pill--good span { background: var(--green); }
.score-pill--mid span { background: var(--gold); }
.score-pill--low span { background: var(--red); }
.score-pill--good strong { color: var(--green-dark); }
.score-pill--mid strong { color: var(--amber); }
.score-pill--low strong { color: var(--red); }

.status-pill {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}
.status-pill--ok { background: #e7f7f0; border-color: #bfe8d6; color: var(--green-dark); }
.status-pill--warn { background: #fdf3e0; border-color: #f3ddae; color: var(--amber); }
.status-pill--bad { background: #fdecea; border-color: #f5c6c0; color: var(--red); }

.table-action {
  display: inline-block;
  padding: 5px 13px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.table-action:hover {
  background: var(--blue);
  color: #fff;
  text-decoration: none;
}

.text-link { font-size: 0.88rem; }

/* ---------- link cards ---------- */

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.link-card {
  display: block;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.link-card:hover {
  border-color: var(--blue);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(22, 36, 58, 0.1);
}
.link-card strong { display: block; margin-bottom: 4px; font-size: 0.95rem; }
.link-card span { font-size: 0.82rem; color: var(--muted); }

/* ---------- каталог стран ---------- */

.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.country-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.country-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(22, 36, 58, 0.1);
  text-decoration: none;
}

.country-flag {
  font-size: 1.7rem;
  line-height: 1;
  flex: 0 0 auto;
}

.country-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.country-body strong { font-size: 0.97rem; }

.country-reg {
  align-self: flex-start;
  padding: 1px 8px;
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--blue-dark);
  white-space: nowrap;
}

.country-arrow {
  margin-left: auto;
  color: var(--line);
  font-size: 1.05rem;
  transition: color 0.15s ease, transform 0.15s ease;
}
.country-card:hover .country-arrow {
  color: var(--blue);
  transform: translateX(3px);
}

/* ---------- FAQ ---------- */

.faq { padding: 26px 2px 6px; }

.faq-item {
  border-bottom: 1px solid var(--line-soft);
  max-width: 78ch;
}

.faq-item summary {
  cursor: pointer;
  padding: 12px 26px 12px 2px;
  font-weight: 600;
  font-size: 0.97rem;
  list-style: none;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--blue);
}
.faq-item[open] summary::after { content: "\2013"; }
.faq-item[open] {
  background: var(--panel);
  border-left: 3px solid var(--blue);
  border-radius: 0 8px 8px 0;
}
.faq-item[open] summary { padding-left: 12px; }
.faq-item[open] p { padding: 0 12px; }
.faq-item p { margin: 0 0 14px; padding: 0 2px; color: var(--ink); }

/* ---------- sources ---------- */

.sources { padding: 26px 2px 6px; }

.sources-note {
  margin: -4px 0 14px;
  font-size: 0.9rem;
  color: var(--muted);
}

.source-list {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  overflow: hidden;
}

.source-row {
  display: grid;
  grid-template-columns: 150px 220px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
}
.source-row:last-child { border-bottom: 0; }
.source-row:hover { background: var(--blue-soft); text-decoration: none; }
.source-row span {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--green-dark);
}
.source-row strong { font-size: 0.9rem; }
.source-row small { font-size: 0.82rem; color: var(--muted); }

/* ---------- disclosure ---------- */

.disclosure {
  margin-top: 40px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.disclosure .risk, .disclosure .affiliate { margin: 0 0 10px; max-width: 100ch; }
.disclosure strong { color: var(--ink); }

/* ---------- footer ---------- */

.footer {
  background: var(--footer-bg);
  color: #b9c6d8;
  margin-top: 30px;
  border-top: 5px solid transparent;
  border-image: repeating-linear-gradient(90deg, var(--gold) 0 3px, transparent 3px 12px, var(--blue) 12px 15px, transparent 15px 26px) 5;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 20px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 40px;
}

.footer-brand strong {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}
.footer-brand p {
  margin: 10px 0 0;
  font-size: 0.88rem;
  line-height: 1.65;
  max-width: 52ch;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.footer-col { display: flex; flex-direction: column; gap: 7px; }
.footer-col strong {
  color: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 4px;
}
.footer-col a { color: #b9c6d8; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-legal p {
  max-width: 1120px;
  margin: 0 auto;
  padding: 6px 20px;
  font-size: 0.78rem;
  color: #8296ad;
}
.footer-legal p:first-child { padding-top: 16px; }
.footer-legal p:last-child { padding-bottom: 18px; }

/* ---------- archive & utility pages ---------- */

.main--archive { min-height: 55vh; }

.archive-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr);
  gap: 36px;
  align-items: center;
  padding: 30px 2px 34px;
  border-bottom: 1px solid var(--line);
}

.archive-route-card {
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  font-size: 0.85rem;
}
.archive-route-card span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.archive-route-card strong {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  margin: 3px 0 12px;
  word-break: break-all;
}
.archive-route-card i {
  display: block;
  width: 22px;
  height: 22px;
  margin: 0 0 12px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg) translateX(-4px);
}

.no-results {
  display: none;
  margin: 18px 2px;
  color: var(--muted);
  font-style: italic;
}

/* ---------- squiggle divider ---------- */

.squiggle {
  margin: 34px 0 -8px;
  color: var(--line);
  text-align: left;
}
.squiggle svg { width: 130px; height: 14px; color: #c9d7ec; }

/* ---------- footer stamp ---------- */

.footer-stamp {
  width: 96px;
  height: 96px;
  margin-top: 18px;
  color: #3d5674;
  animation: stamp-spin 40s linear infinite;
}
@keyframes stamp-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---------- back to top ---------- */

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 25;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--blue);
  font-size: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(22, 36, 58, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--blue); color: #fff; text-decoration: none; }

/* ---------- motion prefs ---------- */

@media (prefers-reduced-motion: reduce) {
  .drift-slow, .drift-fast, .chart-line, .h1-flourish path,
  .edge-decor span, .hero-eyebrow::before, .footer-stamp,
  .marquee-track, .mock-bar, .mock-card-2, .mock-card-3, .mock-shield { animation: none; }
  .chart-line, .h1-flourish path { stroke-dashoffset: 0; }
  .mock-bar { transform: none; }
  .mock-card-2, .mock-card-3 { opacity: 1; }
  .mock-shield { transform: scale(1); }
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .nav { display: none; }
  .nav-toggle { display: flex; order: 5; margin-left: auto; }
  .header-actions { margin-left: 0; }
  .site-header.nav-open .nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 8px 12px 14px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(22, 36, 58, 0.12);
  }
  .site-header.nav-open .nav a { padding: 10px 8px; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .site-header.nav-open .nav a::after { display: none; }
  .search { width: 150px; }
  .hero, .archive-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero-art { display: none; }
  .score-panel { max-width: 460px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 700px) {
  .header-inner { flex-wrap: wrap; gap: 10px 14px; }
  .header-cta { display: none; }
  .site-search { flex: 1; }
  .search { width: 100%; }
  .search-results { left: 0; right: auto; width: 100%; }

  .source-row { grid-template-columns: 1fr; gap: 2px; }

  /* stacked tables */
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tr { border-bottom: 2px solid var(--line); padding: 6px 0; }
  tr:last-child { border-bottom: 0; }
  tbody td {
    border-bottom: 0;
    padding: 6px 14px;
  }
  tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 2px;
  }
}

@media print {
  .site-header, .footer, .hero-ctas, .page-tools, .edge-decor { display: none; }
  body { border-top: 0; }
}
