:root {
  --ink: #15223b;
  --muted: #718099;
  --blue: #2457ed;
  --blue-dark: #1640c5;
  --blue-soft: #e8efff;
  --line: #dfe7f3;
  --paper: #ffffff;
  --wash: #f4f7fc;
  --green: #49b38a;
  --shadow: 0 22px 70px rgba(31, 59, 120, 0.11);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 76% 5%, rgba(190, 215, 255, .38), transparent 29rem),
    linear-gradient(135deg, #f7faff 0%, #eef4ff 46%, #f8fbff 100%);
  font-family: 'Avenir Next', Avenir, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }

.page-shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }

.site-header {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.04em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid rgba(36, 87, 237, .12);
  border-radius: 10px;
}

.brand-mark svg { width: 22px; height: 22px; }
.brand-slash { color: var(--blue); }
.header-note { color: #8491a8; font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.status-dot { display: inline-block; width: 6px; height: 6px; margin: 0 7px 1px 0; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px rgba(73, 179, 138, .12); }

.hero { max-width: 700px; padding: 83px 0 47px; }
.eyebrow, .card-kicker { color: var(--blue); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 19px; }
.eyebrow-line { display: inline-block; width: 26px; height: 1px; background: var(--blue); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(43px, 6.5vw, 74px); line-height: .99; letter-spacing: -.075em; font-weight: 800; }
h1 em { color: var(--blue); font-style: normal; }
.hero-copy { max-width: 480px; margin-top: 24px; color: var(--muted); font-size: 15px; line-height: 1.75; }

.converter-card {
  display: grid;
  grid-template-columns: 1fr .87fr;
  gap: 40px;
  padding: 38px;
  background: rgba(255, 255, 255, .91);
  border: 1px solid rgba(214, 225, 241, .92);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.card-heading { display: flex; justify-content: space-between; gap: 20px; grid-column: 1 / -1; align-items: start; }
.card-heading h2, .section-heading h2 { margin-top: 8px; font-size: 25px; letter-spacing: -.055em; }
.accuracy-chip { padding: 8px 11px; color: #587092; background: var(--wash); border-radius: 7px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; white-space: nowrap; }

.input-label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; color: #4e5d75; font-size: 12px; font-weight: 700; }
.unit-label { color: #9aa7bb; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; font-weight: 400; }
.input-wrap { position: relative; }
.input-wrap input { width: 100%; height: 70px; padding: 0 85px 0 19px; color: var(--ink); background: #fbfcff; border: 1px solid #d4deed; border-radius: 11px; outline: none; font-size: 26px; font-weight: 700; letter-spacing: -.04em; transition: border-color .18s, box-shadow .18s, background .18s; }
.input-wrap input::placeholder { color: #b7c1d1; font-size: 18px; font-weight: 500; letter-spacing: -.03em; }
.input-wrap input:focus { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(36, 87, 237, .11); }
.input-unit { position: absolute; top: 50%; right: 19px; transform: translateY(-50%); color: #8b99af; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; }
.input-help, .input-error { min-height: 17px; margin-top: 8px; color: #95a1b4; font-size: 11px; }
.input-error { color: #c85b5b; }

.quick-values { margin-top: 18px; }
.quick-label { display: block; margin-bottom: 10px; color: #8a97ab; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; }
.quick-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.quick-button { padding: 8px 10px; color: #536783; background: #f1f5fb; border: 1px solid transparent; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; transition: color .18s, background .18s, border-color .18s; }
.quick-button:hover, .quick-button:focus-visible { color: var(--blue); background: var(--blue-soft); border-color: #c9d7ff; outline: none; }
.convert-button { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-top: 25px; padding: 16px 17px 16px 19px; color: #fff; background: var(--blue); border: 0; border-radius: 9px; box-shadow: 0 9px 18px rgba(36, 87, 237, .19); font-size: 12px; font-weight: 800; transition: background .18s, transform .18s, box-shadow .18s; }
.convert-button:hover, .convert-button:focus-visible { background: var(--blue-dark); box-shadow: 0 11px 22px rgba(36, 87, 237, .28); outline: none; transform: translateY(-1px); }
.button-arrow { font-size: 21px; font-weight: 400; line-height: 12px; }

.result-panel { display: flex; min-height: 267px; flex-direction: column; justify-content: space-between; padding: 24px; background: linear-gradient(145deg, #17284a 0%, #203c73 100%); border-radius: 14px; color: #fff; overflow: hidden; position: relative; }
.result-panel::after { position: absolute; right: -46px; bottom: -68px; width: 190px; height: 190px; border: 1px solid rgba(139, 185, 255, .22); border-radius: 50%; content: ''; box-shadow: 0 0 0 22px rgba(139, 185, 255, .04), 0 0 0 45px rgba(139, 185, 255, .03); }
.result-label { position: relative; z-index: 1; color: #91b5ff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.result-value { position: relative; z-index: 1; margin-top: 12px; font-size: clamp(44px, 6vw, 60px); font-weight: 800; letter-spacing: -.08em; line-height: 1; }
.result-unit { color: #9ebcff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 18px; font-weight: 400; letter-spacing: -.03em; }
.result-footer { position: relative; z-index: 1; display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-top: auto; padding-top: 25px; color: #afc0df; font-size: 10px; line-height: 1.5; }
.result-footer > span { max-width: 200px; }
.copy-button { flex: 0 0 auto; padding: 7px 9px; color: #dce8ff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.13); border-radius: 5px; font-size: 10px; transition: background .18s; }
.copy-button:not(:disabled):hover, .copy-button:not(:disabled):focus-visible { background: rgba(255,255,255,.17); outline: none; }
.copy-button:disabled { cursor: default; opacity: .42; }
.copy-icon { margin-right: 4px; font-size: 11px; }

.formula-note { display: flex; max-width: 590px; align-items: center; gap: 15px; margin: 31px 0 83px; padding-left: 4px; color: #7889a3; }
.formula-symbol { display: grid; width: 32px; height: 32px; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 9px; font-family: Georgia, serif; font-size: 18px; font-style: italic; }
.formula-note p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; font-size: 11px; }
.formula-note strong { color: var(--ink); font-size: 11px; }
.formula-note span:last-child { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; }

.reference-section { padding: 39px 0 51px; border-top: 1px solid rgba(208, 220, 238, .86); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin-bottom: 24px; }
.section-heading p { color: #8997ad; font-size: 11px; }
.reference-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.reference-item { display: flex; min-height: 78px; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 15px; color: #71819a; background: rgba(255, 255, 255, .56); border: 1px solid rgba(212, 223, 239, .89); border-radius: 10px; text-align: left; transition: background .18s, border-color .18s, transform .18s; }
.reference-item:hover, .reference-item:focus-visible { background: #fff; border-color: #bdcced; outline: none; transform: translateY(-2px); }
.reference-item span { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; }
.reference-item strong { color: var(--ink); font-size: 17px; letter-spacing: -.05em; }
.site-footer { display: flex; justify-content: space-between; padding: 19px 0 28px; color: #98a5b8; border-top: 1px solid rgba(208, 220, 238, .86); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 9px; letter-spacing: .02em; }
.site-footer span:first-child { color: #6f7f98; font-weight: 500; }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 32px, 540px); }
  .site-header { height: 75px; }
  .hero { padding: 55px 0 34px; }
  .converter-card { grid-template-columns: 1fr; gap: 27px; padding: 23px; }
  .card-heading { display: block; }
  .accuracy-chip { display: inline-block; margin-top: 15px; }
  .result-panel { min-height: 225px; }
  .formula-note { margin: 25px 0 56px; }
  .reference-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading { display: block; }
  .section-heading p { margin-top: 10px; }
}

@media (max-width: 420px) {
  .header-note { display: none; }
  .hero { padding-top: 42px; }
  h1 { font-size: 43px; }
  .converter-card { padding: 19px; border-radius: 16px; }
  .result-footer { align-items: start; flex-direction: column; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
