:root {
  --bg: #f5f2ea;
  --surface: #fffdf9;
  --surface-2: #f0ede4;
  --surface-3: rgba(255, 253, 249, 0.78);
  --text: #2b312d;
  --muted: #5f685f;
  --primary: #4d6a57;
  --primary-dark: #30473b;
  --primary-soft: #dce5dc;
  --accent: #a98d63;
  --border: #d6dbd0;
  --shadow: 0 18px 45px rgba(37, 47, 40, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

img { max-width: 100%; display: block; }

a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: relative;
  color: white;
  padding: 1.1rem 0 4.5rem;
  background:
    linear-gradient(rgba(31, 45, 37, 0.58), rgba(31, 45, 37, 0.7)),
    linear-gradient(135deg, rgba(48, 71, 59, 0.95), rgba(77, 106, 87, 0.82)),
    url('https://images.unsplash.com/photo-1568605114967-8130f3a36994?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: white;
  font-weight: 700;
}

.brand-logo {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.brand-tag {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.82;
}

.nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav a {
  color: rgba(255,255,255,0.95);
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
}

.nav a:hover {
  text-decoration: none;
  background: rgba(255,255,255,0.1);
}

.hero {
  padding: 4rem 0 0;
  max-width: 760px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: #f3ede3;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.section h2,
.card h2,
.card h3 {
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: -0.02em;
}

.hero h1 {
  font-size: clamp(2.7rem, 5vw, 4.7rem);
  line-height: 1.04;
  margin: 0 0 1rem;
}

.hero p {
  max-width: 740px;
  margin: 0 0 1rem;
  font-size: 1.08rem;
  color: rgba(249, 246, 239, 0.9);
}

.hero-subtitle {
  font-size: 1.18rem;
  color: #f4ede2;
  margin-bottom: 1rem;
}

.hero-panel {
  margin-top: 2rem;
  display: inline-block;
  padding: 1rem 1.15rem;
  background: rgba(255,253,249,0.12);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 18px;
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.button {
  display: inline-block;
  background: var(--surface);
  color: var(--primary-dark);
  border: 1px solid rgba(255,255,255,0.6);
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.button:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.button.secondary {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.35);
}

main { padding: 2.5rem 0 5rem; }

.page-shell {
  margin-top: -2.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(89, 102, 91, 0.12);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h2, .card h3 { margin-top: 0; }
.card p { color: var(--muted); }

.feature-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,244,236,0.95));
}

.section { margin: 2rem 0; }
.section h2 { margin-bottom: 0.75rem; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.lead { color: var(--muted); max-width: 850px; font-size: 1.04rem; }

.page-hero {
  background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(255,253,249,0.92));
  border: 1px solid rgba(89, 102, 91, 0.12);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 2.25rem;
  margin-top: -2.5rem;
}

.page-hero p { color: var(--muted); margin-bottom: 0; }

.calculator-layout {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 1.35rem;
  align-items: start;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: var(--primary-dark);
}

input {
  width: 100%;
  padding: 0.92rem 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: #fffefb;
  color: var(--text);
}

input:focus {
  outline: 2px solid rgba(77, 106, 87, 0.18);
  border-color: var(--primary);
}

.actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.86rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(48, 71, 59, 0.18);
}

button.secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.result-box {
  background: linear-gradient(180deg, #fffefc, #f8f4ec);
  border: 1px solid rgba(89, 102, 91, 0.12);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 1rem;
}

.result-label {
  color: var(--muted);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-value {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0.45rem 0 0.95rem;
  font-family: Georgia, 'Times New Roman', serif;
}

.small-note, .muted { color: var(--muted); }

ul.checklist {
  padding-left: 1.2rem;
}

ul.checklist li { margin-bottom: 0.55rem; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.stat {
  background: var(--surface);
  border: 1px solid rgba(89, 102, 91, 0.1);
  border-radius: 20px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.stat-label {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stat-value {
  margin-top: 0.35rem;
  font-size: 1.7rem;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--primary-dark);
}

.site-footer {
  border-top: 1px solid rgba(89, 102, 91, 0.12);
  background: rgba(255,253,249,0.88);
  padding: 2rem 0;
  color: var(--muted);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.table-like {
  display: grid;
  gap: 0.75rem;
}

.table-row {
  padding: 0.95rem 1rem;
  background: rgba(77, 106, 87, 0.06);
  border: 1px solid rgba(77, 106, 87, 0.08);
  border-radius: 14px;
}

.notice {
  padding: 1.1rem;
  border-left: 4px solid var(--accent);
  background: #f7f1e7;
  border-radius: 14px;
}

.article-layout {
  max-width: 860px;
}

@media (max-width: 900px) {
  .calculator-layout { grid-template-columns: 1fr; }
  .hero { padding-top: 3rem; }
  .result-box { position: static; }
}

@media (max-width: 640px) {
  .topbar { flex-direction: column; align-items: flex-start; }
  .nav { gap: 0.45rem; }
  .nav a { padding: 0.35rem 0.55rem; font-size: 0.92rem; }
  .brand-copy { display: none; }
  .brand-logo { width: 60px; height: 60px; }
  .page-hero { padding: 1.5rem; }
  .hero h1 { font-size: 2.35rem; }
  .site-footer .container { flex-direction: column; }
}
