:root {
  --bg: #f6f2ea;
  --panel: #ffffff;
  --ink: #2d2a26;
  --muted: #5f5b55;
  --accent: #b0542d;
  --accent-dark: #8c3f23;
  --border: #e4ded3;
  --shadow: 0 10px 30px rgba(45, 42, 38, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #fbf8f2 0%, var(--bg) 60%, #efe8dc 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--accent-dark);
  text-decoration: none;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--accent);
}

main {
  flex: 1;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 20px 60px;
}

.hero {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
  margin-bottom: 40px;
  animation: fadeUp 0.6s ease-out;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--shadow);
}

h1 {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 12px;
}

h2 {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  margin-top: 0;
  font-size: 1.4rem;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.input-group {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

#error {
  color: #a1281e;
  font-weight: 600;
  margin: 0;
}

label {
  font-weight: 600;
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 1rem;
  font-family: inherit;
}

button {
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

button:hover,
button:focus {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.results {
  display: grid;
  gap: 14px;
}

.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: #faf7f2;
  border: 1px solid var(--border);
  font-weight: 600;
}

.result-item span {
  color: var(--accent-dark);
}

.disclaimer {
  margin-top: 24px;
  border-left: 4px solid var(--accent);
  padding-left: 16px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 18px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .result-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
