:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #16a34a;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(30, 41, 59, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Prompt', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo { font-weight: 700; font-size: 1.15rem; color: var(--primary); text-decoration: none; }
.tabs { display: flex; gap: 8px; }
.tab {
  border: 1px solid var(--border); background: transparent;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 0.95rem; color: var(--muted);
  transition: all .15s;
}
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Hero */
.hero { text-align: center; padding: 28px 0 20px; }
.hero h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; }
.hero p { color: var(--muted); max-width: 620px; margin: 0 auto; font-size: 0.98rem; }

/* Cards */
.card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 22px; }

.calc-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 20px; }
@media (max-width: 720px) { .calc-wrap { grid-template-columns: 1fr; } .hero h1 { font-size: 1.35rem; } }

/* Form */
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 500; margin-bottom: 8px; font-size: 0.95rem; }
.field input[type="text"] {
  width: 100%; padding: 12px 14px; font-size: 1.15rem; font-weight: 600;
  border: 1px solid var(--border); border-radius: 10px; font-family: inherit;
  color: var(--text); background: #f8fafc;
}
.field input[type="text"]:focus { outline: none; border-color: var(--primary); background: #fff; }
.field input[type="range"] {
  width: 100%; margin-top: 12px; accent-color: var(--primary); cursor: pointer;
}
.btn-calc {
  width: 100%; padding: 14px; font-size: 1.1rem; font-weight: 600;
  background: var(--primary); color: #fff; border: none; border-radius: 10px;
  cursor: pointer; font-family: inherit; transition: background .15s;
}
.btn-calc:hover { background: var(--primary-dark); }

/* Result */
.result-card { display: flex; flex-direction: column; gap: 18px; }
.result-main {
  text-align: center; padding: 18px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
}
.result-label { display: block; font-size: 0.95rem; opacity: .9; }
.result-value { display: block; font-size: 2.1rem; font-weight: 700; margin-top: 4px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result-item { background: #f8fafc; border-radius: 10px; padding: 12px; }
.ri-label { display: block; font-size: 0.82rem; color: var(--muted); }
.ri-value { display: block; font-size: 1.1rem; font-weight: 600; margin-top: 2px; }

/* Ad slots */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  min-height: 90px; margin: 18px 0; border: 1px dashed #cbd5e1;
  border-radius: 12px; color: #94a3b8; font-size: 0.85rem; background: #fff;
}

/* Table */
.table-card { margin-bottom: 20px; }
.table-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.table-head h2 { font-size: 1.2rem; }
.table-head select { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); font-family: inherit; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
th:first-child, td:first-child { text-align: center; }
thead th { background: #f8fafc; font-weight: 600; color: var(--muted); position: sticky; top: 0; }
tbody tr:hover { background: #f8fafc; }

/* Article */
.article h2 { font-size: 1.3rem; margin-bottom: 12px; }
.article h3 { font-size: 1.05rem; margin: 18px 0 8px; }
.article p { margin-bottom: 12px; color: #334155; }
.article ul { margin: 0 0 12px 20px; color: #334155; }
.article li { margin-bottom: 6px; }
.disclaimer { font-size: 0.85rem; color: var(--muted); font-style: italic; }

/* Footer */
.site-footer { margin-top: 40px; padding: 24px 0; border-top: 1px solid var(--border); background: var(--card); }
.site-footer .container { text-align: center; color: var(--muted); font-size: 0.88rem; }
.site-footer a { color: var(--primary); text-decoration: none; }
