:root {
  --nsd-ink: #0f172a;
  --nsd-muted: #667085;
  --nsd-line: #e5e7eb;
  --nsd-blue: #2563eb;
  --nsd-blue-soft: #eff6ff;
  --nsd-green: #059669;
  --nsd-surface: #ffffff;
  --nsd-canvas: #f4f7fb;
}

.nsd-wrap {
  box-sizing: border-box;
  width: min(1120px, calc(100vw - 32px));
  max-width: none !important;
  margin: 32px auto 64px !important;
  padding: 0;
  color: var(--nsd-ink);
  font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.nsd-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 42px;
  overflow: hidden;
  border: 1px solid #dbe7ff;
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 12%, rgba(59, 130, 246, .16), transparent 34%),
    linear-gradient(135deg, #fff 0%, #f7faff 72%, #edf4ff 100%);
  box-shadow: 0 22px 70px rgba(30, 64, 175, .08);
}

.nsd-eyebrow {
  margin: 0 0 12px;
  color: var(--nsd-blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
}

.nsd-hero h1 {
  margin: 0;
  color: var(--nsd-ink);
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: 1.08;
}

.nsd-lead {
  max-width: 680px;
  margin: 18px 0 0;
  color: #475467;
  font-size: 17px;
  line-height: 1.75;
}

.nsd-live-card {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 2px 10px;
  min-width: 210px;
  padding: 18px 20px;
  border: 1px solid #dce6f7;
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
}

.nsd-live-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 5px rgba(16, 185, 129, .12);
}

.nsd-live-card strong {
  font-size: 15px;
}

.nsd-live-card small {
  grid-column: 2;
  color: var(--nsd-muted);
}

.nsd-period-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 28px;
  padding: 6px;
  border: 1px solid var(--nsd-line);
  border-radius: 18px;
  background: #f8fafc;
}

.nsd-period-tab,
.nsd-source-chip,
.nsd-topic-chip {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.nsd-period-tab {
  min-height: 52px;
  border-radius: 13px;
  background: transparent;
  color: var(--nsd-muted);
  font-weight: 800;
}

.nsd-period-tab.is-active {
  background: var(--nsd-surface);
  color: var(--nsd-ink);
  box-shadow: 0 5px 18px rgba(15, 23, 42, .08);
}

.nsd-source-filter {
  display: flex;
  gap: 9px;
  margin: 20px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nsd-topic-filter {
  display: flex;
  gap: 9px;
  margin: 20px 0;
  padding: 2px 0 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nsd-topic-filter::-webkit-scrollbar {
  display: none;
}

.nsd-topic-chip {
  flex: 0 0 auto;
  padding: 11px 17px;
  border: 1px solid var(--nsd-line);
  border-radius: 999px;
  background: #fff;
  color: #475467;
  font-size: 14px;
  font-weight: 800;
}

.nsd-topic-chip:hover {
  border-color: #93b4ff;
  color: var(--nsd-blue);
}

.nsd-topic-chip.is-active {
  border-color: var(--nsd-blue);
  background: var(--nsd-blue);
  color: #fff;
  box-shadow: 0 7px 18px rgba(37, 99, 235, .2);
}

.nsd-source-filter::-webkit-scrollbar {
  display: none;
}

.nsd-source-chip {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 1px solid var(--nsd-line);
  border-radius: 999px;
  background: #fff;
  color: #475467;
  font-size: 14px;
  font-weight: 750;
}

.nsd-source-chip.is-active {
  border-color: var(--nsd-ink);
  background: var(--nsd-ink);
  color: #fff;
}

.nsd-period-panel {
  display: none;
}

.nsd-period-panel.is-active {
  display: block;
}

.nsd-list {
  overflow: hidden;
  border: 1px solid var(--nsd-line);
  border-radius: 24px;
  background: var(--nsd-surface);
  box-shadow: 0 16px 50px rgba(15, 23, 42, .05);
}

.nsd-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 124px;
  padding: 24px 28px;
  border-bottom: 1px solid #edf0f4;
}

.nsd-item:last-child {
  border-bottom: 0;
}

.nsd-rank {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--nsd-blue-soft);
  color: var(--nsd-blue);
  font-size: 20px;
  font-weight: 900;
}

.nsd-item-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nsd-item h2 {
  margin: 0;
  color: var(--nsd-ink);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -.025em;
}

.nsd-source {
  padding: 5px 8px;
  border-radius: 7px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 800;
}

.nsd-source-naver-finance {
  background: #ecfdf3;
  color: #047857;
}

.nsd-topic-badge {
  padding: 5px 8px;
  border-radius: 7px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.nsd-topic-news { background: #fff1f2; color: #be123c; }
.nsd-topic-economy { background: #ecfdf3; color: #047857; }
.nsd-topic-entertainment { background: #fdf4ff; color: #a21caf; }
.nsd-topic-sports { background: #fff7ed; color: #c2410c; }
.nsd-topic-tech { background: #eff6ff; color: #1d4ed8; }
.nsd-topic-health { background: #ecfeff; color: #0e7490; }
.nsd-topic-culture { background: #f5f3ff; color: #6d28d9; }
.nsd-topic-shopping { background: #fffbeb; color: #b45309; }

.nsd-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  margin-top: 8px;
  color: var(--nsd-muted);
  font-size: 13px;
}

.nsd-metrics b {
  color: var(--nsd-green);
  font-size: 15px;
}

.nsd-why {
  display: flex;
  gap: 9px;
  margin: 11px 0 0;
  color: #475467;
  font-size: 14px;
  line-height: 1.55;
}

.nsd-why span {
  flex: 0 0 auto;
  color: var(--nsd-blue);
  font-weight: 800;
}

.nsd-open {
  padding: 10px 13px;
  border: 1px solid #d6deea;
  border-radius: 10px;
  color: #344054;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.nsd-open:hover {
  border-color: var(--nsd-blue);
  color: var(--nsd-blue);
}

.nsd-empty {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 32px;
  color: var(--nsd-muted);
  text-align: center;
}

.nsd-empty strong {
  color: var(--nsd-ink);
  font-size: 18px;
}

.nsd-empty span {
  margin-top: 6px;
  font-size: 14px;
}

.nsd-filter-empty[hidden],
.nsd-item[hidden] {
  display: none !important;
}

.nsd-filter-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 32px;
  color: var(--nsd-muted);
  text-align: center;
}

.nsd-filter-empty strong {
  color: var(--nsd-ink);
  font-size: 18px;
}

.nsd-filter-empty span {
  margin-top: 6px;
  font-size: 14px;
}

.nsd-notes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.nsd-notes > div {
  padding: 22px;
  border: 1px solid var(--nsd-line);
  border-radius: 18px;
  background: #fbfcfe;
}

.nsd-notes strong {
  font-size: 15px;
}

.nsd-notes p {
  margin: 8px 0 0;
  color: var(--nsd-muted);
  font-size: 13px;
  line-height: 1.75;
}

@media (max-width: 760px) {
  .nsd-wrap {
    width: min(100% - 20px, 680px);
    margin-top: 16px !important;
  }

  .nsd-hero {
    display: block;
    padding: 28px 22px;
    border-radius: 22px;
  }

  .nsd-lead {
    font-size: 15px;
  }

  .nsd-live-card {
    margin-top: 24px;
  }

  .nsd-period-tabs {
    margin-top: 18px;
  }

  .nsd-topic-filter {
    margin: 16px -2px;
  }

  .nsd-item {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 20px 16px;
  }

  .nsd-rank {
    width: 36px;
    height: 36px;
    font-size: 17px;
  }

  .nsd-item-title-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .nsd-item h2 {
    font-size: 19px;
  }

  .nsd-open {
    grid-column: 2;
    justify-self: start;
  }

  .nsd-why {
    display: block;
  }

  .nsd-why span {
    display: block;
    margin-bottom: 3px;
  }

  .nsd-notes {
    grid-template-columns: 1fr;
  }
}
