/* Shared by every public page: phone header and menu drawer, footer layout. */

/* ---------- header: no big gap under it on phones, and the menu is a drawer from the right */
@media (max-width: 900px) {
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .site-header .header-inner { min-height: 60px; flex-wrap: nowrap; }
  html.is-inner .hero { padding-top: 24px; padding-bottom: 40px; }
  .hero-slide { padding-top: 24px !important; padding-bottom: 80px !important; justify-content: flex-end !important; } /* the slides stack in reverse on phones, so flex-end is the top */
  .section:first-of-type, main > section:first-child { scroll-margin-top: 64px; }

  .nav { position: fixed; top: 0; right: 0; bottom: 0; left: auto; width: min(80vw, 320px); flex-basis: auto; display: flex !important; flex-direction: column; gap: 0; margin: 0; padding: 68px 18px 24px; border: 0; border-left: 1px solid var(--line); background: var(--bg); box-shadow: -12px 0 32px rgba(0, 0, 0, .22); transform: translateX(105%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; overflow-y: auto; z-index: 60; }
  .nav.is-open { transform: none; visibility: visible; transition: transform .25s ease; }
  .nav a { display: flex; align-items: center; min-height: 52px; padding: 0 6px; font-size: 17px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav-toggle { position: relative; z-index: 70; width: 44px; height: 44px; }
  .nav-toggle span { transition: transform .2s ease, opacity .2s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .nav-scrim { position: fixed; inset: 0; z-index: 45; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
  .nav-scrim.is-open { opacity: 1; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) { .nav, .nav-scrim { transition: none !important; } }
/* the signed-in links, inside the phone menu only */
.nav .nav-account { display: none; }
@media (max-width: 900px) {
  .nav .nav-account { display: flex; flex-direction: column; flex: none; margin: 0 0 14px; border-bottom: 3px solid var(--line); }
  .nav .nav-account button { display: flex; align-items: center; width: 100%; min-height: 52px; padding: 0 6px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 17px; font-weight: 600; text-align: left; cursor: pointer; }
  .nav a, .nav .nav-account button { flex-shrink: 0; }
}
/* ---------- footer: the full one only on the home page; a single line everywhere else */
html.is-inner .site-footer .footer-top,
html.is-inner .site-footer .footer-bottom { display: none; }
.footer-compact { padding: 22px 24px; max-width: var(--max-width, 1120px); margin: 0 auto; font-size: 13px; line-height: 1.7; color: inherit; }
.footer-compact a { color: inherit; text-decoration: underline; text-underline-offset: 2px; display: inline-block; padding: 4px 2px; }
.footer-compact .fc-risk { margin: 8px 0 0; font-size: 12.5px; color: inherit; opacity: .9; max-width: 640px; }
.site-footer:has(.footer-compact) { padding: 0; }

/* the home page footer collapses into sections on phones */
@media (max-width: 600px) {
  html.is-home .site-footer .footer-col { align-items: stretch; width: 100%; }
  html.is-home .site-footer .footer-col h4 { margin: 0; width: 100%; }
  html.is-home .site-footer .footer-col h4 button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; text-align: left; cursor: pointer; border-bottom: 1px solid rgba(127, 120, 100, .35); }
  html.is-home .site-footer .footer-col h4 button::after { content: "+"; font-size: 20px; font-weight: 500; }
  html.is-home .site-footer .footer-col h4 button[aria-expanded="true"]::after { content: "–"; }
  html.is-home .site-footer .footer-col a, html.is-home .site-footer .footer-col .footer-social { display: none; }
  html.is-home .site-footer .footer-col.is-open a { display: block; }
  html.is-home .site-footer .footer-col.is-open .footer-social { display: block; }
  html.is-home .site-footer .footer-top { gap: 0; }
}

/* the cookie table: readable on a phone */
.cookie-table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.cookie-table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 14px; line-height: 1.45; }
.cookie-table caption { text-align: left; padding: 10px 12px; font-weight: 700; }
.cookie-table th, .cookie-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-top: 1px solid var(--line); }
.cookie-table thead th { background: var(--surface-2); border-top: 0; }
.cookie-table tbody th { font-weight: 700; overflow-wrap: anywhere; }

/* text links that must be readable (the brand gold is too light for text on white or cream: 2:1; this is 7:1) */
.legal-content a, .auth-links a, .auth-note a, .auth-linkbtn, .about-facts a, .empty a, main dd > a, .inline-link, .contact-path .learn-more, .contact-card .learn-more { color: var(--link); }
.legal-content a:hover, .auth-links a:hover, .auth-note a:hover, .about-facts a:hover, .inline-link:hover { color: var(--ink); }
