:root {
  --shell-width: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink, #2f0d0d);
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.6;
}

.container {
  width: min(var(--shell-width), calc(100% - 2rem));
  margin: 0 auto;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line, #e8c0c0);
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg, #fdf1f1) 84%, #ffe8e8 16%);
}

.nav-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink, #2f0d0d);
  text-transform: uppercase;
  line-height: 1;
}

.brandmark-chip {
  width: 1.75rem;
  height: 1.75rem;
  border: 2px solid var(--accent-c, #7f1d1d);
  border-radius: 0.42rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--paper, #fff8f8) 82%, #ffe3e3 18%);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brandmark-word {
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--accent-c, #7f1d1d);
  text-wrap: nowrap;
}

.nav-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.nav-links li {
  display: inline-flex;
  align-items: center;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink, #2f0d0d);
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid var(--line, #e8c0c0);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: color-mix(in srgb, var(--paper, #fff8f8) 85%, #ffdede 15%);
  transition: border-color 160ms ease, color 160ms ease;
}

.nav-links a:hover {
  border-color: var(--accent-a, #ef4444);
  color: var(--accent-b, #b91c1c);
}

.nav-auth-slot {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.nav-user-chip {
  display: inline-flex;
  align-items: center;
  border: 1px dashed var(--accent-a, #ef4444);
  background: #fff3f3;
  color: var(--accent-c, #7f1d1d);
  border-radius: 999px;
  padding: 0.36rem 0.68rem;
  font-size: 0.77rem;
  font-weight: 700;
  line-height: 1;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line, #e8c0c0);
  padding: 1rem 0 2rem;
  color: var(--muted, #7b4545);
  font-size: 0.9rem;
  background: color-mix(in srgb, var(--paper, #fff8f8) 86%, #ffe9e9 14%);
}

.footer .container {
  display: grid;
  gap: 0.3rem;
  justify-items: center;
  text-align: center;
}

.footer p {
  max-width: none;
}

.footer a {
  color: var(--accent-b, #b91c1c);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 680px) {
  .container {
    width: min(var(--shell-width), calc(100% - 1.2rem));
  }

  .nav-row {
    min-height: auto;
    padding: 0.7rem 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .nav-links {
    width: 100%;
    gap: 0.5rem;
  }

  .nav-links a {
    min-height: 44px;
    padding: 0.62rem 0.92rem;
  }
}
