/* ═══════════════════════════════════════════════════════════════════
   DIVUNIA — ديڤونيا · divunia-theme.css · v3.0
   Wealth & Money · الثروة والمال
   ───────────────────────────────────────────────────────────────────
   Brand: near-black noir #070708 · metallic gold #c9a227 → #e8cf8e
   Serif display (Amiri AR / Cormorant Garamond EN) · sans body ·
   tabular numerals for figures.
   Interaction language (spec §2A): quiet cards by default —
   elevation, illumination and actions appear ON INTERACTION only;
   single-flash live updates; no continuous motion.
   ───────────────────────────────────────────────────────────────────
   Loads AFTER styles.css. styles.css itself is never modified.
   Admin portal: visual polish ONLY (section 15) — colors, focus,
   typography on known .portal-*/.auth-*/editor selectors; no layout,
   no behavior, no structural change. Functionality untouched.
   ═══════════════════════════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Amiri:wght@400;700&family=Cormorant+Garamond:wght@500;600;700&display=swap");

/* ── 1 · DESIGN TOKENS — Dark Market (default) ────────────────────── */
:root,
body.theme-dark {
  /* mapped onto the app's existing variable names */
  --primary:        #a8842c;         /* deep gold replaces navy */
  --primary-deep:   #6f5619;
  --primary-light:  #c9a227;
  --accent:         #c9a227;
  --accent-light:   #e8cf8e;
  --danger:         #e0524d;

  --bg:             #070708;
  --surface:        #0e0e10;
  --surface2:       #141417;
  --surface3:       #1a1a1e;
  --border:         #2a2416;
  --border-soft:    rgba(201, 162, 39, .16);

  --text:           #f5f1e6;
  --text-muted:     #9a917c;
  --text-dim:       #c9c0a8;

  --radius:         12px;
  --radius-lg:      20px;
  --radius-xl:      30px;
  --shadow:         0 2px 12px rgba(0, 0, 0, .35);
  --shadow-card:    0 18px 40px rgba(0, 0, 0, .45);
  --shadow-gold:    0 10px 36px rgba(201, 162, 39, .22);

  --font-family:    "IBM Plex Sans Arabic";
  --font-en:        -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif;

  --transition:       .3s cubic-bezier(.4, 0, .2, 1);
  --transition-slow:  .45s cubic-bezier(.25, .46, .45, .94);

  /* Divunia semantic additions */
  --dv-display-ar:  "Amiri", serif;
  --dv-display-en:  "Cormorant Garamond", "Marcellus", serif;
  --dv-positive:    #2fb56d;
  --dv-negative:    #e0524d;
  --dv-border-active: rgba(201, 162, 39, .45);
  --dv-glow:        rgba(201, 162, 39, .22);
  --dv-hover-delay: 250ms;          /* tooltip intent */
  --dv-hover-grace: 250ms;          /* close grace    */
}

/* Light Editorial — ivory paper + deepened gold for contrast */
body.theme-light {
  --primary:        #8a6d1d;
  --primary-deep:   #6f5619;
  --primary-light:  #a8842c;
  --accent:         #8a6d1d;
  --accent-light:   #a8842c;
  --bg:             #f6f2e8;
  --surface:        #fffdf7;
  --surface2:       #efe9da;
  --surface3:       #e5ddc9;
  --border:         #d8cfb6;
  --border-soft:    rgba(138, 109, 29, .22);
  --text:           #141210;
  --text-muted:     #6f6753;
  --text-dim:       #4a442f;
  --shadow:         0 2px 10px rgba(20, 18, 16, .08);
  --shadow-card:    0 14px 34px rgba(20, 18, 16, .12);
  --shadow-gold:    0 8px 28px rgba(138, 109, 29, .18);
  --dv-border-active: rgba(138, 109, 29, .5);
  --dv-glow:        rgba(138, 109, 29, .16);
}

/* ── 2 · CANVAS & BASE ────────────────────────────────────────────── */
body {
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(201, 162, 39, .07), transparent 60%),
    radial-gradient(800px 460px at -8% 34%, rgba(201, 162, 39, .04), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(201, 162, 39, .35); color: var(--text); }

* { scrollbar-width: thin; scrollbar-color: var(--surface3) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; border-radius: 6px; }
body.lang-en { letter-spacing: -.011em; }

/* financial figures: fixed-width numerals wherever numbers live */
.card-meta, .hero-meta, .ticker-inner, .article-meta, time,
.views-count, .read-time, .pagination, .stat-card .stat-value {
  font-variant-numeric: tabular-nums;
}

/* ── 3 · SERIF DISPLAY TYPE (the Divunia voice) ───────────────────── */
.hero-title, .section-header h2, .article-view .article-header h1,
.search-hero h1 {
  font-family: var(--dv-display-ar);
  font-weight: 700;
  letter-spacing: 0;
}
body.lang-en .hero-title, body.lang-en .section-header h2,
body.lang-en .article-view .article-header h1, body.lang-en .search-hero h1 {
  font-family: var(--dv-display-en);
  letter-spacing: .01em;
}

/* ── 4 · NAVIGATION — contextual glass panel (spec §2B formula) ───── */
.site-nav {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: none;
  transition: background var(--transition);
  height: 100px;
  padding: 0 1.5rem;
}

/* brand lockup: full logo panel image */
.nav-logo-img {
  display: block;
  height: 84px;
  width: auto;
  transition: transform var(--transition), filter var(--transition);
}
.nav-logo:hover .nav-logo-img {
  transform: scale(1.02);
  filter: drop-shadow(0 4px 16px var(--dv-glow));
}
/* Full panel image already contains all text; hide CSS duplicates */
.nav-logo .logo-ar, .nav-logo .logo-en { display: none !important; }

.nav-links a {
  position: relative;
  padding: 8px 14px; border-radius: 99px;
  transition: color var(--transition), background var(--transition);
}
.nav-links a::after {
  content: "";
  position: absolute; inset-inline: 14px; bottom: 2px; height: 1.5px;
  border-radius: 2px; background: var(--accent-light);
  transform: scaleX(0); transform-origin: center;
  transition: transform var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--accent-light);
  background: rgba(201, 162, 39, .07);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.search-pill, .lang-toggle, .drawer-lang-btn {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border-soft);
  border-radius: 99px;
  transition: border-color var(--transition), background var(--transition),
              box-shadow var(--transition), transform var(--transition);
}
.search-pill:focus-within {
  border-color: var(--dv-border-active);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, .12);
}
.lang-toggle { font-weight: 600; }
.lang-toggle:hover, .drawer-lang-btn:hover {
  border-color: var(--dv-border-active);
  color: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}
.nav-mobile-drawer {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
  border-color: var(--border-soft);
}

/* ── 5 · AD TICKER ────────────────────────────────────────────────── */
.ad-ticker {
  background: linear-gradient(90deg, #0c0a05, var(--surface2));
  border-block: 1px solid var(--border-soft);
}
.ticker-label {
  background: linear-gradient(120deg, var(--accent), var(--accent-light));
  color: #131006; font-weight: 700;
}

/* ── 6 · HERO ─────────────────────────────────────────────────────── */
.hero-section { min-height: 68vh; border-radius: 0 0 var(--radius-xl) var(--radius-xl); overflow: hidden; }
.hero-content { padding-block: 96px 72px; }
.hero-overlay {
  background:
    linear-gradient(200deg, rgba(7, 7, 8, .12) 0%, rgba(7, 7, 8, .82) 62%, var(--bg) 100%),
    linear-gradient(90deg, rgba(201, 162, 39, .10), transparent 55%);
}
.hero-section img.hero-img { transition: transform 6s var(--transition-slow), filter var(--transition-slow); }
.hero-section:hover img.hero-img { transform: scale(1.04); }
.hero-title { font-size: clamp(36px, 5vw, 60px); line-height: 1.22; }
.hero-summary { color: var(--text-dim); font-size: 19px; max-width: 62ch; }
.hero-cta {
  background: linear-gradient(120deg, var(--accent-light), var(--accent));
  color: #131006; border: none; border-radius: 99px; font-weight: 700;
  box-shadow: var(--shadow-gold);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(201, 162, 39, .32); filter: brightness(1.05); }
.hero-cta:active { transform: translateY(0) scale(.985); }
.eyebrow { color: var(--accent-light); letter-spacing: .08em; }
.eyebrow::before { background: var(--accent); }

/* ── 7 · SECTIONS & INTELLIGENT CARDS (state machine) ─────────────── */
.content-section { padding-block: 56px 32px; }
.section-header { margin-bottom: 34px; }
.section-header h2 { font-size: clamp(26px, 3vw, 40px); }
.section-header::after { background: linear-gradient(90deg, var(--accent), transparent); height: 1.5px; }
.section-header .see-all {
  border: 1px solid var(--border-soft); border-radius: 99px; padding: 6px 16px;
  transition: all var(--transition);
}
.section-header .see-all:hover {
  color: #131006; background: var(--accent); border-color: var(--accent);
  transform: translateY(-2px); box-shadow: var(--shadow-gold);
}

.articles-grid { gap: 28px; }
@media (min-width: 1100px) {
  .articles-grid, .articles-grid.grid-4 { grid-template-columns: repeat(3, 1fr); }
  .hero-section + .content-section .articles-grid .article-card:first-child,
  .articles-grid.grid-4 .article-card:first-child { grid-column: span 2; }
  .hero-section + .content-section .articles-grid .article-card:first-child .card-title,
  .articles-grid.grid-4 .article-card:first-child .card-title { font-size: 27px; line-height: 1.3; }
}

/* DEFAULT: quiet surface — thin border, soft shadow, NO glow */
.article-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition),
              border-color var(--transition), background var(--transition);
  will-change: transform;
}
/* HOVER: interaction elevation — lift, illuminate, brighten, spread */
.article-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: var(--dv-border-active);
  background: var(--surface2);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(201, 162, 39, .08);
}
.article-card .thumb img { transition: transform var(--transition-slow), filter var(--transition-slow); }
.article-card:hover .thumb img { transform: scale(1.05); filter: saturate(1.08); }
.card-body { padding: 26px; }
.card-title { font-size: 20px; line-height: 1.4; transition: color var(--transition); }
.article-card:hover .card-title { color: var(--accent-light); }
.card-summary { color: var(--text-dim); font-size: 15px; }
.card-meta { color: var(--text-muted); }

.category-badge, .category-badge--inline {
  width: fit-content;
  background: rgba(201, 162, 39, .10);
  color: var(--accent-light);
  border: 1px solid rgba(201, 162, 39, .30);
  border-radius: 99px; font-weight: 600;
  transition: all var(--transition);
}
.article-card:hover .category-badge,
.category-badge--inline:hover { background: var(--accent); color: #131006; }

/* single-flash data update helper (JS adds .dv-flash on change) */
@keyframes dv-flash { 0% { background: rgba(201,162,39,.22); } 100% { background: transparent; } }
.dv-flash { animation: dv-flash .5s var(--transition) 1; }

/* sidebar widgets */
.sidebar-widget { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); }
.sidebar-widget-header::before { background: var(--accent); }
.sidebar-list .rank { color: var(--accent-light); font-family: var(--font-en); font-variant-numeric: tabular-nums; }
.sidebar-list a { transition: color var(--transition), padding-inline-start var(--transition); }
.sidebar-list a:hover { color: var(--accent-light); padding-inline-start: 6px; }

/* ── 8 · ARTICLE VIEW ─────────────────────────────────────────────── */
.article-view .article-header h1 { font-size: clamp(30px, 4vw, 50px); line-height: 1.28; }
.article-view .article-header .summary { border-inline-start: 3px solid var(--accent); color: var(--text-dim); }
.article-body blockquote {
  border-inline-start: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-body a { color: var(--accent-light); }
.article-body a:hover { color: var(--accent); }
.article-source-link { color: var(--accent-light); }
.tag-badge {
  background: var(--surface2); border: 1px solid var(--border-soft); border-radius: 99px;
  transition: all var(--transition);
}
.tag-badge:hover {
  background: rgba(201, 162, 39, .10); border-color: var(--dv-border-active);
  color: var(--accent-light); transform: translateY(-2px);
}

/* ── 9 · SEARCH VIEW ──────────────────────────────────────────────── */
.search-input-wrap input {
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: 99px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input-wrap input:focus { border-color: var(--dv-border-active); box-shadow: 0 0 0 4px rgba(201, 162, 39, .12); }
.search-input-wrap button {
  background: linear-gradient(120deg, var(--accent-light), var(--accent));
  color: #131006; border-radius: 99px; font-weight: 700;
  transition: transform var(--transition), box-shadow var(--transition);
}
.search-input-wrap button:hover { transform: translateY(-2px); box-shadow: var(--shadow-gold); }
.filter-chip { background: var(--surface2); border: 1px solid var(--border-soft); border-radius: 99px; transition: all var(--transition); }
.filter-chip:hover, .filter-chip.active {
  background: rgba(201, 162, 39, .10); border-color: var(--dv-border-active);
  color: var(--accent-light); transform: translateY(-1px);
}
.pagination button { border: 1px solid var(--border-soft); border-radius: 12px; background: var(--surface); transition: all var(--transition); }
.pagination button:hover, .pagination button.active {
  background: var(--accent); border-color: var(--accent); color: #131006;
  transform: translateY(-2px); box-shadow: var(--shadow-gold);
}

/* ── 10 · FOOTER ──────────────────────────────────────────────────── */
.site-footer { background: linear-gradient(180deg, var(--bg), #030304); border-top: 1px solid var(--border-soft); padding-top: 72px; }
.footer-grid { gap: 48px; }
.footer-gold-line { background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .85; }
.footer-brand-panel {
  display: block;
  width: 100%; max-width: 960px; height: auto;
  border-radius: var(--radius-lg);
  transition: transform var(--transition), filter var(--transition);
}
.footer-brand-panel:hover { transform: scale(1.01); filter: drop-shadow(0 6px 20px var(--dv-glow)); }
.footer-col ul a { transition: color var(--transition), padding-inline-start var(--transition); }
.footer-col ul a:hover { color: var(--accent-light); padding-inline-start: 6px; }
.social-btn { background: var(--surface2); border: 1px solid var(--border-soft); border-radius: 12px; transition: all var(--transition); }
.social-btn:hover { border-color: var(--dv-border-active); background: rgba(201, 162, 39, .10); transform: translateY(-3px); box-shadow: var(--shadow-gold); }

/* ── 11 · TOASTS & SKELETONS ──────────────────────────────────────── */
.toast {
  background: color-mix(in srgb, var(--surface3) 88%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
  border: 1px solid var(--border-soft); border-radius: var(--radius);
}
.toast.success { border-inline-start: 3px solid var(--dv-positive); }
.toast.error   { border-inline-start: 3px solid var(--dv-negative); }
.skeleton { background: var(--surface2); }

/* ── 12 · SCROLL REVEAL (CSS-only, graceful) ──────────────────────── */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .content-section {
      animation: dv-rise .8s var(--transition-slow) both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}
@keyframes dv-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

/* ── 13 · LAYOUT RHYTHM ───────────────────────────────────────────── */
.two-col { gap: 40px; }
.custom-page .page-body { max-width: 74ch; }

/* ── 14 · BRANDED CURSOR — scoped (spec §11: sparingly) ───────────── */
/* Applied to navigational/interactive brand surfaces ONLY.
   Deliberately NOT applied to: form fields, tables, charts, article
   body text, admin editor — standard cursors carry meaning there.  */
.nav-links a, .nav-logo, .article-card, .hero-cta, .see-all,
.lang-toggle, .social-btn, .category-badge--inline, .tag-badge,
.filter-chip, .pagination button {
  cursor: url("/assets/brand/dv-cursor-32.png") 14 14, pointer;
}

/* ── 15 · ADMIN PORTAL — VISUAL POLISH ONLY ───────────────────────── */
/* Colors, focus states and type refinement on the existing admin
   selectors. No display/positioning/visibility changes: every rule
   here is paint-only, so admin capability is untouched.            */
.portal-header { border-bottom: 1px solid var(--border-soft); }
.portal-logo span { color: var(--accent-light); font-family: var(--dv-display-ar); }
.auth-tab.active { color: var(--accent-light); border-color: var(--accent); }
.auth-form input:focus, .auth-form textarea:focus, .auth-form select:focus,
.field-group input:focus, .field-group textarea:focus, .field-group select:focus {
  border-color: var(--dv-border-active);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, .12);
}
.btn-secondary { border-color: var(--border-soft); }
.btn-secondary:hover { border-color: var(--dv-border-active); color: var(--accent-light); }
.stat-card { border: 1px solid var(--border-soft); }
.stat-card .stat-value { color: var(--accent-light); font-variant-numeric: tabular-nums; }
.status-badge.published { background: rgba(47, 181, 109, .15); color: var(--dv-positive); }
.status-badge.draft { background: rgba(201, 162, 39, .12); color: var(--accent-light); }
.modal-box { border: 1px solid var(--border-soft); box-shadow: var(--shadow-card); }
.rich-editor-ce:focus { outline-color: var(--accent); }

/* ── 16 · LIVE MARKETS LAYER (divunia-markets.js) ─────────────────── */
/* the ads ticker is replaced by the US-stocks moving bar */
body.dv-markets-on .ad-ticker { display: none; }

.dv-up   { --dv-dir: var(--dv-positive); }
.dv-down { --dv-dir: var(--dv-negative); }
.dv-dir  { color: var(--dv-dir); font-weight: 600; }

/* moving bar */
.dv-tickerbar {
  display: flex; align-items: center; gap: 0;
  background: linear-gradient(90deg, #0c0a05, var(--surface2));
  border-block: 1px solid var(--border-soft);
  direction: ltr; /* numbers read LTR even in RTL layout */
  overflow: hidden;
}
.dv-tk-label {
  flex: 0 0 auto;
  padding: 8px 16px;
  font-weight: 700; font-size: 13px;
  background: linear-gradient(120deg, var(--accent), var(--accent-light));
  color: #131006; white-space: nowrap;
}
.dv-tk-viewport { flex: 1 1 auto; overflow: hidden; }
.dv-tk-track {
  display: inline-flex; gap: 6px; padding: 5px 0;
  white-space: nowrap; will-change: transform;
  animation: dv-marquee 60s linear infinite;
}
.dv-tickerbar:hover .dv-tk-track { animation-play-state: paused; }
@keyframes dv-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.dv-tk {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 14px; margin: 0;
  background: transparent; border: 1px solid transparent; border-radius: 99px;
  color: var(--text-dim); font-size: 13px; cursor: pointer;
  transition: all var(--transition);
}
.dv-tk b { color: var(--text); font-weight: 700; }
.dv-tk:hover {
  border-color: var(--dv-border-active);
  background: rgba(201, 162, 39, .08);
  transform: translateY(-1px);
}

/* dashboard: multi-window live grid */
.dv-dashboard { padding-block: 18px 4px; }
.dv-dash-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.dv-dash-title {
  font-family: var(--dv-display-ar);
  font-size: clamp(24px, 3vw, 36px); font-weight: 700;
  color: var(--accent-light);
}
body.lang-en .dv-dash-title { font-family: var(--dv-display-en); }
.dv-dash-sub { font-size: 12.5px; color: var(--text-muted); }

.dv-dash-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  grid-auto-flow: dense;
}
.dv-win {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px 16px 10px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
              border-color var(--transition), background var(--transition);
}
.dv-win:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
}
.dv-win:hover, .dv-win:focus-within {
  transform: translateY(-3px) scale(1.01);
  border-color: var(--dv-dir, var(--dv-border-active));
  background: var(--surface2);
  box-shadow: var(--shadow-card);
}
.dv-win--big { grid-column: span 2; }
@media (max-width: 640px) { .dv-win--big { grid-column: span 1; } }
.dv-win-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.dv-win-name { font-weight: 700; color: var(--text); font-size: 14.5px; }
.dv-win-mkt { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.dv-win-quote {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 6px; direction: ltr;
}
.dv-win-price { font-size: 20px; font-weight: 700; color: var(--text); }
.dv-win-chart { margin-top: 10px; }

/* Every card states what its numbers really are. These labels are
   intentionally textual as well as coloured; colour is never the only cue. */
.dv-truth-badge {
  display: inline-flex; align-items: center; width: fit-content;
  margin-top: 5px; padding: 3px 7px; border: 1px solid currentColor;
  border-radius: 999px; font: 700 9.5px/1.25 var(--font-en);
  letter-spacing: .035em; text-transform: uppercase;
}
.dv-truth--delayed { color: #8fc8ff; background: rgba(90, 164, 225, .1); }
.dv-truth--provider { color: #b8d8f2; background: rgba(90, 164, 225, .075); }
.dv-truth--gateway { color: #f0cf77; background: rgba(201, 162, 39, .12); }
.dv-truth--pending { color: #d8bd78; background: rgba(201, 162, 39, .08); }
.dv-truth--unavailable { color: #ef9a9a; background: rgba(224, 82, 77, .1); }
.dv-truth--stale { color: #f0cf77; background: rgba(201, 162, 39, .12); }

/* Six-part context layer: hover intent on pointer devices, focus for
   keyboards, and the info button's pinned state for touch. */
.dv-context {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px; max-height: 0; opacity: 0; overflow: hidden;
  cursor: default;
  visibility: hidden; transform: translateY(-5px);
  transition: max-height .34s ease, opacity .2s ease, transform .2s ease,
              visibility 0s linear .34s;
}
@media (hover: hover) {
  .dv-win:hover .dv-context {
    max-height: 1100px; opacity: 1; visibility: visible; transform: translateY(0);
    margin-top: 12px; transition-delay: .32s, .32s, .32s, 0s;
  }
}
.dv-win:focus-within .dv-context,
.dv-win.dv-context-pinned .dv-context {
  max-height: 1100px; opacity: 1; visibility: visible; transform: translateY(0);
  margin-top: 12px; transition-delay: 0s;
}
.dv-context section {
  min-width: 0; padding: 9px 10px; border: 1px solid var(--border-soft);
  border-radius: 10px; background: color-mix(in srgb, var(--surface3) 72%, transparent);
}
.dv-context h3 { margin: 0 0 4px; color: var(--accent-light); font-size: 11px; }
.dv-context p { margin: 0; color: var(--text-dim); font-size: 11px; line-height: 1.55; }
.dv-context p a { color: var(--accent-light); text-decoration: underline; text-underline-offset: 3px; }
.dv-context-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.dv-context-actions button {
  border: 1px solid var(--border-soft); border-radius: 8px; padding: 5px 8px;
  background: rgba(201,162,39,.05); color: var(--text-dim); font: inherit;
  font-size: 10px; cursor: pointer;
}
.dv-context-actions button:hover,
.dv-context-actions button:focus-visible { border-color: var(--dv-border-active); color: var(--accent-light); }
.dv-context-widget-tile { min-height: 80px; }
.dv-context-widget-tile > p { min-height: 20px; }
.dv-context-widget { min-height: 72px; margin-top: 4px; overflow: hidden; border-radius: 8px; }
.dv-context-widget .tradingview-widget-container { min-height: 72px; }
.dv-context [data-dv-insight="statistics"] .dv-context-widget,
.dv-context [data-dv-insight="statistics"] .tradingview-widget-container { min-height: 90px; }
.dv-context-widget .dv-attr { display: block; padding: 1px 3px; font-size: 9px; }
.dv-insight-unavailable {
  min-height: 72px; display: grid; place-items: center; padding: 10px;
  border: 1px dashed var(--border-soft); border-radius: 8px;
  color: var(--text-muted); text-align: center; font-size: 10.5px; line-height: 1.45;
  background: rgba(201,162,39,.04);
}

/* Compact Quick Look: file-preview scale, never a full-page destination. */
.dv-overlay {
  position: fixed; inset: 0; z-index: 9999; display: flex;
  align-items: flex-start; justify-content: center;
  padding: clamp(72px, 10vh, 120px) 18px 18px;
}
.dv-overlay-back {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .24);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.dv-window {
  position: relative;
  width: min(760px, 94vw);
  background: color-mix(in srgb, var(--surface2) 92%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  padding: 22px;
  animation: dv-window-in .28s cubic-bezier(.25, .46, .45, .94) both;
}
.dv-window--peek {
  width: min(760px, 92vw); max-height: min(72dvh, 680px);
  display: flex; flex-direction: column; overflow: auto;
}
.dv-window--peek .dv-window-chart { min-height: 260px; flex: 1 0 260px; }
body.dv-dialog-open { overflow: hidden; }
@keyframes dv-window-in {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.dv-window-head { display: flex; align-items: flex-start; gap: 10px; }
.dv-window-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.dv-window-title {
  font-family: var(--dv-display-ar);
  font-size: 22px; font-weight: 700; color: var(--text);
}
body.lang-en .dv-window-title { font-family: var(--dv-display-en); }
.dv-window-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.dv-window-quote {
  margin-inline-start: auto; direction: ltr; text-align: right;
  font-size: 22px; font-weight: 700; color: var(--text);
}
.dv-window-quote span { display: block; font-size: 14px; color: var(--dv-dir); }
.dv-window-close, .dv-window-share {
  background: transparent; border: 1px solid var(--border-soft); border-radius: 10px;
  color: var(--text-muted); width: 34px; height: 34px; cursor: pointer;
  transition: all var(--transition);
  flex: 0 0 auto;
}
.dv-window-close:hover, .dv-window-share:hover {
  border-color: var(--dv-border-active); color: var(--accent-light);
  background: rgba(201,162,39,.08);
}
.dv-window-close:focus-visible, .dv-window-share:focus-visible {
  outline: 2px solid var(--accent-light); outline-offset: 2px;
}
.dv-window-chart { margin-top: 18px; }
.dv-window-stats {
  display: flex; gap: 22px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 13px; color: var(--text-muted);
}
.dv-window-stats b { color: var(--text); margin-inline-start: 4px; }
.dv-live-tag { margin-inline-start: auto; color: var(--accent-light); }
.dv-window-hint { margin-top: 10px; font-size: 11.5px; color: var(--text-muted); text-align: center; }

/* ── v2.1 TV ticker tape & window chrome ──────────────────────────── */
.dv-tickerbar--tv { padding: 0; position: relative; }
.dv-tk-tv { flex: 1 1 auto; min-height: 44px; }
.dv-tape-actions { display: flex; align-self: stretch; flex: 0 0 auto; }
.dv-tape-share,
.dv-tape-panel {
  flex: 0 0 auto; align-self: stretch; display: inline-flex; align-items: center;
  gap: 6px; padding: 0 13px; border: 0; border-inline-start: 1px solid var(--border-soft);
  background: rgba(201,162,39,.08); color: var(--accent-light); font: 600 11px/1 var(--font-family);
  cursor: pointer; white-space: nowrap;
}
.dv-tape-share {
  min-width: 42px; justify-content: center; padding: 0 10px;
  border: 0; border-inline-start: 1px solid var(--border-soft);
  background: rgba(201,162,39,.04); color: var(--accent-light); cursor: pointer;
}
.dv-tape-panel:hover, .dv-tape-share:hover { background: rgba(201,162,39,.16); }
.dv-tape-panel:focus-visible, .dv-tape-share:focus-visible {
  outline: 2px solid var(--accent-light); outline-offset: -3px;
}
.dv-window--wallstreet { width: min(980px, 94vw); max-height: min(84dvh, 820px); }
.dv-window--wallstreet .dv-window-chart { min-height: 520px; flex-basis: 520px; }
.dv-delay-strip {
  text-align: center; font-size: 11px; color: var(--text-muted);
  padding: 4px 12px; background: rgba(0,0,0,.35);
  border-bottom: 1px solid var(--border-soft);
}

/* window header + actions (v2.1) */
.dv-win-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 8px;
}
.dv-win-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.dv-win-titles { display: flex; flex-direction: column; gap: 2px; }
.dv-win-actions { display: flex; gap: 4px; flex-shrink: 0; }
.dv-win-btn {
  background: transparent; border: 1px solid var(--border-soft); border-radius: 8px;
  color: var(--text-muted); width: 28px; height: 28px; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
}
.dv-win-btn:hover { border-color: var(--dv-border-active); color: var(--accent-light); background: rgba(201,162,39,.08); }
.dv-win-btn:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.dv-win-widget-shell { position: relative; min-height: 120px; }
.dv-win-widget { min-height: 64px; }
/* No verified series for this venue: collapse the chart area so the card
   shrinks instead of showing a provider refusal or an empty placeholder. */
.dv-win--nodata .dv-win-widget-shell { display: none; }
.dv-win--tv .dv-win-widget { min-height: 190px; }
.dv-win--tv .dv-win-widget > .tradingview-widget-container { min-height: 190px; }
.dv-widget-open-hit {
  position: absolute; z-index: 3; inset: 0 0 20px;
  border: 0; border-radius: 9px; padding: 0;
  background: transparent; cursor: pointer;
}
.dv-widget-open-hit:focus-visible {
  outline: 2px solid var(--accent-light); outline-offset: -3px;
  background: rgba(201,162,39,.035);
}

/* quote links inside cards */
.dv-win-links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.dv-card-links {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-soft);
}
.dv-provider-gateway {
  min-height: 150px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
  border: 1px dashed var(--border-soft);
  border-radius: 14px;
  background: rgba(201, 162, 39, .05);
}
.dv-provider-gateway p { margin: 0; color: var(--text-secondary); line-height: 1.55; }
.dv-provider-gateway strong { color: var(--text-primary); }
.dv-provider-gateway-mark { color: var(--accent-light); font-size: 28px; }
.dv-provider-gateway .dv-win-links { justify-content: center; }
.dv-feed-empty {
  min-height: 190px; display: grid; place-content: center; justify-items: center;
  gap: 7px; padding: 18px; text-align: center; border: 1px dashed var(--border-soft);
  border-radius: 14px; color: var(--text-muted); background: rgba(201,162,39,.04);
}
.dv-feed-empty > span { color: var(--accent-light); font-size: 28px; }
.dv-feed-empty strong { color: var(--text); }
.dv-feed-empty p { margin: 0; max-width: 40ch; font-size: 11px; line-height: 1.55; }
.dv-feed-empty--panel { min-height: 300px; }
.dv-feed-quote { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; direction: ltr; }
.dv-feed-quote strong { color: var(--text); font: 700 25px/1 var(--font-en); font-variant-numeric: tabular-nums; }
.dv-feed-quote span { color: var(--dv-dir); display: grid; font: 600 15px/1 var(--font-en); font-variant-numeric: tabular-nums; gap: 5px; text-align: end; }
.dv-feed-quote span small { color: var(--text-muted); font: 500 9px/1.25 var(--font-ar); max-width: 170px; }
body.lang-en .dv-feed-quote span small { font-family: var(--font-en); }
.dv-feed-chart { margin-top: 12px; overflow: hidden; border-radius: 8px; }
.dv-feed-spark { display: block; }
.dv-feed-time { margin-top: 7px; color: var(--text-muted); font-size: 10.5px; text-align: center; direction: ltr; }
.dv-feed-large { padding: 8px; }
.dv-feed-large .dv-feed-quote strong { font-size: 32px; }
.dv-feed-stats, .dv-feed-mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.dv-feed-stats span, .dv-feed-mini-stats span { padding: 8px; border: 1px solid var(--border-soft); border-radius: 8px; color: var(--text-muted); font-size: 10px; }
.dv-feed-stats b, .dv-feed-mini-stats b { display: block; margin-top: 4px; color: var(--text); direction: ltr; font-variant-numeric: tabular-nums; }
.dv-feed-mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); height: 150px; align-content: center; margin-top: 0; }
.dv-qlink {
  font-size: 11.5px; color: var(--text-muted); text-decoration: none;
  border: 1px solid var(--border-soft); border-radius: 99px;
  padding: 3px 10px; transition: all var(--transition);
  white-space: nowrap; cursor: pointer; font: inherit;
  background: transparent;
}
.dv-qlink:hover { border-color: var(--dv-border-active); color: var(--accent-light); background: rgba(201,162,39,.08); }
.dv-qlink--primary { border-color: var(--accent); color: var(--accent-light); }
.dv-qlink--primary:hover { background: rgba(201,162,39,.15); }

/* expanded big chart */
.dv-win-bigchart { margin-top: 12px; }

/* full-window quote links + delay note */
.dv-quote-links {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}
.dv-qlabel { font-size: 12.5px; color: var(--text); font-weight: 600; white-space: nowrap; }
.dv-delay-note {
  margin-top: 10px; font-size: 11.5px; color: var(--text-muted); text-align: center;
}
.dv-truth-note {
  margin-top: 10px; padding: 8px 10px; border: 1px solid currentColor;
  border-radius: 10px; font-size: 11.5px; text-align: center;
}
.dv-provider-placeholder {
  min-height: 260px; display: grid; place-content: center; justify-items: center;
  gap: 10px; padding: 28px; text-align: center; border: 1px dashed var(--border-soft);
  border-radius: 14px; background: rgba(201, 162, 39, .05); color: var(--text-dim);
}
.dv-provider-placeholder > span { font-size: 34px; color: var(--accent-light); }
.dv-provider-placeholder strong { color: var(--text); font-size: 18px; }
.dv-provider-placeholder p { max-width: 52ch; margin: 0; line-height: 1.6; }
.dv-provider-actions {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-soft);
}
.dv-provider-back, .dv-provider-open {
  border: 1px solid var(--border-soft); border-radius: 10px; padding: 8px 13px;
  background: transparent; color: var(--text-dim); text-decoration: none;
  font: inherit; font-size: 12px; cursor: pointer;
}
.dv-provider-open { border-color: var(--accent); color: var(--accent-light); }
.dv-provider-back:hover, .dv-provider-open:hover {
  background: rgba(201,162,39,.1); border-color: var(--dv-border-active); color: var(--accent-light);
}

.dv-copy-field {
  position: fixed; inline-size: 1px; block-size: 1px;
  inset: -10000px auto auto -10000px; opacity: 0;
}

@media (max-width: 640px) {
  .dv-overlay { align-items: flex-end; padding: 0; }
  .dv-window--peek {
    width: 100%; max-width: none; max-height: 84dvh; margin: 0;
    border-radius: 22px 22px 0 0; border-inline: 0; border-bottom: 0;
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
  }
  .dv-window--peek .dv-window-chart { min-height: 220px; flex-basis: 220px; }
  .dv-provider-placeholder { min-height: 220px; }
  .dv-tape-panel span { display: none; }
  .dv-tape-panel { padding-inline: 10px; }
  .dv-window--wallstreet .dv-window-chart { min-height: 420px; flex-basis: 420px; }
  .dv-context { grid-template-columns: 1fr; }
  .dv-window-head { gap: 8px; }
  .dv-window-quote { font-size: 17px; }
}

@media (hover: none), (pointer: coarse) {
  .dv-win-btn { width: 42px; height: 42px; }
  .dv-tape-share { min-width: 46px; }
}

/* TradingView attribution */
.dv-attr { font-size: 11px; color: var(--text-muted); text-align: right; padding: 2px 4px; }
.dv-attr a { color: var(--text-muted); text-decoration: none; }
.dv-attr a:hover { color: var(--accent-light); }

/* hide old top structure when v2.1 head is present */
.dv-win--tv .dv-win-top { display: none; }

@media (prefers-reduced-motion: reduce) {
  .dv-tk-track { animation: none; }
  .dv-window { animation: none; }
  .dv-win:hover, .dv-win:focus-within { transform: none; }
  .dv-context { transition: none; }
  .dv-win:hover .dv-context { transition-delay: 0s; }
}

/* ── 17 · ACCESSIBILITY — reduced motion ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .article-card:hover, .hero-cta:hover, .social-btn:hover,
  .pagination button:hover, .tag-badge:hover, .lang-toggle:hover,
  .see-all:hover { transform: none; }
}

/* ═══ END — Divunia surface layer · admin behavior untouched ═══ */
