/* =========================================================================
   MIE Sales: Small Business Website Program page.
   Loaded only by /small-business-program, after /styles.css and
   /insights/insights.css (term-list, fit-cols, table-wrap). Uses the site
   tokens; adds the hero layout, package comparison, FAQ and the
   application form. The form rules mirror /careers/careers.css so both
   application forms look and behave alike, without coupling the two pages.
   ========================================================================= */

/* The submit button mirrors .btn-primary's look but is a separate class, so
   a submit click is never counted as the site's primary CTA
   (mie_primary_cta) in app.js; the program has its own events. */
.btn-program {
  background: var(--navy);
  color: var(--on-navy);
  border-color: var(--navy);
}
.btn-program:hover, .btn-program:focus-visible {
  background: var(--navy-700);
  border-color: var(--navy-700);
  color: var(--on-navy);
  transform: translateY(-1px);
}
.btn-program[disabled] { opacity: 0.7; cursor: progress; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .btn-program:hover, .btn-program:focus-visible { transform: none; }
}

/* ---- Hero ---------------------------------------------------------------- */
.program-hero-copy { max-width: 46rem; }
.program-hero h1 { font-size: clamp(2.05rem, 5vw, 3.15rem); max-width: 14em; }
.program-hero .lede { margin-bottom: var(--space-3); }
.program-trust {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: var(--space-3);
}
.program-round { margin-top: var(--space-3); font-size: 0.95rem; color: var(--ink-soft); }
@media (max-width: 479px) { .program-hero .hero-actions .btn { width: 100%; justify-content: center; } }

/* ---- Price table + Launch summary ----------------------------------------- */
.program-price-table { max-width: 40rem; margin: 0 0 var(--space-3); }
.program-price-table table { font-size: 1rem; }
.program-price-table td:nth-child(n+2), .program-price-table thead th:nth-child(n+2) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.program-price-table td:last-child { color: var(--ink); font-weight: 700; }
.program-price-table tr.is-launch th, .program-price-table tr.is-launch td { background: var(--surface); }
.program-price-table tr.is-launch th { box-shadow: inset 4px 0 0 var(--navy); }
/* Phones: three short columns that fit without sideways scrolling. */
@media (max-width: 559px) {
  .program-price-table table { font-size: 0.95rem; }
  .program-price-table th, .program-price-table td { padding: 0.65rem 0.7rem; }
  .program-price-table thead th { white-space: normal; }
  .program-price-table .program-tag { display: table; margin: 0.35em 0 0; }
}
.program-tag {
  display: inline-block;
  margin-left: 0.5em;
  padding: 0.1em 0.65em;
  border: 1px solid var(--navy);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  vertical-align: 0.1em;
}
.program-launch-summary { max-width: 40rem; color: var(--ink-soft); }
.program-launch-summary strong { color: var(--ink); }
.program-package-links { max-width: 40rem; color: var(--ink-soft); font-size: 0.96rem; }
.program-package-links a { color: var(--navy); font-weight: 600; }

/* ---- What's the catch ------------------------------------------------------ */
.program-catch { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); max-width: 52rem; }
@media (min-width: 760px) { .program-catch { grid-template-columns: 1fr 1fr; gap: var(--space-3); } }
.program-catch li {
  border: 1px solid var(--hair);
  border-radius: var(--radius-md);
  background: var(--paper);
  padding: var(--space-2) var(--space-3);
  color: var(--ink-soft);
}
.program-catch strong { color: var(--ink); }

/* ---- FAQ accordion (native <details>; works without JS) ---------------------
   The marker is drawn on the question heading itself, not on <summary>, so it
   always sits on the same line as the question, whatever display a browser
   allows on <summary> (older Safari ignores flex there). The browser's own
   marker is hidden in every engine. */
.program-faq { max-width: 52rem; border-top: 1px solid var(--hair); }
.faq-item { border-bottom: 1px solid var(--hair); scroll-margin-top: 5.5rem; }
.faq-item > summary {
  display: block;
  list-style: none;
  padding: 1.05rem 0;
  cursor: pointer;
  border-radius: var(--radius-xs);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::marker { content: ''; }
.faq-item > summary h3 {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 1.06rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0;
}
/* solid navy disclosure triangle, pointing right when closed, down when open */
.faq-item > summary h3::before {
  content: '';
  flex-shrink: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0.36em 0 0.36em 0.55em;
  border-color: transparent transparent transparent var(--navy);
  transform: translateY(-0.08em);
  transition: transform 0.15s ease;
}
.faq-item[open] > summary h3::before { transform: translateY(-0.08em) rotate(90deg); }
.faq-item > summary:hover h3 { color: var(--navy); }
.faq-item > summary:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; }
.faq-answer { padding: 0 0 var(--space-3) 1.3rem; }
.faq-answer p { color: var(--ink-soft); max-width: 46em; }
.faq-answer p strong { color: var(--ink); }

/* ---- Application form (mirrors /careers/careers.css) ------------------- */
.program-apply { scroll-margin-top: 5rem; }
.program-apply .section-head p:not(.point-label) { color: var(--ink-soft); }

.apply-shell { max-width: 52rem; padding: var(--space-3); }
@media (min-width: 640px) { .apply-shell { padding: var(--space-4); } }
.apply-required-note { margin: 0 0 var(--space-3); }

.apply-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.apply-group + .apply-group { margin-top: var(--space-4); }
.apply-group > legend {
  float: left;
  width: 100%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  padding: 0;
  margin-bottom: var(--space-3);
}
.apply-group > legend + * { clear: both; }
.apply-group + .apply-group > legend { border-top: 1px solid var(--hair); padding-top: var(--space-4); }
.apply-field-full { margin-top: var(--space-3); }

.program-location { margin-top: var(--space-3); }
@media (min-width: 640px) { .program-location { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); } }

.field select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.8em 2.4em 0.8em 0.9em;
  border: 1px solid var(--hair-strong);
  border-radius: var(--radius-sm);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23101319' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 0.9em center / 0.75em auto;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
}
.field select:focus-visible,
.choice input:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
  border-color: var(--navy);
}
.form-grid.two-col .field { justify-content: flex-end; }
.form-grid.two-col .field:has(.field-error:not([hidden])) { justify-content: flex-start; }
.field input::placeholder { color: var(--ink-faint); }

.field-help { font-size: 0.86rem; color: var(--ink-soft); margin: 0; }
.char-count { max-width: none; font-size: 0.8rem; color: var(--ink-faint); margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.char-count.is-over { color: #9b1c1c; font-weight: 700; }

.field-error {
  font-size: 0.86rem;
  font-weight: 600;
  color: #9b1c1c;            /* 6.9:1 on white */
  margin: 0.1em 0 0;
}
.field-error::before { content: '! '; font-weight: 800; }
.is-invalid input:not([type="radio"]):not([type="checkbox"]),
.is-invalid select,
.is-invalid textarea,
input[aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]),
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #9b1c1c;
  box-shadow: inset 0 0 0 1px #9b1c1c;
}

.choice-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice-group + .choice-group, .program-redesign, .program-choice-gap { margin-top: var(--space-3); }
.choice-group > legend { font-size: 0.88rem; font-weight: 700; color: var(--ink); padding: 0; margin-bottom: 0.6em; }
.choice-row { display: grid; gap: 0.5em; }
.choice-row--inline { grid-template-columns: repeat(2, minmax(0, 8rem)); }
.choice-row--inline.program-choice-3 { grid-template-columns: repeat(3, minmax(0, 8rem)); }
.choice {
  display: flex;
  gap: 0.7em;
  align-items: flex-start;
  padding: 0.7em 0.9em;
  border: 1px solid var(--hair-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: pointer;
  font-size: 0.97rem;
  line-height: 1.4;
  color: var(--ink);
}
.choice:hover { border-color: var(--ink-faint); }
.choice:has(input:checked) { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: var(--surface); }
.choice input {
  width: 1.15rem; height: 1.15rem;
  margin: 0.1em 0 0;
  flex-shrink: 0;
  accent-color: var(--navy);
}
.choice-group.is-invalid .choice { border-color: #9b1c1c; }

.program-terms-box {
  border: 1px solid var(--hair);
  border-left: 3px solid var(--navy);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
}
.program-terms-box > p { font-weight: 700; color: var(--ink); margin-bottom: 0.6em; }
.program-terms-box .work-list { gap: 0.5em; }
.program-terms-box .work-list li { font-size: 0.95rem; }
.program-ack-list { display: grid; gap: var(--space-2); }
.choice--consent { border: 0; padding: 0; background: transparent; }
.choice--consent:has(input:checked) { box-shadow: none; background: transparent; }
.consent-item.is-invalid .choice--consent span { color: #9b1c1c; }

.apply-submit { margin-top: var(--space-4); }
@media (max-width: 639px) { .apply-submit .btn { width: 100%; justify-content: center; } }

.apply-status:empty { display: none; }
.apply-status {
  border-left: 3px solid #9b1c1c;
  padding: 0.2em 0 0.2em var(--space-3);
  margin: 0 0 var(--space-3);
  color: var(--ink);
}
.apply-status p { margin: 0 0 0.3em; }
.apply-shell .confirm-state { border: 0; padding: 0; background: transparent; }
.apply-shell .confirm-state:focus { outline: none; }
.apply-confirm-title { font-size: clamp(1.35rem, 3vw, 1.75rem); }
.apply-shell .confirm-state p:not(.point-label):not(.form-note) { color: var(--ink-soft); font-size: 1.04rem; }
