:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f0f5ff;
  --text: #172033;
  --muted: #5f6c82;
  --line: #dce3ef;
  --brand: #2557d6;
  --brand-dark: #173a97;
  --accent: #0f8a6c;
  --danger: #b42318;
  --shadow: 0 14px 40px rgba(20, 39, 82, .08);
  --radius: 18px;
  --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
.container { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(220,227,239,.9);
}
.nav { min-height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 850; letter-spacing: -.03em; font-size: 1.2rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--accent)); box-shadow: 0 8px 18px rgba(37,87,214,.18); }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: .95rem; font-weight: 650; }
.nav-links a { color: var(--text); }
.nav-links a:hover { color: var(--brand); text-decoration: none; }
.hero { padding: 76px 0 54px; background: radial-gradient(circle at 80% 20%, #e5edff 0, transparent 28%), linear-gradient(#fff, #f7f9fc); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-dark); background: #eaf0ff; border: 1px solid #d8e4ff; border-radius: 999px; padding: 7px 11px; font-size: .8rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
h1 { margin: 16px 0 18px; font-size: clamp(2.3rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -.055em; max-width: 900px; }
.hero p { font-size: clamp(1.04rem, 2.4vw, 1.25rem); color: var(--muted); max-width: 720px; margin: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 10px 17px; border-radius: 12px; border: 1px solid transparent; font-weight: 800; cursor: pointer; font: inherit; }
.btn:hover { text-decoration: none; }
.btn-primary { color: #fff; background: var(--brand); box-shadow: 0 9px 20px rgba(37,87,214,.2); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { color: var(--text); background: #fff; border-color: var(--line); }
.section { padding: 54px 0; }
.section-tight { padding: 34px 0; }
.section-title { margin: 0 0 8px; font-size: clamp(1.65rem, 3vw, 2.35rem); letter-spacing: -.035em; }
.section-lead { color: var(--muted); margin: 0 0 28px; max-width: 760px; }
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tool-card { display: block; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-height: 178px; box-shadow: var(--shadow); transition: transform .16s ease, box-shadow .16s ease; }
.tool-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 18px 44px rgba(20,39,82,.12); }
.tool-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; background: var(--surface-soft); margin-bottom: 16px; }
.tool-card h3 { margin: 0 0 6px; font-size: 1.08rem; letter-spacing: -.02em; }
.tool-card p { color: var(--muted); margin: 0; font-size: .92rem; }
.category-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.category { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; color: var(--text); font-weight: 780; }
.category span { display:block; margin-top: 4px; color: var(--muted); font-size: .82rem; font-weight: 500; }
.category.disabled { opacity: .64; }
.ad-slot { display: none; min-height: 92px; border: 1px dashed #b9c4d7; border-radius: 14px; color: #7b879a; place-items: center; text-align: center; font-size: .78rem; background: rgba(255,255,255,.55); margin: 32px 0; }
.ads-enabled .ad-slot { display: grid; }
.trio-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.calculator-page { padding: 44px 0 64px; }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.page-title { font-size: clamp(2rem, 5vw, 3.45rem); margin: 0 0 10px; letter-spacing: -.045em; line-height: 1.07; }
.page-intro { color: var(--muted); font-size: 1.08rem; max-width: 760px; margin: 0; }
.calc-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 22px; align-items: start; margin-top: 30px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card h2, .card h3 { letter-spacing: -.025em; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.form-group { display: grid; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: .9rem; font-weight: 750; }
.input-wrap { display: flex; align-items: stretch; }
input, select { width: 100%; min-height: 46px; border: 1px solid #cbd5e4; border-radius: 11px; background: #fff; color: var(--text); padding: 10px 12px; font: inherit; outline: none; }
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,87,214,.12); }
.input-wrap input { border-radius: 11px 0 0 11px; }
.unit { min-width: 52px; display: grid; place-items: center; border: 1px solid #cbd5e4; border-left: 0; border-radius: 0 11px 11px 0; background: #f7f9fc; color: var(--muted); font-size: .88rem; }
.form-actions { margin-top: 18px; display: flex; gap: 10px; }
.result-card { position: sticky; top: 90px; }
.result-label { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; font-weight: 850; }
.result-main { font-size: clamp(2.05rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -.055em; font-weight: 900; margin: 10px 0; color: var(--brand-dark); }
.result-sub { color: var(--muted); margin: 0 0 18px; }
.result-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.result-list li { display:flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.result-list strong { text-align: right; }
.content-grid { display:grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items:start; margin-top: 34px; }
.article { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 34px); }
.article h2 { margin-top: 34px; margin-bottom: 10px; font-size: 1.5rem; letter-spacing: -.03em; }
.article h2:first-child { margin-top: 0; }
.article h3 { margin-top: 24px; margin-bottom: 8px; }
.article p, .article li { color: #445168; }
.article table { width:100%; border-collapse: collapse; margin: 18px 0; font-size:.93rem; }
.article th, .article td { padding: 11px 12px; border:1px solid var(--line); text-align:left; }
.article th { background:#f7f9fc; }
.sidebar .card { box-shadow:none; }
.related-list { list-style:none; padding:0; margin:0; }
.related-list li + li { border-top: 1px solid var(--line); }
.related-list a { display:block; padding:10px 0; font-weight:700; }
.notice { padding: 14px 16px; border-radius: 12px; background:#f7f9fc; border:1px solid var(--line); color:var(--muted); font-size:.9rem; }
.site-footer { border-top: 1px solid var(--line); background: #fff; margin-top: 36px; }
.footer-grid { display:grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 30px; padding: 46px 0 30px; }
.footer-title { font-weight: 850; margin-bottom: 9px; }
.footer-links { display:grid; gap: 8px; font-size:.92rem; }
.footer-links a { color:var(--muted); }
.copyright { border-top:1px solid var(--line); padding: 18px 0 28px; color:var(--muted); font-size:.84rem; }
.prose-page { width:min(calc(100% - 32px), 840px); margin:0 auto; padding:48px 0; }
.prose-page h1 { font-size:clamp(2rem,5vw,3.2rem); }
.prose-page h2 { margin-top:32px; }
.prose-page p, .prose-page li { color:#445168; }
.badge { font-size:.72rem; border-radius:999px; padding:4px 8px; background:#e9f6f1; color:#08644e; font-weight:800; }
@media (max-width: 900px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .trio-grid { grid-template-columns:1fr; }
  .category-strip { grid-template-columns: repeat(2, 1fr); }
  .calc-layout, .content-grid { grid-template-columns: 1fr; }
  .result-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav { min-height:62px; }
  .nav-links a:not(:last-child) { display:none; }
  .hero { padding:54px 0 40px; }
  .tool-grid, .form-grid, .category-strip { grid-template-columns: 1fr; }
  .tool-card { min-height:0; }
  .card { padding:18px; }
  .footer-grid { grid-template-columns:1fr; }
}
