:root {
  --accent:       #0071e3;
  --accent-hover: #0077ed;
  --text:         #1d1d1f;
  --text-sub:     #6e6e73;
  --text-muted:   #a1a1a6;
  --bg:           #f5f5f7;
  --bg-card:      #ffffff;
  --bg-elevated:  #fbfbfd;
  --border:       rgba(0,0,0,.08);
  --border-mid:   rgba(0,0,0,.13);
  --radius:       12px;
  --radius-sm:    8px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  --sans:         -apple-system, BlinkMacSystemFont, "SF Pro Display",
                  "Helvetica Neue", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --max-w:        800px;
  --section-gap:  52px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
header {
  background: rgba(245,245,247,.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.logo-wrap { display: flex; align-items: baseline; gap: 8px; }
.logo      { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -.4px; }
.logo-sub  { font-size: 11px; color: var(--text-muted); }
.last-updated { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* ── Main ── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 16px 80px;
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

/* ── Section wrapper ── */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.section-icon { display: none; }
.section-title h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.4px;
  color: var(--text);
}
.section-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  background: #f0ebff;
  color: #5e35b1;
}
.plus-badge { background: #f0ebff; color: #5e35b1; }
.section-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

/* ── Plus 목록 ── */
.plus-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }

.plus-item {
  background: var(--bg-card);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: background .15s;
}
.plus-item:hover { background: var(--bg-elevated); }

.plus-item-num {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 22px;
  line-height: 1.4;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.plus-item-body { flex: 1; min-width: 0; }
.plus-item-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 3px;
  color: var(--text);
}
.plus-item-hook { font-size: 12.5px; color: var(--text-sub); margin-bottom: 3px; }
.plus-item-meta { font-size: 11px; color: var(--text-muted); }
.plus-item-link {
  flex-shrink: 0;
  align-self: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.plus-item-link:hover { text-decoration: underline; }

/* ── 카테고리 그룹 ── */
.cat-group { margin-bottom: 24px; }
.cat-group:last-child { margin-bottom: 0; }
.cat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.cat-label::before { display: none; }
.cards-stack { display: flex; flex-direction: column; gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }

/* ── 기사 카드 ── */
.card {
  background: var(--bg-card);
  border-radius: 0;
  padding: 14px 16px;
  border: none;
  transition: background .15s;
}
.card:hover { background: var(--bg-elevated); box-shadow: none; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.badge {
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 600;
}
.badge-paid        { background: #fff8e1; color: #b45309; }
.badge-plus        { background: #f0ebff; color: #5e35b1; }
.badge-sentiment-controversial { background: #fff0f0; color: #c0392b; }
.badge-sentiment-positive      { background: #f0fdf4; color: #166534; }
.badge-sentiment-negative      { background: #fdf2f8; color: #9d174d; }

.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 5px;
  color: var(--text);
  letter-spacing: -.2px;
}
.card-hook {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 9px;
  line-height: 1.55;
}
.card-bullets { list-style: none; margin-bottom: 9px; }
.card-bullets li {
  padding: 3px 0 3px 14px;
  position: relative;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.55;
}
.card-bullets li::before {
  content: "·";
  position: absolute;
  left: 3px;
  color: var(--text-muted);
  font-size: 16px;
  top: 1px;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.card-keywords { display: flex; gap: 4px; flex-wrap: wrap; }
.keyword {
  background: #f5f5f7;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--text-sub);
}
.btn-read {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 980px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
}
.btn-read:hover { background: var(--accent-hover); }

/* ── 인사이트 카드 ── */
.insight-cards { display: flex; flex-direction: column; gap: 16px; }

.insight-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.insight-card-header {
  padding: 16px 18px 13px;
  border-bottom: 1px solid var(--border);
}
.insight-card-header .card-title { font-size: 15px; }

.block {
  padding: 11px 18px;
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.block:last-of-type { border-bottom: none; }
.block-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.block-text { font-size: 13px; line-height: 1.65; }

.block-history { background: #f0f5ff; }
.block-history .block-label { color: #1d4ed8; }
.block-history .block-text  { color: #1e3a5f; }

.period-tag {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
}

.block-compare { background: #f0fdf4; }
.block-compare .block-label { color: #166534; }
.block-compare .block-text  { color: #14532d; }

.block-predict { background: #fffbeb; }
.block-predict .block-label { color: #92400e; }
.block-predict .block-text  { color: #78350f; }

.insight-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  background: #fafafa;
  border-top: 1px solid var(--border);
}

/* ── 피드백 버튼 ── */
.feedback-btns { display: flex; gap: 3px; align-items: center; }

.btn-thumb {
  background: none;
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 13px;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  color: var(--text-muted);
  line-height: 1.5;
}
.btn-thumb:hover     { background: #f5f5f7; }
.btn-thumb.active-up { background: #f0fdf4; border-color: #22c55e; }
.btn-thumb.active-dn { background: #fff0f0; border-color: #f87171; }

.plus-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.card-footer-right { display: flex; align-items: center; gap: 8px; }

/* ── 빈 상태 / 로딩 ── */
.empty-msg {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 0;
  font-size: 14px;
  line-height: 2.2;
}
.spinner {
  width: 28px; height: 28px;
  border: 2px solid rgba(0,0,0,.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
}
.footer-inner { font-size: 12px; color: var(--text-muted); max-width: var(--max-w); margin: 0 auto; }

/* ── Article detail ── */
.detail-wrap { max-width: 680px; margin: 28px auto; padding: 0 16px; }
.back-link { font-size: 13px; color: var(--accent); text-decoration: none; display: inline-block; margin-bottom: 16px; }
.back-link:hover { text-decoration: underline; }
.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px;
  box-shadow: var(--shadow-sm);
}
.detail-card .card-title { font-size: 22px; letter-spacing: -.4px; margin-bottom: 10px; }
.detail-cta {
  text-align: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.detail-cta p { font-size: 14px; color: var(--text-sub); margin-bottom: 14px; }
.btn-read-full {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border-radius: 980px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -.2px;
}
.btn-read-full:hover { background: var(--accent-hover); }

/* ── Mobile (≤ 600px) ── */
@media (max-width: 600px) {

  /* Header — 세로 정렬 */
  header { padding: 0 16px; }
  .header-inner {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 10px 0;
    gap: 1px;
  }
  .logo-wrap { flex-direction: column; align-items: flex-start; gap: 0; }
  .logo      { font-size: 16px; }
  .logo-sub  { font-size: 10px; margin-top: 1px; }
  .last-updated { font-size: 10px; }

  /* Main */
  main { padding: 20px 12px 60px; gap: 40px; }

  /* Section */
  .section-title h2  { font-size: 18px; }
  .section-desc      { display: none; }

  /* Plus items */
  .plus-item { padding: 12px 14px; gap: 10px; }
  .plus-item-num   { font-size: 15px; min-width: 18px; }
  .plus-item-title { font-size: 13.5px; }
  .plus-item-link  { font-size: 11.5px; }

  /* Cards */
  .card          { padding: 12px 14px; }
  .card-title    { font-size: 14.5px; }
  .card-hook     { font-size: 12.5px; }
  .card-bullets li { font-size: 12.5px; }
  .card-footer        { flex-direction: column; align-items: flex-start; gap: 6px; }
  .card-footer-right  { align-self: flex-end; }
  .btn-read           { align-self: flex-end; }

  /* Category */
  .cat-group { margin-bottom: 18px; }

  /* Insight */
  .insight-card-header       { padding: 13px 14px 11px; }
  .insight-card-header .card-title { font-size: 14px; }
  .block                     { padding: 10px 14px; }
  .block-text                { font-size: 12.5px; }
  .insight-card-footer       { padding: 10px 14px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .insight-card-footer .btn-read { align-self: flex-end; }

  /* Detail */
  .detail-card { padding: 20px 16px; }
  .detail-card .card-title { font-size: 19px; }
}

/* ── Tablet (601 – 860px) ── */
@media (min-width: 601px) and (max-width: 860px) {
  main { padding: 28px 20px 70px; }
  .logo-sub { display: none; }
}
