:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --text: #1c2430;
  --muted: #5d6b7b;
  --primary: #1565c0;
  --primary-dark: #0d47a1;
  --border: #d8e0ea;
  --success: #1b8a5a;
}

* { 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.6;
}

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

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

.site-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  padding: 1rem 0 2rem;
}

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

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
}

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

.nav a { color: white; opacity: 0.95; }

.hero {
  padding: 2rem 0 0;
}

.hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 1rem; }
.hero p { max-width: 800px; margin: 0 0 1rem; font-size: 1.05rem; }

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

.button {
  display: inline-block;
  background: white;
  color: var(--primary-dark);
  border: 1px solid white;
  padding: 0.8rem 1.1rem;
  border-radius: 10px;
  font-weight: 700;
}

.button.secondary {
  background: transparent;
  color: white;
}

main { padding: 2rem 0 4rem; }

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 10px 24px rgba(20, 40, 70, 0.05);
}

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

.section { margin: 2rem 0; }
.section h2 { margin-bottom: 0.75rem; }
.lead { color: var(--muted); max-width: 850px; }

.calculator-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
  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.4rem;
}

input {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 1rem;
}

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

button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

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

.result-box {
  background: #f8fbff;
  border: 1px solid #cfe1f7;
  border-radius: 16px;
  padding: 1.25rem;
}

.result-label {
  color: var(--muted);
  font-size: 0.95rem;
}

.result-value {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0.35rem 0 0.75rem;
}

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

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 2rem 0;
  color: var(--muted);
}

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

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

.table-row {
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border-radius: 10px;
}

.notice {
  padding: 1rem;
  border-left: 4px solid var(--primary);
  background: #edf5ff;
  border-radius: 10px;
}

@media (max-width: 820px) {
  .calculator-layout { grid-template-columns: 1fr; }
}
