/* ── Reset & tokens ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #f5f8fc;
  --bg-elev:   #f1f6fb;
  --bg-card:   #ffffff;
  --bg-alt:    #eef6fb;
  --border:    rgba(15, 23, 42, 0.1);
  --text:      #0f172a;
  --muted:     #64748b;
  --primary:   #0b6bcb;
  --primary-dark: #0758aa;
  /* Compatibility aliases for existing component class names. */
  --gold:      var(--primary);
  --gold-dim:  var(--primary-dark);
  --green:     #0d9f6e;
  --red:       #dc2626;
  --accent:    #1565c0;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 18px 50px rgba(15, 23, 42, 0.1);
  --font:      "Vazirmatn", system-ui, sans-serif;
  --serif:     "Vazirmatn", system-ui, sans-serif;
  --max:       1180px;
}

html { scroll-behavior: smooth; }

html[dir="rtl"],
body.rtl {
  direction: rtl;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(21, 101, 192, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(13, 159, 110, 0.1), transparent);
  pointer-events: none;
  z-index: 0;
}

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

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.logo:hover { text-decoration: none; color: var(--text); }

.logo-mark { color: var(--gold); font-size: 1.1rem; }

.logo-mark-img {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
}

.logo-text {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.logo-text span { color: var(--gold); }

.header-nav {
  display: flex;
  gap: 1.25rem;
  margin-inline-start: auto;
}

.header-nav a {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.header-nav a:hover { color: var(--text); text-decoration: none; }

.header-nav a.nav-api {
  color: var(--accent);
  font-weight: 600;
}

.header-nav a.nav-api:hover {
  color: #0758aa;
}

.header-nav a.nav-api-active {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle-bar {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.is-nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header.is-nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.is-nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

.header-status.live .status-dot {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}

.header-status.error .status-dot { background: var(--red); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: 3.5rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 44ch;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #ffffff;
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover { background: var(--bg-card); }

.btn-small {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-small:hover { background: var(--bg-elev); }

.hero-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.hero-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.hero-panel-head h2 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hero-panel-head time {
  font-size: 0.8rem;
  color: var(--muted);
}

.highlight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.highlight-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}

a.highlight-card:hover {
  text-decoration: none;
  color: inherit;
}

.highlight-card.price-flash-up,
.highlight-card.price-flash-down {
  transition: none;
}

.highlight-card.price-flash-up {
  animation: price-flash-up 1.5s ease-out;
}

.highlight-card.price-flash-down {
  animation: price-flash-down 1.5s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .highlight-card.price-flash-up,
  .highlight-card.price-flash-down {
    animation: none;
  }

  .highlight-card.price-flash-up {
    background-color: rgba(13, 159, 110, 0.12);
    border-color: rgba(13, 159, 110, 0.4);
  }

  .highlight-card.price-flash-down {
    background-color: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.4);
  }
}

.highlight-card:hover { border-color: rgba(11, 107, 203, 0.35); }

.highlight-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.highlight-price {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.25rem;
}

.highlight-change {
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.highlight-skeleton {
  height: 88px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-elev) 25%, #e2e8f0 50%, var(--bg-elev) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.positive { color: var(--green); }
.negative { color: var(--red); }
.neutral  { color: var(--muted); }

/* ── Toolbar ──────────────────────────────────────────────────── */
.toolbar-section {
  padding: 0.5rem 0 1.5rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 220px;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.9rem;
  color: var(--muted);
  transition: border-color 0.2s;
}

.search-wrap:focus-within { border-color: rgba(11, 107, 203, 0.45); color: var(--text); }

.search-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
}

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

.toolbar-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Market tables ───────────────────────────────────────────── */
.market-section {
  padding: 2.5rem 0;
}

.market-section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 60ch;
}

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

.market-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.market-table thead {
  background: var(--bg-elev);
  position: sticky;
  top: 0;
}

.market-table th {
  text-align: start;
  padding: 0.85rem 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.market-table th:not(:first-child) { text-align: end; }

.market-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.market-table tbody tr:last-child td { border-bottom: none; }

.market-table tbody tr {
  transition: background 0.15s;
}

.market-table tbody tr:hover { background: rgba(21, 101, 192, 0.04); }

.market-table tbody tr.hidden { display: none; }

.market-table tbody tr.table-row-collapsed { display: none; }

.market-table td:not(:first-child) {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.cell-name { font-weight: 500; }
.cell-updated {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  min-width: 9.5rem;
}

.updated-time {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  line-height: 1.25;
}

.updated-date {
  color: var(--text);
  font-weight: 500;
}

.updated-clock {
  font-variant-numeric: tabular-nums;
  font-size: 0.92em;
}
.cell-price { font-weight: 600; }

.cell-price-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.price-tick-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(4px) scale(0.85);
}

.price-tick-icon--up { color: var(--green); }
.price-tick-icon--down { color: var(--red); }

.price-tick-icon.is-animating {
  animation: price-tick-pop 1.5s ease-out forwards;
}

.price-tick-icon.is-fading {
  animation: price-tick-fade 0.6s ease-out forwards;
}

@keyframes price-tick-pop {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.75);
  }
  18% {
    opacity: 1;
    transform: translateY(0) scale(1.08);
  }
  35% {
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes price-tick-fade {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .price-tick-icon.is-animating,
  .price-tick-icon.is-fading {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.price-unit {
  font-size: 0.72em;
  font-weight: 600;
  color: var(--muted);
  margin-inline-start: 0.35rem;
}

.price-unit-usd {
  color: var(--accent);
}

.loading-cell, .error-cell {
  text-align: center !important;
  color: var(--muted);
  padding: 2.5rem 1rem !important;
}

.error-cell { color: var(--red); }

.gold-subsection {
  margin-top: 2rem;
}

.gold-subsection:first-of-type {
  margin-top: 0;
}

.gold-subsection-head {
  margin-bottom: 0.85rem;
}

.gold-subsection-head h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.gold-subsection-head p {
  color: var(--muted);
  font-size: 0.88rem;
}

.gold-subsection-empty {
  display: none;
}

/* ── About / FAQ ─────────────────────────────────────────────── */
.about-section {
  padding: 3.5rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.about-section h2 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 400;
  margin-bottom: 1rem;
}

.about-section p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.about-section strong { color: var(--text); font-weight: 600; }

.faq {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.faq h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.faq details:last-child { border-bottom: none; }

.faq summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.faq summary::after {
  content: "+";
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 400;
}

.faq details[open] summary::after { content: "−"; }

.faq p {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.55;
}

/* ── API page ───────────────────────────────────────────────── */
.api-page { padding-bottom: 2rem; }

.api-hero {
  padding: 3rem 0 2rem;
}

.api-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.api-lead {
  color: var(--muted);
  max-width: 52ch;
  font-size: 1.05rem;
}

.api-section-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.api-section-desc {
  color: var(--muted);
  margin-bottom: 1.75rem;
  max-width: 55ch;
}

.api-pricing,
.api-endpoints,
.api-form-section {
  padding: 2.5rem 0;
}

.api-endpoints {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.pricing-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pricing-card-featured {
  border-color: rgba(21, 101, 192, 0.45);
  box-shadow: 0 0 0 1px rgba(21, 101, 192, 0.15);
}

.pricing-badge {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(21, 101, 192, 0.12);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.pricing-card h3 {
  font-size: 1rem;
  font-weight: 600;
}

.pricing-amount {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.pricing-currency {
  font-size: 1.1rem;
  vertical-align: super;
  color: var(--muted);
}

.pricing-period {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.pricing-custom {
  font-size: 1.5rem;
  color: var(--gold);
}

.pricing-features {
  list-style: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.pricing-features strong {
  color: var(--text);
}

.endpoint-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.endpoint-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
}

.endpoint-item code {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.35rem;
  word-break: break-all;
}

.endpoint-item p {
  font-size: 0.88rem;
  color: var(--muted);
}

.api-form-wrap {
  max-width: 560px;
}

.api-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-row label {
  font-size: 0.85rem;
  font-weight: 500;
}

.form-row label span {
  color: var(--red);
}

.form-row input,
.form-row select,
.form-row textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  padding: 0.65rem 0.85rem;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid rgba(21, 101, 192, 0.45);
  border-color: var(--accent);
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.form-status {
  font-size: 0.88rem;
  color: var(--muted);
  min-height: 1.25rem;
}

.form-status-success { color: var(--green); }
.form-status-error { color: var(--red); }

/* ── API hub & docs ───────────────────────────────────────────── */
.api-guides-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 52rem;
}

@media (max-width: 640px) {
  .api-guides-grid {
    grid-template-columns: 1fr;
  }
}

.api-guides-grid .guide-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.6rem;
  border-radius: var(--radius);
  min-height: 11rem;
}

.api-guides-grid .guide-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.api-guides-grid .guide-card p {
  font-size: 0.9rem;
  line-height: 1.55;
  flex: 1;
  margin-bottom: 1rem;
}

.guide-card-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
}

.api-guides-grid .guide-card:hover .guide-card-cta {
  color: var(--gold);
}

.content-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.api-docs-body {
  max-width: 52rem;
  margin-top: 2.5rem;
}

.api-docs-body > h2 {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 400;
  margin: 2.5rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.api-docs-body > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.api-endpoint-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.api-endpoint-method {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--green);
  background: rgba(13, 159, 110, 0.12);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.api-endpoint-path {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.8rem;
  color: var(--accent);
  word-break: break-all;
}

.code-window {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  margin-bottom: 0.5rem;
}

.code-window-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.65rem 1rem;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}

.code-window-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.code-window-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.code-window-tab {
  padding: 0.3rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.code-window-tab:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.05);
}

.code-window-tab.is-active {
  color: var(--text);
  background: #f8fafc;
  border-color: var(--border);
}

.code-window-body {
  margin: 0;
  padding: 1.15rem 1.25rem;
  font-size: 0.78rem;
  line-height: 1.65;
  color: #334155;
  overflow-x: auto;
  font-family: ui-monospace, Menlo, monospace;
  white-space: pre;
  background: #f8fafc;
}

.code-window-body[hidden] {
  display: none;
}

.api-response-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.api-response-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
}

.api-response-card-head {
  padding: 0.6rem 1rem;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
  font-weight: 600;
}

.api-response-card pre {
  margin: 0;
  padding: 1rem;
  font-size: 0.74rem;
  line-height: 1.55;
  color: #334155;
  overflow-x: auto;
  font-family: ui-monospace, Menlo, monospace;
  background: #f8fafc;
}

.api-response-card pre.api-json-live {
  box-shadow: inset 3px 0 0 var(--green);
}

html[dir="rtl"] .api-response-card pre.api-json-live,
body.rtl .api-response-card pre.api-json-live {
  box-shadow: inset -3px 0 0 var(--green);
}

.api-docs-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.api-docs-list li {
  position: relative;
  padding-inline-start: 1.1rem;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.api-docs-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.api-docs-list strong {
  color: var(--text);
}

.api-docs-list code {
  font-size: 0.88em;
  color: var(--accent);
}

.api-doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.api-doc-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--muted);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.api-doc-nav a:hover {
  border-color: rgba(11, 107, 203, 0.4);
  color: var(--gold);
  text-decoration: none;
}

.api-endpoint-doc {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.api-endpoint-doc:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.api-endpoint-doc h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.api-endpoint-doc > p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 62ch;
}

.api-params-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin: 1rem 0;
}

.api-params-table th,
.api-params-table td {
  text-align: start;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.api-params-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-elev);
}

.api-params-table td code {
  font-size: 0.85em;
  color: var(--accent);
}

.api-params-table td:first-child {
  white-space: nowrap;
  color: var(--text);
  font-weight: 500;
}

.api-field-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 1rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.api-field-list li {
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.api-field-list li:last-child {
  border-bottom: none;
}

.api-field-list code {
  color: var(--accent);
  font-size: 0.9em;
}

.api-docs-links {
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ── Guides, blog, content pages ─────────────────────────────── */
.guides-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.guide-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}

.guide-card:hover {
  border-color: rgba(11, 107, 203, 0.35);
  transform: translateY(-2px);
  text-decoration: none;
}

.guide-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--gold);
}

.guide-card p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

.content-page {
  padding: 2.5rem 0 3rem;
}

.content-page h1 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.content-lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 62ch;
  margin-bottom: 1.75rem;
}

.content-body {
  max-width: 46rem;
  margin-top: 2rem;
}

.content-body h2 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.65rem;
}

.content-body p,
.content-body li {
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.content-body ul {
  padding-inline-start: 1.25rem;
  margin-bottom: 1rem;
}

.content-body a { color: var(--gold); }

.content-body h3 {
  font-size: 1rem;
  margin: 1.35rem 0 0.5rem;
  color: var(--text);
}

/* ── Article layout ─────────────────────────────────────────── */
.article-page .container {
  width: min(100% - 2rem, 52rem);
}

.article-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4.5vw, 2.65rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.article-page .content-lead {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--muted);
  border-inline-start: 3px solid var(--gold);
  padding-inline-start: 1.1rem;
  margin-bottom: 2rem;
}

.article-figure-featured {
  margin: 0 0 2rem;
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.article-figure-featured img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

.article-figure-inline {
  margin: 1.75rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.article-figure-inline img {
  width: 100%;
  height: auto;
  display: block;
}

.article-figure figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.035);
}

/* ── Blog prose: section headings ─────────────────────────── */
.blog-section-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3vw, 1.65rem) !important;
  font-weight: 400;
  color: var(--text) !important;
  margin: 2.75rem 0 1rem !important;
  padding-top: 0.5rem;
  scroll-margin-top: 5rem;
}

.blog-section-marker {
  flex-shrink: 0;
  width: 4px;
  height: 1.35em;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--gold), var(--gold-dim));
}

.blog-subtitle {
  font-size: 1.05rem !important;
  font-weight: 600;
  color: var(--text) !important;
  margin: 1.5rem 0 0.5rem !important;
}

/* ── Blog lists ───────────────────────────────────────────── */
.blog-list {
  list-style: none;
  padding: 0 !important;
  margin: 1rem 0 1.25rem !important;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blog-list > li {
  position: relative;
  margin: 0 !important;
  padding-block: 0.75rem;
  padding-inline: 2.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text) !important;
  line-height: 1.55;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.blog-list > li:hover {
  border-color: rgba(11, 107, 203, 0.25);
  background: rgba(15, 23, 42, 0.025);
}

.blog-list > li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.9rem;
  top: 1.05rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(11, 107, 203, 0.15);
}

.blog-list-num > li {
  counter-increment: blog-num;
  padding-inline-start: 2.75rem;
}

.blog-list-num {
  counter-reset: blog-num;
}

.blog-list-num > li::before {
  content: counter(blog-num);
  width: auto;
  height: auto;
  background: none;
  box-shadow: none;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  top: 0.85rem;
  inset-inline-start: 0.85rem;
}

/* ── Blog callout blocks ──────────────────────────────────── */
.blog-block {
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin: 1.75rem 0;
  position: relative;
  overflow: hidden;
}

.blog-block::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}

.blog-block p:last-child,
.blog-block ul:last-child {
  margin-bottom: 0;
}

.blog-block-quick-ref {
  background: linear-gradient(145deg, rgba(11, 107, 203, 0.14), rgba(11, 107, 203, 0.03));
  border: 1px solid rgba(11, 107, 203, 0.38);
  box-shadow: 0 8px 32px rgba(11, 107, 203, 0.08);
}

.blog-block-quick-ref::before {
  background: radial-gradient(circle at 100% 0%, rgba(11, 107, 203, 0.12), transparent 55%);
}

.blog-block-quick-ref h3 {
  margin-top: 0;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.blog-block-quick-ref .blog-list > li {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(11, 107, 203, 0.2);
}

.blog-block-quick-ref .blog-list > li strong {
  color: var(--gold);
}

.blog-block-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}

.blog-block-toc h3 {
  margin-top: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.blog-block-toc .blog-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem 1.25rem;
  margin-bottom: 0 !important;
}

.blog-block-toc .blog-list > li {
  padding-block: 0.35rem;
  padding-inline: 1.1rem 0;
  background: none;
  border: none;
  font-size: 0.9rem;
}

.blog-block-toc .blog-list > li::before {
  width: 5px;
  height: 5px;
  inset-inline-start: 0;
  top: 0.65rem;
  box-shadow: none;
}

.blog-block-toc .blog-list > li a.is-active {
  color: var(--gold);
  font-weight: 600;
}

.blog-block-toc .blog-list > li a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.blog-block-toc .blog-list > li a:hover {
  color: var(--gold);
  text-decoration: none;
}

.blog-block-note {
  background: rgba(96, 165, 250, 0.07);
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-inline-start: 4px solid #60a5fa;
  padding-inline-start: 1.35rem;
}

.blog-block-note p {
  color: #1e40af !important;
  margin-bottom: 0;
}

/* ── Conversion pill ──────────────────────────────────────── */
.blog-conversion-pill,
.blog-formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  margin: 1.75rem 0;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(11, 107, 203, 0.12), rgba(21, 101, 192, 0.08));
  border: 1px solid rgba(11, 107, 203, 0.3);
  text-align: center;
}

.blog-conversion-eq {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  color: var(--text);
  font-weight: 400;
}

.blog-conversion-arrow {
  font-size: 1.5rem;
  color: var(--gold);
  font-weight: 300;
}

.blog-formula p {
  width: 100%;
  margin: 0 !important;
  font-size: 0.88rem;
  color: var(--muted) !important;
}

.blog-formula strong {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--text);
  font-weight: 400;
}

/* ── Blog tables ──────────────────────────────────────────── */
.blog-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}

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

.blog-table th,
.blog-table td {
  padding: 0.85rem 1rem;
  text-align: start;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.blog-table th {
  background: rgba(11, 107, 203, 0.08);
  color: var(--gold);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.blog-table td {
  color: var(--text);
}

.blog-table td:first-child {
  color: var(--muted);
  font-weight: 500;
  width: 28%;
}

.blog-table tbody tr:last-child td {
  border-bottom: none;
}

.blog-table tbody tr {
  transition: background 0.15s ease;
}

.blog-table tbody tr:hover {
  background: rgba(15, 23, 42, 0.035);
}

.blog-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.blog-table tbody tr:nth-child(even):hover {
  background: rgba(15, 23, 42, 0.05);
}

/* ── Timeline ─────────────────────────────────────────────── */
.blog-timeline {
  position: relative;
  margin: 1.5rem 0 2rem;
  padding-inline-start: 1.75rem;
  border-inline-start: 2px solid rgba(11, 107, 203, 0.35);
}

.blog-timeline .blog-subtitle,
.blog-timeline h3 {
  position: relative;
  margin-top: 0 !important;
  padding-top: 0.15rem;
  font-size: 1rem !important;
  color: var(--text) !important;
}

.blog-timeline .blog-subtitle::before,
.blog-timeline h3::before {
  content: "";
  position: absolute;
  inset-inline-start: -2.05rem;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px rgba(11, 107, 203, 0.35);
}

.blog-timeline > h3,
.blog-timeline > .blog-subtitle {
  margin-bottom: 0.35rem !important;
}

.blog-timeline > p {
  margin-bottom: 1.75rem !important;
  padding-bottom: 0.25rem;
}

.blog-timeline > p:last-child {
  margin-bottom: 0 !important;
}

/* ── FAQ accordion ────────────────────────────────────────── */
.blog-faq {
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blog-faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-faq-item:hover {
  border-color: rgba(11, 107, 203, 0.25);
}

.blog-faq-item[open] {
  border-color: rgba(11, 107, 203, 0.35);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
}

.blog-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  list-style: none;
  user-select: none;
}

.blog-faq-q::-webkit-details-marker {
  display: none;
}

.blog-faq-q::after {
  content: "";
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-inline-end: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  margin-top: -0.2rem;
}

.blog-faq-item[open] .blog-faq-q::after {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}

.blog-faq-a {
  padding: 0 1.15rem 1rem;
  border-top: 1px solid var(--border);
  background: rgba(21, 101, 192, 0.035);
}

.blog-faq-a p {
  margin: 0.85rem 0 0 !important;
  color: var(--muted) !important;
  font-size: 0.92rem;
  line-height: 1.6;
}

.content-body h2#faq {
  margin-bottom: 0.5rem !important;
}

@media (max-width: 640px) {
  .blog-block-toc .blog-list {
    grid-template-columns: 1fr;
  }

  .blog-table td:first-child {
    width: auto;
  }

  .blog-conversion-pill,
  .blog-formula {
    flex-direction: column;
    gap: 0.5rem;
  }
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { margin: 0 0.35rem; opacity: 0.5; }

.header-nav a.nav-active {
  color: var(--text);
  font-weight: 600;
}

.rate-widget {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 420px;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rate-widget-live {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding-block: 0.2rem;
  padding-inline: 0.45rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(13, 159, 110, 0.35);
  background: rgba(13, 159, 110, 0.1);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

.rate-widget-live[hidden] {
  display: none;
}

.rate-widget-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(13, 159, 110, 0.45);
  animation: live-badge-pulse 1.6s ease-in-out infinite;
}

@keyframes live-badge-pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(13, 159, 110, 0.45);
  }
  50% {
    opacity: 0.75;
    box-shadow: 0 0 0 4px rgba(13, 159, 110, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rate-widget-live-dot {
    animation: none;
  }
}

@keyframes price-flash-up {
  0% {
    background-color: var(--bg-card);
    border-color: var(--border);
    box-shadow: none;
  }
  18% {
    background-color: rgba(13, 159, 110, 0.16);
    border-color: rgba(13, 159, 110, 0.5);
    box-shadow: 0 0 0 1px rgba(13, 159, 110, 0.2), 0 12px 36px rgba(13, 159, 110, 0.14);
  }
  100% {
    background-color: var(--bg-card);
    border-color: var(--border);
    box-shadow: none;
  }
}

@keyframes price-flash-down {
  0% {
    background-color: var(--bg-card);
    border-color: var(--border);
    box-shadow: none;
  }
  18% {
    background-color: rgba(220, 38, 38, 0.16);
    border-color: rgba(220, 38, 38, 0.5);
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.2), 0 12px 36px rgba(220, 38, 38, 0.14);
  }
  100% {
    background-color: var(--bg-card);
    border-color: var(--border);
    box-shadow: none;
  }
}

@keyframes price-flash-up-text {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(1.03); color: var(--green); }
}

@keyframes price-flash-down-text {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(1.03); color: var(--red); }
}

.rate-widget.price-flash-up {
  animation: price-flash-up 1.5s ease-out;
}

.rate-widget.price-flash-down {
  animation: price-flash-down 1.5s ease-out;
}

.rate-widget.price-flash-up .rate-widget-price {
  animation: price-flash-up-text 1.5s ease-out;
}

.rate-widget.price-flash-down .rate-widget-price {
  animation: price-flash-down-text 1.5s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .rate-widget.price-flash-up,
  .rate-widget.price-flash-down,
  .rate-widget.price-flash-up .rate-widget-price,
  .rate-widget.price-flash-down .rate-widget-price {
    animation: none;
  }

  .rate-widget.price-flash-up {
    background-color: rgba(13, 159, 110, 0.12);
    border-color: rgba(13, 159, 110, 0.4);
  }

  .rate-widget.price-flash-down {
    background-color: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.4);
  }
}

.rate-widget-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.rate-widget-price {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  transform-origin: left center;
}

html[dir="rtl"] .rate-widget-price,
body.rtl .rate-widget-price {
  transform-origin: right center;
}

.rate-widget-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.rate-widget-change.positive { color: var(--green); }
.rate-widget-change.negative { color: var(--red); }
.rate-widget-change.neutral { color: var(--muted); }

.chart-section {
  margin: 2rem 0 2.5rem;
}

.chart-section-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.35rem;
}

.chart-section-lead {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.tv-chart-container {
  width: 100%;
  height: 640px;
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.tv-chart-container iframe {
  display: block;
}

.tv-chart-ready {
  box-shadow: var(--shadow);
}

.blog-tv-chart-wrap {
  margin: 1.5rem 0 2rem;
}

.blog-tv-chart-label {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.content-body .blog-tv-chart.tv-chart-container {
  height: 480px;
  min-height: 360px;
}


.chart-error {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

a.symbol-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

a.symbol-link:hover {
  color: var(--gold);
  border-bottom-color: rgba(11, 107, 203, 0.45);
  text-decoration: none;
}

.market-table .cell-chart-head,
.market-table .cell-chart {
  width: 3rem;
  text-align: center;
  padding-inline-start: 0.35rem;
  padding-inline-end: 0.35rem;
}

.chart-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  border: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.chart-link:hover {
  color: var(--gold);
  border-color: rgba(11, 107, 203, 0.35);
  background: rgba(11, 107, 203, 0.08);
  text-decoration: none;
}

.table-load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 1rem 0 0.25rem;
}

.table-load-more-wrap[hidden] {
  display: none;
}

.symbol-section {
  margin: 2.5rem 0;
  padding-top: 0.25rem;
}

.symbol-section-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.35rem;
}

.symbol-section-lead {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  max-width: 52rem;
}

.day-narrative-section {
  margin: 1.75rem 0 2.25rem;
  padding: 1.35rem 1.4rem;
  background: linear-gradient(135deg, rgba(11, 107, 203, 0.08), rgba(15, 23, 42, 0.025));
  border: 1px solid rgba(11, 107, 203, 0.22);
  border-radius: var(--radius);
}

.day-narrative-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.65rem;
}

.day-narrative-text {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text);
  max-width: 58rem;
}

.day-narrative-meta {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.day-narrative-section[hidden] {
  display: none;
}

.day-chart-section {
  margin: 0 0 2.5rem;
  padding: 1.35rem 1.25rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.day-chart-section[hidden] {
  display: none;
}

.day-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.day-chart-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  margin: 0;
}

.day-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.day-chart-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  min-width: 5.5rem;
}

.day-chart-chip-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.day-chart-chip-value {
  font-size: 0.78rem;
  color: var(--text);
  white-space: nowrap;
}

.day-chart-chip-change.positive .day-chart-chip-value {
  color: #0d9f6e;
}

.day-chart-chip-change.negative .day-chart-chip-value {
  color: #dc2626;
}

.day-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 280px;
}

.day-chart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.day-chart-grid {
  stroke: rgba(15, 23, 42, 0.08);
  stroke-width: 1;
}

.day-chart-axis-y,
.day-chart-axis-x {
  fill: var(--muted);
  font-size: 11px;
}

.day-chart-line {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.day-chart-ref {
  stroke-width: 1;
  stroke-dasharray: 5 5;
}

.day-chart-ref-prev {
  stroke: rgba(11, 107, 203, 0.55);
}

.day-chart-ref-open {
  stroke: rgba(15, 23, 42, 0.18);
}

.day-chart-ref-label {
  fill: var(--gold);
  font-size: 10px;
}

.day-chart-ref-label-open {
  fill: var(--muted);
}

.day-chart-dot-end {
  stroke: var(--bg-card);
  stroke-width: 2;
}

.day-chart-crosshair {
  stroke: rgba(15, 23, 42, 0.22);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.day-chart-dot-hover {
  stroke: var(--bg);
  stroke-width: 2;
}

.day-chart-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 150px;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
  pointer-events: none;
}

.day-chart-tooltip strong {
  display: block;
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 0.2rem;
}

.day-chart-tooltip span {
  font-size: 0.82rem;
  color: var(--text);
}

.day-chart-footnote {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  .day-chart-chip {
    min-width: auto;
  }

  .day-chart-chip-value {
    white-space: normal;
  }
}

.returns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.returns-cell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.returns-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.returns-value {
  font-size: 1.15rem;
  font-weight: 600;
}

.returns-value.positive { color: var(--green); }
.returns-value.negative { color: var(--red); }
.returns-value.neutral { color: var(--muted); }

.technical-section .symbol-section-lead {
  margin-bottom: 0;
}

.technical-panel {
  padding: 1.4rem 1.35rem 1.5rem;
  background:
    linear-gradient(160deg, rgba(11, 107, 203, 0.07), transparent 42%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.025), transparent),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.technical-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
}

.technical-asof {
  flex-shrink: 0;
  margin: 0.2rem 0 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(11, 107, 203, 0.22);
  background: rgba(11, 107, 203, 0.08);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.technical-summary {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.technical-summary-main {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(220px, 1.4fr);
  gap: 0.85rem;
}

.technical-trend-card {
  position: relative;
  overflow: hidden;
  padding: 1.05rem 1.1rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border);
  background: var(--bg-elev);
}

.technical-trend-card::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline: 0 auto;
  width: 3px;
  background: var(--muted);
}

.technical-trend-card.signal-tone-bullish::before { background: var(--green); }
.technical-trend-card.signal-tone-bearish::before { background: var(--red); }
.technical-trend-card.signal-tone-neutral::before { background: var(--accent); }

.technical-trend-card.signal-tone-bullish {
  background: linear-gradient(135deg, rgba(13, 159, 110, 0.12), var(--bg-elev));
  border-color: rgba(13, 159, 110, 0.22);
}

.technical-trend-card.signal-tone-bearish {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.12), var(--bg-elev));
  border-color: rgba(220, 38, 38, 0.22);
}

.technical-trend-label,
.technical-level-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.technical-trend-value {
  display: block;
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1.15;
  font-weight: 400;
  color: var(--text);
}

.technical-trend-card.signal-tone-bullish .technical-trend-value { color: var(--green); }
.technical-trend-card.signal-tone-bearish .technical-trend-value { color: var(--red); }

.technical-trend-note {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.technical-level-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.technical-level-card {
  padding: 1.05rem 1.1rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.025);
}

.technical-level-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.technical-bias {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.technical-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.technical-context-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.75rem 0.9rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.025);
}

.technical-context-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.technical-context-value {
  margin-inline-end: auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.technical-bias-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.025);
  color: var(--muted);
  font-size: 0.8rem;
}

.technical-bias-item strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.bias-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.bias-bullish { background: var(--green); box-shadow: 0 0 8px rgba(13, 159, 110, 0.45); }
.bias-bearish { background: var(--red); box-shadow: 0 0 8px rgba(220, 38, 38, 0.45); }
.bias-neutral { background: var(--muted); }
.bias-overbought { background: #0b6bcb; box-shadow: 0 0 8px rgba(11, 107, 203, 0.4); }
.bias-oversold { background: var(--accent); box-shadow: 0 0 8px rgba(21, 101, 192, 0.4); }

.technical-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.technical-group-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.technical-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.7rem;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.025);
}

.technical-group-head h3 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.technical-group-head span {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.technical-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
}

.technical-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.72rem 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

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

.technical-item-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.technical-item-name {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
}

.technical-item-value {
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.signal-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  border: 1px solid transparent;
}

.signal-bullish {
  color: var(--green);
  background: rgba(13, 159, 110, 0.12);
  border-color: rgba(13, 159, 110, 0.28);
}

.signal-bearish {
  color: var(--red);
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.28);
}

.signal-neutral {
  color: var(--muted);
  background: rgba(139, 149, 168, 0.1);
  border-color: rgba(139, 149, 168, 0.22);
}

.signal-overbought {
  color: #0b6bcb;
  background: rgba(11, 107, 203, 0.12);
  border-color: rgba(11, 107, 203, 0.28);
}

.signal-oversold {
  color: #1565c0;
  background: rgba(21, 101, 192, 0.12);
  border-color: rgba(21, 101, 192, 0.28);
}

.technical-loading,
.technical-empty {
  margin: 0;
  padding: 1.25rem 0.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .technical-summary-main,
  .technical-groups {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .technical-panel {
    padding: 1.15rem 1rem 1.2rem;
  }

  .technical-panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .technical-asof {
    align-self: flex-start;
  }

  .technical-level-cards,
  .technical-context {
    grid-template-columns: 1fr;
  }

  .technical-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .signal-badge {
    min-width: 0;
  }
}

.custom-return-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.custom-return-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.custom-return-form input[type="date"] {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font-family: var(--font);
  font-size: 0.95rem;
}

.custom-return-form button {
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
}

.custom-return-form button:hover {
  filter: brightness(1.08);
}

.custom-return-result {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  line-height: 1.5;
}

.custom-return-result strong {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.custom-return-result.positive strong { color: var(--green); }
.custom-return-result.negative strong { color: var(--red); }

.custom-return-detail {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
}

.custom-return-result.error {
  color: var(--red);
}

.custom-return-result.loading {
  color: var(--muted);
}

/* ── Calculator ─────────────────────────────────────────────── */
.calc-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  max-width: 520px;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
}

.calc-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.calc-panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

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

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.calc-mode-fieldset {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.calc-legend {
  width: 100%;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.calc-mode-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.calc-mode-option:has(input:checked) {
  border-color: rgba(11, 107, 203, 0.45);
  background: rgba(11, 107, 203, 0.08);
}

.calc-mode-option input {
  accent-color: var(--gold);
}

.calc-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.calc-field select,
.calc-field input[type="number"] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
}

.calc-field select:focus,
.calc-field input:focus {
  outline: none;
  border-color: rgba(11, 107, 203, 0.5);
}

.calc-result-box {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
}

.calc-result-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.calc-result-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 0 0 0.35rem;
  line-height: 1.2;
}

.calc-result-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

.calc-result-unit {
  font-size: 0.55em;
  font-weight: 600;
  color: var(--muted);
}

.calc-rate-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.calc-meta-sep {
  opacity: 0.45;
  margin: 0 0.2rem;
}

.calc-rate-link-wrap {
  margin: 0.35rem 0 0;
}

.calc-rate-link {
  font-size: 0.88rem;
  font-weight: 500;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  overflow: hidden;
}

.blog-card-has-image {
  padding-top: 0;
}

.blog-card-thumb-link {
  display: block;
  margin: 0 -1.35rem 1rem;
  text-decoration: none;
}

.blog-card-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  background: var(--bg-elev);
}

.article-figure {
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.article-figure-featured {
  margin-top: 0;
  margin-bottom: 2rem;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  background: var(--bg-elev);
}

.article-figure-inline {
  max-width: 100%;
}

.article-figure figcaption {
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.blog-chart {
  margin: 1.25rem 0 2rem;
  padding: 1.35rem 1.25rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.blog-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.blog-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.blog-chart-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  background: rgba(15, 23, 42, 0.035);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
}

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

.blog-chart-chip-label {
  color: var(--muted);
}

.blog-chart-chip-value {
  color: var(--text);
  font-weight: 600;
}

.blog-chart-chip-spread .blog-chart-chip-value {
  color: var(--gold);
}

.blog-chart-range {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.2rem;
  background: rgba(15, 23, 42, 0.035);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.blog-chart-range-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}

.blog-chart-range-btn:hover {
  color: var(--text);
}

.blog-chart-range-btn.is-active {
  background: rgba(11, 107, 203, 0.18);
  color: var(--gold);
}

.blog-chart-wrap {
  position: relative;
  min-height: 320px;
}

.blog-chart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.blog-chart-grid {
  stroke: rgba(15, 23, 42, 0.08);
  stroke-width: 1;
}

.blog-chart-axis-y,
.blog-chart-axis-x {
  fill: var(--muted);
  font-size: 11px;
}

.blog-chart-line {
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.blog-chart-line-free {
  stroke: #0b6bcb;
}

.blog-chart-line-official {
  stroke: #60a5fa;
}

.blog-chart-crosshair {
  stroke: rgba(15, 23, 42, 0.25);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.blog-chart-dot-hover {
  stroke: rgba(0, 0, 0, 0.35);
  stroke-width: 1.5;
}

.blog-chart-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 160px;
  padding: 0.55rem 0.7rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
  pointer-events: none;
}

.blog-chart-tooltip strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
}

.blog-chart-tooltip span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.blog-chart-footnote,
.blog-chart-status {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.blog-chart-error {
  color: #dc2626;
}

@media (max-width: 640px) {
  .blog-chart-head {
    flex-direction: column;
    align-items: stretch;
  }

  .blog-chart-range {
    justify-content: center;
  }
}

.blog-card time {
  font-size: 0.75rem;
  color: var(--muted);
}

.blog-card h2 {
  font-size: 1.05rem;
  margin: 0.5rem 0 0.65rem;
  line-height: 1.35;
}

.blog-card h2 a {
  color: var(--text);
  text-decoration: none;
}

.blog-card h2 a:hover { color: var(--gold); }

.blog-card p {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.blog-read {
  font-size: 0.85rem;
  font-weight: 600;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 1.75rem;
}

.blog-filter-btn {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.blog-filter-btn:hover {
  color: var(--text);
  border-color: rgba(11, 107, 203, 0.35);
  text-decoration: none;
}

.blog-filter-btn.is-active {
  background: linear-gradient(135deg, rgba(11, 107, 203, 0.22), rgba(11, 107, 203, 0.08));
  border-color: rgba(11, 107, 203, 0.55);
  color: var(--gold);
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.blog-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
}

.blog-badge-type {
  opacity: 0.85;
}

.blog-badge-guides { border-color: rgba(11, 107, 203, 0.35); color: var(--gold); }
.blog-badge-currency { border-color: rgba(96, 165, 250, 0.35); color: #1565c0; }
.blog-badge-gold { border-color: rgba(11, 107, 203, 0.45); color: var(--gold); }
.blog-badge-market { border-color: rgba(13, 159, 110, 0.35); color: var(--green); }
.blog-badge-news { border-color: rgba(255, 107, 107, 0.35); color: #dc2626; }

.blog-empty {
  color: var(--muted);
  padding: 2rem 0;
}

.article-header time {
  font-size: 0.82rem;
  color: var(--muted);
}

.content-cta {
  margin-top: 2.5rem;
  font-size: 0.9rem;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 1rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-note { opacity: 0.7; }

/* ── Top movers page ─────────────────────────────────────────── */
.movers-page {
  padding-bottom: 3rem;
}

.movers-hero {
  margin-bottom: 2rem;
}

.movers-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.movers-updated {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.movers-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.movers-periods,
.movers-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.movers-period-btn,
.movers-filter-btn {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.movers-period-btn:hover,
.movers-filter-btn:hover {
  color: var(--text);
  border-color: rgba(11, 107, 203, 0.35);
}

.movers-period-btn.is-active {
  background: linear-gradient(135deg, rgba(11, 107, 203, 0.22), rgba(11, 107, 203, 0.08));
  border-color: rgba(11, 107, 203, 0.55);
  color: var(--gold);
}

.movers-filter-btn.is-active {
  background: var(--bg-elev);
  border-color: rgba(15, 23, 42, 0.14);
  color: var(--text);
}

.movers-spotlight {
  margin-bottom: 2rem;
}

.movers-section-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.movers-spotlight-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.movers-spotlight-column {
  min-width: 0;
}

.movers-spotlight-column-title {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.movers-spotlight-column-title-up { color: var(--green); }
.movers-spotlight-column-title-down { color: var(--red); }

.movers-spotlight-column-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.movers-spotlight-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.15rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: center;
}

.movers-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.mover-spotlight-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.mover-spotlight-card:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 107, 203, 0.35);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
  text-decoration: none;
}

.mover-spotlight-gainer {
  background: linear-gradient(160deg, rgba(13, 159, 110, 0.12), var(--bg-card) 55%);
}

.mover-spotlight-loser {
  background: linear-gradient(160deg, rgba(255, 107, 107, 0.12), var(--bg-card) 55%);
}

.mover-spotlight-gold { border-color: rgba(11, 107, 203, 0.45); }
.mover-spotlight-silver { border-color: rgba(192, 192, 192, 0.28); }
.mover-spotlight-bronze { border-color: rgba(205, 127, 50, 0.32); }

.mover-spotlight-rank {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.mover-spotlight-name {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}

.mover-spotlight-change {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
}

.mover-spotlight-change.up { color: var(--green); }
.mover-spotlight-change.down { color: var(--red); }

.mover-spotlight-price {
  font-size: 0.8rem;
  color: var(--muted);
}

.movers-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.movers-column {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.1rem 0.85rem;
}

.movers-column-gainers {
  border-top: 3px solid rgba(13, 159, 110, 0.55);
}

.movers-column-losers {
  border-top: 3px solid rgba(255, 107, 107, 0.55);
}

.movers-column-head {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.movers-column-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.movers-column-title-up { color: var(--green); }
.movers-column-title-down { color: var(--red); }

.movers-column-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.movers-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mover-card {
  margin-bottom: 0.45rem;
}

.mover-card-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.72rem 0.55rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}

.mover-card-link:hover {
  background: var(--bg-elev);
  text-decoration: none;
}

.mover-rank {
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-elev);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.mover-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.mover-name {
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mover-price {
  font-size: 0.78rem;
  color: var(--muted);
}

.mover-change {
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
}

.mover-change-up { color: var(--green); }
.mover-change-down { color: var(--red); }

.movers-empty {
  padding: 1rem 0.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.movers-footnote {
  margin-top: 1rem;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-wrap: wrap;
    align-items: center;
  }

  .nav-toggle {
    display: inline-flex;
    margin-inline-start: auto;
  }

  .header-nav {
    display: none;
    order: 10;
    width: 100%;
    margin-inline-start: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.35rem 0 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: 0.35rem;
  }

  .site-header.is-nav-open .header-nav {
    display: flex;
  }

  .header-nav a {
    padding: 0.72rem 0.15rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  }

  .header-nav a:last-child {
    border-bottom: none;
  }

  .header-status {
    margin-inline-start: 0.65rem;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero { padding-top: 2rem; }
}

@media (max-width: 600px) {
  .highlight-grid { grid-template-columns: 1fr; }

  .calc-mode-fieldset {
    flex-direction: column;
    gap: 0.5rem;
  }

  .market-table { font-size: 0.8rem; }

  .market-table th,
  .market-table td { padding: 0.6rem 0.65rem; }

  .market-table th:nth-child(6),
  .market-table td:nth-child(6),
  .market-table th:nth-child(7),
  .market-table td:nth-child(7) {
    display: none;
  }

  .movers-board {
    grid-template-columns: 1fr;
  }

  .movers-spotlight-board {
    grid-template-columns: 1fr;
  }

  .movers-spotlight-column-grid {
    grid-template-columns: 1fr;
  }

  .movers-spotlight-grid {
    grid-template-columns: 1fr;
  }

  .movers-periods,
  .movers-filters {
    width: 100%;
  }
}
