/* Shared content width aligned with the homepage layout.
   Width-only normalization: existing page content, data, and functionality remain unchanged. */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: clip; }

/* Standard public content pages */
main.container {
  width: min(1440px, calc(100% - 32px));
  max-width: 1440px;
  margin: 22px auto;
}

/* Profile/about pages use the same outer width as index.html */
.about-shell {
  width: min(1440px, calc(100% - 32px));
  max-width: 1440px;
  margin: 22px auto;
}

/* The homepage already defines its own matching 1440px shell. */
.home-page .home-shell {
  width: min(1440px, calc(100% - 32px));
  max-width: 1440px;
}

@media (max-width: 760px) {
  main.container,
  .about-shell,
  .home-page .home-shell {
    width: calc(100% - 22px);
    margin: 10px auto;
  }
}


/* Shared page frame: match every public page to index.html */
body:not(.home-page) {
  min-height: 100vh;
  background: linear-gradient(180deg,#eef7ff 0%,#f8fbff 45%,#edf6ff 100%);
  color: #102f59;
}

/* Homepage reference shell dimensions and appearance */
main.container:not(.home-shell),
.about-shell {
  width: min(1440px, calc(100% - 32px));
  max-width: 1440px;
  margin: 22px auto;
  padding: 0 22px 24px;
  overflow: hidden;
  border: 0;
  border-top: 0;
  border-radius: 20px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 12px 40px rgba(16,64,112,.10);
}

/* Keep the shared brand header aligned inside the common white frame */
main.container:not(.home-shell) > .site-brand-header,
.about-shell > .site-brand-header {
  margin: 0;
}

/* Match homepage spacing on all public page shells */
@media (max-width: 680px) {
  main.container:not(.home-shell),
  .about-shell {
    width: calc(100% - 14px);
    margin: 8px auto;
    padding: 0 12px 16px;
    border-radius: 12px;
  }
}

/* Preserve print layouts for directory/preview pages */
@media print {
  main.container:not(.home-shell),
  .about-shell {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
}
