/* ============================================================
   PAMM Engine — Stylesheet
   Professional fintech design system (Darwinex / eToro class)
   Dark glassmorphism · Animated gradients · Pure CSS
   ============================================================ */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Core palette */
  --bg:        #0a0e17;
  --bg-soft:   #0e1320;
  --bg-2:      #111624;
  --card:      #111624;
  --card-2:    #161c2e;
  --bg-3:      #1a2134;
  --bg-4:      #222c44;
  --border:    #1e2536;
  --border-2:  #2a3349;

  --text:      #e7ecf3;
  --text-dim:  #97a0b8;
  --text-mute: #737b90;
  --muted:     #8a94a6;
  --muted-2:   #5a6478;

  /* Brand */
  --accent:    #f7931a;
  --orange:    #f7931a;
  --accent-2:  #ffae3d;
  --accent-d:  #c66e0a;

  --blue:      #627eea;
  --blue-d:    #3b5fd9;

  --green:     #00d4aa;
  --green-d:   #16a34a;
  --red:       #ff4757;
  --red-d:     #b91c1c;
  --yellow:    #ffb300;
  --yellow-2:  #f7a32b;

  /* Medal colors */
  --gold:      #ffd700;
  --gold-2:    #ffb700;
  --silver:    #d4d4d4;
  --silver-2:  #a8a8a8;
  --bronze:    #cd7f32;
  --bronze-2:  #a8651e;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --font-mono: "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* Radii */
  --r-xs:  4px;
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md:  0 8px 24px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.3);
  --shadow-lg:  0 20px 50px rgba(0,0,0,.5), 0 6px 16px rgba(0,0,0,.35);

  /* Glows */
  --glow-orange:  0 0 0 3px rgba(247,147,26,.18), 0 4px 20px rgba(247,147,26,.25);
  --glow-green:   0 0 0 3px rgba(0,212,170,.18), 0 4px 20px rgba(0,212,170,.2);
  --glow-red:     0 0 0 3px rgba(255,71,87,.18), 0 4px 20px rgba(255,71,87,.2);

  /* Gradients */
  --grad-orange: linear-gradient(135deg, var(--accent), var(--accent-d));
  --grad-border: linear-gradient(135deg, var(--accent), var(--blue));
  --grad-card-glow: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(247,147,26,.08), transparent 40%);
  --grad-mesh:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(247,147,26,.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(98,127,234,.10), transparent 55%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(0,212,170,.06), transparent 50%);

  /* Spacing */
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;

  /* Layout */
  --container: 1200px;
  --container-wide: 1300px;
  --header-h: 60px;

  /* Motion */
  --t-fast: 120ms;
  --t-med:  220ms;
  --ease: cubic-bezier(.4,0,.2,1);
  --ease-bounce: cubic-bezier(.34,1.56,.64,1);

  /* Glass effect */
  --glass-bg: rgba(17,22,36,.65);
  --glass-border: rgba(255,255,255,.08);
  --glass-blur: blur(16px);

  color-scheme: dark;
}

/* Dark mode native */
@media (prefers-color-scheme: dark) {
  html { background: var(--bg); }
  body { background: var(--bg); }
}

[data-theme="light"] {
  --bg:        #f5f7fa;
  --bg-soft:   #ffffff;
  --card:      #ffffff;
  --card-2:    #f0f2f7;
  --bg-3:      #e8ecf2;
  --bg-4:      #dde3ed;
  --border:    #e0e5ee;
  --border-2:  #d0d7e3;
  --text:      #1a2134;
  --text-dim:  #4a5568;
  --text-mute: #7a8499;
  --muted:     #6a7488;
  --glass-bg:  rgba(255,255,255,.7);
  --glass-border: rgba(0,0,0,.08);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.12), 0 6px 16px rgba(0,0,0,.08);
}

/* ============================================================
   ANIMATIONS — Premium motion system
   ============================================================ */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes hero-mesh {
  0%   { opacity: .8; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}
@keyframes row-enter {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.lb-table tbody tr { animation: row-enter .3s ease both; }
@keyframes float-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.floating-cta.is-visible { animation: float-in .3s ease both; }
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(247,147,26,.25); }
  50% { box-shadow: 0 0 18px 4px rgba(247,147,26,.35); }
}
.pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
@keyframes medal-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.15); }
}
.rank-badge.top1 { animation: medal-glow 2.5s ease-in-out infinite; }
.rank-badge.top2 { animation: medal-glow 2.5s ease-in-out infinite .4s; }
.rank-badge.top3 { animation: medal-glow 2.5s ease-in-out infinite .8s; }
@keyframes count-up {
  from { opacity: 0; transform: scale(.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes border-rotate {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px) scale(.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Intersection Observer fade-in utility */
.fade-up   { opacity: 0; transform: translateY(24px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.fade-up.is-visible { opacity: 1; transform: translateY(0); }
.fade-in   { opacity: 0; transition: opacity .5s var(--ease); }
.fade-in.is-visible { opacity: 1; }
.stagger-1 { transition-delay: .08s; }
.stagger-2 { transition-delay: .16s; }
.stagger-3 { transition-delay: .24s; }
.stagger-4 { transition-delay: .32s; }
.stagger-5 { transition-delay: .40s; }
.stagger-6 { transition-delay: .48s; }

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(98,127,234,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(247,147,26,.07), transparent 55%),
    radial-gradient(700px 400px at 50% 100%, rgba(0,212,170,.04), transparent 50%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--accent-2); }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
table { border-collapse: collapse; width: 100%; }

::selection { background: var(--accent); color: var(--bg); }

/* Focus states for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Custom scrollbar — fintech polish */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 5px; border: 2px solid var(--bg-soft); }
::-webkit-scrollbar-thumb:hover { background: var(--text-mute); }

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}
.container--narrow { max-width: 760px; }
.container--wide   { max-width: var(--container-wide); }

.section { padding-block: var(--sp-7); }
.section--tight { padding-block: var(--sp-5); }

.grid { display: grid; gap: var(--sp-4); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

.grid--cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--sp-4); }

.flex { display: flex; gap: var(--sp-3); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: var(--sp-3); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.05rem; }
p  { color: var(--text-dim); }
.lead { font-size: 1.1rem; color: var(--text-dim); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-mute); }
.dim   { color: var(--text-dim); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-accent { color: var(--accent); }
.text-blue  { color: var(--blue); }

.pos { color: var(--green); }
.neg { color: var(--red); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(10,14,23,.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(247,147,26,.3), rgba(98,127,234,.3), transparent);
  pointer-events: none;
}
.site-header .container,
.site-header__inner,
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  width: 100%; max-width: var(--container-wide); margin: 0 auto; padding: .7rem 1rem;
}

.brand, .logo {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-weight: 800; font-size: 1.1rem; color: var(--text); letter-spacing: -0.02em;
}
.brand:hover, .logo:hover { color: var(--text); text-decoration: none; }
.brand__logo,
.brand-mark,
.logo .dot {
  width: 30px; height: 30px; border-radius: var(--r-sm); flex: none;
  display: grid; place-items: center; font-weight: 900; font-size: .9rem;
  box-shadow: 0 2px 8px rgba(247,147,26,.35);
}
.logo .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
}
.brand-mark {
  background: linear-gradient(135deg, var(--accent), var(--accent-d));
  color: var(--bg);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand__name, .logo span {
  background: linear-gradient(90deg, var(--accent), var(--blue));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

a.logo { color: var(--text); font-size: 1.1rem; font-weight: 800; text-decoration: none; }
a.logo:hover { color: var(--text); }

.main-nav, .nav { display: none; align-items: center; gap: .2rem; }
.main-nav a, .nav a {
  color: var(--text-dim); font-weight: 500; font-size: .95rem;
  padding: .4rem .75rem; border-radius: var(--r-sm); position: relative;
  transition: all var(--t-fast) var(--ease);
}
.main-nav a:hover, .nav a:hover { color: var(--text); background: var(--bg-3); }
.main-nav a.is-active, .nav a.active { color: var(--accent); background: var(--bg-3); }
.main-nav a.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%);
  width: 20px; height: 2px; background: var(--accent); border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: var(--sp-2); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-sm);
  border: 1px solid var(--border); color: var(--text);
  transition: all var(--t-fast) var(--ease);
}
.nav-toggle:hover { background: var(--card); border-color: var(--border-2); }
.nav-toggle svg { width: 22px; height: 22px; }

.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0;
  background: var(--bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: var(--sp-5) var(--sp-4);
  display: none; flex-direction: column; gap: var(--sp-4);
  z-index: 99; overflow-y: auto;
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  font-size: 1.2rem; font-weight: 600; color: var(--text);
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--border);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-weight: 600; font-size: .95rem; line-height: 1;
  padding: 11px 18px; border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: transform var(--t-fast) var(--ease),
              background var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease),
              border-color var(--t-fast) var(--ease),
              filter var(--t-fast) var(--ease);
  white-space: nowrap; -webkit-user-select: none; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  position: relative; overflow: hidden;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--glow-orange); }
.btn:disabled, .btn.is-loading { opacity: .6; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }

/* Primary — orange gradient with glow */
.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent), var(--accent-d));
  background-size: 100% 200%; background-position: 0 0;
  color: var(--bg); border-color: var(--accent-d);
  box-shadow: 0 2px 8px rgba(247,147,26,.3), inset 0 1px 0 rgba(255,255,255,.2);
}
.btn-primary:hover {
  background-position: 0 100%;
  box-shadow: 0 4px 24px rgba(247,147,26,.5), 0 0 40px rgba(247,147,26,.25),
              inset 0 1px 0 rgba(255,255,255,.3);
  transform: translateY(-1px);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.2), transparent 60%);
  opacity: 0; transition: opacity var(--t-med) var(--ease); pointer-events: none;
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(247,147,26,.3); }

/* Ghost */
.btn-ghost,
.btn--ghost {
  background: transparent; color: var(--text);
  border-color: var(--border-2);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover, .btn--ghost:hover {
  background: rgba(42,51,73,.4);
  border-color: var(--accent); color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(247,147,26,.1);
}
.btn--ghost { background: var(--bg-3); }

/* Blue */
.btn-blue {
  background: linear-gradient(180deg, var(--blue), var(--blue-d));
  color: #fff; border-color: var(--blue-d);
  box-shadow: 0 2px 8px rgba(98,127,234,.3), inset 0 1px 0 rgba(255,255,255,.15);
}
.btn-blue:hover { filter: brightness(1.12); box-shadow: 0 4px 20px rgba(98,127,234,.45); transform: translateY(-1px); }

/* Danger */
.btn-danger {
  background: linear-gradient(180deg, var(--red), var(--red-d));
  color: #fff; border-color: var(--red-d);
  box-shadow: 0 2px 8px rgba(255,71,87,.3), inset 0 1px 0 rgba(255,255,255,.15);
}
.btn-danger:hover { filter: brightness(1.1); box-shadow: 0 4px 20px rgba(255,71,87,.45); transform: translateY(-1px); }

/* Buy */
.btn--buy {
  background: linear-gradient(180deg, var(--green), var(--green-d));
  color: #062b1d; border-color: var(--green-d);
  box-shadow: 0 2px 8px rgba(0,212,170,.3), inset 0 1px 0 rgba(255,255,255,.2);
}
.btn--buy:hover { filter: brightness(1.1); box-shadow: 0 4px 20px rgba(0,212,170,.45); transform: translateY(-1px); }

.btn--sell {
  background: transparent; color: var(--red); border-color: var(--red);
}
.btn--sell:hover { background: rgba(255,71,87,.1); box-shadow: var(--glow-red); }

/* Sizes */
.btn-sm { padding: 7px 12px; font-size: .85rem; border-radius: var(--r-sm); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }
.btn-icon { padding: 9px; width: 38px; height: 38px; }
.btn-icon svg { width: 18px; height: 18px; }

.btn-reset {
  width: 100%; margin-top: var(--sp-3); padding: .5rem;
  border: 1px solid var(--border-2); border-radius: var(--r-md);
  color: var(--text-dim); font-size: .8rem; font-weight: 600;
  transition: all var(--t-fast) var(--ease);
}
.btn-reset:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t-med) var(--ease),
              transform var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease);
}

.card--glass,
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-color: var(--glass-border);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,.05);
}

.card--hover,
.strategy-card,
.card[data-href] {
  position: relative;
  overflow: hidden;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.card--hover::before,
.strategy-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--blue), var(--green), var(--accent));
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
  pointer-events: none;
}
.card--hover:hover,
.strategy-card:hover {
  border-color: transparent;
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 40px rgba(247,147,26,.1);
}
.card--hover:hover::before,
.strategy-card:hover::before {
  opacity: 1;
  animation: borderGradient 4s linear infinite;
}

@keyframes borderGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.card[data-hover-glow]:hover {
  box-shadow: var(--shadow-lg), 0 0 40px rgba(247,147,26,.08);
  transform: translateY(-4px);
}

.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.card-title, .card__title { font-size: 1.05rem; font-weight: 700; }
.card-sub, .card__manager { font-size: .82rem; color: var(--text-mute); margin-top: .15rem; }

.card__top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-2);
}
.card__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); font-size: .8rem;
}
.card__foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: var(--sp-3); border-top: 1px solid var(--border); font-size: .82rem;
}

.ret-badge { font-size: 1.5rem; font-weight: 800; line-height: 1; font-family: var(--font-mono); }
.ret-badge.pos { color: var(--green); }
.ret-badge.neg { color: var(--red); }

.cta { color: var(--accent); font-weight: 600; font-size: .85rem; transition: gap var(--t-fast) var(--ease); }
a.card { display: flex; flex-direction: column; gap: var(--sp-3); cursor: pointer; text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--accent); transform: translateY(-3px); }
a.card:hover .cta { gap: .5rem; }

.verified {
  display: inline-flex; align-items: center; gap: .2rem;
  color: var(--blue); font-size: .72rem; font-weight: 600;
}

.risk { display: inline-flex; align-items: center; gap: .3rem; color: var(--text-mute); font-size: .82rem; }
.risk__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.pill {
  display: inline-block; background: var(--bg-3); color: var(--text-dim);
  font-size: .78rem; padding: .2rem .6rem; border-radius: var(--r-pill);
  margin-left: .5rem; font-weight: 600;
}

.tag {
  display: inline-block; background: var(--bg-3); padding: .2rem .6rem;
  border-radius: var(--r-sm); font-size: .72rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--r-pill);
  border: 1px solid var(--border-2); background: var(--card-2); color: var(--text-dim);
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.badge-risk-low,
.risk-low {
  color: var(--green); border-color: rgba(0,212,170,.35); background: rgba(0,212,170,.12);
}
.badge-risk-medium,
.risk-med {
  color: var(--yellow-2); border-color: rgba(247,163,43,.35); background: rgba(247,163,43,.12);
}
.badge-risk-high,
.risk-high {
  color: var(--accent); border-color: rgba(247,147,26,.35); background: rgba(247,147,26,.12);
}
.badge-risk-extreme {
  color: var(--red); border-color: rgba(255,71,87,.35); background: rgba(255,71,87,.12);
}

.risk-badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .15rem .5rem; border-radius: var(--r-sm);
  font-size: .72rem; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.risk-badge .dot { width: 6px; height: 6px; border-radius: 50%; }
.risk-low .dot { background: var(--green); }
.risk-med .dot { background: var(--yellow-2); }
.risk-high .dot { background: var(--accent); }

.badge-status-active   { color: var(--green);  border-color: rgba(0,212,170,.35);  background: rgba(0,212,170,.12); }
.badge-status-closed   { color: var(--text-mute); }
.badge-status-paused   { color: var(--yellow-2); border-color: rgba(247,163,43,.35); background: rgba(247,163,43,.12); }

.badge-long  { color: var(--green); border-color: rgba(0,212,170,.35); background: rgba(0,212,170,.12); }
.badge-short { color: var(--red);   border-color: rgba(255,71,87,.35); background: rgba(255,71,87,.12); }
.badge-verified { color: var(--blue); border-color: rgba(98,127,234,.35); background: rgba(98,127,234,.12); }

/* ============================================================
   MEDALS
   ============================================================ */
.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  font-weight: 800; font-size: .85rem; flex: none;
  background: var(--bg-4); color: var(--text-mute);
  border: 1px solid var(--border-2);
  transition: transform var(--t-med) var(--ease-bounce);
}
.rank-badge.top1 {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #3a2a00;
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(255,215,0,.4), inset 0 1px 0 rgba(255,255,255,.3);
}
.rank-badge.top2 {
  background: linear-gradient(135deg, var(--silver), var(--silver-2));
  color: #1a1a1a;
  border-color: var(--silver);
  box-shadow: 0 0 10px rgba(212,212,212,.3), inset 0 1px 0 rgba(255,255,255,.3);
}
.rank-badge.top3 {
  background: linear-gradient(135deg, var(--bronze), var(--bronze-2));
  color: #2a1500;
  border-color: var(--bronze);
  box-shadow: 0 0 10px rgba(205,127,50,.35), inset 0 1px 0 rgba(255,255,255,.2);
}
tr:hover .rank-badge,
.lb-card:hover .rank-badge { transform: scale(1.12); }

/* ============================================================
   DELTA
   ============================================================ */
.delta { font-family: var(--font-mono); font-weight: 700; font-size: .9rem; }
.delta-pos { color: var(--green); }
.delta-neg { color: var(--red); }
.delta::before { content: ""; margin-right: 2px; }
.delta-pos::before { content: "▲"; }
.delta-neg::before { content: "▼"; }

/* ============================================================
   PAGE HERO
   ============================================================ */
.page-hero { padding-block: var(--sp-6) var(--sp-5); }
.page-hero h1 { margin-bottom: var(--sp-3); }

.page-head { margin-bottom: var(--sp-5); }
.page-head h1 { font-size: clamp(1.4rem, 4vw, 1.8rem); font-weight: 800; margin-bottom: .25rem; }
.page-head h1 .emoji { margin-right: .4rem; }
.page-head p { color: var(--text-mute); font-size: .95rem; margin-top: .2rem; }

.breadcrumb {
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
  font-size: .85rem; color: var(--text-mute); margin-bottom: var(--sp-4);
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb span.sep { opacity: .5; }

.back {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--text-mute); font-size: .88rem; margin-bottom: var(--sp-4);
  transition: color var(--t-fast) var(--ease), gap var(--t-fast) var(--ease);
}
.back:hover { color: var(--text); gap: .5rem; }

/* ============================================================
   LEADERBOARD TABLE
   ============================================================ */
.strategies-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  flex-wrap: wrap; margin-bottom: var(--sp-5);
}

.search-box {
  position: relative; flex: 1; min-width: 200px;
}
.search-box input {
  width: 100%; padding: 10px 14px 10px 38px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
  color: var(--text); transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.search-box input::placeholder { color: var(--text-mute); }
.search-box input:focus { outline: none; border-color: var(--accent); box-shadow: var(--glow-orange); }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-mute); }

.filter-pills { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.filter-pills button {
  padding: 8px 14px; font-size: .85rem; font-weight: 600;
  border-radius: var(--r-pill); border: 1px solid var(--border-2); color: var(--text-dim);
  transition: all var(--t-fast) var(--ease);
}
.filter-pills button:hover { color: var(--text); border-color: var(--text-mute); }
.filter-pills button.is-active {
  background: var(--accent); color: var(--bg); border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(247,147,26,.3);
}

/* Desktop strategies table */
.strategies-table { display: none; }
.strategies-table table { width: 100%; }
.strategies-table th {
  text-align: left; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-mute); padding: var(--sp-3); border-bottom: 1px solid var(--border);
  white-space: nowrap; position: sticky; top: var(--header-h); z-index: 2;
  background: var(--card);
  backdrop-filter: blur(8px);
}
.strategies-table th.num { text-align: right; }
.strategies-table td {
  padding: var(--sp-4) var(--sp-3); border-bottom: 1px solid var(--border); vertical-align: middle;
}
.strategies-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,.015);
}
.strategies-table tbody tr:nth-child(even):hover {
  background: rgba(247,147,26,.06);
}
.strategies-table tbody tr {
  transition: background var(--t-fast) var(--ease); cursor: pointer;
}
.strategies-table tbody tr:hover {
  background: rgba(247,147,26,.04);
}
.strategies-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}
.strategies-table td.num { text-align: right; font-family: var(--font-mono); font-size: .92rem; }

/* Leaderboard table */
.lb-layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }

.lb-table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}
.lb-table-wrap::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(247,147,26,.3), rgba(98,127,234,.3), transparent);
  pointer-events: none;
}
.lb-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.lb-table thead th {
  background: var(--bg-3); color: var(--text-mute); font-weight: 700; font-size: .74rem;
  text-transform: uppercase; letter-spacing: .04em; padding: .7rem .6rem;
  text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5; -webkit-user-select: none;
  backdrop-filter: blur(8px);
}
.lb-table thead th.sortable { cursor: pointer; transition: color var(--t-fast) var(--ease); }
.lb-table thead th.sortable:hover { color: var(--text); }
.lb-table thead th.active { color: var(--accent); }
.lb-table thead th .arrow { font-size: .6rem; margin-left: .2rem; opacity: .6; }
.lb-table thead th.active .arrow { opacity: 1; }
.lb-table thead th:nth-child(1),
.lb-table thead th:nth-child(2) { text-align: left; }

.lb-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast) var(--ease);
  cursor: pointer;
}
.lb-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,.015);
}
.lb-table tbody tr:nth-child(even):hover {
  background: rgba(247,147,26,.07);
}
.lb-table tbody tr:hover {
  background: rgba(247,147,26,.05);
}
.lb-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}
.lb-table tbody tr:last-child { border-bottom: none; }
.lb-table td {
  padding: .65rem .6rem; text-align: right; white-space: nowrap;
}
.lb-table td:nth-child(1),
.lb-table td:nth-child(2) { text-align: left; }

.strat-cell { display: flex; align-items: center; gap: .6rem; min-width: 160px; }
.strat-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem; color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.strat-info { min-width: 0; }
.strat-name {
  font-weight: 600; font-size: .88rem; color: var(--text);
  display: flex; align-items: center; gap: .3rem;
}
.strat-name .verified { color: var(--blue); font-size: .7rem; }
.strat-manager {
  color: var(--text-mute); font-size: .74rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.num-strong { font-weight: 600; }
.muted-sm { color: var(--text-mute); font-size: .74rem; }

/* Filters sidebar */
.filters {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
}
.filters__title {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-mute); font-weight: 700; margin-bottom: var(--sp-4);
  display: flex; justify-content: space-between; align-items: center;
}
.filters__title button {
  font-size: .72rem; color: var(--accent); font-weight: 600;
  text-transform: none; letter-spacing: 0;
}
.filter-group { margin-bottom: var(--sp-4); }
.filter-group:last-child { margin-bottom: 0; }
.filter-label {
  display: block; font-size: .78rem; color: var(--text-mute);
  margin-bottom: .4rem; font-weight: 500;
}
.filter-input, .filter-select {
  width: 100%; background: var(--bg-3); border: 1px solid var(--border-2);
  border-radius: var(--r-md); padding: .5rem .65rem;
  color: var(--text); font-size: .85rem;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.filter-input:focus, .filter-select:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--glow-orange);
}
.filter-select {
  cursor: pointer; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a94a6' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .6rem center; padding-right: 1.6rem;
}

.risk-slider-wrap { position: relative; height: 36px; margin-top: .2rem; }
.risk-track { position: absolute; left: 0; right: 0; top: 14px; height: 4px; background: var(--bg-4); border-radius: 2px; }
.risk-range {
  position: absolute; top: 14px; height: 4px;
  background: linear-gradient(90deg, var(--green), var(--yellow-2), var(--red));
  border-radius: 2px;
}
.risk-slider-wrap input[type=range] {
  position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 18px;
  -webkit-appearance: none; appearance: none; background: transparent; pointer-events: none;
}
.risk-slider-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent); cursor: pointer; pointer-events: auto;
  margin-top: 0; box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.risk-slider-wrap input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--accent);
  cursor: pointer; pointer-events: auto;
}
.risk-values { display: flex; justify-content: space-between; font-size: .72rem; color: var(--text-mute); margin-top: .1rem; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: var(--sp-4); flex-wrap: wrap;
}
.pagination__info { color: var(--text-mute); font-size: .8rem; }
.pagination__pages { display: flex; gap: .25rem; align-items: center; }
.page-btn {
  min-width: 36px; height: 36px; padding: 0 .5rem; border-radius: var(--r-sm);
  border: 1px solid var(--border-2); background: var(--card); color: var(--text-mute);
  font-size: .82rem; font-weight: 600; transition: all var(--t-fast) var(--ease);
}
.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); box-shadow: var(--glow-orange); }
.page-btn.active {
  background: var(--accent); border-color: var(--accent); color: var(--bg);
  box-shadow: 0 2px 8px rgba(247,147,26,.3);
}
.page-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ============================================================
   MANAGER CELL
   ============================================================ */
.mgr { display: flex; align-items: center; gap: var(--sp-3); }
.mgr-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .9rem;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.mgr-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mgr-name { font-weight: 600; font-size: .95rem; color: var(--text); }
.mgr-sub  { font-size: .8rem; color: var(--text-mute); }

/* ============================================================
   MOBILE CARDS
   ============================================================ */
.strategy-cards { display: grid; gap: var(--sp-3); }
.strategy-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-4); cursor: pointer;
}
.strategy-card .mgr { margin-bottom: var(--sp-3); }
.strategy-card .sc-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: 7px 0; border-top: 1px solid var(--border); font-size: .9rem;
}
.strategy-card .sc-row:first-of-type { border-top: 0; }
.strategy-card .sc-label { color: var(--text-mute); font-size: .82rem; }
.strategy-card .sc-val { font-family: var(--font-mono); font-weight: 600; }

.lb-cards { display: none; flex-direction: column; gap: .6rem; }
.lb-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: .85rem;
  display: flex; flex-direction: column; gap: .6rem;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.lb-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.lb-card__top { display: flex; align-items: center; gap: .6rem; }
.lb-card__body {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; font-size: .78rem;
}
.lb-card__body .stat,
.lb-card__body .lb-stat {
  background: var(--bg-3); padding: .4rem; border-radius: var(--r-sm);
}
.lb-card__body .stat__label,
.lb-card__body .lb-stat__label {
  display: block; font-size: .64rem; color: var(--text-mute);
  text-transform: uppercase; letter-spacing: .04em;
}
.lb-card__body .stat__val,
.lb-card__body .lb-stat__val {
  font-weight: 600; margin-top: .1rem; font-family: var(--font-mono);
}

/* ============================================================
   FUND DETAIL
   ============================================================ */
.fund-header,
.fund-head {
  display: flex; flex-direction: column; gap: var(--sp-4);
  padding: var(--sp-5); background: var(--card);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  margin-bottom: var(--sp-5);
  box-shadow: var(--shadow-md);
}
.fund-header .mgr-avatar { width: 56px; height: 56px; font-size: 1.2rem; }
.fund-title,
.fund-head__title {
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
}
.fund-title h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin: 0; }
.fund-head__title h1 { font-size: clamp(1.4rem, 4vw, 1.8rem); font-weight: 800; margin-bottom: .3rem; }

.fund-meta,
.fund-head__manager {
  display: flex; gap: var(--sp-3); flex-wrap: wrap;
  color: var(--text-mute); font-size: .88rem; align-items: center;
}
.fund-meta span,
.fund-head__manager span { display: inline-flex; align-items: center; gap: 5px; }
.fund-description { color: var(--text-dim); line-height: 1.7; }

.big-ret {
  font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 800; line-height: 1;
  text-align: right; font-family: var(--font-mono);
}
.big-ret.pos { color: var(--green); text-shadow: 0 0 30px rgba(0,212,170,.2); }
.big-ret.neg { color: var(--red); text-shadow: 0 0 30px rgba(255,71,87,.2); }
.big-ret__label {
  display: block; font-size: .72rem; color: var(--text-mute);
  text-transform: uppercase; letter-spacing: .04em; margin-top: .25rem; text-align: right;
}

.grid2 {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--sp-4); align-items: start;
}

/* ============================================================
   STATS GRID
   ============================================================ */
.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3);
}
.stat,
.lb-stat {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-4);
  transition: border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
  position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--border-2);
  transition: background var(--t-med) var(--ease);
}
.stat:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.stat.pos:hover { box-shadow: 0 0 0 1px rgba(0,212,170,.15), var(--shadow-sm); }
.stat.neg:hover { box-shadow: 0 0 0 1px rgba(255,71,87,.15), var(--shadow-sm); }

.stat:has(.pos)::before,
.stat:has(.stat__val.pos)::before { background: var(--green); }
.stat:has(.neg)::before,
.stat:has(.stat__val.neg)::before { background: var(--red); }

.stat-label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-mute); margin-bottom: 6px;
}
.stat-label, .stat__label {
  display: block; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-mute);
}
.stat-value, .stat__val {
  font-size: 1.1rem; font-weight: 800; font-family: var(--font-mono); line-height: 1.1;
  margin-top: .2rem;
}
.stat-value { font-size: 1.4rem; }
.stat-sub { font-size: .8rem; color: var(--text-dim); margin-top: 4px; }

.stat__val.pos, .stat-value.pos { color: var(--green); }
.stat__val.neg, .stat-value.neg { color: var(--red); }

/* ============================================================
   CHARTS
   ============================================================ */
.chart-card {
  padding: var(--sp-5); background: var(--card);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.chart-card h2,
.card h2 {
  font-size: 1rem; font-weight: 700; margin-bottom: var(--sp-3);
  display: flex; align-items: center; gap: .4rem;
}

.chart-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); margin-bottom: var(--sp-4); flex-wrap: wrap;
}
.chart-title { font-size: 1rem; font-weight: 700; }
.chart-range { display: flex; gap: 4px; }
.chart-range button {
  padding: 5px 11px; font-size: .78rem; font-weight: 600;
  border-radius: var(--r-sm); border: 1px solid var(--border); color: var(--text-dim);
  transition: all var(--t-fast) var(--ease);
}
.chart-range button:hover { color: var(--text); border-color: var(--border-2); }
.chart-range button.is-active {
  background: var(--card-2); color: var(--accent); border-color: var(--accent);
}

.chart-wrap {
  position: relative; width: 100%; height: 280px;
  background: var(--bg-soft);
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 100% 25%, 25% 100%;
  border: 1px solid var(--border); border-radius: var(--r-md);
  overflow: visible;
  cursor: crosshair;
}
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.chart-wrap canvas#navChart { cursor: crosshair; }
.chart-wrap::after {
  content: ""; position: absolute; inset: 0;
  border-radius: var(--r-md); pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
  transition: box-shadow var(--t-med) var(--ease);
}
.chart-wrap:hover::after { box-shadow: inset 0 0 20px rgba(247,147,26,.05); }

.chart-loading, .chart-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--text-mute); font-size: .9rem;
}
.chart-empty { height: 260px; }

.chart-tooltip {
  position: absolute; pointer-events: none; z-index: 20;
  background: var(--card-2); border: 1px solid rgba(247,147,26,.2); border-radius: var(--r-sm);
  padding: 7px 10px; font-size: .8rem; box-shadow: 0 4px 12px rgba(0,0,0,.4), 0 0 0 1px rgba(247,147,26,.1);
  transform: translate(-50%, -120%); white-space: nowrap;
  opacity: 0; transition: opacity var(--t-fast);
  backdrop-filter: blur(8px);
}
.chart-tooltip::before {
  content: ""; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 6px solid var(--border-2);
}
.chart-tooltip strong { color: var(--accent); font-family: var(--font-mono); }

.sparkline-wrap {
  display: inline-block;
  vertical-align: middle;
  width: auto;
  line-height: 0;
}

.tt-date {
  display: block;
  font-size: .75rem;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.tt-val {
  display: block;
  font-weight: 700;
  color: var(--text);
  font-size: .85rem;
  font-family: var(--font-mono);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: var(--sp-4); }
.form-label {
  display: block; font-size: .85rem; font-weight: 600;
  color: var(--text-dim); margin-bottom: 7px;
}
.form-label .req { color: var(--accent); }
.form-hint { font-size: .78rem; color: var(--text-mute); margin-top: 5px; }

.input, .select, .textarea {
  width: 100%; padding: 11px 14px;
  background: var(--bg-soft); border: 1px solid var(--border-2); border-radius: var(--r-md);
  color: var(--text);
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-mute); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: var(--glow-orange);
  background: var(--card);
}
.textarea { min-height: 100px; resize: vertical; }
.select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2397a0b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px;
}

.input.is-valid, .select.is-valid, .textarea.is-valid {
  border-color: var(--green);
}
.input.is-valid:focus, .select.is-valid:focus {
  box-shadow: var(--glow-green);
}
.input.is-invalid, .select.is-invalid, .textarea.is-invalid {
  border-color: var(--red);
}
.input.is-invalid:focus, .select.is-invalid:focus {
  box-shadow: var(--glow-red);
  background: rgba(255,71,87,.04);
}

.form-feedback {
  font-size: .78rem; margin-top: 5px; display: none;
}
.form-feedback.is-visible { display: block; }
.form-feedback.valid { color: var(--green); }
.form-feedback.invalid { color: var(--red); }

.input-group { position: relative; display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--r-md) 0 0 var(--r-md); }
.input-group .input-addon {
  display: inline-flex; align-items: center; padding: 0 14px;
  background: var(--card-2); border: 1px solid var(--border-2); border-left: 0;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--text-dim); font-weight: 600; font-size: .9rem;
}

.amount-slider {
  width: 100%; -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, var(--border-2), var(--border-2));
  outline: none; margin-top: var(--sp-3);
}
.amount-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent), 0 2px 8px rgba(247,147,26,.4);
  transition: transform var(--t-fast) var(--ease-bounce);
}
.amount-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.amount-slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent);
  cursor: pointer; border: 3px solid var(--bg);
}

.form-summary {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: var(--sp-4); margin-block: var(--sp-4);
}
.form-summary .fs-row {
  display: flex; justify-content: space-between; padding: 5px 0; font-size: .92rem;
}
.form-summary .fs-row.total {
  border-top: 1px solid var(--border); margin-top: 7px; padding-top: 12px;
  font-weight: 700; font-size: 1.05rem;
}
.form-summary .fs-label { color: var(--text-dim); }
.form-summary .fs-val { font-family: var(--font-mono); }

.form-actions, .cta-row {
  display: flex; gap: var(--sp-3); margin-top: var(--sp-5); flex-wrap: wrap;
}
.cta-row .btn { flex: 1; min-width: 140px; }

.form-error {
  background: rgba(255,71,87,.1); border: 1px solid rgba(255,71,87,.35); color: var(--red);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); font-size: .9rem;
  margin-bottom: var(--sp-4); display: none;
}
.form-error.is-visible { display: block; }

.fees {
  margin-top: var(--sp-4); padding: var(--sp-4);
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--r-md); font-size: .82rem; color: var(--text-mute); line-height: 1.7;
}
.fees strong { color: var(--text); }

.instruments { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.inst {
  background: var(--bg-3); padding: .3rem .65rem;
  border-radius: var(--r-sm); font-size: .78rem; color: var(--text);
  border: 1px solid var(--border);
}

.desc {
  margin-top: var(--sp-5); color: var(--text-dim);
  font-size: .94rem; line-height: 1.65;
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
.portfolio-summary {
  display: grid; grid-template-columns: 1fr; gap: var(--sp-3); margin-bottom: var(--sp-5);
}
.summary-tile {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-5);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.summary-tile::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent);
}
.summary-tile.blue::before { background: var(--blue); }
.summary-tile.green::before { background: var(--green); }
.summary-tile .stat-label { margin-bottom: var(--sp-2); }
.summary-tile .stat-value { font-size: clamp(1.6rem, 5vw, 2.2rem); }

.positions-list { display: grid; gap: var(--sp-3); }
.position-row {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: var(--sp-4); display: grid; gap: var(--sp-3);
  transition: border-color var(--t-fast) var(--ease);
}
.position-row:hover { border-color: var(--border-2); }
.position-main {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3);
}
.position-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2) var(--sp-4); }
.position-stat { font-size: .85rem; }
.position-stat .ps-label { color: var(--text-mute); font-size: .75rem; display: block; }
.position-stat .ps-val { font-family: var(--font-mono); font-weight: 600; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-stack {
  position: fixed; bottom: var(--sp-4); right: var(--sp-4); z-index: 9999;
  display: flex; flex-direction: column; gap: var(--sp-2);
  max-width: calc(100vw - var(--sp-8)); width: 360px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: var(--sp-3);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--blue);
  border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-lg);
  animation: toast-in var(--t-med) var(--ease-bounce) both;
}
.toast.is-leaving { animation: toast-out var(--t-med) var(--ease) both; }
.toast-icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-weight: 700; font-size: .92rem; margin-bottom: 2px; }
.toast-msg { font-size: .85rem; color: var(--text-dim); word-wrap: break-word; }
.toast-close { color: var(--text-mute); padding: 2px; line-height: 1; font-size: 1.1rem; }
.toast-close:hover { color: var(--text); }

.toast-success { border-left-color: var(--green); }
.toast-success .toast-icon { color: var(--green); }
.toast-error   { border-left-color: var(--red); }
.toast-error .toast-icon { color: var(--red); }
.toast-warning { border-left-color: var(--yellow-2); }
.toast-warning .toast-icon { color: var(--yellow-2); }
.toast-info    { border-left-color: var(--blue); }
.toast-info .toast-icon { color: var(--blue); }

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.divider { height: 1px; background: var(--border); border: 0; margin-block: var(--sp-5); }

/* Spinner */
.spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 2px solid rgba(247,147,26,.2);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s cubic-bezier(.68,-.55,.27,1.55) infinite;
  box-shadow: 0 0 10px rgba(247,147,26,.15);
}
.btn.is-loading .spinner { margin-right: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Large spinner for full-page loading */
.spinner-lg {
  width: 48px; height: 48px;
  border: 3px solid rgba(247,147,26,.15);
  border-top-color: var(--accent);
  animation: spin 1s cubic-bezier(.68,-.55,.27,1.55) infinite;
  box-shadow: 0 0 20px rgba(247,147,26,.2);
}

/* ============================================================
   SKELETON LOADERS
   ============================================================ */
.skeleton {
  position: relative; overflow: hidden;
  background: var(--card-2);
  border-radius: var(--r-sm);
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(247,147,26,.06) 20%,
    rgba(255,255,255,.08) 50%,
    rgba(98,127,234,.06) 80%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: shimmer 1.6s infinite;
}

.skeleton-text { height: 14px; margin-bottom: 8px; border-radius: var(--r-xs); }
.skeleton-text--sm { height: 10px; width: 60%; }
.skeleton-text--lg { height: 20px; width: 80%; }
.skeleton-title { height: 28px; width: 50%; margin-bottom: var(--sp-3); }
.skeleton-avatar { width: 38px; height: 38px; border-radius: 50%; }
.skeleton-card {
  height: 180px; border-radius: var(--r-lg); border: 1px solid var(--border);
}
.skeleton-stat { height: 70px; border-radius: var(--r-md); }
.skeleton-row { height: 48px; border-radius: var(--r-sm); margin-bottom: 4px; }

/* ============================================================
   FORM INPUT ALIAS
   ============================================================ */
.form-input { width: 100%; padding: 11px 14px; background: var(--bg-soft); border: 1px solid var(--border-2); border-radius: var(--r-md); color: var(--text); transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease); font: inherit; }
.form-input::placeholder { color: var(--text-mute); }
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--glow-orange); background: var(--card); }
.form-input.is-invalid { border-color: var(--red); }
.form-input.is-valid { border-color: var(--green); }

/* ============================================================
   AUTH PAGE
   ============================================================ */
.auth-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--shadow-md); }
.auth-card h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: .3rem; }
.auth-subtitle { color: var(--text-mute); font-size: .9rem; margin-bottom: var(--sp-5); }
.auth-actions { margin-top: var(--sp-4); }
.auth-hint { font-size: .88rem; color: var(--text-dim); }
.auth-divider { border: none; border-top: 1px solid var(--border); margin: var(--sp-5) 0; }

/* ============================================================
   ALERT / NOTICE BOXES
   ============================================================ */
.alert { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); font-size: .9rem; margin-bottom: var(--sp-4); }
.alert-error { background: rgba(255,71,87,.1); border: 1px solid rgba(255,71,87,.35); color: var(--red); }
.alert-success { background: rgba(0,212,170,.1); border: 1px solid rgba(0,212,170,.35); color: var(--green); }
.alert-warning { background: rgba(255,179,0,.1); border: 1px solid rgba(255,179,0,.35); color: var(--yellow); }

.summary-tile.red::before { background: var(--red); }
.summary-tile.yellow::before { background: var(--yellow); }
.summary-tile.orange::before { background: var(--accent); }

/* Empty state */
.empty, .empty-state {
  text-align: center; padding: var(--sp-6) 0; color: var(--text-dim);
}
.empty-state { background: var(--card); border-radius: var(--r-lg); border: 1px dashed var(--border); }
.empty-state__icon { font-size: 2rem; margin-bottom: var(--sp-3); }
.empty a, .empty-state a { color: var(--accent); }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto var(--sp-3); opacity: .5; }
.empty-row { color: var(--text-dim); text-align: center; padding: var(--sp-4); }
.empty-rank { background: var(--card); border-radius: var(--r-lg); border: 1px dashed var(--border); padding: var(--sp-6); text-align: center; color: var(--text-dim); }
.empty-state h3 { color: var(--text-dim); margin-bottom: var(--sp-2); }
.empty code { color: var(--accent); }

/* Loading state */
.loading {
  text-align: center; padding: 3rem 1rem; color: var(--text-mute);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border); margin-top: var(--sp-7); padding-block: var(--sp-6);
  color: var(--text-mute); font-size: .88rem;
}
.site-footer .container {
  display: flex; flex-direction: column; gap: var(--sp-4);
}
.footer-links { display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); }
.footer-disclaimer {
  font-size: .78rem; line-height: 1.5; color: var(--text-mute);
  border-top: 1px solid var(--border); padding-top: var(--sp-4);
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Mobile-first base styles */
@media (max-width: 767px) {
  /* Touch-friendly tap targets */
  .btn, button, input[type="submit"], input[type="button"] {
    min-height: 44px !important;
    padding: 12px 20px !important;
  }
  .nav a, .main-nav a, .nav-link {
    min-height: 44px !important;
    padding: 12px 16px !important;
    display: inline-flex !important;
    align-items: center !important;
  }
  .site-header__inner .nav a {
    min-height: 44px !important;
    padding: 12px 16px !important;
  }

  /* Form inputs - prevent iOS zoom and ensure touch targets */
  input[type="text"], input[type="email"], input[type="password"],
  input[type="number"], input[type="search"], input[type="tel"],
  input[type="url"], input[type="date"], input[type="time"],
  select, textarea {
    font-size: 16px !important;
    min-height: 44px !important;
    padding: 10px 14px !important;
  }

  /* Improved mobile cards */
  .lb-card { padding: 1rem; }
  .lb-card__body { grid-template-columns: repeat(2, 1fr); }

  /* Better font scaling on mobile */
  html { font-size: 15px; }
  h1 { font-size: clamp(1.5rem, 6vw, 2rem); }
  h2 { font-size: clamp(1.25rem, 4vw, 1.5rem); }

  /* Stack footer on mobile */
  .site-footer .container { text-align: center; }
  .footer-links { justify-content: center; }

  /* Mobile navigation fixes */
  .pamm-header-inner,
  .site-header__inner,
  .header-inner {
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 10px 16px !important;
  }
  .pamm-nav,
  .site-header__inner .nav {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.3s ease !important;
  }
  .pamm-nav.is-open,
  .site-header__inner .nav.is-open {
    max-height: 500px !important;
    overflow: visible !important;
  }
  .pamm-nav .nav-link,
  .site-header__inner .nav a {
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--border, #30363d) !important;
    display: block !important;
  }
  .pamm-nav .login-inline,
  .site-header__inner .nav .login-inline {
    flex-direction: column !important;
    width: 100% !important;
    margin: 8px 0 !important;
  }
  .pamm-nav .login-inline input,
  .site-header__inner .nav .login-inline input {
    width: 100% !important;
  }

  /* Show hamburger on mobile */
  .nav-toggle {
    display: inline-flex !important;
  }

  /* Fix table overflow on mobile */
  .table-wrap, .strategies-table, .lb-table-wrap, .scroll-x,
  .data-table, .admin-table {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    display: block !important;
  }
  .table-wrap table, .strategies-table table, .data-table table {
    min-width: 600px !important;
    width: max-content !important;
  }

  /* Fix grid layouts on mobile */
  .grid, .grid-3, .grid-4, .grid2, .grid--2, .grid--3, .grid--4,
  .stats-grid, .portfolio-summary, .fund-stats, .steps {
    grid-template-columns: 1fr !important;
  }

  /* Stack ranking rows on mobile */
  .rank-row {
    grid-template-columns: 40px 1fr !important;
    gap: 12px !important;
  }
  .rank-row .rank-stat:nth-child(n+3) {
    display: none !important;
  }

  /* Hero stats stack */
  .hero-stats {
    gap: 20px !important;
    flex-wrap: wrap !important;
  }

  /* Fund layout stack */
  .fund-header, .fund-head {
    flex-direction: column !important;
  }
  .fund-layout {
    grid-template-columns: 1fr !important;
  }
  .fund-aside {
    position: static !important;
  }

  /* Buttons full width on mobile */
  .btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .cta-row, .form-actions {
    flex-direction: column !important;
    gap: 12px !important;
  }
  .cta-row .btn, .form-actions .btn {
    width: 100% !important;
  }

  /* Small text readability fix */
  .stat__label, .lb-stat__label, .filter-label, .muted-sm,
  [class*="label"], small, .muted {
    font-size: 13px !important;
  }

  /* Auth cards */
  .auth-card {
    padding: 20px 16px !important;
    margin: 16px !important;
  }

  /* Chart containers */
  .chart-wrap, [class*="chart"], .js-chart {
    height: 250px !important;
    min-height: 200px !important;
  }
}

/* Tablet ≥ 640px */
@media (min-width: 640px) {
  .container { padding-inline: var(--sp-5); }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .portfolio-summary { grid-template-columns: repeat(2, 1fr); }
  .position-stats { grid-template-columns: repeat(3, 1fr); }
  .fund-header, .fund-head { flex-direction: row; align-items: flex-start; }
  .chart-wrap { height: 340px; }
  .form-actions, .cta-row { justify-content: flex-start; }
}

/* Desktop ≥ 900px */
@media (min-width: 900px) {
  .main-nav, .nav { display: flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }

  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .portfolio-summary { grid-template-columns: repeat(4, 1fr); }

  .strategies-table { display: block; overflow-x: auto; }
  .strategy-cards { display: none; }

  .lb-layout { grid-template-columns: 240px 1fr; }

  .fund-layout {
    display: grid; grid-template-columns: 1fr 340px;
    gap: var(--sp-5); align-items: start;
  }
  .fund-aside { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
}

/* Wide ≥ 1100px */
@media (min-width: 1100px) {
  .position-row { grid-template-columns: 2fr 3fr auto; align-items: center; }
}

/* Mobile: switch table to cards */
@media (max-width: 768px) {
  .lb-table-wrap { display: none; }
  .lb-cards { display: flex; }
  
  /* Hide desktop-only elements on mobile */
  .strategies-table { display: block; overflow-x: auto; }
  .strategies-table table { min-width: 600px; }
  
  /* Improve mobile table scroll */
  .strategies-table::-webkit-scrollbar { height: 6px; }
  .strategies-table::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

  .filters { padding: .85rem; }
}

@media (max-width: 600px) {
  .nav a { padding: .4rem .55rem; font-size: .85rem; }
  .brand { font-size: 1rem; }
  .grid--cards { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 1.35rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   MOBILE NAV TOGGLE
   ============================================================ */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.nav-toggle:hover {
  background: var(--bg-3);
  border-color: var(--border-2);
}
.nav-toggle svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 480px) {
  .grid2 { grid-template-columns: 1fr; }
  .big-ret { font-size: 2rem; }
  .fund-head__title h1 { font-size: 1.4rem; }
  .card { padding: var(--sp-4); }
}

/* ============================================================
   REDUCED MOTION — accessibility
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   PRINT STYLES — export pages
   ============================================================ */
@media print {
  /* Hide non-essential elements */
  .site-header,
  .site-footer,
  .nav,
  .header-actions,
  .export-form,
  .export-info,
  .breadcrumb,
  .page-hero,
  .btn,
  a:not([href^="#"]) {
    display: none !important;
  }

  /* Show only printable content */
  .export-preview,
  .preview-content,
  .preview-content pre,
  .preview-content table,
  .api-reference {
    display: block !important;
    background: white !important;
    color: #222 !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Reset colors for print */
  body {
    background: white !important;
    color: #222 !important;
  }

  pre, code {
    background: #f5f5f5 !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
  }

  table {
    width: 100% !important;
    border-collapse: collapse !important;
  }

  th, td {
    border: 1px solid #ccc !important;
    padding: 8px 12px !important;
  }

  th {
    background: #f0f0f0 !important;
    font-weight: bold !important;
  }

  /* Page break controls */
  .export-preview {
    page-break-after: always;
  }

  /* Ensure text is readable */
  h1, h2, h3 {
    color: #111 !important;
  }

  /* Show print-only elements */
  .print-only {
    display: block !important;
  }

  /* Hide screen-only elements */
  .screen-only {
    display: none !important;
  }
}

/* Print-only utility classes */
.print-only {
  display: none;
}

@media print {
  .print-only {
    display: block;
  }

  .screen-only {
    display: none !important;
  }
}

/* WCAG 2.1 AA - Focus indicators (2.4.7) */
*:focus-visible {
  outline: 2px solid var(--accent, #f7931a);
  outline-offset: 2px;
}
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent, #f7931a);
  outline-offset: 2px;
  border-radius: 4px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent, #f7931a);
  outline-offset: 0;
}
