@charset "UTF-8";

:root {
  --navy: #123f70;
  --primary: #1463b5;
  --primary-dark: #104d8e;
  --teal: #0c8c83;
  --ink: #223349;
  --muted: #68798d;
  --border: #e1e7ee;
  --background: #f5f7fa;
  --surface: #fff;
  --soft-blue: #eef5fd;
  --soft-teal: #edf8f6;
  --radius: 8px;
  /* Use local Chinese sans-serif fonts and a shared, browser-scalable type scale. */
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  --text-body: 1rem;
  --text-ui: .875rem;
  --text-caption: .75rem;
  --line-body: 1.75;
  --line-copy: 1.9;
  --line-ui: 1.6;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; min-width: 0; background: var(--background); color: var(--ink); font: var(--text-body)/var(--line-body) var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; transition: color .16s ease, background-color .16s ease, border-color .16s ease; }
a:hover { color: var(--primary-dark); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { -webkit-tap-highlight-color: transparent; }
button, input, select { max-width: 100%; }
input, select { min-width: 0; }
button:disabled { opacity: .6; cursor: wait; }
button, input, select, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #4d97de; outline-offset: 3px; }
::selection { background: #cfe3fa; color: var(--navy); }
img, svg { max-width: 100%; vertical-align: middle; }
svg { flex-shrink: 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: #183450; }
h1 { margin-bottom: 7px; font-size: 1.75rem; line-height: 1.4; font-weight: 700; letter-spacing: normal; }
h2 { margin-bottom: 0; font-size: 1.25rem; line-height: 1.5; font-weight: 700; }
h3 { margin-bottom: 10px; font-size: 1.125rem; line-height: 1.5; }
p { margin-bottom: 14px; }
ul, ol { padding-left: 22px; }
.container { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0, 0, 0, 0); white-space: nowrap; overflow: hidden; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 10px 18px; background: var(--navy); color: #fff; border-radius: 4px; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.number { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* A compact masthead keeps the rates themselves close to the top of the page. */
.topline { background: #f0f3f7; border-bottom: 1px solid #e6eaf0; color: #69798b; font-size: var(--text-ui); }
.topline > .container { display: flex; align-items: center; justify-content: space-between; min-height: 33px; gap: 14px; }
.topline a { color: #65778d; }
.topline a:hover { color: var(--primary); }
.topline-separator { margin-inline: 12px; color: #b2bdc9; }
.masthead { min-height: 100px; display: flex; align-items: center; gap: 34px; }
body > header, .site-header { background: #fff; }
.masthead::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 134px; background: #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); flex-shrink: 0; }
.brand:hover { color: var(--navy); }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; background: var(--navy); color: #fff; border-radius: 9px; }
.brand-mark svg { width: 30px; height: 30px; }
.brand > span:last-child { display: flex; flex-direction: column; }
.brand strong { font-size: 1.625rem; line-height: 1.25; font-weight: 800; letter-spacing: -.6px; }
.brand small { margin-top: 3px; font-size: var(--text-caption); line-height: 1.3; font-weight: 500; letter-spacing: 1.5px; color: #7d8c9c; }
.header-description { margin: 0; padding-left: 28px; border-left: 1px solid var(--border); color: #52647a; font-size: var(--text-ui); line-height: 1.8; }
.header-description p { margin: 0; }
.header-description span { display: block; margin-top: 2px; color: #8a98a7; font-size: var(--text-caption); }
.header-description strong { font-weight: 500; color: #3a4f67; }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 20px; color: #6e7b8b; font-size: var(--text-ui); }
.header-tools a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; color: #5c6e82; }
.header-tools svg { width: 16px; height: 16px; }
.header-tools small { display: block; margin-top: 2px; color: #8d9aa8; font-size: var(--text-caption); }
.nav-shell { background: var(--navy); }
.main-nav { display: flex; gap: 1px; align-items: stretch; }
.main-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 25px; color: #eaf3ff; font-size: var(--text-ui); white-space: nowrap; }
.main-nav a:hover { background: #1c5185; color: #fff; }
.main-nav a.active { background: #1e5b94; color: #fff; font-weight: 700; box-shadow: inset 0 -3px 0 #6bc7dd; }
.main-nav a svg { margin-right: 7px; width: 17px; height: 17px; }

/* Content panels */
main.container { padding-top: 21px; padding-bottom: 40px; }
main.container > .panel, main.container > .info-grid { margin-top: 20px; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: -4px 0 18px; color: #8491a0; font-size: var(--text-ui); }
.breadcrumbs a { color: #687d94; }
.breadcrumbs a:hover { color: var(--primary); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 23px; }
.page-heading p { margin: 0; color: var(--muted); font-size: var(--text-ui); }
.eyebrow { display: block; margin-bottom: 6px; color: var(--primary); font-size: var(--text-caption); font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.status-pill { display: inline-flex; flex-shrink: 0; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid #d5e8e1; border-radius: 5px; background: #f5fbf8; color: #397b64; font-size: var(--text-caption); line-height: 1.5; white-space: nowrap; }
.status-pill::before { content: ""; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: #419b79; box-shadow: 0 0 0 3px #e3f2eb; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 22px; }
.layout > .primary, .layout > .sidebar { min-width: 0; }
.layout > .primary { display: grid; align-content: start; gap: 20px; }
.sidebar { display: grid; align-content: start; gap: 20px; }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 2px 3px #123f7003; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.panel-head h2, .chart-head h2 { display: flex; align-items: center; gap: 8px; }
.section-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--primary); }
.section-icon svg { width: 19px; height: 19px; }
.panel-action { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-ui); color: #718297; }
.panel-action:hover { color: var(--primary); }
.panel-action svg { width: 13px; height: 13px; }
.panel-body { padding: 18px; }
.panel-body > :last-child { margin-bottom: 0; }
.section-description { padding: 0 18px; margin: 16px 0; font-size: var(--text-ui); color: var(--muted); line-height: 1.8; }
.panel-head + .section-description { margin-top: 14px; }
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.tabs button, .tabs a { min-height: 32px; padding: 4px 11px; background: transparent; border: 1px solid transparent; border-radius: 4px; color: #738297; font-size: var(--text-ui); line-height: 1.5; }
.tabs button:hover, .tabs a:hover { background: #f4f7fb; color: var(--primary); }
.tabs button.active, .tabs a.active { background: var(--soft-blue); border-color: #d9e8f9; color: var(--primary); font-weight: 600; }

/* Scroll is contained by each table, including on a narrow phone screen. */
.table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; scrollbar-color: #c5d3e1 #f3f6f9; scrollbar-width: thin; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
table th, table td { height: 44px; padding: 10px 12px; border-bottom: 1px solid #e9edf2; text-align: right; white-space: nowrap; font-size: var(--text-ui);  line-height: var(--line-ui); }
table thead th { height: 43px; background: #f5f8fc; color: #65758b; font-size: var(--text-ui); font-weight: 500; }
table tbody tr:last-child > * { border-bottom: 0; }
table tbody tr:hover > * { background-color: #f7faff; }
table th:first-child, table td:first-child { text-align: left; }
.rates-matrix { width: 100%; min-width: 0; table-layout: auto; }
.rates-matrix th, .rates-matrix td { padding: 0; border-right: 1px solid #edf0f4; font-size: var(--text-caption); }
.rates-matrix th:first-child { width: 1%; min-width: 104px; padding-inline: 8px; }
.rates-matrix thead th { height: 68px; text-align: center; font-weight: 600; color: #536c87; }
.rates-matrix thead th > a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 68px; padding: 7px 3px; color: #4b6b89; line-height: 1.3; }
.rates-matrix thead th > a:hover { background: #eaf3fd; color: var(--primary); }
.rates-matrix thead th > a > span:not(.flag) { max-width: 100%; font-size: var(--text-caption); white-space: normal; overflow-wrap: anywhere; }
.rates-matrix thead th small { color: #8b9bad; font-size: var(--text-caption); font-weight: 400; letter-spacing: .3px; }
.rates-matrix thead .flag { flex-basis: auto; }
.rates-matrix thead th:first-child { text-align: left; color: #6e7f92; font-size: var(--text-caption); font-weight: 400; }
.rates-matrix thead th:last-child, .rates-matrix tbody td:last-child { border-right: 0; }
.rates-matrix tbody th { position: sticky; left: 0; z-index: 1; background: #fff; font-weight: 400; box-shadow: 1px 0 #edf0f4; }
.rates-matrix thead th:first-child { position: sticky; left: 0; z-index: 2; background: #f5f8fc; box-shadow: 1px 0 #edf0f4; }
.rates-matrix tbody td { height: 45px; text-align: center; color: #34536f; }
.rates-matrix .matrix-link { display: flex; align-items: center; justify-content: center; min-height: 44px; width: 100%; padding-inline: 3px; color: #355777; white-space: nowrap; }
.rates-matrix button.matrix-link { border: 0; background: transparent; font: inherit; }
.rates-matrix .matrix-link:hover { background: #eaf3fd; color: var(--primary); }
.rates-matrix td.diagonal { background: #f6f8fa; color: #b8c4d0; }
.rates-matrix td.highlight { background: #eff6ff; }
.rates-matrix td.highlight .matrix-link { color: #155f9f; font-weight: 600; }
.rates-matrix tr:hover th { background: #f7faff; }
.currency-label { display: flex; align-items: center; gap: 7px; color: #344c65; }
.flag { position: relative; display: inline-flex; flex: 0 0 20px; align-items: center; justify-content: center; width: 20px; height: 15px; overflow: hidden; border: 1px solid #0e365819; border-radius: 2px; line-height: 1; background: #fff; }
.flag svg, .flag img { display: block; width: 100%; height: 100%; object-fit: contain; }
.flag img { position: absolute; inset: 0; }
.flag.has-image .flag-code-fallback { visibility: hidden; }
.flag-code-fallback { color: var(--muted); font-size: .5625rem; }
.currency-pair-icons { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; flex: 0 0 auto; }
.currency-pair-icons > .flag { flex: none; }
.currency-code { color: #3c516a; font-size: var(--text-ui); font-weight: 600; }
.currency-name { color: #788698; font-size: var(--text-ui); }
.rates-matrix .currency-label { gap: 5px; }
.rates-matrix .currency-code { font-size: var(--text-caption); }
.rates-matrix .currency-name { font-size: var(--text-caption); }
.rates-matrix .flag { width: 17px; height: 12px; flex-basis: 17px; }
.rates-matrix tbody .currency-label { display: grid; grid-template-columns: 17px minmax(0, 1fr); column-gap: 7px; row-gap: 1px; padding-block: 6px; }
.rates-matrix tbody .currency-label .flag { grid-column: 1; grid-row: 1 / span 2; }
.rates-matrix tbody .currency-name { grid-column: 2; grid-row: 1; color: var(--ink); white-space: normal; line-height: 1.35; }
.rates-matrix tbody .currency-code { grid-column: 2; grid-row: 2; color: var(--muted); font-weight: 400; line-height: 1.25; }
.matrix-note { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 7px; padding: 11px 15px; border-top: 1px solid var(--border); background: #fbfcfe; color: #667788; font-size: var(--text-caption); line-height: 1.7; }
.matrix-note > span { flex: 1; min-width: 0; }
.matrix-note > svg { width: 14px; height: 14px; margin-top: 2px; }
.matrix-note p { margin: 0; }
.panel-bottom-link { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 43px; padding: 11px 16px; border-top: 1px solid #e9eef4; background: #fbfcfe; color: #6c85a0; font-size: var(--text-ui); }
.panel-bottom-link:hover { background: #f1f7fd; color: var(--primary); }
.panel-bottom-link svg { width: 14px; height: 14px; }
.table-caption { padding: 12px 18px; color: #7a899a; font-size: var(--text-caption); line-height: 1.8; }
.bank-table-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); background: #fcfdff; color: var(--muted); font-size: var(--text-caption); }
.bank-table-meta .table-caption { padding: 0; }
tr[id^="bank-"] { scroll-margin-top: 180px; }
tr[id^="bank-"]:target > th, tr[id^="bank-"]:target > td { background: var(--soft-blue); box-shadow: inset 0 1px #b7d3ed, inset 0 -1px #b7d3ed; }
.data-table { min-width: 580px; }
.data-table th, .data-table td { padding: 11px 15px; }
.data-table .currency-label { gap: 9px; }
.data-table .currency-name { color: #5f7186; font-size: var(--text-ui); }
.data-table .currency-code { min-width: 31px; }
.data-table a { color: #2c567e; }
.data-table a:hover { color: var(--primary); }
.data-table .number { color: #3a526b; }
.quote-time-value { display: block; font-variant-numeric: tabular-nums; }
.quote-time-note { display: block; margin-top: 2px; color: var(--muted); font-size: var(--text-caption); line-height: 1.5; }
.data-table thead button { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; min-height: 28px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; }
.data-table thead button:hover { color: var(--primary); }
.data-table thead button > span[aria-hidden] { color: #99a9b9; font-size: var(--text-caption); }
.bank-table { min-width: 680px; }
.bank-table .currency-label .currency-name { color: var(--ink); font-weight: 500; }
.bank-table .currency-label .currency-code { color: var(--muted); font-weight: 400; }
.bank-table .buy, .buy { color: #0c8175; }
.bank-table .sell, .sell { color: #2767a3; }
.bank-name { display: flex; align-items: center; gap: 8px; color: #38506b; }
/* Institution columns use their contents; spare space belongs to quote columns. */
.provider-name-table { table-layout: auto; }
.provider-name-table th:first-child, .provider-name-table td:first-child { width: 1%; white-space: nowrap; }
.provider-name-table .bank-name, .provider-name-table .domestic-cny-institution { display: inline-flex; width: max-content; max-width: 12em; white-space: normal; }
.provider-name-table .domestic-cny-institution > span:not(.bank-icon) { min-width: 0; overflow-wrap: anywhere; }
.published-pair-table.provider-name-table tbody th:first-child > a { display: inline-block; max-width: 12em; white-space: normal; overflow-wrap: anywhere; }
.bank-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; color: #b83d49; background: #fbf0f1; font-size: var(--text-caption); font-weight: 700; line-height: 1; }
.bank-icon.has-logo { background: transparent; border-radius: 0; }
.bank-icon.has-logo .bank-icon-fallback { visibility: hidden; }
.bank-icon svg { width: 15px; height: 15px; }
.bank-icon img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.quality-tag, .badge { display: inline-flex; align-items: center; padding: 2px 6px; border: 1px solid #d9e8f8; border-radius: 3px; background: #f1f7fe; color: #527ca8; font-size: var(--text-caption); font-weight: 400; line-height: 1.6; white-space: nowrap; }
.best-price { display: inline-flex; align-items: center; gap: 5px; color: #078377 !important; font-weight: 600; }
.best-price::after { content: "优"; padding: 0 3px; border-radius: 2px; background: #e9f6f1; color: #258a69; font-size: var(--text-caption); line-height: 1.6; font-weight: 400; }

/* Currency converter */
.converter { border-top: 3px solid var(--teal); }
.converter-title { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; padding: 18px 20px 0; }
.converter-title > .section-icon { grid-column: 1; }
.converter-title h2 { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; color: #137d76; }
.converter-title .section-icon { color: var(--teal); }
.converter-title p { grid-column: 1 / -1; margin: 5px 0 0; color: #8794a2; font-size: var(--text-caption); }
.converter form { padding: 18px 20px 0; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin-bottom: 15px; }
.field label { display: block; color: #66778b; font-size: var(--text-ui); line-height: 1.5; }
.field input, .field select, .directory-tools input, .filter-bar select { display: block; width: 100%; height: 43px; padding: 9px 11px; border: 1px solid #d9e1e9; border-radius: 5px; background-color: #fff; color: #344c65; font-size: var(--text-body); line-height: 1.5; box-shadow: 0 1px 2px #123f7003; transition: border-color .16s ease, box-shadow .16s ease; }
.field input:hover, .field select:hover { border-color: #b8c9db; }
.field input:focus, .field select:focus, .directory-tools input:focus { border-color: #5b99d0; box-shadow: 0 0 0 3px #1463b512; }
.field input[type="number"] { font-variant-numeric: tabular-nums; }
.field select { padding-right: 24px; }
.currency-select-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 0 8px; align-items: center; }
.currency-select-row > .field { grid-column: 1; }
.currency-select-row > .field:first-child { grid-row: 1; }
.currency-select-row > .field:last-child { grid-row: 2; }
.currency-select-row > .field:nth-of-type(2) { grid-column: 1; }
.currency-select-row select { padding-left: 8px; padding-right: 15px; font-size: var(--text-body); }
.swap-button { display: flex; align-items: center; justify-content: center; grid-column: 2; grid-row: 1 / span 2; width: 44px; height: 44px; margin: 0; padding: 10px; z-index: 1; border: 0; border-radius: 5px; background: transparent; color: #7f96ac; }
.swap-button:hover { color: var(--primary); background: #edf5fc; }
.swap-button svg { width: 17px; height: 17px; }
.amount-row { position: relative; }
.amount-row input { padding-right: 44px; font-size: 1.1875rem; font-weight: 600; height: 46px; }
.amount-row > span { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: #8a97a6; font-size: var(--text-caption); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 43px; padding: 10px 18px; border: 1px solid #d8e3ee; border-radius: 5px; background: #fff; color: var(--primary); font-size: var(--text-ui); font-weight: 500; line-height: 1.5; transition: background-color .16s ease, border-color .16s ease; }
.button svg { width: 16px; height: 16px; }
.button:hover { background: #f0f6fd; border-color: #bdd3e9; color: var(--primary-dark); }
.button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.button.full { width: 100%; }
.conversion-result { margin: 18px 20px; padding: 15px 13px; border: 1px solid #dbeaf8; border-radius: 5px; background: #f3f8fd; text-align: center; }
.result-label { margin-bottom: 5px; color: #70879e; font-size: var(--text-caption); }
.result-value { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 6px; color: var(--navy); }
.result-value strong { overflow-wrap: anywhere; font-size: 1.8125rem; font-weight: 700; line-height: 1.4; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.result-value span { font-size: var(--text-ui); }
.result-equation { margin-top: 5px; color: #527795; font-size: var(--text-caption); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.result-meta { margin-top: 7px; color: #8a9aab; font-size: var(--text-caption); }
.error-text { color: #b14039; font-size: var(--text-ui); line-height: 1.7; }
.quick-amounts { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 13px 0; }
.quick-amounts button { flex: 1; min-width: 38px; min-height: 30px; padding: 3px 5px; border: 1px solid #e1e8f0; border-radius: 3px; background: #fff; color: #6e849b; font-size: var(--text-caption); }
.quick-amounts button:hover { border-color: #accce9; background: #f2f7fd; color: var(--primary); }
.mini-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 13px; padding: 0 18px 17px; color: #9aa7b5; font-size: var(--text-ui); }
.mini-links a { color: #75879a; }
.mini-links a:hover { color: var(--primary); }
.mini-links button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 30px; padding: 0; border: 0; background: transparent; color: #75879a; font: inherit; }
.mini-links a { display: inline-flex; align-items: center; gap: 3px; min-height: 30px; }
.mini-links button:hover { color: var(--primary); }
.mini-links svg { width: 13px; height: 13px; }
.converter-note { padding: 0 20px 18px; margin: -3px 0 0; color: #8b99a9; font-size: var(--text-caption); line-height: 1.8; }
.converter-currency-help { margin: 0 0 14px; color: var(--muted); font-size: var(--text-caption); line-height: 1.8; }

/* Data chart */
.chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 17px 18px 0; }
.chart-summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; padding: 15px 20px 6px; }
.chart-value { color: var(--navy); font-size: 1.75rem; font-weight: 700; line-height: 1.3; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.chart-unit { color: #6b8096; font-size: var(--text-ui); }
.chart-source { margin-left: auto; color: #8b99a9; font-size: var(--text-caption); }
#chart-content { min-height: 220px; overflow-x: auto; overscroll-behavior-inline: contain; padding: 0 12px 0 4px; }
.trend-chart { display: block; width: 100%; min-width: 680px; height: auto; min-height: 180px; overflow: visible; }
.chart-grid { stroke: #e9eef5; stroke-width: 1; stroke-dasharray: 3 4; }
.chart-axis { fill: #8b9aaa; font: .9375rem var(--font); font-variant-numeric: tabular-nums; }
.chart-line { fill: none; stroke: #1a74bc; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: #edf5fc; opacity: .85; }
.chart-point { fill: #fff; stroke: #1975bd; stroke-width: 2; }
.chart-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 16px; padding: 10px 18px 13px; border-top: 1px solid #eef1f5; color: #8a98a8; font-size: var(--text-caption); }
.chart-footer p { margin: 0; }
.chart-interactive { position: relative; min-width: 680px; }
.chart-interactive .trend-chart { cursor: crosshair; touch-action: auto; }
.trend-chart:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.chart-tooltip { position: absolute; z-index: 4; pointer-events: none; max-width: calc(100% - 16px); padding: 10px 12px; border: 1px solid #b8cee5; border-radius: 8px; background: #fff; box-shadow: 0 4px 18px #123f7024; color: #233d58; font-size: var(--text-ui); line-height: 1.65; white-space: nowrap; }
.chart-tooltip strong, .chart-tooltip time, .chart-tooltip span { display: block; }
.chart-tooltip time { color: var(--muted); font-size: var(--text-caption); }
.chart-tooltip-value { font-variant-numeric: tabular-nums; color: var(--navy); }
.chart-crosshair { stroke: #6f9bc5; stroke-width: 1; stroke-dasharray: 4 3; }
.chart-hover-point { fill: var(--primary); stroke: white; stroke-width: 2.5; }
.chart-note { margin: 8px 0 0; color: #8a99a9; font-size: var(--text-caption); line-height: 1.8; }
.chart-panel > .panel-body { padding-top: 0; }
.chart-panel .chart-summary { padding-inline: 2px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 170px; padding: 30px; color: #8494a5; font-size: var(--text-ui); text-align: center; }
.empty-state strong { color: #6a8198; font-size: var(--text-body); font-weight: 500; }
.empty-state p { margin: 0; font-size: var(--text-caption); }
.pair-quote { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; padding: 8px 0 14px; color: #70869c; font-size: var(--text-ui); }
.pair-quote strong { color: var(--navy); font-size: 2.5rem; font-weight: 700; line-height: 1.4; letter-spacing: -.7px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pair-detail .section-description { margin: 0 0 19px; padding: 0; font-size: var(--text-ui); }
.pair-detail .panel-head h2 { flex-wrap: wrap; }
.pair-equivalents { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.pair-equivalents > div { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid #e2eaf3; border-radius: 5px; background: #f8fbfe; font-size: var(--text-ui); font-variant-numeric: tabular-nums; }
.pair-equivalents span { color: #8296aa; }
.pair-equivalents svg { width: 14px; height: 14px; color: #a1b4c6; }
.pair-equivalents strong { color: #3b6b95; font-size: var(--text-ui); font-weight: 600; overflow-wrap: anywhere; }
.result-basis { margin: 10px 0 0; padding-top: 9px; border-top: 1px solid #dce8f3; color: var(--muted); font-size: var(--text-caption); line-height: 1.7; overflow-wrap: anywhere; }
.pair-detail .panel-body > p.muted { font-size: var(--text-ui); }
.best-offers { padding-top: 3px; }
.best-offer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 0; border-bottom: 1px solid #edf1f5; }
.best-offer > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.best-offer > div:last-child { align-items: flex-end; text-align: right; }
.best-offer > div > strong:not(.best-price) { color: #3d5c76; font-size: var(--text-ui); font-weight: 600; }
.best-offer small { color: #8b9bad; font-size: var(--text-caption); }
.best-offer a { font-size: var(--text-ui); }
.best-offer .best-price { font-size: 1rem; font-variant-numeric: tabular-nums; }
.best-offers > p { margin: 12px 0 0; color: #91a0af; font-size: var(--text-caption); line-height: 1.8; }

/* Sidebar lists and directory pages */
.pair-list { padding: 3px 17px; }
.pair-list > .pair-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; border-bottom: 1px solid #edf0f4; font-size: var(--text-ui); }
.pair-list > .pair-item:last-child { border-bottom: 0; }
.pair-list a.pair-name { flex: 1; min-height: 44px; padding-block: 8px; color: #4a627b; }
.pair-list a.pair-name:hover, .pair-list a.pair-name:focus-visible { color: var(--primary); }
.pair-list a.pair-name:hover > span:not(.currency-pair-icons), .pair-list a.pair-name:focus-visible > span:not(.currency-pair-icons) { text-decoration: underline; text-underline-offset: 3px; }
.pair-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.pair-name > span { min-width: 0; }
.pair-name > svg { width: 13px; height: 13px; margin-left: auto; }
.pair-name small { display: block; color: var(--muted); font-size: var(--text-caption); line-height: 1.5; white-space: nowrap; }
.pair-value { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; color: #306897; font-size: var(--text-ui); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.central-reference-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 14px; padding: 12px 18px; border-bottom: 1px solid var(--border); background: #fbfcfe; color: var(--muted); font-size: var(--text-caption); }
.central-reference-asof { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.central-reference-asof .quote-time-value, .central-reference-asof .quote-time-note { display: inline; margin: 0; }
.central-reference-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 18px; }
.central-reference-card { display: flex; flex-direction: column; gap: 15px; min-width: 0; padding: 15px 14px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
.central-reference-pair { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 44px; }
.central-reference-label { min-width: 0; }
.central-reference-label strong { display: block; color: var(--primary); font-size: var(--text-ui); font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; text-wrap: balance; }
a.central-reference-pair:hover strong { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }
.central-reference-label small { display: block; margin-top: 3px; color: var(--muted); font-size: var(--text-caption); line-height: 1.5; }
.central-reference-basis { margin: 0 0 4px; color: var(--muted); font-size: var(--text-caption); line-height: 1.5; }
.central-reference-amount { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 7px; }
.central-reference-value { color: var(--navy); font-size: 1.5rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.central-reference-unit { color: var(--muted); font-size: var(--text-caption); }
.central-reference-time { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); color: var(--muted); font-size: var(--text-caption); }
.bank-cross-prices { display: grid; gap: 6px; }
.bank-cross-price { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 10px; }
.bank-cross-price-label { color: var(--muted); font-size: var(--text-caption); }
.bank-cross-price-value { color: var(--navy); font-size: 1.125rem; font-weight: 600; line-height: 1.5; }
.bank-cross-single-price .bank-cross-price-value { font-size: 1.5rem; }
@media (max-width: 767px) {
  .central-reference-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
  .layout-reference-cards .sidebar > .converter { grid-row: auto; }
  .central-reference-card { gap: 12px; padding: 12px 10px; }
  .central-reference-pair { align-items: flex-start; gap: 6px; }
  .central-reference-pair .currency-pair-icons { margin-top: 2px; }
  .central-reference-value { font-size: 1.25rem; }
  .central-reference-meta { padding: 11px 14px; }
  .bank-cross-price { flex-wrap: wrap; gap: 0 6px; }
  .bank-cross-price-value { font-size: var(--text-body); }
  .bank-cross-single-price .bank-cross-price-value { font-size: 1.25rem; }
}
.pair-flag { display: inline-flex; width: 19px; height: 14px; overflow: hidden; border: 1px solid #0e365814; border-radius: 2px; }
.pair-flag svg, .pair-flag img { width: 100%; height: 100%; object-fit: cover; }
.bank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; padding: 10px 15px; }
.bank-grid a { display: flex; align-items: center; gap: 7px; min-height: 43px; color: #5d7187; font-size: var(--text-ui); }
.bank-grid a:hover { color: var(--primary); }
.bank-grid .bank-icon { width: 20px; height: 20px; flex-basis: 20px; }
.note-list { margin: 0; padding: 14px 17px 14px 29px; color: #7b8b9c; font-size: var(--text-ui); line-height: 1.9; }
.note-list li { padding-left: 1px; margin-bottom: 6px; }
.note-list li:last-child { margin-bottom: 0; }
.note-list li::marker { color: #8ba4bd; font-size: var(--text-caption); }
.note-list strong { color: #536d86; font-weight: 500; }
.notice { padding: 13px 16px; border: 1px solid #dce9f7; border-radius: 5px; background: #f1f7fd; color: #5c7994; font-size: var(--text-ui); line-height: 1.8; }
.notice p { margin-bottom: 7px; }
.notice > :last-child { margin-bottom: 0; }
.notice.warning { border-color: #eddfbc; background: #fffbf0; color: #8b7749; }
.notice.error { border-color: #ecd5d1; background: #fff5f3; color: #a55248; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border); background: #fcfdff; }
.filter-bar form, .filter-bar .filter { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.filter-bar .field { flex-direction: row; align-items: center; gap: 9px; margin: 0; }
.filter-bar .field label { white-space: nowrap; }
.filter-bar .field select { width: auto; min-width: 145px; height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: var(--text-body); }
.filter-bar .button { min-height: 36px; padding: 6px 13px; font-size: var(--text-ui); }
.home-bank-current { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px; padding: 6px 10px; border: 1px solid #d9e8f8; border-radius: 5px; background: var(--soft-blue); font-size: var(--text-caption); color: var(--muted); }
.home-bank-current strong { color: var(--navy); font-size: var(--text-ui); font-weight: 600; white-space: nowrap; }
.home-bank-filter { padding: 15px 18px 12px; border-bottom: 1px solid var(--border); background: #fcfdff; }
.home-bank-currency-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.home-bank-currency-tabs { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.home-bank-currency-tab { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 44px; padding: 10px 16px; border: 1px solid #d6e3f2; border-radius: 7px; background: var(--surface); color: var(--navy); font-size: var(--text-ui); line-height: 1.5; white-space: nowrap; }
.home-bank-currency-tab:hover { border-color: #a9c7e8; background: var(--soft-blue); }
.home-bank-currency-tab.active { border-color: var(--primary); background: var(--primary); color: #fff; font-weight: 600; }
.home-bank-currency-tab.active:hover { border-color: var(--primary-dark); background: var(--primary-dark); }
.home-bank-more { flex: 0 1 200px; min-width: 160px; max-width: 100%; }
.home-bank-more select { display: block; width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #d6e3f2; border-radius: 7px; background: var(--surface); color: var(--navy); font-size: var(--text-ui); line-height: 1.5; }
.home-bank-filter-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 12px; margin-top: 10px; }
.home-bank-preview .table-caption { padding: 0; }
.home-bank-preview #table-feedback { color: var(--muted); font-size: var(--text-caption); }
@media (max-width: 767px) {
  .home-bank-filter { padding: 13px 14px 11px; }
  .home-bank-currency-controls { display: block; }
  .home-bank-currency-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-bank-currency-tab { min-width: 0; padding-inline: 4px; }
  .home-bank-more { width: 100%; margin-top: 10px; }
}
.segmented { display: inline-flex; border: 1px solid #dae3ed; border-radius: 4px; background: #fff; overflow: hidden; }
.segmented button, .segmented a { display: flex; align-items: center; justify-content: center; min-height: 34px; padding: 5px 12px; border: 0; border-right: 1px solid #e2e8f0; background: transparent; color: #73859a; font-size: var(--text-ui); }
.segmented > :last-child { border-right: 0; }
.segmented button.active, .segmented a.active { background: #eaf3fc; color: var(--primary); }
.segmented button:hover { background: #f1f6fc; color: var(--primary); }
.link-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; padding: 18px; }
.link-grid a { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px; border: 1px solid #e5ebf2; border-radius: 4px; background: #fbfcfe; color: #5b7895; font-size: var(--text-ui); text-align: center; }
.link-grid a:hover { border-color: #b9d3eb; background: #f0f6fd; color: var(--primary); }
.directory-tools { display: flex; align-items: center; gap: 12px; padding: 17px 18px; border-bottom: 1px solid var(--border); }
.directory-tools input { max-width: 320px; height: 39px; font-size: var(--text-body); }
.directory-tools > span { color: #7b8c9f; font-size: var(--text-ui); }
.currency-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px; }
.currency-card { display: grid; grid-template-columns: minmax(0, 1fr) 14px; align-items: center; gap: 8px 10px; min-width: 0; min-height: 88px; padding: 13px 14px; border: 1px solid #e1e8f0; border-radius: 5px; background: #fff; }
.currency-card:hover { border-color: #b7d0e9; background: #f5f9ff; }
.currency-card.unavailable { background: #fafbfd; }
.currency-card.unavailable:hover { border-color: #e1e8f0; background: #fafbfd; }
.currency-card .currency-label { grid-column: 1; min-width: 0; gap: 8px; flex-wrap: wrap; }
.currency-card .flag { width: 28px; height: 21px; flex-basis: 28px; }
.currency-card .currency-code { font-size: var(--text-ui); }
.currency-card .currency-name { font-size: var(--text-ui); color: #58718a; }
.currency-details { display: flex; grid-column: 1; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 3px 10px; min-width: 0; color: #8293a6; font-size: var(--text-caption); line-height: 1.7; }
.currency-details small { min-width: 0; flex: 1 1 80px; overflow-wrap: anywhere; font-size: var(--text-caption); }
.currency-details strong { color: #42678b; font-size: var(--text-ui); font-weight: 600; overflow-wrap: anywhere; }
.currency-card > svg { grid-column: 2; grid-row: 1 / span 2; width: 14px; height: 14px; color: #9caec0; }
.panel-body > .currency-directory { padding: 17px 0 0; }
.panel-body > .directory-tools { padding: 0 0 15px; }
.currency-card[hidden] { display: none; }
.bank-directory { display: grid; gap: 20px; }
.bank-directory section { min-width: 0; }
.bank-directory section > h2 { margin-bottom: 13px; }
.bank-directory h3 { display: flex; align-items: center; gap: 8px; margin: 2px 0 12px; font-size: 1.125rem; }
.bank-directory h3 > span { min-width: 20px; padding: 0 5px; border-radius: 3px; background: #edf3f9; color: #889bad; font-size: var(--text-caption); font-weight: 400; text-align: center; }
.bank-directory section > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bank-card { display: flex; align-items: center; gap: 11px; min-height: 79px; padding: 15px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: #435e78; }
.bank-card:hover { background: #f6faff; border-color: #b9d2e9; }
.bank-card .bank-icon { width: 31px; height: 31px; flex-basis: 31px; font-size: var(--text-ui); }
.bank-card > span:not(.bank-icon) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.bank-card > svg { width: 18px; height: 18px; }
.bank-card strong { display: block; margin-bottom: 2px; color: #3e5d7c; font-size: var(--text-body); font-weight: 600; }
.bank-card small { color: #8b9aab; font-size: var(--text-caption); }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.info-grid > .panel { height: 100%; }
.prose { padding: 18px; color: #52677e; font-size: var(--text-body); line-height: var(--line-copy); }
.prose p:last-child, .prose ul:last-child { margin-bottom: 0; }
.prose h2 { margin-top: 23px; margin-bottom: 11px; font-size: 1.25rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 18px; margin-bottom: 9px; color: #3b5c7b; font-size: 1.125rem; }
.prose strong { color: #49627c; }
.faq details { padding: 0 18px; border-bottom: 1px solid #e9eef4; }
.faq details:last-child { border-bottom: 0; }
.faq summary { padding: 14px 22px 14px 0; color: #486782; font-size: var(--text-body); font-weight: 500; cursor: pointer; }
.faq details[open] summary { color: var(--primary); }
.faq details p { margin: 0; padding: 0 0 16px; color: #52677e; font-size: var(--text-body); line-height: var(--line-copy); }

/* Footer */
.footer { padding: 26px 0 20px; border-top: 1px solid var(--border); background: #fff; color: var(--muted); font-size: var(--text-caption); }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 18px 24px; margin-bottom: 16px; }
.footer .brand { gap: 8px; }
.footer .brand-mark { width: 31px; height: 31px; border-radius: 6px; }
.footer .brand-mark svg { width: 21px; height: 21px; }
.footer .brand strong { font-size: 1.125rem; }
.footer .brand small { font-size: var(--text-caption); margin-top: 1px; letter-spacing: 1px; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 24px; font-size: var(--text-ui); }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: #526980; }
.footer-links a:hover { color: var(--primary); }
.footer p { margin-bottom: 7px; font-size: var(--text-caption); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding-top: 16px; border-top: 1px solid #edf0f4; color: var(--muted); font-size: var(--text-caption); }
.footer-copyright { flex-shrink: 0; }
.footer-records { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; max-width: 100%; }
.footer-records a { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; min-height: 40px; max-width: 100%; padding: 6px 11px; border: 1px solid #e6ecf2; border-radius: 6px; background: #f8fafc; color: #536b82; line-height: 1.7; }
.footer-records a:hover { border-color: #bdd5eb; background: var(--soft-blue); color: var(--primary); }
.footer-records .record-label { color: #65788c; font-weight: 500; }
.footer-records a > span:last-child { min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.back-top { position: fixed; right: 22px; bottom: 24px; z-index: 10; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid #d6e1ec; border-radius: 6px; background: #fffffff5; box-shadow: 0 3px 14px #123f7010; color: #6b849e; font-size: 1.125rem; }
.back-top:hover { border-color: #b1cae3; color: var(--primary); background: #f6faff; }
.back-top svg { width: 19px; height: 19px; }

@media (min-width: 1440px) {
  .container { width: 1200px; }
}

@media (max-width: 1100px) {
  .container { width: calc(100% - 40px); }
  .masthead { gap: 22px; }
  .header-description { padding-left: 22px; font-size: var(--text-ui); }
  .header-tools { gap: 15px; font-size: var(--text-ui); }
  .main-nav a { padding-inline: 19px; }
  .layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; }
  .panel-head { padding-inline: 16px; }
  .currency-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bank-directory section > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .link-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .header-description { font-size: var(--text-ui); }
  .header-tools { display: none; }
  .main-nav a { flex: 1 0 auto; padding-inline: 16px; font-size: var(--text-ui); }
  .layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; }
  .converter-title { padding-inline: 16px; }
  .converter form { padding-inline: 16px; }
  .conversion-result { margin-inline: 16px; }
  .bank-grid { grid-template-columns: 1fr; padding-block: 7px; }
  .bank-grid a { min-height: 39px; }
  .info-grid { grid-template-columns: minmax(0, 1fr); }
  .chart-source { width: 100%; margin-left: 0; }
  .pair-equivalents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  body { font-size: var(--text-body); }
  .container { width: calc(100% - 32px); }
  .topline { font-size: var(--text-caption); }
  .topline > .container { min-height: 29px; gap: 8px; }
  .masthead { min-height: 84px; gap: 18px; }
  .masthead::before { height: 113px; }
  .brand { gap: 8px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 7px; }
  .brand-mark svg { width: 26px; height: 26px; }
  .brand strong { font-size: 1.4375rem; }
  .brand small { font-size: var(--text-caption); letter-spacing: 1.1px; }
  .header-description { padding-left: 17px; font-size: var(--text-ui); }
  .nav-shell > .container { width: 100%; }
  .main-nav { overflow-x: auto; scrollbar-width: none; padding-inline: 8px; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { min-height: 46px; padding-inline: 17px; font-size: var(--text-ui); }
  .main-nav a svg { display: none; }
  main.container { padding-top: 16px; padding-bottom: 28px; }
  .page-heading { align-items: flex-start; gap: 12px; margin-bottom: 18px; }
  h1 { font-size: 1.5rem; margin-bottom: 6px; }
  .eyebrow { font-size: var(--text-caption); letter-spacing: 1.2px; }
  .page-heading p { font-size: var(--text-ui); }
  .status-pill { margin-top: 3px; padding: 5px 8px; font-size: var(--text-caption); }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .layout > .primary, .layout > .sidebar { display: contents; }
  .sidebar > .converter { grid-row: 1; }
  .sidebar > .panel:last-child { grid-column: auto; }
  .panel-head { gap: 8px; padding: 14px 16px; }
  h2 { font-size: 1.125rem; }
  .panel-action { font-size: var(--text-ui); }
  .matrix-note { padding: 10px 13px; font-size: var(--text-caption); }
  .bank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 7px; }
  .bank-grid a { min-height: 42px; }
  .chart-head { padding-inline: 16px; }
  .chart-summary { padding-inline: 17px; }
  .chart-source { width: auto; margin-left: auto; }
  .tabs button, .tabs a { min-height: 36px; padding-inline: 10px; }
  #chart-content { min-height: 190px; }
  .trend-chart { min-height: 185px; }
  .bank-directory section > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .currency-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 15px; }
  .currency-card { min-height: 88px; gap: 8px; padding: 12px; }
  .currency-card .currency-label { gap: 6px; }
  .currency-details { text-align: left; }
  .currency-details strong { font-size: var(--text-ui); }
  .link-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 15px; }
  .info-grid { gap: 16px; }
  .footer { padding-top: 24px; }
  .footer-top { align-items: flex-start; margin-bottom: 17px; }
  .footer-links { justify-content: flex-end; gap: 7px 17px; font-size: var(--text-ui); }
  .footer p { font-size: var(--text-caption); line-height: 1.9; }
  .back-top { right: 13px; bottom: 16px; width: 40px; height: 40px; }
}

@media (max-width: 560px) {
  .container { width: calc(100% - 24px); }
  .topline > .container { min-height: 28px; }
  .topline > .container > :nth-child(2) { display: none; }
  .masthead { min-height: 79px; justify-content: space-between; gap: 12px; }
  .header-description { border: 0; padding-left: 0; color: #8190a0; font-size: var(--text-ui); text-align: right; line-height: 1.8; }
  .header-description > span { display: none; }
  .brand strong { font-size: 1.375rem; }
  .brand small { font-size: var(--text-caption); letter-spacing: 1px; }
  .brand-mark { width: 34px; height: 34px; }
  .main-nav { gap: 0; padding-inline: 0; }
  .main-nav a { flex: 0 0 auto; min-height: 46px; padding-inline: 16px; font-size: var(--text-ui); }
  .breadcrumbs { margin-bottom: 15px; font-size: var(--text-ui); }
  .page-heading { flex-wrap: wrap; gap: 9px; margin-bottom: 16px; }
  .page-heading > div { width: 100%; }
  .page-heading h1 { font-size: 1.5rem; }
  .page-heading p { font-size: var(--text-ui); line-height: 1.8; }
  .eyebrow { margin-bottom: 4px; }
  .status-pill { padding: 4px 8px; font-size: var(--text-caption); }
  .layout { gap: 18px; }
  .panel { border-radius: 6px; }
  .panel-head { padding: 13px 14px; }
  h2 { font-size: 1.125rem; }
  .panel-head .section-icon svg { width: 17px; height: 17px; }
  .panel-body { padding: 15px; }
  .panel-action { font-size: var(--text-ui); }
  .rates-matrix .currency-label { gap: 4px; }
  .matrix-note { gap: 6px; font-size: var(--text-caption); }
  .sidebar > .converter { grid-row: 1; }
  .sidebar > .panel:last-child { grid-column: auto; }
  .converter-title { padding: 17px 18px 0; }
  .converter form { padding: 16px 18px 0; }
  .converter-title p { font-size: var(--text-caption); }
  .field { gap: 7px; margin-bottom: 15px; }
  .field label { font-size: var(--text-ui); }
  .field input, .field select { height: 45px; font-size: var(--text-body); }
  .currency-select-row select { padding-left: 9px; font-size: var(--text-body); }
  .button { min-height: 44px; }
  .conversion-result { margin: 17px 18px; }
  .result-value strong { font-size: 1.9375rem; }
  .quick-amounts { gap: 8px; }
  .quick-amounts button { min-height: 36px; font-size: var(--text-caption); }
  .mini-links { padding-bottom: 17px; }
  .converter-note { padding-inline: 18px; }
  .mini-links button, .mini-links a { min-height: 36px; }
  .pair-list { padding-inline: 16px; }
  .pair-list > .pair-item, .pair-list a.pair-name { min-height: 46px; font-size: var(--text-ui); }
  .pair-value { font-size: var(--text-ui); }
  .bank-grid { gap: 1px 12px; padding: 10px 16px; }
  .bank-grid a { min-height: 44px; font-size: var(--text-ui); }
  .note-list { padding: 13px 17px 13px 29px; font-size: var(--text-ui); }
  .chart-head { gap: 8px; padding: 14px 14px 0; }
  .chart-head .tabs { margin-left: auto; }
  .tabs { gap: 1px; }
  .tabs button, .tabs a { min-height: 36px; padding: 5px 8px; font-size: var(--text-ui); }
  .chart-summary { gap: 6px; padding: 12px 15px 0; }
  .chart-value { font-size: 1.5625rem; }
  .chart-unit { font-size: var(--text-ui); }
  .chart-source { width: 100%; margin-left: 0; font-size: var(--text-caption); }
  #chart-content { padding: 0 3px 0 0; min-height: 180px; }
  .trend-chart { min-height: 175px; }
  .chart-axis { font-size: var(--text-ui); }
  .chart-footer { padding: 9px 14px 11px; font-size: var(--text-caption); }
  .filter-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 13px 14px; }
  .filter-bar form { width: 100%; }
  .filter-bar .field { min-width: 0; }
  .filter-bar .field select { flex: 1; width: 100%; min-width: 0; height: 42px; }
  .filter-bar .button { min-height: 42px; }
  .filter-bar .table-caption { padding: 0; }
  .filter-bar #table-feedback { justify-self: end; color: var(--muted); font-size: var(--text-caption); }
  .segmented { width: 100%; }
  .segmented button, .segmented a { flex: 1; min-height: 42px; }
  .section-description { margin: 13px 0; padding-inline: 14px; font-size: var(--text-ui); }
  .table-caption { padding: 11px 14px; font-size: var(--text-caption); }
  .notice { padding: 11px 13px; font-size: var(--text-ui); }
  .directory-tools { flex-wrap: wrap; padding: 13px 14px; gap: 7px; }
  .directory-tools input { max-width: none; height: 43px; }
  .directory-tools > span { font-size: var(--text-ui); }
  .currency-directory { grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 13px; }
  .currency-card { padding: 12px 13px; min-height: 83px; }
  .currency-card .currency-label { gap: 5px; }
  .currency-card .currency-code { font-size: var(--text-ui); }
  .currency-card .currency-name { font-size: var(--text-ui); }
  .currency-details { font-size: var(--text-caption); }
  .currency-details strong { font-size: var(--text-ui); }
  .pair-quote { gap: 7px; font-size: var(--text-ui); }
  .pair-quote strong { font-size: 2.1875rem; }
  .pair-equivalents { gap: 9px; }
  .pair-equivalents > div { padding: 11px; }
  .bank-directory section > div { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .bank-card { min-height: 77px; padding: 12px 10px; gap: 8px; }
  .bank-card .bank-icon { width: 26px; height: 26px; flex-basis: 26px; }
  .bank-card strong { font-size: var(--text-body); }
  .bank-card small { font-size: var(--text-caption); }
  .link-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 13px; }
  .link-grid a { min-height: 44px; padding: 7px 4px; font-size: var(--text-ui); }
  .prose { padding: 15px; font-size: var(--text-body); }
  .faq details { padding-inline: 15px; }
  .faq summary { padding-block: 15px; font-size: var(--text-body); }
  .faq details p { font-size: var(--text-body); }
  .footer { padding-top: 22px; }
  .footer-top { flex-direction: column; gap: 15px; margin-bottom: 16px; }
  .footer-links { justify-content: flex-start; gap: 0 20px; }
  .footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .footer-bottom { align-items: flex-start; gap: 10px; font-size: var(--text-caption); line-height: 1.9; }
  .footer-records { width: 100%; gap: 8px; }
  .footer-records a { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  body { background: #fff; color: #000; }
  .container { width: 100%; }
  .topline, .header-tools, .nav-shell, .sidebar, .back-top, .footer-links, .skip-link { display: none; }
  .masthead { min-height: 70px; }
  .layout { display: block; }
  .panel { break-inside: avoid; margin-bottom: 16px; box-shadow: none; }
  .table-wrap { overflow: visible; }
  .rates-matrix { min-width: 0; }
  .rates-matrix th:first-child { width: 104px; }
  a { color: inherit; }
}

@media (max-width: 767px) {
  .quick-amounts button, .tabs button, .mini-links a, .mini-links button { min-height: 44px; }
  .field select, .field input { font-size: var(--text-body); }
  .currency-select-row select { font-size: var(--text-body); }
}

/* Data provenance, crawlable history and query guidance share the site's panels. */
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 7px; padding: 0; margin: 0; list-style: none; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 7px; }
.breadcrumbs li + li::before { content: '›'; color: #7a899a; }
.history-records { margin: 12px 0; border-top: 1px solid var(--border); }
.history-records summary { padding: 12px 8px; cursor: pointer; color: var(--primary); font-size: var(--text-ui); }
.history-records > p { padding: 0 8px; color: #63758a; font-size: var(--text-ui); }
.history-records table { min-width: 510px; }
.data-table caption { padding: 10px 12px; text-align: left; color: #63758a; font-size: var(--text-caption); }
.reference-evidence { min-width: 650px; }
.reference-groups { display: grid; gap: 16px; padding: 18px; background: #f8fafc; }
.reference-group { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.reference-group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 13px 16px; border-bottom: 1px solid var(--border); background: var(--soft-blue); }
.reference-group-head h3 { min-width: 0; margin: 0; font-size: 1rem; line-height: var(--line-ui); }
.reference-group-head .badge { flex-shrink: 0; }
.reference-group-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; padding: 9px 16px; border-bottom: 1px solid var(--border); }
.reference-group-note { flex: 1 1 180px; margin: 0; color: var(--muted); font-size: var(--text-ui); line-height: var(--line-body); }
.reference-group-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--muted); font-size: var(--text-caption); }
.reference-group-time { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 3px 7px; }
.reference-group-time .quote-time-value { display: inline; white-space: nowrap; }
.reference-group-time .quote-time-note { display: inline; margin: 0; }
.currency-reference-table { min-width: 600px; }
.currency-reference-table th, .currency-reference-table td { padding: 12px 14px; }
.currency-reference-table .currency-label { min-width: 130px; }
.currency-reference-table .number { white-space: nowrap; }
.table-time-summary { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 3px 7px; padding: 10px 18px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: var(--text-ui); line-height: var(--line-body); }
.table-time-summary .quote-time-value { white-space: nowrap; }
.table-time-summary .quote-time-note { margin-top: 2px; }
.time-zone { color: var(--muted); }
@media (max-width: 767px) {
  .reference-groups { gap: 12px; padding: 14px; }
  .reference-group-head { padding: 12px; }
  .reference-group-meta { padding: 8px 12px; }
  .currency-reference-table th, .currency-reference-table td { padding: 11px 12px; }
  .table-time-summary { padding-inline: 12px; }
  .chart-tooltip { white-space: normal; }
}
.seo-panel .prose { font-size: var(--text-body); line-height: var(--line-copy); }
.seo-panel .prose h3 { margin-top: 22px; font-size: 1.125rem; }
.seo-panel .prose h3:first-child { margin-top: 0; }
.faq details p { font-size: var(--text-body); color: #52677e; }
.faq summary { font-size: var(--text-body); min-height: 48px; }
@media (max-width: 767px) { .seo-panel .prose { font-size: var(--text-body); } .history-records summary { min-height: 48px; } }

.bank-table.compact-table { min-width: 360px; }
.unavailable-currencies { display: flex; flex-wrap: wrap; gap: 14px 24px; padding: 16px; }
.unavailable-currencies > span { min-width: 150px; }

.international-method, .international-date small { display: block; margin-top: 5px; color: var(--muted); font-size: var(--text-caption); font-weight: 400; line-height: var(--line-ui); }
.international-date time { display: block; white-space: nowrap; }
.home-institution-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; padding: 0 16px 16px; }
.home-institution-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.home-institution-heading { padding: 12px 14px 10px; border-bottom: 1px solid var(--border); background: #f8fafc; }
.home-institution-heading h3 { margin: 0 0 6px; font-size: 1rem; line-height: 1.5; }
.home-institution-heading h3 a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; color: var(--ink); }
.home-institution-heading h3 a:hover { color: var(--primary); }
.home-institution-heading h3 svg { width: 14px; height: 14px; color: var(--muted); }
.home-institution-meta { display: grid; gap: 4px; color: var(--muted); font-size: var(--text-caption); line-height: 1.6; }
.home-institution-meta .international-date { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 7px; }
.home-institution-meta .international-date time, .home-institution-meta .international-date small { display: inline; margin: 0; font: inherit; }
.home-institution-method { color: var(--muted); }
.home-institution-quotes { flex: 1; margin: 0; padding: 0 14px; list-style: none; }
.home-institution-quotes li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-width: 0; padding: 8px 0; }
.home-institution-quotes li + li { border-top: 1px solid #edf0f4; }
.home-institution-pair { min-width: 0; line-height: 1.5; }
.home-institution-pair-name { display: block; color: var(--ink); font-size: var(--text-ui); overflow-wrap: anywhere; }
.home-institution-pair-code { display: block; margin-top: 2px; color: var(--muted); font-size: var(--text-caption); }
.home-institution-pair[href] .home-institution-pair-name { color: var(--primary); }
.home-institution-pair[href]:hover .home-institution-pair-name { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }
.home-institution-quotes .native-quote-value { padding-block: 4px; white-space: nowrap; color: var(--ink); font-size: var(--text-ui); font-weight: 600; }
.home-institution-all { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 10px 14px; border-top: 1px solid var(--border); color: var(--primary); background: #fbfcfe; font-size: var(--text-caption); }
.home-institution-all:hover { background: var(--soft-blue); }
.home-institution-all svg { width: 14px; height: 14px; }
@media (max-width: 767px) {
  .home-institution-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-inline: 12px; padding-bottom: 12px; }
}
@media print {
  .home-institution-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-institution-card { break-inside: avoid; }
}
.home-international-scroll { max-height: 620px; overflow: auto; }
.home-international-scroll:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.home-international-matrix { width: calc(190px + var(--institution-columns, 1) * 124px); min-width: 100%; table-layout: fixed; }
.home-international-matrix th, .home-international-matrix td { padding: 9px 7px; border-right: 1px solid var(--border); text-align: center; vertical-align: middle; }
.home-international-matrix thead th { position: sticky; top: 0; z-index: 2; background: #f5f8fc; white-space: normal; }
.home-international-matrix th:first-child { position: sticky; left: 0; z-index: 1; width: 190px; padding-inline: 12px; text-align: left; background: var(--surface); box-shadow: 1px 0 var(--border); }
.home-international-matrix thead th:first-child { z-index: 3; background: #f5f8fc; }
.home-international-matrix tbody tr:hover th:first-child { background: #f7faff; }
.home-international-matrix th:last-child, .home-international-matrix td:last-child { border-right: 0; }
.home-international-institution { display: flex; align-items: center; justify-content: center; min-height: 40px; font-weight: 500; font-size: var(--text-ui); line-height: 1.5; }
.home-international-matrix .international-date { margin-top: 4px; color: var(--muted); font-weight: 400; font-size: var(--text-caption); line-height: 1.5; }
.home-international-matrix .international-date small { margin-top: 2px; }
.home-international-matrix .international-method { margin-top: 4px; }
.home-international-matrix .native-quote-value { white-space: nowrap; }
.home-international-no-quote { color: #aab6c2; }
.institution-rates .institution-native-scroll { max-height: none; overflow: visible; }
.institution-native-matrix { width: 100%; min-width: 0; }
.institution-native-matrix th:first-child { width: 44%; }
.institution-rates .home-international-matrix .native-quote-value { max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
@media (max-width: 767px) {
  .international-reference-panel .panel-head { align-items: flex-start; flex-wrap: wrap; gap: 6px; }
  .home-international-scroll { max-height: 560px; }
  .home-international-matrix { width: calc(148px + var(--institution-columns, 1) * 124px); }
  .home-international-matrix th:first-child { width: 148px; padding-inline: 10px; }
  .home-international-institution { font-size: var(--text-caption); }
  .institution-native-matrix { width: 100%; }
  .institution-native-matrix th:first-child { width: 48%; }
}
@media print {
  .home-international-scroll { max-height: none; overflow: visible; }
  .home-international-matrix { width: 100%; min-width: 0; font-size: 8pt; }
  .home-international-matrix th, .home-international-matrix td { padding: 3px; position: static !important; }
  .home-international-matrix th:first-child { width: 18%; }
  .home-international-matrix .flag, .home-international-matrix .currency-pair-icons { display: none; }
  .home-international-matrix .native-quote-value { padding: 0; min-height: 0; }
  .home-international-matrix .cny-row-identity > strong, .home-international-matrix .cny-row-identity > small,
  .home-international-matrix .international-method, .home-international-matrix .international-date,
  .home-international-institution { font-size: inherit; }
}
.layout.layout-wide { grid-template-columns: minmax(0, 1fr); }

/* Homepage reference rates and shortcuts share the full content width. */
.layout-home .matrix-panel .rates-matrix { width: 100%; min-width: 100%; }
.layout-home .home-quick-panels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
.layout-home .home-quick-rates .pair-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding: 14px 16px; }
.layout-home .home-quick-rates .pair-list > .pair-item { flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; min-height: 106px; padding: 11px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.layout-home .home-quick-rates .pair-item:focus-within { border-color: #b9d2ec; }
.layout-home .home-quick-rates a.pair-name { flex: none; width: 100%; padding-block: 0; color: var(--ink); line-height: 1.5; }
.layout-home .home-quick-rates a.pair-name:hover, .layout-home .home-quick-rates a.pair-name:focus-visible { color: var(--primary); }
.layout-home .home-quick-rates .pair-name > span:not(.currency-pair-icons) { overflow-wrap: anywhere; text-wrap: balance; }
.layout-home .home-quick-rates .pair-name small { margin-top: 3px; }
.layout-home .home-quick-rates .pair-value { align-self: stretch; padding-left: 26px; }
.layout-home .home-bank-links .bank-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding: 14px 16px; }
.layout-home .home-bank-links .bank-grid > a { min-width: 0; min-height: 52px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; color: var(--ink); line-height: 1.5; }
.layout-home .home-bank-links .bank-grid > a > span { min-width: 0; overflow-wrap: anywhere; }
.layout-home .home-bank-links .bank-grid > a:hover { border-color: #b9d2ec; color: var(--primary); background: var(--soft-blue); }
@media (max-width: 1100px) {
  .layout-home .home-quick-rates .pair-list,
  .layout-home .home-bank-links .bank-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .layout-home .home-quick-panels { gap: 18px; }
  .layout-home .home-quick-rates .pair-list,
  .layout-home .home-bank-links .bank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
  .layout-home .home-quick-rates .pair-list > .pair-item { min-height: 108px; padding: 10px 8px; }
  .pair-list .pair-name > svg { display: none; }
  .layout-home .home-bank-links .bank-grid > a { padding-inline: 8px; }
}
.institution-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 4px 18px 18px; }
.institution-card { display: flex; flex-direction: column; min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.institution-card h2 { margin: 0; font-size: 1rem; line-height: var(--line-ui); }
.institution-card h2 a { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.institution-card h2 svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 4px; }
.institution-method { margin: 7px 0 12px; color: var(--muted); font-size: var(--text-caption); }
.institution-counts { margin: 0; font-size: var(--text-ui); }
.institution-counts strong { font-size: 1.25rem; font-weight: 600; }
.institution-counts > span { margin: 0 7px; color: var(--muted); }
.institution-currency-preview { flex-grow: 1; margin: 9px 0 16px; color: var(--muted); font-size: var(--text-ui); }
.institution-card .international-date { padding-top: 12px; border-top: 1px solid var(--border); font-size: var(--text-ui); }
.institution-detail-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 10px 0 -8px; font-size: var(--text-ui); }
.institution-detail-link svg { width: 15px; height: 15px; }
.institution-currency-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0 18px 18px; list-style: none; }
.institution-currency-grid li { padding: 11px 12px; border-bottom: 1px solid var(--border); font-size: var(--text-ui); overflow-wrap: anywhere; }
.institution-currency-grid li > a { display: block; min-height: 44px; color: var(--ink); }
.institution-currency-grid li > a:hover { color: var(--primary); }
.institution-currency-grid small, .institution-rate-table small { display: block; margin-top: 3px; color: var(--muted); font-size: var(--text-caption); font-weight: 400; }
.institution-rate-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; background: var(--soft-blue); font-size: var(--text-ui); }
.institution-rate-summary > span { color: var(--muted); text-align: right; }
.institution-rate-summary .international-date small { margin-top: 2px; }
.institution-rate-table { min-width: 0; table-layout: fixed; }
.institution-rate-table th, .institution-rate-table td { width: 33.333%; white-space: normal; overflow-wrap: anywhere; }
.institution-rate-table tbody th { font-weight: 500; }
.layout-wide .currency-directory { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-wide .currency-card { min-height: 88px; }
.currency-pair-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0 18px 16px; }
.currency-pair-chooser > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 60px; padding: 14px 18px; list-style: none; cursor: pointer; }
.currency-pair-chooser > summary::-webkit-details-marker { display: none; }
.currency-pair-chooser > summary > span { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); font-size: 1rem; font-weight: 600; }
.currency-pair-chooser > summary > small { display: inline-flex; align-items: center; gap: 3px; color: var(--primary); font-size: var(--text-caption); }
.currency-pair-chooser > summary > small svg { width: 13px; height: 13px; }
.currency-pair-chooser[open] > summary { border-bottom: 1px solid var(--border); }
.currency-pair-chooser[open] > summary > small svg { transform: rotate(90deg); }
.currency-pair-chooser > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px; }
.currency-pair-grid > a { display: grid; grid-template-columns: minmax(0, 1fr) 14px; align-items: center; gap: 0 8px; min-height: 53px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 5px; color: var(--ink); font-size: var(--text-ui); }
.currency-pair-grid > a:hover { border-color: #b7d0e9; background: var(--soft-blue); color: var(--primary); }
.currency-pair-grid small { grid-column: 1; color: var(--muted); font-size: var(--text-caption); }
.currency-pair-grid svg { grid-column: 2; grid-row: 1 / span 2; width: 14px; height: 14px; color: var(--primary); }
.currency-pair-more { border-top: 1px solid var(--border); }
.currency-pair-more > summary, .provider-more > summary { min-height: 44px; padding: 11px 18px; color: var(--primary); font-size: var(--text-ui); cursor: pointer; }
.currency-pair-more > summary:focus-visible, .provider-more > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px; border-radius: 4px; }
.currency-pair-more[open] > summary, .provider-more[open] > summary { background: var(--soft-blue); }
.currency-pair-more .currency-pair-grid { padding-top: 12px; }
.provider-category-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 18px 18px; }
.provider-category-nav > a { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 5px; font-size: var(--text-ui); background: var(--surface); }
.provider-category-nav > a:hover { background: var(--soft-blue); }
.provider-category-nav span { color: var(--muted); font-size: var(--text-caption); }
.provider-category { padding: 0 18px 20px; scroll-margin-top: 18px; }
.provider-category-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--border); }
.provider-category-heading h3 { margin: 0; font-size: 1rem; }
.provider-category-heading > span { color: var(--muted); font-size: var(--text-caption); }
.currency-provider-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 12px; }
.currency-provider-card { min-width: 0; overflow: hidden; padding: 14px 12px 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.provider-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.provider-card-heading h4 { min-width: 0; margin: 0; font-size: .9375rem; line-height: var(--line-ui); }
.provider-card-heading h4 a { display: inline-flex; align-items: start; gap: 4px; }
.provider-card-heading svg { width: 13px; height: 13px; flex-shrink: 0; margin-top: 5px; }
.provider-card-heading > span { flex-shrink: 0; color: var(--muted); font-size: var(--text-caption); line-height: 2; }
.provider-method { margin: 4px 0 7px; color: var(--muted); font-size: var(--text-caption); line-height: var(--line-ui); }
.provider-time { color: var(--muted); font-size: var(--text-caption); line-height: var(--line-ui); overflow-wrap: anywhere; }
.provider-time .quote-time-value { white-space: normal; }
.provider-time .quote-time-note { display: inline; margin-left: 6px; font-size: inherit; }
.provider-shared-time { min-height: 32px; margin-bottom: 8px; }
.provider-mixed-time { min-height: 32px; margin: 0 0 8px; color: var(--muted); font-size: var(--text-caption); }
.provider-rate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.provider-rate { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 6px; align-content: start; min-width: 0; padding: 9px 0; border-top: 1px solid var(--border); }
.provider-rate-name { color: var(--ink); font-size: var(--text-ui); overflow-wrap: anywhere; }
.provider-rate-code { align-self: start; color: var(--muted); font-size: var(--text-caption); line-height: 1.9; }
.provider-rate-value { grid-column: 1 / -1; color: var(--navy); font-size: 1rem; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; }
.provider-rate-method { grid-column: 1 / -1; color: var(--muted); font-size: var(--text-caption); line-height: var(--line-ui); }
.provider-rate .provider-time { grid-column: 1 / -1; margin-top: 3px; }
.provider-rate-grid > .provider-rate:only-child { grid-column: 1 / -1; }
.provider-pair-link { display: inline-flex; align-items: center; gap: 3px; grid-column: 1 / -1; min-height: 34px; padding-top: 4px; font-size: var(--text-caption); }
.provider-pair-link svg { width: 12px; height: 12px; }
.currency-bank-aggregate { overflow: hidden; border: 1px solid var(--border); border-radius: 6px; }
.bank-pair-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--soft-blue); }
.bank-pair-link { display: inline-flex; align-items: center; gap: 3px; min-height: 36px; font-size: var(--text-ui); }
.bank-pair-link svg { width: 12px; height: 12px; }
.bank-pair-links > span { color: var(--muted); font-size: var(--text-caption); }
.currency-bank-table { min-width: 0; table-layout: auto; }
.currency-bank-table th, .currency-bank-table td { white-space: normal; vertical-align: middle; }
.currency-bank-table th:first-child { width: 1%; }
.currency-bank-table .bank-name { display: inline-flex; align-items: center; gap: 8px; }
.currency-bank-table .bank-icon { width: 24px; height: 24px; flex-basis: 24px; }
.currency-bank-table .provider-rate { display: flex; justify-content: flex-end; align-items: baseline; flex-wrap: wrap; gap: 3px 7px; padding: 0; border: 0; }
.currency-bank-table .provider-rate-value { font-size: var(--text-body); }
.currency-bank-table .provider-rate-name { white-space: nowrap; }
.bank-reference-method { display: block; color: var(--muted); font-size: var(--text-caption); }
.cny-institution-overview { display: grid; gap: 18px; min-width: 0; }
.cny-group-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.cny-group-nav a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 16px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--ink); font-size: var(--text-ui); }
.cny-group-nav a:hover { border-color: var(--primary); color: var(--primary); }
.cny-group-nav a span { color: var(--muted); font-size: var(--text-caption); }
.cny-matrix-intro { margin: -5px 0 0; color: var(--muted); font-size: var(--text-ui); }
.cny-matrix-panel { min-width: 0; margin: 0; scroll-margin-top: 20px; }
.cny-matrix-scroll:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.cny-matrix-panel[data-cny-group="card"] .cny-matrix-scroll { max-height: 650px; overflow-y: auto; }
.cny-rate-matrix { width: calc(188px + var(--institution-columns, 1) * 112px); min-width: 100%; table-layout: fixed; }
.cny-rate-matrix th, .cny-rate-matrix td { padding: 0; border-right: 1px solid #edf0f4; text-align: center; vertical-align: middle; }
.cny-rate-matrix thead th { position: sticky; top: 0; z-index: 2; height: 100px; }
.cny-rate-matrix th:first-child { position: sticky; left: 0; width: 188px; padding: 8px 14px; text-align: left; background: var(--surface); box-shadow: 1px 0 var(--border); z-index: 1; }
.cny-rate-matrix thead th:first-child { background: #f5f8fc; z-index: 3; }
.cny-rate-matrix tbody tr:hover th:first-child { background: #f7faff; }
.cny-rate-matrix th:last-child, .cny-rate-matrix td:last-child { border-right: 0; }
.cny-currency-heading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 8px 6px; line-height: 1.35; }
.cny-currency-heading > span:not(.flag) { color: var(--ink); font-size: var(--text-ui); white-space: normal; }
.cny-currency-heading > small { color: var(--muted); font-size: var(--text-caption); }
.cny-institution-name { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 5px 0; color: var(--ink); font-size: var(--text-ui); font-weight: 500; white-space: normal; line-height: 1.55; }
.cny-institution-name .bank-icon { width: 24px; height: 24px; flex-basis: 24px; }
.card-rate-matrix .cny-rate-matrix thead th { height: 72px; }
.card-rate-matrix .cny-institution-name { padding-top: 4px; }
.card-rate-matrix .cny-institution-name > span { white-space: nowrap; }
.cny-institution-time { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 5px; margin-top: 4px; padding: 0 5px 6px; }
.cny-institution-time, .cny-cell-time, .cny-cache-note, .cny-time-exception-note { color: var(--muted); font-size: var(--text-caption); font-weight: 400; white-space: normal; line-height: 1.5; }
.cny-time-exception-note { display: block; padding: 0 4px 6px; }
.cny-institution-time .quote-time-note { display: inline; font-size: inherit; }
.cny-cell-time .quote-time-note { display: block; font-size: inherit; }
.cny-native-quote { padding: 5px 6px 8px; }
.cny-native-quote + .cny-native-quote { border-top: 1px dashed var(--border); }
.cny-quote-price { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 3px; }
.cny-price-field { width: 100%; color: var(--muted); font-size: var(--text-caption); line-height: 1.4; }
.native-quote-value { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 4px 3px; color: var(--primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.cny-pair-direction { display: block; color: var(--muted); font-size: var(--text-caption); line-height: 1.35; }
a.cny-cell-pair { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 3px 4px; color: var(--primary); }
a.cny-cell-pair:hover, a.cny-cell-pair:focus-visible, a.cny-table-pair:hover, a.cny-table-pair:focus-visible { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }
a.cny-table-pair { display: inline-flex; align-items: center; min-height: 44px; }
.cny-no-quote { color: #aab6c2; }
.cny-cell-time { margin-top: 5px; }
.currency-institution-overview { min-width: 0; }
.currency-reference-panel { min-width: 0; margin: 0; scroll-margin-top: 20px; }
.pair-provider-panel .currency-reference-providers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pair-provider-panel .currency-reference-provider { scroll-margin-top: 20px; }
.pair-record-detail { margin: 8px 0 0; color: var(--muted); font-size: var(--text-caption); line-height: 1.6; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .pair-provider-panel .currency-reference-providers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .pair-provider-panel .currency-reference-providers { grid-template-columns: minmax(0, 1fr); }
  .pair-provider-panel .currency-reference-provider.has-two-quotes { grid-column: 1 / -1; }
  .pair-provider-panel .currency-reference-provider.has-two-quotes > .central-reference-grid { grid-template-columns: minmax(0, 1fr); }
}
.currency-reference-providers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 16px; padding: 18px; }
.currency-reference-provider { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 7px; background: #fbfcfe; }
.currency-reference-provider.has-many-quotes { grid-column: 1 / -1; }
.currency-reference-provider.has-two-quotes { grid-column: span 2; }
.currency-reference-provider-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.currency-reference-provider-head h3 { display: flex; align-items: center; gap: 7px; min-width: 0; margin: 0; color: var(--navy); font-size: var(--text-ui); line-height: 1.6; }
.currency-reference-provider-head h3 a { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; }
.currency-reference-provider-head h3 a > svg { width: 12px; height: 12px; flex-shrink: 0; }
.currency-reference-provider-head .bank-icon { width: 24px; height: 24px; flex-basis: 24px; }
.currency-reference-provider-head > small { flex-shrink: 0; margin-top: 4px; color: var(--muted); font-size: var(--text-caption); }
.currency-reference-time { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 7px; margin: 5px 0 0; color: var(--muted); font-size: var(--text-caption); line-height: 1.6; }
.currency-reference-time .quote-time-value, .currency-reference-time .quote-time-note { display: inline; margin: 0; }
.currency-reference-method { margin: 4px 0 0; color: var(--muted); font-size: var(--text-caption); line-height: 1.6; }
.currency-reference-provider > .central-reference-grid { grid-template-columns: minmax(0, 1fr); padding: 13px 0 0; }
.currency-reference-provider.has-many-quotes > .central-reference-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.currency-reference-provider.has-two-quotes > .central-reference-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.currency-reference-provider:not(.has-many-quotes):not(.has-two-quotes) .currency-overview-quote { padding: 13px 0 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; }
.currency-overview-quote .bank-cross-price { flex-wrap: wrap; }
.currency-overview-quote .native-quote-value { min-width: 0; flex-shrink: 0; font-size: 1.125rem; line-height: 1.5; white-space: nowrap; }
.currency-overview-single .bank-cross-price { flex-direction: column; align-items: flex-start; gap: 2px; }
.currency-overview-single .native-quote-value { font-size: 1.5rem; }
.currency-overview-long .native-quote-value { font-size: 1.125rem; }
.currency-overview-quote .bank-cross-price-label { min-width: 0; }
.currency-reference-cache { margin: 10px 0 0; color: var(--muted); font-size: var(--text-caption); }
@media (max-width: 1100px) and (min-width: 768px) {
  .currency-reference-providers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .currency-reference-panel > .panel-head { align-items: flex-start; flex-wrap: wrap; gap: 6px; }
  .currency-reference-providers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
  .currency-reference-provider { padding: 11px 10px; }
  .currency-reference-provider-head { flex-wrap: wrap; gap: 0 6px; }
  .currency-reference-provider-head h3 { font-size: var(--text-ui); }
  .currency-reference-provider-head > small { margin-top: 0; }
  .currency-reference-provider.has-many-quotes > .central-reference-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .currency-overview-quote .native-quote-value { font-size: var(--text-body); }
  .currency-overview-single .native-quote-value { font-size: 1.25rem; }
  .currency-overview-long .native-quote-value { font-size: var(--text-ui); }
}
.cny-provider-quote-panel { min-width: 0; margin: 0; scroll-margin-top: 20px; }
.cny-provider-scroll { max-height: none; overflow-x: auto; }
.cny-provider-scroll:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.cny-provider-quote-table { min-width: 0; table-layout: auto; }
.cny-provider-quote-table th, .cny-provider-quote-table td { padding: 9px 12px; vertical-align: middle; }
.cny-provider-quote-table thead th { position: sticky; top: 0; z-index: 2; background: #f5f8fc; }
.cny-provider-quote-table th:first-child { position: sticky; left: 0; z-index: 1; width: 1%; text-align: left; background: var(--surface); box-shadow: 1px 0 var(--border); }
.cny-provider-quote-table thead th:first-child { z-index: 3; background: #f5f8fc; }
.cny-provider-quote-table tbody tr:hover th:first-child { background: #f7faff; }
.domestic-cny-institution { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; white-space: normal; font-weight: 500; }
.domestic-cny-institution .bank-icon { width: 24px; height: 24px; flex-basis: 24px; }
.cny-provider-quote-table .native-quote-value { display: inline-block; padding-block: 4px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.cny-provider-quote-table .buy .native-quote-value { color: var(--teal); }
.cny-provider-quote-table .domestic-cny-time-column { width: 150px; }
.cny-provider-quote-table .domestic-cny-time { white-space: normal; font-variant-numeric: tabular-nums; }
.domestic-cny-time .quote-time-note { display: block; color: var(--muted); font-size: var(--text-caption); }
.domestic-cny-common-time { color: var(--muted); font-size: var(--text-caption); }
.pair-other-quotes .panel-head { background: var(--soft-blue); }
.currency-other-cny-table thead th { background: #f8fafc; }
.currency-other-cny-table td.number, .currency-other-cny-table th[data-price-column] { text-align: center; }
.currency-matrix-panel .cny-matrix-scroll { max-height: 620px; overflow: auto; }
.currency-institution-method { display: block; padding: 0 5px 6px; color: var(--muted); font-size: var(--text-caption); font-weight: 400; line-height: 1.5; white-space: normal; }
.currency-institution-method > span { display: block; }
.currency-matrix-panel .cny-price-field { width: auto; min-width: 48px; }
.currency-matrix-panel .native-quote-value { white-space: nowrap; }
@media print {
  .cny-provider-scroll { overflow: visible; }
  .cny-provider-quote-table { min-width: 0; }
  .cny-provider-quote-table th, .cny-provider-quote-table td { position: static; }
  .currency-matrix-panel .cny-matrix-scroll { max-height: none; overflow: visible; }
  .currency-matrix-panel .cny-rate-matrix { width: 100%; min-width: 0; }
  .currency-matrix-panel .cny-rate-matrix th, .currency-matrix-panel .cny-rate-matrix td { position: static; }
}
@media (max-width: 767px) {
  .cny-provider-quote-panel .panel-head { align-items: flex-start; flex-wrap: wrap; gap: 6px; }
  .cny-provider-quote-table th, .cny-provider-quote-table td { padding-inline: 10px; }
  .cny-institution-overview { gap: 14px; }
  .cny-group-nav { gap: 6px; }
  .cny-group-nav a { gap: 7px; padding-inline: 10px; }
  .cny-matrix-panel .panel-head { align-items: flex-start; flex-wrap: wrap; gap: 6px; }
  .cny-rate-matrix { width: calc(154px + var(--institution-columns, 1) * 132px); }
  .cny-rate-matrix th:first-child { width: 154px; padding: 10px; }
  .cny-matrix-panel[data-cny-group="card"] .cny-matrix-scroll { max-height: 580px; }
  .cny-institution-name { font-size: var(--text-caption); gap: 6px; }
  .cny-institution-name .bank-icon { width: 20px; height: 20px; flex-basis: 20px; }
  .cny-currency-heading > span:not(.flag) { font-size: var(--text-caption); }
  a.cny-cell-pair { min-height: 44px; }
  .currency-matrix-panel .cny-matrix-scroll { max-height: 580px; }
}
.native-price-field { display: block; font-size: var(--text-caption); color: var(--muted); }
.native-price-field strong { color: var(--ink); font-size: var(--text-ui); }
.published-pair-table { font-size: var(--text-ui); }
.published-pair-table th, .published-pair-table td { padding: 12px; }
.published-pair-table .quote-time-note { display: block; max-width: 170px; white-space: normal; font-size: var(--text-caption); font-weight: 400; color: var(--muted); }
.published-pair-table td.number { white-space: nowrap; }
.bank-native-cross-panel { min-width: 0; scroll-margin-top: 20px; }
.bank-native-cross-scroll { max-height: 600px; overflow: auto; }
.bank-native-cross-scroll:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.bank-native-cross-table { min-width: 480px; }
.bank-native-cross-table th, .bank-native-cross-table td { padding: 9px 14px; vertical-align: middle; }
.bank-native-cross-table thead th { position: sticky; top: 0; z-index: 2; background: #f5f8fc; }
.bank-native-cross-table th:first-child { position: sticky; left: 0; min-width: 170px; background: var(--surface); box-shadow: 1px 0 var(--border); z-index: 1; }
.bank-native-cross-table thead th:first-child { z-index: 3; background: #f5f8fc; }
.bank-native-cross-table tbody tr:hover th:first-child { background: #f7faff; }
.bank-native-cross-table .quote-time { min-width: 140px; white-space: normal; }
.bank-native-cross-table .quote-time-note { display: block; font-size: var(--text-caption); }
.bank-native-cross-table .cny-row-identity strong { white-space: normal; }
@media (max-width: 767px) {
  .bank-native-cross-panel .panel-head { align-items: flex-start; flex-wrap: wrap; gap: 6px; }
  .bank-native-cross-scroll { max-height: 560px; }
  .bank-native-cross-table th, .bank-native-cross-table td { padding: 8px 10px; }
  .bank-native-cross-table th:first-child { min-width: 148px; }
}
.swap-button:disabled { cursor: default; opacity: .4; }
.currency-bank-table .quote-time-value { white-space: normal; }
.currency-bank-table .quote-time-note { display: block; color: var(--muted); font-size: var(--text-caption); }
.provider-more { margin-inline: -12px; border-top: 1px solid var(--border); }
.provider-more > summary { padding-inline: 12px; font-size: var(--text-caption); }
.provider-more > .provider-rate-grid { padding: 0 12px; }
.provider-cache-note { margin: 0 -12px; padding: 8px 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: var(--text-caption); }
.pair-currency-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.pair-currency-links > span { margin-right: 4px; color: var(--muted); font-size: var(--text-caption); }
.pair-currency-links a { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 4px; font-size: var(--text-ui); }
.pair-currency-links a:hover { background: var(--soft-blue); }
.pair-currency-links small { color: var(--muted); font-size: var(--text-caption); }
.pair-currency-links svg { width: 12px; height: 12px; }
@media (max-width: 1000px) {
  .currency-provider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-wide .currency-directory { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .currency-pair-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .institution-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .institution-currency-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .currency-bank-table th, .currency-bank-table td { padding: 10px 8px; }
  .currency-bank-table .bank-name { gap: 5px; font-size: var(--text-caption); }
  .currency-bank-table .bank-icon { width: 20px; height: 20px; flex-basis: 20px; }
  .currency-bank-table .quote-time { font-size: var(--text-caption); }
  .currency-bank-table .provider-rate { gap: 2px 4px; }
  .currency-bank-table .provider-rate-value { font-size: var(--text-ui); }
  .currency-bank-table .provider-rate-name { font-size: var(--text-caption); }
  .currency-bank-table .provider-rate-code { display: none; }
  .currency-provider-grid { grid-template-columns: minmax(0, 1fr); }
  .currency-pair-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 14px; }
  .currency-pair-grid > a { padding-inline: 10px; }
  .provider-category { padding-inline: 14px; }
  .provider-category-nav { margin-inline: 14px; }
  .provider-category-nav > a { min-height: 44px; padding-inline: 9px; }
  .layout-wide .currency-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-wide .currency-card { gap: 5px; padding: 10px; }
  .layout-wide .currency-card .currency-label { column-gap: 5px; }
  .layout-wide .currency-card .currency-code { min-width: 0; }
  .pair-currency-links { gap: 6px; padding: 10px; }
  .pair-currency-links > span { width: 100%; }
  .institution-grid { grid-template-columns: minmax(0, 1fr); padding: 0 14px 14px; gap: 12px; }
  .institution-currency-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 8px; }
  .institution-rate-summary { align-items: flex-start; padding-inline: 14px; }
  .institution-rate-summary > span { max-width: 45%; }
  .institution-rate-table th, .institution-rate-table td { padding: 12px 9px; font-size: var(--text-caption); }
}

/* Currency labels remain fixed while institution columns scroll. */
.cny-row-currency { display: flex; align-items: center; gap: 8px; white-space: normal; }
.cny-row-currency > .flag { flex-basis: 20px; }
.cny-row-identity { display: grid; gap: 2px; min-width: 0; }
.cny-row-identity > strong { color: var(--ink); font-size: var(--text-ui); font-weight: 500; line-height: 1.5; }
.cny-row-identity > small { color: var(--muted); font-size: var(--text-caption); font-weight: 400; }
@media (max-width: 767px) {
  .cny-row-currency { gap: 6px; }
  .cny-row-identity > strong { font-size: var(--text-caption); }
  .cny-institution-name { min-height: 40px; }
}

/* Ordinary quote tables size each column from its heading and longest value. */
.data-table.quote-content-table { width: auto; min-width: 0; max-width: 100%; table-layout: auto; }
.quote-content-table th:first-child, .quote-content-table td:first-child { width: auto; }
.quote-content-table th[data-price-column], .quote-content-table td.number { width: auto; white-space: nowrap; text-align: right; }
.quote-content-table .domestic-cny-time-column { width: auto; }
.quote-content-table .domestic-cny-time { white-space: nowrap; }
@media (max-width: 767px) {
  /* Use the available screen width; unusually wide data can still scroll locally. */
  .data-table.quote-content-table { width: 100%; min-width: 0; max-width: none; }
  .quote-content-table th, .quote-content-table td { padding: 8px 6px; font-size: .8125rem; line-height: 1.45; vertical-align: middle; }
  .quote-content-table thead th, .quote-content-table thead th[data-price-column] { white-space: normal; }
  .quote-content-table td.number { white-space: nowrap; }
  .bank-table thead button { width: 100%; min-height: 44px; gap: 2px; white-space: normal; }
  .bank-table thead .sort-label { max-width: 2em; line-height: 1.35; white-space: normal; }
  .bank-table [data-sort="mid_rate"] .sort-label { max-width: 3em; }
  .bank-table td.number { padding-inline: 2px; }
  .bank-table th + th, .bank-table td + td { border-left: 1px solid #edf0f4; }
  .bank-table:not(.provider-name-table) th:first-child { width: 1%; padding-inline: 6px 4px; white-space: normal; }
  .bank-table .currency-label { display: grid; width: clamp(56px, 16vw, 84px); grid-template-columns: 16px minmax(0, 1fr); column-gap: 4px; row-gap: 2px; align-items: start; min-width: 0; }
  .bank-table .currency-label .flag { grid-column: 1; grid-row: 1; width: 16px; height: 12px; margin-top: 3px; }
  .bank-table .currency-label .currency-name { grid-column: 2; grid-row: 1; font-size: .8125rem; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; }
  .bank-table .currency-label .currency-code { grid-column: 2; grid-row: 2; min-width: 0; font-size: var(--text-caption); line-height: 1.25; }
  .quote-content-table.provider-name-table th:first-child, .quote-content-table.provider-name-table td:first-child { width: 1%; white-space: normal; }
  .quote-content-table.provider-name-table .bank-name, .quote-content-table.provider-name-table .domestic-cny-institution { width: auto; min-width: 0; max-width: 7.5em; align-items: flex-start; gap: 5px; }
  .quote-content-table.provider-name-table .bank-icon { width: 20px; height: 20px; flex-basis: 20px; }
  .published-pair-table.provider-name-table tbody th:first-child > a { max-width: 7.5em; }
}
@media (min-width: 768px) {
  .data-table.quote-content-table { width: 100%; }
  .quote-content-table th:first-child, .quote-content-table td:first-child,
  .quote-content-table th[data-time-column], .quote-content-table .domestic-cny-time-column,
  .quote-content-table td.quote-time { width: 1%; }
}

/* Row timestamps use a calm date/time hierarchy; shared summaries stay inline. */
.quote-content-table th[data-time-column], .quote-content-table .domestic-cny-time-column,
.quote-content-table td.quote-time { text-align: center; }
.quote-content-table td.quote-time { color: var(--muted); font-weight: 400; }
.quote-content-table td.quote-time .quote-time-value { display: inline-block; color: #65758b; font-size: var(--text-caption); line-height: 1.4; white-space: nowrap; }
.quote-content-table td.quote-time .quote-time-date { display: block; color: #65758b; font-size: var(--text-caption); }
.quote-content-table td.quote-time .quote-time-clock { display: block; margin-top: 1px; color: #52677e; font-size: .8125rem; font-weight: 500; }
.quote-content-table td.quote-time .quote-time-note { margin-top: 2px; color: #65758b; font-size: var(--text-caption); line-height: 1.4; }
.quote-content-table .domestic-cny-common-time { display: inline-block; color: #65758b; font-size: var(--text-caption); line-height: 1.4; }

/* Each merged pair keeps both original directions visible in the document. */
.merged-pair-page, .pair-direction { display: grid; min-width: 0; gap: 16px; }
.merged-pair-page { gap: 24px; }
.pair-direction { scroll-margin-top: 20px; }
.pair-direction-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pair-direction-nav a { min-width: 0; padding: 13px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.pair-direction-nav a:hover { border-color: #a8c9e8; background: var(--soft-blue); }
.pair-direction-nav strong, .pair-direction-nav span { display: block; }
.pair-direction-nav strong { font-size: var(--text-ui); font-weight: 600; overflow-wrap: anywhere; }
.pair-direction-nav span { margin-top: 4px; color: var(--muted); font-size: var(--text-caption); }
.pair-direction-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-inline: 2px; }
.pair-direction-heading h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; font-size: 1.125rem; }
.pair-direction-heading h2 small { color: var(--muted); font-size: var(--text-caption); font-weight: 400; }
.pair-direction-convert { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; font-size: var(--text-ui); }
.pair-direction-convert svg { width: 15px; height: 15px; }
.pair-direction .panel-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.125rem; line-height: 1.5; }
.pair-direction .currency-reference-provider-head h4 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; font-size: 1rem; line-height: 1.5; }
.pair-direction .currency-reference-provider-head h4 a { display: inline-flex; align-items: center; gap: 5px; }
.pair-direction .currency-reference-provider-head h4 svg { width: 14px; height: 14px; }
.pair-direction .pair-detail .section-description { margin-inline: 0; padding-inline: 0; }
@media (max-width: 560px) {
  .pair-direction-nav { gap: 8px; }
  .pair-direction-nav a { padding: 11px 12px; }
  .pair-direction-heading h2 { font-size: 1rem; }
  .pair-direction-heading h2 small { flex-basis: 100%; padding-left: 28px; }
}
