*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', -apple-system, sans-serif;
  background: #f0f2f5;
  color: #333;
  line-height: 1.6;
}

header {
  background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
  color: white;
  padding: 40px 0 30px;
  text-align: center;
}

header h1 { margin: 0 0 8px; font-size: 28px; font-weight: 800; }
.subtitle { margin: 0; opacity: 0.75; font-size: 14px; }

main { max-width: 960px; margin: 0 auto; padding: 32px 20px; }

/* 종합 요약 */
.overview-card {
  background: white;
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  border-left: 5px solid #3949ab;
}
.overview-card h2 { margin: 0 0 14px; font-size: 18px; color: #1a237e; }
.overview-text { font-size: 15px; color: #444; line-height: 1.8; margin: 0 0 16px; }

.key-points { list-style: none; padding: 0; margin: 0; border-top: 1px solid #eee; padding-top: 14px; }
.key-points li {
  padding: 6px 0 6px 22px;
  position: relative;
  font-size: 14px;
  color: #555;
}
.key-points li::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: #3949ab;
  font-size: 10px;
  top: 8px;
}

/* 섹션 제목 */
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a237e;
  margin: 0 0 20px;
}
.section-title .count {
  font-size: 13px;
  font-weight: 400;
  color: #888;
  margin-left: 8px;
}

/* 뉴스 그리드 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.news-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid #e8e8e8;
  transition: transform 0.15s, box-shadow 0.15s;
}
.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  border-color: #7986cb;
}

.topic-tag {
  display: inline-block;
  background: #e8eaf6;
  color: #3949ab;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  font-weight: 600;
}

.news-card h3 { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.news-card h3 a { color: #1a237e; text-decoration: none; }
.news-card h3 a:hover { text-decoration: underline; }

.meta { font-size: 12px; color: #aaa; margin-bottom: 10px; }

.summary { font-size: 13px; color: #666; line-height: 1.6; margin: 0; }

/* 구독 섹션 */
.subscribe-section { margin: 40px 0; }
.subscribe-card {
  background: linear-gradient(135deg, #e8eaf6, #f3f4fc);
  border: 1px solid #c5cae9;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}
.subscribe-card h2 { margin: 0 0 10px; font-size: 20px; color: #1a237e; }
.subscribe-card p { color: #555; margin: 0 0 20px; font-size: 14px; }
.subscribe-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.subscribe-form input[type="email"] {
  padding: 12px 18px;
  border: 1px solid #c5cae9;
  border-radius: 8px;
  font-size: 14px;
  width: 280px;
  outline: none;
  transition: border-color 0.2s;
}
.subscribe-form input[type="email"]:focus { border-color: #3949ab; }
.subscribe-form button {
  padding: 12px 24px;
  background: #3949ab;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.subscribe-form button:hover { background: #1a237e; }
.subscribe-msg { margin-top: 14px; font-size: 14px; }
.subscribe-msg.success { color: #2e7d32; }
.subscribe-msg.error { color: #c62828; }

/* 히스토리 */
.history-section { margin-top: 12px; }
.history-list { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.history-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
}
.history-item:last-child { border-bottom: none; }
.history-date { font-weight: 600; color: #3949ab; min-width: 90px; }
.history-count { color: #aaa; min-width: 40px; }
.history-overview { color: #777; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

footer {
  text-align: center;
  color: #bbb;
  font-size: 12px;
  padding: 24px;
  margin-top: 20px;
}

@media (max-width: 600px) {
  header h1 { font-size: 20px; }
  main { padding: 20px 16px; }
  .overview-card { padding: 20px; }
  .news-grid { grid-template-columns: 1fr; }
}
