:root {
  --ink: #17312c;
  --muted: #61716c;
  --green: #176b53;
  --green-dark: #123b32;
  --mint: #eaf4ee;
  --paper: #f7f9f7;
  --line: #dce5df;
  --white: #ffffff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); line-height: 1.6; }
a { color: inherit; }
.site-header { max-width: 1120px; margin: auto; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { text-decoration: none; font-weight: 800; font-size: 1.45rem; letter-spacing: -.04em; display: inline-flex; align-items: center; gap: 9px; }
.brand-mark { display: grid; place-items: center; background: var(--green); color: white; width: 34px; height: 34px; border-radius: 10px; font-size: 1.3rem; }
nav { display: flex; gap: 24px; }
nav a, .site-footer a { text-decoration: none; color: var(--muted); font-size: .94rem; }
nav a:hover, .site-footer a:hover { color: var(--green); }
.hero { background: var(--green-dark); color: white; padding: 78px 24px 86px; text-align: center; }
.eyebrow { font-size: .76rem; font-weight: 800; letter-spacing: .15em; color: var(--green); margin: 0 0 10px; }
.hero .eyebrow { color: #a9d9c2; }
h1 { font-size: clamp(2.5rem, 6vw, 4.7rem); letter-spacing: -.065em; line-height: 1.05; margin: 0 auto 20px; max-width: 850px; }
h1 span { color: #a9d9c2; }
.hero-copy { max-width: 580px; margin: 0 auto 28px; color: #d8e8e0; font-size: 1.08rem; }
.primary-link { display: inline-flex; gap: 12px; align-items: center; background: white; color: var(--green-dark); padding: 12px 18px; border-radius: 10px; font-weight: 750; text-decoration: none; }
.tool-section, .categories, .about { max-width: 1000px; margin: 0 auto; padding: 64px 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
h2 { margin: 0; letter-spacing: -.04em; font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.2; }
.section-heading > p { color: var(--muted); max-width: 350px; margin: 0; }
.converter-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 4vw, 34px); box-shadow: 0 18px 50px #15392c0b; }
label { display: block; font-size: .88rem; font-weight: 700; margin: 0 0 8px; }
input, select { width: 100%; min-height: 48px; border: 1px solid #cbd8d0; border-radius: 10px; background: white; color: var(--ink); padding: 10px 12px; font: inherit; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid #8ac8ad; outline-offset: 2px; }
#category { max-width: 100%; margin-bottom: 22px; }
.fields-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: end; }
.swap-button { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--mint); border-radius: 10px; color: var(--green); font-size: 1.5rem; cursor: pointer; }
.result-box { margin-top: 24px; border-radius: 14px; padding: 20px; background: var(--mint); display: grid; gap: 7px; }
.result-label { color: var(--muted); font-size: .82rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
#result { font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 800; overflow-wrap: anywhere; }
.copy-button { justify-self: start; border: 0; padding: 8px 12px; border-radius: 8px; background: var(--green); color: white; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.error { color: #a12727; margin-bottom: 0; }
.categories { padding-top: 20px; }
.categories h2 { margin-bottom: 24px; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.category-card { text-align: left; display: grid; gap: 6px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: white; cursor: pointer; color: var(--ink); font: inherit; }
.category-card > span { font-size: 1.7rem; color: var(--green); }
.category-card strong { font-size: 1.05rem; }
.category-card small { color: var(--muted); line-height: 1.4; }
.category-card:hover { border-color: #7bb79d; transform: translateY(-2px); }
.about { border-top: 1px solid var(--line); }
.about p { color: var(--muted); max-width: 720px; }
.site-footer { border-top: 1px solid var(--line); padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; max-width: 1120px; margin: auto; }
.site-footer p { color: var(--muted); font-size: .86rem; margin: 0; }
.site-footer div { display: flex; gap: 18px; }
.footer-brand { font-size: 1.1rem; }
@media (max-width: 680px) {
  .site-header { padding: 16px 18px; }
  nav { gap: 14px; }
  .hero { padding: 60px 20px 66px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 12px; }
  .fields-grid { grid-template-columns: 1fr 1fr; }
  .swap-button { grid-column: 1 / -1; grid-row: 2; justify-self: center; width: 48px; }
  .field:last-child { grid-column: 1 / -1; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 390px) { nav { gap: 10px; } nav a { font-size: .84rem; } .category-grid { grid-template-columns: 1fr; } }
