﻿:root {
  color-scheme: light;
  --ink: #10201f;
  --muted: #5a6c69;
  --soft: #eef5f3;
  --line: #dce7e4;
  --brand: #1d8a76;
  --brand-dark: #126a5b;
  --accent: #f4b942;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(16, 32, 31, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(220, 231, 228, 0.8);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: var(--brand);
  box-shadow: 0 8px 20px rgba(29, 138, 118, 0.22);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.94rem;
  color: var(--muted);
}

.site-nav a {
  padding: 9px 11px;
  border-radius: 8px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  background: var(--soft);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.menu-button span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.hero {
  background:
    linear-gradient(135deg, rgba(29, 138, 118, 0.09), rgba(244, 185, 66, 0.13)),
    radial-gradient(circle at top left, rgba(29, 138, 118, 0.16), transparent 34%),
    #fbfdfc;
}

.hero-inner,
.section-inner {
  width: min(1100px, calc(100% - 36px));
  margin: 0 auto;
}

.hero-inner {
  padding: clamp(44px, 7vw, 92px) 0 52px;
}

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

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

h1 {
  max-width: 740px;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.8rem);
}

h3 {
  font-size: 1.25rem;
}

.hero-copy {
  max-width: 690px;
  margin: 18px 0 26px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.solver {
  max-width: 930px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(220, 231, 228, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 750;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  margin-top: 10px;
}

input,
select,
button {
  min-height: 48px;
  border-radius: 8px;
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid #cddbd8;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--white);
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(29, 138, 118, 0.22);
  outline-offset: 2px;
}

.primary-button,
.ghost-button {
  border: 0;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

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

.primary-button:hover {
  background: var(--brand-dark);
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--white);
}

.ghost-button:hover {
  background: var(--soft);
}

.field-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.options {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.options summary {
  cursor: pointer;
  font-weight: 850;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.results-section,
.content-section,
.tools-section {
  padding: clamp(42px, 7vw, 76px) 0;
}

.results-section {
  background: var(--white);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.result-count {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.results {
  display: grid;
  gap: 18px;
}

.empty-state,
.loading-state {
  display: block;
  padding: 24px;
  border: 1px dashed #bfd0cc;
  border-radius: 8px;
  color: var(--muted);
  background: #f8fbfa;
}

.word-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.word-group-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfa;
  font-weight: 850;
}

.word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 16px;
}

.word-pill {
  border: 1px solid #cddbd8;
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--white);
  font-weight: 750;
}

.word-pill:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.content-section {
  background: var(--soft);
}

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

.article-grid article {
  min-width: 0;
}

.article-grid p {
  color: var(--muted);
}

.tools-section {
  background: #fbfdfc;
}

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

.tool-card {
  min-height: 144px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(16, 32, 31, 0.06);
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(29, 138, 118, 0.45);
}

.tool-card span {
  display: block;
  margin-bottom: 8px;
  font-weight: 850;
}

.tool-card small {
  color: var(--muted);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 24px;
  padding: 34px clamp(18px, 4vw, 48px);
  color: #dce7e4;
  background: #10201f;
}

.site-footer p {
  margin: 7px 0 0;
  color: #a9b9b6;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.site-footer a:hover {
  color: var(--accent);
}

.copyright {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  font-size: 0.92rem;
}

@media (max-width: 850px) {
  .menu-button {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
  }

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

  .input-row,
  .options-grid,
  .article-grid,
  .tool-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-count {
    text-align: left;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .site-header {
    min-height: 66px;
  }

  .brand span:last-child {
    font-size: 0.98rem;
  }

  .hero-inner,
  .section-inner {
    width: min(100% - 28px, 1100px);
  }

  .solver {
    padding: 16px;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }
}

.faq-section {
  padding: clamp(42px, 7vw, 76px) 0;
  background: #ffffff;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.faq-grid article,
.legal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #ffffff;
}

.faq-grid p,
.legal-card p,
.legal-card li {
  color: var(--muted);
}

.legal-page {
  background: var(--soft);
}

.legal-hero {
  padding: clamp(42px, 7vw, 82px) 0 28px;
  background: #ffffff;
}

.legal-content {
  padding: 32px 0 72px;
}

.legal-stack {
  display: grid;
  gap: 18px;
}

@media (max-width: 850px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}
