/* 대시보드 템플릿 스타일 — 캔버스 + 흰 카드 + 타이포 계층 */

.app {
  min-height: 100vh;
}

.sidebar {
  padding: 20px 14px;
  background: linear-gradient(180deg, #1a1f2a 0%, #12161f 100%);
  border-right: none;
  box-shadow: 4px 0 24px rgba(0, 0, 0, .12);
}

.brand {
  padding: 4px 6px 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--sidebar-line);
}

.brand h1 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.menu-btn {
  border-radius: var(--radius-md);
  padding: 10px 10px;
  border-color: transparent;
  background: rgba(255, 255, 255, .04);
  transition: background .15s, color .15s;
}

.menu-btn:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.menu-btn.active,
.menu-btn.active .tab {
  border-color: transparent;
  background: var(--sidebar-active);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .35);
}

.content {
  padding: 28px 32px 48px;
  background: var(--bg-page);
  min-height: 100vh;
}

/* 페이지 프레임 */
.mri-shell {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mri-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.mri-page-head h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.mri-page-head p,
.mri-page-sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
  max-width: 520px;
  line-height: 1.55;
}

/* 카드 — SaaS 스타일 */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.card.soft {
  background: var(--panel);
  box-shadow: none;
  border-color: var(--line);
}

.card.success {
  border-color: rgba(22, 163, 74, .2);
  background: linear-gradient(135deg, rgba(22, 163, 74, .04), var(--surface));
}

.card.danger {
  border-color: rgba(220, 38, 38, .18);
  background: linear-gradient(135deg, rgba(220, 38, 38, .03), var(--surface));
}

.card-clickable {
  transition: box-shadow .2s, transform .15s, border-color .2s;
}

.card-clickable:hover {
  border-color: rgba(220, 38, 38, .25);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.input-wrap {
  max-width: 720px;
  margin: 40px auto;
  padding: 0 16px;
}

.input-wrap > header h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.input-wrap > header p {
  color: var(--muted);
  font-size: 15px;
  margin-top: 8px;
}

.input-wrap > .card {
  padding: 28px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

/* 종합 보고서 */
.report-wrap {
  max-width: 1100px;
  gap: 24px;
}

/* 히어로 — 챕터 페이지 chapter-hero와 동일 계열 */
.report-hero .chapter-hero-inner,
.report-hero-inner {
  align-items: flex-start;
}

.report-hero-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 0 0 8px;
}

.report-hero-sub {
  margin-top: 8px;
}

.report-hero-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 14px;
}

.report-grade-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.report-hero-meta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.report-hero-score {
  flex-shrink: 0;
}

.report-section-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.report-overview-card .report-section-head {
  margin-bottom: 18px;
}

.report-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}

button.report-mini-card {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  cursor: pointer;
  text-align: center;
  margin: 0;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: box-shadow .2s, border-color .2s, transform .15s;
  color: inherit;
}

button.report-mini-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: rgba(220, 38, 38, .28);
  transform: translateY(-1px);
}

button.report-mini-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.report-mini-ic {
  font-size: 22px;
  line-height: 1;
}

.report-mini-score {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1;
}

.report-mini-lb {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.report-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.report-toc-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

.report-toc-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.report-toc-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 8px 12px;
  font-size: 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: background .15s, border-color .15s, color .15s;
}

.report-toc-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
}

.report-toc-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.report-chapter-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card.report-chapter {
  padding: 22px 24px 24px;
  gap: 18px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 20px;
}

.card.report-chapter .report-summary {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.report-chapter-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  cursor: pointer;
  padding: 0 0 4px;
  border-bottom: 1px solid var(--line-light);
  margin: 0 0 2px;
}

.report-chapter-hd:hover .report-chapter-title-text h3 {
  color: var(--brand);
}

.report-chapter-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.report-chapter-ic {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.report-chapter-title-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.report-chapter-title-text h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.25;
  transition: color .15s;
}

.report-infographic-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

.report-infographic-panel .report-infographic {
  padding: 0;
}

.report-swot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.report-swot-hd {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.report-swot-strengths .report-swot-hd {
  color: var(--ok);
}

.report-swot-weak .report-swot-hd {
  color: var(--bad);
}

.report-swot-col {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 14px 14px 16px;
  min-height: 64px;
}

.report-swot-strengths {
  background: linear-gradient(180deg, rgba(22, 163, 74, .06), var(--surface));
}

.report-swot-weak {
  background: linear-gradient(180deg, rgba(220, 38, 38, .06), var(--surface));
}

.report-swot-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.report-empty-hint {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

.report-actions-block {
  padding-top: 4px;
}

.report-actions-hd {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.report-type-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.report-paywall-banner {
  text-align: center;
  padding: 28px 24px;
  border-radius: var(--radius-xl);
  border: 1px dashed rgba(220, 38, 38, .28);
  background: linear-gradient(180deg, rgba(220, 38, 38, .04), var(--surface));
  box-shadow: var(--shadow-xs);
  display: grid;
  gap: 12px;
  justify-items: center;
}

.report-paywall-banner h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.report-paywall-banner p {
  color: var(--muted);
  max-width: 480px;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 720px) {
  .report-swot {
    grid-template-columns: 1fr;
  }

  .report-chapter-hd {
    flex-direction: column;
    align-items: stretch;
  }

  .report-hero-score {
    align-self: center;
  }

  .report-hero-badges {
    justify-content: center;
    text-align: center;
  }

  .report-hero-text {
    text-align: center;
    align-items: center;
  }

  .report-hero-text .mri-page-sub {
    max-width: none;
  }
}

/* 챕터 히어로 */
.chapter-hero {
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--panel) 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.chapter-hero-text h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* 그룹 바 / 분석 패널 */
.group-bars {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}

.analysis-panel {
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.analysis-stat {
  background: var(--panel);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.integration-banner-dash {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(22, 163, 74, .2);
  background: linear-gradient(135deg, rgba(22, 163, 74, .06), var(--surface));
  box-shadow: var(--shadow-xs);
}

/* 요금제 */
.pricing-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.pricing-card.pro {
  box-shadow: var(--shadow-md);
}

.pricing-faq {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

/* 탭 / 칩 */
.tab,
.link-btn,
.chip {
  border-radius: var(--radius-md);
  font-weight: 500;
}

.primary {
  border-radius: var(--radius-md);
  padding: 12px 18px;
  box-shadow: 0 2px 8px rgba(220, 38, 38, .25);
}

.primary:hover {
  box-shadow: 0 4px 14px rgba(220, 38, 38, .3);
  opacity: 1;
  transform: translateY(-1px);
}

/* 레이더 / 게이지 카드 */
.radar-wrap {
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

.gauge-panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.channel-bars-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.checklist-panel {
  border-radius: var(--radius-lg);
}

.pro-detail-btn {
  border-radius: var(--radius-lg);
}

.pro-detail-divider span {
  background: var(--bg-page);
}

[data-theme="dark"] .pro-detail-divider span {
  background: var(--bg-page);
}
