.fx-page {
    --up: #167a54;
    --up-soft: rgba(22, 122, 84, .10);
    --down: #b23b32;
    --down-soft: rgba(178, 59, 50, .10);
    background:
        radial-gradient(900px 420px at 100% 0%, rgba(184, 107, 53, .08), transparent 55%),
        var(--paper);
}
.fx-page .content-nav nav a.is-current { color: var(--copper-deep); }
.fx-page .fx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Hero */
.fx-hero { padding: 54px 0 0; }
.fx-hero-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; margin-bottom: 30px; }
.fx-hero-top h1 {
    margin: 8px 0 9px; font-family: var(--font-serif); font-size: clamp(36px, 4vw, 52px);
    font-weight: 600; letter-spacing: -.03em;
}
.fx-hero-top p { margin: 0; max-width: 520px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.fx-hero-meta { display: flex; gap: 26px; margin: 0; text-align: right; }
.fx-hero-meta dt { color: var(--mist); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.fx-hero-meta dd { margin: 5px 0 0; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fx-alert {
    display: flex; align-items: center; gap: 10px; margin: 0 0 24px; padding: 14px 18px;
    border: 1px solid rgba(178, 59, 50, .3); border-radius: 14px;
    background: var(--down-soft); color: var(--down); font-size: 13px; font-weight: 600;
}

/* Top board */
.fx-board { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 18px; }
.fx-featured {
    display: flex; flex-direction: column; padding: 26px 28px 24px; overflow: hidden;
    border-radius: var(--radius-lg); color: white;
    background: linear-gradient(150deg, #1c2732, var(--ink) 68%);
    box-shadow: 0 26px 60px rgba(11, 17, 22, .22);
}
.fx-featured header { display: flex; align-items: center; gap: 12px; }
.fx-featured header > div { display: flex; flex-direction: column; margin-right: auto; }
.fx-featured header strong { font-size: 15px; font-weight: 800; letter-spacing: .06em; }
.fx-featured header small { margin-top: 2px; color: rgba(255, 255, 255, .6); font-size: 11px; }
.fx-symbol {
    display: grid; place-items: center; width: 42px; height: 42px; flex: none;
    border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%;
    background: rgba(255, 255, 255, .07); font-size: 16px; font-weight: 700; color: #e7c19c;
}
.fx-symbol.sm {
    width: 34px; height: 34px; border-color: var(--line); background: var(--paper);
    color: var(--copper-deep); font-size: 13px;
}
.fx-price { display: flex; align-items: baseline; gap: 6px; margin: 22px 0 0; font-size: 46px; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.fx-price i { font-style: normal; font-size: 20px; color: rgba(255, 255, 255, .5); }
.fx-price-sub { margin: 7px 0 0; color: rgba(255, 255, 255, .55); font-size: 11px; }
.fx-spark { height: 76px; margin: 14px -28px 0; }
.fx-spark svg { width: 100%; height: 100%; }
.fx-spark-area { fill: rgba(231, 193, 156, .18); }
.fx-spark-line { fill: none; stroke: #e7c19c; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.fx-quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); }
.fx-quote-grid dt { color: rgba(255, 255, 255, .5); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.fx-quote-grid dd { margin: 6px 0 0; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }

.fx-chip {
    display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 999px;
    font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums;
    color: var(--muted); background: rgba(11, 17, 22, .06);
}
.fx-chip.up { color: var(--up); background: var(--up-soft); }
.fx-chip.down { color: var(--down); background: var(--down-soft); }
.fx-featured .fx-chip { background: rgba(255, 255, 255, .1); color: white; }
.fx-featured .fx-chip.up { color: #7ee3b0; background: rgba(126, 227, 176, .14); }
.fx-featured .fx-chip.down { color: #ff9d94; background: rgba(255, 157, 148, .14); }

.fx-movers {
    display: flex; flex-direction: column; padding: 24px 24px 18px;
    border: 1px solid var(--line); border-radius: var(--radius-lg); background: white;
}
.fx-movers h2 {
    display: flex; align-items: center; gap: 9px; margin: 0 0 6px;
    font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.fx-movers.is-up h2 [data-lucide] { color: var(--up); }
.fx-movers.is-down h2 [data-lucide] { color: var(--down); }
.fx-movers ul { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.fx-movers li + li { border-top: 1px solid var(--line); }
.fx-movers button {
    display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 4px 12px;
    width: 100%; padding: 14px 0; border: 0; background: none; text-align: left; cursor: pointer;
}
.fx-movers button:hover .fx-mover-name { color: var(--copper-deep); }
.fx-mover-code { font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.fx-mover-name { color: var(--muted); font-size: 12px; }
.fx-movers b { grid-column: 2; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fx-movers .fx-chip { grid-column: 3; grid-row: 1 / span 2; }
.fx-empty { padding: 18px 0; color: var(--muted); font-size: 12px; }

/* Panels */
.fx-panel { padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; }
.fx-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 20px; }
.fx-panel-head h2 { margin: 7px 0 0; font-family: var(--font-serif); font-size: 27px; font-weight: 600; letter-spacing: -.02em; }
.fx-chart-section { padding: 34px 0 0; }

.fx-ranges, .fx-currency-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fx-ranges button, .fx-currency-chips button {
    padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: white;
    color: var(--muted); font-size: 11px; font-weight: 800; cursor: pointer; transition: .18s ease;
}
.fx-currency-chips button { display: inline-flex; align-items: center; gap: 7px; letter-spacing: .04em; }
.fx-currency-chips button i { font-style: normal; color: var(--copper); }
.fx-ranges button:hover, .fx-currency-chips button:hover { border-color: var(--line-strong); color: var(--ink); }
.fx-ranges button.is-active, .fx-currency-chips button.is-active {
    border-color: transparent; background: var(--ink); color: white;
}
.fx-currency-chips button.is-active i { color: #e7c19c; }
.fx-currency-chips { margin-bottom: 8px; }

/* Chart */
.fx-chart { position: relative; margin: 18px 0 0; }
.fx-chart svg { display: block; width: 100%; height: 340px; overflow: visible; }
.fx-chart .fx-grid-line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.fx-chart .fx-grid-label { fill: var(--mist); font-size: 11px; font-weight: 700; }
.fx-area { fill: url(#fxArea); }
.fx-line { fill: none; stroke: var(--copper); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.fx-crosshair { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.fx-grid-labels { position: absolute; inset: 0; pointer-events: none; }
.fx-grid-labels span {
    position: absolute; left: 0; transform: translateY(-130%);
    padding: 0 6px; border-radius: 4px; background: rgba(255, 255, 255, .8);
    color: var(--mist); font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.fx-dot {
    position: absolute; z-index: 4; width: 11px; height: 11px; margin: -6px 0 0 -6px;
    border: 3px solid var(--copper); border-radius: 50%; background: white; pointer-events: none;
}
.fx-dot[hidden] { display: none; }
.fx-axis { display: flex; justify-content: space-between; margin-top: 10px; color: var(--mist); font-size: 11px; font-weight: 700; }
.fx-tooltip {
    position: absolute; top: 0; z-index: 5; padding: 9px 12px; transform: translate(-50%, -12px);
    border-radius: 12px; background: var(--ink); color: white; font-size: 11px; white-space: nowrap;
    box-shadow: 0 14px 30px rgba(11, 17, 22, .25); pointer-events: none;
}
.fx-tooltip b { display: block; margin-top: 3px; font-size: 14px; font-variant-numeric: tabular-nums; }
.fx-chart-state {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 9px;
    border-radius: 14px; background: rgba(255, 255, 255, .82); color: var(--muted); font-size: 12px; font-weight: 600;
}
.fx-chart-state [data-lucide] { animation: fx-spin 1.1s linear infinite; }
.fx-chart-state[hidden] { display: none; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
.fx-chart.is-empty .fx-chart-state { background: var(--surface); }

.fx-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 26px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.fx-stats dt { color: var(--mist); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.fx-stats dd { margin: 7px 0 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fx-stats dd.up { color: var(--up); }
.fx-stats dd.down { color: var(--down); }

/* Table */
.fx-table-section { padding: 34px 0 90px; }
.fx-table-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.fx-search { display: flex; align-items: center; gap: 9px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 999px; }
.fx-search [data-lucide] { width: 15px; color: var(--muted); }
.fx-search input { width: 150px; border: 0; outline: 0; background: none; font-size: 13px; }
.fx-table-wrap { overflow-x: auto; }
.fx-table { width: 100%; border-collapse: collapse; }
.fx-table thead th { padding: 0 0 12px; border-bottom: 1px solid var(--line-strong); text-align: right; }
.fx-table thead th:first-child { text-align: left; }
.fx-table thead button {
    display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; cursor: pointer;
    color: var(--mist); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
}
.fx-table thead button [data-lucide] { width: 12px; height: 12px; opacity: .5; }
.fx-table thead button:hover, .fx-table th.is-sorted button { color: var(--ink); }
.fx-table th.is-sorted button [data-lucide] { opacity: 1; color: var(--copper); }
.fx-table tbody tr { border-bottom: 1px solid var(--line); transition: background .16s ease; }
.fx-table tbody tr:hover { background: var(--surface); }
.fx-table tbody tr.is-selected { background: rgba(184, 107, 53, .07); }
.fx-table tbody th {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 0; text-align: left; font-weight: 600;
}
.fx-table tbody th span { display: flex; flex-direction: column; }
.fx-table tbody th b { font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.fx-table tbody th small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.fx-table td { padding: 14px 0; text-align: right; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fx-table td.fx-official { color: var(--muted); font-weight: 600; }
.fx-table td small { display: block; margin-top: 4px; color: var(--mist); font-size: 10px; font-weight: 600; }
.fx-row-action { width: 54px; }
.fx-row-action button {
    display: grid; place-items: center; width: 34px; height: 34px; margin-left: auto;
    border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; color: var(--muted);
}
.fx-row-action button:hover { border-color: var(--copper); color: var(--copper-deep); }
.fx-row-action [data-lucide] { width: 15px; }
.fx-empty-row { padding: 26px 0 0; color: var(--muted); font-size: 13px; }
.fx-note {
    display: flex; gap: 10px; margin: 22px 0 0; padding-top: 20px; border-top: 1px solid var(--line);
    color: var(--muted); font-size: 11px; line-height: 1.75;
}
.fx-note [data-lucide] { width: 15px; flex: none; color: var(--copper); }

/* Sidebar */
.fx-aside { display: grid; gap: 18px; }
.fx-converter h2 { margin: 7px 0 18px; font-family: var(--font-serif); font-size: 23px; font-weight: 600; }
.fx-convert-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; }
.fx-field { display: flex; flex-direction: column; gap: 6px; }
.fx-field span { color: var(--mist); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.fx-field span b { color: var(--copper-deep); }
.fx-field input, .fx-field select {
    width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px;
    background: var(--surface); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.fx-field select { font-weight: 600; }
.fx-field input:focus, .fx-field select:focus { outline: 2px solid rgba(184, 107, 53, .35); outline-offset: 1px; }
.fx-swap {
    display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 9px 13px;
    border: 1px solid var(--line); border-radius: 999px; background: white;
    font-size: 11px; font-weight: 800; cursor: pointer; color: var(--muted);
}
.fx-swap:hover { border-color: var(--copper); color: var(--copper-deep); }
.fx-swap [data-lucide] { width: 14px; }
.fx-convert-result { display: flex; align-items: baseline; gap: 6px; margin: 18px 0 0; }
.fx-convert-result strong { font-size: 32px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.fx-convert-result span { color: var(--muted); font-size: 15px; font-weight: 700; }
.fx-convert-detail { display: grid; gap: 8px; margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; }
.fx-convert-detail li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fx-convert-detail span { color: var(--muted); font-size: 11px; }
.fx-convert-detail b { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fx-news { display: grid; }
.fx-news a { padding: 14px 0; border-bottom: 1px solid var(--line); }
.fx-news a:last-child { border-bottom: 0; padding-bottom: 0; }
.fx-news a:first-of-type { padding-top: 16px; }
.fx-news b { display: block; font-size: 13px; font-weight: 700; line-height: 1.5; }
.fx-news a:hover b { color: var(--copper-deep); }
.fx-news small { display: block; margin-top: 5px; color: var(--mist); font-size: 10px; font-weight: 700; }

.fx-footer { padding: 26px 0 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.fx-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

@media (max-width: 1050px) {
    .fx-board { grid-template-columns: 1fr 1fr; }
    .fx-featured { grid-column: 1 / -1; }
    .fx-table-grid { grid-template-columns: 1fr; }
    .fx-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
    .fx-hero-top { flex-direction: column; align-items: flex-start; }
    .fx-hero-meta { flex-wrap: wrap; gap: 18px; text-align: left; }
    .fx-board { grid-template-columns: 1fr; }
    .fx-panel { padding: 22px 18px; }
    .fx-panel-head { flex-direction: column; align-items: flex-start; }
    .fx-chart svg { height: 260px; max-width: 100%; }
    .fx-stats { grid-template-columns: 1fr 1fr; }
    .fx-search { width: 100%; }
    .fx-search input { width: 100%; font-size: 16px; }
    .fx-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }
    .fx-table { min-width: 620px; }
    .fx-footer .container { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 480px) {
    .fx-stats { grid-template-columns: 1fr; }
    .fx-featured h2 { font-size: clamp(24px, 7vw, 32px); }
}
