/* One viewport-based terminal layout; rates never inherit fixed pixel board heights. */
[hidden]{display:none!important}
html{width:100%;height:100%;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{width:100%;height:100dvh;min-height:0!important;padding-bottom:0!important;display:flex;flex-direction:column;overflow:hidden}
.topbar,.ticker,.quick-nav{flex:0 0 auto}
main{flex:1 1 auto!important;min-height:0!important;height:auto!important;width:100%;max-width:100%;padding:0 max(6px,env(safe-area-inset-right)) 0 max(6px,env(safe-area-inset-left));overflow:hidden}
.page{min-width:0;max-width:100%}
#home.page.active{display:grid!important;grid-template-rows:max-content minmax(0,1fr) max-content;min-height:0;overflow:hidden!important}
#home .terminal-head{height:auto!important;min-height:22px;max-height:none;padding:2px 0}
#home .updated{position:static!important;height:auto!important;margin:2px 0 4px;font-size:8px;line-height:1.2}
#home .landscape-brand{display:none!important}
#home .market-sections{height:auto!important;min-height:0!important;min-width:0;transform:none!important;align-content:stretch;gap:5px!important}
#home .market-block{min-width:0;min-height:0;display:grid!important;grid-template-rows:max-content max-content minmax(0,1fr)!important;align-content:stretch!important;gap:2px!important}
#home .usd-market{grid-template-rows:max-content minmax(0,1fr)!important}
#home .market-title{height:auto!important;min-height:16px;padding:1px 2px}
#home .market-title h2{font-size:clamp(10px,2.8vw,15px)!important;line-height:1.1}
#home .market-head{height:auto!important;min-height:16px;padding:3px 6px!important;line-height:1.1;font-size:8px!important}
#home .market-head,#home .rate-card:not(.spot-card){grid-template-columns:minmax(0,1.55fr) minmax(0,1fr) minmax(0,1fr)!important;column-gap:6px!important}
#home .market-head span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#home .market-block .rates{height:100%!important;min-height:0!important;min-width:0;align-self:stretch!important;display:grid!important;gap:0!important}
#home .physical-market .rates{grid-template-rows:repeat(var(--physical-count,6),minmax(0,1fr))!important;grid-auto-rows:auto!important}
#home .mcx-market .rates{grid-template-rows:repeat(2,minmax(0,1fr))!important;grid-auto-rows:auto!important}
#home .market-block .rate-card{height:100%!important;min-height:0!important;min-width:0;padding:2px 6px!important;overflow:hidden}
#home .product{min-width:0}
#home .product b{font-size:clamp(10px,2.8vw,14px)!important;line-height:1.1;white-space:normal;overflow-wrap:anywhere}
#home .product small{display:flex!important;gap:4px!important;flex-wrap:wrap;white-space:normal!important;margin-top:2px!important;font-size:clamp(7px,2vw,10px)!important;line-height:1.05!important}
#home .physical-market .high-mark,#home .physical-market .low-mark,#home .mcx-market .high-mark,#home .mcx-market .low-mark{font-size:inherit!important;line-height:inherit!important}
#home .price{min-width:0;padding:1px!important;transform:none!important}
#home .price b{min-width:0!important;max-width:100%;padding:1px!important;font-size:clamp(12px,3.6vw,19px)!important;line-height:1.1;white-space:nowrap}
#home .usd-market .rates{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important}
#home .usd-market .spot-card{grid-template-rows:auto minmax(0,1fr) auto!important;gap:3px!important;padding:4px!important;align-content:center!important}
#home .spot-name{font-size:clamp(9px,2.7vw,13px)!important;letter-spacing:0;white-space:nowrap}
#home .spot-range{display:flex!important;flex-wrap:wrap;align-items:center;justify-content:center;gap:3px!important;white-space:normal!important;font-size:clamp(7px,1.9vw,9px)!important;line-height:1.05}
#home .spot-range .high-mark,#home .spot-range .low-mark{font-size:inherit!important;line-height:inherit!important;white-space:nowrap}
#home .usd-market .price.mid b{font-size:clamp(12px,3.6vw,18px)!important}
#home .mcx-brand{display:none!important}
@media(orientation:portrait){
  .topbar{height:58px!important;width:100%;padding:0 8px!important}
  .ticker{height:20px!important;font-size:10px}
  .quick-nav{height:36px!important}
  #home .market-sections{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(75px,1fr) minmax(0,3.8fr) minmax(0,1.6fr)!important}
  #home .usd-market,#home .physical-market,#home .mcx-market{grid-column:1!important;grid-row:auto!important}
  #home .market-sections.single-physical{align-self:start;grid-template-rows:90px max-content minmax(100px,150px)!important;align-content:start!important}
}
@media(orientation:landscape){
  #home.page.active{grid-template-columns:clamp(100px,15vw,260px) minmax(0,1fr);column-gap:6px}
  #home .terminal-head{grid-column:1/-1;grid-row:1}
  #home .market-sections{grid-column:2;grid-row:2}
  #home .updated{grid-column:1/-1;grid-row:3}
  #home .landscape-brand{display:flex!important;position:static!important;grid-column:1;grid-row:2;min-width:0;min-height:0;height:auto!important;flex-direction:column;justify-content:center;align-items:center;gap:clamp(6px,2dvh,22px);padding:8px 5px;border:1px solid #c7a354;border-radius:12px;background:linear-gradient(155deg,#071b14,#153d2d);color:#f5dc9b;overflow:hidden;text-align:center}
  #home .landscape-brand img{width:100%!important;max-width:210px;height:clamp(52px,24dvh,180px)!important;object-fit:contain;filter:none;opacity:1}
  #home .landscape-brand h1{margin:0;font-family:Georgia,serif;font-size:clamp(14px,2vw,34px);line-height:1.12;letter-spacing:1px;color:#f5dc9b}
  #home .brand-city{margin:7px 0 0;font-size:clamp(9px,1vw,17px);font-weight:650;letter-spacing:3px;color:#fff4d8}
  #home .brand-contact{display:flex;flex-direction:column;gap:5px;width:100%}
  #home .brand-contact span{font-size:clamp(7px,.7vw,12px);letter-spacing:1px;color:#ceb77b}
  #home .brand-contact a{color:#fff6db;text-decoration:none;font-size:clamp(12px,1.4vw,25px);font-weight:750;white-space:nowrap;font-variant-numeric:tabular-nums}
  #home .brand-contact small{font-size:clamp(7px,.7vw,12px);letter-spacing:1px;color:#ceb77b}
  #home .market-head,#home .rate-card:not(.spot-card){grid-template-columns:minmax(0,1.25fr) minmax(0,.9fr) minmax(0,.9fr)!important;column-gap:3px!important}
  .topbar,.quick-nav,.float-action,.call-card,.bottom-nav{display:none!important}
  .ticker{display:flex!important;height:20px!important;font-size:10px;min-height:20px}
  #home .terminal-head{min-height:20px;padding:1px 0}
  #home .clock span{font-size:12px!important}
  #home .clock small{font-size:9px!important}
  #home .market-sections{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)!important;grid-template-rows:minmax(65px,1fr) minmax(0,1.8fr)!important;column-gap:4px!important}
  #home .physical-market{grid-column:1!important;grid-row:1/3!important}
  #home .usd-market{grid-column:2!important;grid-row:1!important}
  #home .mcx-market{grid-column:2!important;grid-row:2!important}
  #home .market-title h2{font-size:clamp(10px,3dvh,15px)!important}
  #home .product b{font-size:clamp(9px,3dvh,15px)!important}
  #home .product small{font-size:clamp(7px,2dvh,10px)!important}
  #home .price b{font-size:clamp(12px,4dvh,21px)!important}
  #home .spot-name{font-size:clamp(9px,3dvh,13px)!important}
  #home .spot-range{font-size:clamp(7px,2dvh,9px)!important}
  #home .usd-market .price.mid b{font-size:clamp(12px,4dvh,20px)!important}
  #home .market-sections.single-physical{align-self:start;grid-template-rows:clamp(70px,23dvh,110px) max-content!important;align-content:start!important}
  #home .single-physical .usd-market{grid-column:1/-1!important;grid-row:1!important}
  #home .single-physical .physical-market{grid-column:1!important;grid-row:2!important}
  #home .single-physical .mcx-market{grid-column:2!important;grid-row:2!important;min-height:110px}
}
@media(orientation:landscape) and (min-width:1400px){
  #home .market-title h2{font-size:clamp(18px,1.4vw,28px)!important}
  #home .market-head{font-size:clamp(11px,.85vw,17px)!important;min-height:24px}
  #home .product b,#home .spot-name{font-size:clamp(18px,1.5vw,30px)!important}
  #home .product small,#home .spot-range{font-size:clamp(12px,1vw,20px)!important}
  #home .price b,#home .usd-market .price.mid b{font-size:clamp(24px,2.1vw,44px)!important}
  .ticker{height:30px!important;font-size:16px!important}
  #home .clock span{font-size:18px!important}
  #home .clock small{font-size:13px!important}
}
#home .single-physical .physical-market{height:auto!important;align-self:start!important;grid-template-rows:max-content max-content auto!important}
#home .single-physical .physical-market .rates{height:auto!important;grid-template-rows:auto!important;grid-auto-rows:auto!important}
#home .single-physical .physical-market .rate-card{height:auto!important;min-height:48px!important;padding:6px!important}

/* Compact, readable quotes; movement is an immediate colour cue, never a tween. */
#home .updated{text-align:right!important;justify-self:end;left:auto!important;right:0!important}
#home .usd-market .market-title h2{font-size:clamp(10px,2.6vw,13px)!important}
#home .market-sections{row-gap:3px!important}
#home .product>div{min-width:0;width:100%;line-height:1.1}
#home .product b{display:block}
#home .market-head,#home .rate-card:not(.spot-card){grid-template-columns:minmax(0,1.9fr) minmax(0,.825fr) minmax(0,.825fr)!important;column-gap:3px!important}
#home .product b{font-size:clamp(12px,3.6vw,18px)!important;letter-spacing:0}
#home .product small{font-size:clamp(9px,2.7vw,13px)!important;gap:4px!important}
#home .physical-market .high-mark,#home .physical-market .low-mark,#home .mcx-market .high-mark,#home .mcx-market .low-mark{font-weight:750!important;color:#071b12!important;-webkit-text-fill-color:#071b12!important}
#home .price b{font-size:clamp(16px,4.8vw,25px)!important;border-radius:4px!important;padding:2px 4px!important;line-height:1.05}
#home .spot-name{font-size:clamp(12px,3.5vw,18px)!important;font-weight:700!important}
#home .spot-range{font-size:clamp(9px,2.7vw,13px)!important}
#home .usd-market .price.mid b{font-size:clamp(16px,4.8vw,25px)!important}
#home .rate-card{border-radius:5px!important;transition:none!important;animation:none!important}
#home .rate-card:hover{transform:none!important}
#home .price,#home .price b,#home .high-mark,#home .low-mark{transition:none!important;animation:none!important}
#home .high-mark,#home .low-mark{border-radius:3px!important;padding:1px 2px!important}
#home .price-flash-up b,#home .high-mark.high-flash{background:#075b37!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
#home .price-flash-down b,#home .low-mark.low-flash{background:#942e2e!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
@media(orientation:portrait){
  main{padding-bottom:50px!important}
  #home .market-sections{grid-template-rows:minmax(85px,1fr) minmax(0,3.7fr) minmax(95px,1.5fr)!important}
  #home .market-sections.single-physical{grid-template-rows:90px max-content minmax(100px,145px)!important}
}
@media(orientation:landscape){
  #home .product b{font-size:clamp(11px,3.8dvh,20px)!important}
  #home .market-head,#home .rate-card:not(.spot-card){grid-template-columns:minmax(0,1.6fr) minmax(0,.8fr) minmax(0,.8fr)!important}
  #home .product small{font-size:clamp(9px,2.8dvh,14px)!important}
  #home .price b,#home .usd-market .price.mid b{font-size:clamp(16px,5.1dvh,27px)!important}
  #home .spot-name{font-size:clamp(11px,3.8dvh,18px)!important}
  #home .spot-range{font-size:clamp(9px,2.8dvh,13px)!important}
}
@media(orientation:landscape) and (min-width:1400px){
  #home .usd-market .market-title h2{font-size:clamp(16px,1.2vw,24px)!important}
  #home .product b,#home .spot-name{font-size:clamp(23px,1.9vw,38px)!important}
  #home .product small,#home .spot-range{font-size:clamp(16px,1.3vw,26px)!important}
  #home .price b,#home .usd-market .price.mid b{font-size:clamp(30px,2.6vw,52px)!important}
}

/* Keep the clock in the market heading instead of reserving an empty top row. */
#home.page.active{position:relative;grid-template-rows:minmax(0,1fr) max-content}
#home .terminal-head{position:absolute!important;top:0!important;right:0!important;width:auto!important;min-height:0!important;height:16px!important;padding:0!important;z-index:1;pointer-events:none}
#home .clock{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center;gap:5px;line-height:1;width:max-content!important;max-width:none!important}
#home .clock{float:none!important;grid-auto-flow:column!important}
#home .clock>*{float:none!important;position:static!important}
#home .clock span{font-size:11px!important;letter-spacing:0!important;white-space:nowrap;flex:none}
#home .clock small{font-size:8px!important;white-space:nowrap;max-width:none!important;flex:none;display:block!important;margin:0!important}
#home .market-sections{margin-top:0!important;row-gap:0!important}
@media(orientation:portrait){
  .topbar{height:76px!important;padding:0 8px!important}
  .topbar .brand{min-width:0;flex:1;gap:8px;align-items:center}
  .topbar .brand img{width:140px!important;max-width:32vw!important;height:72px!important;object-fit:contain}
  .topbar .brand span{white-space:normal!important;overflow:visible;min-width:0}
  .topbar .brand b{font-size:clamp(12px,3.4vw,18px)!important;line-height:1.1;letter-spacing:.5px}
  .topbar .brand b em{font-style:normal;color:#f5db9a}
  .topbar .brand small{font-size:8px;line-height:1.25;letter-spacing:.7px;margin-top:4px;color:#dbc795}
  .topbar .menu-btn{flex:0 0 32px;margin-left:6px}
}
@media(orientation:landscape){
  #home .market-sections{grid-row:1}
  #home .updated{grid-row:2}
  #home .landscape-brand{grid-row:1;gap:clamp(4px,1.4dvh,16px)}
  #home .landscape-brand img{height:clamp(44px,20dvh,170px)!important}
  #home .brand-tounch{display:block;margin-top:5px;color:#f5dc9b!important;font-size:.65em;letter-spacing:.3px}
  #home .brand-contact span{line-height:1.3}
  #home .brand-contact small{line-height:1.35;font-size:clamp(7px,.7vw,12px);letter-spacing:.2px}
}
@media(orientation:landscape) and (min-width:1400px){
  #home .terminal-head{height:25px!important}
  #home .clock span{font-size:17px!important}
  #home .clock small{font-size:12px!important}
}
.security-lock .ticker,.security-lock .float-action,.security-lock #menuBtn{display:none!important}
.security-lock .quick-nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));height:36px!important;flex:0 0 auto}
.security-lock main{overflow:auto!important;padding-bottom:8px!important}
.security-lock .compact-login{margin:10px auto!important;padding:18px;max-width:420px}
.security-lock #home{display:none!important}
/* Reserve a real gutter between dealer BUY and SELL on phones and TV boards. */
#home .market-head,#home .rate-card:not(.spot-card){grid-template-columns:minmax(0,1.35fr) minmax(0,1fr) minmax(0,1fr)!important;column-gap:clamp(8px,1.1vw,22px)!important}
#home .rate-card:not(.spot-card) .price{min-width:0!important;padding:2px 1px!important}
#home .rate-card:not(.spot-card) .price b{display:inline-block;white-space:nowrap;padding:2px 3px!important}
#home .physical-market .price:focus-visible{outline:2px solid #b99649;outline-offset:-2px;border-radius:4px}
