:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #1d4ed8;
  --accent-dark: #1e40af;
  --accent-soft: #e8efff;
  --ok: #047857;
  --warn: #b45309;
  --err: #b91c1c;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -.01em;
}
.logo:hover { text-decoration: none; }
.logo svg { flex: none; }
.nav { display: flex; gap: 18px; font-size: 14px; }
.nav a { color: var(--muted); white-space: nowrap; }
.nav a:hover { color: var(--accent); text-decoration: none; }
@media (max-width: 860px) { .nav { display: none; } }

/* ---------- hero ---------- */
.hero { padding: 40px 0 6px; }
.hero h1 {
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.14;
  letter-spacing: -.02em;
  margin: 0 0 14px;
}
.hero p { color: var(--muted); font-size: 17px; max-width: 760px; margin: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* ---------- cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 28px 0;
}
.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: #c7d2fe;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
}
.card .icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}
.card h2, .card h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card .more { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--accent); }

/* ---------- calculator ---------- */
.calc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 26px 0;
}
.calc h2 { margin: 0 0 18px; font-size: 21px; letter-spacing: -.01em; }
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 720px) { .calc-grid { grid-template-columns: 1fr; } }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .15);
}
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.4; }

/* ---------- result ---------- */
.result {
  margin-top: 20px;
  background: linear-gradient(135deg, #0f2a6b, #1d4ed8);
  color: #fff;
  border-radius: 14px;
  padding: 22px;
  transition: background .2s;
}
.result .label { font-size: 13px; opacity: .78; margin: 0; }
.result .big {
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin: 2px 0 6px;
}
.result .rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.result .row {
  background: rgba(255, 255, 255, .11);
  border-radius: 10px;
  padding: 10px 12px;
}
.result .row span { display: block; font-size: 12px; opacity: .78; }
.result .row b { font-size: 16px; }
.result .note { font-size: 13px; opacity: .9; margin: 14px 0 0; }
.result.warn { background: linear-gradient(135deg, #7c2d12, #b45309); }
.result.empty { background: #eef2f7; color: var(--muted); }
.result.empty .big { display: none; }

/* ---------- ad ---------- */
.ad-slot {
  margin: 26px 0;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #94a3b8;
  font-size: 13px;
  background: #fff;
  text-align: center;
  padding: 16px;
}

/* ---------- article ---------- */
.article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin: 26px 0;
  box-shadow: var(--shadow);
}
.article h2 { margin: 0 0 12px; font-size: 22px; letter-spacing: -.01em; }
.article h3 { margin: 22px 0 8px; font-size: 17px; }
.article p, .article li { color: #334155; font-size: 15.5px; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin-bottom: 6px; }
.table-wrap { overflow-x: auto; margin: 14px 0 10px; }
.article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 420px;
}
.article th,
.article td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.article th {
  background: #f1f5f9;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #475569;
}
.article tbody tr:hover { background: #f8fafc; }

.article .note {
  background: #fff8eb;
  border-left: 4px solid #f59e0b;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: #7c4a03;
  margin: 18px 0 0;
}

/* ---------- faq ---------- */
.faq { margin: 26px 0; }
.faq h2 { font-size: 22px; margin: 0 0 14px; letter-spacing: -.01em; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { margin-bottom: 8px; }
.faq p { margin: 0; color: #475569; font-size: 14.5px; }

/* ---------- related ---------- */
.related { margin: 26px 0; }
.related h2 { font-size: 18px; margin: 0 0 12px; }
.related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.related a {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}
.related a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- crumbs ---------- */
.crumbs { font-size: 13px; color: var(--muted); margin: 20px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 6px; opacity: .6; }

/* ---------- footer ---------- */
.site-footer {
  background: #0b1220;
  color: #94a3b8;
  margin-top: 48px;
  padding: 32px 0;
  font-size: 13.5px;
}
.site-footer a { color: #cbd5e1; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer .brand { color: #e2e8f0; font-weight: 600; margin-bottom: 6px; }
.site-footer .brand .age-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 1px 6px;
  border: 1px solid #475569;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #e2e8f0;
  vertical-align: middle;
}
.site-footer .links { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 18px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .35);
  font-size: 13.5px;
  line-height: 1.5;
}
.cookie-banner p { margin: 0; }
.cookie-banner a { color: #93c5fd; }
.cookie-banner .actions { display: flex; gap: 8px; flex: none; }
.cookie-banner button {
  border: 0;
  border-radius: 9px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.cookie-banner .accept { background: #2563eb; color: #fff; }
.cookie-banner .accept:hover { background: #1d4ed8; }
.cookie-banner .reject { background: transparent; color: #e2e8f0; border: 1px solid #475569; }
.cookie-banner .reject:hover { background: #1e293b; }

@media (max-width: 640px) {
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-banner .actions { justify-content: flex-end; }
}

@media (max-width: 720px) {
  .hero { padding-top: 28px; }
  .calc, .article { padding: 20px; }
}
