/* The plain pages on latemeter-ledger.tenhatch.com (home, pricing, help, privacy, terms, after payment).
   Every colour pair is measured in test/unit/package.test.ts. */

:root {
  --bg: #ffffff;
  --text: #1c1917;
  --muted: #57534e;
  --line: #78716c;
  --link: #1d6b45;
  --focus: #1d6b45;
  --box: #eef6f0;
  --button: #1d6b45;
  --button-text: #ffffff;
  --error: #b91c1c;
  --ok: #166534;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1714;
    --text: #f5f0eb;
    --muted: #cfc6bd;
    --line: #a39a91;
    --link: #7fdcaa;
    --focus: #9ce6bd;
    --box: #1d2a22;
    --button: #7fdcaa;
    --button-text: #1a1714;
    --error: #fca5a5;
    --ok: #86efac;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    'Segoe UI',
    -apple-system,
    BlinkMacSystemFont,
    Roboto,
    'Helvetica Neue',
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

header.site {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

header.site a {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  min-height: 24px;
}

h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 0 0 12px;
}

h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 32px 0 8px;
}

h3 {
  font-size: 18px;
  margin: 20px 0 6px;
}

a {
  color: var(--link);
}

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

.lede {
  font-size: 19px;
}

.muted {
  color: var(--muted);
}

.box {
  background: var(--box);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 16px 0;
}

ul.plain {
  padding-left: 20px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 18px;
  border: 2px solid var(--button);
  border-radius: 8px;
  background: var(--button);
  color: var(--button-text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary,
button.secondary {
  background: transparent;
  color: var(--link);
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 4px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  vertical-align: top;
}

td.num,
th.num {
  text-align: right;
  white-space: nowrap;
}

form label {
  display: block;
  font-weight: 600;
  margin: 12px 0 4px;
}

form label.inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}

input[type='email'],
input[type='text'] {
  width: 100%;
  max-width: 420px;
  min-height: 44px;
  padding: 8px 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

input[type='checkbox'] {
  flex-shrink: 0;
  width: 24px;
  min-width: 24px;
  height: 24px;
  accent-color: var(--button);
}

.error {
  color: var(--error);
  font-weight: 600;
}

.ok {
  color: var(--ok);
  font-weight: 600;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

article.rule {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 20px;
}

blockquote {
  margin: 8px 0;
  padding-left: 12px;
  border-left: 3px solid var(--line);
}

blockquote p {
  margin: 0;
}

footer.site {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--muted);
  font-size: 15px;
}

footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

nav.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

footer.site nav a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
