:root {
  color-scheme: light;
  --bg: #f3f1ec;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(31, 41, 55, 0.09);
  --line-strong: rgba(31, 41, 55, 0.16);
  --text: #1d2430;
  --text-muted: #596273;
  --text-soft: #747d8b;
  --accent: #5f6b7a;
  --accent-soft: rgba(95, 107, 122, 0.09);
  --navy: #202734;
  --shadow: 0 14px 38px rgba(19, 27, 39, 0.08);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --content-width: min(860px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  color: var(--text);
  background: var(--bg);
}

.page {
  position: relative;
  min-height: 100vh;
  padding: 32px 16px 56px;
}

.shell {
  position: relative;
  z-index: 1;
  width: var(--content-width);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 22px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: "SF Pro Text", "Segoe UI", "Helvetica Neue", sans-serif;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    background-color 220ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.cta:hover,
.cta:focus-visible {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
}

.nav-link[aria-current="page"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #f6fbff;
}

.hero {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: "SF Pro Text", "Segoe UI", "Helvetica Neue", sans-serif;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.52;
}

.hero h1 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--navy);
  font-weight: 700;
}

.hero p {
  margin: 16px 0 0;
  max-width: 62ch;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #4e5867;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: "SF Pro Text", "Segoe UI", "Helvetica Neue", sans-serif;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: "SF Pro Text", "Segoe UI", "Helvetica Neue", sans-serif;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    background-color 220ms ease;
}

.document {
  display: grid;
  gap: 18px;
  margin-top: 24px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.section {
  display: grid;
  gap: 12px;
}

.section h2 {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: var(--navy);
  font-weight: 700;
}

.section p,
.section li,
.not-found-copy {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.76;
  color: var(--text-muted);
}

.section ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.footer {
  margin-top: 20px;
  padding: 16px 4px 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-family: "SF Pro Text", "Segoe UI", "Helvetica Neue", sans-serif;
}

.not-found {
  display: grid;
  gap: 22px;
  width: min(700px, calc(100vw - 32px));
  margin: 10vh auto 0;
  padding: clamp(26px, 5vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.not-found h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--navy);
}

.not-found-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .nav-link,
  .cta {
    transition: none;
  }
}

@media (max-width: 720px) {
  .page {
    padding-top: 18px;
    padding-bottom: 36px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 18px;
  }

  .hero h1 {
    max-width: none;
  }

  .document {
    gap: 16px;
  }
}
