:root {
  color-scheme: light;
  --bg: #f5f7f5;
  --panel: #ffffff;
  --ink: #121820;
  --muted: #5d6772;
  --line: #e1e6e2;
  --accent: #0b6b5e;
  --accent-dark: #085247;
  --accent-soft: #e6f2ef;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(18, 24, 32, 0.07);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button, input, select { font: inherit; }

.wrap { width: min(980px, calc(100% - 32px)); margin-inline: auto; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  z-index: 100;
}
.skip:focus { left: 10px; top: 10px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}
.brand-name em { font-style: normal; color: var(--accent); }

.nav { display: flex; gap: 18px; font-size: 0.9rem; color: var(--muted); }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--accent); }

main { padding: 32px 0 64px; }

.hero { padding: 18px 0 10px; }
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 4.4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.hero p { margin: 0; max-width: 62ch; color: var(--muted); }

.group { margin-top: 34px; }
.group h2 {
  margin: 0 0 14px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  text-decoration: none;
}
.card strong { font-size: 1.02rem; }
.card span { color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.card em { margin-top: auto; padding-top: 8px; color: var(--accent); font-style: normal; font-size: 0.85rem; font-weight: 600; }

.crumbs { font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}
.lede { margin: 0 0 22px; max-width: 68ch; color: var(--muted); }

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

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

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.field input, .field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field select:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-color: var(--accent);
}

.calc button, .button {
  display: inline-block;
  margin-top: 16px;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.calc button:hover, .button:hover { background: var(--accent-dark); text-decoration: none; }

.result {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
}
.result:empty { display: none; }
.result-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--accent) 20%, transparent);
  font-size: 0.92rem;
}
.result-row:last-child { border-bottom: 0; }
.result-row strong { text-align: right; }

.prose { margin-top: 34px; }
.prose h2, .related h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.prose p { margin: 0 0 12px; color: var(--muted); max-width: 70ch; }
.prose a { font-weight: 600; }

details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--panel);
}
details summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; }

.card-static { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }

.affiliate {
  margin-top: 34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--panel);
}
.affiliate-title { margin: 0 0 8px; font-weight: 700; }
.affiliate-link { font-weight: 600; }
.hint { color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.affiliate .hint { margin: 8px 0 0; }

.related { margin-top: 38px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.related-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
}
.related-card:hover { border-color: var(--accent); text-decoration: none; }
.related-card span { color: var(--muted); font-size: 0.82rem; }

.ad-wrap { margin: 28px 0; text-align: center; }
.ad-label { display: block; margin-bottom: 6px; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: var(--panel); }
.footer-inner { padding: 24px 0 30px; font-size: 0.84rem; color: var(--muted); }
.footer-inner p { margin: 0 0 6px; }
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--accent); }

.empty { padding: 60px 0; text-align: center; }
.empty p { color: var(--muted); }

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.cookie-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; max-width: 980px; margin: 0 auto; }
.cookie-inner p { margin: 0; max-width: 62ch; font-size: 0.85rem; color: var(--muted); }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-actions button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  cursor: pointer;
}
.cookie-actions button:last-child { background: transparent; color: var(--accent); }

@media (max-width: 600px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .calc-card { padding: 16px; }
  .result-row { flex-direction: column; gap: 2px; }
  .result-row strong { text-align: left; }
}
