:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #101210;
  color: #f1f3ec;
  --accent: #c4d78b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
}

.calculator { width: 100%; max-width: 680px; }
header { margin-bottom: 42px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.22em;
}
h1 { margin: 0; font-size: clamp(26px, 5vw, 38px); letter-spacing: -0.035em; line-height: 1.15; }
.subtitle { max-width: 510px; margin: 18px 0 0; color: #adb3a7; font-size: 17px; line-height: 1.6; }
.positions { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
label, h2 { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; }
label { display: block; margin-bottom: 12px; color: #c3c8bd; }
input {
  width: 100%;
  min-width: 0;
  padding: 20px 16px;
  border: 1px solid #42483d;
  border-radius: 4px;
  background: #181b16;
  color: #f1f3ec;
  font-family: Consolas, "Courier New", monospace;
  font-size: 19px;
}
input::placeholder { color: #92998a; opacity: 1; }
input:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
input[aria-invalid="true"] { border-color: #c3c8bd; }
.error { min-height: 18px; margin: 9px 0 16px; font-size: 13px; color: #d6dad0; }
.result {
  padding: 28px 20px 34px;
  border: 1px solid #424b34;
  border-top: 2px solid var(--accent);
  border-radius: 4px;
  background: #191e15;
  text-align: center;
}
h2 { margin: 0 0 12px; color: var(--accent); }
output { display: block; color: var(--accent); font-size: clamp(54px, 12vw, 88px); font-weight: 700; letter-spacing: -0.055em; line-height: 1.2; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.unit { font-size: 0.4em; font-weight: 400; letter-spacing: 0; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; }
footer p { margin: 0; color: #a1a898; font-size: 12px; }
button { padding: 10px 16px; min-height: 44px; border: 1px solid #42483d; border-radius: 4px; background: transparent; color: #d6dad0; font: inherit; font-size: 14px; cursor: pointer; }
button:hover { background: #24291f; border-color: #899775; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 580px) {
  body { padding: 36px 20px; }
  header { margin-bottom: 30px; }
  .positions { grid-template-columns: 1fr; gap: 0; }
  input { font-size: 20px; }
}
