:root {
  color-scheme: light;
  --background: #fcfcfa;
  --surface: #ffffff;
  --surface-soft: #f7f7f3;
  --text: #1f2421;
  --muted: #68706b;
  --border: #dfe3df;
  --border-strong: #b9c1bb;
  --accent: #284f3f;
  --accent-soft: #edf3ef;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--text);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--background);
}

button,
input {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  width: 100%;
  padding: 64px 20px;
}

.converter,
.site-footer,
.ad-slot--footer {
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.converter {
  min-width: 0;
}

.converter__header {
  margin-bottom: 38px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
.explainer h2 {
  font-family: Georgia, "Times New Roman", Times, serif;
}

h1 {
  margin: 0;
  font-size: clamp(2.15rem, 7vw, 3.7rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.intro {
  max-width: 450px;
  margin: 17px auto 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.converter__fields {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 9px;
}

.field__label {
  color: #39413c;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.field__control {
  display: flex;
  align-items: center;
  min-height: 76px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field__control:hover {
  border-color: var(--border-strong);
}

.field__control:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(40, 79, 63, 0.1);
}

.field__control--result {
  background: var(--surface-soft);
}

.field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 20px 18px 20px 22px;
  color: var(--text);
  font-size: clamp(1.55rem, 5vw, 2rem);
  font-variant-numeric: tabular-nums;
  font-weight: 520;
  letter-spacing: -0.02em;
}

.field input::placeholder {
  color: #a3aaa5;
  font-weight: 400;
}

.field__unit {
  flex: 0 0 auto;
  padding-right: 22px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.swap-button {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: 9px 14px;
  color: var(--accent);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.swap-button:hover {
  background: var(--accent-soft);
  border-color: #cfd9d2;
}

.swap-button:active {
  transform: scale(0.98);
}

.swap-button:focus-visible {
  outline: 3px solid rgba(40, 79, 63, 0.15);
  outline-offset: 3px;
}

.swap-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.swap-button span {
  font-size: 0.86rem;
  font-weight: 700;
}

.conversion-note {
  margin: 21px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
}

.ad-slot {
  width: min(100%, 600px);
  margin: 56px 0 0;
  padding: 24px 0;
  border-top: 1px solid #e2e5e2;
  border-bottom: 1px solid #e2e5e2;
  text-align: center;
}

.ad-slot__label {
  display: block;
  margin-bottom: 9px;
  color: #9aa19c;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad-slot--footer {
  margin-top: 48px;
}


.explainer {
  margin-top: 50px;
  padding-top: 0;
  border-top: 0;
}

.explainer h2 {
  max-width: 470px;
  margin: 0 0 18px;
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.explainer p {
  max-width: 560px;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.72;
}

.explainer p:last-child {
  margin-bottom: 0;
}

@media (max-width: 520px) {
  .page-shell {
    padding-top: 58px;
    padding-bottom: 46px;
  }

  .converter__header {
    margin-bottom: 30px;
  }

  .field__control {
    min-height: 70px;
  }

  .field input {
    padding-left: 18px;
    padding-right: 12px;
  }

  .field__unit {
    padding-right: 18px;
  }

  .ad-slot {
    margin-top: 46px;
  }

  .explainer {
    margin-top: 42px;
    padding-top: 28px;
  }
}


.disclaimer {
  margin: 34px 0 0;
  color: #8a918c;
  font-size: 0.72rem;
  line-height: 1.6;
}


.site-footer{
  margin-top:32px;
  padding-top:0;
  border-top:0;
  text-align:center;
}

.site-footer p{
  margin:0 0 10px;
  color:#8a918c;
  font-size:.78rem;
}

.site-footer nav{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.site-footer a,
.site-footer span{
  color:#68706b;
  font-size:.78rem;
  text-decoration:none;
}

.site-footer a:hover{
  text-decoration:underline;
}
