/* AHMATO LABS v3 - night-neon theme, AR/EN direction fixes, indicators library, hero sparkles.
   Loaded after style.css; only adds / overrides. The light (cream / navy) look stays the default. */

/* ---------- v3 tokens (light) ---------- */
:root {
  --v3-cyan: #1E1D1B; --v3-up: #0B8F7B; --v3-down: #D9572F; --v3-violet: #A8864A; --v3-amber: #D9902A;
  --v3-ink: #1E1D1B; --v3-mute: #8E918F; --v3-grid: #E6E1D8; --v3-axis: #6B665E; --v3-card: var(--surface);
  --rk-0: #0B8F7B; --rk-1: #12B39A; --rk-2: #12B39A; --rk-3: #12B39A; --rk-4: #C9A86A;
  --rk-5: #D79A35; --rk-6: #E0874F; --rk-7: #E8734D; --rk-8: #E0603A; --rk-9: #D9572F;
  --v3-glow: rgba(18, 179, 154, .0);
}
/* ---------- night neon ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090B0C; --bg-2: #0D1011; --surface: #121517;
  --navy: #ECEAE5; --navy-d: #D8BE85; --navy-ink: #ECEAE5;
  --up: #2EF2C2; --up-soft: rgba(46, 242, 194, .14); --down: #FF8A65; --down-soft: rgba(255, 138, 101, .14);
  --teal: #2EF2C2; --teal-soft: rgba(46, 242, 194, .14); --muted: #8E918F; --line: rgba(230, 211, 163, .18);
  --sh-dark: rgba(0, 0, 0, .55); --sh-light: rgba(230, 211, 163, .05);
  --raise: 0 10px 28px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .04);
  --raise-deep: 0 18px 44px rgba(0, 0, 0, .55), 0 0 0 1px rgba(230, 211, 163, .08), inset 0 1px 0 rgba(255, 255, 255, .05);
  --raise-sm: 0 4px 14px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .04);
  --inset: inset 0 2px 10px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(230, 211, 163, .08);
  --v3-cyan: #2EF2C2; --v3-up: #2EF2C2; --v3-down: #FF8A65; --v3-violet: #C9A86A; --v3-amber: #FFC857;
  --v3-ink: #ECEAE5; --v3-mute: #7A7D7B; --v3-grid: rgba(230, 211, 163, .14); --v3-axis: #8E918F;
  --rk-0: #2EF2C2; --rk-1: #2EF2C2; --rk-2: #2EF2C2; --rk-3: #2EF2C2; --rk-4: #E6D3A3;
  --rk-5: #E6D3A3; --rk-6: #F2B84B; --rk-7: #FF9F7A; --rk-8: #FF8A65; --rk-9: #FF8A65;
  --v3-glow: rgba(46, 242, 194, .35);
}
html[data-theme="dark"] body {
  color: var(--navy-ink); background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 85% -12%, rgba(46, 242, 194, .13) 0%, rgba(46, 242, 194, 0) 62%),
    radial-gradient(800px 520px at -10% 108%, rgba(201, 168, 106, .14) 0%, rgba(201, 168, 106, 0) 60%),
    linear-gradient(rgba(230, 211, 163, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 211, 163, .045) 1px, transparent 1px);
  background-size: auto, auto, 34px 34px, 34px 34px;
  background-attachment: fixed;
}
html[data-theme="dark"] .card { background: linear-gradient(145deg, rgba(20, 23, 25, .92), rgba(13, 16, 17, .94)); border: 1px solid rgba(230, 211, 163, .12); }
html[data-theme="dark"] [data-tilt].tilting { box-shadow: 0 24px 50px rgba(0, 0, 0, .6), 0 0 0 1px rgba(46, 242, 194, .25); }
html[data-theme="dark"] .btn { background: linear-gradient(135deg, #2EF2C2, #C9A86A); color: #090B0C;
  box-shadow: 0 6px 20px rgba(46, 242, 194, .35), inset 0 1px 0 rgba(255, 255, 255, .35); }
html[data-theme="dark"] .btn:active { box-shadow: 0 2px 8px rgba(46, 242, 194, .35); }
html[data-theme="dark"] .search-box { border: 1px solid rgba(46, 242, 194, .22); box-shadow: 0 0 0 1px rgba(46, 242, 194, .06), 0 12px 34px rgba(0, 0, 0, .5), 0 0 26px rgba(46, 242, 194, .12); }
html[data-theme="dark"] .search-box input::placeholder { color: #5D6A8C; }
html[data-theme="dark"] .suggest li[aria-selected="true"], html[data-theme="dark"] .suggest li:hover { background: rgba(46, 242, 194, .08); }
html[data-theme="dark"] .suggest img, html[data-theme="dark"] .coin-head img, html[data-theme="dark"] .fav-row img,
html[data-theme="dark"] .fav-row .ph, html[data-theme="dark"] .sr-top img { background: #1A1E20; }
html[data-theme="dark"] .chip { box-shadow: none; border: 1px solid rgba(230, 211, 163, .14); }
html[data-theme="dark"] .chip.pos { color: #5EF2C0; background: rgba(46, 242, 194, .12); border-color: rgba(46, 242, 194, .3); }
html[data-theme="dark"] .chip.neg { color: #FF8FA7; background: rgba(255, 138, 101, .12); border-color: rgba(255, 138, 101, .3); }
html[data-theme="dark"] .chip.neu { color: #D6D2CB; background: rgba(230, 211, 163, .1); }
html[data-theme="dark"] .chip.na { color: #7A7D7B; background: rgba(230, 211, 163, .06); }
html[data-theme="dark"] .chart-box .tip, html[data-theme="dark"] .v3-tip { background: #0D1011; color: #ECEAE5; border: 1px solid rgba(46, 242, 194, .3); }
html[data-theme="dark"] .banner { background: rgba(255, 200, 87, .1); color: #FFD27A; border: 1px solid rgba(255, 200, 87, .25); }
html[data-theme="dark"] .banner.info { background: rgba(46, 242, 194, .08); color: #BFF8E9; border-color: rgba(46, 242, 194, .25); }
html[data-theme="dark"] .skeleton { background: linear-gradient(90deg, #121517, #1A1E20, #121517); background-size: 200% 100%; }
html[data-theme="dark"] .rec-pill { box-shadow: 0 6px 18px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .25); }
html[data-theme="dark"] .rec-pill.buy { background: linear-gradient(145deg, #2EF2C2, #10B981); color: #04150F; box-shadow: 0 0 22px rgba(46, 242, 194, .35); }
html[data-theme="dark"] .rec-pill.sell { background: linear-gradient(145deg, #FF8A65, #E11D48); box-shadow: 0 0 22px rgba(255, 138, 101, .35); }
html[data-theme="dark"] .rec-pill.wait { background: linear-gradient(145deg, #C9A86A, #A8864A); box-shadow: 0 0 22px rgba(201, 168, 106, .35); }
html[data-theme="dark"] .rec-pill.na { background: #15181A; color: #7A7D7B; }
html[data-theme="dark"] .rec-pill.sm { box-shadow: none; }
html[data-theme="dark"] .rec-why .pt { background: rgba(230, 211, 163, .12); color: #D6D2CB; }
html[data-theme="dark"] .rec-why li.pos .pt { color: #5EF2C0; }
html[data-theme="dark"] .rec-why li.neg .pt { color: #FF8FA7; }
html[data-theme="dark"] .rec-wait { background: rgba(201, 168, 106, .1); border: 1px solid rgba(201, 168, 106, .25); }
html[data-theme="dark"] .fav-star[aria-pressed="true"] svg { fill: #FFC857; stroke: #E0A23B; }
html[data-theme="dark"] .bell .bn { box-shadow: 0 0 12px rgba(255, 138, 101, .6); }
html[data-theme="dark"] .tgl[aria-pressed="true"] { color: #2EF2C2; }
html[data-theme="dark"] .seg button[aria-pressed="true"] { color: #2EF2C2; background: #15181A; box-shadow: 0 0 0 1px rgba(46, 242, 194, .3), 0 0 14px rgba(46, 242, 194, .18); }
html[data-theme="dark"] .site-footer .disc { border: 1px solid rgba(46, 242, 194, .2); }
html[data-theme="dark"] .hero h1 { color: #F2F6FF; text-shadow: 0 0 28px rgba(46, 242, 194, .25); }
/* official logo: image untouched, only framed on a soft light plate with a neon halo */
html[data-theme="dark"] .logo-crop { background: #F3EEE7; box-shadow: 0 0 0 1px rgba(46, 242, 194, .35), 0 0 18px rgba(46, 242, 194, .25); }
html[data-theme="dark"] .hero-brand { background: linear-gradient(145deg, #FBFAF7, #E9E1D3);
  box-shadow: 0 0 0 1px rgba(46, 242, 194, .35), 0 0 40px rgba(46, 242, 194, .22), 0 0 90px rgba(201, 168, 106, .18), 0 20px 50px rgba(0, 0, 0, .55); }
html[data-theme="dark"] .hero-brand .float { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), 0 10px 24px rgba(0, 0, 0, .35); }
html[data-theme="dark"] input, html[data-theme="dark"] select { color-scheme: dark; }

/* ---------- language / direction ---------- */
html[data-lang-pending] body { opacity: 0; }
html[lang="en"] { --font: "Montserrat", system-ui, sans-serif; }
html[dir="ltr"] .back svg, html[dir="ltr"] .v3-entry-go b { transform: scaleX(-1); display: inline-block; }
html[dir="ltr"] .suggest .nm, html[dir="ltr"] .suggest .sym, html[dir="ltr"] .fav-row .nm b, html[dir="ltr"] .fav-row .nm small,
html[dir="ltr"] .sr-top .nm b, html[dir="ltr"] .sr-top .nm small { text-align: left; }
html[dir="ltr"] .search-box { padding: 8px 8px 8px 10px; }

/* ---------- header row: Indicators button + language / theme toggles ---------- */
.site-header .v3-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.v3-prefs { display: flex; gap: 8px; align-items: center; }
.v3-seg button { padding: 6px 10px; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; min-height: 32px; }
.v3-seg button[lang="ar"] { font-family: var(--font); font-family: "Cairo", system-ui, sans-serif; }
.v3-seg svg { width: 16px; height: 16px; }
.v3-navbtn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 14px; text-decoration: none; font-weight: 800; font-size: 14.5px;
  color: #fff; background: linear-gradient(135deg, #1E1D1B, #12B39A); box-shadow: 0 6px 16px rgba(30, 29, 27, .3), inset 0 1px 0 rgba(255, 255, 255, .3); min-height: 40px; }
.v3-navbtn svg { width: 19px; height: 19px; }
.v3-navbtn.on { box-shadow: var(--inset); background: var(--teal-soft); color: var(--navy); }
html[data-theme="dark"] .v3-navbtn { color: #090B0C; background: linear-gradient(135deg, #2EF2C2, #E6D3A3);
  box-shadow: 0 0 0 1px rgba(46, 242, 194, .5), 0 0 22px rgba(46, 242, 194, .45), 0 0 46px rgba(230, 211, 163, .25); }
html[data-theme="dark"] .v3-navbtn.on { color: #2EF2C2; background: rgba(46, 242, 194, .1); box-shadow: 0 0 0 1px rgba(46, 242, 194, .55), 0 0 18px rgba(46, 242, 194, .3); }

/* ---------- home: prominent library entry ---------- */
#v3Entry:empty { display: none; }
.v3-entry { display: block; text-decoration: none; color: inherit; overflow: hidden; }
.v3-entry::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px 160px at 90% 0%, rgba(18, 179, 154, .16), transparent 70%); }
html[data-theme="dark"] .v3-entry { border-color: rgba(46, 242, 194, .35); box-shadow: 0 0 0 1px rgba(46, 242, 194, .2), 0 0 34px rgba(46, 242, 194, .16), 0 18px 44px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .v3-entry::before { background: radial-gradient(420px 180px at 90% 0%, rgba(46, 242, 194, .2), transparent 70%), radial-gradient(360px 160px at 0% 100%, rgba(201, 168, 106, .16), transparent 70%); }
.v3-entry-top { display: flex; gap: 14px; align-items: center; position: relative; }
.v3-entry-top .ic { width: 54px; height: 54px; border-radius: 16px; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #1E1D1B, #12B39A); box-shadow: var(--raise-sm); }
html[data-theme="dark"] .v3-entry-top .ic { color: #090B0C; background: linear-gradient(135deg, #2EF2C2, #E6D3A3); box-shadow: 0 0 22px rgba(46, 242, 194, .45); }
.v3-entry-top .ic svg { width: 28px; height: 28px; }
.v3-entry-top b { display: block; color: var(--navy); font-size: 18px; font-weight: 800; }
.v3-entry-top span { color: var(--muted); font-size: 13.5px; }
.v3-entry-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 12px; position: relative; }
.v3-entry-chips span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--navy); padding: 6px 11px; border-radius: 999px; background: var(--surface); box-shadow: var(--raise-sm); }
.v3-entry-chips svg { width: 15px; height: 15px; color: var(--teal); }
.v3-entry-go { display: inline-flex; gap: 8px; align-items: center; font-weight: 800; color: var(--navy); position: relative; }
html[data-theme="dark"] .v3-entry-go { color: #2EF2C2; text-shadow: 0 0 12px rgba(46, 242, 194, .5); }

/* ---------- library grid ---------- */
.v3-lib { margin-top: 18px; }
.v3-lib-head h1 { display: flex; align-items: center; gap: 10px; color: var(--navy); font-size: clamp(22px, 6vw, 32px); margin: 6px 0 4px; }
.v3-lib-head h1 svg, .v3-cat h2 svg { width: 1.1em; height: 1.1em; color: var(--teal); flex: none; }
html[data-theme="dark"] .v3-lib-head h1 { text-shadow: 0 0 24px rgba(46, 242, 194, .25); }
.v3-cat { margin-top: 22px; }
.v3-cat h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--navy); margin: 0 0 10px; }
div.v3-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.v3-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-md); text-decoration: none; color: inherit; min-height: 128px;
  background: linear-gradient(145deg, #FBF8F2, #F1EBE0); box-shadow: var(--raise-sm); border: 1px solid rgba(255, 255, 255, .6); transition: transform .15s ease, box-shadow .15s ease; }
.v3-card:active { transform: scale(.98); box-shadow: var(--inset); }
.v3-card .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--raise-sm); color: var(--navy); flex: none; }
.v3-card .ic svg { width: 22px; height: 22px; }
.v3-card .tx b { display: block; color: var(--navy); font-size: 14px; line-height: 1.35; }
.v3-card .tx small { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 3px; }
.v3-card.lab .ic { color: var(--teal); }
.v3-badge { position: absolute; top: 10px; inset-inline-end: 10px; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--teal-soft); color: var(--navy); }
html[data-theme="dark"] .v3-card { background: linear-gradient(160deg, rgba(22, 25, 27, .95), rgba(11, 13, 14, .95)); border: 1px solid rgba(230, 211, 163, .14); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
html[data-theme="dark"] .v3-card .ic { background: rgba(46, 242, 194, .08); color: #2EF2C2; box-shadow: 0 0 0 1px rgba(46, 242, 194, .28), 0 0 16px rgba(46, 242, 194, .18); }
html[data-theme="dark"] .v3-card.lab .ic { color: #F2B84B; background: rgba(201, 168, 106, .1); box-shadow: 0 0 0 1px rgba(201, 168, 106, .3), 0 0 16px rgba(201, 168, 106, .18); }
html[data-theme="dark"] .v3-card:hover, html[data-theme="dark"] .v3-card:focus-visible { border-color: rgba(46, 242, 194, .45); box-shadow: 0 0 0 1px rgba(46, 242, 194, .25), 0 0 26px rgba(46, 242, 194, .18), 0 8px 24px rgba(0, 0, 0, .45); }
html[data-theme="dark"] .v3-badge { color: #2EF2C2; background: rgba(46, 242, 194, .12); }
@media (hover: hover) { .v3-card:hover { transform: translateY(-2px); } }
@media (min-width: 640px) { div.v3-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { div.v3-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- detail page ---------- */
.v3-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 18px; }
.v3-detail > *, .v3-chart { min-width: 0; }   /* v4.1 fix: wide content (monthly heat map) scrolls inside its card instead of widening the page */
.v3-dtitle { display: flex; gap: 14px; align-items: flex-start; }
.v3-dtitle .ic { width: 52px; height: 52px; border-radius: 16px; flex: none; display: grid; place-items: center; background: var(--surface); box-shadow: var(--raise-sm); color: var(--navy); }
.v3-dtitle .ic svg { width: 28px; height: 28px; }
html[data-theme="dark"] .v3-dtitle .ic { color: #2EF2C2; background: rgba(46, 242, 194, .08); box-shadow: 0 0 0 1px rgba(46, 242, 194, .3), 0 0 22px rgba(46, 242, 194, .22); }
.v3-dtitle h1 { margin: 4px 0 2px; font-size: clamp(20px, 5.4vw, 28px); color: var(--navy); line-height: 1.3; }
.v3-dtitle p { margin: 0; color: var(--muted); font-size: 14px; }
.v3-catchip { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--teal-soft); color: var(--navy); }
html[data-theme="dark"] .v3-catchip { color: #2EF2C2; }
.v3-coins { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.v3-coins .chip-btn { text-decoration: none; font: 700 13px var(--latin); }
.v3-coins .chip-btn[aria-pressed="true"] { box-shadow: var(--inset); color: var(--navy); background: var(--teal-soft); }
html[data-theme="dark"] .v3-coins .chip-btn[aria-pressed="true"] { color: #2EF2C2; box-shadow: 0 0 0 1px rgba(46, 242, 194, .45), 0 0 14px rgba(46, 242, 194, .2); }
.v3-now { margin-top: 16px; }
.v3-nowgrid { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: center; }
.v3-nowgrid > .v3-gauge { justify-self: center; max-width: 200px; }
@media (min-width: 560px) { .v3-nowgrid { grid-template-columns: minmax(170px, 210px) 1fr; gap: 18px; } }
.v3-big { font: 800 clamp(26px, 8vw, 38px) var(--latin); color: var(--navy); line-height: 1.15; margin-bottom: 6px; }
.v3-big.na { font-size: 22px; color: var(--muted); }
html[data-theme="dark"] .v3-big { color: #F2F6FF; text-shadow: 0 0 22px rgba(46, 242, 194, .35); }
.v3-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.v3-stat { padding: 9px 11px; border-radius: 12px; background: var(--bg); box-shadow: var(--inset); min-width: 0; }
.v3-stat > span { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.v3-stat b { display: block; font-size: 14.5px; color: var(--navy); margin-top: 2px; overflow-wrap: anywhere; }
.v3-stat b.up, .v3-kv b.up { color: var(--up); } .v3-stat b.down, .v3-kv b.down { color: var(--down); } .v3-kv b.flat { color: var(--navy); }
.v3-kv { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg); box-shadow: var(--inset); margin: 10px 0; }
.v3-kv span { color: var(--muted); font-size: 13px; }
.v3-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v3-link { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; text-decoration: none; color: var(--navy); font-size: 13px; font-weight: 700; background: var(--surface); box-shadow: var(--raise-sm); }
.v3-link svg { width: 18px; height: 18px; flex: none; color: var(--teal); }
html[data-theme="dark"] .v3-link { border: 1px solid rgba(230, 211, 163, .14); }
.v3-chartcard h2 { font-size: 15.5px; }
.v3-chart { position: relative; margin-top: 10px; min-height: 120px; touch-action: pan-y; }
.v3-sub { margin-top: 8px; }
.v3-svg { display: block; width: 100%; height: auto; overflow: visible; }
.v3-svg .v3-grid { stroke: var(--v3-grid); stroke-width: 1; }
.v3-svg .v3-grid.v { stroke-dasharray: 2 4; }
.v3-axis { fill: var(--v3-axis); font: 600 10px var(--latin); }
.v3-axis.lbl { font-size: 9.5px; }
.v3-line { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
html[data-theme="dark"] .v3-line.glow { filter: drop-shadow(0 0 4px var(--v3-glow)) drop-shadow(0 0 10px var(--v3-glow)); }
.v3-dot { fill: var(--v3-cyan); stroke: var(--bg-2); stroke-width: 2; }
.v3-halo { fill: var(--v3-cyan); opacity: .18; }
html[data-theme="dark"] .v3-halo { opacity: .3; animation: v3pulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes v3pulse { 50% { opacity: .08; transform: scale(1.6); } }
.v3-mk { fill: var(--bg-2); stroke-width: 2; }
.v3-xh line { stroke: var(--v3-mute); stroke-dasharray: 3 3; }
.v3-tip { position: absolute; top: 4px; inset-inline-start: 8px; pointer-events: none; display: none; background: #fff; border-radius: 10px; padding: 6px 10px;
  font: 600 12px var(--latin); box-shadow: var(--raise-sm); color: var(--navy-ink); direction: ltr; z-index: 3; max-width: 80%; line-height: 1.45; }
.v3-gauge { display: block; width: 100%; max-width: 190px; height: auto; }
.v3-garc { fill: none; stroke-width: 13; }
html[data-theme="dark"] .v3-garc { filter: drop-shadow(0 0 4px rgba(46, 242, 194, .25)); }
.v3-needle { stroke: var(--navy); stroke-width: 3; stroke-linecap: round; }
.v3-gval { fill: var(--navy); font: 800 22px var(--latin); }
.v3-bars { display: grid; gap: 7px; margin-top: 8px; }
.v3-bars .v3-bar { display: grid; grid-template-columns: minmax(64px, 30%) 1fr 54px; gap: 8px; align-items: center; font-size: 12.5px; }
.v3-bars .bl { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3-bars .bt { height: 10px; border-radius: 999px; background: var(--bg); box-shadow: var(--inset); overflow: hidden; }
.v3-bars .bf { display: block; height: 100%; border-radius: 999px; }
html[data-theme="dark"] .v3-bars .bf { box-shadow: 0 0 10px currentColor; }
.v3-bars .bv { text-align: end; color: var(--navy); font-weight: 700; }
.v3-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.v3-legend span { display: inline-flex; align-items: center; gap: 6px; }
.v3-legend i { width: 16px; height: 3px; border-radius: 3px; background: var(--c); display: inline-block; }
.v3-legend i.dash { background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); }
.v3-heat-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
.v3-heat { border-collapse: separate; border-spacing: 2px; font: 600 10.5px var(--latin); width: 100%; min-width: 520px; }
.v3-heat th { color: var(--muted); font-weight: 700; padding: 3px 4px; white-space: nowrap; }
.v3-heat td { text-align: center; padding: 5px 2px; border-radius: 5px; color: var(--navy-ink); }
.v3-heat td.p { background: color-mix(in srgb, var(--v3-up) calc(var(--a) * 100%), transparent); }
.v3-heat td.m { background: color-mix(in srgb, var(--v3-down) calc(var(--a) * 100%), transparent); }
.v3-heat tr.sum th, .v3-heat tr.sum td { border-top: 2px solid var(--line); font-weight: 800; }
.v3-empty { display: grid; place-items: center; min-height: 160px; color: var(--muted); font-weight: 700; border-radius: var(--r-md); background: var(--bg-2); box-shadow: var(--inset); }
.v3-explain h3, .v3-h3 { font-size: 14.5px; color: var(--navy); margin: 16px 0 4px; }
.v3-explain h3:first-child { margin-top: 0; }
.v3-explain p { margin: 0; font-size: 14px; color: var(--navy-ink); }
.v3-ul { margin: 6px 0 0; padding-inline-start: 18px; font-size: 13px; color: var(--navy-ink); display: grid; gap: 4px; }
.v3-src { font-size: 13px !important; color: var(--muted) !important; }
.v3-src small { font-family: var(--latin); }
/* "what is it?" explanation under each existing reading */
.rd-info { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.rd-info summary { cursor: pointer; display: inline-flex; gap: 5px; align-items: center; font-weight: 700; color: var(--teal); list-style: none; }
.rd-info summary::-webkit-details-marker { display: none; }
.rd-info summary svg { width: 14px; height: 14px; }
.rd-info p { margin: 6px 0 0; }
.rd-info a { display: inline-block; margin-top: 6px; color: var(--navy); font-weight: 700; }
@media (min-width: 760px) {
  .v3-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .v3-detail .v3-dhead, .v3-detail .v3-chartcard { grid-column: 1 / -1; }
  .v3-stats { grid-template-columns: repeat(3, 1fr); }
  .v3-links { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- hero sparkles (canvas, js/sparkles.js) + glowing gradient line under the title ---------- */
.hero > *:not(.v3-sparkles) { position: relative; z-index: 1; }
.hero .search { z-index: 20; }
.v3-sparkles { position: absolute; inset: -18px -18px 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1s ease;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 42%, #000 35%, transparent 100%);
          mask-image: radial-gradient(ellipse 75% 70% at 50% 42%, #000 35%, transparent 100%); }
.v3-sparkles.on { opacity: .55; }
html[data-theme="dark"] .v3-sparkles.on { opacity: 1; }
.v3-sparkles canvas { display: block; width: 100%; height: 100%; }
.hero.compact .v3-sparkles, .hero.compact .v3-glowline { display: none; }
.v3-glowline { position: relative; height: 14px; width: min(100%, 420px); margin: 2px 0 10px; pointer-events: none; display: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent);
          mask-image: radial-gradient(closest-side, #000 55%, transparent); }
html[data-theme="dark"] .v3-glowline { display: block; }
.v3-glowline i { position: absolute; top: 0; height: 2px; }
.v3-glowline .a { inset-inline: 12%; height: 2px; background: linear-gradient(90deg, transparent, #C9A86A, transparent); filter: blur(2px); }
.v3-glowline .b { inset-inline: 12%; height: 1px; background: linear-gradient(90deg, transparent, #C9A86A, transparent); }
.v3-glowline .c { inset-inline: 32%; height: 5px; background: linear-gradient(90deg, transparent, #2EF2C2, transparent); filter: blur(2px); }
.v3-glowline .d { inset-inline: 32%; height: 1px; background: linear-gradient(90deg, transparent, #2EF2C2, transparent); }
@media (prefers-reduced-motion: reduce) { .v3-sparkles { display: none; } html[data-theme="dark"] .v3-halo { animation: none; } }
@media (max-width: 759px) { .v3-sparkles { bottom: auto; height: 500px; } }   /* mobile: keep the dots around title + search (the logo below is opaque) */
/* the field must be allowed to shrink (Montserrat placeholder made the input's intrinsic width push the EN "Search" button off-screen) */
.search-box .field { min-width: 0; }
.search-box input { width: 100%; }
.search-box .btn { flex: none; }
.v3-seg button { padding: 6px 9px; }
.reading .rd-info { grid-column: 2 / 4; margin-top: 2px; }
.card > .rd-info, #ovT + .rd-info, .chart-foot + .rd-info { margin-top: 10px; }
@media (max-width: 359px) { .search-box { gap: 6px; } .search-box .btn { padding: 12px 12px; font-size: 14px; } .search-box .field { padding: 0 10px; } }

/* ---------- logo card merged into the page: edges dissolve (mask only), stars around / over the edges ----------
   The official image is not recoloured, cropped or filtered: only a mask fades its outer ~14 % into the background,
   and the halo / stars / line are separate layers (pointer-events: none). */
.hero-brand, html[data-theme="dark"] .hero-brand { background: none; box-shadow: none; padding: 0; border: 0; border-radius: 0; isolation: isolate; }
.hero-brand[data-tilt].tilting, html[data-theme="dark"] .hero-brand[data-tilt].tilting { box-shadow: none; }
.hero-brand .float, html[data-theme="dark"] .hero-brand .float { border-radius: 0; box-shadow: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%);
          mask-composite: intersect; }
.v3-logo-halo { position: absolute; inset: 4%; z-index: 0; pointer-events: none; border-radius: 50%; display: none;
  background: radial-gradient(closest-side, rgba(46, 242, 194, .30), rgba(201, 168, 106, .22) 55%, transparent 100%); filter: blur(18px); }
html[data-theme="dark"] .v3-logo-halo { display: block; }
.v3-logo-sparkles { inset: -16px; height: auto; z-index: 2; opacity: 0;
  -webkit-mask-image: radial-gradient(closest-side, transparent 58%, rgba(0, 0, 0, .55) 74%, #000 92%);
          mask-image: radial-gradient(closest-side, transparent 58%, rgba(0, 0, 0, .55) 74%, #000 92%); }
@media (max-width: 759px) { .v3-logo-sparkles { bottom: -16px; height: auto; } }
.v3-logo-sparkles.on { opacity: .7; }
html[data-theme="dark"] .v3-logo-sparkles.on { opacity: 1; }
.v3-logo-line { position: absolute; z-index: 3; left: 10%; right: 10%; width: auto; bottom: 3%; margin: 0; }
html[data-theme="dark"] .hero-brand { margin-bottom: 14px; }

/* disclaimer (coin pages, indicators library / detail pages) */
.v3-disc { margin: 18px 0 4px; padding: 12px 14px; border-radius: var(--r-md); font-size: 13px; line-height: 1.6; color: var(--navy-ink);
  background: var(--surface); box-shadow: var(--raise-sm); border-inline-start: 3px solid var(--teal); }
html[data-theme="dark"] .v3-disc { background: rgba(46, 242, 194, .06); border: 1px solid rgba(46, 242, 194, .2); border-inline-start: 3px solid #2EF2C2; }
.result > .v3-disc { grid-column: 1 / -1; }
.site-footer .disc { max-width: 560px; line-height: 1.6; border-radius: 18px; }

/* ---------- logo presentation v3.1 ----------
   One presentation: the logo centred at the top of the hero. Light theme = the official file as is; night theme =
   img/ahmato_labs_dark.jpg (derived by tools/make_dark_logo.py, original never modified). The big logo block is hidden. */
#heroBrand { display: none !important; }
.logo-crop { height: 56px; border-radius: 14px; }
@media (min-width: 760px) { .logo-crop { height: 60px; } }
/* balanced, symmetric hero */
.hero, .hero .text { text-align: center; }
.hero p.sub { margin-inline: auto; }
.hero .search { margin-inline: auto; text-align: start; }
.hero .quick { justify-content: center; }
.hero .v3-glowline { margin-inline: auto; }
@media (min-width: 760px) {
  .hero { display: block; max-width: 760px; margin-inline: auto; }
  .hero .text { max-width: none; }
}

/* hero logo: centred, moderate size, rounded corners + soft edge fade (mask only), stars orbiting around it */
.v3-medal { position: relative; width: min(232px, 62vw); aspect-ratio: 1; margin: 10px auto 14px; }
@media (min-width: 760px) { .v3-medal { width: 260px; } }
.v3-medal::before { content: ""; position: absolute; inset: -6%; border-radius: 34%; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(18, 179, 154, .14), transparent 100%); }
html[data-theme="dark"] .v3-medal::before { inset: -12%; background: radial-gradient(closest-side, rgba(46, 242, 194, .30), rgba(201, 168, 106, .22) 60%, transparent 100%); filter: blur(10px); }
.v3-medal-glass { position: absolute; inset: 0; z-index: 2; display: block; border-radius: 28px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 9%, #000 91%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 9%, #000 91%, transparent 100%);
          mask-composite: intersect; }
.v3-medal-glass img { display: block; width: 100%; height: 100%; }
.logo-dark { display: none !important; }
html[data-theme="dark"] .logo-dark { display: block !important; }
html[data-theme="dark"] .logo-light { display: none !important; }
html[data-theme="dark"] .logo-crop { background: #090B0C; }
html[data-theme="dark"] .logo-crop img.logo-dark { position: absolute; width: calc(960 / 570 * 100%); height: auto; left: calc(-195 / 570 * 100%); top: calc(-245 / 477 * 100%); max-width: none; }
.v3-medal .v3-sparkles { inset: -48px; height: auto; bottom: -48px; z-index: 3;
  -webkit-mask-image: radial-gradient(closest-side, transparent 60%, #000 72%, #000 94%, transparent 100%);
          mask-image: radial-gradient(closest-side, transparent 60%, #000 72%, #000 94%, transparent 100%); }
@media (max-width: 759px) { .v3-medal .v3-sparkles { bottom: -48px; height: auto; } }

/* header: on the home page the hero logo is the logo, so the duplicate header logo is hidden there */
body:has(.hero:not(.compact) .v3-medal) .site-header .brand { display: none; }
/* (variants A/B superseded: one presentation, logo file swapped by theme) */
/* inner pages (compact hero): the header logo is the logo, the big hero logo is hidden */
.hero.compact .v3-medal { display: none; }

/* ---------- v3.1: home market pulse row ---------- */
.v3-pulse { margin: 18px 0 16px; }
.v3-pulse-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.v3-pulse-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; color: var(--navy); }
.v3-pulse-head h2 svg { width: 20px; height: 20px; color: var(--teal); }
.v3-pulse-head .hint { margin: 0; font-size: 12px; }
.v3-pulse-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .v3-pulse-row { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.v3-ptile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 11px 10px 10px; border-radius: 16px; text-decoration: none; color: inherit;
  background: linear-gradient(145deg, #FBF8F2, #F1EBE0); box-shadow: var(--raise-sm); border: 1px solid rgba(255, 255, 255, .6); transition: transform .15s ease; }
.v3-ptile:active { transform: scale(.97); }
.v3-ptile .ic { width: 26px; height: 26px; color: var(--teal); }
.v3-ptile .ic svg { width: 22px; height: 22px; }
.v3-ptile .pn { font-size: 11.5px; font-weight: 700; color: var(--muted); line-height: 1.3; }
.v3-ptile .pv { font: 800 19px var(--latin); color: var(--navy); line-height: 1.2; overflow-wrap: anywhere; min-height: 23px; }
.v3-ptile .pv small { font-size: 11px; font-weight: 600; color: var(--muted); }
.v3-ptile .pv.txt { font: 800 13.5px var(--font, inherit); line-height: 1.35; }
.v3-ptile .pv.pos { color: var(--up); } .v3-ptile .pv.neg { color: var(--down); } .v3-ptile .pv.na { color: var(--muted); font-size: 13px; }
.v3-ptile .ps { font-size: 11px; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
html[data-theme="dark"] .v3-ptile { background: linear-gradient(160deg, rgba(22, 25, 27, .95), rgba(11, 13, 14, .95)); border: 1px solid rgba(230, 211, 163, .14); box-shadow: 0 8px 22px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .v3-ptile:hover, html[data-theme="dark"] .v3-ptile:focus-visible { border-color: rgba(46, 242, 194, .45); box-shadow: 0 0 0 1px rgba(46, 242, 194, .22), 0 0 22px rgba(46, 242, 194, .16); }
html[data-theme="dark"] .v3-ptile .ic { color: #2EF2C2; filter: drop-shadow(0 0 6px rgba(46, 242, 194, .45)); }
html[data-theme="dark"] .v3-ptile .pv { text-shadow: 0 0 14px rgba(46, 242, 194, .18); }

/* ---------- v3.1: #/macro overview ---------- */
.v3-catlink { margin-inline-start: auto; font-size: 12.5px; font-weight: 700; color: var(--teal); text-decoration: none; }
.v3-mgrid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
@media (min-width: 560px) { .v3-mgrid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .v3-mgrid { grid-template-columns: 1fr 1fr 1fr; } }
.v3-mtile { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; text-decoration: none; color: inherit; padding: 14px 16px; margin: 0; }
.v3-mtile .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--teal); background: var(--surface); box-shadow: var(--raise-sm); grid-row: span 1; }
.v3-mtile .ic svg { width: 22px; height: 22px; }
.v3-mtile > b { color: var(--navy); font-size: 15px; }
.v3-mtile .v3-mval, .v3-mtile small { grid-column: 1 / -1; }
.v3-mval { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; min-height: 30px; }
.v3-mbig { font: 800 24px var(--latin); color: var(--navy); }
.v3-mbig.na { font-size: 17px; color: var(--muted); }
.v3-mdate { font-size: 12px; color: var(--muted); }
.v3-mtile small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
html[data-theme="dark"] .v3-mtile .ic { background: rgba(46, 242, 194, .08); color: #2EF2C2; box-shadow: 0 0 0 1px rgba(46, 242, 194, .28), 0 0 16px rgba(46, 242, 194, .18); }
html[data-theme="dark"] .v3-mtile:hover, html[data-theme="dark"] .v3-mtile:focus-visible { border-color: rgba(46, 242, 194, .45); }
