/* The plain pages on pastdue.tenhatch.com (home, Pro, after payment, privacy, terms, support).
   Contrast of every pair is checked in test/unit/contrast.test.ts. */

:root {
  --bg: #ffffff;
  --text: #1b1b1f;
  --muted: #4a5260;
  --line: #6b7280;
  --link: #9a3412;
  --focus: #9a3412;
  --box: #fff7ed;
  --button: #9a3412;
  --button-text: #ffffff;
  --error: #b91c1c;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1b1f;
    --text: #f3f4f6;
    --muted: #c4c9d1;
    --line: #9ca3af;
    --link: #fdba74;
    --focus: #fed7aa;
    --box: #2a1a0e;
    --button: #fdba74;
    --button-text: #1b1b1f;
    --error: #fca5a5;
    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: 760px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

header.site {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

header.site img {
  border-radius: 9px;
}

header.site a {
  color: var(--text);
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
}

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

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

a {
  color: var(--link);
  text-underline-offset: 2px;
}

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

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

.box {
  background: var(--box);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

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

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

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

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

footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

footer.site nav a {
  display: inline-block;
  min-height: 24px;
  line-height: 24px;
}

form.pro {
  display: grid;
  gap: 16px;
  margin: 16px 0;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0;
}

legend {
  font-weight: 700;
  padding: 0 4px;
}

label {
  display: block;
  font-weight: 600;
}

.choice {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  font-weight: 400;
}

.choice input {
  width: 24px;
  height: 24px;
  margin: 0;
}

input[type='email'] {
  display: block;
  width: 100%;
  max-width: 420px;
  min-height: 40px;
  margin-top: 4px;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}

button {
  justify-self: start;
  min-height: 44px;
  padding: 8px 20px;
  font: inherit;
  font-weight: 700;
  color: var(--button-text);
  background: var(--button);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

button[disabled] {
  cursor: progress;
}

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