:root {
  --bg: #f4f7f5;
  --ink: #1a2421;
  --muted: #5b6b66;
  --line: #d7e3de;
  --card: #ffffff;
  --brand: #e42527;
  --brand-dark: #c41d20;
  --teal: #0f766e;
  --teal-soft: #e7f5f2;
  --navy: #12343b;
  --shadow: 0 18px 40px rgba(18, 52, 59, 0.08);
  --radius: 16px;
  --font: "DM Sans", "Noto Sans SC", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(228, 37, 39, 0.10), transparent 55%),
    radial-gradient(800px 380px at 90% 8%, rgba(15, 118, 110, 0.12), transparent 50%),
    linear-gradient(180deg, #eef6f3 0%, var(--bg) 36%, #f7faf8 100%);
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 5vw;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(244, 247, 245, 0.86);
  border-bottom: 1px solid rgba(215, 227, 222, 0.7);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 800;
}
.brand-text em { font-style: normal; color: var(--teal); font-weight: 600; }
.nav-links { display: flex; gap: 22px; color: var(--muted); font-weight: 500; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-pick { display: inline-flex; gap: 2px; }
.lang-btn {
  border: 0; background: transparent; color: var(--muted);
  padding: 6px 10px; border-radius: 999px; font-weight: 600;
}
.lang-btn.active { background: rgba(18, 52, 59, 0.08); color: var(--navy); }
.link-signup { color: var(--muted); font-weight: 600; }
.btn-login, .btn-primary, .btn-ghost, .btn-outline {
  border-radius: 999px; padding: 11px 18px; font-weight: 700; border: 0;
}
.btn-login, .btn-primary {
  background: var(--brand); color: #fff;
}
.btn-login:hover, .btn-primary:hover { background: var(--brand-dark); }
.btn-ghost {
  background: transparent; color: var(--navy);
  border: 1px solid var(--line);
}
.btn-outline {
  background: #fff; color: var(--teal);
  border: 1px solid rgba(15, 118, 110, 0.35);
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  padding: 56px 5vw 28px;
  max-width: 1180px;
  margin: 0 auto;
}
.hero-compact { padding-bottom: 12px; }
.hero-compact .hero-copy { max-width: 760px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 12px; color: var(--teal); font-weight: 700; margin: 0 0 10px;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.hero-sub { margin: 0 0 22px; color: var(--muted); font-size: 18px; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.tools-section {
  max-width: 1180px;
  margin: 8px auto 28px;
  padding: 0 5vw 8px;
}
.tools-head h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: -0.02em;
}
.tools-head p { margin: 0 0 16px; color: var(--muted); }
.tools-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.tools-filter .tag {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 600;
}
.tools-filter .tag.on {
  background: var(--teal-soft);
  color: var(--teal);
  border-color: rgba(15, 118, 110, 0.28);
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.tool-card {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 18px 16px 16px;
  box-shadow: 0 10px 24px rgba(18, 52, 59, 0.04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: var(--shadow);
}
.tool-ico {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  margin-bottom: 12px;
  background-image:
    linear-gradient(135deg, rgba(255,255,255,.28), transparent 55%),
    radial-gradient(circle at 70% 30%, rgba(255,255,255,.35), transparent 45%);
}
.tool-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.tool-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  min-height: 2.8em;
}
.tool-open {
  color: var(--teal);
  font-weight: 700;
  font-size: 13px;
}

.pulse-card {
  width: min(100%, 320px);
  background: linear-gradient(160deg, #12343b, #0f766e);
  color: #fff;
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  animation: floaty 4.5s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.panel {
  max-width: 980px;
  margin: 18px auto 28px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel-head h2 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.02em; }
.panel-head p { margin: 0 0 18px; color: var(--muted); }

.fy-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.fy {
  border: 1px solid var(--line); background: #f8fbfa;
  border-radius: 999px; padding: 10px 14px; color: var(--muted); font-weight: 600;
}
.fy.on { background: var(--teal-soft); color: var(--teal); border-color: rgba(15,118,110,.28); }

.tax-form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; font-weight: 600; color: var(--navy); }
.field input, .field select {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; background: #fff; color: var(--ink);
}
.age-field {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  display: flex; flex-wrap: wrap; gap: 14px 18px;
}
.age-field legend { padding: 0 6px; font-weight: 700; }
.age-field label { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; color: var(--muted); }
.more {
  border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px 14px; background: #fbfdfc;
}
.more summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 10px; font-weight: 500; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.result { margin-top: 22px; }
.save-line {
  background: var(--teal-soft); color: var(--teal);
  border-radius: 12px; padding: 12px 14px; font-weight: 700; margin: 0 0 14px;
}
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.result-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #fff;
}
.result-card.accent { border-color: rgba(15,118,110,.35); background: linear-gradient(180deg, #f3fbf9, #fff); }
.result-card h3 { margin: 0 0 8px; font-size: 15px; color: var(--muted); }
.result-card .amount { margin: 0; font-size: 30px; letter-spacing: -0.03em; }
.breakdown { margin: 12px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.breakdown li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px dashed var(--line); }
.summary-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.summary-table th, .summary-table td {
  border-top: 1px solid var(--line); padding: 10px 8px; text-align: left;
}
.summary-table th { color: var(--muted); font-weight: 600; }

.fx-box { display: grid; gap: 14px; max-width: 560px; }
.fx-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.fx-swap {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; margin-bottom: 2px; font-size: 18px;
}
.fx-result { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.fx-meta { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.cta-end {
  text-align: center; padding: 48px 5vw 64px; max-width: 800px; margin: 0 auto;
}
.cta-end h2 { margin: 0 0 18px; font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.02em; }

.footer {
  border-top: 1px solid var(--line); padding: 22px 5vw 40px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--muted); font-size: 13px;
}
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.foot-brand .brand-mark { width: 24px; height: 24px; font-size: 12px; border-radius: 7px; }

.wa-modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; padding: 18px;
}
.wa-modal[hidden] { display: none !important; }
.wa-backdrop { position: absolute; inset: 0; background: rgba(10, 18, 16, 0.55); }
#wa-frame {
  width: 100%;
  height: 420px;
  border: 0;
  display: block;
  background: #fff;
  overflow: hidden;
  scrollbar-width: none;
}
#wa-frame::-webkit-scrollbar { width: 0; height: 0; display: none; }
.wa-panel {
  position: relative; width: min(420px, 100%);
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  max-height: 92vh;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .hide-sm { display: none !important; }
  .grid-2, .result-grid, .fx-pair { grid-template-columns: 1fr; }
  .fx-swap { width: 100%; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .tools-grid { grid-template-columns: 1fr; }
}
