:root {
  --green: #193f32;
  --mint: #dde8dc;
  --cream: #f7f6f0;
  --ink: #233d32;
  --muted: #626e63;
  --line: #dce1d6;
  --white: #fffefa;
  --gold: #ab8140;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
.header {
  max-width: 1360px;
  margin: auto;
  padding: 27px 6%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 2px;
  line-height: 1.4;
}
.brand small {
  display: block;
  font-size: 19px;
  letter-spacing: 6px;
}
.brand-symbol {
  font-size: 43px;
  line-height: 1;
}
nav {
  display: flex;
  gap: 22px;
  align-items: center;
}
nav form {
  margin: 0;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  min-height: 48px;
  padding: 13px 24px;
  border: 1px solid var(--green);
  background: var(--green);
  color: white;
  border-radius: 7px;
  font-weight: bold;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}
.button:hover {
  background: #28503e;
  text-decoration: none;
}
.button.small {
  padding: 10px 16px;
  min-height: 44px;
}
.button.secondary {
  background: transparent;
  color: var(--green);
}
.button.secondary:hover {
  background: var(--mint);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.text-button {
  border: 0;
  background: none;
  color: var(--green);
  padding: 10px 0;
  min-height: 44px;
  text-decoration: underline;
  font-size: 14px;
}
main {
  max-width: 1200px;
  padding: 0 28px;
  margin: 0 auto;
  min-height: 65vh;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(36px, 5.5vw, 73px);
  line-height: 1.07;
  letter-spacing: -2px;
  margin-bottom: 25px;
  overflow-wrap: anywhere;
}
h1 em {
  color: #507252;
  font-weight: 400;
}
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 15px;
}
h3 {
  font-size: 18px;
  line-height: 1.4;
}
.eyebrow {
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 2.3px;
  margin-bottom: 25px;
  color: #63755c;
}
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 66px 0;
}
.hero-copy {
  padding: 15px 0;
}
.lede {
  font-size: 17px;
  line-height: 1.8;
  max-width: 470px;
  color: var(--muted);
  margin-bottom: 28px;
}
.quiet {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 20px 0 0;
}
.actions {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.hero-image {
  position: relative;
  min-width: 0;
  aspect-ratio: 1/1.16;
}
.hero-image img {
  width: 100%;
  height: 100%;
  position: absolute;
  object-fit: cover;
  border-radius: 150px 150px 12px 12px;
}
.image-label {
  position: absolute;
  bottom: 26px;
  left: 20px;
  right: 20px;
  text-align: center;
  background: rgba(255, 254, 250, 0.9);
  padding: 12px;
  border-radius: 6px;
  letter-spacing: 2px;
  font-size: 9px;
  font-weight: bold;
}
.values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 35px;
  padding: 40px 0 65px;
  border-top: 1px solid var(--line);
}
.values span {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--gold);
}
.values h2 {
  font-size: 23px;
  margin: 18px 0 12px;
}
.values p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 80px;
  padding: 70px 0;
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px;
  min-width: 0;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form h2 {
  margin-bottom: 6px;
}
.form label,
.link-field label {
  font-size: 13px;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.input-hint {
  font-weight: normal;
  font-size: 11px;
  color: var(--muted);
}
input,
textarea,
select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid #ccd4c7;
  border-radius: 6px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  min-height: 46px;
}
textarea {
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #73956f;
  outline-offset: 1px;
}
.note,
.notice {
  padding: 19px 22px;
  border-radius: 8px;
  background: #e9eee2;
  font-size: 14px;
  line-height: 1.7;
  margin: 18px 0;
}
.form-error {
  padding: 12px 14px;
  border-left: 3px solid #b7463b;
  border-radius: 6px;
  background: #fff5f3;
  font-size: 14px;
}
.notice.success {
  border-left: 4px solid #638454;
}
.form-step {
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.form-step[hidden] {
  display: none;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  padding: 48px 0 25px;
}
.page-heading h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  margin-bottom: 15px;
}
.page-heading .eyebrow {
  margin-bottom: 16px;
}
.page-heading p {
  color: var(--muted);
}
.table-scroll {
  overflow-x: auto;
}
.tree-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.tree-table th,
.tree-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.tree-table tr.complete td {
  background: var(--mint);
  font-weight: 600;
}
.appointment-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0 0;
}
.appointment-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.appointment-card h2,
.appointment-card p {
  margin: 0;
}
.appointment-card .button {
  margin-top: auto;
}
.appointment-card.locked {
  background: var(--cream);
}
.not-eligible {
  font-size: 13px;
  color: #7a3429;
}
.store-profile {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 18px 40px;
  margin-top: 18px;
}
.store-profile > div {
  display: grid;
  gap: 6px;
}
.store-profile h2,
.store-profile p {
  margin: 0;
}
.store-profile .button {
  align-self: flex-start;
}
@media (max-width: 700px) {
  .store-profile {
    grid-template-columns: minmax(0, 1fr);
  }
}
.appointment-form {
  max-width: 640px;
}
.store-choice {
  display: grid;
  gap: 10px;
  border: 0;
  padding: 0;
  margin: 0;
}
.store-choice legend {
  font-weight: 600;
  margin-bottom: 8px;
}
.store-choice small {
  display: block;
}
.heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.appointment-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  margin: 0 0 18px;
}
.appointment-filter label {
  display: grid;
  gap: 4px;
  font-weight: 600;
  font-size: 13px;
}
.appointment-table td.wrap {
  white-space: normal;
  min-width: 140px;
}
.status-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.status-form select {
  min-height: 40px;
  width: auto;
  min-width: 120px;
}
@media (max-width: 700px) {
  .appointment-actions {
    grid-template-columns: 1fr;
  }
}
.tree-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 24px 0;
}
.tree-summary h2,
.tree-summary p {
  margin: 4px 0;
}
.tree-counts {
  display: flex;
  gap: 24px;
  margin: 0;
}
.tree-counts dt {
  font-size: 12px;
  color: var(--muted);
}
.tree-counts dd {
  margin: 2px 0 0;
  font-size: 28px;
  font-family: Georgia, serif;
}
.stage-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.stage-tabs a {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 50px;
  color: var(--green);
  font-size: 14px;
}
.stage-tabs a.active {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.stage-tabs span {
  opacity: 0.75;
  margin-left: 4px;
}
.tree-search {
  margin-bottom: 16px;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 18px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
.stacked {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stacked a {
  font-size: 13px;
}
@media (max-width: 700px) {
  .responsive-table thead {
    display: none;
  }
  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }
  .responsive-table tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .responsive-table td {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 5px 0;
    border: 0;
    white-space: normal;
    text-align: right;
  }
  .responsive-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    text-align: left;
  }
  .responsive-table td .stacked {
    align-items: flex-end;
  }
  .responsive-table td.wrap {
    min-width: 0;
  }
  .tree-counts {
    width: 100%;
    justify-content: space-between;
  }
}
.member-card .status {
  align-self: flex-start;
}
.page-heading > .button {
  white-space: nowrap;
  flex-shrink: 0;
}
.reward-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
}
.reward-summary p {
  margin: 4px 0;
}
.office-tabs {
  display: flex;
  gap: 4px;
  margin: 18px 0 8px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  scrollbar-width: thin;
}
.office-tabs a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  color: var(--green);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.office-tabs .tab-locked {
  flex: 0 0 auto;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--muted, #8a8f8c);
  opacity: 0.55;
  cursor: not-allowed;
}
.office-tabs a:hover {
  background: var(--mint);
  text-decoration: none;
}
.office-tabs a.active {
  background: var(--green);
  color: white;
}
.office-tabs .badge {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 50px;
  background: var(--gold);
  color: white;
  font-size: 12px;
  text-align: center;
}
.stacked small {
  color: var(--muted);
  font-size: 13px;
}
.connection-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 28px 0 0;
  text-align: left;
}
.connection-control h2,
.connection-control p {
  margin: 4px 0;
}
.connection-form {
  display: grid;
  gap: 10px;
  flex: 0 1 420px;
  min-width: 0;
}
.connection-form label {
  display: grid;
  gap: 4px;
  font-weight: 600;
}
.connection-form textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.connection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  margin-bottom: 30px;
}
.stats > div {
  padding: 24px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.stats > div:last-child {
  border: 0;
}
.stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}
.stats strong {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: clamp(20px, 2.9vw, 36px);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.invite {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: #e9eee2;
}
.invite p {
  font-size: 13px;
}
.invite .eyebrow {
  font-size: 10px;
}
.link-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  min-width: 0;
}
.link-field input {
  font-size: 13px;
}
.link-field button {
  align-self: flex-start;
}
.section {
  margin: 35px 0;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}
.section-title h2 {
  margin: 0;
}
.section-title > span {
  font-size: 12px;
  color: var(--muted);
}
.order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.order-card {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 9px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
}
.order-card:hover {
  border-color: var(--green);
  text-decoration: none;
}
.order-card > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.order-card > div:last-child {
  text-align: right;
  align-items: end;
}
.order-card span:not(.status) {
  font-size: 13px;
  color: var(--muted);
}
.status {
  font-size: 11px;
  text-transform: capitalize;
  padding: 3px 10px;
  border-radius: 50px;
  background: #f3e9d1;
  color: #856226;
  display: inline-block;
  white-space: normal;
}
.status.paid {
  background: #e3eddf;
  color: #396145;
}
.status.refunded,
.status.partially_refunded {
  background: #efe2df;
  color: #7c4538;
}
.members {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.member-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-wrap: anywhere;
}
.member-card span,
.member-card small {
  font-size: 12px;
  color: var(--muted);
}
.empty {
  padding: 35px;
  border: 1px dashed #c5cfbc;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
}
.checkout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 25px;
  margin: 15px 0 50px;
  align-items: start;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.family-list {
  display: grid;
  gap: 12px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.family-list legend {
  padding: 0;
  font-size: 13px;
  font-weight: bold;
}
.family-list > p {
  margin: 0;
}
.family-list > .button {
  justify-self: start;
}
#family-rows {
  display: grid;
  gap: 12px;
}
#family-rows:empty {
  display: none;
}
.family-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.family-row .boxed-field {
  grid-column: 1 / -1;
}
/* The signup form is kept short: fields that go together share a line. */
.field-grid.keep {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}
.field-grid.keep.pin-store {
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1fr);
}
.name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}
.fixed-field,
.boxed-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  font-weight: bold;
}
/* A value that cannot be changed, shown without taking a line of its own. */
.fixed-field strong {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f1f3ee;
  color: var(--muted);
  font-size: 15px;
  font-weight: normal;
}
.boxed-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.boxed-label .text-button {
  min-height: 0;
  padding: 0;
  font-weight: normal;
}
/* Aadhaar as the card's twelve boxes: eight crossed out, the last four open. */
.aadhaar-boxes {
  display: flex;
  gap: 8px;
}
.aadhaar-boxes .group {
  display: flex;
  flex: 1 1 0;
  gap: 3px;
  min-width: 0;
  max-width: 172px;
}
.aadhaar-boxes .group > * {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 6px;
  text-align: center;
}
.aadhaar-boxes i {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #eef0ea;
  color: #a3ab9f;
  font-size: 13px;
  font-style: normal;
  font-weight: normal;
}
.aadhaar-boxes input {
  border: 1.5px solid var(--green);
  font-size: 18px;
  font-weight: bold;
}
/* One height for every box on a shared line, so their labels line up. */
.signup-shell input:not([type="checkbox"]):not([data-digit]),
.signup-shell select,
.signup-shell .fixed-field strong {
  height: 48px;
  min-height: 48px;
  padding-top: 0;
  padding-bottom: 0;
}
.form-message:empty {
  display: none;
}
.family-summary {
  margin: 4px 0 16px;
  font-size: 14px;
}
.family-summary ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .field-grid.keep,
  .family-row {
    gap: 10px;
  }
  .family-row {
    padding: 11px;
  }
  .family-row select {
    padding-left: 8px;
    padding-right: 2px;
    font-size: 15px;
  }
  .signup-shell .form {
    gap: 13px;
  }
  .signup-shell .form label,
  .signup-shell .fixed-field,
  .signup-shell .boxed-field {
    gap: 5px;
  }
  .signup-shell input:not([type="checkbox"]):not([data-digit]),
  .signup-shell select,
  .signup-shell .fixed-field strong {
    height: 42px;
    min-height: 42px;
  }
  .signup-shell textarea {
    min-height: 42px;
    padding-top: 9px;
    padding-bottom: 9px;
  }
  .signup-shell .aadhaar-boxes .group > * {
    height: 40px;
    min-height: 40px;
    padding: 0;
  }
}
.totals {
  margin: 10px 0 0;
}
.totals > div,
.details > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin: 12px 0;
}
.totals > div.has-breakdown,
.details > div.has-breakdown {
  flex-wrap: wrap;
  row-gap: 2px;
}
.totals .breakdown,
.details .breakdown {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 13px;
}
.totals dd,
.details dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
  min-width: 0;
}
.totals dt,
.details dt {
  flex-shrink: 0;
  color: var(--muted);
}
.totals .total {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 20px;
  font-weight: bold;
}
.notice .button {
  margin-left: 10px;
}
.family-id-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 24px;
  background: #e9eee2;
}
.family-id-card p {
  margin: 4px 0;
}
.family-id-card .family-id {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 9vw, 64px);
  line-height: 1.1;
  color: var(--green);
}
.password-form {
  max-width: 520px;
}
.late-payments {
  margin: 0 0 28px;
  border-left: 3px solid #b7463b;
}
.pay-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.form-message {
  color: #7a3429;
  font-size: 13px;
  margin: 0;
  overflow-wrap: anywhere;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 50px;
}
.detail-grid .status {
  margin-bottom: 20px;
}
.detail-grid p {
  overflow-wrap: anywhere;
}
.reference {
  font-family: monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.search {
  max-width: 600px;
  margin: 25px 0;
}
.search label {
  font-size: 13px;
  font-weight: bold;
}
.search > div {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.admin-orders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.admin-order:hover {
  text-decoration: none;
  border-color: var(--green);
}
.admin-order h3 {
  margin: 10px 0 6px;
  overflow-wrap: anywhere;
}
.admin-order p {
  font-size: 13px;
  color: var(--muted);
}
.admin-order .details {
  font-size: 13px;
}
.pagination {
  display: flex;
  gap: 25px;
  justify-content: center;
  padding: 25px;
}
.error-panel {
  margin: 60px auto;
  max-width: 720px;
}
.error-panel h1 {
  font-size: 42px;
}
.preview {
  background: #eed6a5;
  text-align: center;
  padding: 8px;
  font-size: 12px;
}
footer {
  border-top: 1px solid var(--line);
  margin: 40px auto 0;
  max-width: 1360px;
  padding: 35px 6%;
  display: flex;
  justify-content: space-between;
  gap: 25px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}
footer p {
  margin: 0;
}
footer .brand {
  font-size: 10px;
}
.product-feature {
  padding: 10px 0 20px;
}
.product-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 50px;
}
.product-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: center;
}
.product-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}
.product-info h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.25;
  margin: 0 0 10px;
}
.product-description {
  color: var(--muted);
  margin: 0 0 22px;
}
.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin: 0;
}
.price strong {
  font-size: 30px;
  color: var(--green);
}
.price s {
  color: var(--muted);
}
.saving {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--gold);
}
.product-info .actions {
  margin-top: 24px;
}
@media (max-width: 700px) {
  .product-card {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}
.policy-heading > div {
  max-width: 760px;
}
.policy {
  max-width: 820px;
  margin-bottom: 50px;
}
.policy h2 {
  font-size: 22px;
  margin: 28px 0 8px;
}
.policy h2:first-child {
  margin-top: 0;
}
.policy p {
  margin: 0 0 12px;
  color: var(--muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.compact-auth {
  width: min(100%, 920px);
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(360px, 1.15fr);
  align-items: center;
  gap: 54px;
  margin: 0 auto;
  padding: 56px 0;
}
.compact-intro h1,
.signup-head h1 {
  margin: 8px 0 14px;
  font-size: clamp(38px, 5vw, 58px);
}
.join-card {
  display: grid;
  gap: 20px;
}
.eligibility-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: eligibility;
}
.eligibility-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 2px 10px;
  align-items: center;
  counter-increment: eligibility;
}
.eligibility-list li::before {
  content: counter(eligibility);
  grid-row: 1 / 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font: bold 13px Arial, sans-serif;
}
.eligibility-list span,
.no-referral {
  margin: 14px 0 0;
  text-align: center;
  font-weight: 600;
}
.privacy-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.compact-form { gap: 12px; }
.signup-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 32px 0 56px;
}
.signup-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 16px;
}
.sponsor-chip {
  min-width: 190px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 15px;
  background: #fff;
}
.sponsor-chip span,
.sponsor-chip small { color: var(--muted); font-size: 11px; }
.mobile-step-form { gap: 14px; }
.step-dots {
  display: grid;
  grid-template-columns: 28px 1fr 28px 1fr 28px;
  align-items: center;
  margin-bottom: 4px;
}
.step-dots span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf0eb;
  color: var(--muted);
  font: bold 12px Arial, sans-serif;
}
.step-dots span.active { background: var(--green); color: white; }
.step-dots i { height: 2px; background: #dce3d8; }
.check-card {
  display: grid !important;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px !important;
  border: 1px solid #d9e1d5;
  border-radius: 10px;
  padding: 13px;
  background: #f8faf6;
}
.check-card input { width: 19px; min-height: 19px; margin: 2px 0 0; accent-color: var(--green); }
.check-card span { display: grid; gap: 3px; }
.check-card small { color: var(--muted); font-weight: normal; line-height: 1.45; }
.file-card {
  border: 1px dashed #9fac99;
  border-radius: 10px;
  padding: 13px;
  background: #fbfcfa;
}
.file-card input {
  min-height: 0;
  border: 0;
  padding: 7px 0 0;
  background: transparent;
  font-size: 13px;
}
.step-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.verification-status {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin: 0 0 24px;
  border-left: 4px solid #c49a3a;
  background: #fffaf0;
}
.verification-status.rejected { border-left-color: #b7463b; background: #fff5f3; }
.verification-status h2 { margin: 4px 0 8px; }
.verification-status p { margin: 0; color: var(--muted); }
.verification-status dl { display: flex; gap: 20px; margin: 14px 0 0; }
.verification-status dl div { display: grid; gap: 2px; }
.verification-status dt { color: var(--muted); font-size: 11px; }
.verification-status dd { margin: 0; font-weight: bold; }
.status-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; background: white; }
.affiliate-page { position: relative; padding-bottom: 56px; }
.compact-heading { padding-bottom: 18px; }
.affiliate-card { max-width: 720px; padding: 24px; border-radius: 18px; box-shadow: 0 8px 22px rgba(15,23,42,.05); }
.affiliate-card-head { display: flex; align-items: flex-start; gap: 13px; }
.affiliate-card-head h2 { margin: 0 0 5px; font: bold 17px Arial, sans-serif; }
.affiliate-card-head p { margin: 0; color: var(--muted); font-size: 13px; }
.affiliate-link-icon { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 50%; background: #edf3e9; color: var(--gold); font-weight: bold; }
.affiliate-link-box { display: block; margin: 18px 0; border: 1px solid #dbe4ee; border-radius: 10px; padding: 13px 15px; background: #f8fafc; color: #17212c; font: 12px/1.5 ui-monospace, monospace; overflow-wrap: anywhere; }
.affiliate-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.affiliate-actions button { min-height: 42px; border: 0; border-radius: 8px; padding: 0 17px; background: #edf3e9; color: var(--green); font-weight: bold; }
.affiliate-actions button:nth-child(2) { background: #f2f4f7; color: #344054; }
.affiliate-actions button:nth-child(3) { background: #eff6ff; color: #1d4ed8; }
.affiliate-qr-panel { display: grid; justify-items: center; gap: 10px; margin-top: 18px; }
.affiliate-qr-panel[hidden] { display: none; }
.affiliate-qr-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: white; }
.affiliate-qr-box img { display: block; width: 210px; height: 210px; }
.affiliate-warning { margin: 16px 0 0; color: var(--muted); font-size: 11px; font-style: italic; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 20; transform: translateX(-50%); border-radius: 999px; padding: 11px 18px; background: #17212c; color: white; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.verification-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.verification-card { padding: 20px; }
.verification-card .section-title strong,
.verification-card .section-title span { display: block; }
.proof-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0; }
.review-form { gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.review-form > div { display: flex; gap: 8px; }
.button.danger { background: #9f2f2f; }
@media (max-width: 850px) {
  .hero {
    gap: 30px;
  }
  .auth-layout {
    gap: 35px;
  }
  .panel {
    padding: 24px;
  }
  .members {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats > div {
    padding: 20px;
  }
  .invite {
    gap: 25px;
  }
  .checkout {
    grid-template-columns: 1fr 1fr;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .compact-auth { grid-template-columns: 1fr; gap: 24px; }
  .verification-list { grid-template-columns: 1fr; }
  .order-summary select {
    font-size: 13px;
  }
}
@media (max-width: 600px) {
  main {
    padding: 0 18px;
  }
  .header {
    padding: 19px 18px;
    gap: 12px;
  }
  .brand {
    font-size: 9px;
    gap: 7px;
    letter-spacing: 1.3px;
  }
  .brand small {
    font-size: 15px;
    letter-spacing: 4px;
  }
  .brand-symbol {
    font-size: 32px;
  }
  nav {
    gap: 12px;
    font-size: 12px;
    flex-wrap: wrap;
    justify-content: end;
  }
  nav .button {
    font-size: 11px;
    padding: 9px 12px;
    gap: 8px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 35px 0 40px;
  }
  .hero h1 {
    font-size: 54px;
  }
  .hero-copy {
    padding: 0;
  }
  .hero .eyebrow {
    font-size: 8px;
    letter-spacing: 1.6px;
    margin-bottom: 20px;
  }
  .hero-image {
    aspect-ratio: 1.3;
  }
  .hero-image img {
    border-radius: 100px 100px 10px 10px;
  }
  .lede {
    font-size: 15px;
  }
  .quiet {
    font-size: 12px;
  }
  .values {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 25px 0 15px;
  }
  .values > div {
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
  }
  .values > div:last-child {
    border: 0;
  }
  .values h2 {
    margin: 10px 0;
  }
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 35px 0;
  }
  .compact-auth { gap: 18px; padding: 28px 0 40px; }
  .compact-intro h1 { font-size: 39px; }
  .join-card { gap: 16px; }
  .signup-shell { padding: 20px 0 36px; }
  .signup-head { align-items: stretch; flex-direction: column; gap: 8px; }
  .signup-head h1 { margin: 4px 0 2px; font-size: 38px; }
  .sponsor-chip { width: 100%; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 9px 12px; }
  .mobile-step-form { padding: 18px 15px; }
  .form-step { gap: 13px; }
  .form-step h2 { font-size: 24px; }
  .file-card { padding: 11px; }
  .step-actions .button { flex: 1; }
  .verification-status { padding: 17px 14px; gap: 12px; }
  .verification-status dl { flex-direction: column; gap: 8px; }
  .affiliate-card { padding: 18px 15px; }
  .affiliate-actions { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
  .affiliate-actions button { min-width: 0; padding: 0 8px; }
  .affiliate-qr-box img { width: 190px; height: 190px; }
  .proof-actions .button { flex: 1 1 140px; text-align: center; }
  .review-form > div .button { flex: 1; }
  .auth-layout h1 {
    font-size: 43px;
  }
  .auth-layout .lede {
    margin-bottom: 15px;
  }
  .auth-layout .note {
    margin-bottom: 0;
  }
  .panel {
    padding: 22px 18px;
  }
  .connection-control {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
    padding: 18px;
  }
  .connection-form,
  .connection-actions .button {
    width: 100%;
  }
  .page-heading {
    align-items: start;
    flex-direction: column;
    padding: 32px 0 22px;
    gap: 10px;
  }
  .page-heading h1 {
    letter-spacing: -1px;
    font-size: 36px;
  }
  .page-heading .eyebrow {
    font-size: 9px;
  }
  .stats {
    grid-template-columns: 1fr;
    margin-bottom: 22px;
  }
  .stats > div {
    padding: 14px 18px;
    border: 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
  }
  .stats span {
    margin: 0;
  }
  .stats strong {
    font-size: 23px;
  }
  .invite,
  .checkout,
  .detail-grid,
  .admin-orders {
    grid-template-columns: 1fr;
  }
  .invite {
    gap: 15px;
  }
  .invite h2 {
    font-size: 26px;
  }
  .members {
    grid-template-columns: 1fr;
  }
  .order-card {
    padding: 15px 13px;
    gap: 12px;
  }
  .order-card strong {
    font-size: 13px;
  }
  .order-card span:not(.status) {
    font-size: 12px;
  }
  .order-card .status {
    font-size: 10px;
  }
  .details,
  .totals {
    font-size: 13px;
  }
  .totals .total {
    font-size: 19px;
  }
  .checkout {
    margin-top: 10px;
  }
  .search .button {
    padding: 11px 15px;
  }
  .search input {
    font-size: 14px;
  }
  .section-title {
    align-items: start;
  }
  .section-title h2 {
    font-size: 26px;
  }
  .section-title > span {
    font-size: 11px;
  }
  .desktop-only {
    display: none;
  }
  footer {
    padding: 25px 18px;
    gap: 12px;
    flex-direction: column;
    align-items: start;
  }
  .error-panel {
    margin: 30px auto;
  }
  .error-panel h1 {
    font-size: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
#family-document {
  margin: 18px 0;
}
#family-document .form {
  max-width: 520px;
}

main nav.office-tabs,
main nav.stage-tabs,
main nav.pager {
  justify-content: flex-start;
  font-size: inherit;
}
main nav.office-tabs {
  flex-wrap: nowrap;
}
main nav.pager {
  justify-content: center;
}

.tree-table td.contact {
  white-space: normal;
  max-width: 240px;
  overflow-wrap: anywhere;
}

.inline-form {
  display: inline;
  margin: 0;
}
.code-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.code-link:hover {
  color: #28503e;
}
.office-view-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  margin: 18px 0 0;
  padding: 12px 18px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: #f6ecd6;
  color: var(--ink);
  font-size: 14px;
}
.office-view-banner form {
  margin: 0;
}

.status.cancelled {
  background: #ecebe6;
  color: #5d655e;
}
.replace-order {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.replace-order .quiet {
  margin: 0 0 4px;
}

.partner-own {
  margin-top: 18px;
}
.partner-own h2 {
  margin: 0 0 6px;
  font: bold 17px Arial, sans-serif;
}
.partner-own p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}
.affiliate-qr-box svg {
  display: block;
  width: 240px;
  height: 240px;
}

.account-choices form {
  margin: 0 0 10px;
}
.account-choice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.account-choice:hover {
  background: var(--mint);
}
.account-choice span {
  color: var(--muted);
  font-size: 14px;
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 18px;
}
.subnav a {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 50px;
  background: var(--white);
  color: var(--green);
  font-weight: 600;
  font-size: 14px;
}
.subnav a:hover {
  background: var(--mint);
  text-decoration: none;
}
.subnav a.active {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.delivery-form {
  display: none;
}
.inline-input,
.inline-select {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 14px;
}
.inline-input {
  width: 100%;
  min-width: 9rem;
  max-width: 12rem;
}
.inline-select {
  width: auto;
  min-width: 8.5rem;
}
.saved-note {
  display: block;
  min-height: 1.2em;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.saved-note.failed {
  color: #9a3b2c;
}
.dispatch-filter input[name="q"] {
  min-width: 22rem;
}
.orders-table {
  font-size: 0.88rem;
}
.orders-table th,
.orders-table td {
  padding-left: 8px;
  padding-right: 8px;
}
.orders-table th {
  white-space: normal;
}
.orders-table td.wrap {
  white-space: normal;
  min-width: 104px;
}
.orders-table .inline-input,
.dispatch-table .inline-input {
  min-width: 7.5rem;
}
.orders-table .inline-select,
.dispatch-table .inline-select {
  min-width: 7.25rem;
}
.admin-order-cards {
  display: none;
}
.dispatch-table td.wrap {
  white-space: normal;
  min-width: 170px;
}
.search {
  max-width: 820px;
}
.search select {
  width: auto;
  min-width: 11rem;
}
main nav.subnav {
  justify-content: flex-start;
}
@media (max-width: 700px) {
  main nav.office-tabs {
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 5px 18px rgba(15, 35, 26, 0.08);
  }
  /* On a phone the office looks orders up, so the page gets to them fast:
     the heading and Export share a line, the totals are one strip, and the
     search is two rows. */
  .page-heading.orders-heading {
    flex-direction: row;
    align-items: center;
    padding: 0;
  }
  .orders-heading > .button {
    padding: 8px 12px;
    font-size: 13px;
  }
  .stats.orders-stats {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr);
    margin: 0 0 10px;
  }
  .stats.orders-stats > div {
    display: block;
    min-width: 0;
    padding: 8px 10px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
  .stats.orders-stats > div:last-child {
    border-right: 0;
  }
  .stats.orders-stats span {
    display: block;
    font-size: 10.5px;
    line-height: 1.25;
  }
  .stats.orders-stats strong {
    font-size: 17px;
    overflow-wrap: anywhere;
  }
  .orders-search {
    max-width: none;
    margin: 0 0 10px;
  }
  .orders-search label {
    display: none;
  }
  .orders-search > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    margin-top: 0;
  }
  .orders-search input {
    grid-column: 1 / -1;
  }
  .orders-search select {
    width: 100%;
    min-width: 0;
  }
  .admin-orders-table {
    display: none;
  }
  .admin-order-cards {
    display: grid;
    gap: 8px;
  }
  .mobile-order-card {
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 35, 26, 0.05);
  }
  .mobile-order-card summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 8px;
    align-items: center;
    padding: 10px 12px 10px 14px;
    cursor: pointer;
    list-style: none;
  }
  .mobile-order-card summary::-webkit-details-marker {
    display: none;
  }
  .mobile-order-card summary::after {
    content: "›";
    grid-column: 2;
    grid-row: 1 / span 2;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    transition: transform 0.15s;
  }
  .mobile-order-card[open] summary::after {
    transform: rotate(90deg);
  }
  .mobile-order-line {
    grid-column: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .mobile-order-line > :last-child {
    margin-left: auto;
    white-space: nowrap;
  }
  .mobile-order-number {
    color: var(--green);
    font-size: 16px;
    font-weight: 800;
  }
  .mobile-order-card time,
  .mobile-order-place {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
  }
  .mobile-order-amount {
    color: var(--green);
    font-size: 16px;
  }
  .mobile-order-name {
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-order-line a {
    font-size: 13px;
  }
  .mobile-order-card .status {
    font-size: 10px;
  }
  .delivery-state {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 50px;
    background: #eef1ed;
    color: var(--green);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.35px;
    white-space: nowrap;
  }
  .delivery-state.delivered {
    background: #e2f2e7;
    color: #24683d;
  }
  .delivery-state.in_progress {
    background: #eef4ff;
    color: #315b91;
  }
  .mobile-order-body {
    display: grid;
    gap: 12px;
    padding: 12px 14px 14px;
    border-top: 1px solid var(--line);
  }
  .mobile-order-place {
    margin: 0;
    font-size: 12px;
    white-space: normal;
  }
  .mobile-order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .mobile-order-actions .print-link {
    margin-top: 0;
  }
  .delivery-form.mobile-delivery-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 10px;
    padding: 11px;
    border-radius: 10px;
    background: #f5f7f2;
  }
  .mobile-delivery-form label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }
  .mobile-delivery-form input,
  .mobile-delivery-form select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 9px 10px;
    font-size: 14px;
  }
  .mobile-delivery-form .saved-note {
    grid-column: 1 / -1;
    min-height: 0;
    margin: -2px 0 0;
  }
  .mobile-delivery-form .saved-note:empty {
    display: none;
  }
  .mobile-order-body dl {
    display: grid;
    gap: 9px;
    margin: 0;
  }
  .mobile-order-body dl > div {
    display: grid;
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
    gap: 12px;
    font-size: 12px;
  }
  .mobile-order-body dt {
    color: var(--muted);
  }
  .mobile-order-body dd {
    margin: 0;
    overflow-wrap: anywhere;
    text-align: right;
  }
  .mobile-order-body dd small {
    display: block;
    color: var(--muted);
  }
  .dispatch-filter label {
    flex: 1 1 100%;
  }
  .dispatch-filter input[name="q"] {
    min-width: 0;
  }
}

.password-field {
  position: relative;
  display: block;
}
.password-field input {
  padding-right: 50px;
}
.eye {
  position: absolute;
  top: 0;
  right: 0;
  width: 46px;
  height: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.eye:hover,
.eye[aria-pressed="true"] {
  color: var(--green);
}
.eye[hidden] {
  display: none;
}
.eye .eye-shut,
.eye[aria-pressed="true"] .eye-open {
  display: none;
}
.eye[aria-pressed="true"] .eye-shut {
  display: block;
}

.print-link {
  display: inline-block;
  align-self: flex-start;
  margin-top: 4px;
  padding: 5px 12px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--green);
  color: white;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.print-link:hover {
  background: var(--white);
  color: var(--green);
  text-decoration: none;
}
.print-link.printed {
  background: var(--white);
  color: var(--green);
}
.print-run input {
  width: 7.5rem;
}
.print-run .input-hint {
  align-self: center;
}
/* Dispatch batch: tracking numbers, the post office sheet, labels and bills. */
.dispatch-batch {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
}
.dispatch-batch h2,
.post-office-download h2,
.post-office-upload h2,
.post-office-preview h2 {
  margin: 0 0 4px;
  font-size: 18px;
}
.dispatch-batch p,
.post-office-download p,
.post-office-upload p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.dispatch-batch-head {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.dispatch-batch-head > div {
  flex: 1 1 320px;
}
.dispatch-batch .pool-left {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--mint);
  color: var(--green);
  white-space: nowrap;
}
.dispatch-batch .pool-left.low {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #78350f;
}
.dispatch-batch-fields,
.dispatch-batch-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}
.dispatch-batch-fields label {
  display: grid;
  gap: 4px;
  font-weight: 600;
  font-size: 13px;
}
.dispatch-batch-fields [hidden] {
  display: none;
}
.post-office-download p,
.post-office-download h2 {
  flex-basis: 100%;
}
.post-office-upload,
.post-office-preview {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  justify-items: start;
}
.post-office-preview .table-scroll {
  width: 100%;
}
.post-office-upload label {
  display: grid;
  gap: 4px;
  font-weight: 600;
  font-size: 13px;
}
.post-office-confirm {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.notice.failed {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #7f1d1d;
}
.sheet-errors {
  margin: 0;
  padding-left: 20px;
  color: #7f1d1d;
  font-size: 14px;
}
.sheet-errors[hidden] {
  display: none;
}
@media (max-width: 720px) {
  .dispatch-batch-fields label,
  .dispatch-batch-actions .button {
    flex: 1 1 100%;
  }
}
.input-hint.failed {
  color: #7f1d1d;
}
/* The Dispatch table keeps every column on the page: tighter cells, and the
   bill and label buttons one above the other. */
.dispatch-table {
  font-size: 0.88rem;
}
.dispatch-table th,
.dispatch-table td {
  padding-left: 8px;
  padding-right: 8px;
}
.dispatch-table td.wrap {
  min-width: 150px;
  overflow-wrap: anywhere;
}
/* A long name wraps too, and an address typed without spaces still breaks. */
.dispatch-table td[data-label="Name"] {
  white-space: normal;
  min-width: 110px;
  overflow-wrap: anywhere;
}
.dispatch-table .inline-input {
  min-width: 8.5rem;
  padding-left: 8px;
  padding-right: 8px;
  font-size: 13px;
}
.print-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.print-links .print-link {
  margin-top: 0;
}

/* Phones first (owner, 8 October 2026): everyone using this site, office
   included, is on a phone. Nothing scrolls sideways, and the thing to act on
   sits as near the top as it can. */
@media (max-width: 700px) {
  .wide-only {
    display: none;
  }
  /* The tab bar wraps instead of sliding sideways. */
  main nav.office-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 2px;
    padding: 4px;
  }
  main nav.office-tabs a,
  main nav.office-tabs .tab-locked {
    flex: 1 1 auto;
    justify-content: center;
    padding: 8px 9px;
    font-size: 13px;
  }
  /* A member has up to six tabs: three to a row, a long name on two lines,
     so the bar is two rows. It scrolls away with the page. */
  main nav.office-tabs[aria-label="Your account"] {
    position: static;
    margin: 10px 0 6px;
  }
  main nav.office-tabs[aria-label="Your account"] a,
  main nav.office-tabs[aria-label="Your account"] .tab-locked {
    flex: 1 1 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 40px;
    padding: 6px 4px;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
  }
  /* With four tabs, two to a row. */
  main nav.office-tabs[aria-label="Your account"] > :first-child:nth-last-child(4),
  main nav.office-tabs[aria-label="Your account"] > :first-child:nth-last-child(4) ~ * {
    flex-basis: 45%;
  }
  .dispatch-heading {
    margin: 10px 0 8px;
  }
  .dispatch-heading h1 {
    font-size: 30px;
    margin: 0;
  }
  .dispatch-heading .eyebrow,
  .dispatch-heading p {
    display: none;
  }
  .dispatch-subnav {
    flex-wrap: nowrap;
    gap: 5px;
    margin: 0 0 10px;
  }
  .dispatch-subnav a {
    flex: 1 1 auto;
    padding: 7px 6px;
    font-size: 12.5px;
    text-align: center;
    white-space: nowrap;
  }
  .stats.dispatch-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 10px;
  }
  .stats.dispatch-stats > div {
    display: block;
    padding: 8px 10px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
  .stats.dispatch-stats > div:last-child {
    border-right: 0;
  }
  .stats.dispatch-stats span {
    display: block;
    font-size: 11px;
    line-height: 1.25;
  }
  .stats.dispatch-stats strong {
    font-size: 22px;
  }
  .dispatch-batch {
    gap: 10px;
    padding: 14px;
    margin-bottom: 10px;
  }
  .dispatch-batch-head {
    align-items: center;
    flex-wrap: nowrap;
  }
  .dispatch-batch-head > div {
    flex: 0 1 auto;
  }
  .dispatch-batch .pool-left {
    padding: 5px 9px;
    font-size: 12px;
  }
  .dispatch-batch-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .dispatch-batch-fields label:first-child {
    grid-column: 1 / -1;
  }
  .dispatch-batch-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .dispatch-batch-actions .button {
    min-height: 44px;
    padding: 8px 6px;
    font-size: 14px;
  }
  .dispatch-batch-actions .button:first-child {
    grid-column: 1 / -1;
  }
  .dispatch-batch [data-batch-note]:empty {
    display: none;
  }
  /* Search and Show on one line, the filter and the CSV on the next. */
  .dispatch-filter {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 14px;
    margin-bottom: 10px;
  }
  .dispatch-filter label:first-of-type {
    grid-column: 1 / -1;
    font-size: 0;
    gap: 0;
  }
  .dispatch-filter label:first-of-type input {
    font-size: 16px;
  }
  .dispatch-filter input[name="q"] {
    min-width: 0;
  }
  /* The batch above prints a run of bills, and each order has its own button. */
  .print-run {
    display: none;
  }
  /* One order, one small card: who and where first, then the two things the
     office changes, then the print buttons. */
  .dispatch-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3px 10px;
    padding: 10px 0;
  }
  .dispatch-table td {
    display: block;
    padding: 0;
    text-align: left;
    min-width: 0;
  }
  .dispatch-table td::before {
    display: none;
  }
  .dispatch-table td[data-label="Date"],
  .dispatch-table td[data-label="Mobile"],
  .dispatch-table td[data-label="Waiting"] {
    text-align: right;
  }
  .dispatch-table td[data-label="Name"] {
    font-weight: 600;
    min-width: 0;
  }
  .dispatch-table td[data-label="Address"],
  .dispatch-table td[data-label="Print"],
  .dispatch-table td[data-label="Waiting"] {
    grid-column: 1 / -1;
  }
  .dispatch-table td.qty-one {
    display: none;
  }
  .dispatch-table td[data-label="Qty"]::before,
  .dispatch-table td[data-label="PIN"]::before,
  .dispatch-table td[data-label="Waiting"]::before {
    display: inline;
    content: attr(data-label) " ";
    font-weight: 600;
    color: var(--muted);
  }
  .dispatch-table td[data-label="Tracking ID"],
  .dispatch-table td[data-label="Delivery"] {
    margin-top: 4px;
  }
  .dispatch-table .inline-input,
  .dispatch-table .inline-select {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  .dispatch-table .saved-note:empty {
    display: none;
  }
  .dispatch-table .print-links {
    flex-direction: row;
    gap: 8px;
    margin-top: 4px;
  }
  .dispatch-table .print-links .print-link {
    flex: 1 1 0;
    padding: 9px 8px;
    text-align: center;
  }
  .post-office-download {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 14px;
  }
  .post-office-download h2,
  .post-office-download p,
  .post-office-download .button {
    grid-column: 1 / -1;
  }
  .post-office-upload,
  .post-office-preview {
    padding: 14px;
    justify-items: stretch;
  }
}

/* Generate Dispatch: two bill numbers and one button. */
.generate-dispatch {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 0 0 18px;
}
.generate-dispatch label {
  display: grid;
  gap: 4px;
  font-weight: 600;
  font-size: 13px;
}
.generate-dispatch .input-hint {
  flex-basis: 100%;
  margin: 0;
  font-size: 13px;
}
@media (max-width: 700px) {
  /* Four sections: two rows of two. */
  .dispatch-subnav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .generate-dispatch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 14px;
  }
  .generate-dispatch .button,
  .generate-dispatch .input-hint {
    grid-column: 1 / -1;
  }
}

/* The family tree behind the office Orders tab (public/tree-bg.js). It stays
   put while the page scrolls over it; the cards are a little see-through so
   it shows behind them. Strong tree, see-through cards: the owner's choice. */
#tree-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
}
.tree-on .panel,
.tree-on .stats {
  background: rgba(255, 254, 250, 0.9);
}
/* My account on a phone: a member opens it to see her orders, so they come
   straight after a short greeting and one strip of figures. */
@media (max-width: 700px) {
  .page-heading.account-heading {
    padding: 14px 0 10px;
    gap: 0;
  }
  .account-heading h1 {
    margin: 0;
    font-size: 26px;
  }
  .account-heading .eyebrow {
    margin-bottom: 6px;
  }
  .account-heading p:not(.eyebrow) {
    display: none;
  }
  .stats.account-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 12px;
  }
  .stats.account-stats > div {
    display: block;
    padding: 8px 10px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
  .stats.account-stats > div:last-child {
    border-right: 0;
  }
  .stats.account-stats span {
    display: block;
    font-size: 10.5px;
    line-height: 1.25;
  }
  .stats.account-stats strong {
    font-size: 19px;
  }
  .section.account-orders {
    margin: 0 0 14px;
  }
  .account-orders .section-title {
    align-items: baseline;
    margin-bottom: 8px;
  }
  .account-orders .section-title h2 {
    font-size: 20px;
  }
  .account-orders .order-list {
    gap: 8px;
  }
  .account-orders .order-card {
    padding: 10px 13px;
    gap: 10px;
  }
  .account-orders .order-card > div {
    gap: 3px;
  }
  .panel.store-profile {
    gap: 8px;
    margin-top: 0;
    padding: 12px 14px;
  }
  .store-profile > div {
    gap: 2px;
  }
  .store-profile h2 {
    font-size: 19px;
  }
  .store-profile .quiet {
    display: none;
  }
  .store-profile .form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
  }
  .store-profile .form .button {
    align-self: end;
    min-height: 46px;
  }
}

.password-tabs {
  margin-top: 8px;
}
.password-note {
  margin: 6px 0 0;
}
.password-state {
  margin-right: 6px;
}
