/*
 * ROW public interiors — warm editorial cohesion layer.
 *
 * This file loads after the established public styles but never on the
 * homepage. Every selector is additionally scoped so portal/admin surfaces and
 * the independently composed homepage remain untouched.
 */

body.marketing-site:not(.page-pages-home) {
  --row-public-ivory: #fffaf3;
  --row-public-paper: #fffdf9;
  --row-public-paper-strong: #ffffff;
  --row-public-ink: #17232b;
  --row-public-ink-soft: #46545d;
  --row-public-peach: #f5dfd1;
  --row-public-peach-strong: #ebbea2;
  --row-public-orange: #b7441a;
  --row-public-orange-bright: #e7642b;
  --row-public-sage: #dce8dc;
  --row-public-line: rgba(23, 35, 43, 0.14);
  --row-public-line-strong: rgba(23, 35, 43, 0.24);
  --row-public-shadow-soft: 0 18px 48px rgba(23, 35, 43, 0.08);
  --row-public-shadow-card: 0 14px 36px rgba(23, 35, 43, 0.09);
  --row-public-radius-control: 0.875rem;
  --row-public-radius-card: 1.375rem;
  --row-public-radius-media: 1.5rem;
  --row-public-section-space: clamp(4.5rem, 7vw, 7rem);
  --row-public-ease: cubic-bezier(0.22, 1, 0.36, 1);
  background: var(--row-public-ivory) !important;
  color: var(--row-public-ink);
}

body.marketing-site:not(.page-pages-home) #main-content {
  background:
    radial-gradient(circle at 6% 4%, rgba(245, 223, 209, 0.28), transparent 24rem),
    var(--row-public-ivory);
  color: var(--row-public-ink);
}

/* Quiet editorial rhythm. Page-specific systems retain priority through their
   more specific selectors; these rules provide a consistent fallback. */
body.marketing-site:not(.page-pages-home) #main-content :where(h1, h2) {
  text-wrap: balance;
}

body.marketing-site:not(.page-pages-home) #main-content :where(h1) {
  line-height: 0.98;
  letter-spacing: -0.045em;
}

body.marketing-site:not(.page-pages-home) #main-content :where(h2) {
  line-height: 1.05;
  letter-spacing: -0.035em;
}

body.marketing-site:not(.page-pages-home) #main-content :where(h3, h4) {
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

body.marketing-site:not(.page-pages-home) #main-content :where(p, li, blockquote) {
  text-wrap: pretty;
}

body.marketing-site:not(.page-pages-home) #main-content > section:is(
  [class*="py-14"],
  [class*="py-16"],
  [class*="py-18"],
  [class*="py-20"],
  [class*="py-24"]
) {
  padding-block: var(--row-public-section-space) !important;
}

body.marketing-site:not(.page-pages-home) #main-content > section.bg-white,
body.marketing-site:not(.page-pages-home) #main-content > nav.bg-white {
  background-color: var(--row-public-paper-strong) !important;
}

/* Form controls share one warm, generous input surface without affecting
   checkboxes, radios, hidden fields, or portal/admin forms. */
body.marketing-site:not(.page-pages-home) #main-content :is(
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  input[type="url"],
  input[type="number"],
  input[type="date"],
  textarea,
  select
) {
  border-color: var(--row-public-line-strong);
  border-radius: var(--row-public-radius-control);
  background-color: var(--row-public-paper-strong);
  color: var(--row-public-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

body.marketing-site:not(.page-pages-home) #main-content :is(
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  input[type="url"],
  input[type="number"],
  input[type="date"],
  textarea,
  select
):hover {
  border-color: rgba(201, 79, 31, 0.45);
}

body.marketing-site:not(.page-pages-home) #main-content :is(
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  input[type="url"],
  input[type="number"],
  input[type="date"],
  textarea,
  select
):focus {
  border-color: var(--row-public-orange);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(201, 79, 31, 0.13);
}

body.marketing-site:not(.page-pages-home) #main-content :where(
  .rv-button,
  .fh-button,
  .about-button,
  .resources-tab-link,
  .about-combined__action,
  .about-combined__paperwork,
  .public-closeout__actions a,
  .public-closeout__actions button,
  input[type="submit"],
  button[type="submit"]
) {
  min-height: 2.875rem;
  border-radius: var(--row-public-radius-control) !important;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 220ms var(--row-public-ease),
    transform 220ms var(--row-public-ease) !important;
}

/* Media rounding is deliberately low-specificity. Existing circular portraits,
   split cards, logos, and page-specific media treatments continue to win. */
body.marketing-site:not(.page-pages-home) #main-content :where(
  figure > img:not([class*="rounded-full"]),
  .article-card > img,
  [class*="__media"] > img:not([class*="rounded-full"]),
  [class*="__image"] > img:not([class*="rounded-full"])
) {
  border-radius: var(--row-public-radius-media);
}

body.marketing-site:not(.page-pages-home) #main-content :where(
  .article-card,
  .education-card,
  .volunteer-form-card,
  .faq-reading-room__paper,
  .public-latest-news__card,
  .about-combined__news-card
) {
  border-color: var(--row-public-line);
  border-radius: var(--row-public-radius-card);
  box-shadow: var(--row-public-shadow-card);
}

/* Header: keep the established geometry and behavior, but replace the dark
   application bar with a calm ivory editorial surface. */
body.marketing-site.row-signature:not(.page-pages-home) #main-nav,
body.marketing-site.row-signature:not(.page-pages-home) #main-nav.is-scrolled {
  border-bottom: 1px solid var(--row-public-line) !important;
  background: rgba(255, 253, 249, 0.96) !important;
  color: var(--row-public-ink) !important;
  box-shadow: 0 12px 36px rgba(23, 35, 43, 0.09) !important;
  -webkit-backdrop-filter: blur(18px) saturate(120%) !important;
  backdrop-filter: blur(18px) saturate(120%) !important;
}

body.marketing-site.row-signature:not(.page-pages-home) .marketing-nav-spacer {
  background: var(--row-public-ivory);
}

body.marketing-site.row-signature:not(.page-pages-home) #main-nav #nav-links {
  border-color: var(--row-public-line) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: 0 8px 24px rgba(23, 35, 43, 0.06) !important;
}

body.marketing-site.row-signature:not(.page-pages-home) #main-nav #nav-links .chapter-tab .nav-link,
body.marketing-site.row-signature:not(.page-pages-home) #main-nav #nav-links .chapter-tab .public-nav-dropdown-trigger,
body.marketing-site.row-signature:not(.page-pages-home) #main-nav .nav-auth-link {
  color: var(--row-public-ink) !important;
}

body.marketing-site.row-signature:not(.page-pages-home) #main-nav #nav-links .chapter-tab:hover,
body.marketing-site.row-signature:not(.page-pages-home) #main-nav #nav-links .chapter-tab:focus-within,
body.marketing-site.row-signature:not(.page-pages-home) #main-nav #nav-links .chapter-tab:has(.nav-link[aria-current]) {
  background: var(--row-public-peach) !important;
  box-shadow: none !important;
}

body.marketing-site.row-signature:not(.page-pages-home) #main-nav #nav-links .chapter-tab--donate {
  border-left-color: var(--row-public-line) !important;
}

body.marketing-site.row-signature:not(.page-pages-home) #main-nav #nav-links .chapter-tab--donate .nav-donate,
body.marketing-site.row-signature:not(.page-pages-home) #main-nav #nav-links .chapter-tab--donate .nav-donate:hover {
  border-color: transparent !important;
  border-radius: 999px !important;
  background: var(--row-public-orange) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

body.marketing-site.row-signature:not(.page-pages-home) #main-nav .dropdown-menu {
  border: 1px solid var(--row-public-line-strong) !important;
  border-top: 1px solid var(--row-public-line-strong) !important;
  border-radius: 1.125rem !important;
  background: var(--row-public-paper) !important;
  color: var(--row-public-ink) !important;
  box-shadow: 0 20px 50px rgba(23, 35, 43, 0.13) !important;
}

body.marketing-site.row-signature:not(.page-pages-home) #main-nav .dropdown-menu .public-menu-link:hover,
body.marketing-site.row-signature:not(.page-pages-home) #main-nav .dropdown-menu .public-menu-link:focus-visible {
  background: var(--row-public-peach) !important;
  color: var(--row-public-ink) !important;
}

body.marketing-site:not(.page-pages-home) .chapter-rail {
  border-top-color: var(--row-public-line-strong);
  background: var(--row-public-paper);
}

body.marketing-site.row-signature:not(.page-pages-home) #hamburger-btn .hamburger-line,
body.marketing-site.row-signature:not(.page-pages-home) #hamburger-btn[aria-expanded="true"] .hamburger-line {
  background: var(--row-public-ink) !important;
}

body.marketing-site.row-signature:not(.page-pages-home) #main-nav .crystal-logo-white {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.marketing-site.row-signature:not(.page-pages-home) #main-nav .crystal-logo-dark {
  display: block !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.marketing-site.row-signature:not(.page-pages-home) #main-nav .public-brand-home {
  min-height: 3.25rem !important;
  padding: 0.55rem 1rem !important;
  border-radius: 1rem !important;
  background: var(--row-public-ink) !important;
  box-shadow: 0 9px 24px rgba(23, 35, 43, 0.14) !important;
  transition:
    box-shadow 220ms var(--row-public-ease),
    transform 220ms var(--row-public-ease) !important;
}

body.marketing-site.row-signature:not(.page-pages-home) #main-nav .public-logo-lockup {
  width: clamp(8.75rem, 11vw, 10.5rem) !important;
  max-height: 2.4rem !important;
}

@media (hover: hover) and (pointer: fine) {
  body.marketing-site.row-signature:not(.page-pages-home) #main-nav .public-brand-home:hover {
    transform: translateY(-1px);
    box-shadow: 0 13px 28px rgba(23, 35, 43, 0.18) !important;
  }
}

/* Progressive-enhancement entrances for interior page chapters. The
   controller reveals everything already reached before activating this state,
   so first paint and Turbo-restored positions never flash or disappear. */
body.marketing-site:not(.page-pages-home) #main-content [data-row-reveal] {
  transform: none;
  transition: transform 760ms var(--row-public-ease);
}

body.marketing-site:not(.page-pages-home) #main-content[data-row-reveal-ready="true"] [data-row-reveal]:not(.is-row-revealed) {
  transform: translateY(1.5rem);
}

/* Shared closeout surfaces use the same paper, ink, and peach vocabulary while
   retaining their existing markup, metrics, routes, and counter behavior. */
body.marketing-site:not(.page-pages-home) .public-impact {
  border-block: 1px solid var(--row-public-line) !important;
  background:
    radial-gradient(circle at 12% 12%, rgba(235, 190, 162, 0.38), transparent 22rem),
    var(--row-public-peach) !important;
}

body.marketing-site:not(.page-pages-home) .public-impact article,
body.marketing-site:not(.page-pages-home):not(.page-pages-about):not(.page-pages-donate) .public-impact article {
  border: 1px solid var(--row-public-line) !important;
  border-radius: var(--row-public-radius-card) !important;
  background: var(--row-public-paper-strong) !important;
  box-shadow: var(--row-public-shadow-card) !important;
}

body.marketing-site:not(.page-pages-home) .public-impact article::before {
  border-color: var(--row-public-paper-strong);
  box-shadow: 0 8px 20px rgba(23, 35, 43, 0.12);
}

body.marketing-site:not(.page-pages-home) .public-impact article:not(:last-child)::after {
  background: var(--row-public-peach-strong);
}

body.marketing-site:not(.page-pages-home) .public-impact h2,
body.marketing-site:not(.page-pages-home) .public-closeout h2,
body.marketing-site:not(.page-pages-home) .public-latest-news__inner > h2 {
  color: var(--row-public-ink) !important;
}

body.marketing-site:not(.page-pages-home) .public-closeout {
  border-bottom: 1px solid var(--row-public-line) !important;
  background: var(--row-public-paper) !important;
}

body.marketing-site:not(.page-pages-home) .public-closeout .public-closeout__inner > div > p {
  color: var(--row-public-ink-soft) !important;
}

body.marketing-site:not(.page-pages-home) .public-closeout .rv-button--light {
  border-color: var(--row-public-orange) !important;
  background: var(--row-public-orange) !important;
  color: #ffffff !important;
}

body.marketing-site:not(.page-pages-home) .public-closeout .rv-button--outline-light {
  border-color: var(--row-public-line-strong) !important;
  background: var(--row-public-peach) !important;
  color: var(--row-public-ink) !important;
}

body.marketing-site:not(.page-pages-home) .public-latest-news {
  background: var(--row-public-ivory) !important;
}

body.marketing-site:not(.page-pages-home) .public-latest-news__card,
body.marketing-site:not(.page-pages-home):not(.page-pages-about):not(.page-pages-donate) .public-latest-news__card {
  border: 1px solid var(--row-public-line) !important;
  border-radius: var(--row-public-radius-card) !important;
  background: var(--row-public-paper-strong) !important;
  box-shadow: var(--row-public-shadow-card) !important;
}

body.marketing-site:not(.page-pages-home) .public-latest-news__card h3 {
  color: var(--row-public-ink) !important;
}

/* Footer: preserve every source-authored link and account affordance while
   visually joining the quieter ivory header and interior surfaces. */
body.marketing-site:not(.page-pages-home) footer.site-footer {
  border-top: 1px solid var(--row-public-line) !important;
  background: var(--row-public-paper) !important;
  color: var(--row-public-ink) !important;
}

body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__shelf {
  height: 8px;
  background: var(--row-public-peach);
}

body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__shelf span:nth-child(1) { background: var(--row-public-peach-strong); }
body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__shelf span:nth-child(2) { background: var(--row-public-orange); }
body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__shelf span:nth-child(3) { background: var(--row-public-sage); }
body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__shelf span:nth-child(4) { background: var(--row-public-ink); }

body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__kicker {
  color: var(--row-public-orange) !important;
}

body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__kicker span {
  color: var(--row-public-ink-soft) !important;
}

body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__brand-link {
  width: max-content;
  max-width: 100%;
  padding: 0.9rem 1.15rem;
  border-radius: 1rem;
  background: var(--row-public-ink);
  box-shadow: 0 10px 26px rgba(23, 35, 43, 0.14);
  transition:
    box-shadow 220ms var(--row-public-ease),
    transform 220ms var(--row-public-ease);
}

body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__brand-link .footer-logo-lockup {
  width: min(15rem, 100%);
}

body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__quote {
  border-left-color: var(--row-public-orange);
}

body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__quote p,
body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__heading,
body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__account-kicker,
body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__account-title {
  color: var(--row-public-ink) !important;
}

body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__quote cite,
body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__social > span {
  color: var(--row-public-ink-soft) !important;
}

body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__directory {
  border-top-color: var(--row-public-line);
}

body.marketing-site:not(.page-pages-home) footer.site-footer :where(
  .site-footer__link,
  .site-footer__account-link
) {
  color: var(--row-public-ink) !important;
}

body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__account {
  border-color: var(--row-public-line);
  border-radius: var(--row-public-radius-card);
  background: var(--row-public-peach);
  box-shadow: none;
}

body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__account-icon {
  color: var(--row-public-orange);
}

body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__donate {
  border-color: var(--row-public-orange);
  border-radius: 999px;
  background: var(--row-public-orange) !important;
  color: #ffffff !important;
  box-shadow: none;
}

body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__social a {
  border-color: var(--row-public-line);
  border-radius: 999px;
  background: var(--row-public-paper-strong);
  color: var(--row-public-ink) !important;
  box-shadow: none;
}

body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__bottom {
  border-top-color: var(--row-public-line);
}

body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__bottom p,
body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__bottom-mark,
body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__bottom p:last-child span {
  color: var(--row-public-ink-soft) !important;
}

body.marketing-site:not(.page-pages-home) #back-to-top {
  border: 1px solid var(--row-public-line-strong);
  border-radius: 999px;
  background: var(--row-public-ink) !important;
  color: #ffffff !important;
  box-shadow: var(--row-public-shadow-card) !important;
}

body.marketing-site:not(.page-pages-home) #newsletter-modal .newsletter-card {
  border: 1px solid var(--row-public-line);
  border-radius: var(--row-public-radius-card);
  background: var(--row-public-paper-strong);
  box-shadow: 0 30px 80px rgba(23, 35, 43, 0.22);
}

body.marketing-site:not(.page-pages-home) #newsletter-modal .newsletter-card > div:first-child {
  background: var(--row-public-ink) !important;
}

body.marketing-site:not(.page-pages-home) :focus-visible {
  outline: 3px solid var(--row-public-orange) !important;
  outline-offset: 4px !important;
}

@media (hover: hover) and (pointer: fine) {
  body.marketing-site:not(.page-pages-home) #main-content :where(
    .rv-button,
    .fh-button,
    .about-button,
    .resources-tab-link,
    .about-combined__action,
    .about-combined__paperwork,
    .public-closeout__actions a,
    .public-closeout__actions button,
    input[type="submit"],
    button[type="submit"]
  ):hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 24px rgba(23, 35, 43, 0.12) !important;
  }

  body.marketing-site:not(.page-pages-home) #main-content :where(
    .article-card,
    .education-card,
    .public-latest-news__card,
    .about-combined__news-card
  ):is(:hover, :focus-within) {
    transform: translateY(-3px) !important;
    box-shadow: 0 20px 46px rgba(23, 35, 43, 0.12) !important;
  }

  body.marketing-site:not(.page-pages-home) #main-content :where(
    .article-card,
    .education-card,
    .public-latest-news__card,
    .about-combined__news-card
  ):is(:hover, :focus-within) img {
    transform: scale(1.025) !important;
  }

  body.marketing-site:not(.page-pages-home) footer.site-footer :where(
    .site-footer__link,
    .site-footer__account-link
  ):hover {
    color: var(--row-public-orange) !important;
  }

  body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__social a:hover {
    background: var(--row-public-ink);
    color: #ffffff !important;
    transform: translateY(-2px);
  }

  body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__brand-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 34px rgba(23, 35, 43, 0.18);
  }
}

@media (max-width: 1023px) {
  body.marketing-site:not(.page-pages-home) #main-nav #nav-links {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}

@media (max-width: 640px) {
  body.marketing-site:not(.page-pages-home) {
    --row-public-section-space: clamp(3.75rem, 14vw, 5rem);
    --row-public-radius-card: 1.125rem;
    --row-public-radius-media: 1.125rem;
  }

  body.marketing-site:not(.page-pages-home) .public-impact__inner,
  body.marketing-site:not(.page-pages-home) .public-closeout__inner,
  body.marketing-site:not(.page-pages-home) .public-latest-news__inner,
  body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__body,
  body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__bottom {
    width: calc(100% - 32px);
    max-width: 72rem;
  }

  body.marketing-site:not(.page-pages-home) footer.site-footer :where(
    .site-footer__brand,
    .site-footer__directory,
    .site-footer__navigation,
    .site-footer__account
  ) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.marketing-site:not(.page-pages-home) footer.site-footer :where(
    .site-footer__brand,
    .site-footer__directory
  ) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__brand-link {
    width: min(100%, 19rem) !important;
    justify-self: start;
  }

  body.marketing-site:not(.page-pages-home) footer.site-footer .site-footer__donate {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center;
    padding-inline: 1rem;
    text-align: center;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.marketing-site:not(.page-pages-home),
  body.marketing-site:not(.page-pages-home) *,
  body.marketing-site:not(.page-pages-home) *::before,
  body.marketing-site:not(.page-pages-home) *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  body.marketing-site:not(.page-pages-home) :is(:hover, :focus, :focus-within, :focus-visible, :active),
  body.marketing-site:not(.page-pages-home) :is(:hover, :focus, :focus-within, :focus-visible, :active) img {
    transform: none !important;
  }

  body.marketing-site:not(.page-pages-home) #main-content :where(
    .article-card,
    .education-card,
    .public-latest-news__card,
    .about-combined__news-card
  ):is(:hover, :focus-within),
  body.marketing-site:not(.page-pages-home) #main-content :where(
    .article-card,
    .education-card,
    .public-latest-news__card,
    .about-combined__news-card
  ):is(:hover, :focus-within) img,
  body.marketing-site:not(.page-pages-home) #main-content .about-school-card__button:is(:hover, :focus-within) {
    transform: none !important;
  }
}
