/* Nexa Impex LLP - shared theme */
:root {
  --bg: #f3f1ea;
  --surface: #efede7;
  --surface-2: #f8f7f2;
  --border: #dcd8cc;
  --green: #1e3b2c;
  --green-2: #2c5540;
  --gold: #c8a765;
  --gold-soft: #f1e7d0;
  --silver-soft: #e3e5e3;
  --sage-soft: #dfe6e1;
  --text: #1f2a24;
  --muted: #6b6f68;
  --up: #1d8a4a;
  --down: #c0392b;
  --nav-h: 72px;
  --ticker-h: 30px;
  --radius: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  padding-top: var(--safe-top);
  padding-bottom: calc(var(--nav-h) + var(--ticker-h) + var(--safe-bottom) + 12px);
  -webkit-user-select: none;
  user-select: none;
}
input, select, textarea { -webkit-user-select: text; user-select: text; font: inherit; }
a { color: var(--green-2); }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.page { padding: 0 16px; width: 100%; margin: 0 auto; }

/* ---------- Brand header (Live Rates) ---------- */
.brand-title {
  font-family: "Times New Roman", Georgia, serif;
  font-weight: 400;
  font-size: 32px;
  letter-spacing: 1px;
  text-align: center;
  margin: 0;
  padding: 26px 0 20px;
  color: #111;
}

/* ---------- Generic top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.topbar h1 {
  flex: 1; margin: 0; text-align: center;
  font-family: "Times New Roman", Georgia, serif;
  font-size: 22px; font-weight: 400; color: #111;
}
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: transparent; color: var(--green);
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:active { background: var(--surface); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- Segmented tabs ---------- */
.seg {
  display: flex; align-items: center;
  border: 1px solid var(--gold);
  border-radius: 32px; padding: 3px;
  background: var(--surface-2);
  margin-bottom: 18px;
}
.seg button {
  flex: 1; border: 0; background: transparent;
  padding: 13px 6px; border-radius: 28px;
  font-weight: 600; font-size: 15px; color: var(--green);
  position: relative;
}
.seg button + button:not(.active)::before {
  content: ""; position: absolute; left: 0; top: 30%; height: 40%;
  border-left: 1px solid var(--border);
}
.seg button.active { background: var(--green); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.seg button.active + button::before { display: none; }

/* ---------- Spot cards ---------- */
.spot-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; }
/* Two boxes below the PRODUCT table (4th and 5th scrips) */
.spot-cards.spot-cards-2 { grid-template-columns: repeat(2, 1fr); margin: 18px 0 8px; }
/* Gold Future / Silver Future boxes: dark green background, light text for contrast */
#futureCards .spot { background: #0b2f28; border-color: #0b2f28; }
#futureCards .spot-label { color: var(--gold); }
#futureCards .spot-value { color: #fff; }
#futureCards .spot-sub { color: rgba(255, 255, 255, .7); }
.spot {
  border-radius: var(--radius); padding: 14px 6px 12px;
  text-align: center; border: 1px solid transparent;
}
.spot.gold { background: var(--gold-soft); border-color: #eadcbc; }
.spot.silver { background: var(--silver-soft); border-color: #d7dad7; }
.spot.costing { background: var(--sage-soft); border-color: #d0dad3; }
.spot-icon {
  width: 46px; height: 46px; border-radius: 50%;
  margin: 0 auto 8px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 700;
}
.spot.gold .spot-icon { background: #c9a86a; }
.spot.silver .spot-icon { background: #9a9d9f; }
.spot.costing .spot-icon { background: #4f7a5c; }
.spot-icon svg { width: 26px; height: 26px; }
.spot-label { font-size: 13px; font-weight: 600; letter-spacing: .5px; color: var(--green); text-transform: uppercase; }
.spot-value { font-size: 24px; font-weight: 700; color: var(--green); margin: 2px 0; transition: color .2s; }
.spot-sub { font-size: 12px; color: var(--muted); }

/* ---------- Rates table ---------- */
.rate-head, .rate-row {
  display: grid; grid-template-columns: 1.45fr 1fr 1fr; align-items: center;
}
.rate-head {
  padding: 0 8px 12px; border-bottom: 1px solid var(--border); margin-bottom: 18px;
  font-size: 15px; font-weight: 600; letter-spacing: 2px; color: var(--green);
}
.rate-head span:nth-child(2) { text-align: center; }
.rate-head span:nth-child(3) { text-align: right; padding-right: 14px; }
.rates { display: flex; flex-direction: column; gap: 14px; }
.rate-row {
  width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 16px; color: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.rate-row:active { background: #e8e5dc; }
.rate-name { font-size: 14px; font-weight: 600; color: var(--green); text-transform: uppercase; line-height: 1.35; letter-spacing: .3px; }
.rate-pos { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 600; color: var(--gold); letter-spacing: 0; }
.rate-cell { text-align: center; }
.rate-cell:last-child { text-align: right; }
.rate-val { font-size: 24px; font-weight: 600; color: var(--green); transition: color .2s; }
.rate-cell:first-of-type .rate-val { font-size: 20px; }
.rate-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }

.status-msg { text-align: center; color: var(--down); font-weight: 600; padding: 20px 0; }
/* ---------- Loading spinner / no data ---------- */
.loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 40px 0; color: var(--muted); font-size: 14px;
}
.loading::before {
  content: ""; width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--gold); border-right-color: var(--green);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading::before { animation-duration: 2.4s; } }

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 40px 16px; color: var(--muted); text-align: center;
}
.empty svg { width: 44px; height: 44px; color: var(--gold); }
.empty p { margin: 0; font-size: 15px; font-weight: 600; color: var(--green); }

/* ---------- Banner ---------- */
.banner {
  background: var(--gold-soft); border: 1px solid #eadcbc; color: var(--green);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px;
  display: flex; gap: 10px; align-items: flex-start;
}
.banner .banner-text { flex: 1; }
.banner .icon-btn { width: 28px; height: 28px; }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--green);
  display: flex; justify-content: space-around; align-items: center;
}
.bottom-nav a, .bottom-nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #fff; text-decoration: none; font-size: 12px; background: none; border: 0; padding: 4px 0;
}
.bottom-nav .nav-ico {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.bottom-nav svg { width: 24px; height: 24px; }
.bottom-nav .active { color: var(--gold); }
.bottom-nav .active .nav-ico { background: var(--gold); color: var(--green); }

/* ---------- Ticker ---------- */
.ticker {
  position: fixed; left: 0; right: 0; z-index: 29;
  bottom: calc(var(--nav-h) + var(--safe-bottom));
  height: var(--ticker-h); overflow: hidden;
  background: var(--gold-soft); border-top: 1px solid #eadcbc;
  color: var(--green); font-size: 13px; font-weight: 600;
  display: flex; align-items: center;
}
.ticker-track { display: inline-block; white-space: nowrap; padding-left: 100%; animation: marquee 25s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; padding-left: 12px; } }

/* ---------- Drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 41;
  width: 82%; background: var(--bg);
  transform: translateX(-100%); transition: transform .22s ease;
  display: flex; flex-direction: column; padding-top: var(--safe-top);
}
.drawer.open { transform: translateX(0); }
.drawer-head { background: var(--green); color: #fff; padding: 20px 16px; }
.drawer-head .brand { font-family: "Times New Roman", Georgia, serif; font-size: 22px; }
.drawer-head .who { font-size: 13px; color: var(--gold); margin-top: 4px; }
.drawer nav { overflow-y: auto; flex: 1; padding: 6px 0 20px; }
.drawer nav a, .drawer nav button {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 13px 18px; border: 0; background: none; text-align: left;
  color: var(--green); font-weight: 500; text-decoration: none; border-bottom: 1px solid #e6e3da;
}
.drawer nav a.current { background: var(--gold-soft); font-weight: 700; }
.drawer nav .danger { color: var(--down); }
.drawer-version {
  flex: 0 0 auto; padding: 12px 18px calc(12px + var(--safe-bottom));
  border-top: 1px solid #e6e3da; text-align: center;
  font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--gold);
}

/* ---------- Generic cards / forms ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 12px;
}
.card h2, .card h3 { margin: 0 0 8px; color: var(--green); font-size: 16px; }
.card .meta { font-size: 12px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; color: var(--green); }
.list-item { display: block; width: 100%; text-align: left; color: inherit; text-decoration: none; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.badge.buy { background: #dff1e6; color: var(--up); }
.badge.sell { background: #f7e0dd; color: var(--down); }
.badge.neutral { background: #e6e3da; color: var(--muted); }

.form { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--green); margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--text);
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 18px; border-radius: 26px; border: 0; font-weight: 700;
  background: var(--green); color: #fff; width: 100%;
}
.btn:disabled { opacity: .5; }
.btn.gold { background: var(--gold); color: var(--green); }
.btn.buy { background: var(--up); }
.btn.sell { background: var(--down); }
.btn.outline { background: transparent; color: var(--green); border: 1px solid var(--green); }
.btn-row { display: flex; gap: 12px; }
.checkbox { display: flex; gap: 8px; align-items: center; font-size: 14px; }

.section-title { font-size: 14px; letter-spacing: 2px; font-weight: 600; color: var(--green); margin: 18px 0 10px; text-transform: uppercase; }
.html-content { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.html-content img { width: 100%; height: auto; }
.html-content table { width: 100%; border-collapse: collapse; }
.html-content td, .html-content th { border: 1px solid var(--border); padding: 6px; }

/* ---------- Bid / ask ---------- */
.quote { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.quote div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; text-align: center; padding: 14px; }
.quote .lbl { font-size: 12px; letter-spacing: 1.5px; color: var(--muted); }
.quote .val { font-size: 26px; font-weight: 700; color: var(--green); }

/* ---------- Gauge ---------- */
.gauge { display: block; width: 180px; margin: 0 auto; }
.gauge-result { text-align: center; font-size: 22px; font-weight: 700; margin-top: -8px; }

/* ---------- Chart ---------- */
.chart-wrap { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 8px; }
.chart-wrap canvas { width: 100%; height: 280px; display: block; }

/* ---------- iframe embed ---------- */
.embed { width: 100%; height: calc(100vh - 220px); min-height: 420px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }

/* ---------- Modal / toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--bg); border-radius: 16px; padding: 20px; width: 100%; }
.modal h2 { margin: 0 0 10px; color: var(--green); font-size: 18px; }
/* Toast: slides in at the top so it never covers buttons at the bottom of a page */
.toast {
  position: fixed; left: 50%; top: calc(var(--safe-top) + 12px); z-index: 70;
  transform: translate(-50%, 0); width: 92%;
  display: flex; align-items: center; gap: 10px;
  background: #fff; color: var(--green); padding: 12px 14px; border-radius: 14px;
  border: 1px solid #ebe7dc; border-left: 5px solid var(--up);
  font-size: 14px; font-weight: 600; text-align: left; line-height: 1.35;
  box-shadow: 0 10px 26px rgba(30, 59, 44, .22);
  animation: toast-in .25s ease-out;
}
.toast::before {
  content: "\2713"; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--up); color: #fff; font-size: 14px; font-weight: 700;
}
.toast.error { border-left-color: var(--down); color: var(--down); }
.toast.error::before { content: "!"; background: var(--down); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.doc-grid figure { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 6px; text-align: center; }
.doc-grid img { width: 100%; height: auto; }
.doc-grid figcaption { font-size: 11px; color: var(--muted); }

@media (max-width: 360px) {
  .brand-title { font-size: 26px; }
  .spot-value { font-size: 19px; }
  .rate-val { font-size: 20px; }
  .rate-name { font-size: 12px; }
}

/* ---------- Rate change highlight (Live Rates) ---------- */
.rate-val, .spot-value { display: inline-block; padding: 1px 6px; border-radius: 6px; transition: background-color .15s, color .15s; }
.bg-up { background: var(--up); color: #fff !important; }
.bg-down { background: var(--down); color: #fff !important; }

/* ---------- Metal icons ---------- */
.with-metal { display: inline-flex; align-items: center; gap: 8px; }
.metal-ico {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.metal-ico svg { width: 15px; height: 15px; }
.metal-ico.gold { background: #c9a86a; }
.metal-ico.silver { background: #9a9d9f; }
.rate-name-wrap { display: flex; align-items: center; gap: 8px; }

/* ---------- Ticker HTML content ---------- */
.ticker-track * { display: inline; margin: 0; padding: 0; font-size: inherit; line-height: inherit; }
.ticker-track br { display: none; }
.ticker-track img { height: 18px; vertical-align: middle; }

/* ---------- Fix message popup ---------- */
.modal .html-content { max-height: 60vh; overflow-y: auto; margin-bottom: 14px; }

/* ---------- Rate Alert custom target box ---------- */
.field input.target-input {
  font-size: 22px; font-weight: 700; text-align: center; color: var(--green);
  padding: 14px 12px; border: 2px solid var(--gold); border-radius: 12px; background: #fff;
}
.field input.target-input::placeholder { font-size: 15px; font-weight: 500; color: var(--muted); }
.field input.target-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(200,167,101,.3); }

/* ---------- Margin page ---------- */
.mg-hero {
  margin-top: 16px; padding: 20px 18px 18px; border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-2) 100%);
  box-shadow: 0 8px 20px rgba(30, 59, 44, .25);
  position: relative; overflow: hidden;
}
.mg-hero::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px;
  border-radius: 50%; border: 18px solid rgba(200, 167, 101, .18); pointer-events: none;
}
.mg-hero-label { font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.mg-hero-value { font-size: 32px; font-weight: 700; margin: 6px 0 4px; letter-spacing: .5px; }
.mg-hero-value.neg { color: #ffb4a8; }
.mg-hero-meta { font-size: 12px; color: rgba(255, 255, 255, .75); }
.mg-refresh {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(200, 167, 101, .6);
  background: rgba(255, 255, 255, .08); color: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 1;
}
.mg-refresh svg { width: 18px; height: 18px; }
.mg-refresh:active { background: rgba(255, 255, 255, .18); }
.mg-usage { margin-top: 16px; font-size: 12px; color: rgba(255, 255, 255, .85); }
.mg-bar { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .18); margin-top: 6px; overflow: hidden; }
.mg-bar span { display: block; height: 100%; border-radius: 6px; background: var(--gold); transition: width .6s ease; }

.mg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mg-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px;
  border: 1px solid transparent; min-height: 112px;
}
.mg-tile.tone-gold { background: var(--gold-soft); border-color: #eadcbc; }
.mg-tile.tone-sage { background: var(--sage-soft); border-color: #d0dad3; }
.mg-tile.tone-silver { background: var(--silver-soft); border-color: #d7dad7; }
.mg-ico {
  width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: var(--green);
}
.mg-tile.tone-gold .mg-ico { background: #c9a86a; }
.mg-tile.tone-sage .mg-ico { background: #4f7a5c; }
.mg-tile.tone-silver .mg-ico { background: #9a9d9f; }
.mg-ico svg { width: 18px; height: 18px; }
.mg-tile-label { font-size: 12px; font-weight: 600; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; }
.mg-tile-value { font-size: 18px; font-weight: 700; color: var(--green); overflow-wrap: anywhere; }
.mg-tile-value.neg { color: var(--down); }

/* ---------- News page ---------- */
.nw-feature {
  display: block; margin-top: 16px; padding: 20px 18px; border-radius: 18px; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-2) 100%);
  box-shadow: 0 8px 20px rgba(30, 59, 44, .25); position: relative; overflow: hidden;
}
.nw-feature::after {
  content: ""; position: absolute; right: -50px; bottom: -50px; width: 160px; height: 160px;
  border-radius: 50%; border: 20px solid rgba(200, 167, 101, .16); pointer-events: none;
}
.nw-pill {
  display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
}
.nw-pill.gold { background: var(--gold); color: var(--green); }
.nw-pill.soft { background: var(--gold-soft); color: var(--green); border: 1px solid #eadcbc; }
.nw-feature h2 { margin: 12px 0 10px; font-size: 20px; line-height: 1.35; color: #fff; font-family: "Times New Roman", Georgia, serif; font-weight: 400; }
.nw-feature .nw-meta { color: rgba(255, 255, 255, .78); }
.nw-feature .nw-read { margin-top: 14px; color: var(--gold); font-weight: 700; font-size: 14px; }

.nw-tools { margin: 16px 0 6px; display: flex; flex-direction: column; gap: 10px; }
.nw-search {
  width: 100%; padding: 12px 14px 12px 40px; border-radius: 24px; border: 1px solid var(--border); background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6f68' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px center; background-size: 18px;
}
.nw-search:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 167, 101, .25); }
.nw-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.nw-chip {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 18px; border: 1px solid var(--gold);
  background: transparent; color: var(--green); font-size: 13px; font-weight: 600;
}
.nw-chip.active { background: var(--green); border-color: var(--green); color: #fff; }

.nw-group { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; margin: 18px 0 10px; }
.nw-item {
  display: flex; gap: 14px; align-items: stretch; padding: 12px; margin-bottom: 10px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); color: inherit; text-decoration: none;
}
.nw-item:active { background: #e8e5dc; }
.nw-date {
  flex: 0 0 54px; border-radius: 10px; background: var(--gold-soft); border: 1px solid #eadcbc;
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--green);
}
.nw-date b { font-size: 20px; line-height: 1; }
.nw-date small { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; margin-top: 3px; }
.nw-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.nw-title { font-size: 15px; font-weight: 600; color: var(--green); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nw-chev { align-self: center; color: var(--gold); font-size: 22px; }

/* detail */
.nw-article-head {
  margin-top: 16px; padding: 20px 18px; border-radius: 18px 18px 0 0; color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-2) 100%);
}
.nw-article-head h1 { margin: 12px 0 8px; font-size: 22px; line-height: 1.35; font-family: "Times New Roman", Georgia, serif; font-weight: 400; }
.nw-article-head .nw-meta { color: rgba(255, 255, 255, .78); }
.nw-article-body {
  background: var(--surface-2); border: 1px solid var(--border); border-top: 3px solid var(--gold);
  border-radius: 0 0 18px 18px; padding: 18px; font-size: 15.5px; line-height: 1.7; color: var(--text);
  -webkit-user-select: text; user-select: text; overflow-wrap: anywhere;
}
.nw-article-body img { width: 100%; height: auto; border-radius: 10px; }
.nw-article-body p { margin: 0 0 14px; }
.nw-actions { display: flex; gap: 12px; margin: 16px 0; }

/* KYC save result, shown under the Save KYC button (never on top of it) */
.kyc-status {
  margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; text-align: center;
  background: #e4f3ea; color: var(--up); border: 1px solid #c6e6d2;
}
.kyc-status.error { background: #fbe9e6; color: var(--down); border-color: #f2c9c2; }

/* Live Rates table: PRODUCT | SELL (buy column removed) */
.rate-head, .rate-row { grid-template-columns: 1.4fr 1fr; }
.rate-head span:nth-child(2) { text-align: right; padding-right: 14px; }
.rate-row .rate-cell { text-align: right; }
.rate-row .rate-sub { white-space: nowrap; }

/* Trade desk: only the Sell (ASK) price is shown */
.quote.quote-single { grid-template-columns: 1fr; }
.quote.quote-single .val { font-size: 32px; }
