/* Keep live prices prominent, with the Market Desk below the first desktop view. */
.live-page .rates-wrap {
  width:100%;
  max-width:970px;
  min-width:0
}

.live-page .rates-table td>strong {
  font-size:clamp(16px,4.6vw,22px)
}

@media (min-width:801px) {
  .live-page .brandbar { min-height:92px; }
  .live-page .site-header { top:-92px; }
  .live-page .live-main {
    --live-row-min:54px;
    min-height:calc(100svh - var(--live-shell-height,175px));
    padding:12px 24px 20px
  }
  .live-page .spot-grid { gap:12px; }
  .live-page .quote-card h2 { min-height:32px; font-size:17px; }
  .live-page .quote-card h2 .metal-image { width:30px; height:27px; }
  .live-page .quote-card .rupee { font-size:23px; }
  .live-page .quote-body { padding:3px 8px 5px; }
  .live-page .quote-body>strong { font-size:32px; line-height:1.15; }
  .live-page .quote-body p { margin-top:2px; min-height:18px; font-size:12px; }
  .live-page .rates-toolbar { display:flex; gap:12px; align-items:center; margin-top:10px; }
  .live-page .rates-toolbar .search-box { flex:1; min-height:40px; margin:0; }
  .live-page .search-box input { min-height:38px; font-size:14px; }
  .live-page .scrip-actions { flex-shrink:0; margin:0; }
  .live-page .scrip-actions .btn { min-height:40px; padding:7px 13px; }
  .live-page .table-surface { margin-top:10px; padding:5px 5px 0; }
  .live-page .rates-table thead th { padding:7px 18px; font-size:17px; line-height:1.2; }
  .live-page .rates-fit .rates-table tbody th,
  .live-page .rates-fit .rates-table tbody td { height:var(--live-row-height,54px); padding:3px 18px; }
  .live-page .product-cell { gap:12px; }
  .live-page .product-cell .metal-image { width:40px; height:36px; }
  .live-page .product-cell>span { font-size:18px; line-height:1.2; }
  .live-page .product-cell small { display:block; margin:2px 0 0; font-size:11px; }
  .live-page .inline-position:not([hidden]) { display:inline-block; margin:0; }
  .live-page .rates-table td>strong { display:block; font-size:clamp(28px,2.3vw,34px); line-height:1.05; }
  .live-page .rates-fit .rate-quote { padding-block:0; white-space:nowrap; }
  .live-page .rates-table td>small { font-size:12px; line-height:1.1; }
  .live-page .table-note { margin-top:6px; font-size:11px; }
  .live-page .charges-note { margin-top:8px; padding:8px 12px; font-size:12px; }
}

/* Retain large prices when browser toolbars leave a short laptop viewport. */
@media (min-width:801px) and (max-height:700px) {
  .live-page .brandbar { min-height:72px; }
  .live-page .site-header { top:-72px; }
  .live-page .brand-emblem { width:60px; height:60px; }
  .live-page .brand-emblem img { width:252.76px; height:60px; }
  .live-page .brand-name { font-size:30px; }
  .live-page .brand-name small { margin-top:7px; }
  .live-page .main-nav,.live-page .nav-links>a,.live-page .nav-dropdown>button { min-height:44px; }
  .live-page .live-main { --live-row-min:46px; padding:4px 24px 12px; }
  .live-page .quote-card h2 { min-height:28px; font-size:15px; }
  .live-page .quote-body { padding:2px 8px 4px; }
  .live-page .quote-body>strong { font-size:28px; line-height:1.05; }
  .live-page .quote-body p { margin-top:1px; min-height:16px; font-size:11px; line-height:1.2; }
  .live-page .rates-toolbar { margin-top:8px; }
  .live-page .rates-toolbar .search-box { min-height:36px; }
  .live-page .search-box input { min-height:34px; }
  .live-page .scrip-actions .btn { min-height:36px; padding:6px 11px; font-size:12px; }
  .live-page .table-surface { margin-top:4px; }
  .live-page .rates-table thead th { padding:5px 18px; font-size:16px; line-height:1.15; }
  .live-page .rates-fit .rates-table tbody th,.live-page .rates-fit .rates-table tbody td { padding-block:2px; }
  .live-page .product-cell>span { font-size:16px; }
  .live-page .product-cell small { font-size:10px; }
  .live-page .rates-table td>strong { font-size:28px; }
  .live-page .rates-table td>small { font-size:11px; }
}

/* Match the reference column alignment for headings, prices and low/high values. */
.live-page .rates-fit .rates-table {
  --live-cell-inset:18px
}

.live-page .rates-fit .rates-table thead th,
.live-page .rates-fit .rates-table tbody th,
.live-page .rates-fit .rates-table tbody td {
  padding-inline:var(--live-cell-inset);
  vertical-align:middle
}

.live-page .rates-fit .rates-table thead th:first-child,
.live-page .rates-fit .rates-table tbody th {
  text-align:left
}

.live-page .rates-fit .rates-table thead th:not(:first-child),
.live-page .rates-fit .rates-table tbody td {
  text-align:center
}

@media (max-width:800px) {
  .live-page .rates-fit .rates-table { --live-cell-inset:12px; }
}

@media (max-width:600px) {
  .live-page .rates-fit .rates-table { --live-cell-inset:7px; }
}

/* A pill appears only on a changed quote, then returns to the standard surface. */
.live-page .quote-value {
  position:relative;
  display:inline-block;
  isolation:isolate;
  border-radius:999px;
  background:transparent
}

.live-page .quote-value[data-movement="up"] { --quote-flash:#157347; }
.live-page .quote-value[data-movement="down"] { --quote-flash:#b42318; }

.live-page .quote-value[data-movement] {
  animation:quote-ink 1400ms cubic-bezier(.16,1,.3,1)
}

.live-page .quote-value[data-movement]::before {
  content:"";
  position:absolute;
  z-index:-1;
  inset:0 -.18em;
  border-radius:inherit;
  background:var(--quote-flash);
  pointer-events:none;
  animation:quote-pill 1400ms cubic-bezier(.16,1,.3,1)
}

@keyframes quote-pill {
  0% { opacity:0; transform:scale(.96); }
  12%,65% { opacity:1; transform:scale(1); }
  100% { opacity:0; transform:scale(1); }
}

@keyframes quote-ink {
  0%,100% { color:inherit; }
  12%,65% { color:#fff; }
}

@media (prefers-reduced-motion:reduce) {
  .live-page .quote-value[data-movement] { animation:none; color:#fff; }
  .live-page .quote-value[data-movement]::before { animation:none; }
}

/* Reference news and desk notices stay below the complete live-rate table. */
.live-updates { width:100%; max-width:970px; min-width:0; margin:28px auto 0; }
.live-updates-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; }
.live-updates-heading h2 { margin:0; font-size:24px; line-height:1.2; color:var(--navy); }
.live-updates-actions { display:flex; flex-wrap:wrap; gap:8px; }
.live-updates-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
.live-update-column { min-width:0; padding:18px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.live-update-column h3 { margin:0 0 4px; color:var(--navy); font-size:18px; }
.live-news-list { margin:0; padding:0; list-style:none; }
.live-news-list>li { padding:14px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.live-news-list>li:last-child { border-bottom:0; padding-bottom:0; }
.live-news-list p { margin:0; font-size:15px; line-height:1.6; white-space:pre-line; }
.live-news-list h4 { margin:0; font-size:15px; line-height:1.55; font-weight:600; }
.live-news-list a { color:var(--blue-deep); text-underline-offset:3px; }
.live-news-list a:hover { text-decoration:underline; }
.live-news-list .live-news-meta { margin-top:6px; color:var(--muted); font-size:12px; }
.live-news-empty,.live-update-status { color:var(--muted); font-size:14px; line-height:1.5; }
.live-update-status { margin:12px 0 0; }
.live-update-status:empty { display:none; }
.market-message-dialog { width:min(560px,calc(100vw - 32px)); max-height:80svh; margin:auto; padding:0; border:1px solid var(--line); border-radius:16px; background:var(--surface); color:var(--ink); box-shadow:0 18px 60px #071c5845; }
.market-message-dialog::backdrop { background:rgba(5,18,44,.6); }
.market-message-dialog[open] { animation:market-message-in 180ms var(--ease); }
.market-message-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 20px; border-bottom:1px solid var(--line); }
.market-message-heading h2 { margin:0; color:var(--navy); font-size:22px; }
.market-message-heading form { margin:0; }
.market-message-close { display:grid; place-items:center; width:44px; height:44px; padding:0; border:0; border-radius:6px; background:var(--soft); color:var(--ink); font-size:30px; line-height:1; }
.market-message-close:hover { background:var(--line); }
.market-message-content { max-height:calc(80svh - 160px); overflow:auto; padding:20px; overflow-wrap:anywhere; }
.market-message-content p { margin:0 0 12px; font-size:16px; line-height:1.7; white-space:pre-line; }
.market-message-content p:last-child { margin-bottom:0; }
.market-message-footer { display:flex; justify-content:flex-end; margin:0; padding:0 20px 20px; }
body:has(#market-message-dialog[open]) { overflow:hidden; }
@keyframes market-message-in { from { opacity:.6; transform:scale(.98); } to { opacity:1; transform:scale(1); } }
@media (max-width:640px) {
  .live-updates { margin-top:22px; }
  .live-updates-heading { align-items:flex-start; flex-wrap:wrap; }
  .live-updates-heading h2 { font-size:22px; }
  .live-updates-grid { grid-template-columns:minmax(0,1fr); gap:12px; }
  .live-update-column { padding:16px; }
}
@media (prefers-reduced-motion:reduce) { .market-message-dialog[open] { animation:none; } }
@media print { .live-updates-actions,.market-message-dialog { display:none; } }

.live-app-nav,.live-app-pager,.scrip-actions .live-action-icon { display:none; }
.live-app-menu { width:min(520px,calc(100vw - 24px)); max-height:90svh; margin:auto; padding:0; overflow:auto; border:1px solid var(--line); border-radius:16px; color:var(--ink); background:var(--surface); box-shadow:0 18px 60px #071c5845; }
.live-app-menu::backdrop { background:rgba(5,18,44,.6); }
.live-app-menu-links { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; padding:12px; }
.live-page .live-app-menu-links a { display:flex; min-height:44px; padding:8px; border-radius:6px; color:var(--ink); font-size:13px; line-height:1.3; }
.live-app-menu-links a:hover { background:var(--soft); }
.live-app-menu .charges-note { margin:0 12px 12px; padding:10px; font-size:12px; }
body:has(#live-app-menu[open]) { overflow:hidden; }

/* Rates fit the first screen; the full website footer follows in normal page flow. */
@media screen and (max-width:1180px), screen and (hover:none) and (pointer:coarse) and (max-width:1400px) {
  html:has(>body.live-page) { scroll-padding-bottom:calc(56px + env(safe-area-inset-bottom)); }
  body.live-page { display:block; height:auto; min-height:100svh; min-height:100dvh; padding-bottom:var(--live-app-nav-height,56px); overflow-x:hidden; overflow-y:auto; }
  .live-page>.topline,.live-page>.ticker-bar,.live-page>.contact-ribbon,.live-page>.back-top,.live-page>.scroll-progress { display:none; }
  .live-page .site-header { position:relative; top:0; padding-top:env(safe-area-inset-top); border-bottom:1px solid var(--line); }
  .live-page .site-header .brandbar { width:100%; max-width:970px; min-height:58px; padding:6px max(12px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left)); gap:8px; }
  .live-page .site-header .brandbar::after { content:none; }
  .live-page .site-header .brand { gap:8px; }
  .live-page .site-header .brand-emblem { width:44px; height:44px; }
  .live-page .site-header .brand-emblem img { width:185.36px; height:44px; }
  .live-page .site-header .brand-name { padding-left:10px; font-size:clamp(22px,6vw,30px); line-height:1; }
  .live-page .site-header .brand-name small { margin-top:5px; font-size:7px; letter-spacing:.2em; gap:5px; }
  .live-page .site-header .brand-name small span { width:16px; }
  .live-page .brandbar-right { gap:0; }
  .live-page .brandbar-right .header-contact,.live-page .brandbar-right .login-link,.live-page .nav-shell { display:none; }
  .live-page .theme-toggle { width:44px; height:44px; }
  .live-page .live-main { min-height:0; height:calc(100svh - var(--live-app-shell-height,114px)); height:calc(100dvh - var(--live-app-shell-height,114px)); padding:2px max(8px,env(safe-area-inset-right)) 6px max(8px,env(safe-area-inset-left)); overflow:hidden; }
  .live-page .rates-wrap { display:flex; flex-direction:column; height:100%; min-height:0; gap:5px; }
  .live-page .spot-grid { flex:none; gap:6px; }
  .live-page .quote-card { border-radius:10px; }
  .live-page .quote-card h2 { min-height:24px; padding:2px 3px; gap:3px; font-size:clamp(10px,1.9vw,16px); line-height:1.15; }
  .live-page .quote-card h2 .metal-image { width:20px; height:18px; }
  .live-page .quote-card .rupee { font-size:18px; }
  .live-page .quote-body { padding:2px 3px 4px; }
  .live-page .quote-body>strong { font-size:clamp(22px,3.5vw,32px); line-height:1.15; }
  .live-page .quote-body p { min-height:12px; margin:2px 0 0; padding:1px 2px; gap:clamp(3px,.7vw,8px); font-size:clamp(7.5px,1.6vw,11px); line-height:1.2; }
  .live-page .quote-body i { height:9px; }
  .live-page .rates-toolbar { display:flex; align-items:center; flex:none; gap:6px; margin:0; }
  .live-page .rates-toolbar .search-box { flex:1; min-width:0; min-height:44px; margin:0; padding-inline:8px; border-radius:8px; }
  .live-page .search-box input { width:100%; min-width:0; min-height:42px; font-size:16px; }
  .live-page .search-box>.icon { width:18px; height:18px; }
  .live-page .scrip-actions { display:flex; flex:none; gap:4px; width:auto; margin:0; }
  .live-page .scrip-actions .btn { display:grid; place-items:center; width:44px; height:44px; min-height:44px; padding:0; border-radius:8px; }
  .live-page .scrip-actions .live-action-icon { display:block; width:19px; height:19px; }
  .live-page .scrip-actions .live-action-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  .live-page .table-surface { display:flex; flex-direction:column; flex:1; min-height:0; margin:0; padding:4px 4px 0; border-radius:10px; }
  .live-page .rates-fit { flex:1; height:100%; min-height:0; }
  .live-page .rates-fit .rates-table { height:100%; --live-cell-inset:clamp(3px,1vw,10px); }
  .live-page .rates-fit .product-col { width:44%; }
  .live-page .rates-fit .price-col { width:28%; }
  .live-page .rates-table thead th { height:30px; padding-block:2px; font-size:clamp(16px,2.6vw,20px); font-weight:700; line-height:1.1; }
  .live-page .rates-fit .rates-table tbody th,.live-page .rates-fit .rates-table tbody td { height:var(--live-row-height,44px); padding-block:1px; }
  .live-page .rates-table tbody tr[data-live-page-hidden] { display:none; }
  .live-page .rates-wrap[data-no-visible-rates] .rates-table { height:auto; }
  .live-page .product-cell { gap:5px; }
  .live-page .product-cell .metal-image { width:clamp(22px,3.8vw,34px); height:clamp(22px,3.8vw,34px); }
  .live-page .product-cell .rupee { width:22px; flex:none; font-size:22px; text-align:center; }
  .live-page .product-cell>span { font-size:var(--app-name-size,13px); line-height:1.15; }
  .live-page .product-cell small { display:block; margin:2px 0 0; font-size:clamp(9px,1.2vw,11px); line-height:1.1; }
  .live-page .rates-table td>strong { display:block; font-size:var(--app-price-size,24px); line-height:1.1; }
  .live-page .rates-fit .rate-quote { padding-block:0; white-space:nowrap; overflow-wrap:normal; }
  .live-page .rates-table td>small { margin:1px 0 0; font-size:clamp(9px,1.4vw,12px); line-height:1.1; }
  .live-page .inline-position:not([hidden]) { display:inline-block; margin:0; font-size:9px; line-height:1.1; }
  .live-page .table-note { flex:none; min-height:14px; margin:0 2px; gap:6px; align-items:center; font-size:9px; line-height:1.2; }
  .live-page #quote-notice { text-align:right; }
  .live-page .empty-search { padding:12px 4px; font-size:13px; }
  .live-page .live-app-pager:not([hidden]) { display:flex; flex:none; align-items:center; justify-content:space-between; gap:6px; height:44px; }
  .live-page .live-app-pager button { min-height:44px; padding:5px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--blue-deep); font-size:12px; }
  .live-page .live-app-pager button:disabled { opacity:.45; }
  .live-page #rates-page-status { color:var(--muted); font-size:12px; }
  .live-page .live-updates { display:none; height:100%; margin:0 auto; padding:10px 0; overflow:auto; overscroll-behavior:contain; }
  .live-page[data-live-view="news"] .rates-wrap { display:none; }
  .live-page[data-live-view="news"] .live-updates { display:block; }
  .live-page .live-app-nav { position:fixed; inset:auto 0 0; z-index:60; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:2px; min-height:56px; padding:2px max(4px,env(safe-area-inset-right)) max(2px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left)); border-top:1px solid var(--line); background:var(--surface); }
  .live-page .live-app-nav>button,.live-page .live-app-nav>a { display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:0; min-height:50px; padding:4px 2px; border:0; border-radius:8px; background:transparent; color:var(--muted); font:inherit; font-size:10px; font-weight:600; line-height:1.2; gap:3px; text-decoration:none; }
  .live-page .live-app-nav>button[aria-pressed="true"] { color:var(--blue-deep); background:var(--soft); }
  .live-page .live-app-nav>button:hover,.live-page .live-app-nav>a:hover { color:var(--blue-deep); background:var(--soft); }
  .live-page .live-app-nav .icon { width:20px; height:20px; min-width:20px; animation:none; }
}

/* Give mobile prices more space while retaining all three table columns. */
@media screen and (max-width:600px) {
  .live-page:not([data-live-view="news"]) .live-main { height:auto; }
  .live-page .rates-wrap { height:auto; }
  .live-page .table-surface { flex:none; padding:2px 2px 0; }
  .live-page .rates-fit { flex:none; height:auto; }
  .live-page .rates-fit .rates-table { height:auto; --live-cell-inset:3px; }
  .live-page .rates-table thead th { font-size:clamp(16px,4.6vw,20px); }
  .live-page .product-cell { gap:4px; }
  .live-page .rates-fit .product-col { width:40%; }
  .live-page .rates-fit .price-col { width:30%; }
  .live-page .rates-table td>small { font-size:11px; line-height:1.2; }
}

@media screen and (max-height:500px) and (min-width:600px) and (max-width:1180px) {
  .live-page .rates-wrap { display:grid; grid-template-columns:minmax(0,1fr) 260px; grid-template-rows:auto minmax(0,1fr) auto auto; }
  .live-page .spot-grid { grid-column:1; grid-row:1; }
  .live-page .rates-toolbar { grid-column:2; grid-row:1; }
  .live-page .table-surface { grid-column:1/-1; grid-row:2; height:100%; }
  .live-page .live-app-pager { grid-column:1/-1; grid-row:3; }
  .live-page .table-note { grid-column:1/-1; grid-row:4; }
}

/* Original UKS marquee2 announcements use an upward ticker with reading controls. */
.news-events-panel { margin-bottom:0; }
.news-events-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; margin-bottom:4px; }
.news-events-heading h3 { margin:0; }
.news-events-pause { min-height:44px; min-width:68px; padding:7px 12px; border:1px solid var(--line); border-radius:8px; background:var(--soft); color:var(--blue-deep); font:inherit; font-size:13px; }
.news-events-pause:hover { background:var(--line); }
.news-events-viewport { height:250px; padding-inline:2px 8px; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scroll-behavior:auto; scrollbar-width:thin; }
.news-events-viewport[data-marquee] { overflow-y:hidden; }
.news-events-viewport .live-news-list { text-align:center; font-weight:600; }
.news-events-viewport .live-news-list>li { padding:12px 4px; }
.news-events-viewport:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
@media print { .news-events-pause { display:none; } .news-events-viewport { height:auto; overflow:visible; } .news-events-viewport .live-news-list { transform:none!important; } }

/* App store links in the site header (desktop). The compact app layout hides them. */
.header-stores { display:flex; align-items:center; gap:8px; }
/* Fixed colours: --navy and --blue-deep turn light in dark mode, which hid the white text and icons. */
.header-store { display:inline-flex; align-items:center; gap:8px; padding:6px 12px; border:1px solid #0b2a4f; border-radius:8px; background:#0b2a4f; color:#fff; white-space:nowrap; }
.header-store:hover,.header-store:focus-visible { background:#0a5aa8; border-color:#0a5aa8; color:#fff; }
html[data-theme=dark] .header-store { background:#05101e; border-color:#6f8cad; color:#fff; }
html[data-theme=dark] .header-store:hover,html[data-theme=dark] .header-store:focus-visible { background:#123a63; border-color:#a5d9ff; color:#fff; }
.header-store strong { color:inherit; }
.header-store>.link-icon { width:22px; height:22px; flex:none; }
.header-store span { font-size:8px; line-height:1.3; letter-spacing:.07em; }
.header-store strong { display:block; font-size:14px; letter-spacing:0; }
@media screen and (max-width:1180px), screen and (hover:none) and (pointer:coarse) and (max-width:1400px) {
  .live-page .header-stores { display:none; }
}
@media print { .header-stores { display:none; } }
