/* ============================================
   report.css — Land Development Analysis Report
   Professional A4-printable report styles
   Matches EXACT class names from report-renderer.js
   Works WITH the existing theme system (styles.css)
   ============================================ */

/* ============================================
   1. Page Layout & Container
   ============================================ */
.report-page {
  padding-top: 5rem;
  min-height: 100vh;
  background: var(--color-bg);
}

.report-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ============================================
   2. Floating Toolbar (print / back)
   ============================================ */
.report-page__toolbar {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 40;
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.report-page__toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: calc(var(--radius) - 4px);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: background var(--transition-speed) ease,
              color var(--transition-speed) ease,
              border-color var(--transition-speed) ease;
}

.report-page__toolbar button:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.report-page__toolbar button svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* ============================================
   3. Report Header
   ============================================ */
.report-header {
  padding: 2rem;
  margin-bottom: 2rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 4px solid var(--color-primary);
}

.report-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.report-header__title-group {
  flex: 1;
}

.report-header__title {
  font-family: var(--font-heading);
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.report-header__subtitle {
  font-size: 0.8125rem;
  color: var(--color-text);
  opacity: 0.45;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Grade badge — prominent bordered display */
.report-header__grade {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  border: 3px solid currentColor;
  flex-shrink: 0;
  text-align: center;
  gap: 0.125rem;
}

.report-header__grade-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

.report-header__grade-value {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
}

/* Meta grid — 4 columns desktop, 2 mobile */
.report-header__meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.report-header__meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background: var(--color-bg);
  border-radius: calc(var(--radius) - 4px);
}

.report-header__meta-label {
  font-size: 0.6875rem;
  font-weight: 500;
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.report-header__meta-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
}

/* Dates row */
.report-header__dates {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.75rem;
  opacity: 0.5;
}

/* ============================================
   4. Section Layout (repeating card wrapper)
   ============================================ */
.report-section {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.report-section__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  padding-left: 1rem;
  margin-bottom: 0.375rem;
  border-left: 4px solid var(--color-primary);
  line-height: 1.4;
}

.report-section__desc {
  font-size: 0.875rem;
  opacity: 0.55;
  padding-left: 1rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid transparent;
  line-height: 1.6;
}

.report-subsection__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* ============================================
   5. Summary (종합 분석 요약)
   ============================================ */
.report-summary__body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 1.5rem;
}

.report-summary__chart {
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.report-summary__chart svg {
  width: 100%;
  height: 100%;
}

.report-summary__scores {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

/* Overall grade box */
.report-summary__overall {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  border-radius: calc(var(--radius) - 4px);
  margin-bottom: 0.5rem;
}

.report-summary__overall-grade {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 800;
}

.report-summary__overall-desc {
  font-size: 0.8125rem;
  opacity: 0.6;
}

/* Individual score row */
.report-summary__score-row {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.report-summary__score-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-summary__score-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
}

.report-summary__score-value {
  font-size: 0.8125rem;
  font-weight: 700;
}

.report-summary__score-value small {
  font-weight: 500;
  opacity: 0.7;
  font-size: 0.75rem;
}

/* Score bar — horizontal progress */
.report-summary__score-bar {
  width: 100%;
  height: 0.5rem;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.report-summary__score-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.6s ease;
}

/* ============================================
   6. Status Classes (shared across sections)
   ============================================ */
.report-status--ok {
  background: rgba(47, 133, 90, 0.12);
  color: #2a8f6e;
}

.report-status--warn {
  background: rgba(192, 86, 33, 0.12);
  color: #b87d20;
}

.report-status--fail {
  background: rgba(197, 48, 48, 0.12);
  color: #c04040;
}

/* ============================================
   7. Regulatory (규제 적합성 분석)
   ============================================ */
.report-regulatory__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.report-regulatory__item {
  padding: 1rem 1.25rem;
  background: var(--color-bg);
  border-radius: calc(var(--radius) - 4px);
  border-left: 4px solid rgba(0, 0, 0, 0.1);
}

.report-regulatory__item.report-status--ok {
  border-left-color: #2F855A;
  background: var(--color-bg);
  color: var(--color-text);
}

.report-regulatory__item.report-status--warn {
  border-left-color: #C05621;
  background: var(--color-bg);
  color: var(--color-text);
}

.report-regulatory__item.report-status--fail {
  border-left-color: #C53030;
  background: var(--color-bg);
  color: var(--color-text);
}

.report-regulatory__item-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
}

.report-regulatory__item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.report-regulatory__item-icon svg {
  width: 16px;
  height: 16px;
}

.report-regulatory__item-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
  flex: 1;
}

/* Badge pill */
.report-regulatory__item-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}

.report-regulatory__item-badge.report-status--ok {
  background: rgba(47, 133, 90, 0.15);
  color: #2a8f6e;
}

.report-regulatory__item-badge.report-status--warn {
  background: rgba(192, 86, 33, 0.15);
  color: #b87d20;
}

.report-regulatory__item-badge.report-status--fail {
  background: rgba(197, 48, 48, 0.15);
  color: #c04040;
}

.report-regulatory__item-body {
  padding-left: 1.625rem;
}

.report-regulatory__item-detail {
  font-size: 0.8125rem;
  line-height: 1.6;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.report-regulatory__item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.75rem;
  opacity: 0.5;
}

.report-regulatory__item-source,
.report-regulatory__item-authority {
  display: inline-flex;
  align-items: center;
}

/* ============================================
   8. Location (입지 분석)
   ============================================ */
.report-location__subsection {
  margin-bottom: 1.5rem;
}

.report-location__subsection:last-child {
  margin-bottom: 0;
}

.report-location__table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.report-chart-wrap {
  background: var(--color-bg);
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-chart-wrap svg {
  width: 100%;
  height: auto;
}

.report-location__road {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.report-bullet-list {
  list-style: none;
  padding: 0;
}

.report-bullet-list li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--color-text);
  opacity: 0.75;
}

.report-bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--color-primary);
}

.report-bullet-list li:last-child {
  border-bottom: none;
}

/* ============================================
   9. Tables (used across sections)
   ============================================ */
.report-table-full {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.report-table-full thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.55;
  background: var(--color-bg);
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

.report-table-full thead th:first-child {
  border-radius: calc(var(--radius) - 4px) 0 0 0;
}

.report-table-full thead th:last-child {
  border-radius: 0 calc(var(--radius) - 4px) 0 0;
}

.report-table-full tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  vertical-align: middle;
}

.report-table-full tbody tr:last-child td {
  border-bottom: none;
}

.report-table-full tbody tr:hover {
  background: rgba(0, 0, 0, 0.015);
}

/* ============================================
   10. Key-Value Pairs
   ============================================ */
.report-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--color-bg);
  border-radius: calc(var(--radius) - 4px);
  font-size: 0.875rem;
}

.report-kv__key {
  font-weight: 500;
  opacity: 0.55;
  flex-shrink: 0;
}

.report-kv__val {
  font-weight: 700;
  color: var(--color-text);
  text-align: right;
}

/* ============================================
   11. Economic (경제성 분석)
   ============================================ */
.report-economic__subsection {
  margin-bottom: 1.5rem;
}

.report-economic__subsection:last-child {
  margin-bottom: 0;
}

.report-economic__building {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.report-economic__no-building {
  padding: 1.5rem;
  text-align: center;
  background: var(--color-bg);
  border-radius: calc(var(--radius) - 4px);
  font-size: 0.875rem;
  opacity: 0.6;
}

/* ROI Section */
.report-economic__roi {
  margin-top: 0.5rem;
}

.report-economic__roi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.report-economic__roi-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: var(--color-bg);
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
}

.report-economic__roi-card--highlight {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.report-economic__roi-label {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.375rem;
}

.report-economic__roi-card--highlight .report-economic__roi-label {
  opacity: 0.85;
  color: #fff;
}

.report-economic__roi-value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
}

.report-economic__roi-card--highlight .report-economic__roi-value {
  font-size: 2rem;
  color: #fff;
}

.report-economic__roi-note {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  text-align: center;
  padding: 0.625rem;
  background: var(--color-bg);
  border-radius: calc(var(--radius) - 4px);
  margin-bottom: 0.75rem;
}

.report-economic__roi-disclaimer {
  font-size: 0.75rem;
  opacity: 0.5;
  line-height: 1.5;
  text-align: center;
}

/* ============================================
   12. Environmental (환경 분석)
   ============================================ */
.report-environmental__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.report-environmental__card {
  padding: 1.25rem;
  background: var(--color-bg);
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.report-environmental__card-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.report-environmental__card-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.report-environmental__card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
}

.report-environmental__card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.report-environmental__level {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.report-environmental__level-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.report-environmental__grade {
  font-size: 0.8125rem;
  font-weight: 600;
  opacity: 0.7;
}

.report-environmental__detail {
  font-size: 0.8125rem;
  line-height: 1.6;
  opacity: 0.65;
}

/* EIA Section */
.report-environmental__eia {
  margin-top: 0.5rem;
}

.report-environmental__eia-required,
.report-environmental__eia-not-required {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: calc(var(--radius) - 4px);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-top: 0.75rem;
}

.report-environmental__eia-required {
  background: rgba(197, 48, 48, 0.06);
  border: 1px solid rgba(197, 48, 48, 0.15);
}

.report-environmental__eia-not-required {
  background: rgba(47, 133, 90, 0.06);
  border: 1px solid rgba(47, 133, 90, 0.15);
}

.report-environmental__eia-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.report-environmental__eia-badge--required {
  background: rgba(197, 48, 48, 0.15);
  color: #C53030;
}

.report-environmental__eia-badge--not-required {
  background: rgba(47, 133, 90, 0.15);
  color: #2F855A;
}

/* ============================================
   13. Current Issues (현안/정책)
   ============================================ */
.report-issues__master-plan {
  margin-bottom: 1.5rem;
}

.report-issues__master-plan-content {
  padding: 1rem 1.25rem;
  background: var(--color-bg);
  border-radius: calc(var(--radius) - 4px);
  font-size: 0.875rem;
  line-height: 1.7;
  opacity: 0.75;
  margin-top: 0.75rem;
}

.report-issues__policies {
  margin-bottom: 1.5rem;
}

.report-issues__policy-item {
  padding: 1.25rem;
  background: var(--color-bg);
  border-radius: calc(var(--radius) - 4px);
  margin-bottom: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.report-issues__policy-item:last-child {
  margin-bottom: 0;
}

.report-issues__policy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.report-issues__policy-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
}

.report-issues__policy-impact {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.report-issues__policy-body {
  font-size: 0.8125rem;
  line-height: 1.6;
  opacity: 0.7;
}

.report-issues__policy-date {
  display: block;
  font-size: 0.75rem;
  opacity: 0.55;
  margin-bottom: 0.375rem;
}

.report-issues__trends {
  margin-bottom: 0;
}

/* ============================================
   14. Actions (권장 조치사항)
   ============================================ */
.report-actions__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.report-actions__item {
  padding: 1.25rem;
  background: var(--color-bg);
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.report-actions__item-header {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-bottom: 0.75rem;
}

.report-actions__item-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  line-height: 1;
}

.report-actions__item-title-group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  flex: 1;
}

.report-actions__item-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
}

.report-actions__item-priority {
  font-size: 0.75rem;
  font-weight: 700;
}

.report-actions__item-body {
  padding-left: 2.625rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  opacity: 0.7;
}

.report-actions__item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.625rem;
  font-size: 0.75rem;
  opacity: 0.65;
}

.report-actions__item-authority,
.report-actions__item-deadline {
  display: inline-flex;
  align-items: center;
}

/* Priority modifier classes */
.report-priority--high {
  border-left: 3px solid #C53030;
}

.report-priority--medium {
  border-left: 3px solid #C05621;
}

.report-priority--low {
  border-left: 3px solid #718096;
}

/* ============================================
   15. Disclaimer
   ============================================ */
.report-disclaimer {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.report-disclaimer__box {
  padding: 1.5rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 2px dashed rgba(0, 0, 0, 0.15);
}

.report-disclaimer__title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.report-disclaimer__text {
  font-size: 0.8125rem;
  line-height: 1.7;
  opacity: 0.6;
  margin-bottom: 1rem;
}

.report-disclaimer__notices {
  font-size: 0.75rem;
  line-height: 1.7;
  opacity: 0.55;
}

.report-disclaimer__notices p {
  padding: 0.25rem 0;
}

/* ============================================
   16. SVG Charts
   ============================================ */
.report-chart-radar {
  max-width: 280px;
  height: auto;
}

.report-chart-bar {
  width: 100%;
  height: auto;
}

.report-chart-facility {
  width: 100%;
  height: auto;
}

.report-chart-empty {
  padding: 2rem;
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.45;
  font-style: italic;
}

/* ============================================
   17. Utility: Dividers
   ============================================ */
.report-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 1.5rem 0;
}

/* ============================================
   18. Responsive — Mobile (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
  .report-container {
    padding: 1rem 1rem 3rem;
  }

  /* Header */
  .report-header {
    padding: 1.5rem;
  }

  .report-header__top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .report-header__grade {
    width: 4.5rem;
    height: 4.5rem;
  }

  .report-header__grade-value {
    font-size: 1.75rem;
  }

  .report-header__meta {
    grid-template-columns: 1fr 1fr;
  }

  .report-header__dates {
    justify-content: center;
  }

  /* Section */
  .report-section {
    padding: 1.25rem;
  }

  /* Summary */
  .report-summary__body {
    grid-template-columns: 1fr;
  }

  .report-summary__chart {
    width: 100%;
    max-width: 280px;
    height: 280px;
    margin: 0 auto;
  }

  /* Location */
  .report-location__road {
    grid-template-columns: 1fr;
  }

  /* Economic */
  .report-economic__building {
    grid-template-columns: 1fr;
  }

  .report-economic__roi-grid {
    grid-template-columns: 1fr;
  }

  .report-economic__roi-card--highlight .report-economic__roi-value {
    font-size: 1.75rem;
  }

  /* Environmental */
  .report-environmental__grid {
    grid-template-columns: 1fr;
  }

  /* Actions */
  .report-actions__item-body {
    padding-left: 0;
  }

  .report-actions__item-header {
    gap: 0.625rem;
  }

  /* Toolbar */
  .report-page__toolbar {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    justify-content: center;
  }

  /* Tables */
  .report-table-full {
    font-size: 0.8125rem;
  }

  .report-table-full thead th,
  .report-table-full tbody td {
    padding: 0.5rem 0.625rem;
  }

  /* Issues */
  .report-issues__policy-header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Redevelopment */
  .report-redev__safety-grid {
    grid-template-columns: 1fr;
  }

  .report-redev__project-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .report-redev__project-distance {
    margin-left: 0;
  }

  .report-redev__project-info {
    flex-direction: column;
    gap: .25rem;
  }

  .report-redev__reg-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
  }
}

/* ============================================
   19. Responsive — Tablet (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) and (min-width: 769px) {
  .report-summary__body {
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
  }

  .report-summary__chart {
    width: 240px;
    height: 240px;
  }

  .report-header__meta {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   19b. Redevelopment Section (정비사업 분석)
   ============================================ */
.report-redevelopment {
  /* inherits .report-section */
}

.report-redev__subsection {
  margin-bottom: 1.5rem;
}

.report-redev__subsection:last-child {
  margin-bottom: 0;
}

.report-subsection__title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

/* -- Target site status -- */
.report-redev__target {
  background: var(--card, #f7fafc);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border, #e2e8f0);
}

.report-redev__target-status {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
  flex-wrap: wrap;
}

.report-redev__badge {
  display: inline-block;
  padding: .25rem .75rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.report-redev__type {
  font-size: .85rem;
  color: var(--text-muted, #718096);
  font-weight: 500;
}

.report-redev__target-detail {
  font-size: .85rem;
  line-height: 1.6;
  color: var(--text-muted, #4a5568);
  margin: 0;
}

/* -- Safety diagnosis -- */
.report-redev__safety {
  background: var(--card, #f7fafc);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border, #e2e8f0);
}

.report-redev__safety-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin-bottom: .75rem;
}

.report-redev__safety-detail {
  font-size: .85rem;
  line-height: 1.6;
  color: var(--text-muted, #4a5568);
  margin: 0 0 .25rem;
}

.report-redev__safety-note {
  font-size: .8rem;
  color: var(--text-muted, #a0aec0);
  margin: .25rem 0 0;
  font-style: italic;
}

/* -- Nearby projects -- */
.report-redev__projects {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.report-redev__project {
  background: var(--card, #f7fafc);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border, #e2e8f0);
  transition: box-shadow .15s;
}

.report-redev__project:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.report-redev__project-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
  flex-wrap: wrap;
}

.report-redev__project-type {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}

.report-redev__project-name {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text);
}

.report-redev__project-distance {
  margin-left: auto;
  font-size: .8rem;
  color: var(--text-muted, #a0aec0);
  white-space: nowrap;
}

.report-redev__project-body {
  /* body below header */
}

.report-redev__project-info {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--text-muted, #718096);
  margin-bottom: .35rem;
}

.report-redev__project-status {
  font-weight: 600;
}

.report-redev__project-timeline {
  font-size: .8rem;
  color: var(--text-muted, #718096);
  margin: .25rem 0 0;
}

.report-redev__project-impact {
  font-size: .8rem;
  color: var(--text);
  margin: .35rem 0 0;
  padding: .5rem .75rem;
  background: var(--accent, #3182ce)08;
  border-left: 3px solid var(--accent, #3182ce);
  border-radius: 0 4px 4px 0;
}

/* -- Regulations -- */
.report-redev__regs {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.report-redev__reg {
  background: var(--card, #f7fafc);
  border-radius: 8px;
  padding: .85rem 1.1rem;
  border: 1px solid var(--border, #e2e8f0);
}

.report-redev__reg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .35rem;
}

.report-redev__reg-name {
  font-weight: 600;
  font-size: .88rem;
  color: var(--text);
}

.report-redev__reg-applicable {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}

.report-redev__reg-detail {
  font-size: .82rem;
  line-height: 1.55;
  color: var(--text-muted, #4a5568);
  margin: 0;
}

/* -- Comparison note -- */
.report-redev__comparison-note {
  font-size: .78rem;
  color: var(--text-muted, #a0aec0);
  margin: .75rem 0 0;
  line-height: 1.5;
}

/* -- Summary -- */
.report-redev__summary {
  background: var(--card, #f7fafc);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border, #e2e8f0);
}

.report-redev__summary p {
  font-size: .88rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
}

/* ============================================
   20. Print Styles (CRITICAL)
   ============================================ */
@media print {
  /* -- Hide non-print elements ------------- */
  .navbar,
  .footer,
  .report-page__toolbar,
  .navbar__mobile {
    display: none !important;
  }

  /* -- Page setup --------------------------- */
  @page {
    size: A4;
    margin: 15mm;
  }

  /* -- Body and page ----------------------- */
  html, body {
    background: #fff !important;
    color: #111 !important;
    font-size: 11pt;
    line-height: 1.5;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-page {
    padding-top: 0;
    background: #fff !important;
  }

  .report-container {
    max-width: 100%;
    padding: 0;
  }

  /* -- Remove decorative box-shadows ------- */
  .report-header,
  .report-section,
  .report-economic__roi-card--highlight {
    box-shadow: none !important;
  }

  /* -- Surface backgrounds for print ------- */
  .report-section {
    background: #fff !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1rem;
  }

  .report-header {
    background: #fff !important;
    border: 1px solid #ddd;
    border-top: 4px solid #4A90D9;
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: none !important;
  }

  /* -- Page breaks ------------------------- */
  .report-section {
    page-break-before: always;
  }

  .report-section:first-of-type {
    page-break-before: auto;
  }

  .report-header {
    page-break-before: auto;
    page-break-after: auto;
  }

  /* Avoid breaking inside cards and tables */
  .report-environmental__card,
  .report-issues__policy-item,
  .report-actions__item,
  .report-economic__roi-card,
  .report-regulatory__item,
  .report-header__meta-item,
  .report-summary__chart,
  .report-chart-wrap {
    page-break-inside: avoid;
  }

  .report-table-full {
    page-break-inside: avoid;
  }

  /* -- Typography adjustments -------------- */
  .report-header__title {
    font-size: 16pt;
    color: #111;
  }

  .report-header__subtitle {
    font-size: 9pt;
    color: #555;
  }

  .report-section__title {
    font-size: 13pt;
    color: #111;
    border-left-color: #4A90D9;
  }

  .report-section__desc {
    font-size: 9pt;
  }

  .report-subsection__title {
    font-size: 11pt;
    color: #111;
  }

  .report-table-full {
    font-size: 9pt;
  }

  .report-table-full thead th {
    background: #f5f5f5 !important;
    color: #333;
    font-size: 8pt;
  }

  .report-table-full tbody td {
    border-bottom-color: #ddd;
  }

  /* -- Disclaimer in print ----------------- */
  .report-disclaimer {
    background: transparent !important;
    box-shadow: none !important;
  }

  .report-disclaimer__box {
    font-size: 7.5pt;
    border-style: solid;
    border-color: #ccc;
    background: #fafafa !important;
  }

  /* -- Grade badge in print ---------------- */
  .report-header__grade {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* -- Status badges in print -------------- */
  .report-regulatory__item-badge.report-status--ok {
    background: #e6f5ef !important;
    color: #1a7a55 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-regulatory__item-badge.report-status--warn {
    background: #fef3e0 !important;
    color: #9a6a10 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-regulatory__item-badge.report-status--fail {
    background: #fde8e8 !important;
    color: #a03030 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* -- Regulatory item borders in print ---- */
  .report-regulatory__item.report-status--ok {
    border-left-color: #2F855A !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-regulatory__item.report-status--warn {
    border-left-color: #C05621 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-regulatory__item.report-status--fail {
    border-left-color: #C53030 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* -- Score bars in print ----------------- */
  .report-summary__score-bar {
    background: #e8e8e8 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-summary__score-bar-fill {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* -- Environmental level badges ---------- */
  .report-environmental__level-badge {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-environmental__eia-badge--required,
  .report-environmental__eia-badge--not-required {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* -- ROI highlight card in print --------- */
  .report-economic__roi-card--highlight {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    border-radius: 4px;
  }

  /* -- Priority borders in print ----------- */
  .report-priority--high,
  .report-priority--medium,
  .report-priority--low {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* -- Action number badges in print ------- */
  .report-actions__item-number {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* -- Policy impact badges in print ------- */
  .report-issues__policy-impact {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* -- Redevelopment badges in print ------- */
  .report-redev__badge,
  .report-redev__project-type,
  .report-redev__reg-applicable {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-redev__project-impact {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    border-left-color: #666 !important;
  }

  .report-redev__safety-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* -- Background tinted elements ---------- */
  .report-header__meta-item,
  .report-kv,
  .report-regulatory__item,
  .report-economic__roi-card,
  .report-economic__no-building,
  .report-environmental__card,
  .report-issues__policy-item,
  .report-issues__master-plan-content,
  .report-actions__item,
  .report-summary__overall,
  .report-redev__target,
  .report-redev__safety,
  .report-redev__project,
  .report-redev__reg,
  .report-redev__summary {
    background: #f9f9f9 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* -- Charts: ensure SVG/canvas print ---- */
  .report-chart-wrap {
    background: #fff !important;
    border-color: #ddd;
  }

  .report-chart-wrap svg {
    max-width: 100%;
    height: auto;
  }

  /* -- Links: display URL after text ------ */
  .report-section a[href]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    opacity: 0.5;
    word-break: break-all;
  }

  .report-section a[href^="#"]::after,
  .report-section a[href^="javascript"]::after {
    content: "";
  }

  /* -- Layout: flatten grids for print ---- */
  .report-summary__body {
    grid-template-columns: 240px 1fr;
  }

  .report-header__meta {
    grid-template-columns: repeat(4, 1fr);
  }

  .report-environmental__grid {
    grid-template-columns: 1fr 1fr;
  }

  .report-economic__roi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .report-economic__building {
    grid-template-columns: 1fr 1fr;
  }

  .report-location__road {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* ============================================
   PAYWALL OVERLAY (dormant — controlled by FREE_MODE)
   ============================================ */

/* Blur overlay for locked sections */
.report-paywall {
  position: relative;
}

.report-paywall--locked .report-paywall__content {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.report-paywall__overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(2px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  border-radius: 12px;
}

.report-paywall--locked .report-paywall__overlay {
  display: flex;
}

.report-paywall__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.report-paywall__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text, #1a202c);
  margin-bottom: 0.5rem;
}

.report-paywall__desc {
  font-size: 0.88rem;
  color: var(--text-muted, #718096);
  margin-bottom: 1.25rem;
  max-width: 320px;
}

.report-paywall__btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent, #3182ce);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.report-paywall__btn:hover {
  background: #2b6cb0;
}

@media print {
  .report-paywall__overlay {
    display: none !important;
  }
  .report-paywall--locked .report-paywall__content {
    filter: none;
    pointer-events: auto;
  }
}
