/* Shared stylesheet for learn_more — guides + homepage.
   Guide accent themes: body.accent-* sets CSS variables. */

/* ── Accent themes ─────────────────────────────── */
body { --accent: #0ea5e9; --accent-strong: #0284c7; --accent-soft: #e0f2fe; }
body.accent-blue   { --accent: #0ea5e9; --accent-strong: #0284c7; --accent-soft: #e0f2fe; }
body.accent-orange { --accent: #f97316; --accent-strong: #ea580c; --accent-soft: #ffedd5; }
body.accent-green  { --accent: #65a30d; --accent-strong: #4d7c0f; --accent-soft: #ecfccb; }
body.accent-lime   { --accent: #22c55e; --accent-strong: #16a34a; --accent-soft: #dcfce7; }
body.accent-rose   { --accent: #e11d48; --accent-strong: #be123c; --accent-soft: #ffe4e6; }
body.accent-violet { --accent: #7c3aed; --accent-strong: #6d28d9; --accent-soft: #ede9fe; }
body.accent-indigo { --accent: #6366f1; --accent-strong: #4f46e5; --accent-soft: #e0e7ff; }
body.accent-teal   { --accent: #14b8a6; --accent-strong: #0d9488; --accent-soft: #ccfbf1; }
body.accent-purple { --accent: #8b5cf6; --accent-strong: #7c3aed; --accent-soft: #ede9fe; }

/* ── Base (shared by guides and homepage) ────── */
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  background: #f8fafc;
  color: #1e293b;
}
body.home { max-width: 1100px; }
h1 { font-size: 2.2rem; border-bottom: 4px solid var(--accent); padding-bottom: .5rem; }
h2 { font-size: 1.5rem; margin-top: 2.5rem; color: #0f172a; }
h3 { font-size: 1.15rem; color: #334155; }
.highlight { background: var(--accent-soft); padding: 0.1rem 0.4rem; border-radius: 4px; font-weight: 600; }
.section-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.section-card h3 { margin-top: 0; }
code {
  background: #1e293b;
  color: #e2e8f0;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
}
pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.2rem 1.5rem;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.5;
}
.comment { color: #94a3b8; font-style: italic; }
.key { color: #38bdf8; }
.val { color: #a3e635; }
.tag { color: #f472b6; }
.cmd { color: #c084fc; }
.copy-btn {
  float: right;
  background: #334155;
  border: none;
  color: #e2e8f0;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
}
.copy-btn:hover { background: #475569; }
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
th, td {
  border: 1px solid #e2e8f0;
  padding: 0.7rem 1rem;
  text-align: left;
}
th { background: #f1f5f9; font-weight: 600; }
.benefit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.benefit-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.2rem;
}
.benefit-card strong { color: var(--accent-strong); }
.steps { counter-reset: step; }
.step {
  counter-increment: step;
  padding: 0.5rem 0 0.5rem 2.5rem;
  position: relative;
}
.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  background: var(--accent);
  color: white;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.8rem;
}
.analogy {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 1rem 1.2rem;
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
}

/* ── Homepage only ───────────────────────────── */
.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}
.hero h1 {
  font-size: 2.6rem;
  margin: 0 0 0.5rem;
  border-bottom: none;
  background: linear-gradient(135deg, #0ea5e9, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.15rem;
  color: #64748b;
  max-width: 600px;
  margin: 0 auto;
}
.category {
  margin: 2.5rem 0 1rem;
}
.category h2 {
  font-size: 1.3rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #e2e8f0;
}
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.lesson-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.4rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.lesson-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.lesson-card .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.lesson-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
  color: #0f172a;
}
.lesson-card p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #64748b;
  flex: 1;
}
.lesson-card .footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-ready {
  background: #dcfce7;
  color: #166534;
}
.badge-soon {
  background: #f1f5f9;
  color: #64748b;
}
.lesson-card a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0ea5e9;
}
.lesson-card a:hover {
  text-decoration: underline;
}
.lesson-card.disabled {
  opacity: 0.55;
}
.lesson-card.disabled:hover {
  transform: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
hr {
  margin: 3rem 0 1.5rem;
  border: none;
  border-top: 2px solid #e2e8f0;
}
.site-footer {
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .benefit-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  .lesson-grid { grid-template-columns: 1fr; }
}