:root {
  --primary: #111;
  --accent: #0a58ff;
  --radius: 12px;
  --bg: #f5f6f8;
  --text: #111;
  --border: #e8e8e8;
  --font: "Inter", system-ui, Arial, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* HEADER & NAV */
header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 6px 12px;
  border-radius: 8px;
}

nav a.active,
nav a:hover {
  background: var(--primary);
  color: #fff;
}

/* CONTENT CONTAINER */
.container {
  max-width: 700px;
  margin: 34px auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  padding: 26px;
}

/* TITLES */
h1 { font-size: 24px; text-align: center; margin-bottom: 8px; }
h2 { font-size: 20px; margin: 16px 0 10px; }

/* FORM ELEMENTS */
label { display: block; font-weight: 700; margin: 10px 0 6px; }

input, select {
  width: 100%;
  padding: 13px 12px;
  border: 1px solid #d6d6d6;
  border-radius: 10px;
  font-size: 16px;
  background: #fafafa;
}

button {
  width: 100%;
  padding: 14px;
  margin-top: 14px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

button:hover { background: #333; }

/* RESULT BOX */
.result {
  margin-top: 18px;
  padding: 16px;
  background: #f7f9fc;
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  text-align: center;
  font-size: 15px;
}

.result b { font-size: 18px; color: var(--accent); }
.result small { display: block; margin-top: 6px; color: #666; }

/* SECTIONS */
section {
  max-width: 980px;
  margin: 34px auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  padding: 24px;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 22px;
  background: #f0f0f0;
  color: #555;
  margin-top: 40px;
  font-size: 14px;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .container { margin: 20px 12px; padding: 18px; }
  nav { gap: 6px; }
  h1 { font-size: 20px; }
}
@media print {
  nav, footer, #related, #faq { display: none; }
  .container { box-shadow: none; border: 0; }
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  display: inline-block;
  padding: 6px 10px;
  background: #f4f4f5;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-size: 14px;
  color: #444;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.tag:hover {
  background: #e5e7eb;
  color: #000;
}
:root {
  --bg: #f7f7f8;
  --fg: #111;
  --muted: #666;
  --brand: #0b5cff;
  --card: #fff;
  --line: #e7e7ea;
  --note: #fff7ed;
  --note-line: #fde3b7;
}

* {
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--fg);
  margin: 0;
}

.container {
  max-width: 1000px;
  margin: 24px auto;
  background: var(--card);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

header.site {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

nav.wrap {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
}

nav a.logo {
  font-weight: 800;
  color: #111;
  text-decoration: none;
}

nav .links a {
  color: #111;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
}

nav .links a:hover {
  background: #f3f4f6;
}

h1 {
  margin: 6px 0 2px 0;
}

.lead {
  color: var(--muted);
  font-size: 14px;
}

.controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

input[type="text"] {
  flex: 1;
  min-width: 260px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

button {
  padding: 12px 14px;
  border-radius: 8px;
  border: 0;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

button.secondary {
  background: #6b7280;
}

button.link {
  background: transparent;
  color: #111;
  border: 1px solid var(--line);
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.small {
  font-size: 13px;
  color: var(--muted);
}

.result {
  margin-top: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

th,
td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f3f4f6;
}

.notice {
  background: var(--note);
  border: 1px solid var(--note-line);
  padding: 12px;
  border-radius: 10px;
  margin: 14px 0;
}

.section {
  margin: 26px 0;
}

.section h2 {
  margin: 0 0 8px 0;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1f3cff;
  font-size: 12px;
  font-weight: 700;
}

.hr {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

ul.check {
  list-style: none;
  padding-left: 0;
  margin: 6px 0;
}

ul.check li {
  margin: 6px 0;
  padding-left: 22px;
  position: relative;
}

ul.check li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #16a34a;
  font-weight: 700;
}

.footer {
  margin-top: 22px;
  padding: 22px 10px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.tag {
  display: inline-block;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid #eee;
  margin-right: 6px;
  font-size: 13px;
}

@media (max-width: 840px) {
  .grid,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media print {
  header.site,
  nav.wrap,
  .controls,
  .notice,
  .footer {
    display: none !important;
  }
  .container {
    box-shadow: none;
    margin: 0;
    padding: 0;
  }
  body {
    background: #fff;
  }
}

#captcha-box input {
  text-align: center;
  font-weight: bold;
  font-size: 15px;
}
.grid-4 {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;
}
#quickcalc input, #quickcalc select {
  width:100%;
  padding:8px;
  margin:4px 0;
  border:1px solid #ddd;
  border-radius:6px;
}
#quickcalc button {
  width:100%;
  padding:8px;
  background:#0b5cff;
  color:#fff;
  border:0;
  border-radius:6px;
  cursor:pointer;
}
#quickcalc button:hover { background:#0049c7; }
