.onboarding {
  max-width: 780px;
  margin: auto;
  padding: 28px 20px;
}
.onboarding form {
  display: grid;
  gap: 16px;
}
.onboarding input,
.onboarding select,
.onboarding textarea {
  max-width: 100%;
  box-sizing: border-box;
}
.onboarding pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.6;
  background: white;
  padding: 24px;
  border: 1px solid #d8e3ef;
  border-radius: 12px;
}
.onboarding .check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.onboarding .check input {
  width: auto;
  flex: none;
  margin-top: 5px;
}
.onboarding .test {
  border-left: 4px solid #b51e37;
  padding: 12px;
  background: #fff1f3;
}
.onboarding .error {
  color: #a61e35;
}
/* Parent/guardian signing for a member under 18 (owner 2026-10-30). */
.onboarding .guardian-for {
  border-left: 4px solid #0b4f97;
  padding: 12px;
  background: #edf3fa;
  font-size: 18px;
}
.onboarding fieldset {
  border: 1px solid #d8e3ef;
  border-radius: 8px;
  margin: 0 0 12px;
  padding: 8px 12px;
}
.onboarding article {
  border: 1px solid #d8e3ef;
  border-radius: 12px;
  background: white;
  padding: 20px;
  margin: 14px 0;
}
.onboarding textarea {
  min-height: 240px;
}
.onboarding .actions {
  flex-wrap: wrap;
}
.onboarding dd {
  overflow-wrap: anywhere;
}
@media (max-width: 430px) {
  .onboarding {
    padding: 20px 14px;
  }
  .onboarding pre {
    padding: 16px;
  }
}

.onboarding textarea[name="provenance"] {
  min-height: 88px;
}
#deliverysection {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #d8e3ef;
}

body:has(#legalheading) .onboarding {
  max-width: 1200px;
}
.legal-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: white;
}
.legal-table th,
.legal-table td {
  padding: 18px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #d8e3ef;
  overflow-wrap: anywhere;
}
.legal-table th {
  font-size: 13px;
  color: #526a82;
}
.legal-table th:first-child {
  width: 40%;
}
.legal-table details {
  margin-top: 12px;
}
.legal-table pre {
  max-height: 400px;
  overflow-y: auto;
}
#legaleditor {
  background: white;
  border: 1px solid #d8e3ef;
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
}
#reviewedsources {
  margin-bottom: 24px;
}
#reviewedsources button {
  margin: 5px;
}
#deliverysection {
  background: white;
  padding: 24px;
  border: 1px solid #d8e3ef;
  border-radius: 12px;
}
#versions {
  margin-top: 24px;
}
@media (max-width: 650px) {
  .legal-table thead {
    display: none;
  }
  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table td {
    display: block;
  }
  .legal-table tr {
    border-bottom: 1px solid #d8e3ef;
    padding: 14px;
  }
  .legal-table td {
    padding: 5px;
    border: 0;
  }
  .legal-table td:nth-child(3)::before {
    content: "Signed: ";
  }
  .legal-table td:nth-child(4)::before {
    content: "Pending links: ";
  }
  #legaleditor,
  #deliverysection {
    padding: 14px;
  }
}

@media (max-width: 650px) {
  #legalheading {
    padding-left: 24px;
  }
  .profile-tabs button:hover {
    background: #eaf1f8;
  }
}

.signed-waiver-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 8px;
  border-bottom: 1px solid #d8e1eb;
  white-space: nowrap;
}
.signed-waiver-name {
  font-weight: 700;
  min-width: 140px;
}
.signed-waiver-row > span {
  flex: 1;
  min-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}
#signedlist {
  overflow-x: auto;
}
.signed-waiver-row time {
  font-size: 13px;
  color: #56677a;
}
.signed-waiver-row > a:last-child {
  font-size: 13px;
}

/* Waiver type actions stay compact; signed evidence is unchanged. */
body:has(#legalheading) .legal-table:has(.waiver-actions) {
  font-size: 13px;
  table-layout: auto;
}
body:has(#legalheading) .legal-table:has(.waiver-actions) th,
body:has(#legalheading) .legal-table:has(.waiver-actions) td {
  padding: 10px 12px;
}
.legal-table:has(.waiver-actions) details:not(.waiver-actions) {
  margin-top: 5px;
}
.waiver-actions {
  position: relative;
  margin: 0 !important;
  min-width: 100px;
}
.waiver-actions summary {
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid #cad7e7;
  border-radius: 6px;
  font-weight: 600;
  color: #102d50;
  white-space: nowrap;
}
.waiver-action-items {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  min-width: 210px;
  padding: 6px;
  background: white;
  border: 1px solid #cad7e7;
  border-radius: 8px;
  box-shadow: 0 8px 24px #122d4d26;
}
.waiver-action-items button {
  width: 100%;
  text-align: left;
  font-size: 13px;
  padding: 9px 10px;
  border: 0;
  margin: 0;
  white-space: normal;
}
.waiver-actions:not([open]) .waiver-action-items {
  display: none;
}
.waiver-actions[open] {
  z-index: 31;
}
.waiver-actions summary:focus-visible {
  outline: 2px solid #0b4f97;
  outline-offset: 2px;
}
@media (max-width: 650px) {
  .waiver-actions {
    width: max-content;
    margin-left: auto !important;
  }
  .waiver-action-items {
    max-width: calc(100vw - 65px);
  }
}
.waiver-action-items button {
  color: #102d50;
  background: #fff;
  transition: none;
}
.waiver-action-items button:not(:disabled):hover,
.waiver-action-items button:focus-visible {
  background: #eaf2fa;
  color: #102d50;
  border-color: transparent;
}

.waiver-type-title {
  color: #0b4f97;
  font-weight: 600;
  text-decoration: none;
}
.waiver-type-title:hover {
  text-decoration: underline;
}
.waiver-type-table,
.contract-type-table {
  font-size: 13px;
  table-layout: auto;
  width: 100%;
}
.waiver-type-table th:first-child,
.contract-type-table th:first-child {
  width: 35%;
}
.waiver-type-table th,
.waiver-type-table td,
.contract-type-table th,
.contract-type-table td {
  padding: 10px 12px;
  vertical-align: middle;
}
.waiver-type-table button,
.waiver-link-button {
  font-size: 12px;
  padding: 7px 9px;
  white-space: nowrap;
}
.waiver-link-button {
  display: inline-block;
  border: 1px solid #cad7e7;
  border-radius: 6px;
  text-decoration: none;
  color: #102d50;
  background: #fff;
}
#waiverenforcement,
.legal-enforcement {
  background: #fff;
  padding: 22px;
  border: 1px solid #d8e3ef;
  border-radius: 10px;
  margin-top: 24px;
}
#waiverenforcement fieldset {
  border: 1px solid #d8e3ef;
  border-radius: 8px;
  padding: 14px;
  margin: 14px 0;
}
#waivertypesback {
  display: inline-block;
  margin: 14px 0;
  color: #0b4f97;
}
#waiverqrdialog,
#waivertextdialog {
  max-width: calc(100vw - 32px);
  max-height: 85vh;
  border: 1px solid #cad7e7;
  border-radius: 12px;
  padding: 22px;
}
#waiverqrdialog img {
  display: block;
  max-width: 100%;
  height: auto;
  background: #fff;
}
#waiverqrdialog::backdrop,
#waivertextdialog::backdrop {
  background: #102d5077;
}
#waivertextdialog {
  width: 800px;
}
#waivertextdialog pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
.legal-enforcement h2:not(:first-child) {
  border-top: 1px solid #d8e3ef;
  padding-top: 22px;
  margin-top: 22px;
}
.contract-type-table .waiver-actions {
  min-width: 90px;
}
@media (max-width: 650px) {
  .waiver-type-table,
  .contract-type-table,
  .waiver-type-table tbody,
  .contract-type-table tbody,
  .waiver-type-table tr,
  .contract-type-table tr,
  .waiver-type-table td,
  .contract-type-table td {
    display: block;
    width: 100%;
  }
  .waiver-type-table tr,
  .contract-type-table tr {
    position: relative;
    padding: 12px;
  }
  .waiver-type-table td,
  .contract-type-table td {
    padding: 4px 0;
  }
  .waiver-type-table td:first-child,
  .contract-type-table td:first-child {
    padding-right: 82px;
  }
  .waiver-type-table td:nth-child(4)::before {
    content: "Unsigned: ";
  }
  .waiver-type-table td:last-child,
  .contract-type-table td:last-child {
    position: absolute;
    top: 4px;
    right: 4px;
    width: auto;
  }
  .waiver-type-table .waiver-actions {
    min-width: 0;
  }
  .waiver-type-table .waiver-actions summary,
  .contract-type-table .waiver-actions summary {
    font-size: 12px;
    padding: 6px;
  }
  .contract-type-table td:nth-child(3)::before {
    content: "Memberships: ";
  }
  .contract-type-table td:nth-child(4)::before {
    content: "Signed: ";
  }
  .contract-type-table td:nth-child(5)::before {
    content: "Unsigned: ";
  }
  #waiverenforcement,
  .legal-enforcement {
    padding: 14px;
  }
}
/* Automations → Member emails: one switch per automatic email. */
.member-notice-switches{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:8px}
.member-notice-switches label.check{align-items:flex-start}
.member-notice-switches span{overflow-wrap:anywhere}
