:root {
  --bg-1: #f5f1ea;
  --bg-2: #fffdf8;
  --ink: #1f2937;
  --muted: #4b5563;
  --accent: #0f766e;
  --accent-2: #134e4a;
  --card: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --max-w: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Avenir", "Gill Sans", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  line-height: 1.6;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100% - 32px, var(--max-w));
  margin: 0 auto;
}

header.site-header {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.brand {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.2px;
}

.nav-links {
  display: flex;
  gap: var(--space-3);
  font-size: 15px;
}

.hero {
  padding: var(--space-6) 0 var(--space-4);
}

.hero h1 {
  font-size: clamp(32px, 4vw, 44px);
  margin: 0 0 var(--space-2);
}

.hero p {
  max-width: 720px;
  color: var(--muted);
  margin: 0 0 var(--space-2);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  color: var(--accent-2);
  font-size: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-5);
}

.card + .card {
  margin-top: var(--space-4);
}

.section {
  padding: var(--space-5) 0;
}

.section h2 {
  font-size: 24px;
  margin-bottom: var(--space-3);
}

.form-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

label {
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

input,
select,
button {
  font: inherit;
}

input[type="number"],
input[type="month"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

select {
  width: 100%;
  padding: 10px 40px 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%),
    linear-gradient(to right, #fff, #fff);
  background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%, 100% 0;
  background-size: 6px 6px, 6px 6px, 2.5em 100%;
  background-repeat: no-repeat;
}

input:focus,
button:focus,
select:focus {
  outline: 2px solid rgba(15, 118, 110, 0.4);
  outline-offset: 2px;
}

.actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-3);
  align-items: center;
}

.button-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
}

.button-secondary {
  background: transparent;
  color: var(--accent-2);
  border: 1px solid var(--accent-2);
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
}

.button-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.results-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  margin-top: var(--space-3);
}

.result-item {
  background: #f8fafc;
  border-radius: 12px;
  padding: var(--space-3);
  border: 1px solid var(--border);
}

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

.result-value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 6px;
}

.inline-error {
  color: #b91c1c;
  font-size: 13px;
  margin-top: 4px;
}

.ad-slot {
  margin: var(--space-5) 0;
  padding: var(--space-4);
  border: 1px dashed #cbd5f5;
  border-radius: 12px;
  color: #475569;
  font-size: 14px;
  background: rgba(226, 232, 240, 0.4);
}

footer.site-footer {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--border);
  margin-top: var(--space-6);
  color: var(--muted);
  font-size: 14px;
}

footer.site-footer .container {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: var(--space-6);
  row-gap: var(--space-2);
  align-items: start;
}

.site-footer .container > .footer-links {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
}

.site-footer .container > .devstorex-ecosystem {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  margin: 0;
}

.site-footer .container > p {
  grid-column: 1 / -1;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 640px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions {
    flex-direction: column;
  }

  .button-primary,
  .button-secondary {
    width: 100%;
    text-align: center;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  footer.site-footer .container {
    grid-template-columns: 1fr;
  }

  .site-footer .container > .devstorex-ecosystem {
    grid-column: 1;
    justify-self: start;
  }
}

.related-tools h2 {
  margin-top: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.related-card {
  display: block;
  padding: var(--space-4);
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  border-color: rgba(15, 118, 110, 0.4);
  text-decoration: none;
}

.related-name {
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 6px;
}

.related-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.devstorex-ecosystem {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.devstorex-ecosystem__title {
  display: none;
}

.devstorex-ecosystem__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
