/* Design system, part 7 of 7: FAQ, page headers, billing facts, legal pages, waitlist, small-screen app tweaks. */

.qa {
  border-bottom: 1px solid var(--border);
}

.qa:first-of-type {
  border-top: 1px solid var(--border);
}

.qa > summary {
  position: relative;
  padding: 18px 44px 18px 0;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

.qa > summary::-webkit-details-marker {
  display: none;
}

.qa > summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border: solid var(--text-dim);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.qa[open] > summary::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}

.qa > summary:hover {
  color: var(--accent-ink);
}

.qa > div {
  max-width: 72ch;
  padding: 0 0 20px;
  color: var(--text-dim);
}

.faq .hint {
  margin-top: 16px;
}

.page-head {
  max-width: 780px;
  margin: 8px 0 40px;
}

.page-head h1,
.legal h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.page-head .lead {
  color: var(--text-dim);
  font-size: 1.125rem;
}

.narrow {
  max-width: 880px;
}

.facts {
  margin: 0;
  padding: 6px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}

.facts div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.facts div:last-child {
  border-bottom: 0;
}

.facts dt {
  color: var(--text-dim);
}

.facts dd {
  margin: 0;
}

.legal {
  max-width: 74ch;
}

.legal h2 {
  margin: 36px 0 10px;
  font-size: 1.25rem;
}

.legal li {
  margin-bottom: 10px;
}

.optin {
  align-items: start;
}

.optin h1 {
  max-width: 18ch;
  margin: 18px 0 16px;
  font-size: clamp(2rem, 1.35rem + 2.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.optin-form,
.optin-done {
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.optin-form label {
  margin-top: 0;
}

.field-row {
  display: flex;
  gap: 8px;
}

.field-row input,
.field-row button {
  min-height: 48px;
}

.field-row input {
  flex: 1;
  min-width: 0;
}

.optin-form .fine {
  margin: 14px 0 0;
}

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

.optin-aside {
  margin-top: 64px;
  padding: 24px;
}

.optin-aside h2,
.optin-done h2 {
  margin: 0 0 8px;
  font-size: 1.125rem;
}

.done-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border: 1px solid var(--ok-line);
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
}

.done-icon svg.i {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.pay {
  max-width: 640px;
}

@media (max-width: 1000px) {
  .optin-aside {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 28px 16px 56px;
  }
  .card {
    padding: 16px;
  }
  th,
  td {
    padding: 8px 10px;
    font-size: 0.875rem;
  }
  .facts {
    padding: 4px 16px;
  }
  .facts div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .field-row {
    flex-direction: column;
  }
  .optin-form,
  .optin-done,
  .optin-aside {
    padding: 20px;
  }
}

/* Signed-in first screen and the compact trust line of the app. */
.welcome {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: center;
  margin: 0 0 28px;
}

.welcome-art {
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  background: var(--surface-2);
}

.welcome h2 {
  margin: 4px 0 10px;
}

.welcome-steps {
  margin: 0 0 12px;
  padding-left: 1.3em;
  color: var(--text-2);
  line-height: 1.6;
}

.app-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 32px 0 0;
  padding: 14px 0 0;
  list-style: none;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.8125rem;
}

.app-trust strong {
  color: var(--text-2);
}

@media (max-width: 640px) {
  .welcome {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .welcome-art {
    max-height: 150px;
    object-fit: cover;
  }
}

@media (max-width: 640px) {
  #preview th:nth-child(5),
  #preview td:nth-child(5) {
    display: none;
  }
}

.parts {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.parts li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
}

.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

button.danger-link {
  --b-bg: transparent;
  --b-fg: var(--bad);
  --b-line: transparent;
  margin-left: auto;
  font-weight: 500;
}

@media (max-width: 640px) {
  .welcome-art {
    display: none;
  }
  #sample tr:nth-child(n + 4) {
    display: none;
  }
}

.owners {
  margin: 0;
}

.owners-list {
  display: grid;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
}

.owners .hint {
  margin: 0 0 6px;
}
