/* Every page on ticketecho.tenhatch.com: home, pricing, help, privacy, terms, sign-in and the
   app (from RepeatAhead's stylesheet, in TicketEcho's teal and amber). Light and dark follow the
   person's system. Every colour pair is measured in test/unit/package.test.ts (text 4.5:1, lines
   and focus 3:1); controls are at least 24 by 24 px (44 for buttons). */

:root {
  --bg: #ffffff;
  --text: #14211f;
  --muted: #4a5a57;
  --line: #6b7c79;
  --link: #0b5f58;
  --focus: #b45309;
  --box: #effaf8;
  --button: #0b5f58;
  --button-text: #ffffff;
  --error: #b42318;
  --ok: #17663a;
  --chip: #eef5f3;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101a19;
    --text: #e8f1ef;
    --muted: #b5c4c1;
    --line: #8fa3a0;
    --link: #7dd3c8;
    --focus: #fbbf24;
    --box: #1b2a28;
    --button: #7dd3c8;
    --button-text: #0b1716;
    --error: #fda29b;
    --ok: #86e0a8;
    --chip: #1f2e2c;
    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: 860px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

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

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

header.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-left: auto;
}

header.site nav a {
  display: inline-flex;
  align-items: center;
  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;
}

/* Date and time inputs give focus to their inner fields (day, month, hour); ring the whole input. */
input[type='date']:focus,
input[type='date']:focus-within,
input[type='time']:focus,
input[type='time']:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

h2:focus,
h1:focus {
  outline: none;
}

h2:focus-visible,
h1:focus-visible {
  outline: 3px solid var(--focus);
}

.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);
}

button.small {
  min-height: 32px;
  padding: 2px 10px;
  font-size: 15px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

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

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.plan {
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}

.plan h3 {
  margin-top: 0;
}

.price {
  font-size: 26px;
  font-weight: 700;
}

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

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

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

th,
td:last-child {
  overflow-wrap: normal;
  white-space: nowrap;
}

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

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

input[type='email'],
input[type='text'],
input[type='search'],
input[type='number'],
input[type='date'],
input[type='time'],
select,
textarea {
  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;
}

textarea {
  max-width: 640px;
  resize: vertical;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--chip);
  padding: 0 4px;
  border-radius: 4px;
}

input[type='number'] {
  max-width: 120px;
}

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

fieldset {
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px 12px;
  margin: 12px 0;
  min-width: 0;
}

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

.days {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.pick {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  max-height: 360px;
  overflow-y: auto;
}

.cards {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: grid;
  gap: 12px;
}

.card {
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}

.card h3 {
  margin: 0 0 4px;
}

.chip {
  display: inline-block;
  background: var(--chip);
  color: var(--text);
  border-radius: 999px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 600;
}

.hint {
  color: var(--muted);
  font-size: 15px;
  margin: 4px 0;
}

.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;
}

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;
}

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

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

[hidden] {
  display: none !important;
}
