:root {
  --foam: #f7f6f4; --aqua: #9db2af; --sea: #c6bfb8; --lagoon: #7a968b;
  --deep: #5e7569; --ink: #202a25; --muted: #66716b; --white: #fff;
  --line: #e5e7e5; --sand: #bfafa0; --error: #b55446; --shadow: 0 24px 55px rgba(32,42,37,.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--foam); font: 15px/1.5 "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
a { color: inherit; }
.container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.site-header { position: relative; z-index: 10; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid #f0f1f0; }
.header-inner { height: 80px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; color: var(--ink); text-decoration: none; }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { color: var(--deep); font: 700 17px/1.25 "JetBrains Mono", monospace; letter-spacing: -.03em; }
.brand-copy small { margin-top: 1px; color: #6b7280; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.header-link { padding: 10px 19px; color: white; background: var(--deep); border-radius: 999px; font-size: 12px; font-weight: 700; text-decoration: none; transition: .25s; }
.header-link:hover { background: var(--lagoon); transform: translateY(-2px); }
.hero { min-height: 495px; display: grid; grid-template-columns: 1fr 360px; gap: 75px; align-items: center; position: relative; }
.hero::before { content: ""; position: absolute; z-index: -2; inset: 0 calc((100vw - 100%) / -2); background: linear-gradient(to bottom, #faf9f6, #fff); }
.hero::after { content: ""; position: absolute; z-index: -1; width: 460px; height: 460px; right: -8%; top: -15%; border-radius: 50%; background: rgba(157,178,175,.42); filter: blur(100px); }
.hero-copy { padding: 75px 0; }
.eyebrow, .section-label { margin: 0; text-transform: uppercase; letter-spacing: .14em; color: var(--deep); font: 700 11px/1.4 "JetBrains Mono", monospace; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow i { width: 9px; height: 9px; border-radius: 50%; background: var(--lagoon); box-shadow: 0 0 0 6px rgba(122,150,139,.12); }
h1 { margin: 20px 0 23px; font-size: clamp(51px, 6vw, 76px); line-height: 1.04; letter-spacing: -.055em; color: #111827; }
h1 em { color: var(--deep); font-style: normal; }
.lead { max-width: 650px; margin: 0; color: #5f6663; font-size: 17px; line-height: 1.7; }
.date-panel { position: relative; z-index: 2; padding: 28px; border: 1px solid #f0f1f0; border-radius: 24px; background: white; box-shadow: var(--shadow); }
.date-panel label, .field label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.date-input-wrap { position: relative; }
.date-input-wrap input { width: 100%; height: 58px; padding: 0 52px 0 16px; color: var(--ink); background: #f1f5f4; border: 1px solid transparent; border-radius: 8px; font: 700 16px "JetBrains Mono", monospace; outline: none; }
.date-input-wrap input:focus, .field input:focus, .field select:focus, .add-currency select:focus { border-color: var(--lagoon); box-shadow: 0 0 0 3px rgba(74,170,186,.12); }
.date-input-wrap span { position: absolute; right: 17px; top: 17px; font-size: 18px; pointer-events: none; }
.date-panel > p { margin: 10px 0 22px; color: var(--muted); font-size: 11px; }
.status { min-height: 37px; display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px; color: var(--deep); background: #eef2f0; font-size: 12px; font-weight: 700; }
.status i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--deep); }
.status.loading i { border: 2px solid #91cbd1; border-top-color: var(--deep); background: transparent; animation: spin .8s linear infinite; }
.status.error { color: var(--error); background: #fff0ed; }
.status.error i { background: var(--error); }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-decoration span { position: absolute; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; pointer-events: none; }
.hero-decoration span:nth-child(1) { width: 65px; height: 65px; top: 45px; right: 25%; }
.hero-decoration span:nth-child(2) { width: 25px; height: 25px; bottom: 45px; left: 53%; }
.hero-decoration span:nth-child(3) { width: 11px; height: 11px; top: 90px; left: 58%; background: rgba(255,255,255,.5); }
.rates-section { padding: 82px 0 90px; background: rgba(247,246,244,.5); }
.section-head, .converter-head { display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.section-head > p { max-width: 320px; margin: 0; color: var(--muted); text-align: right; font-size: 13px; }
h2 { margin: 8px 0 0; font-size: clamp(34px, 4vw, 49px); line-height: 1; letter-spacing: -.06em; }
.picker-row { display: flex; align-items: center; gap: 10px; margin: 33px 0 26px; }
.currency-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.currency-chip { display: inline-flex; align-items: center; gap: 11px; height: 45px; padding: 0 14px 0 17px; border: 0; border-radius: 8px; color: white; background: var(--deep); font: 700 13px "JetBrains Mono", monospace; }
.currency-chip button { width: 20px; height: 20px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: white; background: rgba(255,255,255,.15); cursor: pointer; line-height: 1; }
.add-currency select { height: 45px; max-width: 220px; padding: 0 35px 0 13px; color: var(--deep); background: #f1f5f4; border: 1px solid transparent; border-radius: 8px; outline: none; font-weight: 700; cursor: pointer; }
.rate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rate-card { min-height: 185px; padding: 22px; display: flex; flex-direction: column; border: 1px solid #f0f1f0; border-radius: 24px; background: white; box-shadow: 0 8px 25px rgba(32,42,37,.06); animation: rise .3s ease both; transition: transform .3s, box-shadow .3s; }
.rate-card:hover { transform: translateY(-5px); box-shadow: 0 16px 35px rgba(32,42,37,.1); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.rate-card-top { display: flex; justify-content: space-between; gap: 12px; }
.rate-code { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: white; background: var(--deep); font: 700 15px "JetBrains Mono", monospace; }
.remove-card { width: 28px; height: 28px; border: 0; border-radius: 50%; color: #729399; background: #edf7f8; cursor: pointer; }
.rate-card h3 { margin: 18px 0 1px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rate-card .rate { margin-top: auto; font: 700 24px "JetBrains Mono", monospace; letter-spacing: -.045em; }
.rate-card .nominal { color: var(--muted); font-size: 11px; }
.empty { padding: 45px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 20px; }
.converter-section { padding: 0 0 95px; }
.converter-card { padding: 42px; color: white; background: var(--ink); border-radius: 24px; box-shadow: var(--shadow); }
.converter-card .section-label { color: var(--aqua); }
.rate-badge { padding: 8px 13px; color: var(--aqua); border: 1px solid rgba(156,227,238,.25); border-radius: 20px; font-size: 11px; font-weight: 700; }
.converter-form { display: grid; grid-template-columns: 1fr 1.3fr 48px 1.3fr; gap: 12px; align-items: end; margin-top: 35px; }
.converter-card .field label { color: #9fc0c4; }
.field input, .field select { width: 100%; height: 58px; padding: 0 16px; color: var(--ink); background: #f1f5f4; border: 1px solid transparent; border-radius: 8px; outline: none; font-weight: 700; }
.swap-button { height: 48px; margin-bottom: 5px; border: 1px solid #526159; border-radius: 8px; color: white; background: #34423b; cursor: pointer; font-size: 23px; transition: .2s; }
.swap-button:hover { transform: rotate(180deg); background: var(--deep); }
.result-box { margin-top: 19px; padding: 27px 29px; border: 1px solid rgba(157,178,175,.28); border-radius: 16px; background: #1a221e; }
.result-box p { margin: 0 0 4px; color: var(--aqua); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; }
.result-box strong { display: block; font: 700 clamp(35px, 5vw, 53px)/1.15 "JetBrains Mono", monospace; letter-spacing: -.06em; overflow-wrap: anywhere; }
.result-box span { display: block; margin-top: 8px; color: #b6d3d7; font-size: 12px; }
.formula-note { margin: 15px 0 0; color: #789da2; font-size: 11px; }
footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 25px; color: var(--muted); font-size: 11px; }
.footer-inner a { font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr 310px; gap: 35px; }
  .rate-grid { grid-template-columns: repeat(2, 1fr); }
  .converter-form { grid-template-columns: 1fr 1fr 48px 1fr; }
}
@media (max-width: 680px) {
  .container { width: min(100% - 30px, 1160px); }
  .header-inner { height: 72px; }
  .header-link { font-size: 0; }
  .header-link span { font-size: 18px; }
  .hero { display: block; padding: 60px 0; min-height: auto; }
  .hero-copy { padding: 0 0 38px; }
  h1 { font-size: 48px; }
  .date-panel { padding: 21px; }
  .rates-section { padding: 65px 0; }
  .section-head { display: block; }
  .section-head > p { margin-top: 17px; text-align: left; }
  .picker-row { display: block; }
  .add-currency { margin-top: 10px; }
  .add-currency select { width: 100%; max-width: none; }
  .rate-grid { grid-template-columns: 1fr; }
  .converter-card { width: calc(100% - 20px); padding: 26px 18px; border-radius: 24px; }
  .converter-head { align-items: start; }
  .rate-badge { white-space: nowrap; }
  .converter-form { grid-template-columns: 1fr 48px 1fr; }
  .amount-field { grid-column: 1 / -1; }
  .swap-button { grid-column: 2; grid-row: 2; }
  .converter-form .field:nth-child(2) { grid-column: 1; grid-row: 2; }
  .converter-form .field:nth-child(4) { grid-column: 3; grid-row: 2; }
  .footer-inner { padding: 25px 0; flex-direction: column; align-items: start; justify-content: center; }
}
