:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #eef5ff;
  --text: #172033;
  --muted: #5e6b82;
  --primary: #1f67d2;
  --primary-dark: #174fa4;
  --border: #dbe3ef;
  --shadow: 0 18px 50px rgba(28, 56, 96, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.narrow {
  width: min(760px, calc(100% - 32px));
}

.site-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.header-inner,
.footer-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-size: 0.82rem;
}

nav {
  display: flex;
  gap: 22px;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 650;
}

.hero {
  padding: 72px 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(72, 137, 255, 0.16), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 52px;
  align-items: center;
}

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

h1,
h2,
h3 {
  line-height: 1.18;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  letter-spacing: -0.05em;
}

.hero-copy {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 580px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid rgba(219, 227, 239, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 34px);
}

.tool-card h2 {
  margin-top: 0;
}

label {
  display: block;
  font-weight: 750;
  font-size: 0.92rem;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 8px;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}

input {
  padding: 15px 16px;
  font-size: 1.08rem;
}

select {
  padding: 11px 12px;
  margin-top: 7px;
}

input:focus,
select:focus,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(31, 103, 210, 0.22);
  outline-offset: 2px;
}

.primary-button {
  border: 0;
  border-radius: 12px;
  padding: 0 22px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

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

.field-help,
.status {
  color: var(--muted);
  font-size: 0.9rem;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.secondary-actions {
  display: flex;
  gap: 18px;
  margin-top: 18px;
}

.text-button {
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--primary);
  font-weight: 750;
  cursor: pointer;
}

.status {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.status.error {
  background: #fff1f1;
  color: #a12828;
}

.results-section {
  margin-top: 22px;
}

.results-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.result-count {
  color: var(--muted);
  font-size: 0.9rem;
}

.word-group + .word-group {
  margin-top: 22px;
}

.word-group h4 {
  margin: 0 0 10px;
  color: var(--muted);
}

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

.word-chip {
  display: inline-flex;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-weight: 750;
}

.content-section {
  padding: 68px 0;
  background: #fff;
}

.content-section.alternate {
  background: #f8fafc;
}

.content-section h2 {
  margin-top: 34px;
}

.content-section h2:first-child {
  margin-top: 0;
}

.steps {
  padding-left: 22px;
}

details {
  border-top: 1px solid var(--border);
  padding: 18px 0;
}

details:last-child {
  border-bottom: 1px solid var(--border);
}

summary {
  cursor: pointer;
  font-weight: 800;
}

footer {
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--border);
}

@media (max-width: 820px) {
  .hero {
    padding: 46px 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  nav {
    display: none;
  }
}

@media (max-width: 560px) {
  .input-row,
  .filters {
    grid-template-columns: 1fr;
  }

  .primary-button {
    min-height: 50px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 18px 0;
    gap: 4px;
  }
}
