/* ==========================================================================
   Retirees in USA — trust pages, direction A "Front porch" (2.1.0)
   Loaded only on the pages in rti_trust_pages() (inc/trust-pages.php).
   Full-bleed parts break out of .site-container with 100vw; body clips the
   few px of scrollbar overflow that causes.
   ========================================================================== */

body.rti-trust {
  --tp-navy: #13284A;
  --tp-navy-2: #1F3A66;
  --tp-red: #DC2626;
  --tp-red-dark: #B91C1C;
  --tp-blue: #1D4ED8;
  --tp-tint: #F2F6FB;
  --tp-line: #E1E8F2;
  --tp-pink: #FCA5A5;
  --tp-mist: #DCE6F5;
  --tp-mist-2: #B9C7DD;
  --tp-head: var(--rti-head, "Bricolage Grotesque", system-ui, sans-serif);
  overflow-x: clip;
}

body.rti-trust .site-main.rti-tp {
  padding: 0 0 0;
}

.rti-tp-bleed,
.rti-tp-photo,
.rti-tp-index,
.rti-tp-promises {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

/* --------------------------------------------------------------------------
   Hero: photo + navy title panel over its lower edge
   -------------------------------------------------------------------------- */
.rti-tp-hero {
  position: relative;
}

.rti-tp-photo {
  background: var(--tp-navy);
  height: clamp(260px, 38vw, 520px);
  overflow: hidden;
}

.rti-tp-photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 40%;
}

.rti-tp-panel {
  position: relative;
  background: var(--tp-navy);
  color: #fff;
  max-width: 720px;
  margin-top: -190px;
  padding: 2.4rem 2.75rem 2.6rem;
  border-radius: 18px 18px 0 0;
}

.rti-tp-hero--plain .rti-tp-panel {
  margin-top: 1.75rem;
  border-radius: 18px 18px 0 0;
}

body.rti-trust .rti-tp-kicker {
  margin: 0 0 0.75rem;
  font-family: var(--tp-head);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tp-pink);
}

body.rti-trust .rti-tp-title {
  margin: 0 0 1rem;
  font-family: var(--tp-head);
  font-weight: 800;
  font-size: clamp(2.25rem, 4.6vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: #fff;
}

body.rti-trust .rti-tp-lede {
  margin: 0 0 1.1rem;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--tp-mist);
}

body.rti-trust .rti-tp-meta {
  margin: 0;
  font-size: 0.95rem;
  color: var(--tp-mist-2);
}

/* --------------------------------------------------------------------------
   Red "About us" strip
   -------------------------------------------------------------------------- */
.rti-tp-index {
  background: var(--tp-red);
}

.rti-tp-index-in {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.rti-trust .rti-tp-index-label {
  flex: none;
  margin: 0 0.5rem 0 0;
  padding: 1rem 1rem 1rem 0;
  border-right: 1px solid rgba(255, 255, 255, 0.4);
  font-family: var(--tp-head);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.rti-tp-index ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.rti-tp-index a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.9rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}

.rti-tp-index a:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.rti-tp-index a[aria-current="page"] {
  background: #fff;
  color: var(--tp-red-dark);
}

/* --------------------------------------------------------------------------
   Body + rail
   -------------------------------------------------------------------------- */
.rti-tp-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 3.5rem;
  align-items: flex-start;
  padding: 3.25rem 0 4rem;
}

.rti-tp-main {
  flex: 999 1 560px;
  min-width: 0;
}

.rti-tp-rail {
  flex: 1 1 300px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 1000px) {
  .rti-tp-rail {
    position: sticky;
    top: 1.5rem;
  }
}

body.rti-trust .rti-tp-body > :first-child {
  margin-top: 0;
}

body.rti-trust .rti-tp-body > p:first-child {
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--tp-navy);
}

body.rti-trust .rti-tp-body h2 {
  scroll-margin-top: 1.5rem;
  font-family: var(--tp-head);
  font-weight: 800;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.15;
}

body.rti-trust .rti-tp-body h3 {
  font-family: var(--tp-head);
  font-weight: 700;
  font-size: 1.25rem;
}

/* "The short version" box (legal pages + Advertiser Disclosure) */
body.rti-trust .rti-tp-body .rti-tp-short {
  margin: 0 0 2.5rem;
  padding: 1.6rem 1.9rem;
  border-radius: 18px;
  background: var(--tp-blue);
  color: #fff;
}

body.rti-trust .rti-tp-body .rti-tp-short p {
  margin: 0.9rem 0 0;
  font-size: 0.95rem;
  color: var(--tp-mist);
}

body.rti-trust .rti-tp-body .rti-tp-short p:first-child {
  margin: 0 0 0.6rem;
  font-family: var(--tp-head);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tp-mist);
}

body.rti-trust .rti-tp-body .rti-tp-short ul {
  margin: 0;
  padding-left: 1.3rem;
}

body.rti-trust .rti-tp-body .rti-tp-short li {
  margin: 0 0 0.4rem;
  color: #fff;
}

body.rti-trust .rti-tp-body .rti-tp-short a {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.6);
}

/* Legal pages: big red numerals instead of the red rule */
body.rti-trust .rti-tp-body.rti-tp-body--legal {
  counter-reset: tp-sec;
}

body.rti-trust .rti-tp-body.rti-tp-body--legal h2 {
  counter-increment: tp-sec;
  display: grid;
  grid-template-columns: 3.6rem 1fr;
  align-items: baseline;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid #E5E7EB;
}

body.rti-trust .rti-tp-body.rti-tp-body--legal h2::before {
  content: counter(tp-sec, decimal-leading-zero);
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  background: none;
  border-radius: 0;
  font-size: 1.15em;
  line-height: 1;
  color: var(--tp-red);
}

/* At a glance (navy) */
.rti-tp-glance {
  background: var(--tp-navy);
  color: #fff;
  border-radius: 16px;
  padding: 1.6rem 1.6rem 1.5rem;
}

body.rti-trust .rti-tp-glance-title,
body.rti-trust .rti-tp-toc-title {
  margin: 0 0 0.85rem;
  font-family: var(--tp-head);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tp-pink);
}

.rti-tp-glance dl {
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.rti-tp-glance dt {
  font-size: 0.875rem;
  color: var(--tp-mist-2);
}

.rti-tp-glance dd {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.rti-tp-glance a {
  color: #fff;
}

/* On this page */
.rti-tp-toc {
  border: 1px solid var(--tp-line);
  border-radius: 16px;
  padding: 1.35rem 1.5rem;
}

body.rti-trust .rti-tp-toc-title {
  color: var(--tp-navy);
}

.rti-tp-toc ol {
  margin: 0;
  padding-left: 1.4rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.975rem;
  line-height: 1.4;
}

.rti-tp-toc a {
  color: var(--tp-navy);
  text-decoration-color: rgba(19, 40, 74, 0.3);
  text-underline-offset: 2px;
}

.rti-tp-toc a:hover {
  color: var(--tp-red);
}

/* --------------------------------------------------------------------------
   Blue promise band
   -------------------------------------------------------------------------- */
.rti-tp-promises {
  background: var(--tp-blue);
  color: #fff;
}

.rti-tp-promises-in {
  list-style: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.25rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.rti-tp-promises li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.rti-tp-promises svg {
  flex: none;
}

body.rti-trust .rti-tp-promises h2 {
  margin: 0 0 0.25rem;
  font-family: var(--tp-head);
  font-weight: 800;
  font-size: 1.35rem;
  color: #fff;
}

body.rti-trust .rti-tp-promises p {
  margin: 0;
  font-size: 1rem;
  color: var(--tp-mist);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.rti-tp-wrap--contact {
  gap: 2.5rem;
}

.rti-cf-form,
.rti-cf-sent {
  background: var(--tp-tint);
  border-radius: 18px;
  padding: 2.25rem 2.25rem 2rem;
}

.rti-cf-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

body.rti-trust .rti-cf h2 {
  margin: 0;
  font-family: var(--tp-head);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.15;
  color: var(--tp-navy);
}

.rti-cf-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.rti-cf-field label,
.rti-cf-topics legend {
  font-weight: 700;
  color: var(--tp-navy);
}

.rti-cf-topics legend {
  margin-bottom: 0.6rem;
  padding: 0;
}

.rti-cf-opt {
  font-weight: 400;
  color: #4B5563;
}

.rti-cf-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.rti-cf-topic {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.rti-cf-topic input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.rti-cf-topic span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.05rem;
  border-radius: 999px;
  border: 1px solid #C9D6E8;
  background: #fff;
  color: var(--tp-navy);
  font-weight: 700;
  font-size: 1rem;
}

.rti-cf-topic input:checked + span {
  background: var(--tp-navy);
  border-color: var(--tp-navy);
  color: #fff;
}

.rti-cf-topic input:focus-visible + span {
  outline: 3px solid var(--tp-blue);
  outline-offset: 2px;
}

.rti-cf-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.rti-cf input[type="text"],
.rti-cf input[type="email"],
.rti-cf input[type="url"],
.rti-cf textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 1.05rem;
  padding: 0.85rem 1rem;
  border: 1px solid #C9D6E8;
  border-radius: 10px;
  background: #fff;
  color: #1F2937;
}

.rti-cf textarea {
  resize: vertical;
  min-height: 160px;
}

.rti-cf input:focus,
.rti-cf textarea:focus {
  outline: 3px solid rgba(29, 78, 216, 0.35);
  border-color: var(--tp-blue);
}

.rti-cf [aria-invalid="true"] {
  border-color: var(--tp-red);
}

body.rti-trust .rti-cf-hint,
body.rti-trust .rti-cf-err,
body.rti-trust .rti-cf-count {
  margin: 0;
  font-size: 0.9rem;
}

.rti-cf-hint,
.rti-cf-count {
  color: #4B5563;
}

.rti-cf-err {
  color: var(--tp-red-dark);
  font-weight: 700;
}

.rti-cf-err:empty {
  display: none;
}

.rti-cf-foot-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.rti-cf-count {
  margin-left: auto !important;
}

.rti-cf-count.is-near {
  color: var(--tp-red-dark);
}

.rti-cf-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rti-cf-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

body.rti-trust .rti-cf-note {
  flex: 1 1 280px;
  margin: 0;
  font-size: 0.95rem;
  color: #4B5563;
}

.rti-cf-submit,
.rti-cf-again {
  font: inherit;
  font-family: var(--tp-head);
  font-weight: 800;
  font-size: 1.1rem;
  min-height: 52px;
  padding: 0 2rem;
  border: 0;
  border-radius: 999px;
  background: var(--tp-red);
  color: #fff;
  cursor: pointer;
}

.rti-cf-submit:hover,
.rti-cf-again:hover {
  background: var(--tp-red-dark);
}

.rti-cf-submit[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.rti-cf-status {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: #FEF2F2;
  color: #7F1D1D;
  font-size: 1rem;
}

.rti-cf-sent {
  text-align: left;
  color: var(--tp-navy);
}

.rti-cf-sent svg {
  color: var(--tp-blue);
}

body.rti-trust .rti-cf-sent h2 {
  margin: 0.5rem 0 0.5rem;
}

.rti-cf-sent p {
  margin: 0 0 1.25rem;
}

.rti-tp-wrap--contact .rti-tp-body {
  margin-top: 2.5rem;
}

/* Contact rail cards */
.rti-tp-card {
  background: var(--tp-navy);
  color: #fff;
  border-radius: 18px;
  padding: 1.5rem 1.6rem;
}

.rti-tp-card svg {
  color: var(--tp-pink);
}

body.rti-trust .rti-tp-card h2,
body.rti-trust .rti-tp-before h2 {
  margin: 0.4rem 0 0.25rem;
  font-family: var(--tp-head);
  font-weight: 800;
  font-size: 1.35rem;
  color: inherit;
}

body.rti-trust .rti-tp-card p {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.rti-tp-card a {
  color: #fff;
}

body.rti-trust .rti-tp-card .rti-tp-card-sub {
  color: var(--tp-mist);
  font-size: 0.95rem;
}

.rti-tp-before {
  border: 1px solid var(--tp-line);
  border-radius: 18px;
  padding: 1.35rem 1.6rem;
  color: var(--tp-navy);
}

body.rti-trust .rti-tp-before h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

body.rti-trust .rti-tp-before p {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: #1F2937;
}

.rti-tp-before a {
  color: var(--tp-red-dark);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Tablet / phone
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .rti-tp-panel {
    margin-top: -110px;
    padding: 1.9rem 1.75rem 2rem;
  }

  .rti-tp-wrap {
    gap: 2.25rem;
    padding: 2.5rem 0 3rem;
  }
}

@media (max-width: 600px) {
  .rti-tp-photo {
    height: 230px;
  }

  .rti-tp-panel {
    margin: -48px 0 0;
    padding: 1.5rem 1.25rem 1.6rem;
    border-radius: 14px 14px 0 0;
  }

  body.rti-trust .rti-tp-lede {
    font-size: 1.1rem;
  }

  body.rti-trust .rti-tp-index-label {
    display: none;
  }

  /* strip scrolls sideways instead of wrapping into four rows */
  .rti-tp-index-in {
    padding: 0 0 0 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .rti-tp-index-in::-webkit-scrollbar {
    display: none;
  }

  .rti-tp-index ul {
    flex-wrap: nowrap;
    padding-right: 0.75rem;
  }

  .rti-tp-index a {
    white-space: nowrap;
  }

  body.rti-trust .rti-tp-body.rti-tp-body--legal h2 {
    grid-template-columns: 2.6rem 1fr;
  }

  .rti-cf-form,
  .rti-cf-sent {
    padding: 1.5rem 1.1rem;
    border-radius: 14px;
  }

  body.rti-trust .rti-cf h2 {
    font-size: 1.6rem;
  }

  .rti-cf-submit {
    width: 100%;
  }

  .rti-tp-promises-in {
    padding: 2.5rem 1.25rem;
    gap: 1.5rem;
  }
}

/* .rti-cf-form sets display:flex, which would beat the hidden attribute */
.rti-cf [hidden] {
  display: none !important;
}
