
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bg: #f3f8f7;
  --surface: #ffffff;
  --text: #152322;
  --muted: #4a6764;
  --border: #cfe0dc;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #dbeafe;
  --accent: #f59e0b;
  --accent-soft: #fff2da;
  --focus: #2563eb;
  --shadow: 0 28px 60px rgba(15, 39, 36, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1200px 620px at 10% -10%, #d8eee9 0%, transparent 55%),
    radial-gradient(900px 480px at 95% 10%, #ffe7b8 0%, transparent 52%),
    linear-gradient(180deg, #f6fbfa 0%, #ecf6f4 100%);
}

.container {
  display: flex;
  justify-content: center;
  padding: 52px 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 14px 16px;
  backdrop-filter: blur(10px);
  background: rgba(243, 248, 247, 0.84);
  border-bottom: 1px solid rgba(207, 224, 220, 0.8);
}

.site-header-inner {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  color: #0f172a;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-nav a {
  color: #1f3f95;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--primary-strong);
}

.card {
  width: 100%;
  max-width: 760px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.86));
  box-shadow: var(--shadow);
  padding: 34px;
  backdrop-filter: blur(6px);
  animation: card-enter 380ms ease-out;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  top: -180px;
  right: -160px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0) 72%);
  pointer-events: none;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  background: var(--surface);
  border: 2px solid var(--focus);
  border-radius: 10px;
  padding: 8px 10px;
  z-index: 99;
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 16px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid #b8d8d2;
  background: #f2fcfa;
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.02em;
  font-weight: 700;
  text-decoration: none;
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: #245955;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.back-link:hover,
.back-link:focus-visible {
  color: #0f766e;
}

h1 {
  margin: 4px 0 8px;
  font-size: clamp(1.8rem, 2.4vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2,
h3 {
  margin-top: 24px;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.section-lead {
  margin-top: -2px;
  margin-bottom: 10px;
  font-size: 0.94rem;
}

.hero-eyebrow {
  display: inline-block;
  margin: 2px 0 10px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #e7f6f3;
  color: #1d5a54;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 12px;
}

.hero-btn,
.hero-link {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: 12px;
  padding: 10px 14px;
}

.hero-btn {
  color: #f7fffe;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.28);
}

.hero-btn:hover,
.hero-btn:focus-visible {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.hero-link {
  color: #1e4b47;
  border: 1px solid #bad7d1;
  background: #f6fcfb;
}

.hero-link:hover,
.hero-link:focus-visible {
  border-color: #7db9af;
  background: #edf9f6;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 18px;
}

.trust-item {
  text-align: center;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid #c9dfda;
  background: linear-gradient(180deg, #f9fcff, #eff6ff);
  color: #234b46;
  font-size: 0.84rem;
  font-weight: 600;
}

.hero-metrics {
  margin: 14px 0 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-metric {
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid #d0def7;
  background: linear-gradient(180deg, #f9fbff, #eef4ff);
  text-align: center;
}

.hero-metric strong {
  display: block;
  color: #1e3a8a;
  font-size: 1.1rem;
}

.hero-metric span {
  color: #35558f;
  font-size: 0.82rem;
}

.quick-start {
  margin: 16px 0 18px;
  padding: 16px;
  border: 1px solid #d2e2fa;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff, #f4f8ff);
}

.quick-start h3 {
  margin-top: 0;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-card {
  display: block;
  text-decoration: none;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #c9d9f7;
  background: #ffffff;
  color: var(--text);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.quick-card strong {
  display: block;
  color: #1e3a8a;
  margin-bottom: 4px;
}

.quick-card span {
  color: #3e5f9b;
  font-size: 0.84rem;
}

.quick-card:hover,
.quick-card:focus-visible {
  transform: translateY(-1px);
  border-color: #8caef0;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.14);
}

label {
  display: block;
  margin: 8px 0;
  font-size: 0.9rem;
  color: #21413d;
  font-weight: 600;
}

input {
  width: 100%;
  margin: 8px 0;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fcfb;
  color: var(--text);
  font: inherit;
}

input::placeholder {
  color: #7c9996;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.28);
  outline-offset: 2px;
}

button {
  width: 100%;
  margin-top: 12px;
  padding: 13px 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: #f7fffe;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

button:hover,
button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 13px 22px rgba(18, 101, 94, 0.3);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#result {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #effcf8;
  border: 1px solid #bde8dc;
}

.result-details {
  margin-top: 12px;
  color: #1d3f3b;
  line-height: 1.6;
}

.result-details ul {
  margin: 0;
  padding-left: 20px;
}

.result-tip {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  color: #6a4300;
  font-weight: 600;
}

.tool-context {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #f8fcfb;
}

.tool-context h3 {
  margin-top: 0;
}

.tool-context ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

#related-tools {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.related-link {
  display: inline-block;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid #bfd7d3;
  background: #ffffff;
  color: #1a3e3a;
  text-decoration: none;
  font-weight: 600;
  transition: all 150ms ease;
}

.related-link:hover,
.related-link:focus-visible {
  border-color: var(--primary);
  background: #f0fbf9;
  color: var(--primary-strong);
}

#search {
  margin-top: 14px;
  margin-bottom: 20px;
}

.search-shell {
  position: relative;
}

.search-shell input {
  margin: 0;
  padding-left: 42px;
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #6289d7;
  font-weight: 700;
  font-size: 1rem;
  pointer-events: none;
}

#categories {
  margin-top: 8px;
}

.category {
  display: inline-block;
  width: auto;
  margin: 6px 8px 6px 0;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid #bfddd8;
  background: #f6fcfb;
  color: #205652;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

.category:hover,
.category:focus-visible {
  background: var(--primary-soft);
  border-color: #98d1c8;
  transform: none;
}

.category.active {
  background: #d2f0eb;
  border-color: #7ec0b4;
}

.empty-state {
  margin: 10px 0;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid #d8e5f8;
  background: linear-gradient(180deg, #f8fbff, #eff5ff);
  color: #385487;
  font-size: 14px;
}

.input-group {
  margin-bottom: 10px;
}

.tool-link {
  position: relative;
  display: block;
  margin: 10px 0;
  padding: 16px 46px 16px 16px;
  border: 1px solid #cfe2de;
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.tool-link::after {
  content: "→";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #3e7771;
  font-weight: 700;
}

.tool-link:hover,
.tool-link:focus-visible {
  border-color: #9ab6ee;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
}

.tool-subtitle {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.92rem;
}

#most-used {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.most-used-card {
  display: block;
  padding: 12px 13px;
  border: 1px solid #cfe2de;
  border-radius: 14px;
  background: #f7fcfb;
  text-decoration: none;
  color: var(--text);
}

.most-used-card strong {
  display: block;
  margin-bottom: 4px;
}

.most-used-card span {
  font-size: 0.84rem;
  color: #3e6863;
}

.most-used-card:hover,
.most-used-card:focus-visible {
  border-color: #93cec4;
  background: #eef9f7;
}

.newsletter-form {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid #cfe0dc;
  border-radius: 16px;
  background: #f8fcfb;
}

.form-status {
  margin-top: 8px;
  font-size: 14px;
}

.ad-block {
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #f1d7a8;
  background: linear-gradient(180deg, #fff6e8, #ffedd0);
}

.ad-block h3 {
  margin-top: 0;
}

.offer-link {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #12665f;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.offer-link:hover,
.offer-link:focus-visible {
  background: #0f4f4a;
}

.disclosure {
  margin-top: 9px;
  font-size: 12px;
  color: #5e706d;
}

.site-footer {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid #d7e6e2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer a {
  color: #2f5e59;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #1d4ed8;
}

.workflow-steps {
  margin: 10px 0 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.workflow-step {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #d7e4fb;
  background: linear-gradient(180deg, #f9fbff, #f1f6ff);
  display: flex;
  align-items: center;
  gap: 8px;
}

.workflow-step strong {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.82rem;
}

.workflow-step span {
  color: #2f4f8d;
  font-size: 0.82rem;
  font-weight: 600;
}

.calculator-panel {
  margin-top: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #d6e3fb;
  background: linear-gradient(180deg, #ffffff, #f7faff);
}

.calculator-panel .tool-context {
  margin-top: 0;
  margin-bottom: 18px;
}

.calculator-panel h3 {
  margin-top: 0;
}

.calculator-panel #result {
  background: linear-gradient(180deg, #eef4ff, #e5efff);
  border-color: #b9cef9;
}

.results-section {
  margin-top: 18px;
  animation: results-enter 240ms ease-out;
}

@keyframes results-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-card {
  max-width: 980px;
}

.login-card {
  max-width: 540px;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-head .logo {
  margin-bottom: 0;
}

.admin-logout {
  width: auto;
  margin-top: 0;
  background: #dc2626;
  box-shadow: 0 10px 18px rgba(185, 28, 28, 0.22);
}

.admin-logout:hover,
.admin-logout:focus-visible {
  background: #b91c1c;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric-card,
.metric-item {
  padding: 13px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f8fcfb;
}

.metric-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.chart-grid {
  display: grid;
  gap: 10px;
}

.chart-row {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.chart-bar-wrap {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #deece8;
  overflow: hidden;
}

.chart-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f766e, #f59e0b);
}

#top-tools .metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

@media (max-width: 740px) {
  .container {
    padding: 28px 12px;
  }

  .card {
    padding: 22px;
    border-radius: 18px;
  }

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

  .chart-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-btn,
  .hero-link {
    width: 100%;
    text-align: center;
  }

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

  .hero-metrics,
  .quick-grid,
  .workflow-steps {
    grid-template-columns: 1fr;
  }

  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  #most-used {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    gap: 8px;
  }
}

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