/*
 * Article preview footer, revision 2.
 * Load after visual-reading.css. Every rule stays inside .brand-footer.
 * The official logo's white canvas belongs to the whole white footer;
 * its pixels, proportions and colors are never altered or boxed in.
 */

#rj-article-preview .brand-footer {
  margin: 0;
  padding: 62px 0 44px;
  border-block-start: 3px solid var(--gold);
  background: var(--paper);
  color: var(--navy);
  font-family: var(--font-cjk);
  font-size: 16px;
  line-height: 1.8;
}

#rj-article-preview .brand-footer .footer-brand-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: 32px 52px;
}

#rj-article-preview .brand-footer .footer-identity {
  min-width: 0;
}

#rj-article-preview .brand-footer .brand-logo {
  display: inline-flex;
  align-items: center;
  width: 251px;
  max-width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
}

#rj-article-preview .brand-footer .brand-logo img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: none;
}

#rj-article-preview .brand-footer .footer-tagline {
  margin: 22px 0 0;
  color: var(--navy);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .015em;
  text-wrap: balance;
}

#rj-article-preview .brand-footer .footer-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 30px;
  margin: 0;
  padding: 0;
}

#rj-article-preview .brand-footer .footer-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  color: var(--navy);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
  text-underline-offset: .3em;
  text-decoration-thickness: 2px;
}

#rj-article-preview .brand-footer .footer-navigation a:hover {
  text-decoration-line: underline;
  text-decoration-color: var(--gold);
}

/* One shared baseline separates identity from practical business details. */
#rj-article-preview .brand-footer .footer-information {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: start;
  gap: 32px 48px;
  margin-block-start: 38px;
  padding-block-start: 30px;
  border-block-start: 1px solid var(--rule);
}

#rj-article-preview .brand-footer :is(.footer-service-time, .footer-business) {
  min-width: 0;
}

#rj-article-preview .brand-footer .footer-information h2 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .02em;
  text-wrap: balance;
}

#rj-article-preview .brand-footer .footer-information p {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0;
}

#rj-article-preview .brand-footer .footer-business p + p {
  margin-block-start: 6px;
}

#rj-article-preview .brand-footer .footer-service-time p:last-child {
  margin-block-start: 6px;
  font-family: var(--font-latin);
  font-size: 32px;
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1.15;
  letter-spacing: .01em;
}

#rj-article-preview .brand-footer .footer-tools {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 164px;
}

#rj-article-preview .brand-footer .footer-tools :is(a, button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 9px 16px;
  border: 1px solid var(--navy);
  border-radius: 4px;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--font-cjk);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  text-underline-offset: .25em;
  cursor: pointer;
}

#rj-article-preview .brand-footer .footer-tools .back-top {
  padding-inline: 0;
  border-color: transparent;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

#rj-article-preview .brand-footer .footer-tools .back-top:hover {
  text-decoration-thickness: 2px;
}

#rj-article-preview .brand-footer .footer-tools button:hover {
  background: var(--daylight);
}

#rj-article-preview .brand-footer .footer-tools button[aria-pressed="true"] {
  background: var(--navy);
  color: var(--paper);
}

#rj-article-preview .brand-footer .footer-tools button[aria-pressed="true"]:hover {
  background: #123b65;
}

#rj-article-preview .brand-footer :is(a, button):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

#rj-article-preview .brand-footer ::selection {
  background: var(--gold);
  color: var(--navy);
}

@media (min-width: 768px) and (max-width: 1023px) {
  #rj-article-preview .brand-footer {
    padding-block-start: 48px;
  }

  #rj-article-preview .brand-footer .footer-brand-row {
    gap: 28px;
  }

  #rj-article-preview .brand-footer .brand-logo {
    width: 236px;
  }

  #rj-article-preview .brand-footer .footer-tagline {
    font-size: 21px;
  }

  #rj-article-preview .brand-footer .footer-navigation {
    gap: 8px 24px;
  }

  #rj-article-preview .brand-footer .footer-information {
    gap: 28px;
  }
}

@media (max-width: 767px) {
  #rj-article-preview .brand-footer {
    /* The fixed 70px inquiry bar and the device safe area remain clear. */
    padding: 40px 0 calc(112px + env(safe-area-inset-bottom));
  }

  #rj-article-preview .brand-footer .footer-brand-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  #rj-article-preview .brand-footer .brand-logo {
    width: 236px;
  }

  #rj-article-preview .brand-footer .footer-tagline {
    margin-block-start: 18px;
    font-size: 21px;
  }

  #rj-article-preview .brand-footer .footer-navigation {
    justify-content: flex-start;
    gap: 6px 24px;
  }

  #rj-article-preview .brand-footer .footer-information {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 24px;
    margin-block-start: 24px;
    padding-block-start: 26px;
  }

  #rj-article-preview .brand-footer .footer-information h2 {
    margin-block-end: 10px;
  }

  #rj-article-preview .brand-footer .footer-service-time p:last-child {
    font-size: 26px;
    white-space: nowrap;
  }

  #rj-article-preview .brand-footer .footer-tools {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding-block-start: 20px;
    border-block-start: 1px solid var(--rule);
  }

  #rj-article-preview .brand-footer .footer-tools .back-top {
    justify-content: flex-start;
  }
}
