/**
 * DS4K 개념서 — 소프트 티일(학습 가이드) 테마
 * 문제집(블루)과 구분되도록 청록·민트 계열
 */
:root {
  --bg: #e4f5f1;
  --bg-glow-1: #c8ebe3;
  --bg-glow-2: #d6eef8;
  --hero-grad: linear-gradient(135deg, #b8e6dc 0%, #d0efe8 55%, #dceef8 100%);

  --surface-soft: #eefaf6;
  --surface-problem: #fdfffe;

  --accent: #0d9488;
  --accent-deep: #0f766e;
  --accent-light: #5eead4;
  --accent-glow: rgba(13, 148, 136, 0.35);

  --ink: #134e4a;
  --heading: #115e59;
  --muted: #4a736c;
  --line: #b8e0d6;
  --rule-line: #e6f5f1;

  --amber: #f59e0b;
  --amber-soft: #fff7e6;
  --step-num: #0f766e;
}

.hero-kicker {
  letter-spacing: 0.08em;
}

.concept-guide {
  margin: 18px 0 0;
  padding: 14px 18px;
  background: var(--amber-soft);
  border: 2px dashed #f0c36a;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  color: #7a5410;
}

.concept-guide strong {
  color: #92400e;
}

/* 권 카드 — 개념서용 */
.vol-card .vol-go {
  color: var(--accent-deep);
}

.concept-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn-problem {
  background: #3b82f6;
  color: #fff;
  border-color: #2563eb;
}

.btn-problem:hover {
  background: #2563eb;
}

/* 본문 섹션 */
.lesson {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px 28px 32px;
  margin-bottom: 20px;
}

.lesson + .lesson {
  margin-top: 0;
}

.lesson-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
  background: #ccfbf1;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.lesson h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--heading);
  margin: 0 0 12px;
}

.lesson p,
.lesson li {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ink);
}

.hook-body {
  font-size: 16.5px;
  line-height: 1.8;
  margin: 0;
}

.goal-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--surface-soft);
  border-left: 5px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 14px;
}

.goal-box .goal-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.goal-box p {
  margin: 0;
  font-weight: 700;
}

/* 단어 카드 */
.word-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 8px;
  padding: 0;
  list-style: none;
}

.word-card {
  background: #f0fdfa;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.word-card dt {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent-deep);
  margin-bottom: 6px;
}

.word-card dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* 단계 */
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
}

.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 var(--accent-deep);
}

.step-body h4 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--heading);
}

.step-body p {
  margin: 0;
}

.example-box {
  margin-top: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 10px;
  font-size: 14.5px;
}

.example-box::before {
  content: "예시 · ";
  font-weight: 800;
  color: var(--accent-deep);
}

/* 브릿지 */
.bridge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .bridge-grid {
    grid-template-columns: 1fr;
  }
}

.bridge-card {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--line);
  background: #fff;
}

.bridge-card.math {
  border-color: #fcd34d;
  background: #fffbeb;
}

.bridge-card.code-side {
  border-color: #93c5fd;
  background: #eff6ff;
}

.bridge-card h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.bridge-card p {
  margin: 0;
  font-size: 14.5px;
}

.code-block {
  margin: 14px 0 0;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.7;
  color: #ecfdf5;
  background: #134e4a;
  border-radius: var(--radius-sm);
  border: 2px solid #0f766e;
  white-space: pre-wrap;
}

/* 미니 퀴즈 */
.try-box {
  background: linear-gradient(180deg, #fff 0%, #f0fdfa 100%);
  border: 2px solid var(--accent-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.try-q {
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 12px;
}

.try-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.try-controls input {
  flex: 1;
  min-width: 140px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  font-family: var(--font-body);
}

.try-hint,
.try-feedback {
  margin-top: 10px;
  font-size: 14px;
}

.try-hint {
  color: var(--muted);
}

.try-feedback.ok {
  color: #047857;
  font-weight: 700;
}

.try-feedback.bad {
  color: #b45309;
  font-weight: 700;
}

.try-answer-reveal {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-deep);
}

.try-answer-reveal.hidden {
  display: none;
}

@media print {
  .try-answer-reveal.hidden {
    display: block !important;
  }
}

/* 기억 포인트 */
.remember-list {
  margin: 0;
  padding-left: 1.2em;
}

.remember-list li {
  margin-bottom: 8px;
  font-weight: 600;
}

.remember-list li::marker {
  color: var(--accent);
}

/* CTA */
.cta-panel {
  text-align: center;
  padding: 28px 24px;
  background: var(--hero-grad);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  margin: 8px 0 40px;
}

.cta-panel h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 8px;
  color: var(--heading);
}

.cta-panel p {
  margin: 0 0 16px;
  color: var(--muted);
}

.cta-panel .btn {
  font-size: 16px;
  padding: 12px 22px;
}

/* 목차 카드 살짝 */
.vol-card {
  text-decoration: none;
  color: inherit;
  display: block;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.vol-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.15);
}

.vol-card.active {
  border-color: var(--accent-deep);
  background: #f0fdfa;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

.vol-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.vol-badge {
  font-size: 11px;
  font-weight: 800;
  background: #ccfbf1;
  color: var(--accent-deep);
  padding: 3px 8px;
  border-radius: 6px;
}

.vol-tag {
  font-size: 11px;
  font-weight: 800;
  background: #fff7ed;
  color: #c2410c;
  padding: 3px 8px;
  border-radius: 6px;
}

.vol-title {
  font-size: 1rem;
  margin: 0 0 6px;
  color: var(--heading);
}

.vol-meta {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
  line-height: 1.5;
}

.vol-go {
  font-size: 12px;
  font-weight: 800;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

@media print {
  .concept-guide,
  .cta-panel .btn,
  .try-controls {
    break-inside: avoid;
  }

  .lesson {
    break-inside: avoid;
    box-shadow: none;
  }
}
