@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans SC Site";
  src: url("/fonts/noto-sc.woff") format("woff");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --surface: #fff;
  --canvas: #f3f5f7;
  --ink: #152338;
  --muted: #526174;
  --fine: #697884;
  --line: #e1e7eb;
  --navy: #111c30;
  --nav-subtle: #9baac0;
  --gold: #ae701c;
  --teal: #087d72;
  --sans: "DM Sans", "Noto Sans SC Site", "Noto Sans CJK SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --sidebar: 214px;
  --radius: 17px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 14px/1.5 var(--sans); min-width: 280px; }
button, a { color: inherit; -webkit-tap-highlight-color: transparent; }
a { text-decoration: none; }
button { font: inherit; }
button:not(:disabled) { cursor: pointer; }
button:disabled { cursor: default; }
h1, h2, h3, p, dl, dd { margin: 0; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid #a76a20; outline-offset: 3px; }
[hidden] { display: none !important; }
::selection { background-color: #f4dba6; color: var(--ink); }
[id] { scroll-margin-top: 22px; }

.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link:focus { position: fixed; z-index: 30; inset: 10px auto auto 12px; padding: 9px 12px; background: #fff; }

.sidebar {
  width: var(--sidebar); position: fixed; inset: 0 auto 0 0; z-index: 5;
  display: flex; flex-direction: column; padding: 31px 17px 25px;
  color: #e6ecf5; background: linear-gradient(166deg, #172644 0%, var(--navy) 61%, #101a2a 100%);
  border-right: 1px solid #1c2c45;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 9px; width: fit-content; }
.brand img { width: 42px; height: 42px; border-radius: 11px; filter: drop-shadow(0 4px 11px #070e1b54); }
.brand strong, .brand small { display: block; }
.brand strong { color: #fff6df; font-size: 23px; letter-spacing: .075em; line-height: 1.23; font-weight: 700; }
.brand small { color: #adb9ca; font-size: 11px; letter-spacing: .08em; margin-top: 3px; }
.desktop-nav { display: flex; flex-direction: column; gap: 8px; margin-top: 52px; }
.desktop-nav :is(a, button) {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 45px; text-align: left;
  border: 1px solid transparent; border-radius: 9px; background: transparent; padding: 0 13px;
  color: #adbbce; font-size: 13px; letter-spacing: .025em; transition: background-color .18s, color .18s;
}
.desktop-nav :is(a, button) svg { flex-shrink: 0; stroke-width: 1.75; }
.desktop-nav :is(a, button):hover { color: #fff7e7; background: #ffffff0b; }
.desktop-nav .current { background: #253450; border-color: #31415e; color: #ffdda0; font-weight: 650; }
.desktop-nav .current::before { position: absolute; left: 0; content: ""; width: 3px; height: 21px; background: #efc277; border-radius: 0 3px 3px 0; }
.sidebar-foot { margin-top: auto; display: grid; gap: 17px; }
.sidebar-sync { border: 1px solid #334057; background: #1a2940; border-radius: 10px; padding: 10px 11px; }
.sidebar-sync div { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #e3eaf2; }
.sidebar-sync i, .status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; background: #9ba7b2; border-radius: 50%; }
.sidebar-sync i.connected { background: #65c7a6; box-shadow: 0 0 0 3px #65c7a622; }
.sidebar-sync > span { display: block; color: #a8b6cb; font-size: 11px; padding-left: 15px; margin-top: 4px; }
.private-mark { display: flex; align-items: center; padding-left: 3px; gap: 8px; font-size: 11px; color: #90a1ba; }
.mobile-nav { display: none; }
.workspace-main { margin-left: var(--sidebar); }
.workspace-inner { max-width: 1480px; padding: 25px clamp(24px, 3vw, 44px) 12px; margin: 0 auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 55px; margin-bottom: 17px; }
.heading-text h1 { font-size: clamp(23px, 2.1vw, 30px); font-weight: 750; letter-spacing: -.035em; line-height: 1.3; }
.heading-text p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.heading-controls { display: flex; align-items: center; gap: 11px; }
.date-box, .refresh-button { display: flex; align-items: center; gap: 9px; }
.date-box { color: var(--muted); padding-right: 13px; margin-right: 2px; border-right: 1px solid #dce2dd; }
.date-box strong, .date-box small { display: block; }
.date-box strong { color: var(--ink); font-size: 12px; font-weight: 650; white-space: nowrap; }
.date-box small { font-size: 10px; margin-top: 2px; letter-spacing: .03em; }
.refresh-button {
  min-height: 39px; padding: 0 14px; border: 1px solid #172741; border-radius: 9px;
  background: #1b2b46; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 2px 5px #1321391a; transition: background-color .18s;
}
.refresh-button:not(:disabled):hover { background: #2c4162; }
.refresh-button:disabled { opacity: .83; }
.spin { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.quote-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.panel, .quote-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 2px 5px #1b2d4108;
}
.quote-card {
  display: block; text-align: left; position: relative; isolation: isolate; overflow: hidden;
  padding: 14px 16px 12px; min-height: 150px; transition: border-color .18s, box-shadow .18s;
}
.quote-card:hover { border-color: #a7b5b0; box-shadow: 0 4px 13px #1d2d4412; }
.quote-card.gold { background: linear-gradient(112deg, #fff 63%, #fff3d9 120%); }
.quote-card.usd { background: linear-gradient(112deg, #fff 63%, #dbf1eb 120%); }
.quote-card.curve-summary { background: linear-gradient(112deg, #fff 63%, #e5efff 120%); }
.quote-card.gold.selected-card { border-color: #e4d1ac; }
.quote-card.usd.selected-card { border-color: #abcfc6; }
.quote-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.quote-top strong, .quote-top small { display: block; }
.quote-top strong { font-size: 13px; font-weight: 700; white-space: nowrap; }
.quote-top small { font-size: 10px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.open-card { margin-left: auto; flex: 0 0 auto; color: #7e8d97; align-self: flex-start; }
.tile-icon {
  display: inline-grid; place-items: center; flex: 0 0 auto; width: 37px; height: 37px; border-radius: 9px;
}
.tile-icon svg { stroke-width: 1.7; }
.tile-icon.gold { background: #faedcf; color: #976316; }
.tile-icon.teal { background: #e0f2ed; color: #08746b; }
.tile-icon.blue { background: #e8edf8; color: #3b5a90; }
.tile-icon.violet { background: #eeeafa; color: #674a92; }
.quote-value { display: flex; gap: 7px; align-items: baseline; margin-top: 9px; position: relative; z-index: 1; width: fit-content; }
.quote-value b { font: 700 clamp(24px, 2.35vw, 35px)/1.12 "DM Sans", var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.045em; }
.quote-value > span { color: #64717c; font-size: 11px; white-space: nowrap; }
.quote-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; margin-top: 9px; width: fit-content; min-height: 23px; }
.quote-foot > svg { color: #7c8b9c; }
.quote-foot time { color: #65717c; font: 400 9px var(--mono); white-space: nowrap; }
.delta { font: 400 11px/1.25 var(--mono); font-variant-numeric: tabular-nums; min-height: 22px; display: inline-flex; align-items: center; gap: 2px; padding: 2px 5px; border-radius: 5px; white-space: nowrap; }
.delta.up { color: #9a3738; background: #fbeaea; }
.delta.down { color: #196b58; background: #e3f3eb; }
.delta.neutral { color: #5d6c7a; background: #edf0f3; }
.mini-line { position: absolute; width: 26%; max-width: 104px; height: 41px; bottom: 19px; right: 13px; z-index: 0; }
.mini-curve { height: 35px; position: absolute; bottom: 21px; right: 17px; display: flex; align-items: end; gap: 4px; width: 63px; }
.mini-curve i { display: block; flex: 1; background: #aec4e5; border-radius: 3px 3px 0 0; }
.mini-curve i:last-child { background: #7699cb; }

.analysis-grid { display: grid; grid-template-columns: minmax(0, 2.55fr) minmax(230px, 1fr); gap: 15px; margin-top: 17px; align-items: stretch; }
.chart-panel { min-width: 0; padding: 15px 17px 13px; display: flex; flex-direction: column; }
.chart-header, .chart-controls, .chart-readout, .chart-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chart-title { display: flex; align-items: center; gap: 8px; }
.chart-title svg { color: #98723a; }
.chart-title h2 { font-size: 17px; font-weight: 700; }
.icon-button {
  display: grid; place-items: center; width: 33px; height: 33px; flex: 0 0 auto;
  color: #53667a; background: #fff; border: 1px solid #e1e6e5; border-radius: 8px;
  transition: background-color .18s, border-color .18s; padding: 0;
}
.icon-button:not(:disabled):hover { background: #eef2f0; border-color: #c2cec6; }
.icon-button:disabled { opacity: .46; }
.chart-controls { margin-top: 9px; flex-wrap: wrap; }
.segmented {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border: 1px solid #e9ece8; border-radius: 8px; background: #f2f4f1;
}
.segmented button, .range-tabs button, .weekly-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 0 9px; min-height: 28px; background: transparent; border: 1px solid transparent; border-radius: 5px;
  color: var(--muted); font-size: 11px; white-space: nowrap;
}
.segmented button:hover, .range-tabs button:hover, .weekly-button:not(:disabled):hover { color: var(--ink); background: #e7ece7; }
.segmented .chosen { background: #fff; color: var(--ink); border-color: #dfe5df; box-shadow: 0 1px 3px #1b2d4011; font-weight: 700; }
.segmented .chosen:hover { background: #fff; }
.asset-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 7px; }
.asset-dot.gold { background: #bc8132; }
.asset-dot.usd { background: #168774; }
.range-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.range-tabs button { padding: 0 7px; border-radius: 6px; }
.range-tabs .on, .weekly-button.on { color: #825517; background: #f8eed9; border-color: #f0e1c8; font-weight: 700; }
.range-tabs .on:hover, .weekly-button.on:hover { color: #825517; background: #f8eed9; }
.chart-readout { margin-top: 13px; line-height: 1.25; }
.chart-readout > div { display: flex; align-items: baseline; gap: 8px; }
.chart-readout strong { font-size: 12px; font-weight: 700; }
.chart-readout span { font-size: 11px; color: var(--fine); }
.weekly-button { min-height: 23px; padding-inline: 8px; border-color: #e7ebe6; font-size: 10px; }
.weekly-button:disabled { opacity: .48; }
.chart-frame { position: relative; flex: 1 0 235px; min-width: 0; min-height: 235px; margin-top: 6px; }
.chart-frame canvas { width: 100%; height: 100%; position: absolute; inset: 0; display: block; }
.chart-empty { display: grid; place-items: center; color: var(--muted); }
.chart-empty-content { display: grid; justify-items: center; gap: 8px; text-align: center; }
.chart-empty-content span { font-size: 11px; }
.chart-tooltip {
  position: absolute; z-index: 3; top: 13px; pointer-events: none; min-width: 134px;
  padding: 7px 9px; background: #fffefa; color: var(--ink); border: 1px solid #dedfda; border-radius: 7px;
  box-shadow: 0 3px 12px #17243c1c; font-size: 11px;
}
.chart-tooltip > span { color: var(--fine); font-family: var(--mono); display: block; margin-bottom: 4px; }
.chart-tooltip > div { display: flex; align-items: center; gap: 5px; }
.chart-tooltip b { margin-left: auto; padding-left: 7px; font: 400 12px var(--mono); }
.chart-footer { border-top: 1px solid #edf0ed; padding-top: 8px; color: var(--fine); font-size: 10px; align-items: baseline; gap: 9px; }
.chart-footer > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.chart-footer > span:last-child { text-align: right; }
.market-side { min-width: 0; display: grid; gap: 12px; grid-template-rows: auto 1fr; }
.summary-panel, .curve-panel { padding: 12px 13px 11px; }
.side-title { display: flex; align-items: center; min-height: 20px; gap: 6px; }
.side-title > svg { color: #60778e; flex: 0 0 auto; }
.side-title h2 { font-size: 13px; font-weight: 700; white-space: nowrap; }
.asset-chip {
  margin-left: auto; background: #f8efdc; color: #875819; border-radius: 4px;
  padding: 2px 5px; font: 400 10px var(--mono); white-space: nowrap;
}
.asset-chip.usd { background: #e5f3ef; color: #086d64; }
.asset-chip.compare { background: #eef0f2; color: #586e84; }
.series-summary { margin-top: 6px; }
.series-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-height: 26px; }
.series-summary > div + div { border-top: 1px solid #eff0ee; }
.series-summary dt { color: var(--muted); display: flex; gap: 5px; align-items: center; font-size: 11px; }
.series-summary dd { font: 400 11px var(--mono); font-variant-numeric: tabular-nums; font-weight: 500; }
.series-summary .delta { min-height: 20px; padding: 2px 4px; }
.summary-foot, .curve-date {
  display: flex; align-items: center; gap: 5px; color: var(--fine); font-size: 10px;
  border-top: 1px solid #edf0ed; margin-top: 6px; padding-top: 8px;
}
.summary-foot .connected { background: #358e76; }
.summary-foot time { margin-left: auto; font-family: var(--mono); white-space: nowrap; }
.side-title a { margin-left: auto; color: #566a7f; display: inline-flex; gap: 2px; align-items: center; font-size: 10px; white-space: nowrap; }
.side-title a:hover { text-decoration: underline; }
.curve-rows { display: grid; gap: 5px; margin-top: 9px; margin-bottom: 8px; }
.curve-row {
  display: grid; grid-template-columns: minmax(43px, auto) 1fr minmax(59px, auto); align-items: center; gap: 6px;
  color: var(--muted); font-size: 10px;
}
.curve-row strong { text-align: right; color: #314259; font: 400 10px var(--mono); white-space: nowrap; }
.bar-track { display: block; height: 4px; border-radius: 5px; background: #eaf0f4; overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #a6bde0, #6387bc); }

.rates-section { margin-top: 23px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.section-heading h2 { font-size: 21px; font-weight: 725; letter-spacing: -.025em; }
.section-heading p { color: var(--muted); font-size: 11px; margin-top: 3px; }
.risk-filter { flex-shrink: 0; }
.site-footer { padding: 14px 0 4px; display: flex; justify-content: space-between; align-items: center; gap: 7px; border-top: 1px solid #e3e7e1; margin-top: 16px; color: var(--muted); font-size: 10px; }
.site-footer > span, .auto-button, .source-button { display: inline-flex; align-items: center; gap: 6px; }
.auto-button, .source-button { border: 0; padding: 5px 3px; background: transparent; color: #425d79; white-space: nowrap; }
.auto-button { margin-left: auto; }
.auto-button:hover, .source-button:hover { text-decoration: underline; }
.switch { display: inline-block; width: 21px; height: 12px; border-radius: 12px; background: #b0bac3; position: relative; transition: background-color .18s; }
.switch.on { background: #248470; }
.switch::before { position: absolute; content: ""; background: #fff; border-radius: 50%; width: 8px; height: 8px; top: 2px; left: 2px; transition: transform .18s; }
.switch.on::before { transform: translateX(9px); }

.sources-dialog { max-width: 555px; width: calc(100% - 28px); max-height: min(620px, 90dvh); border: 1px solid var(--line); padding: 0; color: var(--ink); border-radius: 15px; box-shadow: 0 15px 80px #12223b3b; }
.sources-dialog::backdrop { background: #0c172b86; backdrop-filter: blur(3px); }
.dialog-inner { padding: 18px 20px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; border-bottom: 1px solid var(--line); padding-bottom: 11px; }
.dialog-heading h2 { font-size: 19px; }
.source-item { display: flex; align-items: flex-start; gap: 11px; border-bottom: 1px solid #eef0ee; padding: 11px 0; }
.source-item h3 { font-size: 13px; }
.source-item p { margin: 3px 0 4px; font-size: 12px; color: var(--muted); }
.source-note { font-size: 11px; display: flex; gap: 6px; color: var(--muted); margin-top: 11px; }
.source-note svg { flex: 0 0 auto; }

@media (min-width: 1460px) {
  :root { --sidebar: 244px; }
  .sidebar { padding-inline: 20px; }
  .workspace-inner { padding-top: 35px; }
  .quote-card { min-height: 151px; }
  .chart-frame { min-height: 260px; }
}
@media (max-width: 1135px) {
  :root { --sidebar: 194px; }
  .workspace-inner { padding-inline: 24px; }
  .analysis-grid { grid-template-columns: minmax(0, 2.4fr) minmax(211px, 1fr); }
  .chart-panel { padding-inline: 12px; }
  .market-side { gap: 10px; }
}
@media (max-width: 880px) {
  :root { --sidebar: 164px; }
  .sidebar { padding-inline: 12px; }
  .workspace-inner { padding: 23px 19px 10px; }
  .quote-grid, .analysis-grid { gap: 10px; }
  .quote-card { padding: 12px 11px; min-height: 130px; }
  .quote-top { gap: 6px; }
  .quote-top strong { font-size: 12px; }
  .quote-top .tile-icon { width: 30px; height: 30px; }
  .quote-top .tile-icon svg { width: 16px; height: 16px; }
  .mini-line { bottom: 20px; right: 8px; height: 30px; }
  .mini-curve { width: 43px; height: 27px; right: 9px; }
  .analysis-grid { grid-template-columns: 1fr; }
  .market-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .chart-frame { min-height: 247px; }
}
@media (max-width: 670px) {
  .sidebar { position: static; width: auto; padding: 10px 15px; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
  .brand { padding: 0; }
  .brand img { width: 34px; height: 34px; border-radius: 7px; }
  .brand strong { font-size: 19px; }
  .brand small { font-size: 9px; margin-top: 0; }
  .sidebar-foot { display: block; margin: 0; }
  .sidebar-sync { padding: 4px 7px; border: 0; background: none; }
  .sidebar-sync div { font-size: 10px; }
  .sidebar-sync > span { font-size: 9px; margin-top: 1px; }
  .private-mark, .desktop-nav { display: none; }
  .workspace-main { margin-left: 0; }
  .workspace-inner { padding: 15px 13px 70px; }
  .page-heading { margin-bottom: 14px; min-height: 51px; gap: 7px; }
  .heading-text h1 { font-size: 25px; }
  .heading-text p { font-size: 10px; gap: 5px; margin-top: 3px; }
  .heading-controls { gap: 6px; }
  .date-box { padding-right: 6px; margin-right: 0; gap: 4px; }
  .date-box > svg { display: none; }
  .date-box strong { font-size: 10px; }
  .date-box small { font-size: 9px; }
  .refresh-button { min-height: 33px; gap: 4px; padding: 0 7px; font-size: 10px; }
  .refresh-button svg { width: 13px; }
  .quote-card { border-radius: 11px; }
  .analysis-grid { margin-top: 12px; }
  .rates-section { margin-top: 19px; }
  .section-heading h2 { font-size: 18px; }
  .mobile-nav {
    position: fixed; inset: auto 0 0; z-index: 8; display: grid;
    grid-template-columns: repeat(4, 1fr); background: #121f33; color: #afbdd0;
    padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -3px 12px #14213922;
  }
  .mobile-nav :is(a, button) {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px;
    min-height: 49px; padding: 3px 2px; background: transparent; border: 0; color: inherit; font-size: 10px;
  }
  .mobile-nav .current { color: #ffe0a2; background: #ffffff0c; }
  .site-footer { flex-wrap: wrap; }
}
@media (max-width: 490px) {
  .quote-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-card.curve-summary { grid-column: 1 / -1; min-height: 81px; }
  .curve-summary .quote-value { position: absolute; right: 29px; top: 10px; margin: 0; }
  .curve-summary .quote-foot { margin-top: 4px; }
  .curve-summary .quote-source { position: absolute; right: 10px; bottom: 12px; }
  .curve-summary .mini-curve { display: none; }
  .quote-top .open-card { width: 13px; }
  .quote-top small { font-size: 9px; }
  .quote-value b { font-size: 25px; }
  .quote-value > span { font-size: 9px; }
  .mini-line { height: 27px; }
  .quote-foot { gap: 4px; flex-wrap: wrap; }
  .quote-foot time { font-size: 8px; }
  .chart-frame { min-height: 212px; flex-basis: 212px; }
  .chart-controls { gap: 6px; margin-top: 6px; }
  .view-tabs button, .range-tabs button { padding-inline: 5px; min-height: 25px; font-size: 10px; }
  .chart-readout { margin-top: 8px; }
  .chart-footer { font-size: 9px; }
  .market-side { gap: 8px; }
  .summary-panel, .curve-panel { padding: 9px 8px; }
  .asset-chip { font-size: 9px; }
  .curve-row { font-size: 9px; gap: 3px; grid-template-columns: minmax(29px, auto) 1fr minmax(46px, auto); }
  .curve-row strong { font-size: 9px; }
  .summary-foot, .curve-date { font-size: 9px; gap: 3px; }
  .summary-foot time { font-size: 9px; }
  .section-heading { align-items: start; flex-direction: column; gap: 6px; }
  .site-footer > span { flex-basis: 100%; }
}
@media (max-width: 338px) {
  .quote-top strong { font-size: 11px; }
  .quote-top small { font-size: 8px; }
  .quote-top .open-card, .mini-line { display: none; }
  .chart-footer { flex-wrap: wrap; }
  .market-side { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation: none !important; }
}

.market-hero {
  display: flex;
  align-items: center;
  min-height: 144px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  margin-bottom: 16px;
  padding: 19px 26px;
  color: #f7f4ec;
  background: #101b2c url("/images/market-hero.webp") center 55% / cover no-repeat;
  border: 1px solid #243246;
  border-radius: 18px;
  box-shadow: 0 5px 20px #18273926;
}
.market-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #122038 0%, #122038a6 33%, #0d182740 59%, #0d182708 100%);
}
.market-hero h2 {
  font-size: clamp(24px, 2.5vw, 35px);
  font-weight: 720;
  line-height: 1.32;
  letter-spacing: .025em;
}
.market-hero h2 span { color: #dfb975; }
.market-hero p { font-size: 12px; color: #e4e9ed; margin-top: 7px; }
.hero-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffdf9f;
  font-size: 11px;
  border: 1px solid #ffd58a48;
  border-radius: 6px;
  background: #d9ac6320;
  margin-top: 12px;
  min-height: 28px;
  padding: 2px 8px;
}
.hero-source:hover { background: #d9ac6338; }
.quote-source { position: relative; z-index: 1; display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.chart-controls { column-gap: 8px; row-gap: 7px; }
.range-tabs button { padding-inline: 8px; }
.chart-readout > div { min-width: 0; flex-wrap: wrap; row-gap: 3px; }
.chart-readout strong { color: #23334a; }
.chart-footer > span:last-child { min-width: 0; }

.rates-section { margin-top: 30px; }
.section-heading { margin-bottom: 15px; }
.section-heading h2 { font-size: 23px; }
.section-heading p { margin-top: 4px; font-size: 12px; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; align-items: stretch; }
.product-card {
  padding: 14px 13px 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  --accent: #4a6f9e;
  --tint: #eff4fb;
  background: linear-gradient(140deg, var(--tint) -55%, white 45%);
}
.product-card.gold { --accent: #986925; --tint: #fbefd8; }
.product-card.teal { --accent: #267d72; --tint: #e9f6f1; }
.product-card.violet { --accent: #6e5794; --tint: #f1ebf9; }
.product-card::before {
  position: absolute;
  content: "";
  height: 2px;
  inset: 0 18px auto;
  background: var(--accent);
  opacity: .4;
  border-radius: 0 0 3px 3px;
}
.product-heading { display: flex; gap: 9px; align-items: center; min-height: 39px; }
.product-heading h3 { font-size: 13px; font-weight: 700; line-height: 1.45; }
.product-heading p { color: var(--muted); font-size: 10px; margin-top: 2px; }
.product-value { margin-top: 14px; }
.product-value strong, .product-value > span { display: block; }
.product-value strong {
  font: 700 clamp(18px, 1.62vw, 25px)/1.21 "DM Sans", var(--sans);
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  color: #1b2d48;
}
.product-value > span { color: var(--muted); font-size: 10px; margin-top: 4px; }
.product-metadata { display: grid; gap: 3px; color: var(--muted); font-size: 11px; padding-block: 11px 10px; margin-bottom: auto; }
.product-metadata span:first-child { color: #2f4258; font-weight: 600; }
.product-stamp { color: var(--fine); font-size: 9px; padding-bottom: 7px; }
.product-card details { border-top: 1px solid #ebedef; }
.product-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  list-style: none;
  color: var(--accent);
  cursor: pointer;
  min-height: 37px;
  font-size: 11px;
  font-weight: 620;
}
.product-card summary::-webkit-details-marker { display: none; }
.product-card summary:hover { text-decoration: underline; }
.product-card summary svg { transition: transform .18s; flex: 0 0 auto; }
.product-card details[open] summary svg { transform: rotate(180deg); }
.product-detail { font-size: 11px; color: var(--muted); padding: 0 0 12px; }
.product-detail p + p { margin-top: 4px; }
.product-detail .product-date { color: #335674; font-size: 10px; }
.product-links { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-top: 7px; }
.product-detail a, .source-item a, .deposit-note a {
  display: inline-flex;
  align-items: center;
  color: #325d8b;
  gap: 3px;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.source-item a { margin: 2px 10px 1px 0; }
.product-detail a:hover, .source-item a:hover, .deposit-note a:hover { color: #8b6029; }
.deposit-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 12px;
  border: 1px solid #dfe6ec;
  border-radius: 9px;
  padding: 9px 11px;
  color: #51677c;
  background: #eaf0f7;
  font-size: 11px;
}
.deposit-note > svg { flex-shrink: 0; }
.deposit-note a { flex-shrink: 0; margin-left: auto; }
.deposit-note strong { color: #25415f; white-space: nowrap; }
.site-footer { padding-block: 16px; }

@media (max-width: 1180px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .range-tabs button { padding-inline: 5px; }
}
@media (max-width: 880px) {
  .market-hero { padding-inline: 22px; min-height: 132px; }
  .quote-card { min-height: 130px; }
  .quote-source { font-size: 9px; }
}
@media (max-width: 670px) {
  .market-hero { padding: 14px 15px; min-height: 123px; margin-bottom: 13px; }
  .market-hero::before { background: linear-gradient(90deg, #111f34 0%, #111f34d9 39%, #111f3478 70%, #0e182a26 100%); }
  .market-hero h2 { font-size: 23px; }
  .market-hero p { font-size: 11px; max-width: 65%; line-height: 1.65; }
  .hero-source { margin-top: 8px; }
  .rates-section { margin-top: 21px; }
  .section-heading h2 { font-size: 20px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .product-card { border-radius: 12px; padding-inline: 10px; }
  .product-value strong { font-size: 19px; }
  .product-heading { gap: 7px; }
  .product-heading .tile-icon { width: 31px; height: 31px; }
  .product-heading .tile-icon svg { width: 16px; height: 16px; }
}
@media (max-width: 490px) {
  .market-hero { background-position: 57% center; background-size: auto 145%; }
  .quote-card { padding: 11px 9px 10px; }
  .quote-top strong { font-size: 11px; }
  .quote-foot { margin-top: 5px; }
  .quote-source { color: #4d5968; }
  .quote-card:not(.curve-summary) .quote-source { padding-right: 8px; }
  .chart-controls .range-tabs { width: 100%; justify-content: space-between; }
  .range-tabs button { padding-inline: 6px; }
  .deposit-note { flex-wrap: wrap; }
  .deposit-note > span { flex: 1; }
  .deposit-note a { flex-basis: 100%; padding-left: 23px; }
}
@media (max-width: 339px) {
  .product-grid { grid-template-columns: 1fr; }
  .market-hero p { max-width: 72%; }
  .range-tabs button { padding-inline: 3px; }
}
