/* ========================================
   AI 投资 101 — Simple educational style
   No gradients. Clean. Readable.
   ======================================== */

:root {
  --edu-primary: #4f46e5;
  --edu-primary-dark: #4338ca;
  --edu-accent: #f59e0b;
  --edu-success: #16a34a;
  --edu-danger: #dc2626;
  --edu-surface: #fafafa;
  --edu-border: #e5e7eb;
}

[data-md-color-scheme="slate"] {
  --edu-surface: #1e2030;
  --edu-border: rgba(255, 255, 255, 0.1);
}

/* === Author attribution announce bar === */

.md-banner {
  background: var(--edu-surface);
  border-bottom: 1px solid var(--edu-border);
}

.md-banner__inner {
  font-size: 0.85em;
  color: var(--md-default-fg-color--light);
  padding: 8px 16px;
  text-align: center;
}

.announce-author {
  color: var(--edu-primary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed currentColor;
  margin: 0 2px;
}

.announce-author:hover {
  border-bottom-style: solid;
  color: var(--edu-primary-dark);
}

/* === Hero attribution (home 页 hero 下方) === */

.hero-attribution {
  text-align: center;
  font-size: 0.92em;
  color: var(--md-default-fg-color--light);
  margin: 0 0 1.4em 0;
}

.hero-attribution a {
  color: var(--edu-primary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed currentColor;
}

.hero-attribution a:hover {
  border-bottom-style: solid;
}

/* === Language switch (顶部显眼切换) === */

.lang-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 0 0 28px 0;
  padding: 12px 20px;
  background: var(--edu-surface);
  border-radius: 6px;
  border: 1px solid var(--edu-border);
  font-size: 0.95em;
}

[data-md-color-scheme="slate"] .lang-switch {
  background: rgba(79, 70, 229, 0.06);
  border-color: rgba(79, 70, 229, 0.2);
}

.lang-current {
  font-weight: 700;
  color: var(--md-default-fg-color);
  padding: 4px 12px;
  background: var(--md-default-bg-color);
  border-radius: 4px;
  border: 1px solid var(--edu-border);
}

.lang-other {
  color: var(--edu-primary) !important;
  font-weight: 600;
  text-decoration: none !important;
  border: 1px solid var(--edu-primary);
  padding: 4px 14px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.lang-other:hover {
  background: var(--edu-primary);
  color: white !important;
}

@media (max-width: 600px) {
  .lang-switch {
    flex-direction: column;
    gap: 10px;
  }
}

/* === Hero (首页) — 去渐变, 保持简洁 === */

.md-typeset h1:first-of-type {
  font-size: 2.4em;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--md-default-fg-color);
  margin-bottom: 0.4em;
  padding-top: 0.3em;
  border-top: none;
}

.hero-tagline {
  font-size: 1.1em;
  line-height: 1.6;
  color: var(--md-default-fg-color--light);
  max-width: 680px;
  margin: 0 auto 1.4em auto;
  text-align: center;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 1.4em 0 1.8em 0;
  flex-wrap: wrap;
}

/* === Disclaimer banner — solid, no gradient === */

.disclaimer-banner {
  background: #fffbeb;
  border-left: 3px solid var(--edu-accent);
  padding: 12px 16px;
  margin: 18px 0;
  border-radius: 4px;
  font-size: 0.92em;
}

[data-md-color-scheme="slate"] .disclaimer-banner {
  background: rgba(245, 158, 11, 0.08);
  color: var(--md-default-fg-color);
}

/* === Grid cards (Material grid) — simpler === */

.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card {
  border-radius: 6px;
  border: 1px solid var(--edu-border);
  padding: 1.1em;
  transition: border-color 0.2s, transform 0.15s;
  background: var(--md-default-bg-color);
}

.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid > .card:hover {
  transform: translateY(-2px);
  border-color: var(--edu-primary);
}

.md-typeset .grid.cards .lg.middle {
  font-size: 1.4em;
  color: var(--edu-primary);
  vertical-align: middle;
  margin-right: 4px;
}

.md-typeset .grid.cards code {
  font-size: 0.8em;
  padding: 1px 5px;
  background: var(--edu-surface);
  border-radius: 3px;
  color: var(--md-default-fg-color--light);
}

/* === Mermaid diagrams === */

.mermaid {
  text-align: center;
  margin: 24px 0;
}

/* === Inline ticker badges === */

.ticker {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--md-code-font);
  font-weight: 600;
  background: #eef2ff;
  color: var(--edu-primary-dark);
  font-size: 0.85em;
}

[data-md-color-scheme="slate"] .ticker {
  background: rgba(79, 70, 229, 0.18);
  color: #a5b4fc;
}

/* === Blockquotes — minimal === */

.md-typeset blockquote {
  border-left: 3px solid var(--edu-primary);
  padding: 0.5em 1em;
  background: var(--edu-surface);
  border-radius: 0 4px 4px 0;
  color: var(--md-default-fg-color);
}

/* === Tables — clean === */

.md-typeset table:not([class]) {
  border-radius: 4px;
  overflow: hidden;
  border-collapse: collapse;
  border: 1px solid var(--edu-border);
}

.md-typeset table:not([class]) th {
  background: var(--edu-surface);
  color: var(--md-default-fg-color);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 2px solid var(--edu-border);
}

.md-typeset table:not([class]) td {
  padding: 8px 14px;
}

.md-typeset table:not([class]) tr:hover {
  background: var(--edu-surface);
}

/* === Admonitions — keep mkdocs default + minor polish === */

.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-radius: 4px;
}

.md-typeset .admonition.tip > .admonition-title,
.md-typeset details.tip > summary {
  font-weight: 600;
  font-size: 1.0em;
}

.md-typeset .admonition.abstract,
.md-typeset details.abstract {
  background: var(--edu-surface);
  border-left-color: var(--edu-primary);
  border-radius: 4px;
}

/* === Code blocks === */

.md-typeset code {
  font-size: 0.88em;
  padding: 1px 5px;
  border-radius: 3px;
}

.md-typeset pre > code {
  border-radius: 4px;
  padding: 14px;
}

/* === Nav (sidebar) === */

.md-nav__item--active > .md-nav__link {
  font-weight: 600;
  color: var(--edu-primary);
}

.md-nav__link:hover {
  color: var(--edu-primary);
}

/* === Header — minimal shadow === */

.md-header {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* === Section spacing === */

.md-typeset h2 {
  margin-top: 2em;
  padding-top: 0.5em;
  border-top: 1px solid var(--edu-border);
}

.md-typeset h2:first-of-type {
  border-top: none;
}

/* === Buttons — solid, no gradient === */

.md-button {
  padding: 9px 22px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background-color 0.15s, transform 0.15s;
  border: 1px solid var(--edu-primary);
}

.md-button--primary {
  background: var(--edu-primary);
  border-color: var(--edu-primary);
  color: white;
}

.md-button--primary:hover {
  background: var(--edu-primary-dark);
  border-color: var(--edu-primary-dark);
  transform: translateY(-1px);
}

.md-button:not(.md-button--primary):hover {
  background: var(--edu-surface);
  transform: translateY(-1px);
}

/* === Responsive === */

@media (max-width: 600px) {
  .md-typeset h1:first-of-type {
    font-size: 1.9em;
  }
  .hero-tagline {
    font-size: 0.98em;
  }
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ========================================
   Roadmap timeline (solid, no gradient)
   ======================================== */

.roadmap-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.roadmap-step {
  background: var(--md-default-bg-color);
  border: 1px solid var(--edu-border);
  border-left: 3px solid var(--edu-primary);
  border-radius: 4px;
  padding: 14px 16px;
  transition: border-color 0.2s, transform 0.15s;
}

.roadmap-step:hover {
  transform: translateY(-2px);
  border-color: var(--edu-primary);
}

.roadmap-step strong {
  color: var(--edu-primary);
  font-size: 0.82em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
}

.roadmap-step h3 {
  margin: 6px 0 6px 0 !important;
  font-size: 1.0em !important;
  font-weight: 700;
  border-top: none !important;
  padding-top: 0 !important;
}

.roadmap-step p {
  font-size: 0.88em;
  margin: 0;
  color: var(--md-default-fg-color--light);
  line-height: 1.5;
}

.roadmap-icon {
  font-size: 1.1em !important;
  color: var(--edu-primary);
  vertical-align: middle;
}

.roadmap-step--active {
  border-left-color: var(--edu-accent);
}
.roadmap-step--active strong { color: var(--edu-accent); }

.roadmap-step--milestone {
  border-left-color: var(--edu-success);
}
.roadmap-step--milestone strong { color: var(--edu-success); }

/* ========================================
   Week grid (Part 1 推荐节奏) — simple borders
   ======================================== */

.week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 26px 0;
}

.week-card {
  background: var(--md-default-bg-color);
  border: 1px solid var(--edu-border);
  border-top: 3px solid var(--edu-primary);
  border-radius: 4px;
  padding: 18px;
  transition: border-color 0.2s, transform 0.15s;
}

.week-card:hover {
  transform: translateY(-2px);
  border-color: var(--edu-primary);
}

.week-card h3 {
  margin-top: 4px !important;
  margin-bottom: 8px !important;
  font-size: 1.05em !important;
  border-top: none !important;
  padding-top: 0 !important;
}

.week-num {
  font-size: 1.3em !important;
  color: var(--edu-primary);
  vertical-align: middle;
  margin-right: 4px;
}

.week-card strong:first-of-type {
  display: block;
  font-size: 0.92em;
  margin-bottom: 10px;
  color: var(--md-default-fg-color);
}

.week-card ul {
  margin-top: 10px;
  padding-left: 1.2em;
  font-size: 0.88em;
}

.week-card ul li {
  margin: 3px 0;
  color: var(--md-default-fg-color--light);
}

.week-1 { border-top-color: var(--edu-primary); }
.week-2 { border-top-color: #7c3aed; }
.week-3 { border-top-color: #ec4899; }
.week-next { border-top-color: var(--edu-success); }
.week-next h3,
.week-next strong { color: var(--edu-success); }
