/* Subpage extensions of the approved homepage primitives. The scope also covers
   server-rendered Gutenberg previews; homepage instances retain their appearance. */
:is(body:not(.home) main, .editor-styles-wrapper) {
  .subpage-hero h1 { font-weight:500; letter-spacing:-.04em; }
  .section h2 { letter-spacing:-.04em; text-wrap:balance; }
  .offer-tone-yellow, .funding:not(.funding-dark) { --ec3-ring-color:var(--ec3-dark); }
  .ec3-ring-word { white-space:normal; }
  .ec3-ring-stop { white-space:nowrap; }

  /* Same pill and outlined arrow treatment as the homepage funding CTA. */
  .button {
    min-height:56px; max-width:100%; padding:8px 8px 8px 24px;
    justify-content:space-between; gap:24px;
    font-size:16px; line-height:24px; letter-spacing:0;
    white-space:normal; box-shadow:none;
    transition:background-color 220ms var(--ease), transform 160ms var(--ease);
  }
  .button-dark { background:var(--ec3-dark); color:var(--ec3-light); }
  .button-icon {
    width:40px; height:40px; flex-basis:40px;
    border:2px solid currentColor; background:transparent; color:var(--ink);
  }
  .button-dark .button-icon { color:var(--yellow); }
  .button-icon [data-lucide] { width:24px; height:24px; flex-basis:24px; }
  .button:hover { transform:none; box-shadow:none; }
  .button:active { transform:scale(.98); }
  .button:focus-visible, .ec3-button:focus-visible { outline-color:var(--ink); }
  :is(.offer-tone-dark, .service-desk-card, .funding-dark) .button:focus-visible { outline-color:var(--yellow); }
  :is(.subpage-hero-link, .location-map, .offer-item-action) { gap:16px; min-height:44px; font-size:14px; font-weight:600; }
  :is(.subpage-hero-link-icon, .location-map-icon, .offer-item-action > span) {
    width:40px; height:40px; flex:0 0 40px;
    border:2px solid var(--yellow); background:transparent; color:inherit;
  }
  .offer-item-action [data-lucide] { width:24px; height:24px; }

  /* Hollow circles replace the legacy bullseyes and solid icon badges. */
  .service-desk-node, .offer-layout-checklist .offer-item::before {
    width:16px; height:16px; border:2px solid var(--yellow); background:transparent;
  }
  .offer-layout-checklist .offer-item { padding-left:40px; }
  :is(.offer-item-icon, .form-mark, .trust-card:not(.trust-card-lead) .trust-icon) {
    border:2px solid var(--yellow); background:transparent; color:inherit;
  }
  .offer-layout-benefits .offer-item:first-child:not(.offer-item-has-image) .offer-item-icon,
  .offer-layout-system .offer-item:nth-child(2) .offer-item-icon { border-color:var(--ink); }
  :is(.offer-layout-flow, .offer-layout-process) .offer-item-index {
    border:2px solid var(--yellow); background:var(--ec3-dark); color:var(--yellow);
    font-size:14px; font-weight:600;
  }
  .offer-layout-process .offer-item-index { background:var(--ec3-light); color:var(--ink); }
  .steps li > span { border:2px solid var(--yellow); background:var(--paper); color:var(--ink); }
  .offer-layout-cards .offer-item-has-image::after { display:none; }
  .service-desk-heading { padding-bottom:0; border:0; }
  .service-desk-heading::after { display:none; }
  .service-desk-card { background:var(--ec3-dark); box-shadow:none; }
  .service-desk-fact dt { color:var(--ec3-muted); }

  /* Flat surfaces and restrained contrast from the homepage. */
  :is(.offer-tone-dark, .offer-layout-flow, .offer-layout-system) { background:var(--ec3-dark); }
  .offer-tone-dark p { color:var(--ec3-muted); }
  .offer-layout-system .offer-item { background:#272727; box-shadow:none; }
  .offer-layout-system .offer-item:nth-child(2) { background:var(--yellow); color:var(--ink); transform:none; }
  .offer-layout-system .offer-item:nth-child(2) p { color:var(--ink-soft); }
  .offer-layout-process .offer-item { box-shadow:none; }
  .offer-layout-cards .offer-item:nth-child(5n + 1) { background:var(--ec3-light); }
  .offer-layout-benefits .offer-item:nth-child(4n) .offer-item-icon { color:var(--yellow); }
  :is(.faq, .trust) { background:transparent; }
  /* Child-page links share the dark list surface until hover or keyboard focus. */
  .service-item-child-page {
    background:transparent; box-shadow:none; color:var(--white);
    border-top-color:rgba(254, 254, 252, .2);
  }
  .service-item-child-page::before { background:transparent; }
  .service-item-child-page:focus-visible::before { background:var(--yellow); }
  .service-item-child-page:focus-visible { color:var(--ink); border-top-color:transparent; outline:2px solid var(--yellow); outline-offset:4px; }
  .service-item-child-page:focus-visible :is(h3,p,[data-lucide]) { color:var(--ink); }
  @media (hover:hover) and (pointer:fine) {
    .service-item-child-page:hover { color:var(--ink); border-top-color:transparent; }
    .service-item-child-page:hover::before { background:var(--yellow); }
    .service-item-child-page:hover :is(h3,p,[data-lucide]) { color:var(--ink); }
  }
  @media (hover:none) {
    .service-item-child-page:hover:not(:focus-visible) { color:var(--white); }
    .service-item-child-page:hover:not(:focus-visible) > [data-lucide] { color:var(--yellow); transform:none; }
  }
  .service-item-child-page p { color:var(--ec3-muted); }
  .service-item-child-page > [data-lucide] { color:var(--yellow); }
  .about-values { background:transparent; }
  .about-value { border:0; background:var(--paper); }
  .about-value-icon { border:2px solid var(--yellow); border-radius:50%; background:transparent; }
  :is(.about-story, .about-values) h2::after {
    content:""; display:inline-block; width:.24em; height:.24em; margin-left:.07em;
    border:max(2px,.04em) solid var(--yellow); border-radius:50%; vertical-align:.01em;
  }

  /* Luke Forms keeps its definitions, validation and transport. */
  .contact-light { align-items:start; }
  .contact-light .contact-copy { padding-top:0; }
  .contact .contact-form { min-width:0; background:var(--ec3-light); box-shadow:none; }
  .contact-form::before { display:none; }
  .contact-form .form-mark { color:var(--ink); }
  .contact-form .form-actions { grid-template-columns:minmax(0,1fr) auto; }
  .contact-form .submit-button { min-width:0; }
  .contact-form :is(.field label, .field-hint, .field-error, .consent, .form-note, .form-status) { font-size:12px; }
  .contact-form :is(input, textarea)::placeholder { color:var(--muted); }
  .contact-form .field :is(input, select, textarea):focus-visible { outline:2px solid var(--ink); outline-offset:4px; border-radius:2px; }
  .contact-form .luke-form-options span { min-height:44px; font-size:12px; }
  .contact-form .luke-form-options label:hover span { border-color:var(--ink); }
  .contact-form .form-note { max-width:24ch; }

  @media (min-width:921px) and (max-width:1023px) {
    .services-layout { grid-template-columns:minmax(0, .82fr) minmax(480px, 1.18fr); }
  }
  @media (max-width:920px) {
    .offer-intro-grid, .offer-content-with-media { grid-template-columns:minmax(0,1fr); }
    .offer-section-visual { position:relative; top:auto; }
  }
  @media (max-width:640px) {
    .subpage-hero h1, .subpage-hero-plain h1 { font-size:clamp(36px, 10vw, 48px); }
    .button { gap:16px; padding-left:24px; }
    .contact-form .form-row, .contact-form .form-actions { grid-template-columns:minmax(0,1fr); }
    .contact-form .form-note { max-width:none; }
    .contact-form .submit-button { width:100%; }
    .contact-direct a { overflow-wrap:anywhere; }
    .offer-layout-flow .offer-item-index { margin-bottom:24px; }
  }
  @media (prefers-reduced-motion:reduce) {
    .button, .offer-item-image, .offer-item-action > span { transition:none; }
  }
}
