:root {
  --green-900: #0b3d2e;
  --green-800: #14532d;
  --green-700: #166534;
  --green-600: #15803d;
  --green-500: #22c55e;
  --green-400: #4ade80;
  --green-300: #86efac;
  --green-200: #bbf7d0;
  --green-100: #dcfce7;
  --green-50: #f0fdf4;
  --text-900: #163022;
  --text-700: #2e5b43;
  --text-600: #4b6f5a;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(20, 83, 45, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-900);
  background:
    radial-gradient(circle at top left, rgba(74, 222, 128, 0.20), transparent 22%),
    radial-gradient(circle at top right, rgba(134, 239, 172, 0.22), transparent 25%),
    linear-gradient(180deg, #f6fff7 0%, #effaf1 100%);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(20, 83, 45, 0.10);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--green-900);
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  box-shadow: var(--shadow);
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--green-50);
  border: 1px solid rgba(20, 83, 45, 0.10);
  color: var(--green-800);
  font-weight: 600;
}

.hero {
  padding: 44px 0 26px;
}

.hero-card,
.content-card,
.notice-card,
.chat-shell,
.overview-card,
.example-card,
.timeline-card,
.case-card,
.exercise-card,
.footer-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(20, 83, 45, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 26px;
  padding: 34px;
}

.hero h1,
.page-title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.1;
  color: var(--green-900);
}

.lead {
  font-size: 1.08rem;
  color: var(--text-700);
  margin: 0 0 18px;
}

.quick-info {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.info-pill {
  background: linear-gradient(135deg, var(--green-100), #f8fffa);
  color: var(--green-900);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid rgba(20, 83, 45, 0.08);
}

.hero-aside {
  display: grid;
  gap: 14px;
}

.stat-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(220, 252, 231, 0.75), rgba(255, 255, 255, 0.95));
  border: 1px solid rgba(20, 83, 45, 0.10);
}

.stat-card strong {
  display: block;
  font-size: 1.6rem;
  color: var(--green-900);
  margin-bottom: 8px;
}

.section {
  padding: 20px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}

.section-title {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
  color: var(--green-900);
}

.section-subtitle {
  margin: 6px 0 0;
  color: var(--text-600);
}

.session-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.session-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.9), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(20, 83, 45, 0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 206px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.session-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 42px rgba(20, 83, 45, 0.14);
  border-color: rgba(20, 83, 45, 0.18);
}

.session-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: var(--green-800);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.session-card h3 {
  margin: 14px 0 10px;
  color: var(--green-900);
  font-size: 1.1rem;
}

.session-card p {
  margin: 0;
  color: var(--text-700);
  font-size: 0.96rem;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.btn,
.btn-soft,
.btn-ghost {
  appearance: none;
  border: none;
  cursor: pointer;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.btn-soft:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.btn {
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: var(--white);
  padding: 12px 16px;
  box-shadow: 0 14px 30px rgba(21, 128, 61, 0.22);
}

.btn-soft {
  background: var(--green-100);
  color: var(--green-900);
  padding: 12px 16px;
}

.btn-ghost {
  background: transparent;
  color: var(--green-800);
  padding: 12px 0;
}

.btn.disabled,
.session-card.is-coming .btn {
  background: linear-gradient(135deg, #9ca3af, #cbd5e1);
  box-shadow: none;
  cursor: not-allowed;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.7fr);
  gap: 20px;
}

.content-card,
.notice-card,
.overview-card,
.example-card,
.timeline-card,
.case-card,
.exercise-card,
.footer-card {
  padding: 26px;
}

.content-card h2,
.notice-card h2,
.overview-card h2,
.example-card h2,
.timeline-card h2,
.case-card h2,
.exercise-card h2,
.footer-card h2 {
  margin-top: 0;
  color: var(--green-900);
}

.content-card h3,
.notice-card h3,
.overview-card h3,
.example-card h3,
.timeline-card h3,
.case-card h3,
.exercise-card h3,
.footer-card h3 {
  color: var(--green-800);
  margin-bottom: 8px;
}

.content-card p,
.notice-card p,
.overview-card p,
.example-card p,
.timeline-card p,
.case-card p,
.exercise-card p,
.footer-card p {
  color: var(--text-700);
  margin-top: 0;
}

.highlight-box,
.analogy-box,
.mini-box,
.quote-box,
.code-box,
.warning-box,
.goal-box {
  padding: 18px 18px;
  border-radius: var(--radius-lg);
  margin: 18px 0;
}

.highlight-box {
  background: linear-gradient(180deg, rgba(220, 252, 231, 0.72), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(20, 83, 45, 0.10);
}

.analogy-box {
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.95), rgba(248, 255, 250, 0.98));
  border-left: 5px solid var(--green-500);
  border: 1px solid rgba(20, 83, 45, 0.08);
}

.mini-box {
  background: rgba(255,255,255,0.7);
  border: 1px dashed rgba(20,83,45,0.20);
}

.quote-box {
  background: linear-gradient(180deg, rgba(187, 247, 208, 0.35), rgba(255,255,255,0.96));
  border-left: 4px solid var(--green-700);
}

.warning-box {
  background: linear-gradient(180deg, rgba(254, 249, 195, 0.48), rgba(255,255,255,0.96));
  border-left: 4px solid #d97706;
}

.goal-box {
  background: linear-gradient(180deg, rgba(191, 219, 254, 0.30), rgba(255,255,255,0.95));
  border-left: 4px solid #2563eb;
}

.code-box {
  background: #0f172a;
  color: #e2e8f0;
  font-family: Consolas, Monaco, monospace;
  overflow-x: auto;
  border: 1px solid rgba(15, 23, 42, 0.5);
}

.code-box code,
.code-box pre {
  white-space: pre-wrap;
  margin: 0;
}

.two-col,
.three-col {
  display: grid;
  gap: 16px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.small-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(20,83,45,0.08);
}

.small-card h4 {
  margin: 0 0 8px;
  color: var(--green-900);
}

.progress-track {
  height: 12px;
  width: 100%;
  background: rgba(20,83,45,0.10);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-600), var(--green-400));
  border-radius: 999px;
}

.study-flow {
  display: grid;
  gap: 12px;
}

.flow-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: rgba(240, 253, 244, 0.76);
  border: 1px solid rgba(20,83,45,0.08);
}

.flow-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  font-weight: 800;
}

.callout-list {
  display: grid;
  gap: 12px;
}

.callout-item {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(20,83,45,0.08);
}

.side-sticky {
  position: sticky;
  top: 92px;
}

.chat-shell {
  padding: 0;
  overflow: hidden;
}

.chat-head {
  padding: 22px 24px 14px;
  background: linear-gradient(135deg, rgba(11,61,46,0.98), rgba(21,128,61,0.92));
  color: var(--white);
}

.chat-head h2,
.chat-head p {
  margin: 0;
}

.chat-head p {
  margin-top: 8px;
  color: rgba(255,255,255,0.88);
}

.chat-body {
  padding: 20px 20px 8px;
  max-height: 560px;
  overflow-y: auto;
  background: linear-gradient(180deg, #f8fff9, #f2fbf4);
}

.message {
  margin-bottom: 16px;
  display: flex;
}

.message.user {
  justify-content: flex-end;
}

.message.assistant {
  justify-content: flex-start;
}

.bubble {
  max-width: min(92%, 760px);
  padding: 16px 18px;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(20, 83, 45, 0.08);
  white-space: pre-wrap;
}

.message.user .bubble {
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: var(--white);
  border-bottom-right-radius: 8px;
}

.message.assistant .bubble {
  background: var(--white);
  color: var(--text-900);
  border: 1px solid rgba(20,83,45,0.08);
  border-bottom-left-radius: 8px;
}

.response-body p {
  margin: 0 0 12px;
}

.response-body p:last-child {
  margin-bottom: 0;
}

.chat-form {
  padding: 16px 20px 22px;
  background: var(--white);
  border-top: 1px solid rgba(20, 83, 45, 0.08);
}

.chat-form textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border-radius: 18px;
  border: 1px solid rgba(20,83,45,0.16);
  padding: 16px 18px;
  font: inherit;
  color: var(--text-900);
  background: #fbfffc;
  outline: none;
}

.chat-form textarea:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.chat-toolbar {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.chat-note {
  font-size: 0.93rem;
  color: var(--text-600);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--white);
  font-size: 0.88rem;
}

.tip-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(220,252,231,0.9), rgba(255,255,255,0.96));
  border: 1px solid rgba(20,83,45,0.10);
}

hr.soft {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(20,83,45,0.18), transparent);
  margin: 24px 0;
}

.footer-card {
  margin-bottom: 28px;
}

.footer-text {
  color: var(--text-600);
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
}

table.pretty {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,0.84);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

table.pretty th,
table.pretty td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(20,83,45,0.08);
}

table.pretty th {
  background: rgba(220,252,231,0.70);
  color: var(--green-900);
}

.hero-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(34,197,94,0.10);
  color: var(--green-800);
  font-weight: 700;
  margin-bottom: 14px;
}

@media (max-width: 1080px) {
  .session-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-card,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .side-sticky {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .hero-card,
  .content-card,
  .notice-card,
  .overview-card,
  .example-card,
  .timeline-card,
  .case-card,
  .exercise-card,
  .footer-card {
    padding: 22px;
  }

  .session-grid,
  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }

  .topbar-inner,
  .section-head,
  .tip-banner {
    align-items: flex-start;
  }

  .hero {
    padding-top: 26px;
  }

  .chat-body {
    max-height: 420px;
  }

  .bubble {
    max-width: 100%;
  }
}
