:root {
  color-scheme: light;
  --ink: #1e2528;
  --muted: #68737a;
  --line: #d9e1df;
  --surface: #ffffff;
  --soft: #f4f7f5;
  --accent: #0f766e;
  --accent-dark: #0b544f;
  --amber: #d97706;
  --rose: #be3455;
  --blue: #2563a9;
  --shadow: 0 22px 70px rgba(30, 37, 40, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fbfcfa;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(217, 225, 223, 0.85);
  background: rgba(251, 252, 250, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.top-nav a {
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
  min-height: calc(86vh - 66px);
  padding: clamp(28px, 4vw, 46px) clamp(18px, 4vw, 56px) 18px;
  overflow: hidden;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.06;
  letter-spacing: 0;
}

h1 {
  max-width: 660px;
  font-size: clamp(2.25rem, 4.5vw, 3.55rem);
}

h2 {
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 3.65rem);
}

h3 {
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.hero-lede {
  max-width: 590px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.button.secondary {
  background: white;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.trust-strip div {
  min-width: 148px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.trust-strip dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.trust-strip dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.hero-visual {
  min-width: 0;
}

.hero-visual img {
  display: block;
  width: min(100%, 660px);
  margin-left: auto;
  filter: drop-shadow(0 24px 36px rgba(30, 37, 40, 0.16));
}

.tool-shell,
.insights,
.sources {
  padding: clamp(44px, 7vw, 92px) clamp(18px, 4vw, 56px);
}

.section-heading {
  margin-bottom: 28px;
}

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

.tool-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 244px;
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  text-decoration: none;
}

.tool-card:hover {
  border-color: rgba(15, 118, 110, 0.45);
}

.tool-card h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.tool-card p {
  margin: 0;
  color: var(--muted);
}

.tool-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.tool-tabs {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 8px;
}

.tool-tab {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.tool-tab.active {
  border-color: var(--accent);
  background: #e7f4f1;
  color: var(--accent-dark);
}

.tools {
  min-width: 0;
}

.tool-panel {
  display: none;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-panel.active {
  display: block;
}

.tool-page-hero {
  padding: clamp(42px, 7vw, 84px) clamp(18px, 4vw, 56px) 26px;
}

.tool-page-hero > div {
  max-width: 900px;
}

.tool-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 22px;
  align-items: start;
  padding: 0 clamp(18px, 4vw, 56px) clamp(54px, 7vw, 94px);
}

.seo-copy {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.seo-copy h2 {
  font-size: 1.24rem;
  line-height: 1.18;
}

.seo-copy p,
.seo-copy ul {
  margin: 0;
  color: var(--muted);
}

.seo-copy ul {
  padding-left: 20px;
}

.seo-copy details {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.seo-copy summary {
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

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

label {
  display: grid;
  gap: 7px;
  color: #394347;
  font-size: 0.9rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
}

input {
  height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 114px;
  padding: 12px;
  resize: vertical;
}

input:focus,
textarea:focus,
.tool-tab:focus-visible,
.button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.result-card {
  min-height: 102px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.result-card strong {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.result-card span {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  font-weight: 900;
  line-height: 1.05;
}

.result-card.good span {
  color: var(--accent-dark);
}

.result-card.warn span {
  color: var(--amber);
}

.result-card.bad span {
  color: var(--rose);
}

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

.seo-form label:nth-child(3),
.seo-form label:nth-child(4),
.check-grid {
  grid-column: 1 / -1;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
}

.check-grid input {
  width: 18px;
  height: 18px;
}

.insights {
  background: #eef5f2;
}

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

.insight {
  min-height: 170px;
  padding: 20px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.insight strong {
  font-size: 1.1rem;
}

.insight p {
  margin: 12px 0 0;
  color: var(--muted);
}

.sources {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.65fr);
  gap: 24px;
  align-items: start;
}

.sources ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sources li {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-weight: 800;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .hero,
  .tool-card-grid,
  .tool-layout,
  .tool-page-grid,
  .sources {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual img {
    margin: 0;
  }

  .tool-tabs {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    width: 100%;
    justify-content: space-between;
  }

  .trust-strip,
  .tool-tabs,
  .tool-card-grid,
  .calculator-grid,
  .seo-form,
  .check-grid,
  .insight-grid,
  .results {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    flex-direction: column;
  }
}
