:root {
  color-scheme: light;
  --primary: #2f65df;
  --ink: #0b1b4c;
  --text: #23365b;
  --muted: #7586a4;
  --border: #e1e8f2;
  --background: #f6faff;
  font-family: Inter, "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--background);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
[hidden] { display: none !important; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  display: inline-block; width: 18px; height: 18px; fill: none; stroke: currentColor;
  stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0; vertical-align: middle;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -200px; left: 16px; z-index: 20;
  background: #fff; padding: 12px; color: var(--primary);
}
.skip-link:focus { top: 8px; }
.content { width: 100%; max-width: 1280px; margin: 0 auto; padding: 40px 32px; outline: none; }
.page-heading { margin-bottom: 24px; }
.page-heading h1 { color: var(--ink); font-size: 26px; font-weight: 600; letter-spacing: -.5px; line-height: 36px; margin: 0 0 8px; }
.page-heading p { color: var(--muted); font-size: 14px; line-height: 22px; margin: 0; }
.filter-card {
  display: flex; align-items: flex-end; gap: 18px; background: #fff;
  border: 1px solid var(--border); border-radius: 8px; padding: 22px 24px 24px; margin-bottom: 20px;
}
.filter-field { display: flex; flex-direction: column; gap: 9px; flex: 1 1 240px; min-width: 0; max-width: 340px; }
.filter-field label { font-size: 13px; color: var(--text); font-weight: 500; line-height: 18px; }
.select-wrap { position: relative; display: flex; align-items: center; min-width: 0; }
.select-wrap select {
  appearance: none; width: 100%; min-width: 0; height: 40px; color: var(--text);
  border: 1px solid #dce3ec; border-radius: 6px; background: #fff;
  padding: 0 36px 0 12px; font-size: 14px; cursor: pointer;
}
.select-wrap select:has(option[value=""]:checked) { color: #929dad; }
.select-wrap > .icon { pointer-events: none; position: absolute; right: 12px; color: #9ba6b7; width: 14px; height: 14px; }
.filter-arrow { height: 40px; width: 20px; color: #9ba9bf; }
.filter-buttons { display: flex; gap: 12px; margin-left: 6px; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  height: 40px; padding: 0 22px; border: 1px solid #dce3ec; background: #fff;
  border-radius: 6px; color: var(--text); font-size: 14px; line-height: 1.5;
  white-space: nowrap; transition: color .15s, border-color .15s, background .15s;
}
.button:hover { border-color: var(--primary); color: var(--primary); }
.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.primary:hover { background: #4479ed; border-color: #4479ed; color: #fff; }
.button:disabled { opacity: .55; }
.results-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; padding: 16px 24px; border-bottom: 1px solid #edf1f7; }
.results-heading > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.results-heading h2 { font-size: 17px; line-height: 26px; font-weight: 600; color: var(--ink); margin: 0; }
.pair-count { font-size: 12px; color: var(--muted); background: #f3f6fb; border-radius: 5px; padding: 4px 9px; white-space: nowrap; }
.refresh-button { height: 34px; font-size: 13px; padding: 0 14px; }
.refresh-button .icon { width: 15px; height: 15px; }
.table-wrap { margin: 0 24px; max-inline-size: calc(100% - 48px); container-type: inline-size; }
table { width: 100%; border-spacing: 0; table-layout: fixed; }
.from-col, .to-col { width: 30%; }
.rate-col { width: 40%; }
thead { position: sticky; inset-block-start: 0; z-index: 1; }
thead th { height: 46px; padding: 12px 22px; background: #f7f9fc; color: var(--muted); font-size: 13px; font-weight: 500; border-bottom: 1px solid #e8eff8; text-align: left; }
thead th:first-child { border-radius: 7px 0 0 0; }
thead th:last-child { border-radius: 0 7px 0 0; }
.rate-heading { display: flex; align-items: center; gap: 7px; }
.rate-heading .icon { width: 14px; height: 14px; color: #a3aec0; }
tbody td, tbody th { height: 68px; padding: 12px 22px; border-bottom: 1px solid #edf1f7; font-size: 14px; text-align: left; font-weight: 400; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover { background: #fafcff; }
.currency { display: inline-flex; align-items: center; gap: 12px; vertical-align: middle; min-width: 0; max-width: 100%; }
.currency-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.currency strong { font-size: 14px; line-height: 20px; font-weight: 600; overflow-wrap: anywhere; }
.currency small { font-size: 11px; line-height: 16px; color: #8895aa; overflow-wrap: anywhere; }
.coin { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #edf3ff; color: #3b6ad6; border: 1px solid #dce7ff; font-size: 12px; font-weight: 600; }
.coin img { width: 34px; height: 34px; display: block; }
.target-cell { display: flex; align-items: center; gap: 28px; position: relative; min-width: 0; }
.row-direction { width: 15px; height: 15px; color: #a7b4c8; position: absolute; left: -25px; }
.rate-cell { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-variant-numeric: tabular-nums; min-width: 0; }
.rate-base { font-size: 13px; color: #8895aa; white-space: nowrap; }
.equals { display: inline-block; margin-left: 12px; margin-right: 4px; color: #a6b1c3; }
.rate-cell strong { font-size: 17px; color: #193768; font-weight: 600; letter-spacing: .2px; overflow-wrap: anywhere; min-width: 0; }
.rate-unit { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.results-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid #edf1f7; padding: 14px 24px; min-height: 60px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.pagination { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.page-button, .current-page { display: grid; place-items: center; min-width: 28px; height: 28px; border: 1px solid transparent; background: #fff; border-radius: 5px; color: var(--text); font-size: 13px; }
.page-button .icon { width: 15px; height: 15px; }
.page-button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-button:disabled { background: #f5f5f5; color: #b5bcc7; }
.current-page { border-color: var(--primary); color: var(--primary); padding: 0 7px; }
.page-size-wrap { margin-left: 7px; }
.page-size-wrap select { height: 28px; font-size: 12px; color: #5b6f8f; padding: 0 31px 0 10px; border-color: var(--border); border-radius: 5px; }
.page-size-wrap > .icon { width: 11px; height: 11px; right: 10px; }
.rate-note { display: flex; align-items: flex-start; gap: 8px; color: #8895aa; font-size: 12px; line-height: 20px; margin: 17px 2px 0; }
.rate-note .icon { width: 15px; height: 15px; margin-top: 2px; color: #8499bc; }
.table-message { text-align: center; color: var(--muted); height: 220px; padding: 32px; white-space: normal; }
.error-banner { display: flex; align-items: center; gap: 10px; border: 1px solid #f1c8c8; background: #fff3f3; border-radius: 6px; color: #a53a3a; font-size: 13px; line-height: 21px; padding: 12px 16px; margin: 0 0 20px; }
.error-banner > span { flex: 1; overflow-wrap: anywhere; min-width: 0; }
.text-button { border: 0; background: none; color: var(--primary); padding: 4px 6px; white-space: nowrap; }
.is-loading .refresh-button .icon { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
/* Switch the table to complete currency-pair cards when its own container narrows. */
@container (width < 680px) {
  table, tbody { display: block; width: 100%; }
  colgroup, thead { display: none; }
  tbody { padding-block: 14px; }
  tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; padding: 16px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 8px; }
  tbody tr:last-child { margin-bottom: 0; }
  tbody th, tbody td { display: block; height: auto; min-width: 0; padding: 0; border: 0; }
  tbody th::before, tbody td::before { content: attr(data-label); display: block; margin-bottom: 10px; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 16px; }
  .rate-td { grid-column: 1 / -1; border-top: 1px solid #edf1f7; padding-top: 12px; }
  tbody tr:last-child .rate-td { border-top: 1px solid #edf1f7; }
  .currency { gap: 8px; }
  .currency strong { font-size: 14px; }
  .currency small { font-size: 10px; line-height: 14px; }
  .coin, .coin img { width: 30px; height: 30px; }
  .target-cell { gap: 0; }
  .row-direction { left: -22px; }
  .rate-cell { gap: 5px 7px; }
  .rate-cell strong { font-size: 19px; }
  .rate-base { font-size: 12px; }
  .equals { margin-left: 7px; margin-right: 0; }
  .rate-unit { font-size: 11px; }
  .message-row { grid-template-columns: minmax(0, 1fr); border: 0; padding: 24px 12px; }
  .message-row .table-message { min-height: 160px; display: grid; place-items: center; }
  .table-message::before { display: none; }
}
@media (max-width: 760px) {
  .content { padding: 24px 16px; }
  .page-heading h1 { font-size: 24px; }
  .page-heading p { font-size: 13px; }
  .filter-card { padding: 18px; gap: 14px; flex-wrap: wrap; }
  .filter-field { flex-basis: calc(50% - 28px); max-width: none; }
  .filter-buttons { width: 100%; margin-left: 0; }
  .results-heading { padding-inline: 16px; }
  .results-heading h2 { font-size: 16px; }
  .results-heading > div { gap: 8px; }
  .table-wrap { margin-inline: 14px; max-inline-size: calc(100% - 28px); }
  .results-footer { padding-inline: 16px; }
  .pair-count { padding-inline: 6px; }
  .refresh-button { padding-inline: 10px; }
  .rate-note { font-size: 11px; }
}
@media (max-width: 420px) {
  .filter-arrow { display: none; }
  .filter-field { flex-basis: 100%; }
  .filter-buttons .button { flex: 1; height: 42px; }
  .results-footer { justify-content: center; }
  .results-footer > span { width: 100%; text-align: center; }
  .page-button, .current-page { min-width: 34px; height: 34px; }
  .page-size-wrap select { height: 34px; }
}
/* Genuine Ant Design controls mounted into the otherwise native page. */
.control-mount { width: 100%; min-width: 0; }
.control-mount .ant-select { width: 100%; }
.filter-buttons .ant-btn { padding-inline: 22px; box-shadow: none; }
.filter-buttons .ant-btn .icon { width: 16px; height: 16px; }
#refresh-control .ant-btn { min-height: 34px; padding-inline: 12px; font-size: 13px; }
.antd-pagination-row { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; min-width: 0; }
.antd-pagination-row .ant-pagination { margin: 0; }
.antd-pagination-row .ant-select { flex-shrink: 0; }
@media (max-width: 420px) {
  .filter-buttons .ant-btn { flex: 1; min-height: 42px; }
  .antd-pagination-row { justify-content: center; gap: 10px; width: 100%; }
}
