/* =========================
   UCTDI — Site CSS (v3.2 FINAL FIX)
   Modern newsroom layout + dark mode
   Clean + consistent (home / category / article)
   ========================= */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root{
  --bg:#ffffff;
  --surface:#ffffff;
  --surface2:#fafbfc;
  --text:#111;
  --muted:#666;
  --border:#e7eaee;

  --shadow: 0 10px 30px rgba(0,0,0,.06);
  --shadow2: 0 14px 44px rgba(0,0,0,.10);

  --link:#111;
  --badge-bg:#f3f5f7;
  --badge-text:#333;

  --accent:#111;
  --radius: 16px;

  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  --font-serif: ui-serif, Georgia, "Times New Roman", Times, serif;
}

html[data-theme="dark"]{
  --bg:#0b0c0f;
  --surface:#111319;
  --surface2:#0f1116;
  --text:#f2f4f7;
  --muted:#a8b0bd;
  --border:#242a36;

  --shadow: 0 12px 34px rgba(0,0,0,.35);
  --shadow2: 0 16px 60px rgba(0,0,0,.55);

  --link:#f2f4f7;
  --badge-bg:#1a1f2a;
  --badge-text:#dbe2ee;

  --accent:#f2f4f7;
}

*{ box-sizing:border-box; }

html, body{
  width:100%;
  max-width:100%;
  overflow-x:hidden; /* ✅ kills the tiny horizontal move on mobile */
}

body{
  margin:0;
  font-family: var(--font-sans);
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }

.no-scroll{ overflow:hidden; }

/* Safe media: prevents overflow */
img, svg, iframe, video{
  max-width:100%;
}

/* Tables/code safety inside article content */
.article-content pre,
.article-content code{
  max-width:100%;
}
.article-content pre{
  overflow:auto;
}
.article-content table{
  width:100%;
  max-width:100%;
  display:block;
  overflow:auto;
}

.container{
  width:100%;
  max-width:1160px;
  margin:0 auto;
  padding:22px;
}

/* --------------------------------
   HEADER (v2.2)
---------------------------------- */
.site-header-v2{
  border-bottom:1px solid var(--border);
  background: linear-gradient(to bottom, var(--bg), var(--bg));
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding-top: 18px;
  padding-bottom: 10px;
}

.brand-wrap{
  text-align:center;
  flex: 1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-width: 200px;
}

.brand-title{
  font-weight:900;
  font-family:system-ui;
  letter-spacing:.36em;
  text-transform:uppercase;
  display:inline-block;
  font-size: 28px;
  line-height: 1;
}

.brand-tagline{
  font-size:12px;
  color:var(--muted);
  margin-top:8px;
  max-width: 720px;
}

/* buttons */
.icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border:1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 12px;
  cursor:pointer;
  box-shadow: none;
}
.icon-btn:hover{
  box-shadow: var(--shadow);
  text-decoration:none;
}

.theme-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background: var(--accent);
  display:inline-block;
}

.hamburger{
  width:18px; height:12px; position:relative; display:inline-block;
  background: linear-gradient(var(--text), var(--text)) center/100% 2px no-repeat;
}
.hamburger::before,
.hamburger::after{
  content:""; position:absolute; left:0; right:0; height:2px;
  background: var(--text);
  border-radius: 999px;
}
.hamburger::before{ top:0; }
.hamburger::after{ bottom:0; }

/* Desktop nav under logo */
.header-nav-wrap{
  border-top:1px solid var(--border);
  background: var(--bg);
}

.site-nav{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  padding-top:10px;
  padding-bottom:12px;
  font-size:13px;
  color: var(--text);
}
.site-nav a{
  padding:8px 10px;
  border-radius: 999px;
}
.site-nav a:hover{
  background: var(--surface2);
  text-decoration:none;
}

/* ✅ header controls layout (search + theme at right) */
.site-nav.hdr-nav{
  justify-content: space-between;
  flex-wrap: nowrap;
}
.site-nav.hdr-nav .hdr-nav-links{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:center;
  flex: 1;
  flex-wrap: wrap;
  min-width: 0;
}
.site-nav.hdr-nav .hdr-nav-controls{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex: 0 0 auto;
}
.hdr-icon-btn{
  padding: 9px 12px;
}
.hdr-icon-svg{
  width:18px;
  height:18px;
  display:block;
}

/* Mobile actions group */
.hdr-mobile-actions{
  display:inline-flex;
  align-items:center;
  gap:10px;
}

/* responsive rules */
.mobile-only{ display:none; }
.desktop-only{ display:inline; }

@media (max-width: 920px){
  .mobile-only{ display:inline-flex; }
  .desktop-only{ display:none; }
  .header-nav-wrap{ display:none; }
  .brand-title{ font-size: 34px; letter-spacing: .34em; font-family: system-ui; }
  .brand-tagline{ font-size: 11px; }
}

/* mobile drawer */
.mobile-drawer{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display:none;
  z-index: 70;
}
.mobile-drawer.open{ display:block; }
.mobile-drawer-inner{
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow2);
  margin-top: 0;
  padding-top: 16px;
  padding-bottom: 22px;
  max-height: 100vh;
  overflow:auto;
}
.mobile-drawer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.mobile-title{ font-weight:800; letter-spacing:.06em; }
.mobile-nav{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding-top: 14px;
}
.mobile-nav a{
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.mobile-nav a:hover{ text-decoration:none; box-shadow: var(--shadow); }
.mobile-actions{ margin-top: 14px; }
.btn-ghost{
  width:100%;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  cursor:pointer;
}

.header-progress{
  height:2px;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  display:none;
}

/* --------------------------------
   Base classes
---------------------------------- */
.hero{ padding:16px 0 18px; }
.h1{ font-size:32px; margin:0 0 6px; letter-spacing:-.02em; }
.sub{ color:var(--muted); font-size:14px; margin:0; line-height: 1.5; }

.grid{ display:grid; grid-template-columns: 1.25fr .75fr; gap:20px; }
@media (max-width: 980px){ .grid{ grid-template-columns:1fr; } }

.card{
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:16px;
  background: var(--surface);
  box-shadow: none;
}
.card h2{ margin:0 0 10px; font-size:16px; letter-spacing:-.01em; }

.list{ display:flex; flex-direction:column; gap:12px; }

.item-title{ font-weight:750; letter-spacing:-.01em; }
.item-meta{
  font-size:12px;
  color:var(--muted);
  margin-top:4px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.badge{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  background: var(--badge-bg);
  font-size:12px;
  color: var(--badge-text);
  border: 1px solid var(--border);
}

.sep{ height:1px; background:var(--border); margin:14px 0; }

/* --------------------------------
   Home layout
---------------------------------- */
.home-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 20px;
  align-items:start;
}
@media (max-width: 980px){
  .home-grid{ grid-template-columns:1fr; }
}

.lead-card{
  padding: 18px;
  background: linear-gradient(180deg, var(--surface), var(--surface2));
}

.lead-list{
  display:flex;
  flex-direction:column;
  gap: 14px;
}
.lead-list .lead-item{
  display:block;
  padding: 14px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.lead-list .lead-item:hover{
  text-decoration:none;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  background: linear-gradient(180deg, var(--surface), var(--surface2));
}
.lead-kicker{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: 6px;
}
.lead-title{
  font-weight: 880;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-top: 2px;
}
.lead-excerpt{
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.lead-item .item-meta{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  align-items:center;
  font-size:12px;
  color: var(--muted);
}

@media (max-width: 680px){
  .lead-list{ gap: 12px; }
  .lead-list .lead-item{ padding: 12px; }
  .lead-title{ font-size: 18px; }
}

.sidebar-sticky{
  position: sticky;
  top: 120px;
  display:flex;
  flex-direction:column;
  gap: 14px;
}
@media (max-width: 980px){
  .sidebar-sticky{ position: static; }
}

/* Ad slots */
.ad-slot{
  border:1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface2);
  padding: 14px;
  color: var(--muted);
  font-size: 12px;
  text-align:center;
}
.ad-slot .ad-label{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  opacity: .8;
}
.ad-slot .ad-size{
  margin-top: 6px;
  opacity: .75;
}

/* --------------------------------
   Category + Article layout
---------------------------------- */
.layout-2col{
  display:grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items:start;
}
@media (max-width: 980px){
  .layout-2col{ grid-template-columns:1fr; }
}

.breadcrumb{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb a{ color: var(--muted); }
.breadcrumb .crumb-sep{ opacity:.5; }

.article{ background: transparent; }
.article h1{
  margin:0 0 10px;
  font-size: 34px;
  letter-spacing: -.03em;
  line-height: 1.12;
}

.article-meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:13px;
  margin-bottom:12px;
}

.article-content{
  line-height:1.85;
  font-size: 18px;
  font-family: var(--font-serif);
  color: var(--text);
}
.article-content p{ margin: 0 0 14px; }
.article-content a{ text-decoration:underline; }

.article-card{
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
}

.quick-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.quick-links a{
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 10px;
  background: var(--surface2);
  font-size: 13px;
}
.quick-links a:hover{ text-decoration:none; box-shadow: var(--shadow); }

/* --------------------------------
   Footer
---------------------------------- */
.site-footer-v2{
  border-top:1px solid var(--border);
  padding: 22px 0;
  margin-top: 42px;
  background: var(--bg);
}
.footer-grid{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 18px;
  flex-wrap:wrap;
}
.footer-title{
  font-weight: 900;
  letter-spacing: .30em;
  text-transform: uppercase;
}
.footer-copy{
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}
.footer-links{
  display:flex;
  gap: 14px;
  flex-wrap:wrap;
  align-items:center;
  font-size: 13px;
}
.footer-links a{
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.footer-links a:hover{ text-decoration:none; box-shadow: var(--shadow); }

/* =========================
   Sections grid
========================= */
.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.section-title{
  margin:0;
  font-size:16px;
  letter-spacing:-.01em;
}
.section-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.sections-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 980px){
  .sections-grid{ grid-template-columns:1fr; }
}
.section-card{ padding:16px; }
.section-kicker{
  font-size:11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.section-name{
  margin:6px 0 0;
  font-size:18px;
  letter-spacing:-.02em;
  font-weight:850;
}
.viewall{
  border:1px solid var(--border);
  background: var(--surface2);
  padding:8px 12px;
  border-radius:999px;
  font-size:13px;
  text-decoration:none;
}
.viewall:hover{ text-decoration:none; box-shadow: var(--shadow); }
.section-list{
  margin-top: 12px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.section-item{
  padding:10px 0;
  border-bottom:1px solid var(--border);
}
.section-item:last-child{ border-bottom:0; }
.section-item-title{
  font-weight:750;
  letter-spacing:-.01em;
  line-height:1.25;
}

/* =========================
   Pagination
========================= */
.pager{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.pager-btn, .pager-num{
  border:1px solid var(--border);
  background: var(--surface2);
  padding:8px 12px;
  border-radius:999px;
  font-size:13px;
  text-decoration:none;
}
.pager-btn:hover, .pager-num:hover{ text-decoration:none; box-shadow: var(--shadow); }
.pager-btn.is-disabled, .pager-num.is-disabled{
  opacity:.55;
  pointer-events:none;
  box-shadow:none !important;
}
.pager-mid, .pager-label{
  font-size:12px;
  color: var(--muted);
}

/* =========================
   Category + Article polish
========================= */
.section-meta{ font-size:12px; color: var(--muted); }

.story-list{
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.story-card{
  display:block;
  padding: 14px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.story-card:hover{
  text-decoration:none;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  background: linear-gradient(180deg, var(--surface), var(--surface2));
}

.story-title{
  font-weight: 850;
  letter-spacing: -.01em;
  line-height: 1.25;
  font-size: 16px;
}

.story-excerpt{
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.story-meta{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.mini-row{
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.mini-row:last-child{ border-bottom:0; }
.mini-row:hover{ text-decoration:none; }
.mini-row:hover .item-title{ text-decoration: underline; }

.article-topmeta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}
.article-dek{
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.article-pager{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.ap-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface2);
  font-size: 13px;
}
.ap-btn:hover{ text-decoration:none; box-shadow: var(--shadow); }

.ap-split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 980px){
  .ap-split{ grid-template-columns:1fr; }
}
.ap-card{
  display:block;
  padding: 14px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.ap-card:hover{ text-decoration:none; box-shadow: var(--shadow); }
.ap-kicker{
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .14em;
}
.ap-title{
  margin-top: 6px;
  font-weight: 850;
  letter-spacing: -.01em;
  line-height: 1.25;
}
.ap-card.is-disabled{ opacity:.5; }

/* =========================
   Hero Banner
========================= */
.hero-banner{
  position: relative;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.hero-banner-media{
  position: relative;
  width: 100%;
  height: clamp(220px, 34vw, 420px);
  overflow: hidden;
}

.hero-banner-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
  transform: scale(1.02);
}

.hero-banner-overlay{
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.60) 0%, rgba(0,0,0,.25) 55%, rgba(0,0,0,.10) 100%),
    linear-gradient(180deg, rgba(0,0,0,.30) 0%, rgba(0,0,0,.10) 60%, rgba(0,0,0,.35) 100%);
  display:flex;
  align-items:flex-end;
}

.hero-banner-inner{
  padding-top: 18px;
  padding-bottom: 22px;
}

.hero-banner-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color: rgba(255,255,255,.85);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .16em;
  margin-bottom: 8px;
}

.hero-banner-title{
  margin:0;
  color:#fff;
  font-size: clamp(22px, 2.6vw, 40px);
  letter-spacing: -.03em;
  line-height: 1.12;
  max-width: 780px;
  text-wrap: balance;
}

.hero-banner-desc{
  margin: 10px 0 0;
  color: rgba(255,255,255,.86);
  font-size: clamp(13px, 1.25vw, 16px);
  line-height: 1.55;
  max-width: 720px;
}

.hero-banner-actions{
  margin-top: 14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.btn-primary,
.btn-secondary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  text-decoration:none;
  font-size: 13px;
  font-weight: 650;
}

.btn-primary{
  background: rgba(255,255,255,.92);
  color: #111;
}

.btn-secondary{
  background: rgba(0,0,0,.18);
  color: #fff;
}

.btn-primary:hover,
.btn-secondary:hover{
  text-decoration:none;
  box-shadow: 0 12px 34px rgba(0,0,0,.22);
  transform: translateY(-1px);
}

@media (max-width: 720px){
  .hero-banner-overlay{
    background:
      linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.20) 60%, rgba(0,0,0,.55) 100%);
    align-items:flex-end;
  }
  .hero-banner-title,
  .hero-banner-desc{ max-width: 100%; }
}

/* =========================
   SEARCH MODAL (NEW)
========================= */
.search-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display:none;
  z-index: 80;
  padding: 18px;
}
.search-overlay.open{
  display:flex;
  align-items:flex-start;
  justify-content:center;
}
.search-modal{
  width: min(720px, 100%);
  margin-top: 110px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow2);
  padding: 16px;
}
@media (max-width: 920px){
  .search-modal{ margin-top: 80px; }
}

.search-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 10px;
}
.search-modal-title{
  font-weight: 850;
  letter-spacing:-.01em;
  font-size: 15px;
}
.search-close{
  padding: 7px 10px;
}

.search-form{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.search-input{
  flex: 1 1 260px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.search-input:focus{ box-shadow: var(--shadow); }

.search-btn{
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--surface2);
  color: var(--text);
  cursor:pointer;
}
.search-btn:hover{ box-shadow: var(--shadow); }

.search-tip{
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

/* =========================
   Simple “widgets” helpers (tag pills + stats)
========================= */
.pill-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface2);
  font-size: 13px;
}
.pill:hover{
  text-decoration:none;
  box-shadow: var(--shadow);
}

.stat-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.stat{
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface2);
  padding: 10px;
}
.stat-label{
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.stat-val{
  margin-top: 6px;
  font-weight: 850;
  letter-spacing: -.01em;
}

/* =========================
   PATCH v3.3 — Homepage 2-col + TradingView sizing + Search modal media cap
   (Append-only)
   ========================= */

/* 0) Optional: wider premium container on big screens (keeps same design) */
@media (min-width: 1100px){
  .container{
    width: 80%;
    max-width: 1320px;
  }
}

/* 1) HOMEPAGE: Latest (75%) + Widgets (25%) */
.home-latest-grid{
  display:grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); /* 75/25 */
  gap: 20px;
  align-items:start;
}
.home-latest-grid > *{ min-width:0; }

@media (max-width: 980px){
  .home-latest-grid{ grid-template-columns: 1fr; }
}

/* Hide vertical sidebar ad on mobile if it causes squeeze */
@media (max-width: 980px){
  .home-ad-vertical{ display:none; }
}

/* 2) TradingView widgets: stop overflow + lock heights */
.tradingview-widget-container,
tradingview-widget-container,
tv-ticker-tape{
  max-width: 100%;
}

.tv-ticker-wrap{
  overflow:hidden;
  padding: 10px 12px;
  background: linear-gradient(180deg, var(--surface), var(--surface2));
  min-height: 58px;
}

.tv-card{ padding: 14px; }

.tv-box{
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow:hidden;
  background: var(--surface2);
}

/* fixed, stable heights (your index.php uses these classes) */
.tv-h420{ height: 420px; }
.tv-h460{ height: 460px; }
.tv-h520{ height: 520px; }

.tv-box .tradingview-widget-container{ height: 100%; }
.tv-box .tradingview-widget-container__widget{ height: 100%; }

/* 3) Search modal: prevent giant SVG/IMG like your screenshot */
.search-modal img,
.search-modal svg{
  max-width: 180px;
  height: auto;
}
.search-modal *{
  max-width: 100%;
}

/* PATCH v3.4 — Pager mobile polish */
@media (max-width: 520px){
  .pager{
    justify-content:center;
  }
  .pager-mid{
    width:100%;
    text-align:center;
    order: 3;
  }
}

/* PATCH v3.4 — Mobile header icons stack + SVG visibility */
@media (max-width: 920px){
  .hdr-mobile-actions{
    flex-direction: column;
    gap: 8px;
  }

  .hdr-mobile-actions .icon-btn{
    width: 27px;
    height: 27px;
    padding: 0;
    justify-content: center;
  }

  /* hide any labels on mobile icon buttons */
  .hdr-mobile-actions .theme-label{
    display:none !important;
  }
}

/* Make sure SVG icons render in any theme */
.hdr-icon-svg,
.icon-btn svg{
  width:14px;
  height:14px;
  display:block;
  stroke: currentColor;
  fill: none;
}
.icon-btn svg *{
  stroke: currentColor;
}

.tradingview-widget-copyright{ display:none !important; }

.tag-cloud{
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* =========================
   UCTDI — Contact Form (fresh)
   Add at END of site.css
========================= */

.contact-card{
  padding: 18px;
}

.contact-form{
  margin-top: 10px;
}

.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

@media (max-width: 820px){
  .contact-grid{
    grid-template-columns: 1fr;
  }
}

.contact-field{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-label{
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
}

.contact-label b{
  color: var(--text);
}

.contact-control{
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.contact-control::placeholder{
  color: var(--muted);
}

.contact-control:focus{
  box-shadow: var(--shadow);
}

.contact-textarea{
  height: auto;
  min-height: 140px;
  resize: vertical;
  padding: 12px;
  line-height: 1.6;
  font-family: var(--font-sans);
}

.contact-help{
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.contact-actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.contact-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
}

.contact-btn:hover{
  box-shadow: var(--shadow);
}

.contact-meta{
  font-size: 12px;
  color: var(--muted);
}

.contact-meta a{
  text-decoration: underline;
}

@media (max-width: 820px){
  .contact-actions{
    align-items: stretch;
  }
  .contact-btn{
    width: 100%;
  }
}

