/* -----------------------------
  Site Header
------------------------------ */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  width: var(--band-width, 90vw);
  max-width: var(--band-max, 1400px);
  margin: 0 auto;
  padding: 0.4rem 0 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.site-header-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 0.15rem;
}

.site-title {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.2;
}

.site-header-bar .home-btn.btn,
.site-header-bar .theme-btn.btn {
  border-radius: var(--radius-sm, 8px);
  white-space: nowrap;
}

.tagline {
  margin: 0.2rem 0 0.6rem;
  color: var(--muted);
  max-width: 68ch;
}

#site-header-host {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: var(--band-width, 90vw);
  max-width: var(--band-max, 1400px);
  margin: 0 auto;
}

#site-header-host > * {
  min-width: 0;
}

#site-header-host .header-actions,
#site-header-host .site-controls,
#site-header-host .header-right {
  margin-left: auto; 
  display: inline-flex;
  justify-content: flex-end; 
  align-items: center;

  gap: 8px;
  padding: 4px 0; 
  flex-wrap: wrap; 
}

#site-header-host .header-actions > a,
#site-header-host .header-actions > button,
#site-header-host .site-controls > a,
#site-header-host .site-controls > button,
#site-header-host .header-right > a,
#site-header-host .header-right > button {
  flex: 0 0 auto;
}

@media (max-width: 520px) {
  #site-header-host {
    flex-wrap: wrap;
    padding: 0.75rem 0.9rem; 
  }
  #site-header-host .header-actions,
  #site-header-host .site-controls,
  #site-header-host .header-right {
    width: 100%;
    justify-content: flex-end;
    row-gap: 8px;
    padding-top: 0.5rem;
  }
}

html body #site-header-host {
  /* padding: 0.75rem 0.9rem !important; */
  box-sizing: border-box;
}
/* -----------------------------
     Rules

------------------------------ */
.rules summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.rules-body {
  /* margin-top: 0.5rem; */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  box-shadow: var(--shadow-sm);
}
.rules-body ul {
  margin: 0.25rem 0 0.5rem;
}
.muted {
  color: var(--muted);
}

/* -----------------------------
     Site Footer

------------------------------ */
.site-footer {
  margin-top: 1rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--focus);
  text-decoration: underline;
}

.site-footer .container {
  width: var(--band-width);
  max-width: var(--band-max);
  margin: 0 auto;
  padding: 1.1rem 0 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
