/* ============================================================
   EXITS DETAIL – muted warm amber-beige pattern (no red)
   Professional, grounded, premium warm tones – no glow/neon
============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  color: #f3f4f6; /* warm off-white */
  background: #0b132b;
}

/* Hero – softer, no heavy gradient */
.detail-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 2rem 9rem;
  background: #0f172a;
  overflow: hidden;
}

.hero-bg-grain {
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="3"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/></filter><rect width="100" height="100" filter="url(%23n)" opacity="0.05"/></svg>');
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 960px;
}

.detail-hero h1 {
  font-size: clamp(3.2rem, 8vw, 5.4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #d97706;
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 12px rgba(217,119,6,0.15);
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: #fbbf24;
  opacity: 0.94;
  max-width: 800px;
  margin: 0 auto;
  font-weight: 400;
}

/* Main Content */
.detail-content {
  padding: 6rem 2rem 10rem;
  max-width: 1320px;
  margin: 0 auto;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  margin-bottom: 7rem;
}

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Cards */
.info-card,
.visual-card {
  background: rgba(30,41,59,0.88);
  border: 1px solid rgba(217,119,6,0.20);
  border-radius: 1.6rem;
  padding: 2.8rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.28), inset 0 0 16px rgba(217,119,6,0.06);
  transition: all 0.4s ease;
}

.info-card:hover,
.visual-card:hover {
  transform: translateY(-3px);
  border-color: rgba(217,119,6,0.38);
  box-shadow: 0 16px 48px rgba(0,0,0,0.32), inset 0 0 20px rgba(217,119,6,0.10);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
  justify-content: center;
  text-align: center;
}

.card-header i {
  font-size: 2.4rem;
  color: #d97706;
}

.card-header h2,
.visual-header h3 {
  font-size: 2rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: -0.01em;
  text-align: center;
}

/* Formula Section */
.formula-section {
  margin-bottom: 7rem;
}

.formula-section h2 {
  font-size: 2.4rem;
  text-align: center;
  color: #fbbf24;
  margin-bottom: 2rem;
}

.main-formula {
  background: rgba(217,119,6,0.06);
  border: 1px solid rgba(217,119,6,0.22);
  border-radius: 1.4rem;
  padding: 2.5rem;
  box-shadow: 0 6px 24px rgba(217,119,6,0.10);
}

.formula-main {
  font-size: 1.9rem;
  font-weight: 700;
  color: #fbbf24;
  text-align: center;
  margin-bottom: 1.8rem;
  padding: 1.2rem;
  background: rgba(217,119,6,0.09);
  border-radius: 1rem;
}

.formula-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.formula-breakdown {
  background: rgba(217,119,6,0.06);
  border: 1px solid rgba(217,119,6,0.18);
  border-radius: 1rem;
  padding: 1.2rem;
  text-align: center;
}

.formula-breakdown .label {
  font-size: 1rem;
  color: #d1d5db;
  display: block;
  margin-bottom: 0.4rem;
}

.formula-breakdown .value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #d97706;
}

.formula-note {
  text-align: center;
  font-size: 1.05rem;
  color: #9ca3af;
  margin-top: 1.8rem;
  font-style: italic;
}

/* Example Section */
.example-section h2 {
  font-size: 2.4rem;
  text-align: center;
  color: #fbbf24;
  margin-bottom: 2rem;
}

.example-intro {
  font-size: 1.25rem;
  text-align: center;
  color: #f3f4f6;
  max-width: 900px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.scenario-flow {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.scenario-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: #d97706;
  color: #0f172a;
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(217,119,6,0.22);
}

.step-content {
  flex: 1;
}

.step-content h3 {
  font-size: 1.5rem;
  color: #fbbf24;
  margin-bottom: 0.8rem;
  border-bottom: 2px solid rgba(251,191,36,0.22);
  padding-bottom: 0.4rem;
}

.step-content p {
  font-size: 1.1rem;
  color: #d1d5db;
  line-height: 1.6;
}

/* Visual / Chart */
.visual-section h2 {
  font-size: 2.4rem;
  text-align: center;
  color: #fbbf24;
  margin-bottom: 2rem;
}

.chart-wrapper {
  width: 100%;
  max-width: 1000px;
  height: auto;
  aspect-ratio: 760 / 440;
  max-height: 480px;
  margin: 0 auto 2.5rem;
  background: #0f172a;
  border-radius: 1.4rem;
  overflow: visible;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.6);
}

.exit-chart {
  width: 100%;
  height: 100%;
  display: block;
}

/* Takeaway – under graph */
.chart-takeaway {
  text-align: center;
  font-size: 1.1rem;
  font-style: italic;
  color: #92400e;
  background: rgba(217,119,6,0.07);
  border: 1px solid rgba(217,119,6,0.22);
  border-radius: 1rem;
  padding: 1.4rem 2rem;
  box-shadow: 0 4px 16px rgba(217,119,6,0.12);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto 4rem auto;
}

.takeaway-main {
  font-size: 1.25rem;
  text-align: center;
  color: #92400e;
  background: rgba(217,119,6,0.07);
  border: 1px solid rgba(217,119,6,0.22);
  border-radius: 1rem;
  padding: 1.4rem 2rem;
  box-shadow: 0 4px 16px rgba(217,119,6,0.12);
  line-height: 1.6;
  max-width: 680px;
  margin: 2rem auto;
}

/* Extra Info */
.extra-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-bottom: 7rem;
}

.info-item {
  background: rgba(30,41,59,0.75);
  border: 1px solid rgba(217,119,6,0.16);
  border-radius: 1.4rem;
  padding: 2.2rem;
  text-align: center;
  transition: all 0.4s ease;
}

.info-item:hover {
  transform: translateY(-6px);
  border-color: rgba(217,119,6,0.35);
}

.info-item i {
  font-size: 2.4rem;
  color: #d97706;
  margin-bottom: 1.2rem;
}

.info-item h4 {
  font-size: 1.45rem;
  color: #fbbf24;
  margin-bottom: 0.9rem;
}

/* Back Link */
.back-link {
  text-align: center;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 2.5rem;
  background: rgba(217,119,6,0.14);
  border: 1px solid rgba(217,119,6,0.30);
  border-radius: 1.1rem;
  color: #fbbf24;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.4s ease;
}

.btn-back:hover {
  background: rgba(217,119,6,0.22);
  transform: translateY(-3px);
  border-color: #d97706;
  box-shadow: 0 6px 20px rgba(217,119,6,0.20);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(35px);
  animation: fadeInUp 1s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .detail-hero {
    padding: 6rem 1.5rem 8rem;
  }
  .content-grid {
    gap: 3rem;
  }
  .detail-content {
    padding: 5rem 1.5rem 8rem;
  }
  .main-formula {
    padding: 2rem;
  }
  .chart-wrapper {
    max-height: 380px;
  }
  .chart-takeaway {
    font-size: 1rem;
    padding: 1.2rem 1.6rem;
    margin-bottom: 3rem;
  }
}

@media (max-width: 640px) {
  .chart-wrapper {
    aspect-ratio: 4 / 3;
  }
}