@font-face {
  font-family: 'Geist';
  src: url('./fonts/Geist-Variable.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'STIX Two Math';
  src: url('./fonts/STIXTwoMath-Regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f4f2ed;
  --ink: #242723;
  --muted: #999b94;
  --line: #b7b7ae;
  --math-size: clamp(25px, 2.35vw, 38px);
  --input-size: clamp(32px, 3.4vw, 54px);
  --equation-gap: clamp(20px, 2.1vw, 36px);
  --sign-width: calc(var(--math-size) * .75);
  --hanging-space: calc(var(--sign-width) + var(--equation-gap));
  font-family: 'Geist', sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100svh; }
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url('./paper.svg') repeat;
  opacity: .3;
}
.masthead { position: absolute; top: 6.5vh; left: 4.2vw; }
h1, .brand { margin: 0; font-size: 36px; font-weight: 700; letter-spacing: -1.5px; line-height: 1; }
.brand { color: inherit; text-decoration: none; }
.logo-motion {
  display: inline-block;
  transform-origin: 50% 50%;
  transform-box: border-box;
  animation: six-seven 2.6s cubic-bezier(.45, 0, .55, 1) infinite;
}
@keyframes six-seven {
  0%, 100% { transform: skewY(0deg); }
  14% { transform: skewY(-13deg); }
  32% { transform: skewY(13deg); }
  50% { transform: skewY(-11deg); }
  68% { transform: skewY(11deg); }
  85% { transform: skewY(0deg); }
}
main {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  padding: 140px clamp(36px, 8vw, 160px);
}
.equation {
  display: flex;
  flex-wrap: wrap;
  align-items: first baseline;
  gap: var(--equation-gap);
  width: 100%;
  min-width: 0;
  max-width: 1320px;
  margin-inline: auto;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: baseline;
  flex: 0 1 auto;
  width: var(--input-width, 192px);
  min-width: 108px;
  max-width: 100%;
}
.result-line {
  display: flex;
  align-items: first baseline;
  flex: 1 1 55%;
  min-width: 0;
  gap: var(--equation-gap);
}
.equation.is-stacked .result-line {
  flex-basis: calc(100% + var(--hanging-space));
  margin-inline-start: calc(-1 * var(--hanging-space));
}
#input, #input-measure {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  font-size: var(--input-fitted-size, var(--input-size));
  letter-spacing: -.03em;
  line-height: 1.25;
}
#input {
  display: inline-block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 8px 2px 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  caret-color: var(--ink);
  transition: border-color .15s;
}
#input:focus { border-bottom-color: var(--ink); }
#input::placeholder { color: var(--muted); }
#input[aria-invalid='true'] { border-bottom-color: #a45243; }
#input-measure { position: fixed; top: 0; left: 0; transform: translateX(-200%); visibility: hidden; white-space: pre; pointer-events: none; }
.equals, .result {
  font-family: 'STIX Two Math', math;
  font-size: var(--math-size);
  font-weight: 400;
  line-height: 1.85;
}
.equals { flex: 0 0 var(--sign-width); color: var(--muted); }
.result { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.math-flow { white-space: normal; }
.math-power-head { display: inline-block; max-width: 100%; }
.math-exponent { font-size: .7em; line-height: 0; vertical-align: super; }
.result math {
  font-family: 'STIX Two Math', math;
  font-size: inherit;
  math-style: normal;
}
.result:empty::before { content: '…'; color: var(--muted); }
.error { max-width: 1320px; width: 100%; margin: 24px auto 0; color: #934b3c; font-size: 14px; line-height: 1.6; }
.error[hidden] { display: none; }
.site-footer {
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin-top: -48px;
  padding: 0 clamp(36px, 8vw, 160px) 24px;
  font-size: 12px;
  line-height: 24px;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.info-page main { display: block; width: 100%; max-width: 960px; margin-inline: auto; padding: 160px clamp(36px, 8vw, 96px) 100px; }
.info-page h1 { font-size: clamp(36px, 6vw, 64px); letter-spacing: -.055em; line-height: 1.12; }
.info-page h2 { margin: 48px 0 12px; font-size: 21px; font-weight: 600; letter-spacing: -.025em; }
.info-page p { margin: 16px 0; font-size: 16px; line-height: 1.8; }
.info-page .intro { max-width: 32em; margin-top: 24px; color: #676b62; font-size: 19px; }
.info-page a { color: inherit; text-underline-offset: 4px; }
.info-page strong { font-weight: 550; }
.info-page .examples { display: grid; gap: 12px; justify-items: start; margin: 28px 0; }
.info-page math { font-family: 'STIX Two Math', math; font-size: 28px; }
.info-page .back-link { display: inline-block; margin-top: 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (min-width: 1200px) {
  .input-wrap { min-width: 180px; }
}
@media (max-width: 700px) {
  :root { --math-size: clamp(22px, 5.8vw, 28px); --input-size: clamp(28px, 8vw, 40px); --equation-gap: 12px; }
  .masthead { top: 32px; left: 24px; }
  h1, .brand { font-size: 28px; }
  main { padding: 140px 36px 80px; }
  .input-wrap { min-width: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  #input { transition: none; }
  .logo-motion { animation: none; }
}
