:root {
  --ink: #0f172a;
  --muted: #64748b;
  --paper: #f8fafc;
  --card: #ffffff;
  --navy: #0f3d63;
  --aqua: #0d9488;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --green: #10b981;
  --green-bg: #ecfdf5;
  --red: #ef4444;
  --red-bg: #fef2f2;
  --gold: #d97706;
  --gold-bg: #fffbeb;
  --silver: #64748b;
  --radius: 16px;
  --shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Financial Marquee Ticker Tape */
.ticker-tape {
  width: 100%;
  overflow: hidden;
  background: #0b1524;
  color: #e2e8f0;
  font-size: 0.76rem;
  padding: 8px 0;
  border-bottom: 1px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 50;
}

.ticker-inner {
  display: flex;
  gap: 28px;
  white-space: nowrap;
  animation: tickerSlide 35s linear infinite;
  width: max-content;
}

.ticker-inner:hover {
  animation-play-state: paused;
}

@keyframes tickerSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ticker-symbol {
  color: #94a3b8;
  font-weight: 700;
}

.ticker-price {
  font-weight: 600;
  color: #f8fafc;
}

.ticker-up {
  color: #34d399;
  font-weight: 600;
}

.ticker-down {
  color: #f87171;
  font-weight: 600;
}

main {
  width: min(1200px, calc(100% - 32px));
  margin: auto;
  padding: 40px 0 100px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: end;
  margin: 30px 0 45px;
}

.hero-badges {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.badge-market {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--green-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-market.closed {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.live-warning {
  padding: 5px 12px;
  border-radius: 99px;
  color: #92400e;
  background: #fef3c7;
  font-size: 0.72rem;
  font-weight: 750;
  border: 1px solid #fde68a;
}

.hero h1 {
  margin: 0;
  font: 600 clamp(2.4rem, 5vw, 4.2rem) / 1.05 Georgia, serif;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.hero h1 em {
  color: var(--navy);
  font-style: italic;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--navy);
  color: #ffffff;
  border: none;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(15, 61, 99, 0.2);
}

.btn-refresh:hover {
  background: #154c78;
  transform: translateY(-1px);
}

.btn-refresh:active .refresh-icon {
  transform: rotate(360deg);
}

.refresh-icon {
  display: inline-block;
  transition: transform 0.4s ease;
  font-size: 1.1rem;
  line-height: 1;
}

.sync-time {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Zone Navigation Bar */
.zone-navigator {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.zone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.zone-info {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.zone-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.zone-pill {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.zone-pill:hover {
  background: #f1f5f9;
  border-color: var(--line-strong);
}

.zone-pill.active {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

/* Main Watch Shell (Commodity & Fuel Board) */
.watch-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}

.watch-shell > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}

.watch-shell h2 {
  margin: 0;
  font: 600 1.6rem Georgia, serif;
}

.verified-tag {
  padding: 6px 14px;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
  border: 1px solid var(--line);
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #ffffff;
  font-weight: 650;
  font-size: 0.9rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.tabs button:hover {
  background: #f1f5f9;
}

.tabs button:active {
  transform: scale(0.97);
}

.tabs button[aria-selected="true"] {
  color: #ffffff;
  background: var(--navy);
  border-color: var(--navy);
}

.city-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.city-selector label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.city-selector select {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem; /* 16px to prevent iOS Safari auto-zoom */
  min-width: 160px;
  cursor: pointer;
  touch-action: manipulation;
}

/* Active Quote Grid */
.quote {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
}

.quote > div {
  padding: 24px 26px;
  border-bottom: 1px solid var(--line);
}

.quote > div + div {
  border-left: 1px solid var(--line);
}

.quote span,
.quote small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
}

.quote strong {
  display: block;
  margin: 6px 0;
  font: 600 2.2rem Georgia, serif;
  color: var(--ink);
}

/* Trend Chart */
.chart-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 26px;
  padding: 24px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.chart-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chart-card h3 {
  margin: 0;
  font: 600 1.45rem Georgia, serif;
  color: var(--ink);
}

.chart-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.chart-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0;
}

.chart-stats-grid dt {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2px;
}

.chart-stats-grid dd {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
  font-feature-settings: 'tnum';
}

.chart-stats-grid dd[data-tone="up"],
.chart-stats-grid dd.stat-up {
  color: #059669;
}

.chart-stats-grid dd[data-tone="down"],
.chart-stats-grid dd.stat-down {
  color: #dc2626;
}

.chart-svg-wrap {
  position: relative;
  width: 100%;
  border-radius: 10px;
  background: #fcfdfd;
  border: 1px solid #f1f5f9;
  outline: none;
  transition: border-color .15s;
}

.chart-svg-wrap:focus-visible {
  border-color: var(--aqua);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
}

.chart-card svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 230px;
  max-height: 310px;
  overflow: visible;
  font-family: system-ui, -apple-system, sans-serif;
}

.chart-card polyline {
  fill: none;
  stroke: var(--aqua);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* SVG Detail Styling */
.rw-grid line {
  stroke: #e2e8f0;
  stroke-dasharray: 3 4;
  stroke-width: 1;
}

.rw-axis {
  font-size: 11px;
  fill: #64748b;
  font-family: system-ui, -apple-system, sans-serif;
  font-feature-settings: 'tnum';
}

.rw-axis-y {
  text-anchor: end;
  dominant-baseline: middle;
}

.rw-tick {
  stroke: #cbd5e1;
  stroke-width: 1;
}

.rw-baseline {
  stroke: #cbd5e1;
  stroke-width: 1;
}

.rw-open-line {
  stroke: #94a3b8;
  stroke-dasharray: 4 4;
  stroke-width: 1.2;
}

.rw-ref-label {
  font-size: 10px;
  fill: #94a3b8;
  font-weight: 600;
}

.rw-area {
  pointer-events: none;
}

.rw-line {
  fill: none;
  stroke-width: 2.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.rw-dots circle {
  fill: #ffffff;
  stroke-width: 2;
}

.rw-marker circle {
  stroke: #ffffff;
  stroke-width: 2;
}

.rw-marker-high circle {
  fill: #059669;
}

.rw-marker-low circle {
  fill: #dc2626;
}

.rw-marker text {
  font-size: 11px;
  font-weight: 750;
  font-feature-settings: 'tnum';
}

.rw-marker-high text {
  fill: #059669;
}

.rw-marker-low text {
  fill: #dc2626;
}

.rw-last-tag {
  font-size: 11px;
  font-weight: 800;
  fill: #ffffff;
  text-anchor: middle;
  dominant-baseline: middle;
  font-feature-settings: 'tnum';
}

.rw-pulse {
  opacity: 0.25;
  animation: rwPulse 2s infinite ease-out;
}

@keyframes rwPulse {
  0% { transform: scale(1); opacity: 0.35; }
  50% { transform: scale(1.4); opacity: 0.1; }
  100% { transform: scale(1); opacity: 0.35; }
}

.rw-cross line {
  stroke: #0f172a;
  stroke-dasharray: 3 3;
  stroke-width: 1;
  opacity: 0.55;
}

.rw-cross circle {
  stroke: #ffffff;
  stroke-width: 2;
}

.rw-overlay {
  fill: transparent;
  cursor: crosshair;
}

/* Tooltip */
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.rw-tip-date {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
}

.rw-tip-change {
  font-size: 0.72rem;
  font-weight: 700;
}

.rw-tip-change.up {
  color: #34d399;
}

.rw-tip-change.down {
  color: #f87171;
}

/* Legend */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 4px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lg-line {
  width: 16px;
  height: 3px;
  background: var(--aqua);
  border-radius: 2px;
}

.lg-open {
  width: 16px;
  height: 2px;
  border-top: 2px dashed #94a3b8;
}

.lg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #fff;
}

.lg-high {
  background: #059669;
}

.lg-low {
  background: #dc2626;
}

.lg-hint {
  margin-left: auto;
  font-style: italic;
  color: #94a3b8;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.chart-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.unavailable {
  margin: 24px 26px;
  padding: 30px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}

.unavailable strong {
  color: var(--red);
}

.unavailable p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

#rate-panel > footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  background: #fafafa;
}

/* Cross-Tool Navigation Banner to Tool 13 */
.market-split-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius);
  padding: 22px 28px;
  margin: 40px 0;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
  flex-wrap: wrap;
}

.split-card-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.split-card-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #047857;
}

.btn-split-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 10px;
  background: #047857;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(4, 120, 87, 0.25);
}

.btn-split-nav:hover {
  background: #065f46;
  transform: translateX(2px);
  color: #ffffff;
}

/* Section Header Styles */
.section-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-top h2 {
  margin: 0;
  font: 600 clamp(1.6rem, 3vw, 2.2rem) Georgia, serif;
}

.market-clock-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
}

/* Indices Grid */
.indices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.index-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.index-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -6px rgba(15, 23, 42, 0.08);
}

.index-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.index-name {
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--ink);
}

.index-tag {
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--muted);
  font-weight: 600;
}

.index-price {
  font: 700 1.6rem Georgia, serif;
  margin: 0 0 6px;
  color: var(--ink);
}

.index-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.index-change.up {
  color: #065f46;
  background: var(--green-bg);
}

.index-change.down {
  color: #991b1b;
  background: var(--red-bg);
}

.range-wrap {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.range-bar {
  height: 4px;
  border-radius: 2px;
  background: #e2e8f0;
  overflow: hidden;
  position: relative;
}

.range-fill {
  height: 100%;
  background: var(--navy);
  border-radius: 2px;
}

/* Bluechip Equities Watchlist Table */
.equities-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 50px;
}

.equities-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 14px;
}

.equities-title {
  margin: 0;
  font: 600 1.25rem Georgia, serif;
}

.equities-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.search-wrap input {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.8rem;
  width: 220px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.stocks-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}

.stocks-table th {
  padding: 12px 20px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
}

.stocks-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.stocks-table tr:hover td {
  background: #f8fafc;
}

.num-col {
  text-align: right;
}

.stock-symbol {
  font-weight: 700;
  color: var(--ink);
}

.stock-company {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
}

.stock-sector {
  font-size: 0.75rem;
  color: #475569;
}

.stock-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.75rem;
}

.stock-pill.up {
  color: #065f46;
  background: var(--green-bg);
}

.stock-pill.down {
  color: #991b1b;
  background: var(--red-bg);
}

/* Calculators Section */
.calculators-section {
  margin-top: 50px;
}

.calculators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.calc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calc-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.calc-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.calc-header h3 {
  margin: 0;
  font: 600 1.15rem Georgia, serif;
}

.calc-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.form-row input,
.form-row select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  background: #f8fafc;
}

.calc-result {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}

.calc-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.calc-line strong {
  color: var(--ink);
}

.calc-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  border-top: 1px dashed var(--line);
  padding-top: 8px;
  margin-top: 8px;
}

.calc-total strong {
  font-size: 1.1rem;
}

.calc-total strong.profit {
  color: #059669;
}

.calc-total strong.loss {
  color: #dc2626;
}

/* Monetization Slot */
.ad-slot {
  margin: 40px 0;
}

.ad-container {
  border: 1px solid #fed7aa;
  background: #fffaf5;
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.ad-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: #9a3412;
  text-transform: uppercase;
  background: #ffedd5;
  padding: 3px 8px;
  border-radius: 4px;
}

.ad-placeholder {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ad-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #7c2d12;
}

.ad-cta {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ea580c;
  cursor: pointer;
  white-space: nowrap;
}

.site-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Responsive Queries */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  .quote {
    grid-template-columns: 1fr;
  }
  .quote > div + div {
    border-left: none;
  }
  .chart-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  main {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 20px;
  }
  .watch-shell {
    margin-left: 0;
    margin-right: 0;
  }
  .watch-shell > header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .tabs button {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  .city-selector select {
    min-width: 100%;
  }
  .indices-grid {
    grid-template-columns: 1fr;
  }
  .calculators-grid {
    grid-template-columns: 1fr;
  }
  .calc-card {
    padding: 16px;
  }
}

/* -------------------------------------------------------------
   4-Commodity Hero Dashboard Grid (Zero Login Required)
   ------------------------------------------------------------- */
.metals-hero-section {
  margin: 28px 0 32px;
}

.metals-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .metals-hero-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .metals-hero-grid {
    grid-template-columns: 1fr;
  }
}

.metal-tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metal-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -6px rgba(15, 23, 42, 0.1);
}

.metal-tile.active-metal {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px var(--navy), var(--shadow);
}

.metal-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.metal-tile.gold-tile::before {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.metal-tile.silver-tile::before {
  background: linear-gradient(90deg, #94a3b8, #64748b);
}

.metal-tile.platinum-tile::before {
  background: linear-gradient(90deg, #38bdf8, #0284c7);
}

.tile-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.tile-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tile-symbol {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.tile-value-wrap {
  margin-bottom: 12px;
}

.tile-price {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.tile-unit {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  margin-left: 4px;
}

.tile-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.tile-movement {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.tile-movement.up {
  color: #047857;
  background: #ecfdf5;
}

.tile-movement.down {
  color: #b91c1c;
  background: #fef2f2;
}

.tile-sparkline {
  width: 76px;
  height: 28px;
}

.tile-sparkline polyline {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tile-sparkline.up polyline {
  stroke: #10b981;
}

.tile-sparkline.down polyline {
  stroke: #ef4444;
}

/* Live Feed Radar Beacon */
.live-beacon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.live-beacon:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
}

.live-beacon.paused {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

.beacon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  position: relative;
  display: inline-block;
}

.live-beacon.paused .beacon-dot {
  background-color: #94a3b8;
}

.beacon-dot::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  border: 2px solid #10b981;
  animation: beaconPulse 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.live-beacon.paused .beacon-dot::after {
  display: none;
}

@keyframes beaconPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  75%, 100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* Real-Time Tick Flash Animations (livepriceofgold style) */
@keyframes textFlashUp {
  0% {
    background-color: rgba(16, 185, 129, 0.35);
    color: #065f46;
    border-radius: 6px;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.45);
    transform: scale(1.03);
  }
  50% {
    background-color: rgba(16, 185, 129, 0.18);
  }
  100% {
    background-color: transparent;
    box-shadow: none;
    transform: scale(1);
  }
}

@keyframes textFlashDown {
  0% {
    background-color: rgba(239, 68, 68, 0.35);
    color: #991b1b;
    border-radius: 6px;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.45);
    transform: scale(1.03);
  }
  50% {
    background-color: rgba(239, 68, 68, 0.18);
  }
  100% {
    background-color: transparent;
    box-shadow: none;
    transform: scale(1);
  }
}

.tick-flash-up {
  animation: textFlashUp 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: inline-block;
}

.tick-flash-down {
  animation: textFlashDown 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: inline-block;
}

/* Hero Metal Tiles Flash */
@keyframes tileFlashUp {
  0% {
    border-color: #10b981;
    box-shadow: 0 0 0 2px #10b981, 0 14px 28px rgba(16, 185, 129, 0.25);
    background-color: #f0fdf4;
  }
  100% {
    border-color: var(--line);
    box-shadow: var(--shadow);
    background-color: var(--card);
  }
}

@keyframes tileFlashDown {
  0% {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px #ef4444, 0 14px 28px rgba(239, 68, 68, 0.25);
    background-color: #fef2f2;
  }
  100% {
    border-color: var(--line);
    box-shadow: var(--shadow);
    background-color: var(--card);
  }
}

.metal-tile.tick-flash-up {
  animation: tileFlashUp 1.6s ease-out;
}

.metal-tile.tick-flash-down {
  animation: tileFlashDown 1.6s ease-out;
}

/* -------------------------------------------------------------
   Interactive Timeframe Switcher
   ------------------------------------------------------------- */
.chart-timeframe-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.timeframe-pills {
  display: inline-flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 999px;
  gap: 4px;
}

.tf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  border: none;
  background: transparent;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--muted);
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.tf-btn:hover {
  color: var(--ink);
}

.tf-btn:active {
  transform: scale(0.96);
}

.tf-btn.active {
  background: #ffffff;
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.chart-stats-row {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--muted);
}

.chart-stats-row strong {
  color: var(--ink);
}

/* -------------------------------------------------------------
   City-Wise Price Comparison Matrix
   ------------------------------------------------------------- */
.city-matrix-section {
  margin: 36px 0;
}

.matrix-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.matrix-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.matrix-header h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  color: var(--ink);
}

.matrix-header p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.btn-print-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-print-action:hover {
  background: #1e293b;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.matrix-table th {
  background: #f8fafc;
  padding: 12px 18px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.matrix-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.matrix-table tbody tr:hover {
  background: #f8fafc;
}

.matrix-table tbody tr:last-child td {
  border-bottom: none;
}

.city-name-cell strong {
  display: block;
  font-size: 0.88rem;
}

.city-name-cell small {
  color: var(--muted);
}

.diff-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
}

.diff-badge.even {
  background: #f1f5f9;
  color: var(--muted);
}

.diff-badge.plus {
  background: #fef2f2;
  color: #b91c1c;
}

.diff-badge.minus {
  background: #ecfdf5;
  color: #047857;
}

/* -------------------------------------------------------------
   MCX Bullion vs Local Premium Calculator (B2B Jeweler)
   ------------------------------------------------------------- */
.mcx-premium-highlight {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: #92400e;
}

/* -------------------------------------------------------------
   BIS Hallmarking & HUID Consumer Guide
   ------------------------------------------------------------- */
.hallmarking-section {
  margin: 36px 0;
}

.hallmark-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .hallmark-grid {
    grid-template-columns: 1fr;
  }
}

.hallmark-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
}

.hallmark-step-num {
  font-size: 0.7rem;
  font-weight: 800;
  color: #d97706;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: block;
}

.hallmark-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--ink);
}

.hallmark-code-badge {
  display: inline-block;
  padding: 3px 8px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.hallmark-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

/* -------------------------------------------------------------
   In-Browser Price Alert Card (Zero Cost / Zero Login)
   ------------------------------------------------------------- */
.alert-strip {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.alert-strip-left h4 {
  margin: 0 0 4px;
  font-size: 0.92rem;
  color: var(--ink);
}

.alert-strip-left p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.alert-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.alert-input {
  width: 140px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.85rem;
}

.btn-alert-save {
  padding: 7px 16px;
  background: var(--navy);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.active-alert-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #047857;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* -------------------------------------------------------------
   Print-Ready Rate Card Sheet (@media print)
   ------------------------------------------------------------- */
#printable-rate-sheet {
  display: none;
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }

  .ticker-tape,
  .hero-badges,
  .action-buttons,
  .zone-navigator,
  .controls,
  .chart-card,
  .indices-grid,
  .equities-card,
  .calculators-section,
  .ad-slot,
  .site-footer,
  .btn-print-action,
  .alert-strip {
    display: none !important;
  }

  #printable-rate-sheet {
    display: block !important;
    width: 100% !important;
    padding: 20px;
  }

  .print-sheet-header {
    text-align: center;
    border-bottom: 2px solid #000000;
    padding-bottom: 14px;
    margin-bottom: 20px;
  }

  .print-sheet-header h1,
  .print-sheet-header h2 {
    font-size: 22pt;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
  }

  .print-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 9pt;
    margin-top: 8px;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
  }

  .print-table th,
  .print-table td {
    border: 1px solid #333333;
    padding: 8px 12px;
    font-size: 10pt;
    text-align: left;
  }

  .print-table th {
    background: #f1f5f9 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-footer {
    margin-top: 30px;
    font-size: 8pt;
    color: #555555;
    border-top: 1px solid #cccccc;
    padding-top: 10px;
  }
}

