.segment-page {
  min-height: 100vh;
}

.segment-page .hero {
  padding-bottom: 72px;
}

/* ── Hero title sizing fix for Korean text ── */
.segment-page .hero h1 {
  font-size: clamp(1.8rem, 1.4rem + 2vw, 2.8rem) !important;
  line-height: 1.3;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.segment-page .hero-grid {
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
  gap: 48px;
}

.segment-page .hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Hero stats fix ── */
.segment-page .hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.segment-page .hero-stats .stat-card {
  padding: 14px 12px;
  text-align: center;
}

.segment-page .hero-stats .stat-number {
  font-size: 1.1rem;
  font-weight: 800;
}

.segment-page .hero-stats .stat-label {
  font-size: 0.72rem;
  color: #64748b;
}

/* ── CTA buttons layout ── */
.segment-page .hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.segment-page .hero-cta .changho-btn-primary,
.segment-page .hero-cta .changho-btn {
  font-size: 0.88rem;
  padding: 10px 20px;
  white-space: nowrap;
}

.segment-page .hero-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
  border-top: 4px solid rgba(26, 54, 93, 0.12);
}

.hero-panel-kicker {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(26, 54, 93, 0.08);
  color: var(--changho-accent, #1a365d);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-panel-title {
  font-size: clamp(1.15rem, 1.5vw, 1.5rem);
  font-weight: 800;
  line-height: 1.4;
  color: #0f172a;
  word-break: keep-all;
}

.hero-panel-description {
  font-size: 0.98rem;
  color: #475569;
  line-height: 1.7;
}

.hero-panel-points {
  display: grid;
  gap: 14px;
}

.hero-panel-point {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.hero-panel-point-icon {
  font-size: 1.1rem;
  line-height: 1;
  color: var(--changho-accent, #1a365d);
}

.hero-panel-point p {
  margin: 0;
  color: #334155;
  font-size: 0.93rem;
  line-height: 1.6;
}

.segment-page .section-header {
  margin-bottom: 44px;
}

.segment-page .section-header p {
  max-width: 760px;
}

.segment-page .solution-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.segment-page .solution-card {
  align-items: flex-start;
  text-align: left;
  gap: 0;
}

.solution-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: 14px;
}

.solution-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.solution-card-badge--official {
  background: rgba(52, 152, 219, 0.12);
  color: #1d4ed8;
}

.solution-card-badge--exclusive {
  background: rgba(184, 149, 106, 0.18);
  color: #8b5e34;
}

.solution-card-badge--reseller {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.solution-card-badge--special {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.solution-card-badge--own {
  background: rgba(147, 51, 234, 0.12);
  color: #7e22ce;
}

.solution-card-badge--partner {
  background: rgba(255, 152, 0, 0.14);
  color: #e65100;
}

.segment-page .solution-card .card-icon {
  margin-bottom: 0;
}

.segment-page .solution-card p {
  margin-bottom: 22px;
}

.proof-section {
  padding: 80px 0;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.proof-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 2px 12px rgba(26, 54, 93, 0.08);
}

.proof-card .card-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.proof-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.proof-card p {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
}

/* Expanded solution cards with details */
.solution-card--expanded {
  display: flex;
  flex-direction: column;
}

.solution-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.solution-detail {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}

.solution-detail-icon {
  font-size: 1.1rem;
  line-height: 1.2;
}

.solution-detail strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  display: block;
}

.solution-detail p {
  font-size: 0.82rem;
  color: #64748b;
  margin: 2px 0 0;
  line-height: 1.5;
}

.solution-disclaimer {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: #92400e;
  margin: 0;
}

@media (max-width: 1024px) {
  .segment-page .hero-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .segment-page .hero {
    padding-bottom: 72px;
  }

  .segment-page .hero-card {
    padding: 28px 24px;
  }

  .hero-panel-point {
    grid-template-columns: 10px 1fr;
    gap: 10px;
  }

  .segment-page .solution-grid,
  .proof-grid {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }

  .stack-tier-header {
    padding: 0 20px;
  }
}

/* ── Flow tier label ── */
.flow-tier-label {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 24px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(102,126,234,0.10) 0%, rgba(102,126,234,0.04) 100%);
  border-radius: 12px;
  border-left: 5px solid #667eea;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

/* ── Flow-track layout (고민 → 도구, minimal) ── */
.flow-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 22px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  border-top: 3px solid rgba(102,126,234,0.3);
  box-shadow: 0 2px 8px rgba(26, 54, 93, 0.05);
  text-decoration: none;
  transition: box-shadow 0.3s, transform 0.2s, border-color 0.3s;
}

.flow-step:hover {
  box-shadow: 0 8px 24px rgba(26, 54, 93, 0.12);
  transform: translateY(-3px);
}

.flow-need-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
  line-height: 1.55;
  word-break: keep-all;
  margin: 0;
  min-height: 2.8em;
}

.flow-divider {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #cbd5e1, #e2e8f0);
  margin: 18px auto;
  border-radius: 1px;
}

.flow-answer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.flow-tool-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 6px;
}

.flow-tool-name {
  font-weight: 800;
  font-size: 1.1rem;
  color: #4c63b6;
}

/* ── Per-tier color accents ── */
.stack-tier:nth-child(1) .flow-tier-label {
  border-left-color: #667eea;
  background: linear-gradient(135deg, rgba(102,126,234,0.10) 0%, rgba(102,126,234,0.04) 100%);
}
.stack-tier:nth-child(1) .flow-step { border-top-color: rgba(102,126,234,0.35); }
.stack-tier:nth-child(1) .flow-tool-name { color: #4c63b6; }

.stack-tier:nth-child(2) .flow-tier-label {
  border-left-color: #10b981;
  background: linear-gradient(135deg, rgba(16,185,129,0.10) 0%, rgba(16,185,129,0.04) 100%);
}
.stack-tier:nth-child(2) .flow-step { border-top-color: rgba(16,185,129,0.35); }
.stack-tier:nth-child(2) .flow-tool-name { color: #047857; }

.stack-tier:nth-child(3) .flow-tier-label {
  border-left-color: #f59e0b;
  background: linear-gradient(135deg, rgba(245,158,11,0.10) 0%, rgba(245,158,11,0.04) 100%);
}
.stack-tier:nth-child(3) .flow-step { border-top-color: rgba(245,158,11,0.35); }
.stack-tier:nth-child(3) .flow-tool-name { color: #b45309; }

/* ── Collapsible tiers ── */
.stack-tier-details {
  margin-top: 8px;
}

.stack-tier-toggle {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--changho-accent, #1a365d);
  padding: 12px 0;
  list-style: none;
  text-align: center;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.stack-tier-toggle:hover {
  opacity: 1;
}

.stack-tier-toggle::-webkit-details-marker {
  display: none;
}

@media (max-width: 768px) {
  .flow-track {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .flow-step {
    padding: 24px 18px;
    border-top-width: 3px;
  }

  .flow-tier-label {
    font-size: 1.2rem;
    padding: 12px 16px;
  }

  .stack-tier {
    padding: 24px 16px;
    border-radius: 12px;
  }

  #stack-grid:has(.stack-tier) {
    gap: 12px;
  }
}

/* ── Tiered stack layout ── */
/* When stack-grid contains tiers, override grid to flex column */
#stack-grid:has(.stack-tier) {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stack-tier {
  margin-bottom: 0;
  padding: 32px 28px;
  border-radius: 16px;
}

.stack-tier:nth-child(odd) {
  background: #ffffff;
}

.stack-tier:nth-child(even) {
  background: #f8fafc;
}

.stack-tier:last-child {
  margin-bottom: 0;
}

.stack-tier-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}

.stack-tier-label {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1a365d;
  margin: 0;
}

.stack-tier-sublabel {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

/* ── Compact cards (tier 3) ── */
.solution-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 12px !important;
}

.solution-card--compact {
  padding: 16px 14px !important;
  gap: 0;
}

.solution-card--compact .card-icon {
  font-size: 1.4rem !important;
}

.solution-card--compact h3 {
  font-size: 0.9rem !important;
}

.solution-card--compact p {
  font-size: 0.78rem !important;
  margin-bottom: 10px !important;
  color: #64748b;
}

.solution-card--compact .card-link {
  font-size: 0.75rem !important;
}
