:root {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-soft: #475569;
  --muted: #94a3b8;
  --brand: #2563eb;
  --brand-2: #7c3aed;
  --accent: #06b6d4;
  --line: #e2e8f0;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.12);
  --font: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: #f8fafc;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 头部 ---------- */
.hero {
  background: radial-gradient(1200px 600px at 20% -10%, #3b3fb6 0%, transparent 55%),
    radial-gradient(1000px 500px at 100% 0%, #0ea5b7 0%, transparent 50%),
    linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 72px 24px 88px;
}

.hero__inner {
  max-width: 1080px;
  margin: 0 auto;
}

.hero__badge {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #dbeafe;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero__subtitle {
  font-size: 20px;
  color: #cbd5e1;
  margin: 0 0 20px;
  font-weight: 500;
}

.hero__desc {
  max-width: 760px;
  font-size: 16px;
  color: #e2e8f0;
  margin: 0 0 28px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pill {
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ---------- 主体 ---------- */
.main {
  max-width: 1080px;
  margin: 0 auto 80px;
  padding: 44px 24px 0;
  position: relative;
}

.stage {
  margin-bottom: 44px;
}

.stage__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 18px;
  padding-left: 14px;
  border-left: 4px solid var(--brand);
}

.stage__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ---------- 卡片 ---------- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(2, 6, 23, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  min-height: 210px;
}

.card--done {
  position: relative;
}

.card--done:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #c7d2fe;
}

.card--planned,
.card--wip {
  opacity: 0.72;
}

.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card__num {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.03em;
}

.card__status {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.card__status--done {
  background: #dcfce7;
  color: #15803d;
}

.card__status--wip {
  background: #fef9c3;
  color: #a16207;
}

.card__status--planned {
  background: #f1f5f9;
  color: #64748b;
}

.card__title {
  font-size: 20px;
  margin: 0 0 8px;
  font-weight: 700;
}

.card__link {
  color: inherit;
  text-decoration: none;
}

.card__link:hover {
  color: var(--brand);
}

.card__summary {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 14px;
  flex: 1;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tag {
  font-size: 12px;
  color: #4338ca;
  background: #eef2ff;
  padding: 3px 9px;
  border-radius: 6px;
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.card__duration {
  font-size: 12px;
  color: var(--muted);
}

.card__cta {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
}

.card__cta--muted {
  color: var(--muted);
  font-weight: 500;
}

/* ---------- 作业 ---------- */
.assignment {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.assignment__actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.assignment__button {
  appearance: none;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font: 600 13px/1 var(--font);
  min-height: 36px;
  padding: 9px 8px;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.assignment__button:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
}

.assignment__button--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.assignment__button--primary:hover:not(:disabled) {
  background: #1d4ed8;
  color: #fff;
}

.assignment__button:disabled {
  background: #f1f5f9;
  color: var(--muted);
  cursor: not-allowed;
}

.assignment__status {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  margin: 9px 2px 0;
  min-height: 18px;
}

.toast {
  background: #0f172a;
  border-radius: 10px;
  bottom: 24px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
  color: #fff;
  font-size: 14px;
  left: 50%;
  max-width: min(420px, calc(100vw - 32px));
  opacity: 0;
  padding: 12px 18px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 16px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 100;
}

.toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast--success {
  background: #166534;
}

.toast--error {
  background: #b91c1c;
}

/* ---------- 页脚 ---------- */
.site-foot {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 32px 24px 48px;
}

.site-foot a {
  color: var(--brand);
  text-decoration: none;
}

@media (max-width: 640px) {
  .hero {
    padding: 48px 20px 72px;
  }
  .hero h1 {
    font-size: 32px;
  }
  .hero__subtitle {
    font-size: 17px;
  }
  .assignment__actions {
    grid-template-columns: 1fr;
  }
}
