/* Shared site navigation and dark surfaces. */
.site-refresh {
  --text: #f7f3ec;
  --muted: #b5b0aa;
  --red: #f11222;
  --surface-radius: 32px;
  --line: #ffffff24;
  --mobile-header-top: max(10px, env(safe-area-inset-top, 0px));
}
.site-refresh > .skip-link { position: fixed; z-index: 1000; top: 12px; left: 20px; padding: 12px 18px; border-radius: 16px; color: #fff; background: #a9121e; transform: translateY(-200%); }
.site-refresh > .skip-link:focus { transform: translateY(0); }
.site-refresh .site-header {
  --header-unit: 176px; --header-height: 76px; --header-radius: 24px;
  position: fixed; top: 16px; left: 50%; z-index: 120;
  display: grid; grid-template-columns: var(--header-unit) minmax(0, 1fr) var(--header-unit); align-items: center; gap: 8px;
  width: min(1440px, calc(100% - 40px)); height: var(--header-height); min-height: 0;
  padding: 0 10px; box-sizing: border-box; border: 1px solid #ffffff26; border-radius: var(--header-radius);
  background: rgb(11 11 11 / 84%);
  box-shadow: inset 0 1px 0 #ffffff0d; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); transform: translateX(-50%); animation: none;
  pointer-events: auto;
}
.site-refresh .site-header::before,
.site-refresh .site-header::after { display: none; }
.site-refresh .header-main { display: contents; }
.site-refresh .header-main .brand {
  display: grid; place-items: center; grid-column: 1; grid-row: 1;
  width: var(--header-unit); height: 100%; margin: 0; padding: 10px 20px;
  box-sizing: border-box; background: none;
}
.site-refresh .brand img { display: block; width: 100%; max-width: 136px; height: auto; }
.site-refresh .header-main .main-nav {
  display: flex; grid-column: 2; grid-row: 1; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 2px; min-width: 0; padding: 0; margin: 0;
  overflow: visible; opacity: 1; visibility: visible; max-height: none;
  transition: opacity 120ms ease; mask-image: none;
}
.site-refresh .header-main .main-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 10px; border-radius: 12px; color: #c9c4be; font: 14px/1.4 Arial, sans-serif; white-space: nowrap; text-decoration: none; }
.site-refresh .header-main .main-nav a:hover { background: #ffffff0a; color: #fff; }
.site-refresh .header-account { display: grid; align-items: center; justify-items: end; grid-column: 3; grid-row: 1; width: var(--header-unit); height: 100%; padding-right: 20px; box-sizing: border-box; }
.site-refresh .desktop-account { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 44px; min-width: 44px; height: 44px; padding: 10px; margin: 0; color: var(--text); background: #ffffff08; border: 1px solid #ffffff20; border-radius: 999px; font: 600 16px/1 Arial, sans-serif; cursor: pointer; }
.site-refresh .desktop-account svg { width: 24px; height: 24px; flex: none; }
.site-refresh .desktop-account:hover { background: #ffffff09; }
.site-refresh .site-header .nav-cta,
.site-refresh .mobile-header-button { display: none; }
.site-refresh .mobile-account-notice { display: none; }
.site-refresh .mobile-account-notice:not([hidden]) { position: absolute; top: calc(100% + 10px); right: 0; display: block; pointer-events: auto; width: min(340px, 100%); margin: 0; padding: 22px; border: 1px solid #ffffff29; border-radius: 24px; background: #151515; color: var(--text); font: 15px/1.5 Arial, sans-serif; }
.site-refresh .site-header :is(a, button):focus-visible { outline: 2px solid #ff7882; outline-offset: -4px; }
@media (min-width: 761px) and (max-width: 1100px) {
  .site-refresh .site-header { --header-unit: 148px; }
  .site-refresh .header-main .main-nav a { font-size: 12px; min-height: 30px; padding-inline: 7px; }
}
@media (max-width: 760px) {
  .site-refresh .site-header {
    top: var(--mobile-header-top); width: calc(100% - 24px); height: 70px;
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-rows: 48px;
    align-items: center; gap: 0 12px; padding: 10px 12px; box-sizing: border-box;
    border: 1px solid #ffffff26; border-radius: 30px;
    box-shadow: inset 0 1px 0 #ffffff12; pointer-events: auto;
  }
  .site-refresh .header-main { display: contents; }
  .site-refresh .header-account { display: none; }
  .site-refresh .header-main .brand { grid-column: 2; grid-row: 1; justify-self: center; width: 126px; max-width: 100%; height: 48px; padding: 0; }
  .site-refresh .mobile-header-button { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 44px; height: 44px; padding: 10px; color: var(--text); background: #ffffff08; border: 1px solid #ffffff20; border-radius: 16px; cursor: pointer; }
  .site-refresh .mobile-header-button svg { width: 24px; height: 24px; flex: none; }
  .site-refresh .menu-toggle { grid-column: 1; grid-row: 1; }
  .site-refresh .mobile-account { grid-column: 3; grid-row: 1; }
  .site-refresh .site-header .main-nav {
    position: absolute; inset: auto 0 auto; top: calc(100% + 10px);
    display: none; width: auto; max-height: calc(100dvh - 110px - env(safe-area-inset-top));
    padding: 14px; overflow-y: auto; overscroll-behavior: contain;
    background: #101010; border: 1px solid #ffffff29; border-radius: 28px;
    opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: none;
  }
  .site-refresh .site-header.is-menu-open .main-nav { display: grid; grid-template-columns: 1fr; gap: 4px; }
  .site-refresh .site-header .main-nav a { display: flex; justify-content: flex-start; min-height: 48px; padding: 8px 18px; box-sizing: border-box; color: var(--text); font-size: 16px; border-radius: 16px; }
  .site-refresh .mobile-account-notice:not([hidden]) { left: 0; right: 0; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .site-refresh .header-main,
  .site-refresh .header-main .main-nav { transition: none; }
}

/* Content pages use the same black palette, readable text and soft edges. */
body.site-refresh:not(.home-page) { color: var(--text); background: #030303; overflow-x: clip; font-family: Arial, "Segoe UI", sans-serif; }
.site-refresh:not(.home-page) :is(.article-sources, .person-info aside, .person-section-grid article, .person-route, .immersion-copy, .quiz-surface, .quiz-results, .quiz-lock, .map-detail, .library-panel) { color: var(--text); background: linear-gradient(130deg, #ffffff05, transparent), #0d0d0e; border: 1px solid var(--line); border-radius: 32px; box-shadow: inset 0 1px 0 #ffffff0b; }
.site-refresh:not(.home-page) :is(.article-note, .article-source-list a, .quiz-answer) { color: var(--text); background: #121213; border-color: var(--line); border-radius: 24px; }
.site-refresh:not(.home-page) .article-source-list strong { color: var(--text); }
.site-refresh:not(.home-page) :is(.article-source-list span, .footer-brand p, .footer-copy, .footer-nav a) { color: var(--muted); }
.site-refresh:not(.home-page) .article-sources .overline { color: #ff5965; }
.site-refresh:not(.home-page) .article-source-list a:hover { background: #1b0c0e; border-color: #ac2932; }
.site-refresh:not(.home-page) .site-footer { color: var(--text); background: #080808; border-color: var(--line); }
.site-refresh:not(.home-page) .footer-nav a { border-color: var(--line); }
.site-refresh:not(.home-page) .footer-nav a:hover { color: #fff; background: #ffffff0a; }
.site-refresh:not(.home-page) :is(.article-image, .article-image-grid figure, .photo-placeholder) { border-radius: 32px; }
.site-refresh:not(.home-page) :is(.person-info h2, .article-body h2, .article-sources h2) { letter-spacing: -.035em; line-height: 1.12; }
.site-refresh:not(.home-page) .person-copy h1 { white-space: normal; overflow-wrap: anywhere; }
.site-refresh:not(.home-page) :is(.motion-reveal, .reveal-on-scroll) { opacity: 1; transform: none; filter: none; animation: none; }
.site-refresh:not(.home-page) :is(.person-hero, .article-hero, .beta-hero) { padding-top: 148px; }
.site-refresh:not(.home-page) .quiz-answer.is-selected { background: #70101a; color: #fff; border-color: #f11222; }
.site-refresh:not(.home-page) :is(a, button, select):focus-visible { outline: 2px solid #ff7882; outline-offset: 3px; }
@media (max-width: 760px) {
  .site-refresh:not(.home-page) :is(.person-hero, .article-hero, .beta-hero) { padding-top: 116px; }
  .site-refresh:not(.home-page) .article-body { width: calc(100% - 40px); --article-wide: 100%; }
  .site-refresh:not(.home-page) .article-sources { width: calc(100% - 40px); padding: 24px; }
  .site-refresh:not(.home-page) .article-source-list { grid-template-columns: minmax(0, 1fr); }
}

/* The mobile navigation unfolds inside the same header surface. */
@media (max-width: 760px) {
  .site-refresh .site-header { height: auto; min-height: 70px; grid-template-rows: 48px auto; }
  .site-refresh .site-header .main-nav {
    position: static; inset: auto; grid-column: 1 / -1; grid-row: 2;
    width: 100%; max-height: calc(100dvh - 120px); margin: 10px 0 0; padding: 10px 0 0;
    background: none; border: 0; border-top: 1px solid #ffffff1f;
    border-radius: 0; box-shadow: none;
  }
  .site-refresh .site-header.is-menu-open .main-nav { gap: 2px; }
}

/* Account form: one quiet surface, shared by the desktop dialog and mobile header. */
.site-refresh .auth-card { padding: 36px; background: #101011; border: 1px solid #ffffff26; border-radius: 32px; max-height: calc(100dvh - 44px); overflow-y: auto; }
.site-refresh .auth-card h2 { font: 600 32px/1.15 Arial, sans-serif; letter-spacing: -.035em; margin-right: 24px; }
.site-refresh .auth-card .overline { margin: 0 0 12px; font-size: 11px; letter-spacing: .13em; }
.site-refresh .auth-note { font-size: 15px; line-height: 1.6; margin-top: 14px; }
.site-refresh .auth-switch { margin-top: 24px; padding: 4px; border-radius: 18px; background: #080809; }
.site-refresh .auth-switch button { border-radius: 14px; font: 600 14px/1.3 Arial, sans-serif; min-height: 44px; }
.site-refresh .auth-switch button.is-active { color: #fff; background: #ffffff14; box-shadow: inset 0 1px 0 #ffffff12; }
.site-refresh .auth-form { gap: 16px; margin-top: 24px; }
.site-refresh .auth-form [hidden] { display: none !important; }
.site-refresh .auth-form input { box-sizing: border-box; min-width: 0; font: 16px/1.4 Arial, sans-serif; background: #ffffff06; border-radius: 16px; }
.site-refresh .auth-submit { margin-top: 4px; font: 600 16px/1.4 Arial, sans-serif; box-shadow: none; }
.site-refresh .auth-submit:disabled { cursor: not-allowed; opacity: .45; }
.site-refresh .auth-message { font-size: 13px; margin: 0; }
.site-refresh .auth-message:empty { display: none; }
.site-refresh .auth-hint { margin-top: 22px; padding-top: 20px; border-top: 1px solid #ffffff18; font-size: 13px; }
.site-refresh .auth-hint a { color: #f7f3ec; text-underline-offset: 4px; }
.site-refresh .auth-card :is(button, a, input):focus-visible { outline: 2px solid #ff7882; outline-offset: 3px; }
.site-refresh .auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.site-refresh .auth-switch button { border: 0; background: transparent; color: #aaa39e; cursor: pointer; padding: 12px; }
.site-refresh .auth-switch button.is-active { background: #262325; color: #fff; }
.site-refresh .auth-form > label { display: grid; gap: 9px; font-size: 13px; font-weight: 500; color: #d6d0ca; }
.site-refresh .auth-form input { width: 100%; height: 50px; padding: 12px 15px; border: 1px solid #ffffff2c; color: #f7f3ec; outline: none; }
.site-refresh .auth-form input::placeholder { color: #928a85; }
.site-refresh .auth-form input:focus { border-color: #f16d79; background: #ffffff0a; }
.site-refresh .password-field { display: block; position: relative; }
.site-refresh .password-field input { padding-right: 56px; }
.site-refresh .password-toggle { display: grid; place-items: center; position: absolute; right: 4px; top: 3px; width: 44px; height: 44px; padding: 10px; color: #c3bcb6; background: transparent; border: 0; border-radius: 13px; cursor: pointer; }
.site-refresh .password-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.site-refresh .password-toggle:hover { background: #ffffff0c; }
.site-refresh .auth-submit { width: 100%; min-height: 50px; padding: 13px 18px; color: #fff; background: #cc1526; border: 1px solid #e84e5d; border-radius: 999px; cursor: pointer; }
.site-refresh .auth-submit:hover:not(:disabled) { background: #e01c30; }
.site-refresh .auth-submit:disabled { background: #2b2729; color: #c2b9b5; border-color: #ffffff20; opacity: 1; }
.site-refresh .auth-message { line-height: 1.65; color: #bbb3ad; }
.site-refresh .auth-message[data-type="error"] { color: #ff939e; }
.site-refresh .auth-message[data-type="success"] { color: #a9d8bd; }
.site-refresh .auth-note, .site-refresh .auth-hint { color: #bdb5ae; }
.site-refresh .auth-card .auth-hint { line-height: 1.6; }
.site-refresh .auth-modal:not(.is-open) { display: none; }
@media (max-width: 760px) {
  .site-refresh .site-header > .auth-modal { position: static; inset: auto; grid-column: 1 / -1; grid-row: 2; width: 100%; max-width: none; min-width: 0; padding: 0; margin: 10px 0 0; overflow: visible; border-top: 1px solid #ffffff1f; }
  .site-refresh .site-header > .auth-modal:not(.is-open) { display: none; }
  .site-refresh .site-header > .auth-modal.is-open { display: block; }
  .site-refresh .site-header > .auth-modal .auth-backdrop { display: none; }
  .site-refresh .site-header .auth-card { width: 100%; max-width: none; max-height: calc(100dvh - max(10px, env(safe-area-inset-top, 0px)) - 105px - env(safe-area-inset-bottom, 0px)); padding: 24px 8px 16px; border: 0; border-radius: 0; background: none; box-shadow: none; overscroll-behavior-y: contain; transform: none; transition: none; }
  .site-refresh .site-header .auth-card h2 { font-size: 28px; }
  .site-refresh .site-header .auth-close { display: none; }
  .site-refresh .site-header .auth-note { font-size: 14px; }
  .site-refresh .site-header .auth-switch { margin-top: 20px; }
  .site-refresh .site-header .auth-form { margin-top: 20px; gap: 14px; }
  .site-refresh .mobile-account[aria-expanded="true"] { background: #70101a; border-color: #a12b35; }
}
