:root {
  --primary: #2563eb;
  --dark: #0f172a;
  --light: #f8fafc;
  --muted: #64748b;
  --accent: #10b981;
  --border: #e5e7eb;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--light);
  color: var(--dark);
}

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

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

header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}

header h1 {
  margin: 0;
  font-size: 28px;
}

header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.hero {
  padding: 48px 0 44px;
  background: linear-gradient(180deg, #eff6ff 0%, var(--white) 100%);
  text-align: center;
}

.hero .container {
  max-width: 800px;
}

.hero h1 {
  max-width: 720px;
  margin: 0 auto 16px;
  font-size: clamp(32px, 10vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero-text {
  max-width: 620px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.hero-search {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  text-align: left;
}

.hero-search label {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.hero-search-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-search input,
.hero-search button {
  width: 100%;
  min-height: 48px;
  font: inherit;
  border-radius: 12px;
}

.hero-search input {
  min-width: 0;
  padding: 13px 16px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--dark);
  font-size: 16px;
}

.hero-search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.hero-search button {
  padding: 13px 20px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.hero-search button:hover {
  background: #1d4ed8;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

.hero-search button:active {
  background: #1e40af;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
  transform: translateY(1px);
}

.hero-search input:focus-visible,
.hero-search button:focus-visible,
.hero-secondary-cta:focus-visible {
  outline: 3px solid var(--dark);
  outline-offset: 3px;
}

.hero-search input:focus-visible {
  border-color: var(--primary);
}

.hero-secondary-cta {
  display: inline-flex;
  min-height: 44px;
  margin-top: 16px;
  padding: 10px 14px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--primary);
  font-weight: 800;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.hero-secondary-cta:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.hero-secondary-cta:active {
  background: rgba(37, 99, 235, 0.14);
}

.hero-trust {
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.hero-search-status,
.hero-search-results {
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
  text-align: left;
}

.hero-search-status {
  margin-top: 16px;
  color: var(--dark);
  line-height: 1.5;
}

.hero-search-results {
  margin-top: 12px;
}

.hero-search-results-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-search-result {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.hero-search-result-link {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
}

.hero-search-result-link:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.hero-search-result-link:focus-visible {
  outline: 3px solid var(--dark);
  outline-offset: -3px;
}

.hero-search-result-title {
  color: var(--primary);
  font-weight: 800;
  line-height: 1.4;
}

.hero-search-result-description {
  color: var(--dark);
  line-height: 1.5;
}

.hero-search-result-category {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.hero-search-status[data-state="error"] {
  color: #b91c1c;
  font-weight: 700;
}

.hero-search-status:empty,
.hero-search-results:empty {
  display: none;
}

@media (min-width: 48rem) {
  .hero {
    padding: 64px 0 56px;
  }

  .hero-text {
    margin-bottom: 32px;
    font-size: 20px;
  }

  .hero-search {
    padding: 22px;
  }

  .hero-search-controls {
    flex-direction: row;
  }

  .hero-search input {
    flex: 1 1 auto;
  }

  .hero-search button {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-search button,
  .hero-secondary-cta {
    transition: none;
  }
}

.categories {
  padding: 56px 0;
}

.categories h2 {
  font-size: 34px;
  margin: 0 0 24px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.card:hover {
  transform: translateY(-3px);
  transition: 0.2s;
  border-color: var(--primary);
}

footer {
  padding: 32px 0;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
}

.logo-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: white;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-weight: 700;
}

.main-nav a:hover {
  color: var(--primary);
}

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

  .main-nav {
    flex-wrap: wrap;
    gap: 12px;
  }
}

.hero-badge {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 20px;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 22px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.popular-tools {
  padding: 40px 0 80px;
}

.popular-tools h2 {
  font-size: 28px;
  margin-bottom: 24px;
}

/* ToolfabriekProductionDesignContractV1: shared production-page primitives. */
.tf-production-page {
  max-width: 900px;
  margin: 48px auto 80px;
}

.tf-tool {
  display: grid;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}

.tf-tool > h2,
.tf-tool .tool-panel__intro h2,
.tf-tool .tool-panel__intro p,
.tf-tool .tool-status,
.tf-tool .privacy-note {
  margin: 0;
}

.tf-tool .tool-panel__intro {
  display: grid;
  gap: 8px;
}

.tf-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 20px;
}

.tf-field {
  display: grid;
  gap: 8px;
}

.tf-field label,
.tf-result > label {
  font-weight: 700;
  line-height: 1.4;
}

.tf-field input,
.tf-field select,
.tf-result textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--dark);
  font: inherit;
}

.tf-button {
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 10px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.tf-button--primary {
  justify-self: start;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--white);
}

.tf-button--secondary {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--dark);
}

.tf-result {
  display: grid;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.tf-result h3,
.tf-result dl {
  margin: 0;
}

.tf-result dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 18px;
}

.tf-result dt { color: var(--muted); }
.tf-result dd { margin: 6px 0 0; font-size: 1.35rem; font-weight: 800; }
.tf-tool .privacy-note { color: var(--muted); font-size: .95rem; }

.tf-supporting-content {
  max-width: 760px;
  margin: 64px auto 0;
}

.tf-supporting-content > section {
  margin-top: 48px;
}

.tf-supporting-content > section:first-child { margin-top: 0; }
.tf-supporting-content h2,
.tf-supporting-content h3 { margin: 0 0 14px; }
.tf-supporting-content p { max-width: 68ch; margin: 0; line-height: 1.7; }

.tf-supporting-content .tool-faq {
  display: grid;
  gap: 16px;
  width: 100%;
  margin-top: 64px;
}

.tf-supporting-content .tool-faq-item {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
}

.tf-supporting-content .tool-faq-item summary {
  min-height: 48px;
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 700;
}

.tf-supporting-content .tool-faq-item p { padding: 0 20px 20px; }

@media (max-width: 48rem) {
  .tf-production-page { margin: 36px auto 64px; }
  .tf-form-grid,
  .tf-result dl { grid-template-columns: 1fr; }
  .tf-button--primary { width: 100%; }
  .tf-supporting-content,
  .tf-supporting-content .tool-faq { margin-top: 48px; }
}
