/* FEEDLIFE test-page refinement.
 * Source: docs/FEEDLIFE Design System/{tokens,components/content/SectionHeading.jsx}.
 * Keep the existing DOM, grids, responsive breakpoints and interaction scripts.
 * The shipped tokens take precedence over the older README's pill controls.
 */
:root {
  /* Selected geometry tokens; importing layout.css would also restyle all links. */
  --r-btn: 8px;
  --r-card: 16px;
  --r-tile: 14px;
  --r-box: 12px;
  --sp-3: 10px;
  --sp-5: 16px;
  --sp-7: 22px;
  --sp-8: 25px;
  --sp-9: 29px;
  --sp-10: 35px;
  --sp-11: 44px;
  --button-height: 48px;
  --button-height-compact: 44px;
  --button-padding: 12px 18px;
  --button-padding-compact: 10px 14px;
  --button-font-size: 14px;
  --button-font-size-compact: 13px;
  --button-content-gap: 12px;
  --button-group-gap: 10px;
  --button-group-margin-top: 20px;
}

/* Header logo uses a true-alpha asset so it stays seamless over the sticky header. */
.header .logo {
  display: block;
  width: 174px;
  aspect-ratio: 600 / 250;
  background: url("feedlife-logo.png") center / contain no-repeat;
}
.header .logo > img {
  width: 100%;
  height: auto;
  opacity: 0;
  mix-blend-mode: normal;
}

@media (max-width: 1200px) {
  .header .logo { width: 150px; }
}
@media (max-width: 760px) {
  .header .logo { width: 125px; }
}
@media (max-width: 480px) {
  .header .logo { width: 115px; }
}

/* Keep the existing surfaces and interaction details; refine geometry only. */
.quick-card, .product-card { border-radius: var(--r-card); }
.product-card[data-product-card] { cursor: pointer; }
.partner-benefits article { border-radius: var(--r-tile); }

/* Consistent internal spacing, without changing column counts or section order. */
.quick-card { padding: var(--sp-8) var(--sp-9); }
.card-top { margin-bottom: var(--sp-7); }
.quick-card h3 { margin-bottom: var(--sp-3); }
.quick-card p { margin-bottom: var(--sp-7); }
.product-category { margin-bottom: var(--sp-8); }
.product-visual { margin-top: -27px; }
.product-card h3 { margin-bottom: var(--sp-3); }
.product-total { padding-top: var(--sp-5); margin-top: var(--sp-7); }
.product-card-actions { gap: var(--sp-3); }
.product-signup-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin-top: 16px;
  padding: 8px 16px;
  border-radius: 6px;
  background: #9b2395;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: background .2s, transform .2s;
}
.product-signup-card:hover {
  background: #811b7c;
  transform: translateY(-1px);
}
.product-signup-card:focus-visible,
.product-signup-modal:focus-visible {
  outline: 3px solid #377bea;
  outline-offset: 3px;
}
.product-detail-guide > h3 {
  margin-top: 30px;
}
.product-detail-actions {
  flex-wrap: wrap;
}
.product-signup-modal {
  background: #9b2395;
  color: #fff;
}
.product-signup-modal:hover {
  background: #811b7c;
}
.standards h3 { margin-bottom: var(--sp-3); }
.journal-card h3 { margin-bottom: var(--sp-5); }

.btn {
  min-height: var(--button-height);
  padding: var(--button-padding);
  gap: var(--button-content-gap);
  border-radius: var(--r-btn);
  font-size: var(--button-font-size);
}

/* Draw modal close icons from the button's exact center instead of relying on
 * the font metrics of the multiplication glyph. */
.close-btn {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 33px;
  padding: 0;
  font-size: 0;
  line-height: 0;
  text-align: center;
}
.close-btn::before,
.close-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}
.close-btn::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.close-btn::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.field input, .field select, .field textarea, .sample-prompts button {
  border-radius: var(--r-btn);
}

/* Design-system Select — one shared trigger treatment for every native dropdown.
 * The option list stays native for keyboard and assistive-technology support. */
select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  min-height: 45px;
  padding: 10px 38px 10px 12px;
  border: 1px solid #cfd9ca;
  border-radius: var(--r-btn);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7' fill='none'%3E%3Cpath d='M1 1.25 5.5 5.75 10 1.25' stroke='%2370687b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 11px 7px;
  box-shadow: 0 1px 2px rgb(33 19 50 / 4%);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
select:not([multiple]):hover {
  border-color: #aebda4;
  background-color: #fbfcf9;
}
select:not([multiple]):focus-visible {
  border-color: #5a13bf;
  box-shadow: 0 0 0 3px rgb(90 19 191 / 15%);
  outline: 0;
}
select:not([multiple]):disabled {
  background-color: #f1f2ef;
  color: #8b908a;
  cursor: not-allowed;
}
.sample-prompts button { padding: var(--sp-5); }
.modal-desc { margin-bottom: var(--sp-7); }
.modal-actions {
  gap: var(--button-group-gap);
  margin-top: var(--button-group-margin-top);
}

/* CRM-connected consultation modal. */
.consult-heading {
  padding: 4px 0 3px;
}
.consult-heading .step-meta {
  color: #5a13bf;
}
.consult-heading h2 {
  max-width: 620px;
}
.consult-form {
  display: grid;
  gap: 22px;
}
.consult-fields {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid #e0d8e8;
  border-radius: var(--r-card);
  background: #fbf9fd;
}
.consult-fields .field-grid {
  gap: 16px;
}
.consult-fields .field {
  gap: 8px;
  margin: 0;
  color: #34263a;
  font-size: 13px;
  font-weight: 700;
}
.consult-fields .conditional-field[hidden] {
  display: none;
}
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.consult-fields .field input,
.consult-fields .custom-select-trigger {
  min-height: 50px;
  border-color: #d9d0e2;
  background-color: #fff;
}
.consult-fields .field input::placeholder {
  color: #9a929d;
}
.field-validation-error {
  order: -1;
  display: block;
  margin: 0 0 1px;
  color: #c62929;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}
.consult-fields .field.is-invalid input,
.consult-fields .field.is-invalid .custom-select-trigger {
  border-color: #c62929;
  box-shadow: 0 0 0 3px #c6292917;
}
.consult-fields .field.is-invalid .field-label {
  color: #a91e1e;
}
.required-mark {
  margin-left: auto;
  color: #6b22c7;
  font-style: normal;
}
.rank-required-mark[hidden] {
  display: none;
}
.consent-panel {
  display: grid;
  gap: 0;
  padding: 19px 21px;
  border-radius: var(--r-box);
  background: #f1ecf7;
}
.consent-all-row {
  padding-bottom: 15px;
}
.consent-all-row .check-field b {
  color: #24182b;
  font-size: 14px;
}
.consent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 13px 0;
  border-top: 1px solid #ded4e8;
}
.consent-row:last-of-type {
  padding-bottom: 0;
}
.consent-ad-row {
  padding-bottom: 10px;
}
.consent-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0 0 0 31px;
  padding: 0;
  border: 0;
  background: transparent;
}
.channel-check {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #45364b;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.channel-check input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: #5a13bf;
}
.consent-channel-note {
  grid-column: 1 / -1;
  margin: 1px 0 0;
  color: #5a13bf;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}
.consent-row.is-invalid {
  margin: 0 -10px;
  padding-right: 10px;
  padding-left: 10px;
  border-radius: 10px;
  background: #fff0f1;
}
.consent-row.is-invalid .check-field input {
  outline: 2px solid #c62929;
  outline-offset: 2px;
}
.consent-validation-error {
  color: #c62929 !important;
  font-size: 12px !important;
  font-weight: 750;
}
.consent-more {
  margin-top: 1px;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: #5a13bf;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.consent-more:hover {
  color: #38106f;
}
.check-field {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  cursor: pointer;
}
.check-field input {
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: #5a13bf;
}
.check-field span {
  display: grid;
  gap: 3px;
}
.check-field b {
  color: #34263a;
  font-size: 13px;
  line-height: 1.5;
}
.check-field em {
  color: #6b22c7;
  font-style: normal;
}
.check-field small {
  color: #766e79;
  font-size: 11px;
  line-height: 1.55;
}
.consult-error {
  min-height: 20px;
  margin: -6px 0 0;
}
.consult-actions {
  align-items: center;
  justify-content: flex-end;
  margin-top: -5px;
}
.consult-actions .btn {
  min-width: 190px;
}
.consult-actions .btn[aria-busy="true"] {
  cursor: wait;
}
.consult-success {
  text-align: center;
}
.consult-success .notice {
  text-align: left;
}
.consult-success .modal-actions {
  justify-content: center;
}
.consent-modal {
  max-width: 720px;
}
.consent-modal::backdrop {
  background: #120d18b8;
}
.consent-modal-content {
  padding: 29px 32px 34px;
  color: #4c4250;
  font-size: 14px;
  line-height: 1.75;
}
.consent-modal-content > h2 {
  margin: 0 0 15px;
  color: #211924;
  font-size: 27px;
  line-height: 1.35;
  letter-spacing: -.03em;
}
.consent-modal-content .step-meta {
  margin-bottom: 9px;
  color: #5a13bf;
}
.consent-intro {
  margin: 0 0 23px;
  padding: 13px 15px;
  border-radius: 9px;
  background: #f3eef8;
  color: #5e5362;
  font-size: 13px;
}
.consent-modal-content section {
  padding: 18px 0;
  border-top: 1px solid #e5dfe8;
}
.consent-modal-content section h3 {
  margin: 0 0 12px;
  color: #2f2334;
  font-size: 17px;
}
.consent-modal-content section h4 {
  margin: 15px 0 5px;
  color: #443648;
  font-size: 13px;
}
.consent-modal-content section p,
.consent-modal-content section ul,
.consent-modal-content section dl {
  margin: 0;
}
.consent-modal-content section ul {
  padding-left: 20px;
}
.consent-modal-content section li + li {
  margin-top: 5px;
}
.consent-modal-content dt {
  margin-top: 11px;
  color: #34263a;
  font-weight: 700;
}
.consent-modal-content dd {
  margin: 2px 0 0;
}
.consent-confirmation {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dcd1e5;
  border-radius: 10px;
  background: #fbf9fd;
  color: #34263a;
  font-weight: 700;
}
.consent-modal-content .modal-actions.consent-actions {
  margin-top: var(--button-group-margin-top);
}
.consent-modal-content .consent-actions .btn {
  min-height: var(--button-height-compact);
  padding: var(--button-padding-compact);
  justify-content: center;
  text-align: center;
}

/* Compact footer pattern for step-based and task-based modals. */
.modal-actions.compact-actions .btn {
  min-height: var(--button-height-compact);
  padding: var(--button-padding-compact);
  gap: var(--button-group-gap);
  font-size: var(--button-font-size-compact);
  line-height: 1.4;
}
.modal-subtext {
  margin: 18px 0 0;
  color: #858992;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.65;
}

@media (max-width: 760px) {
  .quick-card { padding: var(--sp-7); }
  .product-visual { margin-top: -22px; }
  .hero-actions { row-gap: var(--sp-5); }
  .product-category { margin-bottom: var(--sp-5); }
  .modal-actions .btn {
    min-height: var(--button-height-compact);
    padding: var(--button-padding-compact);
    gap: var(--button-group-gap);
    font-size: var(--button-font-size-compact);
  }
  .modal-actions.compact-actions .btn {
    flex: 0 1 auto;
    min-width: 0;
  }
  .consult-fields {
    gap: 14px;
    padding: 18px;
  }
  .consult-fields .field-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .consult-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .consult-actions .btn {
    width: 100%;
  }
  .consent-row {
    gap: 9px;
  }
  .consent-channels {
    gap: 8px 18px;
  }
  .consent-modal-content {
    padding: 23px 21px 27px;
  }
  .consent-modal-content > h2 {
    font-size: 24px;
  }
}

/* Footer navigation uses one type scale for both buttons and external links. */
.footer-links button,
.footer-links a {
  padding: 6px 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
