.fx-page {
  background:
    linear-gradient(135deg, rgba(217,239,158,.3), transparent 34%),
    linear-gradient(300deg, rgba(35,102,77,.09), transparent 30%),
    var(--paper);
}

.fx-hero {
  min-height: 560px;
  padding: 84px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr);
  gap: 46px;
  align-items: center;
}

.fx-hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(58px, 8vw, 112px);
  line-height: .92;
  letter-spacing: 0;
}

.fx-hero p {
  max-width: 630px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.fx-hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.fx-hero-board {
  min-height: 390px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  border-radius: 28px;
  color: white;
  background: #111a15;
  box-shadow: 0 35px 90px rgba(20,44,32,.18);
}

.fx-hero-board::after {
  content: "";
  width: 360px;
  height: 360px;
  position: absolute;
  right: -135px;
  top: -135px;
  border: 1px solid rgba(217,239,158,.2);
  border-radius: 50%;
  box-shadow: 0 0 0 58px rgba(217,239,158,.05), 0 0 0 116px rgba(217,239,158,.035);
}

.fx-hero-board > span {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,.58);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.fx-hero-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.fx-hero-metrics article {
  min-height: 102px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
}

.fx-hero-metrics small {
  color: rgba(255,255,255,.55);
  font-size: 10px;
}

.fx-hero-metrics strong {
  display: block;
  margin: 7px 0 5px;
  font-size: 30px;
}

.fx-hero-metrics em {
  color: rgba(255,255,255,.52);
  font-size: 10px;
  font-style: normal;
}

.fx-tool {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.66);
  box-shadow: var(--shadow);
}

.fx-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(260px, 1fr);
  gap: 14px;
  align-items: center;
}

.mode-tabs {
  padding: 5px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.7);
}

.mode-tabs button,
.segmented button,
.currency-tabs button,
.sort-tabs button {
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.mode-tabs button { min-height: 48px; }
.mode-tabs button.active,
.segmented button.active,
.currency-tabs button.active,
.sort-tabs button.active {
  color: white;
  background: var(--ink);
}

.fx-search {
  min-height: 58px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.75);
}

.fx-search span {
  color: var(--green);
  font-size: 20px;
}

.fx-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.control-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr);
  gap: 16px;
}

.control-grid section {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
}

.mini-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.mini-title span,
.panel-title span {
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.mini-title b { font-size: 14px; }

.currency-tabs {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.currency-tabs button {
  min-height: 56px;
  display: grid;
  gap: 2px;
  place-items: center;
  border: 1px solid var(--line);
  background: white;
}

.currency-tabs small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.currency-tabs button.active small { color: rgba(255,255,255,.65); }

.segmented {
  margin-top: 12px;
  padding: 5px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.segmented button { min-height: 42px; }
.segmented.secondary { background: rgba(255,255,255,.62); }
.hidden { display: none !important; }

.summary-strip {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.summary-strip article {
  min-height: 118px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.summary-strip span {
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}

.summary-strip strong {
  display: block;
  margin: 9px 0 6px;
  font-size: 24px;
}

.summary-strip small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.table-panel {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.panel-title {
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.panel-title h2 {
  margin: 5px 0 0;
  font-size: 25px;
}

.sort-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sort-tabs button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  background: rgba(247,245,239,.72);
  font-size: 12px;
}

.table-scroll { overflow: auto; }
table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid rgba(17,21,17,.08);
  text-align: left;
}

th {
  color: var(--muted);
  background: rgba(247,245,239,.75);
  font-size: 12px;
  font-weight: 800;
}

td { font-size: 14px; }
tbody tr:hover { background: #fbfcf6; }

.bank-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bank-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.bank-name b { display: block; }
.bank-name small { color: var(--muted); font-size: 11px; }
.rate-value { font-variant-numeric: tabular-nums; font-weight: 800; }
.rate-note {
  display: block;
  margin-top: 5px;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.muted { color: var(--muted); }

.medal {
  display: inline-grid;
  width: 24px;
  height: 24px;
  margin-right: 7px;
  place-items: center;
  border-radius: 50%;
  color: #4b3100;
  background: #ffd35c;
  font-size: 11px;
  font-weight: 900;
}

.medal.silver { color: #374151; background: #d9e2ea; }
.medal.bronze { color: #5f3218; background: #e4a277; }

.tag {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--green);
  background: #eef3ea;
  font-size: 11px;
  font-weight: 800;
}

.source-chip {
  display: inline-flex;
  max-width: 170px;
  padding: 5px 8px;
  overflow: hidden;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(247,245,239,.8);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-stack {
  display: flex;
  max-width: 180px;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

a.source-chip {
  color: var(--green);
}

.coverage-grid {
  padding: 22px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.coverage-grid article,
.source-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.6);
  box-shadow: var(--shadow);
}

.coverage-grid article { padding: 20px; }
.coverage-list {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.coverage-list span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255,255,255,.72);
  font-size: 12px;
}

.coverage-list span.virtual {
  color: #23664d;
  border-color: rgba(35,102,77,.18);
  background: #eef3ea;
}

.coverage-list span.live {
  color: white;
  border-color: var(--ink);
  background: var(--ink);
}

.coverage-list span.pending {
  opacity: .62;
}

.source-panel {
  margin-top: 22px;
  padding: 34px;
}

.source-panel .section-heading {
  margin-bottom: 20px;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.source-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.source-item b {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}

.source-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.source-item a {
  display: inline-block;
  margin-top: 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.source-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

@media (max-width: 1000px) {
  .fx-hero,
  .fx-toolbar,
  .control-grid,
  .coverage-grid,
  .source-list {
    grid-template-columns: 1fr;
  }
  .summary-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .fx-hero {
    min-height: 0;
    padding: 58px 0 54px;
  }
  .fx-hero h1 {
    font-size: clamp(52px, 16vw, 74px);
  }
  .fx-hero-board {
    min-height: 320px;
    margin-top: 6px;
    border-radius: 22px;
  }
  .fx-tool {
    width: min(100% - 32px, 640px);
    padding: 14px;
  }
  .currency-tabs,
  .summary-strip,
  .fx-hero-metrics {
    grid-template-columns: 1fr;
  }
  .panel-title {
    display: block;
  }
  .sort-tabs {
    justify-content: flex-start;
    margin-top: 12px;
  }
  .source-panel {
    padding: 24px;
  }

  .fx-hero-copy p {
    font-size: 14px;
    line-height: 1.8;
  }

  .fx-toolbar,
  .source-panel,
  .coverage-grid article {
    border-radius: 20px;
  }

  .control-grid select,
  .control-grid input,
  .search-control input {
    min-height: 48px;
    font-size: 16px;
  }

  .currency-tabs {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .currency-tabs::-webkit-scrollbar {
    display: none;
  }

  .currency-tabs button {
    flex: 0 0 auto;
    min-width: 86px;
    min-height: 46px;
    scroll-snap-align: start;
  }

  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-scroll table {
    min-width: 680px;
  }
}
