/* Green Sheet — signup flow styles
   Loads after css/site.css and reuses its tokens (--lime, --ink, --paper-*, --font).
   Sections: shell · header · progress · builder · matrix · summary · panels · training */

/* ---------- signup tokens ---------- */
:root {
  --signup-shell: 1280px;
  --field-line: rgba(0, 0, 0, .16);
  --check: 26px;
}

/* ---------- page shell ---------- */
.signup-body { background: var(--paper); }

.signup-shell {
  max-width: var(--signup-shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.signup-shell--narrow { max-width: 720px; }
.signup-shell--mid { max-width: 900px; }

/* ---------- header (black bar, logo home, phone right) ---------- */
.signup-header { background: var(--ink-dark); }

.signup-header__bar {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding-block: 14px;
}

.signup-header__logo img { height: 32px; width: auto; }
.signup-header__help { margin-left: auto; font-size: 14px; color: var(--on-dark); }
.signup-header__help a { color: var(--lime); font-weight: 700; }
.signup-header__help a:hover { color: #cfe86b; }

@media (max-width: 639px) {
  .signup-header__bar { min-height: 62px; }
  .signup-header__logo img { height: 26px; }
  .signup-header__help { font-size: 13px; }
  .signup-header__help .signup-header__help-label { display: none; }
}

/* ---------- progress rail ---------- */
.progress {
  display: flex;
  align-items: center;
  padding-block: 16px;
  background: var(--paper-warm);
  border-bottom: 1px solid var(--line);
}

.progress__step { display: flex; align-items: center; gap: 9px; flex: none; }

.progress__num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid rgba(0, 0, 0, .2);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.progress__label { font-size: 13.5px; color: var(--muted); }

.progress__line { flex: 1; height: 2px; margin-inline: 14px; background: rgba(0, 0, 0, .1); }

/* current step */
.progress__step[aria-current="step"] .progress__num {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--lime-ink);
  font-weight: 800;
}

.progress__step[aria-current="step"] .progress__label { font-weight: 700; color: var(--ink); }

/* completed steps */
.progress__step[data-done="true"] .progress__num {
  border-color: #e4e2da;
  background: #e4e2da;
  color: var(--body);
  font-weight: 800;
}

.progress__step[data-done="true"] + .progress__line { background: #d8d6ce; }

/* mobile: rail collapses to segment bars + "Step n of 5" */
.progress--bars { display: none; gap: 5px; padding-block: 12px; }
.progress--bars span { flex: 1; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, .1); }
.progress--bars span[data-on="true"] { background: var(--lime); }

@media (max-width: 899px) {
  .progress { display: none; }
  .progress--bars { display: flex; }
}

/* ---------- page intro ---------- */
.signup-intro { padding-block: 40px 16px; }
.signup-intro h1 { font-size: clamp(25px, 3.6vw, 34px); letter-spacing: -.02em; margin-bottom: 10px; }
.signup-intro p { max-width: 640px; font-size: clamp(14.5px, 1.6vw, 16px); }
.signup-intro--center { text-align: center; }
.signup-intro--center p { margin-inline: auto; max-width: 520px; }

.step-count { font-size: 12.5px; color: var(--muted); }

/* ---------- builder layout ---------- */
.builder {
  display: grid;
  gap: 26px;
  padding-block: 12px 44px;
  align-items: start;
}

@media (min-width: 1000px) {
  .builder { grid-template-columns: minmax(0, 1fr) 384px; gap: 32px; }
}

/* ---------- zone x component matrix ----------
   ONE set of inputs. Desktop is a 4-column grid; below 1000px the same rows
   reflow into stacked per-zone groups, so nothing is duplicated or hidden. */
.matrix {
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.matrix__head { display: none; }

.matrix__row-head { padding: 14px 16px; background: var(--paper-grey); border-bottom: 1px solid var(--line-soft); }
.matrix__row-head strong { display: block; font-size: 14.5px; color: var(--ink); }
.matrix__row-head span { font-size: 12.5px; color: var(--muted); }

.matrix__cell { border-bottom: 1px solid rgba(0, 0, 0, .05); }

.matrix__cell .check {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 48px;
  padding: 13px 16px;
  width: 100%;
}

.matrix__cell:has(input:checked) { background: rgba(178, 220, 35, .07); }

.check__name { font-size: 14px; font-weight: 600; color: var(--ink); }

.matrix__row:not(.matrix__row--foot) { border-bottom: 1px solid var(--line); }
.matrix__row:not(.matrix__row--foot):last-of-type { border-bottom: 0; }

.matrix__foot { padding: 13px 16px; background: var(--paper-warm); border-top: 1px solid var(--line); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

.matrix__foot-cell { padding: 8px 16px; background: var(--paper-warm); }
.matrix__foot-cell:last-child { padding-bottom: 16px; }
.matrix__foot-cell .pill { width: 100%; min-height: 44px; }

@media (min-width: 1000px) {
  .matrix { display: grid; grid-template-columns: minmax(160px, 200px) repeat(3, minmax(0, 1fr)); }

  .matrix__head, .matrix__row { display: contents; }

  .matrix__corner, .matrix__col { background: var(--paper-grey); border-bottom: 1px solid var(--line); }
  .matrix__corner { padding: 14px 16px; }

  .matrix__col {
    padding: 14px 12px;
    border-left: 1px solid var(--line-soft);
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
  }

  .matrix__row-head { padding: 16px; background: none; border-bottom: 1px solid var(--line-soft); }

  .matrix__cell {
    display: grid;
    place-items: center;
    border-bottom: 1px solid var(--line-soft);
    border-left: 1px solid var(--line-soft);
  }

  .matrix__cell .check { display: inline-grid; place-items: center; min-height: 0; padding: 12px; width: auto; }
  .check__name { display: none; }

  .matrix__row:not(.matrix__row--foot) { border-bottom: 0; }
  .matrix__row:last-of-type .matrix__cell, .matrix__row:last-of-type .matrix__row-head { border-bottom: 0; }

  .matrix__foot { padding: 14px 16px; border-top: 0; font-size: 13.5px; letter-spacing: 0; text-transform: none; color: var(--body); }

  .matrix__foot-cell {
    display: grid;
    place-items: center;
    padding: 10px;
    border-left: 1px solid var(--line-soft);
  }

  .matrix__foot-cell:last-child { padding-bottom: 10px; }
  .matrix__foot-cell .pill { width: auto; min-height: 34px; }
}

/* ---------- checkbox control ---------- */
.check { display: inline-grid; place-items: center; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }

.check__box {
  display: grid;
  place-items: center;
  width: var(--check);
  height: var(--check);
  border: 1.5px solid rgba(0, 0, 0, .2);
  border-radius: 7px;
  background: #fff;
  font-size: 15px;
  font-weight: 800;
  color: transparent;
  transition: background-color .12s, border-color .12s, color .12s;
}

.check__box::after { content: "\2713"; }

.check:hover .check__box { border-color: var(--lime-deep); }

.check input:checked + .check__box {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--lime-ink);
}

.check input:focus-visible + .check__box { outline: 2px solid var(--lime-deep); outline-offset: 2px; }

/* select-all / clear-all pills */
.pill {
  min-height: 34px;
  padding: 6px 14px;
  border: 1.5px solid rgba(178, 220, 35, .7);
  border-radius: 7px;
  background: none;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--lime-deep);
  cursor: pointer;
}

.pill:hover { background: rgba(178, 220, 35, .14); }
.pill[data-state="clear"] { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.pill[data-state="clear"]:hover { background: var(--lime-dark); }

.price-rule { margin-top: 14px; font-size: 13px; color: var(--muted); }
.price-rule strong { color: var(--ink); }

/* ---------- component detail accordions ---------- */
.components { margin-top: 32px; }
.components h2 { margin-bottom: 16px; font-size: 20px; }
.components__list { display: grid; gap: 10px; }

.component {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.component > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.component > summary::-webkit-details-marker { display: none; }
.component > summary::after { content: "+"; font-size: 19px; font-weight: 400; color: var(--muted); }
.component[open] > summary::after { content: "\2212"; }
.component__body { padding: 0 20px 18px; }

.component__body ul { display: grid; gap: 4px; padding-left: 18px; list-style: disc; font-size: 13.5px; line-height: 1.7; }
.component__body li { color: var(--body); }
.component__body .note { margin-top: 10px; font-size: 12.5px; color: var(--muted); }

/* ---------- order summary ---------- */
.summary {
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px -22px rgba(34, 33, 29, .25);
  overflow: hidden;
}

.summary__head { padding: 20px 22px 14px; border-bottom: 1px solid var(--line-soft); }
.summary__head .kicker { margin: 0; }
.summary__head p { margin-top: 4px; font-size: 13px; color: var(--muted); }

.summary__lines { padding: 8px 22px; }

.summary__lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
  font-size: 13.5px;
  color: var(--ink);
}

.summary__lines li:last-child { border-bottom: 0; }
.summary__lines span { flex: none; color: var(--muted); }

.summary__totals { padding: 14px 22px; background: var(--paper-warm); border-top: 1px solid var(--line-soft); }

.summary__totals > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 13.5px;
  color: var(--body);
}

.summary__totals .is-total {
  margin-top: 8px;
  padding: 10px 0 2px;
  border-top: 1px solid var(--line);
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
}

.summary__totals .note { padding: 0; font-size: 12px; color: var(--muted); }
.summary__form { padding: 20px 22px 22px; }
.summary__form .btn { margin-top: 16px; }
.summary__form .fineprint { margin-top: 12px; font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }

/* ---------- fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }

.field > label, .field__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--body);
}

.input {
  min-height: 48px;
  padding: 13px 14px;
  border: 1.5px solid var(--field-line);
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
}

.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(178, 220, 35, .25); }
.input:focus-visible { outline: none; }
.input[readonly] { border-color: rgba(0, 0, 0, .1); background: var(--paper-grey); color: var(--muted); }

.field-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .field-grid { grid-template-columns: 1fr 1fr; } }
.field-grid .field--wide { grid-column: 1 / -1; }
.field-hint { margin-top: 10px; font-size: 12.5px; color: var(--muted); }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--body);
  cursor: pointer;
}

.consent { position: relative; }
.consent input { position: absolute; opacity: 0; width: 0; height: 0; }
.consent .check__box { --check: 20px; font-size: 13px; border-radius: 6px; flex: 0 0 auto; margin-top: 1px; }
.consent input:checked + .check__box { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.consent input:focus-visible + .check__box { outline: 2px solid var(--lime-deep); outline-offset: 2px; }

/* ---------- standalone panels (verify / activate / errors) ---------- */
.panel-stack { display: grid; gap: 16px; padding-block: 40px 56px; }

.panel {
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.panel--go { border-color: rgba(178, 220, 35, .6); }
.panel--error { border-left: 4px solid #c0562f; }
.panel--center { text-align: center; padding: 30px 32px; }

.panel__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }

.panel__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: var(--paper-grey);
  font-size: 14px;
}

.panel__icon--ok { background: var(--lime); color: var(--lime-ink); font-size: 15px; font-weight: 800; }

.panel__icon--lg {
  width: 44px;
  height: 44px;
  margin-inline: auto;
  margin-bottom: 16px;
  font-size: 22px;
}

.panel h1, .panel h2 { font-size: clamp(19px, 2.4vw, 24px); }
.panel p { margin-top: 10px; font-size: 14.5px; }
.panel .panel__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.panel .btn--block + .fineprint { margin-top: 12px; font-size: 12px; color: var(--muted); text-align: center; }
.panel__foot { margin-top: 16px; font-size: 13px; }
.panel__foot a { color: var(--muted); text-decoration: underline; }

.waiting {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--paper-warm);
  font-size: 13px;
  color: var(--muted);
}

.waiting__dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--lime);
  animation: waiting-pulse 1.6s ease-in-out infinite;
}

/* ---------- payment received banner ---------- */
.paid-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(178, 220, 35, .18);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--lime-deep);
}

.paid-badge__tick {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--lime-ink);
  font-size: 12px;
  font-weight: 800;
}

/* ---------- activation layout ---------- */
.activate {
  display: grid;
  gap: 26px;
  padding-block: 28px 52px;
  align-items: start;
}

@media (min-width: 1000px) { .activate { grid-template-columns: 360px minmax(0, 1fr); gap: 32px; } }

.recap { border: 1px solid rgba(0, 0, 0, .1); border-radius: 12px; overflow: hidden; }
.recap__head { padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.recap__head .kicker { margin: 0; }
.recap__head p { margin-top: 4px; font-size: 13px; color: var(--muted); }
.recap__lines { padding: 6px 20px; }
.recap__lines li { padding: 8px 0; border-bottom: 1px solid rgba(0, 0, 0, .05); font-size: 13px; color: var(--ink); }
.recap__lines li:last-child { border-bottom: 0; }
.recap__meta { padding: 14px 20px; background: var(--paper-warm); border-top: 1px solid var(--line-soft); }
.recap__meta > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 13px; color: var(--body); }
.recap__meta strong { color: var(--ink); font-weight: 600; }
.recap__meta .is-total { margin-top: 7px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 16px; font-weight: 800; color: var(--ink); }

.form-card { padding: 28px 30px; border: 1px solid rgba(0, 0, 0, .1); border-radius: 12px; background: #fff; }
.form-card h2 { margin-bottom: 18px; font-size: 18px; letter-spacing: -.01em; }
.form-card h2 + .field-grid { margin-bottom: 0; }
.form-card__section { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.form-card .btn--block { margin-top: 24px; min-height: 54px; font-size: 16.5px; }

/* ---------- training / demo booking ---------- */
.slots {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(88px, 150px));
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 11px;
  overflow: hidden;
}

.slots__corner { padding: 13px 18px; background: var(--paper-grey); border-bottom: 1px solid var(--line); }

.slots__col {
  padding: 11px 12px;
  background: var(--paper-grey);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line-soft);
  text-align: center;
}

.slots__col strong { display: block; font-size: 13.5px; color: var(--ink); }
.slots__col span { font-size: 11.5px; color: var(--muted); }

.slots__day {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.slots__day span { font-weight: 400; color: var(--muted); }
.slots__day[data-far="true"] { color: var(--muted); }

.slots__cell {
  display: grid;
  place-items: center;
  padding: 9px;
  border-bottom: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}

.slots__cell:has(input:checked) { background: rgba(178, 220, 35, .1); }
.slots__row:last-of-type .slots__cell, .slots__row:last-of-type .slots__day { border-bottom: 0; }

.slots-note { margin-top: 12px; font-size: 13px; color: var(--muted); }

.training-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding-block: 24px 40px;
}

.training-actions .selected-count { font-size: 13.5px; color: var(--muted); }
.training-actions .later { margin-left: auto; font-size: 14px; color: var(--muted); text-decoration: underline; }

@media (max-width: 639px) {
  .training-actions .later { margin-left: 0; }
  .training-actions .btn { width: 100%; }
}

/* ---------- mobile running total ----------
   A total plus a link to the email/terms/Continue block. Not a second submit
   button: the required fields live in the summary aside. */
.dock {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px var(--gutter) 14px;
  border-top: 1px solid rgba(0, 0, 0, .1);
  background: #fff;
  box-shadow: 0 -8px 24px -12px rgba(34, 33, 29, .2);
}

.dock__meta { font-size: 12.5px; color: var(--muted); }
.dock__total { font-size: 20px; font-weight: 800; color: var(--ink); }
.dock__total span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.dock__cta { margin-left: auto; flex: none; }

@media (max-width: 419px) {
  .dock { flex-wrap: wrap; }
  .dock__cta { margin-left: 0; width: 100%; }
}

@media (min-width: 1000px) { .dock { display: none; } }

/* ---------- auth / invoice / terms ----------
   login.html, pay-an-invoice/*, terms.html. Same shell and tokens as the
   signup flow; these only add the pieces those pages need. */
.auth { padding-block: 8px 56px; }
.auth .form-card { margin-top: 4px; }
.auth .form-card .btn--block { margin-top: 22px; }

.auth__alt {
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
}

.form-card__foot { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* notices (login errors, logoff confirmation, invoice messages) */
.notice {
  padding: 14px 18px;
  margin-bottom: 20px;
  border-radius: 10px;
  border-left: 4px solid;
  font-size: 14px;
  line-height: 1.55;
}

.notice--error { border-color: #c0562f; background: #fbf0ec; color: #7a331a; }
.notice--error a { color: #7a331a; text-decoration: underline; }

.notice--ok { border-color: var(--lime); background: rgba(178, 220, 35, .14); color: var(--lime-deep); }

.notice--warn { border-color: #d9a63c; background: #fdf6e7; color: #7a5b0d; }
.notice--warn:empty { display: none; }

/* prefixed inputs: invoice # and $ */
.input-affix { display: flex; align-items: stretch; }

.input-affix__mark {
  display: grid;
  place-items: center;
  width: 46px;
  flex: none;
  border: 1.5px solid var(--field-line);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: var(--paper-grey);
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}

.input-affix .input { border-radius: 0 8px 8px 0; width: 100%; }
.input-affix:focus-within .input-affix__mark { border-color: var(--lime); }

textarea.input { width: 100%; min-height: 150px; resize: vertical; line-height: 1.5; }
.g-recaptcha { margin-bottom: 6px; }

/* inline field messages */
.field-error { font-size: 12.5px; font-weight: 600; color: #a8412a; }
.field-error:empty { display: none; }
.field-hint { margin-top: 0; }

/* Stripe Elements mount: give it the same box as .input */
.input--card { display: block; padding: 14px; }
.input--card.StripeElement--focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(178, 220, 35, .25); }
.input--card.StripeElement--invalid { border-color: #c0562f; }

.pay-trust { display: grid; gap: 8px; }
.pay-trust a { font-weight: 600; }

/* optional ad slots on login */
.ad-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.ad-slot { flex: 1 1 0; min-width: 0; }
.ad-slot img.banner { max-width: 100%; height: auto; }
.ad-slot:empty { display: none; }
.ad-row .btn { margin-left: auto; }

@media (max-width: 639px) {
  .ad-row .btn { margin-left: 0; width: 100%; }
}

/* ---------- long-form text (terms) ---------- */
.prose { padding-block: 8px 64px; }

.terms-list {
  display: grid;
  gap: 22px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: term;
}

.terms-list li {
  position: relative;
  padding-left: 46px;
  max-width: 66ch;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--body);
  counter-increment: term;
}

.terms-list li::before {
  content: counter(term);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--paper-grey);
  font-size: 14px;
  font-weight: 800;
  color: var(--lime-deep);
}

.prose__foot {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

/* recap lines carry two-line entries on the invoice review */
.recap__lines li strong { color: var(--ink); font-weight: 700; }

/* ---------- motion ---------- */
@keyframes waiting-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

@media (prefers-reduced-motion: reduce) {
  .waiting__dot { animation: none; }
}
