:root {
  --bg: #f6f8fb;
  --bg-strong: #eef3f8;
  --card: #ffffff;
  --text: #111827;
  --muted: #667085;
  --dark: #0f172a;
  --line: #e5e7eb;
  --accent: #16a34a;
  --accent-dark: #15803d;
  --accent-soft: #ecfdf5;
  --warning: #dc2626;
  --warning-soft: #fef2f2;
  --radius: 22px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(22, 163, 74, 0.08), transparent 22%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  padding: 22px 0;
  background: rgba(246, 248, 251, 0.88);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(229, 231, 235, 0.7);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--dark);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-group-label {
  color: var(--dark);
  font-weight: 700;
  white-space: nowrap;
  margin-right: 4px;
}

.nav-links a {
  white-space: nowrap;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid transparent;
}

.nav-links a:hover {
  background: #fff;
  border-color: var(--line);
}

.nav-links a:hover,
.tool-link:hover,
.related-link:hover {
  color: var(--dark);
}

.hero {
  padding: 54px 0 32px;
}

.grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 34px;
  align-items: start;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.92rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 0.95;
  margin: 0;
  letter-spacing: -0.065em;
}

h2 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.035em;
}

h3 {
  margin: 0;
}

.lead {
  margin: 24px 0 0;
  max-width: 680px;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--muted);
}

.trust-row {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.card,
.mini-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.mini-card {
  padding: 16px;
}

.mini-card small {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
}

.mini-card strong {
  font-size: 0.98rem;
}

.calculator {
  padding: 26px;
  box-shadow: var(--shadow);
  border: 0;
}

.calc-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.calc-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
}

.subtext {
  color: var(--muted);
  margin: 5px 0 0;
  font-size: 0.94rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 14px;
}

.full-width {
  grid-column: 1 / -1;
}

label {
  display: block;
  font-weight: 650;
  font-size: 0.94rem;
  margin: 16px 0 8px;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 14px 15px;
  font-size: 1.02rem;
  outline: none;
  transition: 0.18s ease;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.1);
}

.toggle-box {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 16px;
  border-radius: 18px;
  background: #f1f5f9;
}

.toggle-box p {
  margin: 0;
}

.toggle-box span {
  color: var(--muted);
  font-size: 0.9rem;
}

.switch {
  width: 54px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: var(--dark);
  padding: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.switch-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  display: block;
  transform: translateX(24px);
  transition: 0.18s ease;
}

.switch.off {
  background: #cbd5e1;
}

.switch.off .switch-dot {
  transform: translateX(0);
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.92rem;
}

.result {
  margin-top: 24px;
  background: var(--dark);
  color: #fff;
  border-radius: 24px;
  padding: 22px;
}

.result small {
  color: #cbd5e1;
  display: block;
  margin-bottom: 10px;
}

.result-main {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 850;
  letter-spacing: -0.05em;
}

.result-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.result-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 17px;
  padding: 15px;
}

.result-item span {
  display: block;
  color: #cbd5e1;
  font-size: 0.86rem;
  margin-bottom: 6px;
}

.result-item strong {
  font-size: 1.12rem;
}

.result-note {
  margin: 16px 0 0;
  color: #dbeafe;
  line-height: 1.65;
  font-size: 0.92rem;
}

.alert {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--warning-soft);
  color: #991b1b;
  font-size: 0.94rem;
  line-height: 1.6;
  display: none;
}

.alert.show {
  display: block;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 28px auto 0;
}

.content-card {
  padding: 28px;
}

.content-card p,
.content-card li {
  color: var(--muted);
  line-height: 1.75;
}

.content-card ul {
  margin: 16px 0 0;
  padding-left: 18px;
}

.notice {
  background: #f1f5f9;
  border-radius: 18px;
  padding: 16px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
  margin-top: 18px;
}

.notice strong {
  color: var(--dark);
}

.tools-list,
.related-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.tool-link,
.related-link {
  display: block;
  padding: 13px 14px;
  border-radius: 15px;
  background: #f8fafc;
  color: #334155;
  border: 1px solid var(--line);
  transition: 0.18s ease;
}

.tool-link strong,
.related-link strong {
  display: block;
  margin-bottom: 4px;
  color: var(--dark);
}

.tool-link span,
.related-link span {
  display: block;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

.directory-grid {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.directory-grid .tool-link {
  height: 100%;
}

.ad-slot {
  margin-top: 24px;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed #cbd5e1;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  text-align: center;
  font-size: 0.93rem;
}

.ad-slot strong {
  display: block;
  margin-bottom: 6px;
  color: var(--dark);
}

.faq {
  margin-top: 24px;
  padding: 28px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.faq-item {
  padding: 20px;
  border-radius: 18px;
  background: #fbfdff;
  border: 1px solid var(--line);
}

.faq-item h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.site-footer {
  padding: 36px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
  line-height: 1.7;
}

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

  .trust-row {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links {
    display: flex;
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    padding-top: 34px;
  }

  .calculator,
  .content-card,
  .faq {
    padding: 20px;
  }
}
