/* Upgrade 3: GCC and expat currencies (#currencies). */
.fx-wrap { max-width: 1180px; margin: 0 auto; padding-top: 6px; }
.fx-head { text-align: center; margin: 8px auto 22px; max-width: 680px; }
.fx-title { font-size: clamp(30px, 5vw, 46px); margin: 12px 0 6px; }
.fx-sub { margin: 0 auto; color: var(--ink-2); font-size: 14.5px; }
.fx-card { padding: 20px; min-width: 0; }
.fx-ch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.fx-ch h2 { margin: 0; font-size: 16px; font-weight: 500; color: var(--ink); margin-inline-end: auto; }
.fx-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 18px; }
.fx-wrap .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* flags: emoji where the system draws them, a monogram elsewhere (Windows) */
.fx-flag { flex: none; display: inline-grid; place-items: center; width: 30px; height: 22px; font-size: 22px; line-height: 1; }
.fx-flag.mono { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; border-radius: 6px; color: var(--ink);
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04)); box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 rgba(255, 255, 255, .15);
  font-family: "Schibsted Grotesk", system-ui, sans-serif; }

/* converter */
.fx-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: stretch; }
.fx-side { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .22); min-width: 0; }
.fx-side.out { background: linear-gradient(160deg, rgba(16, 188, 131, .1), rgba(16, 188, 131, .02)); border-color: rgba(16, 188, 131, .3); }
.fx-lbl { font-size: 12px; color: var(--ink-3); }
.fx-ccy { display: flex; align-items: center; gap: 10px; min-height: 40px; min-width: 0; }
.fx-cn { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.fx-cn b { font-weight: 600; font-size: 15px; font-family: "Schibsted Grotesk", system-ui, sans-serif; }
.fx-cn small { color: var(--ink-3); font-size: 12px; }
.fx-select { flex: 1; min-width: 0; width: 100%; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: var(--ink);
  font: inherit; font-size: 14px; padding-block: 0; padding-inline: 12px 34px; appearance: none; -webkit-appearance: none; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A9B0BD' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 16px; background-position: right 10px center; }
html[dir="rtl"] .fx-select { background-position: left 10px center; padding-inline: 12px 34px; }
.fx-select:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.fx-amt input { width: 100%; height: 52px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .04); padding: 0 14px; font-size: 26px; text-align: left;
  font-family: "Schibsted Grotesk", system-ui, sans-serif; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
html[dir="rtl"] .fx-amt input { text-align: right; }
.fx-amt input:focus { outline: none; box-shadow: inset 0 0 0 1px rgba(16, 188, 131, .6), 0 0 0 3px rgba(16, 188, 131, .15); }
.fx-amt input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px rgba(242, 103, 107, .7); }
.fx-result { display: flex; align-items: baseline; gap: 6px; min-height: 52px; padding: 0 4px; font-size: clamp(24px, 3vw, 30px); line-height: 52px; overflow-wrap: anywhere; }
.fx-result small { font-size: 13px; color: var(--ink-3); }
.fx-swap { align-self: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); color: var(--ink); cursor: pointer;
  display: grid; place-items: center; transition: transform .25s, background .2s, border-color .2s; }
.fx-swap svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); }
.fx-swap:hover { background: rgba(16, 188, 131, .14); border-color: rgba(16, 188, 131, .5); transform: rotate(180deg); }
.fx-line { margin: 14px 0 0; font-size: 13.5px; color: var(--ink-2); }
.fx-rel { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fx-rel.est { color: #F7C2A4; }

/* reliability chips */
.fx-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 10.5px; white-space: nowrap; border: 1px solid; }
.fx-chip.off { color: #F6CF8C; border-color: rgba(240, 182, 90, .45); background: rgba(240, 182, 90, .08); }
.fx-chip.est { color: #F7A3A6; border-color: rgba(242, 103, 107, .45); background: rgba(242, 103, 107, .08); }
.fx-chip.info { color: #C9D7F5; border-color: rgba(160, 180, 230, .4); background: rgba(120, 140, 200, .1); }

/* gold in your currency */
.fx-gc { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-family: "Schibsted Grotesk", system-ui, sans-serif; }
.fx-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fx-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); min-width: 0; }
.fx-tile.au { border-color: rgba(242, 196, 109, .22); background: linear-gradient(160deg, rgba(242, 196, 109, .08), rgba(242, 196, 109, 0)); }
.fx-tile.hl { border-color: rgba(242, 196, 109, .5); background: linear-gradient(160deg, rgba(242, 196, 109, .18), rgba(242, 196, 109, .02)); }
.fx-tile.ag { border-color: rgba(207, 218, 232, .2); background: linear-gradient(160deg, rgba(207, 218, 232, .08), rgba(207, 218, 232, 0)); }
.fx-tl { font-size: 12px; color: var(--ink-3); }
.fx-tv { font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.fx-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* list */
.fx-search { position: relative; display: flex; align-items: center; flex: 0 1 260px; min-width: 0; }
.fx-search svg { position: absolute; inset-inline-start: 12px; width: 16px; height: 16px; fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.fx-search input { width: 100%; height: 38px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .22); padding-inline: 36px 14px; font-size: 13.5px; color: var(--ink); }
.fx-search input:focus { outline: none; border-color: rgba(16, 188, 131, .6); box-shadow: 0 0 0 3px rgba(16, 188, 131, .15); }
.fx-gh { margin: 18px 4px 8px; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.fx-gh:first-child { margin-top: 0; }
.fx-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fx-row { display: flex; align-items: stretch; gap: 6px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); transition: border-color .2s, background .2s; min-width: 0; }
.fx-row:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .035); }
.fx-row.on { border-color: rgba(16, 188, 131, .5); background: rgba(16, 188, 131, .06); }
.fx-pick { flex: 1; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: transparent;
  color: var(--ink); font: inherit; text-align: start; cursor: pointer; border-radius: 14px; }
.fx-nm { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fx-n1 { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-n2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 11.5px; color: var(--ink-3); font-family: "Schibsted Grotesk", system-ui, sans-serif; }
.fx-rv { display: flex; flex-direction: column; align-items: flex-end; text-align: end; }
.fx-rv .num { font-size: 15.5px; }
.fx-rv small { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.fx-star { flex: none; width: 40px; border: 0; border-inline-start: 1px solid var(--line); background: transparent; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; border-radius: 0 14px 14px 0; }
html[dir="rtl"] .fx-star { border-radius: 14px 0 0 14px; }
.fx-star svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.fx-star:hover { color: var(--ink); }
.fx-star[aria-pressed="true"] { color: #F0C35A; }
.fx-star[aria-pressed="true"] svg { fill: currentColor; }
.fx-empty { margin: 8px 0; padding: 16px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: 14px; font-size: 13.5px; }
.fx-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.fx-foot p { margin: 4px 0; }
.fx-foot a { color: var(--mint); text-decoration: underline; text-decoration-color: rgba(207, 242, 230, .35); }
.fx-warn { color: #F6CF8C; }
.fx-state { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 34px 20px; text-align: center; color: var(--ink-2); font-size: 14px; }
.fx-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: fxSpin .9s linear infinite; }
@keyframes fxSpin { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
  .fx-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .fx-card { padding: 16px 14px; }
  .fx-pair { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .fx-swap { margin: -10px auto; position: relative; z-index: 1; background: var(--bg); }
  .fx-swap svg { transform: none; }
  .fx-list { grid-template-columns: minmax(0, 1fr); }
  .fx-search { flex: 1 1 100%; }
  .fx-tv { font-size: 17px; }
}

/* light theme */
html[data-theme="light"] .fx-side { background: rgba(255, 255, 255, .7); }
html[data-theme="light"] .fx-side.out { background: linear-gradient(160deg, rgba(16, 188, 131, .12), rgba(255, 255, 255, .7)); border-color: rgba(16, 168, 117, .35); }
html[data-theme="light"] .fx-select, html[data-theme="light"] .fx-amt input, html[data-theme="light"] .fx-search input { background-color: rgba(255, 255, 255, .85); }
html[data-theme="light"] .fx-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23506A60' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
html[data-theme="light"] .fx-swap { background: #fff; }
html[data-theme="light"] .fx-flag.mono { background: linear-gradient(160deg, #fff, rgba(16, 48, 36, .06)); }
html[data-theme="light"] .fx-chip.off { color: #8A5A12; border-color: rgba(183, 121, 31, .45); background: rgba(240, 182, 90, .14); }
html[data-theme="light"] .fx-chip.est { color: #B23338; border-color: rgba(210, 70, 75, .4); background: rgba(210, 70, 75, .08); }
html[data-theme="light"] .fx-chip.info { color: #2D4C8F; border-color: rgba(80, 110, 200, .35); background: rgba(80, 110, 200, .08); }
html[data-theme="light"] .fx-rel.est { color: #8E3A20; }
html[data-theme="light"] .fx-tile { background: rgba(255, 255, 255, .6); }
html[data-theme="light"] .fx-tile.au { background: linear-gradient(160deg, rgba(240, 190, 100, .16), rgba(255, 255, 255, .6)); border-color: rgba(169, 119, 31, .25); }
html[data-theme="light"] .fx-tile.hl { background: linear-gradient(160deg, rgba(240, 190, 100, .3), rgba(255, 255, 255, .6)); border-color: rgba(169, 119, 31, .5); }
html[data-theme="light"] .fx-tile.ag { background: linear-gradient(160deg, rgba(150, 165, 185, .16), rgba(255, 255, 255, .6)); border-color: rgba(90, 104, 124, .25); }
html[data-theme="light"] .fx-row { background: rgba(255, 255, 255, .6); }
html[data-theme="light"] .fx-row:hover { background: #fff; }
html[data-theme="light"] .fx-row.on { background: rgba(16, 188, 131, .08); border-color: rgba(16, 168, 117, .45); }
html[data-theme="light"] .fx-star[aria-pressed="true"] { color: #C08A12; }
html[data-theme="light"] .fx-foot a { color: #0B7552; text-decoration-color: rgba(11, 117, 82, .35); }
html[data-theme="light"] .fx-warn { color: #8A5A12; }

@media (prefers-reduced-motion: reduce) {
  .fx-swap, .fx-row { transition: none; }
  .fx-swap:hover { transform: none; }
  .fx-spin { animation: none; }
}
