:root {
  --ink: #111315;
  --muted: #6f7479;
  --line: #e8eaec;
  --surface: #f5f6f7;
  --white: #fff;
  --green: #17864b;
  --green-soft: #edf7f1;
  --amber: #bd7800;
  --amber-soft: #fff6df;
  --red: #ba3535;
  --red-soft: #fff0f0;
  --radius: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  background: #eef0ef;
  color: var(--ink);
  font-family: "DM Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(17, 19, 21, .16);
  outline-offset: 2px;
}
button:disabled { cursor: not-allowed; opacity: .6; }
[hidden] { display: none !important; }
a { color: inherit; }

.site-shell {
  min-height: 100vh;
  max-width: 1680px;
  margin: 0 auto;
  background: #f7f8f7;
}
.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid #e8ece9;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: #202a25;
  color: white;
  font-size: 19px;
}
.brand strong { display: block; font: 800 16px Manrope, sans-serif; letter-spacing: -.3px; }
.brand small { display: block; margin-top: 3px; color: #777f7a; font-size: 8px; font-weight: 700; letter-spacing: 1.15px; }
.primary-nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}
.primary-nav a {
  padding: 10px 12px;
  border-radius: 9px;
  color: #59615c;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { background: #edf5ef; color: #27623f; }
.site-logout { flex: 0 0 auto; }
.page-content { width: min(100%, 1400px); margin: 0 auto; padding: 34px clamp(18px, 4vw, 64px) 56px; }
.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}
.page-heading h1 { margin: 2px 0 7px; font: 750 clamp(25px, 3vw, 32px) Manrope, sans-serif; letter-spacing: -.7px; }
.page-heading p { margin: 0; }
.eyebrow { color: #77817a; font-size: 10px; font-weight: 850; letter-spacing: 1.15px; }
.muted { color: var(--muted); }
.back-link, .text-link { color: #24352b; font-size: 13px; font-weight: 750; text-decoration: none; }
.back-link:hover, .text-link:hover { text-decoration: underline; }
.content-section { margin-top: 30px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.section-heading h2 { margin: 3px 0 0; font: 750 21px Manrope, sans-serif; letter-spacing: -.35px; }
.section-heading .eyebrow { margin: 0; }
.entry-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: white; text-align: center; }
.entry-page main { width: min(100%, 400px); }
.entry-page h1 { font-family: Manrope, sans-serif; }

@media (max-width: 900px) {
  .site-header { flex-wrap: wrap; gap: 8px 16px; padding: 12px 20px; }
  .primary-nav { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .primary-nav::-webkit-scrollbar { display: none; }
  .primary-nav a { padding: 9px 10px; }
  .site-logout { margin-left: auto; }
  .page-content { padding-top: 25px; }
}
@media (max-width: 520px) {
  .site-header { min-height: 64px; padding: 9px 15px; }
  .brand__mark { width: 34px; height: 34px; }
  .primary-nav { gap: 1px; margin: 2px -5px 0; }
  .primary-nav a { font-size: 12px; }
  .page-content { padding: 21px 16px calc(38px + var(--safe-bottom)); }
  .page-heading { align-items: start; flex-direction: column; margin-bottom: 20px; }
  .page-heading > .button { width: 100%; }
}
