:root {
  --bg-start: #f8f4ea;
  --bg-end: #e9f3ff;
  --surface: #ffffffd6;
  --surface-border: #c8d5e7;
  --ink: #132136;
  --muted: #4c607a;
  --brand: #130e4b;
  --brand-strong: #1f0539;
  --accent: #0637d9;
  --shadow: 0 20px 45px rgba(18, 38, 63, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  margin: 0;
  min-height: 100vh;
  line-height: 1.5;
  color: var(--ink);
  padding: 24px clamp(16px, 4vw, 42px) 48px;
}

body > * {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

nav a {
  margin-right: 0;
  color: #f8fafc;
  text-decoration: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

nav a:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(137, 159, 255, 0.32);
  filter: saturate(1.06);
}

hr {
  border: 0;
  height: 1px;
  margin: 18px auto 24px;
  max-width: 980px;
  background: linear-gradient(to right, #0000, #9cb4cf, #0000);
}

h1,
h2 {
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: clamp(1.9rem, 2.9vw, 2.7rem);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

h2 {
  margin-top: 1.5rem;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
}

p {
  color: var(--muted);
}

main,
body > :not(nav):not(hr) {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(3px);
  padding: clamp(16px, 3vw, 28px);
}

a {
  color: var(--brand-strong);
  text-underline-offset: 0.16em;
}

form {
  margin: 16px auto;
  padding: 18px;
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  background: #ffffffcc;
  width: 100%;
  max-width: 980px;
}

input,
textarea,
select,
button {
  display: block;
  margin: 6px 0 14px;
  min-width: 260px;
  width: min(100%, 560px);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #b7c7db;
  font: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #7422c566;
}

button {
  cursor: pointer;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #1f0539);
  width: fit-content;
}

button:hover {
  filter: brightness(0.96);
}

ul {
  padding-left: 20px;
}

li {
  margin-bottom: 6px;
}

.row {
  margin-bottom: 10px;
}

@media (max-width: 640px) {
  body {
    padding: 14px 12px 28px;
  }

  nav a {
    flex: 1 1 calc(50% - 10px);
    text-align: center;
    padding-left: 10px;
    padding-right: 10px;
  }
}
