html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
.currency-return {
  box-sizing: border-box;
  margin: 0;
  color: var(--ed-ink);
  background: var(--ed-paper);
  font: 1rem/1.6 system-ui, sans-serif;
}
.currency-return *, .currency-return *::before { box-sizing: inherit; }
.currency-return [hidden] { display: none !important; }
.currency-return a { color: inherit; text-underline-offset: .2em; }
.currency-return :focus-visible { outline: 2px solid var(--ed-gold); outline-offset: 3px; }
.currency-return :is(h1, h2, p, dl, dd, ul) { margin: 0; }
.currency-return button, .currency-return input { font: inherit; }
.currency-return :is(button, summary) { cursor: pointer; }
.currency-return button:disabled { cursor: default; opacity: .68; }
.fx-wrap { max-width: 70rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 3rem); }
.fx-header, .fx-footer { border-block-end: 1px solid var(--ed-rule); }
.fx-mast { min-height: 4.25rem; display: flex; align-items: center; gap: .75rem; }
.fx-brand { font: bold clamp(1.35rem, 4vw, 2.1rem)/1 var(--ed-serif); letter-spacing: -.045em; text-decoration: none; }
.fx-brandline { display: none; color: var(--ed-muted); font: italic .95rem var(--ed-serif); }
.fx-mast nav { margin-inline-start: auto; display: flex; gap: .45rem; align-items: center; }
.fx-mast nav a, .fx-mast button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding: .3rem .2rem;
  font-size: .8rem;
  white-space: nowrap;
}
.fx-mast button { border: 0; background: transparent; color: inherit; }
.fx-intro { padding-block: clamp(1.6rem, 4vw, 3rem) 1.5rem; max-width: 57rem; }
.fx-intro .fx-kicker { margin-bottom: .8rem; color: var(--ed-gold); font-weight: 700; font-size: .8rem; letter-spacing: .1em; }
.fx-kicker::before { content: ""; display: inline-block; width: 1.5rem; border-top: 2px solid; vertical-align: middle; margin-right: .65rem; }
.fx-intro h1 { font: normal clamp(2.05rem, 5vw, 4.25rem)/1.1 var(--ed-serif); letter-spacing: -.04em; text-wrap: balance; }
:lang(ko) .fx-intro h1 { font-weight: 600; word-break: keep-all; }
.fx-intro h1 + p { margin-top: .9rem; color: var(--ed-muted); max-width: 43rem; }
.currency-return h2 { font: normal clamp(1.45rem, 2.65vw, 1.8rem)/1.25 var(--ed-serif); }
.fx-spread { display: grid; gap: 1.25rem; padding-block: 1.2rem 1.65rem; border-top: 2px solid var(--ed-ink); }
.fx-spread > *, .fx-reading > * { min-width: 0; }
.fx-muted { color: var(--ed-muted); font-size: .875rem; margin-top: .45rem !important; }
.fx-muted:empty { display: none; }
#assumptions { margin-top: .9rem; }
.fx-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(6rem, .64fr);
  align-items: center;
  gap: 0 .6rem;
  padding-block: .26rem;
}
.fx-field label { font-weight: 600; font-size: .89rem; }
.fx-field small { font-size: .78rem; font-weight: normal; color: var(--ed-muted); }
.currency-return input {
  padding: .4rem .55rem;
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--ed-muted);
  color: inherit;
  background: var(--ed-surface);
}
.fx-field input { text-align: end; font-variant-numeric: tabular-nums; }
.fx-field input:disabled { opacity: 1; }
.fx-field .fx-error { grid-column: 1 / -1; }
.fx-error:not(:empty) { margin-top: .2rem; }
.fx-field [aria-invalid="true"] { border-width: 2px; }
.fx-options, .fx-method { margin-top: .7rem; border-top: 1px solid var(--ed-rule); }
.currency-return summary { min-height: 2.75rem; align-content: center; font-weight: 600; font-size: .875rem; }
.fx-calculate, .fx-share { min-height: 2.75rem; padding: .35rem .85rem; }
.fx-calculate { margin-top: .35rem; background: var(--ed-ink); border: 1px solid var(--ed-ink); color: var(--ed-paper); }
.fx-share { margin-top: .8rem; border: 1px solid var(--ed-muted); background: transparent; color: inherit; }
.fx-result { overflow-wrap: anywhere; padding: 1.25rem clamp(1rem, 3.4vw, 1.7rem); background: var(--ed-tint); border-top: 3px solid var(--ed-accent-line); }
.fx-result h2 { font: 650 1rem system-ui, sans-serif; }
.fx-result .fx-big { font: normal clamp(2.45rem, 5.6vw, 4.85rem)/1.06 var(--ed-serif); letter-spacing: -.05em; margin-top: .5rem; }
.fx-outcome { font-size: .875rem; color: var(--ed-muted); }
.fx-ledger { border-top: 1px solid var(--ed-rule); margin-top: .65rem !important; padding-top: .4rem; }
.fx-ledger div { display: flex; justify-content: space-between; gap: .7rem; padding-block: .25rem; font-size: .875rem; }
.fx-ledger dt { min-width: 0; }
.fx-ledger dd { min-width: 0; text-align: end; font-weight: 650; font-variant-numeric: tabular-nums; }
.fx-scenarios, .fx-reading { border-top: 1px solid var(--ed-ink); padding-block: 1.25rem; }
.fx-scenarios table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-block: .7rem; font-variant-numeric: tabular-nums; }
.fx-scenarios th, .fx-scenarios td { padding: .45rem .2rem; text-align: end; border-bottom: 1px solid var(--ed-rule); overflow-wrap: anywhere; font-size: .85rem; }
.fx-scenarios th:first-child { width: 26%; text-align: start; }
.fx-scenarios thead th { font-size: .76rem; color: var(--ed-muted); }
.fx-scenarios small { display: block; font-size: .72rem; font-weight: normal; color: var(--ed-muted); }
.fx-scenarios .fx-scale { width: 20%; }
.fx-axis { height: 1.1rem; position: relative; }
.fx-axis::before { content: ""; position: absolute; inset: 0 auto 0 50%; border-left: 1px solid var(--ed-muted); }
.fx-bar { position: absolute; top: .38rem; left: 50%; height: .35rem; background: var(--ed-gold); }
.fx-bar.loss { left: auto; right: 50%; background: var(--ed-ink); }
.fx-example-a { width: 50%; }
.fx-example-base { width: 12.136%; }
.fx-example-b { width: 8.9%; }
.fx-reading { display: grid; gap: 1.35rem; padding-bottom: 2rem; }
.fx-reading p { margin-top: .65rem; color: var(--ed-body); overflow-wrap: anywhere; }
.fx-related ul { list-style: none; padding: 0; margin-top: .6rem; }
.fx-related li { margin-block: .35rem; }
.fx-method { color: var(--ed-body); }
.fx-footer { border-block: 1px solid var(--ed-rule) 0; padding-block: 1rem; color: var(--ed-muted); font: italic .875rem var(--ed-serif); }
@media (min-width: 48rem) {
  .fx-brandline { display: inline; padding-left: 1rem; border-left: 1px solid var(--ed-rule); }
  .fx-mast nav { gap: .8rem; }
  .fx-spread { grid-template-columns: minmax(0, .86fr) minmax(0, 1.3fr); gap: clamp(1.25rem, 4vw, 2.65rem); }
  .fx-result { align-self: start; }
  .fx-scenarios .fx-scale { width: 35%; }
  .fx-reading { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3rem; }
}
