/* ARBITORIA — charge.css
 * Plan:   docs/01-plan/features/charge.plan.md
 * Design: docs/02-design/features/charge.design.md §6, §7, §8
 *
 * 컴포넌트별 격리 (memory: feedback_css_component_isolation 7 룰):
 *   - charge-* prefix 모든 클래스
 *   - 다른 카테고리 (salary 등) 와 충돌 ❌
 *   - tokens.css / style.css 의 변수 사용
 */

/* ===== 공통 wrap — 좌측 정렬선 통일 (2026-05-07)
 * style.css 의 [data-arb-component] .wrap 은 1200px 인데
 * .charge-hero / .charge-5axis 는 data-arb-component 가 없어 기본 1280px 로 폴백되어
 * 좌측 라인이 다른 섹션보다 20px 들쭉날쭉했음. breadcrumb (1200) + 다른 섹션 (1200) 과 통일.
 */
.charge-hero .wrap,
.charge-5axis .wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Hero ===== */
.charge-hero {
  padding: clamp(40px, 6vw, 72px) 0 24px;
  background: linear-gradient(180deg, rgba(116, 78, 200, .08), transparent 70%);
}
.charge-hero .eyebrow {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.charge-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin: 0 0 12px;
  line-height: 1.15;
}
.charge-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  opacity: 0.85;
  margin: 0 0 24px;
}
.charge-hero-card {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.charge-hero-card .hero-num {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
}
.charge-hero-card .hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  opacity: 0.75;
}
.charge-hero-card .hero-pct {
  color: rgb(170, 220, 170);
  font-weight: 600;
}

/* ===== Items table ===== */
.charge-items {
  padding: 32px 0;
}
.charge-items-table,
.charge-households-table,
.charge-providers-table,
.charge-income-matrix {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.95rem;
}
.charge-items-table th,
.charge-items-table td,
.charge-households-table th,
.charge-households-table td,
.charge-providers-table th,
.charge-providers-table td,
.charge-income-matrix th,
.charge-income-matrix td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.charge-items-table th,
.charge-households-table th,
.charge-providers-table th,
.charge-income-matrix th {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}
.charge-item-icon {
  display: inline-block;
  margin-right: 6px;
}
.charge-item-cs {
  color: rgb(255, 200, 100);
  font-size: 0.8rem;
  margin-left: 4px;
}
.charge-item-mirror {
  font-size: 0.85rem;
  opacity: 0.85;
  max-width: 32em;
}

/* ===== Income matrix cells (color-coded) ===== */
.charge-ratio-cell {
  text-align: center;
  font-weight: 600;
}
.charge-ratio-low  { color: rgb(170, 220, 170); }
.charge-ratio-mid  { color: rgb(240, 210, 130); }
.charge-ratio-high { color: rgb(240, 130, 130); }

/* ===== Widget ===== */
.charge-widget-section {
  padding: 24px 0;
}
.charge-widget {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 640px;
}
.charge-widget-head h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}
.charge-widget-lede {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.75;
}
.charge-widget-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .charge-widget-body { grid-template-columns: 1fr; }
}
.charge-widget-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.charge-widget-label {
  font-size: 0.85rem;
  opacity: 0.85;
}
.charge-widget-field input,
.charge-widget-field select {
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: inherit;
  font-size: 1rem;
}
.charge-widget-output {
  display: block;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}
.charge-widget-result-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}
.charge-widget-result-amount {
  font-size: 1.4rem;
  font-weight: 700;
}
.charge-widget-result-pct {
  font-size: 1.1rem;
  color: rgb(180, 200, 240);
  font-weight: 600;
}
.charge-widget-result-msg {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.75;
}

/* ===== State toggle (US 50개 주) ===== */
.charge-state-toggle {
  padding: 16px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  margin: 24px 0;
}
.charge-state-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}
.charge-state-label-text {
  opacity: 0.8;
}
.charge-state-label select {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: inherit;
}
.charge-state-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.charge-state-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  font-family: inherit;
}
.charge-state-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.20);
}
.charge-state-btn:active {
  transform: translateY(1px);
}
.charge-state-btn.is-active {
  background: rgba(180, 130, 230, 0.18);
  border-color: rgba(180, 130, 230, 0.50);
  color: rgb(230, 200, 255);
}
.charge-state-btn:focus-visible {
  outline: 2px solid rgba(180, 130, 230, 0.70);
  outline-offset: 2px;
}
.charge-state-output {
  margin-top: 8px;
  font-size: 0.85rem;
  opacity: 0.85;
}
.charge-state-output-empty {
  color: rgb(220, 180, 130);
}

/* ===== US 5-state breakdown table (Stage 1) ===== */
.charge-us-breakdown {
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.charge-us-bd-tablewrap {
  overflow-x: auto;
  margin-top: 16px;
  -webkit-overflow-scrolling: touch;
}
.charge-us-bd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 560px;
}
.charge-us-bd-table th,
.charge-us-bd-table td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}
.charge-us-bd-table th:first-child,
.charge-us-bd-table td:first-child {
  text-align: left;
  white-space: normal;
}
.charge-us-bd-table thead th {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}
.charge-us-bd-table .charge-bd-name {
  font-weight: 500;
}
.charge-us-bd-table .charge-bd-total td {
  border-top: 2px solid rgba(255, 255, 255, 0.18);
  border-bottom: none;
  padding-top: 14px;
  font-size: 1rem;
}
.charge-us-bd-table .charge-bd-pct td {
  font-size: 0.85rem;
  opacity: 0.8;
  border-bottom: none;
}
.charge-us-bd-table .is-current-state {
  background: rgba(180, 130, 230, 0.12);
  color: rgb(220, 190, 250);
}
.charge-us-bd-table thead th.is-current-state {
  background: rgba(180, 130, 230, 0.20);
  color: rgb(230, 200, 255);
}

/* ===== Hero state-aware swap (US) ===== */
.hero-num[data-state-hero][hidden],
.hero-pct[data-state-hero][hidden] {
  display: none !important;
}
.hero-state-tag {
  display: inline-block;
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  margin-right: 8px;
  border-radius: 6px;
  background: rgba(180, 130, 230, 0.18);
  color: rgb(220, 190, 250);
  vertical-align: middle;
}

/* ===== Compare page ===== */
.charge-compare-hero {
  padding: clamp(40px, 6vw, 72px) 0 24px;
  background: linear-gradient(180deg, rgba(180, 80, 180, .08), transparent 70%);
}
.charge-compare-question {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  line-height: 1.25;
  margin: 0 0 12px;
}
.charge-compare-disclaimer {
  font-size: 0.95rem;
  opacity: 0.75;
  font-style: italic;
}

/* Bar chart (CSS only — R-004) */
.charge-bar-chart {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.charge-bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 100px;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}
.charge-bar-label {
  text-align: right;
  font-weight: 500;
  opacity: 0.9;
}
.charge-bar-track {
  position: relative;
  height: 18px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  overflow: hidden;
}
.charge-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgb(140, 110, 220), rgb(190, 140, 230));
  border-radius: 9px;
  transition: width 0.4s ease;
}
.charge-bar-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
@media (max-width: 600px) {
  .charge-bar-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .charge-bar-label, .charge-bar-value { text-align: left; }
}

/* Quality vs Image grid */
.charge-qi-grid {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.charge-qi-cell {
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.charge-qi-name {
  margin: 0 0 8px;
  font-size: 1rem;
}
.charge-qi-quality, .charge-qi-image {
  margin: 4px 0;
  font-size: 0.9rem;
}
.charge-qi-tag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(140, 110, 220, 0.15);
  color: rgb(180, 160, 240);
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-right: 6px;
  letter-spacing: 0.04em;
}
.charge-qi-tag-image {
  background: rgba(220, 140, 180, 0.15);
  color: rgb(240, 180, 210);
}

.charge-marketing-box,
.charge-mirror-box {
  padding: 16px 20px;
  border-radius: 12px;
  margin-top: 16px;
}
.charge-marketing-box {
  background: rgba(120, 180, 220, 0.08);
  border-left: 3px solid rgba(120, 180, 220, 0.5);
}
.charge-mirror-box {
  background: rgba(220, 180, 120, 0.08);
  border-left: 3px solid rgba(220, 180, 120, 0.5);
}
.charge-marketing-box p,
.charge-mirror-box p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.charge-compare-cta {
  text-align: center;
  padding: 28px 0;
}
.charge-compare-cta-text {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 600;
  margin: 0;
  color: rgb(220, 200, 140);
}

.charge-compare-disclaimer-box {
  padding: 12px 0;
  font-size: 0.85rem;
  opacity: 0.7;
  text-align: center;
  font-style: italic;
}

.charge-source-list {
  list-style: disc;
  padding-left: 20px;
  margin: 12px 0 0;
}
.charge-source-list li { margin: 4px 0; }
.charge-source-list a { color: rgb(180, 200, 240); }

/* ===== Culture page ===== */
.charge-culture-hero {
  padding: clamp(40px, 6vw, 72px) 0 16px;
  background: linear-gradient(180deg, rgba(80, 180, 140, .08), transparent 70%);
}
.charge-culture-title {
  font-size: clamp(1.5rem, 3.8vw, 2.2rem);
  margin: 0 0 12px;
  line-height: 1.2;
}
.charge-culture-disclaimer {
  font-size: 0.9rem;
  opacity: 0.75;
  font-style: italic;
}
.charge-culture-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(120, 200, 160, 0.12);
  color: rgb(160, 220, 180);
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 8px;
}
.charge-culture-tag-subjective {
  background: rgba(220, 160, 200, 0.12);
  color: rgb(240, 180, 220);
}
/* Objective vs Subjective box separation */
.culture-box-objective {
  padding: 28px 0;
}
.culture-box-subjective {
  padding: 28px 0;
  background: linear-gradient(180deg, rgba(220, 160, 200, .04), transparent);
  border-top: 1px dashed rgba(220, 160, 200, 0.2);
  border-bottom: 1px dashed rgba(220, 160, 200, 0.2);
}
.charge-culture-block {
  margin-top: 12px;
}
.charge-culture-block-title {
  font-size: 1.1rem;
  margin: 0 0 8px;
}
.charge-culture-block-body p {
  margin: 0 0 12px;
  line-height: 1.7;
  font-size: 0.98rem;
}

.charge-diary-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.charge-diary-entry {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}
.charge-diary-head {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
}
.charge-diary-head time {
  font-size: 0.8rem;
  opacity: 0.6;
}
.charge-diary-head h4 {
  margin: 0;
  font-size: 1rem;
}

.charge-empty {
  padding: 16px;
  text-align: center;
  font-style: italic;
  opacity: 0.6;
}

.charge-culture-tax-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(120, 80, 180, 0.1);
  border: 1px solid rgba(180, 130, 230, 0.25);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  margin-top: 16px;
  transition: transform 0.15s ease, background 0.15s ease;
}
.charge-culture-tax-card:hover {
  transform: translateY(-1px);
  background: rgba(140, 100, 200, 0.15);
}
.charge-culture-tax-icon { font-size: 1.4rem; }

/* ===== 5-axis cross-link ===== */
.charge-5axis {
  margin: 32px 0;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
}
.charge-5axis h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.charge-5axis-lede {
  font-size: 0.9rem;
  opacity: 0.75;
  margin: 0 0 12px;
}
.charge-5axis-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.charge-5axis-list .axis a,
.charge-5axis-list .axis > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.charge-5axis-list .axis-active a {
  background: rgba(140, 200, 140, 0.1);
  border-color: rgba(140, 200, 140, 0.3);
  color: rgb(180, 230, 180);
}
.charge-5axis-list .axis-current > span {
  background: rgba(180, 130, 230, 0.15);
  border-color: rgba(180, 130, 230, 0.4);
  color: rgb(220, 190, 250);
  font-weight: 600;
}
.charge-5axis-list .axis-soon a {
  opacity: 0.7;
  background: rgba(255, 255, 255, 0.025);
}
.charge-5axis-list .axis-soon a:hover { opacity: 1; }
.axis-icon { font-size: 1rem; }

/* ===== Choicecountry hub ===== */
.charge-choice-hero {
  padding: clamp(40px, 6vw, 72px) 0 24px;
}
.charge-choice-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.charge-choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: transform 0.15s ease, background 0.15s ease;
}
.charge-choice-card:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.06); }
.charge-choice-card.is-coming {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}
.charge-choice-flag { font-size: 2.4rem; }
.charge-choice-name { font-weight: 600; font-size: 1.05rem; }
.charge-choice-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.charge-choice-status-active {
  background: rgba(140, 200, 140, 0.15);
  color: rgb(180, 230, 180);
}
.charge-choice-status-coming {
  background: rgba(220, 180, 130, 0.15);
  color: rgb(240, 210, 160);
}

/* ===== Deep-dive grid (main page) ===== */
.charge-deep-dive { padding: 32px 0; }
.charge-deep-dive .deep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.charge-deep-dive .deep-card {
  display: block;
  padding: 20px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.15s ease;
}
.charge-deep-dive .deep-card:hover { transform: translateY(-2px); }
.charge-deep-dive .deep-card h3 { margin-top: 0; }
.charge-deep-dive .deep-card p { margin: 0; opacity: 0.85; }

/* ===== Sources section ===== */
.charge-sources {
  padding: 24px 0 48px;
  font-size: 0.9rem;
  opacity: 0.85;
}
.charge-source-line { margin: 8px 0; }
.charge-source-meta { font-size: 0.85rem; opacity: 0.7; }

/* ===== cat-rail-chip is-partial — 폐기됨 (2026-05-27 단일 통일 .is-current 그라디언트 채움) ===== */
