/* Shared layout for Help, All challenges, Manage challenge sets */

/* Pinned header + footer; main scrolls full viewport width (scrollbar at window edge) */
html.page-site-root,
body.page-site {
  height: 100%;
  margin: 0;
}

html.page-site-root {
  overflow: hidden;
}

body.page-site {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100vh;
  overflow: hidden;
}

body.page-site .static-page-header {
  flex-shrink: 0;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 26px 18px 16px;
  box-sizing: border-box;
  background: #121218;
  border-bottom: 1px solid rgba(243, 206, 19, 0.22);
}

body[data-static-page] main {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 20px;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

body[data-static-page] main > * {
  max-width: 1100px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 18px;
  padding-right: 18px;
  box-sizing: border-box;
}

.static-page-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 0;
  padding-bottom: 16px;
}

.static-page-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.static-page-header .site-header-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
  text-decoration: none;
  flex-shrink: 0;
  max-width: min(14rem, 42vw);
}

.static-page-header .site-header-brand:hover .site-header-brand-name {
  text-decoration: underline;
}

.static-page-header .site-header-brand-name {
  font-weight: 700;
  color: var(--accent, #f3ce13);
  font-size: 1rem;
  white-space: nowrap;
}

.static-page-header .site-header-brand-tagline {
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.static-page-heading {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent, #f3ce13);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.static-page-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
  justify-content: flex-end;
}

.static-page-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 7px;
  border-radius: 8px;
  border: 1px solid rgba(243, 206, 19, 0.5);
  background: rgba(0, 0, 0, 0.4);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--accent, #f3ce13);
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}

.static-page-nav__btn:hover {
  text-decoration: none;
  background: rgba(243, 206, 19, 0.12);
}

.static-page-nav__btn.is-current {
  border-color: rgba(243, 206, 19, 0.85);
  background: rgba(243, 206, 19, 0.15);
  pointer-events: none;
}

.static-page-subtitle {
  margin: 0;
  width: 100%;
  max-width: none;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
  line-height: 1.45;
}

.static-page-footer {
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid rgba(243, 206, 19, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
}

.static-page-footer__links {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
}

.static-page-footer__links a {
  color: var(--accent, #f3ce13);
  text-decoration: none;
}

.static-page-footer__links a:hover {
  text-decoration: underline;
}

.static-page-tools-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 4px;
  padding: 0;
}

.static-page-tools-nav__btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(243, 206, 19, 0.38);
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.74rem;
  font-weight: 700;
  color: rgba(243, 206, 19, 0.95);
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}

.static-page-tools-nav__btn:hover {
  background: rgba(243, 206, 19, 0.1);
  text-decoration: none;
}

.static-page-tools-nav__btn.is-current {
  border-color: rgba(243, 206, 19, 0.85);
  background: rgba(243, 206, 19, 0.14);
  pointer-events: none;
}
