.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 104px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 12px 28px;
  background: #031526;
  border-bottom: 1px solid var(--line);
  transition: min-height 160ms ease, padding 160ms ease;
}

.site-header.compact {
  position: fixed;
  min-height: 72px;
  padding: 14px 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.brand img {
  width: 76px;
  height: 76px;
  border-radius: 0;
  object-fit: contain;
  transition: width 160ms ease, height 160ms ease;
}

.site-header.compact .brand img {
  width: 38px;
  height: 38px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  color: var(--muted);
  font-weight: 650;
}

.site-nav a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-button {
  min-width: 44px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 46px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid var(--line);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
}

.rule-grid,
.being-grid,
.chronicle-flow,
.vision-list,
.note-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.rule-grid article,
.being-grid article,
.chronicle-flow article,
.vision-list article,
.note-list article,
.principle-box {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 8px;
  padding: 22px;
}

.being-grid {
  grid-template-columns: repeat(5, 1fr);
}

.being-dot {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-bottom: 16px;
}

.vera { background: #ff6868; }
.tomas { background: #89a7ff; }
.lia { background: #2bc7bd; }
.bruno { background: #b28cff; }
.hector { background: var(--yellow); }

.note-list time {
  color: var(--yellow);
  font-size: 0.85rem;
  font-weight: 800;
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px 14px;
    min-height: 92px;
  }

  .site-header .brand img {
    width: 60px;
    height: 60px;
  }

  .site-header.compact {
    min-height: 72px;
    padding: 10px 14px;
  }

  .site-header.compact .brand img {
    width: 38px;
    height: 38px;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 14px;
    overflow-x: auto;
  }

  .rule-grid,
  .being-grid,
  .chronicle-flow,
  .vision-list,
  .note-list {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}
