/* inenglish.ai - Base Styles */

:root {
  --primary: #1E88E5;
  --primary-dark: #1565C0;
  --text: #2D3748;
  --text-light: #718096;
  --bg: #FFFFFF;
  --bg-secondary: #F7FAFC;
  --border: #E2E8F0;
  --success: #38A169;
  --warning: #ED8936;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

/* Layout */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

header nav {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

header nav a {
  color: var(--primary);
  text-decoration: none;
}

header nav a:hover {
  text-decoration: underline;
}

main {
  padding: 2rem 0 4rem;
}

/* Typography */
h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text);
  line-height: 1.3;
}

h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--text);
}

h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--text);
}

p {
  margin-bottom: 1rem;
}

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

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

ul, ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Article */
article {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.answer {
  background: var(--bg);
}

.answer h3:first-child {
  margin-top: 0;
}

/* Sources */
.sources {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.sources h3 {
  margin-top: 0;
  font-size: 1rem;
  color: var(--text-light);
}

.sources ul {
  list-style: none;
  padding: 0;
}

.sources li {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.sources a {
  color: var(--primary);
}

/* Footer */
.meta {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-light);
}

.meta p {
  margin-bottom: 0.25rem;
}

/* Homepage */
.hero {
  text-align: center;
  padding: 3rem 0;
}

.hero h1 {
  font-size: 2.5rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.topics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.topic-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.topic-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.topic-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.topic-card h3 a {
  text-decoration: none;
  color: var(--text);
}

.topic-card h3 a:hover {
  color: var(--primary);
}

.topic-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

/* Topic Index */
.article-list {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.article-list h1 {
  margin-bottom: 2rem;
}

.article-list ul {
  list-style: none;
  padding: 0;
}

.article-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.article-list li:last-child {
  border-bottom: none;
}

.article-list a {
  font-size: 1.1rem;
  text-decoration: none;
}

.article-list a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  h1 {
    font-size: 1.5rem;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .topics {
    grid-template-columns: 1fr;
  }
}
