:root {
  color-scheme: light;
  --sheet: #eff1e8;
  --surface: #fbfcf7;
  --ink: #222820;
  --muted: #505a4e;
  --rule: #cbd3c7;
  --deep: #232c25;
  --signal: #daf27a;
  --focus: #3a6032;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--sheet); color: var(--ink); }
a { color: inherit; }
img { display: block; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.wrap { width: min(100% - 42px, 920px); margin-inline: auto; }
.mast { border-bottom: 1px solid var(--rule); }
.mast-row { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 750; letter-spacing: -.035em; text-decoration: none; }
.reference-link { color: var(--muted); font-size: 13px; font-weight: 650; text-underline-offset: 3px; }
.intro { padding-top: 35px; }
.label { margin: 0; color: #425442; font: 700 11px/1.5 ui-monospace, monospace; letter-spacing: .12em; }
.label span { display: inline-block; width: 8px; height: 8px; margin-inline-end: 4px; border-radius: 50%; background: #578349; }
h1 { margin: 7px 0 9px; font-size: clamp(38px, 7.4vw, 74px); line-height: .99; letter-spacing: -.073em; }
.lede { margin: 0; max-width: 53ch; color: var(--muted); font-size: 16px; line-height: 1.55; }
.ruler {
  display: flex; justify-content: space-between; align-items: end; gap: 8px; height: 33px; margin-top: 22px;
  border-top: 1px solid #a6b19f; color: var(--muted); font: 650 10px/1.2 ui-monospace, monospace;
  background-image: repeating-linear-gradient(90deg, #899987 0 1px, transparent 1px 8px),
                    repeating-linear-gradient(90deg, #899987 0 1px, transparent 1px 40px);
  background-size: 100% 8px, 100% 14px; background-repeat: no-repeat;
}
.bench { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr); gap: 14px; margin-top: 15px; }
.controls, .readout { min-width: 0; border-radius: 12px; padding: 21px clamp(14px, 3vw, 24px); }
.controls { border: 1px solid var(--rule); background: var(--surface); }
.readout { background: var(--deep); color: #f7faef; display: flex; flex-direction: column; }
.readout .label { color: var(--signal); }
h2 { margin: 5px 0 14px; font-size: 24px; line-height: 1.1; letter-spacing: -.038em; }
.formats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 13px; }
.formats button, .calculate {
  border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet);
  padding: 7px 10px; color: var(--ink); font-size: 13px; font-weight: 650; cursor: pointer;
}
.formats button:hover, .calculate:hover { border-color: var(--focus); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fields label { display: block; min-width: 0; color: var(--ink); font-size: 13px; font-weight: 650; }
.fields label span { color: var(--muted); font-weight: 500; }
.fields input, .fields select {
  display: block; width: 100%; min-width: 0; min-height: 37px; margin-top: 4px; padding: 5px 8px;
  border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); color: var(--ink);
}
.calculate { margin-top: 14px; padding: 8px 12px; background: var(--signal); border-color: #adbd6d; }
.calculate span { margin-inline-start: 3px; }
output {
  display: block; margin-top: auto; padding: 14px 0 4px; color: var(--signal); overflow-wrap: anywhere;
  font: 700 clamp(25px, 4.3vw, 47px)/1.07 system-ui, sans-serif; letter-spacing: -.063em;
}
.help { margin: 3px 0 11px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.readout .help { color: #d2ddca; }
.footnote { margin: auto 0 0; padding-top: 12px; border-top: 1px solid #566257; color: #d2ddca; font-size: 13px; line-height: 1.5; }
.reference {
  margin-top: 15px; padding: 17px 20px; border: 1px solid var(--rule); border-radius: 10px;
  background: var(--surface); display: grid; grid-template-columns: 1fr minmax(220px, 1.2fr); gap: 13px; align-items: center;
}
.reference h2 { margin-bottom: 0; }
.files { display: grid; gap: 7px; }
.files a {
  display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px;
  color: var(--ink); font-size: 13px; font-weight: 650; text-decoration: none;
}
.files a:hover { background: var(--sheet); border-color: var(--focus); }
.files small { color: #425442; font: 650 11px/1.5 ui-monospace, monospace; white-space: nowrap; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px 20px; margin-top: 21px; padding: 14px 0 20px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12px; }
.footer strong { color: var(--ink); }
@media (max-width: 620px) {
  .wrap { width: calc(100% - 28px); }
  .intro { padding-top: 26px; }
  .bench, .reference { grid-template-columns: 1fr; }
  .footnote { margin-top: 8px; }
}
