:root {
  --primary: #0f766e;
  --secondary: #f59e0b;
  --bg: #f3f7fb;
  --text: #0f172a;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #d9e2ec;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 14px 34px rgba(15, 23, 42, 0.1);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(15, 118, 110, 0.12), transparent 60%),
    radial-gradient(700px 460px at 95% -20%, rgba(245, 158, 11, 0.1), transparent 62%);
  z-index: -1;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(15, 23, 42, 0.045) 0.6px, transparent 0.6px);
  background-size: 24px 24px;
  opacity: .25;
  z-index: -1;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--primary);
  text-decoration: none;
}

.brand-logo {
  width: 250px;
  height: 58px;
  border-radius: 0;
  flex-shrink: 0;
}

nav a {
  color: var(--text);
  text-decoration: none;
  margin-left: 12px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  border: 1px solid transparent;
  padding: 8px 12px;
  border-radius: 999px;
  transition: all .2s ease;
}

nav a:hover {
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--primary);
}

.nav-toggle {
  display: none;
}

.hero {
  margin-top: 28px;
  margin-bottom: 10px;
  padding: 40px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 28px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(15, 118, 110, 0.2), rgba(15, 118, 110, 0));
  pointer-events: none;
}

.hero > h1,
.hero > p {
  position: relative;
  z-index: 1;
}

.hero > p {
  font-size: 1.04rem;
  max-width: 760px;
  margin-bottom: 14px;
}

.hero--center > h1,
.hero--center > p {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.hero--center > p {
  max-width: 880px;
}

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 8px;
  position: relative;
  z-index: 1;
}

.tool-tab {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6dde7;
  background: #f9fbff;
  color: #334155;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
}

.tool-tab.active {
  background: #1f2937;
  color: #fff;
  border-color: #1f2937;
}

h1, h2, h3 {
  margin: 0 0 10px;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.9rem, 3.3vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.25rem, 2.1vw, 1.7rem);
  font-weight: 750;
}

h3 {
  font-size: 1.1rem;
  font-weight: 750;
}

p {
  margin: 0 0 10px;
  color: #334155;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 4px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: .85;
}

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

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(15, 118, 110, 0.25);
}

.card h3 { margin-bottom: 8px; color: #0b3b35; }

.card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef5ff;
  color: #1e3a8a;
  border: 1px solid #d7e4ff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.card-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.card p {
  color: #475569;
}

article.card {
  padding-top: 28px;
}

article.card h1 {
  font-size: clamp(1.6rem, 2.5vw, 2.15rem);
  margin-bottom: 14px;
}

article.card h2 {
  margin-top: 22px;
  margin-bottom: 10px;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 800;
  letter-spacing: .2px;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.22);
  transition: transform .15s ease, filter .2s ease;
}

.btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.btn.secondary {
  background: var(--secondary);
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.2);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

label {
  font-weight: 700;
  font-size: .93rem;
  color: #1e293b;
}

input {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  outline: none;
  font-size: .98rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}

select {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  outline: none;
  font-size: .98rem;
  color: #1e293b;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}

select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.result {
  margin-top: 24px;
  padding: 16px;
  font-weight: 700;
  font-size: 1rem;
  color: #0b534b;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: var(--radius-md);
  line-height: 1.6;
  min-height: 48px;
  display: block;
}

.result + p {
  margin-top: 16px;
  font-size: 0.88rem;
  color: #64748b;
}

.result + p small {
  font-weight: 600;
}

footer {
  margin-top: 52px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-wrap {
  padding: 22px 0;
  font-size: .93rem;
  color: #64748b;
}

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

@media (max-width: 820px) {
  .topbar {
    align-items: center;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  }

  .nav-toggle span {
    width: 18px;
    height: 2px;
    background: #1f2937;
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
  }

  .topbar.is-nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .topbar.is-nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .topbar.is-nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  nav {
    display: none;
    width: 100%;
    margin-top: 10px;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
  }

  .topbar.is-nav-open nav {
    display: flex;
  }

  nav a {
    margin-left: 0;
    width: 100%;
    text-align: left;
    font-size: 0.86rem;
  }

  .hero {
    margin-top: 18px;
    border-radius: 20px;
    padding: 26px;
  }

  .tool-tabs {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
