:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --dark: #1f2937;
  --light: #f9fafb;
  --gray: #9ca3af;
  --bg-soft: #f3f4f6;
  --card-bg: #ffffff;
  --tone-aggressive: #fee2e2;
  --tone-gentle: #e0e7ff;
  --tone-academic: #fef3c7;
  --tone-playful: #dcfce7;
  --tone-melancholy: #f3e8ff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--light);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  background-color: var(--card-bg);
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 0;
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

nav a {
  color: var(--dark);
  text-decoration: none;
  margin-left: 1.5rem;
  font-weight: 500;
}

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

.bg-soft {
  background-color: var(--bg-soft);
}

section {
  padding: 4rem 0;
}

.hero {
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero .lead {
  font-size: 1.25rem;
  color: #4b5563;
  max-width: 700px;
  margin: 0 auto;
}

.tool-section h2, .education-section h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.education-section h3 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
}

.education-section p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.search-container {
  display: flex;
  max-width: 600px;
  margin: 0 auto 3rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.search-container input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: 1px solid #d1d5db;
  border-right: none;
  font-size: 1.125rem;
  outline: none;
}

.search-container button {
  padding: 0 2rem;
  background-color: var(--primary);
  color: white;
  border: none;
  font-weight: 600;
  font-size: 1.125rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-container button:hover {
  background-color: var(--primary-hover);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  background: var(--card-bg);
  border-radius: 8px;
  color: #6b7280;
  border: 2px dashed #d1d5db;
}

.tone-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border-top: 5px solid var(--primary);
}

.tone-card.aggressive { border-top-color: #ef4444; background: var(--tone-aggressive); }
.tone-card.gentle { border-top-color: #6366f1; background: var(--tone-gentle); }
.tone-card.academic { border-top-color: #f59e0b; background: var(--tone-academic); }
.tone-card.playful { border-top-color: #10b981; background: var(--tone-playful); }
.tone-card.melancholy { border-top-color: #8b5cf6; background: var(--tone-melancholy); }

.tone-card h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.word-list {
  list-style: none;
}

.word-list li {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.site-footer {
  margin-top: auto;
  background: var(--dark);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

.footer-nav {
  margin-top: 1rem;
}

.footer-nav a {
  color: var(--gray);
  margin: 0 1rem;
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-nav a:hover {
  color: white;
}

@media(max-width: 600px) {
  .search-container {
    flex-direction: column;
  }
  .search-container input {
    border-right: 1px solid #d1d5db;
    border-radius: 8px 8px 0 0;
  }
  .search-container button {
    padding: 1rem;
    border-radius: 0 0 8px 8px;
  }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
