/* Shared chrome for dark static islands — load AFTER island app.css (?v=3) */
html {
  overflow-x: clip;
}

body {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Site chrome tokens: do not inherit island blue --accent */
body > header.site-header,
body > footer.footer {
  --accent: #3ee08f;
  --accent-dim: #1f5540;
  --text: #f2f6fb;
  --muted: #a8b8cc;
  --line: #3d4f68;
  --header-bg: rgba(21, 30, 48, 0.94);
}

body > header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

body > header.site-header .wrap {
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  min-height: 3.5rem;
  padding: 0.35rem 0;
  flex-wrap: wrap;
}

body > header.site-header .brand {
  color: var(--text) !important;
  text-decoration: none;
}

body > header.site-header .brand span {
  color: var(--accent) !important;
}

body > header.site-header nav.primary a,
body > header.site-header nav.primary .nav-drop > summary.nav-drop-label {
  color: var(--muted) !important;
  font-size: 0.92rem;
  text-decoration: none !important;
}

body > header.site-header nav.primary a:hover,
body > header.site-header nav.primary .nav-drop > summary.nav-drop-label:hover {
  color: var(--text) !important;
  text-decoration: none !important;
}

body > header.site-header nav.primary a.guide-nav {
  font-weight: 600;
}

body > header.site-header nav.primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  max-width: 100%;
}

/* Content uses site wrap width — responsive, not pinned narrow on desktop */
.island-hero,
main#main,
body > footer.site-footer,
body > .site-footer {
  width: min(1120px, calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.island-hero {
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
}

main#main {
  padding-bottom: 1rem;
}

/* Island a{color:accent} is blue — match muted header links instead */
.island-hero a,
main#main a,
body > footer.site-footer a,
body > .site-footer a {
  color: var(--muted, #a8b8cc) !important;
  text-decoration: none;
}
.island-hero a:hover,
main#main a:hover,
body > footer.site-footer a:hover,
body > .site-footer a:hover {
  color: var(--text, #f2f6fb) !important;
  text-decoration: underline;
}

body > footer.footer {
  width: 100%;
  margin: 2rem 0 0;
  padding: 1.25rem 0 2rem;
  border-top: 1px solid var(--line);
}

body > footer.footer .wrap {
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto;
}

body > footer.footer a {
  color: var(--muted) !important;
  text-decoration: none;
}

body > footer.footer a:hover {
  color: var(--text) !important;
}

@media (max-width: 1024px) {
  body > header.site-header .wrap {
    align-items: flex-start;
  }
  body > header.site-header nav.primary {
    flex: 1 1 100%;
  }
}

@media (max-width: 640px) {
  body > header.site-header .brand {
    font-size: 0.95rem;
  }
  body > header.site-header nav.primary a,
  body > header.site-header nav.primary .nav-drop > summary.nav-drop-label {
    min-height: 2.75rem;
    padding: 0.5rem 0.7rem;
    display: inline-flex;
    align-items: center;
  }
  .island-hero,
  main#main,
  body > footer.site-footer,
  body > .site-footer {
    width: min(1120px, calc(100% - 1.25rem));
  }
}

/* sitewalk 2026-09-26: island sidebars (aside.facts) sit outside main#main — keep links muted */
aside.facts a,
body > aside a {
  color: var(--muted, #a8b8cc) !important;
  text-decoration: none;
}
aside.facts a:hover,
body > aside a:hover {
  color: var(--text, #f2f6fb) !important;
  text-decoration: underline;
}

/* sitewalk2 2026-09-27: island disclaimer = one small muted line just above the shared footer */
body > .site-footer.island-disclaimer {
  margin-top: 2rem;
  margin-bottom: 0;
  padding-top: 0;
  border-top: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted, #a8b8cc);
}
body > .site-footer.island-disclaimer p { margin: 0; }
body > .site-footer.island-disclaimer + footer.footer { margin-top: 0.75rem; }

/* sitewalk2 2026-09-27: the muted main#main link rule above also greyed .btn text — restore app.css button colors */
main#main a.btn { color: #062016 !important; text-decoration: none !important; }
main#main a.btn.ghost { color: var(--text, #f2f6fb) !important; }
main#main a.btn.amber { color: #231800 !important; }

/* sitewalk2 2026-09-27: island app.css ".primary" (button style) also matched nav.primary and painted the header nav green */
body > header.site-header nav.primary {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  color: inherit !important;
  font-weight: inherit !important;
  cursor: auto !important;
}
