:root {
  color-scheme: dark;
  --background: #141612;
  --panel: #1d201a;
  --border: #363c30;
  --text: #f6f3ed;
  --muted: #b9b6b2;
  --accent: #edffaa;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--background);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
body::before { content: ''; position: fixed; z-index: -1; inset: 0; background: radial-gradient(ellipse at 90% 10%, #43550022, transparent 55%); pointer-events: none; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.page { width: min(1060px, calc(100% - 64px)); margin: 0 auto; }
.header { min-height: 100px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 900; letter-spacing: -.6px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-content: center; position: relative; border: 1px solid var(--accent); color: var(--accent); font-size: 23px; }
.brand-mark span { position: absolute; right: -5px; top: -9px; font-size: 20px; background: var(--background); }
.brand-light { font-weight: 400; color: var(--accent); }
.header-note, .eyebrow, .small-tag { font-family: 'Courier New', monospace; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; }
.header-note { color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 20px; }
.language-toggle { min-height: 40px; padding: 0 12px; background: transparent; color: var(--accent); border-color: var(--border); font-size: 12px; }
.language-toggle:hover { border-color: var(--accent); }
.intro { padding: 47px 0 32px; }
.eyebrow { color: var(--accent); display: flex; align-items: center; gap: 9px; margin: 0; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
h1 { margin: 17px 0; font-size: clamp(36px, 4.7vw, 53px); line-height: 1.08; letter-spacing: -2px; font-weight: 800; }
h1 span { color: var(--accent); }
h1 .title-first { color: var(--text); }
.intro-copy { font-size: 15px; line-height: 1.7; color: var(--muted); margin: 0; }
.calculator { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; }
.panel { border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.coordinates { padding: 27px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
.small-tag { color: var(--muted); border: 1px solid var(--border); padding: 5px 8px; border-radius: 3px; letter-spacing: 1px; }
.field { margin-top: 25px; }
label { display: flex; gap: 9px; align-items: center; margin-bottom: 10px; font-weight: 700; font-size: 14px; }
.field-number { color: var(--accent); font-family: 'Courier New', monospace; font-size: 11px; font-weight: 400; }
.field-caption { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: auto; }
input { width: 100%; min-width: 0; height: 52px; padding: 0 15px; border: 1px solid #474e40; background: #141612; border-radius: 4px; color: var(--text); font-size: 16px; font-family: 'Courier New', monospace; transition: border-color .15s; }
input::placeholder { color: #868d7e; opacity: 1; }
input:focus { border-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
input[aria-invalid='true'] { border-color: #f09d84; }
.field-help, .field-error, .automatic-note { font-size: 11px; line-height: 1.6; margin: 8px 0 0; color: var(--muted); }
.field-error { color: #f7bead; }
.field-error:empty { display: none; }
.actions { display: flex; gap: 10px; margin-top: 25px; }
button { min-height: 48px; border: 1px solid transparent; border-radius: 4px; font-size: 13px; font-weight: 700; }
.calculate { flex: 1; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--accent); color: #171d0a; }
.calculate:hover { background: #dff58e; }
.calculate .button-arrow { font-size: 23px; font-weight: 400; }
.reset { padding: 0 12px; color: var(--muted); background: transparent; border-color: var(--border); }
.reset:hover { color: var(--text); border-color: var(--muted); }
.automatic-note { margin-top: 12px; max-width: 360px; }
.result { padding: 27px; display: flex; flex-direction: column; min-width: 0; position: relative; overflow: hidden; background: linear-gradient(140deg, #293020, #1d201a 65%); }
.result::before { content: '+'; position: absolute; right: 17px; bottom: 53px; color: #edffaa12; font-size: 120px; font-weight: 200; line-height: 1; pointer-events: none; }
.result-symbol { color: var(--accent); font-size: 23px; }
.result-body { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 37px 0; }
.result-body .eyebrow { font-size: 10px; letter-spacing: 1px; color: var(--muted); }
output { display: block; max-width: 100%; color: var(--accent); font-family: 'Courier New', monospace; font-weight: 700; font-size: clamp(38px, 5.5vw, 66px); letter-spacing: -3px; line-height: 1.15; margin: 18px 0 5px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.result-unit { font-size: 14px; color: var(--muted); }
#result-message { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 26px 0 0; }
.result-footnote { padding-top: 17px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); margin: 0; }
.is-ready { border-color: #76864a; }
.is-ready .eyebrow { color: var(--accent); }
.instructions { margin-top: 20px; padding: 23px 27px; background: transparent; }
.instructions-title { display: flex; align-items: center; gap: 10px; }
.info-icon { border: 1px solid #899471; border-radius: 50%; width: 17px; height: 17px; display: grid; place-content: center; font: 12px Georgia, serif; color: var(--accent); }
ol { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 32px; padding-left: 17px; margin: 20px 0; }
li { padding-left: 3px; font-size: 12px; color: var(--muted); line-height: 1.7; }
li::marker { color: var(--accent); font: 11px 'Courier New', monospace; }
li strong { display: block; margin-bottom: 6px; color: var(--text); font-weight: 600; }
li span { color: var(--muted); }
.format-note { font-size: 11px; line-height: 1.8; color: var(--muted); border-top: 1px solid var(--border); padding-top: 15px; margin: 0; }
code { color: var(--accent); font-size: 12px; white-space: nowrap; }
footer { display: flex; justify-content: space-between; gap: 18px; padding: 25px 0 30px; font-size: 10px; line-height: 1.6; color: var(--muted); }
.noscript { padding: 16px; color: #f7bead; border: 1px solid currentColor; }
@media (max-width: 700px) {
  .page { width: calc(100% - 32px); }
  .header { min-height: 78px; gap: 12px; }
  .brand { font-size: 15px; gap: 9px; }
  .brand-mark { width: 32px; height: 32px; }
  .header-note { display: none; }
  .intro { padding: 32px 0 25px; }
  h1 { letter-spacing: -1.4px; }
  .calculator { grid-template-columns: 1fr; gap: 16px; }
  .coordinates, .result { padding: 22px; }
  .result-body { padding: 28px 0; }
  output { font-size: clamp(36px, 12vw, 60px); }
  #result-message { margin-top: 17px; }
  .instructions { margin-top: 16px; padding: 22px; }
  ol { grid-template-columns: 1fr; gap: 18px; margin: 17px 0; }
  footer { flex-direction: column; gap: 5px; padding-top: 22px; }
}
@media (max-width: 350px) {
  .brand { font-size: 12px; gap: 7px; }
  .brand-mark { width: 28px; height: 28px; }
  .language-toggle { padding: 0 8px; }
  .coordinates, .result, .instructions { padding: 17px; }
  .actions { flex-direction: column; }
  .field-caption { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
