/* Foundation tokens, body, topbar and base layout. */
:root {
  --cream: #f7f2e8;
  --paper: rgba(255, 252, 246, 0.9);
  --ink: #18302d;
  --muted: #55726e;
  --accent: #dc6b42;
  --accent-2: #8ea44f;
  --line: rgba(24, 48, 45, 0.12);
  --danger: #b24c40;
  --shadow: 0 16px 44px rgba(24, 48, 45, 0.11);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(220, 107, 66, 0.22), transparent 28%),
    radial-gradient(circle at left bottom, rgba(142, 164, 79, 0.24), transparent 30%),
    linear-gradient(180deg, #fffdf8 0%, var(--cream) 100%);
  min-height: 100vh;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

code,
pre {
  font-family: "SF Mono", "Menlo", monospace;
}

.page-shell {
  width: min(1540px, calc(100% - 24px));
  margin: 0 auto;
  padding: 12px 0 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 0 16px;
  flex-wrap: wrap;
}

.brand {
  font-family: "Georgia", serif;
  font-size: 1.26rem;
  font-weight: 700;
  text-decoration: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}

.nav-link-active {
  background: rgba(24, 48, 45, 0.09);
  color: var(--ink);
}

.topbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  align-items: center;
}

.topbar-logout-form {
  margin: 0;
}

.topbar-logout-button {
  padding: 8px 12px;
  font-size: 0.86rem;
}

.topbar-login-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.auth-shell {
  min-height: calc(100vh - 40px);
  display: grid;
  place-items: center;
  padding: 24px 0 40px;
}

.auth-card {
  width: min(520px, 100%);
  display: grid;
  gap: 18px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-copy,
.auth-actions {
  display: grid;
  gap: 10px;
}

.auth-copy h1 {
  margin: 0;
  font-family: "Georgia", serif;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.auth-form {
  gap: 12px;
}
