:root {
  color-scheme: light;
  --paper: #eff3ef;
  --panel: #fff;
  --ink: #162923;
  --muted: #4c665d;
  --line: #dbe7df;
  --green: #1c5946;
  --soft: #edf6f0;
  --hero: #142d27;
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--green); text-underline-offset: .2em; }
button, input { font: inherit; }
:is(button, a, input, summary):focus-visible { outline: .18rem solid #478a70; outline-offset: .2rem; }
.visually-hidden, .mode-options input { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(100% - 2.25rem, 67rem); margin-inline: auto; }
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); }
.top-inner, .brand, nav { display: flex; align-items: center; }
.top-inner { justify-content: space-between; }
.top-inner { min-height: 4.25rem; gap: .65rem 1rem; }
.brand { gap: .7rem; color: var(--ink); text-decoration: none; font-weight: 730; letter-spacing: .045em; }
.mark { display: grid; place-items: center; width: 2rem; height: 2rem; color: #eef9ed; background: var(--green); border-radius: .65rem; font-size: 1rem; }
.languages { display: flex; flex: none; gap: .18rem; padding: .17rem; background: var(--soft); border: 1px solid var(--line); border-radius: .6rem; }
.languages button { padding: .24rem .5rem; min-height: 1.9rem; border: 1px solid transparent; border-radius: .42rem; background: transparent; color: var(--muted); font-size: .82rem; cursor: pointer; }
.languages button[aria-pressed="true"] { color: var(--green); background: var(--panel); border-color: #c9ddcf; font-weight: 660; }
nav { gap: 1.3rem; }
nav a { color: var(--ink); padding-block: .65rem; text-decoration: none; font-size: .94rem; }
nav a:hover { text-decoration: underline; }
main { padding-block: 1.35rem 2rem; }
.hero { padding: clamp(1.25rem, 3vw, 2rem); border-radius: 1.25rem; background: radial-gradient(at right bottom, #285a48, transparent 75%), var(--hero); color: #f6fbf7; }
.hero-label { display: flex; gap: .55rem; align-items: center; color: #d6e9df; font-size: .94rem; margin: 0; }
.hero-dot { width: .52rem; height: .52rem; background: #e5c681; border-radius: 100%; }
h1 { font-size: clamp(1.75rem, 5vw, 2.85rem); letter-spacing: -.035em; line-height: 1.14; margin: .5rem 0 .55rem; }
.hero-copy > p:last-child { color: #d6e9df; margin: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem, 2.7vw, 1.55rem); min-width: 0; }
main > .panel { margin-top: 1rem; }
.section-head { display: flex; align-items: start; justify-content: space-between; gap: .85rem; margin-bottom: 1rem; }
.currency-section { scroll-margin-top: .8rem; }
.currency-head { align-items: center; }
.currency-head h2 { font-size: clamp(1.32rem, 4vw, 1.7rem); }
.workspace { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.9rem, 2.5vw, 1.55rem); }
.market-strip { display: flex; align-items: baseline; flex-wrap: wrap; gap: .15rem .55rem; margin: .8rem 0 0; padding-top: .55rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.market-strip a { color: inherit; font-weight: 650; }
.market-stamp { font-variant-numeric: tabular-nums; }
.market-stamp { margin-inline-start: auto; font-size: .75rem; white-space: nowrap; }
.quote-head { margin-bottom: .55rem; }
.usd-section { --line: #dbe3e9; }
.usd-section .rate { background: #f4f7f9; border-color: var(--line); }
h2, h3 { line-height: 1.28; margin: 0; }
h2 { font-size: 1.23rem; }
h3 { font-size: 1rem; }
.section-head p { margin: .35rem 0 0; color: var(--muted); font-size: .9rem; }
.rate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
#egp-rates { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
.rate { background: #f5f9f6; border: 1px solid #e1ede5; padding: .8rem .9rem; border-radius: .75rem; }
.rate-name { display: block; font-size: .92rem; font-weight: 650; }
.rate strong, .estimate output { font-variant-numeric: tabular-nums; }
.rate strong { font-size: 1.85rem; font-weight: 740; margin-right: .4rem; letter-spacing: -.035em; line-height: 1.3; }
.rate small { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.rate.rate-featured { background: #e5f2e8; border-color: #b6d2bf; padding: .78rem .95rem 1rem; }
.rate-featured .rate-name { color: #244e3d; }
.rate-featured .rate-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: .28rem .52rem; margin-top: .25rem; }
.rate-featured .rate-basis { color: #32584a; font-size: .9rem; font-weight: 620; }
.rate.rate-featured strong { color: #133d2d; font-size: clamp(3.4rem, 11vw, 5.05rem); font-weight: 790; line-height: .98; margin-right: 0; letter-spacing: -.046em; }
.rate.rate-featured small { color: #32584a; font-size: 1.03rem; font-weight: 640; }
.rate.rate-secondary { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .2rem .55rem; padding: .32rem .8rem; }
.rate.rate-secondary strong { font-size: 1.23rem; }
.calculator { min-width: 0; padding: clamp(1rem, 2.6vw, 1.6rem); border: 1px solid #c7dccd; border-radius: 1rem; background: #f9fcf9; }
.calc-head { margin-bottom: .92rem; }
.calc-head h3 { font-size: clamp(1.24rem, 3.4vw, 1.6rem); }
.calc-head p { color: var(--muted); margin: .3rem 0 0; font-size: .91rem; }
.calc-modes { min-width: 0; border: 0; padding: 0; margin: 0 0 1rem; }
.mode-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .24rem; padding: .22rem; border-radius: .7rem; background: #e7f0e9; }
.mode-options label { position: relative; cursor: pointer; margin: 0; }
.mode-options span { display: grid; min-height: 2.5rem; place-items: center; padding: .25rem .35rem; text-align: center; color: #32584a; border: 1px solid transparent; border-radius: .55rem; line-height: 1.28; }
.mode-options input:checked + span { background: #fff; border-color: #c5d8cb; color: #164535; box-shadow: 0 1px 2px #17352a12; }
.mode-options input:focus-visible + span { outline: .16rem solid #478a70; }
.calc-modes:disabled .mode-options { opacity: .65; }
label { display: block; font-size: .9rem; font-weight: 650; margin-bottom: .3rem; }
.amount-field input { background: #fff; width: 100%; min-width: 0; min-height: 2.7rem; border: 1px solid #bbcfc4; border-radius: .62rem; color: var(--ink); padding: .45rem .65rem; }
.amount-field { position: relative; }
.amount-field input { min-height: 3.4rem; padding: .55rem 4rem .55rem .75rem; font-size: 1.32rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.amount-field span { position: absolute; top: 50%; transform: translateY(-50%); right: .75rem; color: var(--muted); font-size: .88rem; font-weight: 650; }
.estimate { display: grid; align-content: center; min-height: 6.3rem; margin-top: .8rem; padding: .7rem .85rem; border-radius: .75rem; background: #1b4a3b; color: #f6fbf7; }
.estimate > span { color: #e0eee4; font-size: .89rem; }
.estimate output { font-size: clamp(1.5rem, 4.5vw, 2.2rem); font-weight: 750; line-height: 1.26; overflow-wrap: anywhere; }
.estimate .formula { margin-top: .25rem; overflow-wrap: anywhere; }
.notice { padding: .55rem .75rem; margin: 0 0 .85rem; border: 1px solid #e3ce96; border-radius: .6rem; background: #fcf5e4; color: #574112; font-size: .9rem; }
.notice { overflow-wrap: anywhere; }
@media (max-width: 48rem) {
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 39rem) {
  .top-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 .55rem; padding-top: .48rem; }
  .top-inner nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; }
  .top-inner nav a { padding: .35rem 0 .47rem; }
  .top-inner .languages { grid-row: 1; grid-column: 2; }
  .brand .mark { flex: none; }
  .currency-head { flex-wrap: wrap; }
}
@media (max-width: 32rem) {
  .wrap { width: calc(100% - 1.4rem); }
  .top-inner { min-height: 3.65rem; }
  .brand { gap: .4rem; font-size: .92rem; letter-spacing: 0; }
  .mark { width: 1.65rem; height: 1.65rem; font-size: .9rem; }
  nav { gap: .68rem; }
  nav a { font-size: .87rem; }
  main { padding-top: .7rem; }
  .hero { padding: 1rem; }
  .rate { padding: .6rem; }
  .rate strong { font-size: 1.6rem; }
  .rate small { font-size: .73rem; }
  .market-stamp { margin-inline-start: 0; }
}
