/* Tinos is metric-compatible with Times New Roman. It is only downloaded on
   devices that do not ship Times New Roman (most Android phones). */
@font-face {
  font-family: "Tinos";
  src: url("/fonts/tinos-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Tinos";
  src: url("/fonts/tinos-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Tinos";
  src: url("/fonts/tinos-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #000000;
  --paper: #ffffff;
  --muted: #595959;
  --measure: 34rem;
  --gutter: 20px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ffffff;
    --paper: #000000;
    --muted: #a6a6a6;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  font-size: 19px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Times New Roman", Times, "Tinos", "Liberation Serif", "Nimbus Roman", serif;
  font-size: 1rem;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.14em;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

::selection { background: var(--ink); color: var(--paper); }

p { margin: 0 0 1.2em; }

strong { font-weight: 700; }

/* Top bar */
.top {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 26px var(--gutter) 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.mark {
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.top nav a {
  text-decoration: none;
  font-style: italic;
  font-size: 18px;
}

.top nav a:hover,
.top nav a[aria-current="page"] { text-decoration: underline; }

/* The column */
main {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  flex: 1;
}

.open { padding-top: clamp(56px, 12vh, 140px); }

h1 {
  font-weight: 400;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

.lede {
  font-size: clamp(20px, 2.2vw, 23px);
  line-height: 1.42;
  margin-bottom: 1.6em;
}

/* Waitlist form */
.join { margin: 0; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.join .row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  border-bottom: 1px solid var(--ink);
}

.join input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 20px;
  padding: 10px 0;
  border-radius: 0;
}

.join input[type="email"]::placeholder {
  color: var(--muted);
  font-style: italic;
  opacity: 1;
}

.button,
.join button {
  font: inherit;
  font-size: 18px;
  line-height: 1;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 12px 18px;
  margin: 6px 0;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
}

.button:hover,
.join button:hover {
  background: var(--paper);
  color: var(--ink);
}

.join button[disabled] {
  opacity: 0.5;
  cursor: default;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.note {
  font-size: 16px;
  color: var(--muted);
  margin: 10px 0 0;
}

.done,
.error {
  font-size: 20px;
  margin: 0;
}

.error { font-style: italic; }

/* Section breaks, like a book */
hr.break {
  border: 0;
  width: 3em;
  height: 1px;
  background: var(--ink);
  margin: clamp(56px, 10vh, 112px) auto;
}

/* The formula */
.math {
  font-size: clamp(56px, 12vw, 120px);
  line-height: 1;
  text-align: center;
  margin: 0 0 0.45em;
  white-space: nowrap;
}

.math i { font-style: italic; }

.math sup {
  font-size: 0.5em;
  line-height: 0;
  vertical-align: 0.9em;
  margin-left: 0.04em;
}

.calc {
  margin-top: 2.2em;
  padding: 1.4em 0 0;
  border-top: 1px solid var(--ink);
}

.calc label {
  display: block;
  font-style: italic;
  margin-bottom: 0.4em;
}

.calc input[type="number"] {
  font: inherit;
  font-size: 44px;
  line-height: 1;
  width: 3.4em;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: inherit;
  padding: 0 0 4px;
  text-align: center;
}

.calc input[type="number"]::-webkit-outer-spin-button,
.calc input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.calc .unit {
  font-size: 22px;
  margin-left: 0.4em;
}

.result {
  font-size: clamp(21px, 2.4vw, 25px);
  line-height: 1.4;
  margin: 0.9em 0 0;
}

.result strong { font-weight: 400; font-style: italic; }

/* What it does */
h2 {
  font-weight: 400;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.15;
  margin: 0 0 0.8em;
}

.what p em { font-style: italic; }

/* Closing */
.close { text-align: center; padding-bottom: 1em; }

.close .big {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
  margin-bottom: 0.8em;
}

/* Long text pages */
.text { padding-top: clamp(40px, 8vh, 96px); }

.text h1 {
  font-size: clamp(38px, 6vw, 56px);
  margin-bottom: 0.6em;
}

.text h2 {
  font-size: 22px;
  margin: 2em 0 0.6em;
}

.epigraph {
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 23px);
  margin: 0 0 2.2em;
}

.epigraph cite {
  display: block;
  font-style: normal;
  font-size: 17px;
  margin-top: 0.4em;
}

.text ul { padding-left: 1.2em; }
.text li { margin-bottom: 0.4em; }

.signoff {
  margin-top: 2.6em;
  font-style: italic;
}

/* Footer */
footer {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(56px, 10vh, 112px) var(--gutter) 40px;
  font-size: 16px;
  line-height: 1.6;
}

footer .inner {
  border-top: 1px solid var(--ink);
  padding-top: 20px;
}

footer p { margin: 0; }

footer nav a {
  margin-right: 20px;
  text-decoration: none;
}

footer nav a:hover { text-decoration: underline; }

@media (max-width: 520px) {
  .join .row { flex-direction: column; gap: 0; border-bottom: 0; }
  .join input[type="email"] { border-bottom: 1px solid var(--ink); }
  .join button { width: 100%; margin: 14px 0 0; padding: 14px; }
  .calc input[type="number"] { font-size: 36px; }
}
