/*
 * Shared styles for public service landing pages.
 */

.aa-service-page {
  --ps-ink: var(--aa-ink-strong, #f6f8fb);
  --ps-muted: var(--aa-muted, #b6bcc6);
  --ps-accent: var(--aa-accent-hi, #7ec0e0);
  --ps-rail-max: 1080px;
  --ps-field-bg: rgba(8, 16, 28, 0.42);
  --ps-field-border: rgba(191, 220, 246, 0.22);
  --ps-rule: rgba(191, 220, 246, 0.22);
}

html[data-theme="light"] .aa-service-page {
  --ps-ink: #141820;
  --ps-muted: #243044;
  --ps-accent: #0e3f56;
  --ps-field-bg: #ffffff;
  --ps-field-border: #5d6b7c;
  --ps-rule: #8aa0b4;
}

html[data-theme="stellar"] .aa-service-page {
  --ps-ink: #f7faff;
  --ps-muted: rgba(198, 214, 238, 0.92);
  --ps-accent: #8fd0ff;
}

body.aa-service-page {
  margin: 0;
  overflow-x: clip;
}

body.aa-service-page .ps-wrap {
  width: 100%;
}

body.aa-service-page:not(:has(.aa-chrome-header-spacer)) {
  /* Reserve the shared header's space while its deferred script loads. */
  padding-top: var(--public-chrome-expanded-height, calc(146px + env(safe-area-inset-top, 0px)));
}

body.aa-service-page .ps-main {
  width: 100%;
  max-width: var(--ps-rail-max);
  margin: 0 auto;
  padding:
    clamp(24px, 5vh, 48px)
    var(--aa-chrome-rail-pad, clamp(20px, 4vw, 56px))
    clamp(40px, 7vh, 72px);
  padding-left: max(var(--aa-chrome-rail-pad, clamp(20px, 4vw, 56px)), env(safe-area-inset-left, 0px));
  padding-right: max(var(--aa-chrome-rail-pad, clamp(20px, 4vw, 56px)), env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}

.ps-content {
  max-width: 40rem;
}

.ps-eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ps-muted);
}

.ps-title {
  margin: 0 0 clamp(14px, 2vh, 20px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.85rem, 5vw, 2.45rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--ps-ink);
  text-wrap: balance;
}

.ps-lead {
  margin: 0 0 clamp(18px, 2.5vh, 24px);
  font-size: clamp(1.05rem, 2.8vw, 1.2rem);
  line-height: 1.5;
  color: var(--ps-muted);
}

.ps-lead--after-price {
  margin-top: 12px;
}

.ps-lead--fine {
  margin-top: 10px;
  font-size: 0.95rem;
}

.ps-lead--after-list {
  margin-top: 14px;
  font-size: 0.98rem;
}

.ps-cta-row {
  margin: 18px 0 8px;
}

.ps-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 0;
  border-radius: 2px;
  background: #d7ecff;
  color: #07111c;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
}

html[data-theme="light"] .ps-button {
  background: #123044;
  color: #f7fbff;
}

.ps-button:hover,
.ps-button:focus-visible {
  outline: 2px solid var(--ps-accent);
  outline-offset: 3px;
}

#ps-inquiry {
  scroll-margin-top: calc(var(--aa-chrome-header-height, 150px) + 16px);
}

.ps-field-error {
  margin: 6px 0 0;
  color: #ffd0d0;
  font-size: 0.95rem;
  line-height: 1.4;
}

html[data-theme="light"] .ps-field-error {
  color: #7a1420;
}

.ps-input[aria-invalid="true"] {
  border-color: #c43646;
}

.ps-example {
  margin-top: 18px;
}

.ps-example__label,
.ps-example__title {
  margin: 0 0 8px;
  color: var(--ps-ink);
  font-size: 0.95rem;
  line-height: 1.4;
}

.ps-example__label {
  font-weight: 750;
}

.ps-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ps-ink);
  font-size: 0.95rem;
  line-height: 1.4;
}

.ps-table th,
.ps-table td {
  border-top: 1px solid var(--ps-rule);
  padding: 8px 8px 8px 0;
  text-align: left;
  vertical-align: top;
}

@media (max-width: 700px) {
  .ps-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .ps-table,
  .ps-table tbody,
  .ps-table tr,
  .ps-table td {
    display: block;
    width: 100%;
  }

  .ps-table tr {
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ps-rule);
  }

  .ps-table td {
    border: 0;
    padding: 4px 0;
  }

  .ps-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 750;
  }
}

.ps-cta {
  display: inline-block;
  color: var(--ps-accent);
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--ps-rule);
  padding-bottom: 3px;
}

.ps-cta:hover,
.ps-cta:focus-visible {
  color: var(--ps-ink);
  border-bottom-color: currentColor;
  outline: none;
}

.ps-section {
  margin-top: clamp(24px, 3.5vh, 36px);
  padding-top: clamp(20px, 3vh, 28px);
  border-top: 1px solid var(--ps-rule);
}

.ps-section__title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ps-ink);
}

.ps-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ps-muted);
  line-height: 1.55;
}

.ps-list li {
  margin-bottom: 6px;
}

.ps-note {
  margin: 12px 0 0;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ps-ink);
}

.ps-price {
  margin: 12px 0 0;
  font-size: 1.2rem;
  font-weight: 750;
  color: var(--ps-ink);
}

.ps-scope,
.ps-reassure {
  margin: 12px 0 0;
  color: var(--ps-ink);
  font-size: 1.02rem;
  line-height: 1.45;
}

.ps-form-block {
  margin-top: clamp(28px, 4vh, 40px);
  padding-top: clamp(20px, 3vh, 28px);
  border-top: 1px solid var(--ps-rule);
}

.ps-form-block__title {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ps-ink);
}

.ps-field {
  margin-bottom: 14px;
}

.ps-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ps-muted);
}

.ps-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font: inherit;
  font-size: 1rem;
  color: var(--ps-ink);
  background: var(--ps-field-bg);
  border: 1px solid var(--ps-field-border);
  border-radius: 4px;
}

.ps-textarea {
  min-height: 88px;
  resize: vertical;
}

.ps-select {
  appearance: auto;
}

.ps-honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ps-turnstile {
  margin: 10px 0 8px;
}

.ps-status {
  margin: 8px 0 12px;
  font-size: 0.92rem;
  color: var(--ps-muted);
}

.ps-status.is-error {
  color: #e8a0a0;
}

.ps-submit {
  display: inline-block;
  padding: 11px 18px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ps-ink);
  background: transparent;
  border: 1px solid var(--ps-field-border);
  border-radius: 4px;
  cursor: pointer;
}

.ps-next__title {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ps-ink);
}

.ps-next__list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ps-muted);
  line-height: 1.55;
}

/* Service foundations use the approved homepage theme surfaces. */
body.aa-service-page.aa-chrome-page {
  min-height: 100vh;
}
html[data-theme="light"] body.aa-service-page.aa-chrome-page {
  background: #fbfdff;
  color: #141820;
  --ps-muted: #3a4554;
  --ps-rule: rgba(168, 196, 220, 0.35);
}
html[data-theme="light"] body.aa-service-page .aa-chrome-header {
  background-color: #f7fbff;
}
html[data-theme="dark"] body.aa-service-page.aa-chrome-page {
  background:
    radial-gradient(circle at 70% 12%, rgba(48, 84, 118, 0.16), transparent 34%),
    linear-gradient(180deg, #050b12 0%, #07111c 54%, #081521 100%);
  background-attachment: fixed;
}
html[data-theme="dark"] body.aa-service-page .aa-chrome-header {
  background-color: #050b12;
}
html[data-theme="stellar"] body.aa-service-page.aa-chrome-page {
  background:
    radial-gradient(circle at 72% 18%, rgba(53, 92, 128, 0.14), transparent 32%),
    radial-gradient(circle at 8% 78%, rgba(43, 79, 112, 0.1), transparent 28%),
    linear-gradient(180deg, #03070c 0%, #07111c 54%, #081521 100%);
  background-attachment: fixed;
}
html[data-theme="stellar"] body.aa-service-page .aa-chrome-header {
  background-color: #03070c;
}

/* Integrated buyer samples, questions and receipts. */
.ps-sample-link { margin: 0 0 24px; font-size: 1rem; line-height: 1.5; }
.ps-sample-link a { color: var(--ps-accent); text-underline-offset: .2em; }
.ps-question { color: var(--ps-ink); font-size: 1.08rem; line-height: 1.45; margin: 20px 0 8px; }
.ps-example { scroll-margin-top: calc(var(--aa-chrome-header-height, 150px) + 20px); }
.ps-receipt { overflow-wrap: anywhere; font-size: .9rem; color: var(--ps-muted); }
.pc-retry-notice { border: 1px solid currentColor; padding: 16px; margin-bottom: 24px; line-height: 1.5; overflow-wrap: anywhere; }
.pc-retry-notice label { display: block; margin-bottom: 16px; }
.pc-retry-button { min-height: 44px; padding: 10px 16px; font: inherit; }

/* Native radio choices remain keyboard accessible and visually separate from callback fields. */
.public-contact-preference {border:0; padding:0; margin:0 0 18px; min-width:0;}
.public-contact-preference legend {font-size:1rem; line-height:1.5; margin-bottom:6px;}
.public-contact-preference label {display:inline-flex; align-items:center; gap:8px; min-height:44px; margin-right:20px;}
.public-contact-preference input {width:1.2rem; height:1.2rem; margin:0; accent-color:var(--aa-accent-hi, #7ec0e0);}
.public-callback[hidden] {display:none !important;}
