* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --universe-purple: #8d7ba8;
  --text-dark-purple: #3b2f4d;
  --accent-deep-purple: #1b0e36;
}

body, html {
  width: 100%;
  min-height: 100%;
  overflow-x: auto;   /* Allows horizontal scroll if viewport is narrower than min width */
  overflow-y: scroll; /* Always show vertical scrollbar to prevent layout shift */
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--text-dark-purple);
  line-height: 1.5;
}

.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-top: var(--grid-top, 120px);
  padding-bottom: var(--grid-bottom, 24px);
}

/* Vertical stack of grid-snapped sections separated by 2 big pixels + grid lines */
.grid-stack {
  width: var(--shell-width, 1198px);
  margin-left: var(--shell-left, auto);
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap, 14px);
}

/* 1. Navigation bar: grid-snapped height */
.box-nav {
  height: var(--nav-height, 34px);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
  gap: var(--btn-gap, 14px);
}

/* Borderless grid-snapped navigation buttons */
.retro-btn {
  width: var(--btn-width, 154px);
  flex: 0 0 var(--btn-width, 154px);
  height: 100%;
  background-color: var(--surface-bg, rgba(232, 232, 232, 0.94));
  backdrop-filter: blur(4px);
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark-purple);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.retro-btn:hover,
.retro-btn.active {
  background-color: rgba(255, 255, 255, 0.96);
  color: var(--universe-purple);
}

/* Push Login button to the far right edge of the grid shell */
.retro-btn-right {
  margin-left: auto;
}

/* 2. /* 2. Main content surface framed purely by the background grid */
.box-main {
  width: 100%;
  padding: 28px 32px;
  background-color: var(--surface-bg, rgba(232, 232, 232, 0.94));
  backdrop-filter: blur(4px);
  border: none;
  font-size: 16px;
  line-height: 1.6;
}

/* Headings in Universe Purple (#8d7ba8) */
.box-main h1,
.box-main h2,
.box-main h3 {
  color: var(--universe-purple);
  letter-spacing: -0.01em;
}

.box-main h1 {
  font-size: 30px;
  margin-bottom: 16px;
}

.box-main p {
  margin-bottom: 14px;
  max-width: 65ch;
}

.box-main p:last-child {
  margin-bottom: 0;
}

.inline-link {
  color: var(--universe-purple);
  font-weight: 600;
  text-decoration: none;
}

.inline-link:hover {
  color: var(--text-dark-purple);
  text-decoration: underline;
}


/* 3. Standalone footer container matching main surface color */
.box-footer {
  width: 100%;
  padding: 14px 20px;
  background-color: var(--surface-bg, rgba(232, 232, 232, 0.94));
  backdrop-filter: blur(4px);
  border: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
}

.footer-links {
  text-align: center;
}

.footer-links a {
  color: var(--universe-purple);
  text-decoration: none;
  font-weight: 600;
  margin: 0 6px;
}

.footer-links a::before {
  content: "(";
  font-weight: 400;
  opacity: 0.7;
}

.footer-links a::after {
  content: ")";
  font-weight: 400;
  opacity: 0.7;
}

.footer-links a:hover {
  text-decoration: underline;
  color: var(--text-dark-purple);
}

.footer-copy {
  color: var(--universe-purple);
  font-size: 13px;
}
