/* Shared page shell, background and navigation */
:root {
  --bg: #f2f0ed;
  --page: #f2f0ed;
  --paper: #f8f6f3;
  --panel: #f5f2ee;
  --ink: #111111;
  --muted: #4f4f4f;
  --line: rgba(17, 17, 17, 0.14);
  --soft: rgba(17, 17, 17, 0.04);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", sans-serif;
}

.page,
.page-shell,
.container-xl {
  width: min(100% - 24px, 1280px);
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
  padding-top: 28px;
  padding-bottom: 56px;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  min-height: 92px;
  padding: 0 0 10px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  margin: 0;
  font-size: clamp(2.8rem, 4.4vw, 8.2rem);
  line-height: 0.8;
  letter-spacing: -0.09em;
  font-weight: 300;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.4vw, 26px);
  flex-wrap: wrap;
  margin: 0;
  font-size: clamp(9px, 0.7vw, 11px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.nav a {
  color: inherit;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.panel-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.section-card-spaced {
  margin-top: 24px;
}

@media (max-width: 820px) {
  .page,
  .page-shell,
  .container-xl {
    width: min(100% - 24px, 680px);
  }

  .masthead {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
  }

  .nav {
    justify-content: flex-start;
    gap: 12px 18px;
  }
}

@media (max-width: 420px) {
  .page,
  .page-shell,
  .container-xl {
    width: min(100% - 16px, 380px);
  }

  .brand {
    font-size: clamp(2.5rem, 15vw, 4rem);
  }
}
