:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #07101f;
  color: #ecf2ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 3rem 1rem;
  background:
    radial-gradient(circle at top, rgba(64, 139, 255, 0.2), transparent 34rem),
    #07101f;
}

main {
  width: min(46rem, 100%);
  margin: 0 auto;
}

main.wide {
  width: min(64rem, 100%);
}

h1 {
  margin: 0.25rem 0 0.8rem;
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.eyebrow {
  color: #82b1ff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.lede {
  max-width: 40rem;
  color: #aab8d1;
  font-size: 1.08rem;
  line-height: 1.7;
}

form,
#result,
aside {
  margin-top: 1.25rem;
  border: 1px solid #253453;
  border-radius: 1rem;
  background: rgba(12, 25, 47, 0.86);
}

form {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

label {
  display: grid;
  gap: 0.45rem;
  color: #cdd8eb;
  font-weight: 700;
}

.rates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

input,
select,
button {
  width: 100%;
  border: 1px solid #344767;
  border-radius: 0.65rem;
  padding: 0.78rem 0.9rem;
  background: #0a162b;
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  background: #4d8dff;
  color: #041126;
  font-weight: 900;
  cursor: pointer;
}

#result {
  padding: 1.25rem;
}

dl {
  display: grid;
  gap: 0.7rem;
  margin: 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

dt {
  color: #9fb0ca;
}

dd {
  margin: 0;
  font-weight: 850;
}

aside {
  padding: 1rem 1.15rem;
  color: #aab8d1;
  line-height: 1.6;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

a {
  color: #8db9ff;
}

.crumbs {
  margin-bottom: 1.5rem;
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 700;
}

.crumbs span {
  margin: 0 0.15rem;
}

section {
  margin-top: 2rem;
}

h2 {
  margin: 0 0 0.6rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

section p {
  max-width: 40rem;
  color: #aab8d1;
  line-height: 1.7;
}

.table-wrap {
  margin-top: 1.75rem;
  max-height: 34rem;
  overflow: auto;
  border: 1px solid #253453;
  border-radius: 1rem;
  background: rgba(12, 25, 47, 0.86);
}

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

caption {
  padding: 0.9rem 1rem;
  color: #9fb0ca;
  text-align: left;
  font-weight: 700;
}

thead th {
  position: sticky;
  top: 0;
  background: #0e1c34;
  color: #cdd8eb;
  text-align: right;
  white-space: nowrap;
}

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

th,
td {
  padding: 0.5rem 1rem;
  border-top: 1px solid #1c2b47;
  text-align: right;
}

tbody th {
  color: #ecf2ff;
  font-weight: 800;
  text-align: left;
}

tbody tr:hover td,
tbody tr:hover th {
  background: rgba(77, 141, 255, 0.08);
}

.warn {
  color: #ffb95e;
  font-weight: 700;
}

.nowrap {
  white-space: nowrap;
}

.chart {
  margin: 1.75rem 0 0;
  padding: 1rem;
  border: 1px solid #253453;
  border-radius: 1rem;
  background: rgba(12, 25, 47, 0.86);
}

.chart svg {
  width: 100%;
  height: auto;
}

.chart .grid {
  stroke: #253453;
  stroke-width: 1;
}

.chart .axis {
  stroke: #344767;
  stroke-width: 1.5;
}

.chart .tick {
  fill: #7f8fab;
  font-size: 12px;
}

.chart .curve {
  fill: none;
  stroke: #4d8dff;
  stroke-width: 2;
}

figcaption {
  margin-top: 0.75rem;
  color: #8494ae;
  font-size: 0.9rem;
  line-height: 1.6;
}

dl.index {
  gap: 1.1rem;
}

dl.index div {
  display: block;
}

dl.index dt {
  margin-bottom: 0.3rem;
  font-size: 1.05rem;
  font-weight: 800;
}

dl.index dd {
  margin: 0;
  color: #aab8d1;
  font-weight: 400;
  line-height: 1.65;
}

@media (max-width: 36rem) {
  .rates {
    grid-template-columns: 1fr;
  }

  th,
  td {
    padding: 0.45rem 0.6rem;
    font-size: 0.86rem;
  }
}
