body {
  background-color: var(--color-surface);
  background-image:
    radial-gradient(at 0% 0%, rgba(43, 108, 176, 0.05) 0, transparent 50%),
    radial-gradient(at 100% 100%, rgba(43, 108, 176, 0.05) 0, transparent 50%);
  font-family: var(--font-body);
  color: var(--color-on-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --color-primary: #005394;
  --color-primary-container: #2b6cb0;
  --color-surface: #f7fafc;
  --color-surface-container-low: #f1f4f6;
  --color-surface-container-lowest: #ffffff;
  --color-surface-container-high: #ebeef0;
  --color-on-surface: #181c1e;
  --color-on-surface-variant: #414750;
  --color-inverse-surface: #2d3133;
  --color-outline-variant: rgba(193, 199, 210, 0.15);
  --color-on-primary: #ffffff;
}

.font-headline {
  font-family: var(--font-headline);
}
.font-body {
  font-family: var(--font-body);
}
.text-primary {
  color: var(--color-primary);
}
.bg-primary {
  background-color: var(--color-primary);
}
.text-on-surface {
  color: var(--color-on-surface);
}
.text-error {
  color: var(--color-error);
}
.shadow-fluent {
  box-shadow: var(--shadow-fluent);
}

.mica-effect {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.acrylic-dark {
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fluent-shadow {
  box-shadow: 0 8px 32px rgba(24, 28, 30, 0.06);
}
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(24, 28, 30, 0.1);
}
.progress-bar-fill {
  transition: width 1s ease-out;
}
.bg-primary-container {
  background-color: var(--color-primary-container);
}
/* Fade in animation for cards */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}
.mica-surface {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
}
.text-on-primary {
  color: var(--color-on-primary);
}
.ambient-shadow {
  box-shadow: 0 8px 32px rgba(24, 28, 30, 0.06);
}
.ghost-border {
  border: 1px solid rgba(193, 199, 210, 0.15);
}
.bg-surface-container-high {
  --tw-bg-opacity: 1;
  background-color: rgb(229 233 235 / var(--tw-bg-opacity, 1));
}
.bg-surface-container-low {
  --tw-bg-opacity: 1;
  background-color: rgb(241 244 246 / var(--tw-bg-opacity, 1));
}
.primary-gradient {
  background: linear-gradient(135deg, #005394 0%, #2b6cb0 100%);
}
.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
  vertical-align: middle;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.delay-100 {
  animation-delay: 0.1s;
}
.delay-200 {
  animation-delay: 0.2s;
}

.opacity-0 {
  opacity: 0;
}

/* ── BNews Toast ────────────────────────────────── */
.bnews-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  min-width: 200px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}
.bnews-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.bnews-toast--info {
  background: rgba(255, 255, 255, 0.98);
  color: #1a1a1a;
  border: 1px solid #e5e7eb;
}
.bnews-toast--success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.bnews-toast--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ── Mobile Menu ──────────────────────────────────────── */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  width: 280px;
  max-width: 80vw;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
}
.mobile-menu-panel.is-open {
  transform: translateX(0);
}
.mobile-nav-link {
  display: block;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  color: #475569;
  border-radius: 8px;
  transition:
    background 0.2s,
    color 0.2s;
}
.mobile-nav-link:hover,
.mobile-nav-link:active {
  background: #f1f5f9;
  color: #2563eb;
}
.mobile-nav-link.active {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  font-weight: 600;
}

/* ── Custom Scrollbar (PC) ─────────────────────────────── */
/* WebKit (Chrome / Edge / Safari) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28);
}
::-webkit-scrollbar-corner {
  background: transparent;
}
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

/* ── Responsive Utilities ─────────────────────────────── */
@media (max-width: 767px) {
  /* Prevent horizontal overflow on mobile */
  html,
  body {
    overflow-x: hidden;
  }

  /* Tighter padding on mobile */
  .max-w-7xl {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Stack footer columns */
  footer .grid {
    gap: 24px;
  }
}

/* ===== Index page marquee animations (kept outside Vue templates) ===== */
@keyframes marketMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.market-ticker {
  display: flex;
  width: max-content;
  animation: marketMarquee 30s linear infinite;
}
.market-ticker:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.ticker {
  display: flex;
  width: max-content;
  animation: marquee 240s linear infinite;
}
.ticker:hover {
  animation-play-state: paused;
}

/* Flash news collapsible title (right section).
   Default: clamp to 2 lines; when parent has .expanded, show full text. */
.flash-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.flash-item.expanded .flash-title {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.flash-item .flash-toggle-collapse {
  display: none;
}
.flash-item.expanded .flash-toggle-more {
  display: none;
}
.flash-item.expanded .flash-toggle-collapse {
  display: inline;
}
/* Hide the entire toggle button until JS detects the title overflows
   beyond 2 lines and adds the .has-overflow marker. */
.flash-item .flash-toggle {
  display: none;
}
.flash-item.has-overflow .flash-toggle {
  display: inline-block;
}

/* Hide [[ \() ]] placeholders until Vue finishes mounting. */
[v-cloak] {
  display: none !important;
}

/* Pure-CSS triangle play button. Uses border-trick so it inherits the
   current text color (works with `text-primary`, `text-white`, etc.).
   Sizing is driven by `font-size` — set it via Tailwind `text-*` or an
   inline style (e.g. `style="font-size:20px"`). */
.play-triangle {
  display: inline-block;
  width: 0;
  height: 0;
  border-style: solid;
  /* top, right, bottom, left — left edge becomes the triangle body */
  border-width: 0.5em 0 0.5em 0.85em;
  border-color: transparent transparent transparent currentColor;
  /* Optical centering inside circular wrappers */
  margin-left: 0.1em;
  vertical-align: middle;
}
