:root {
    color-scheme: light dark;

    --background: light-dark(#ffffff, #15171c);
    --surface: light-dark(#f6f7f9, #1d2026);
    --text: light-dark(#1a1c20, #e5e7eb);
    --text-muted: light-dark(#5b6472, #949cab);
    --border: light-dark(#e2e5e9, #2b303a);
    --received: light-dark(#3f9142, #5cb85c);
    --sent: light-dark(#2a2e35, #7e879a);
    --error: light-dark(#a8372c, #f0918a);

    --radius: 0.375rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    max-width: 70rem;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
    background: var(--background);
    color: var(--text);
    font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h2 {
    margin: 0 0 0.75rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

section + section {
    margin-top: 2.5rem;
}

header > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    align-items: center;
}

label {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

select {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

figure {
    width: 100%;
    height: 18rem;
    margin: 0;
}

figure:not(:last-child) {
    margin-bottom: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

thead th {
    padding: 0 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-align: right;
    text-transform: uppercase;
}

thead th:first-child {
    text-align: left;
}

tbody th,
tbody td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

tbody th[scope="row"] {
    font-weight: 400;
    text-align: left;
    white-space: nowrap;
}

tbody td {
    text-align: right;
    white-space: nowrap;
}

tbody tr:hover {
    background: var(--surface);
}

/* The only element here that no tag describes: a two color proportion bar. */
.ratio {
    display: inline-block;
    width: 6rem;
    height: 0.5rem;
    overflow: hidden;
    border-radius: 9999px;
    background: var(--sent);
    vertical-align: middle;
}

.ratio > div {
    height: 100%;
    background: var(--received);
}

#live-figure {
    height: 10rem;
}

#live-rates {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.5rem;
    margin: 0 0 0.75rem;
    color: var(--text-muted);
}

#live-rates strong {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

#live-status {
    color: var(--error);
}

@media (max-width: 48rem) {
    body {
        padding: 1.25rem 1rem 3rem;
    }

    section > div {
        overflow-x: auto;
    }

    table {
        min-width: 44rem;
    }
}
