    /* PAGE WRAPPER */
.hw-page {
  width: 100%;
}

/* SECTION */
.hw-section {
  min-height: calc(100vh - 80px); /* header-safe height */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

.hw-inner {
  text-align: center;
  max-width: 900px;
  opacity: 0;
  transform: translateY(30px);
  transition: 
    opacity 0.8s ease,
    transform 0.8s ease;
}

.hw-section.is-active .hw-inner {
  opacity: 1;
  transform: translateY(0);
}

.hw-section.is-active .fifo-row .share:first-child {
  transform: translateY(40px);
  opacity: 0;
}

.hw-section:nth-child(even) {
  background: #f8fafc; /* subtle section separation */
}

.hw-intro::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  width: 900px;
  height: 900px;
  background: radial-gradient(
    circle,
    rgba(41, 108, 165, 0.08),
    transparent 70%
  );
  transform: translateX(-50%);
  pointer-events: none;
}

.hw-intro .hw-lead {
  font-size: 19px;
  line-height: 1.6;
  color: #1f2937;
}

.hw-intro .hw-trust {
  margin-top: 20px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.hw-inner h1 {
  transition: transform 0.6s ease, opacity 0.6s ease;
  transform: translateY(10px);
  opacity: 0;
  margin-bottom: 20px;
}

.hw-inner .hw-lead {
  transition: transform 0.6s ease 0.15s, opacity 0.6s ease 0.15s;
  transform: translateY(10px);
  opacity: 0;
}

.hw-inner .hw-trust {
  transition: transform 0.6s ease 0.3s, opacity 0.6s ease 0.3s;
  transform: translateY(10px);
  opacity: 0;
}

.hw-section.is-active h1,
.hw-section.is-active .hw-lead,
.hw-section.is-active .hw-trust {
  transform: translateY(0);
  opacity: 1;
}

.hw-inner h2 {
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #0a2842;
  margin-bottom: 18px;
}

/* PARAGRAPHS */
.hw-inner p {
  font-size: 17px;
  line-height: 1.65;
  color: #334155;
  margin-bottom: 16px;
}

.hw-lead {
  font-size: 18px;
  max-width: 700px;
  margin: 0 auto 12px;
}

.hw-trust {
  font-size: 13px;
  opacity: 0.7;
}

/* VISUAL PLACEHOLDERS */
.hw-visual {
  margin-top: 30px;
  display: flex;
  justify-content: center;
}

/* PORTFOLIO BOX */
.box {
  padding: 30px 40px;
  border: 2px dashed #ccc;
  border-radius: 12px;
  font-weight: 600;
}

/* FIFO SHARES */
.fifo-row {
  display: flex;
  gap: 12px;
}


.share {
  width: 64px;
  height: 64px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  font-size: 16px;
  color: #0f172a;
}

.share.highlight {
  background: #fee2e2;
  border-color: #fca5a5;
}

.buy-row .share {
  opacity: 0;
  transform: translateY(12px) scale(0.95);
}

.hw-section.is-active .buy-row .share {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hw-section.is-active .fifo-animate .share:first-child {
  transform: translateY(60px) scale(0.9);
  opacity: 0;
}


/* SPLIT LAYOUT */
.hw-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

@media (max-width: 900px) {
  .hw-split {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hw-text {
    text-align: center;
  }
}

.hw-text {
  text-align: left;
}

/* PORTFOLIO BOX */
.portfolio-box {
  padding: 40px 50px;
  border: 2px dashed #94a3b8;
  border-radius: 16px;
  font-weight: 600;
  background: #f8fafc;
}


.hw-note {
  margin-top: 20px;
  padding: 14px 18px;
  font-size: 14px;
  background: #f8fafc;
  border-left: 4px solid #94a3b8;
  border-radius: 8px;
  color: #475569;
}


/* BUY / SELL SHARES */
.buy-row .share {
  opacity: 0;
  transform: translateX(20px);
}

.hw-section.is-active .buy-row .share {
  opacity: 1;
  transform: translateX(0);
}

.hw-section.is-active .buy-row .share:nth-child(1) { transition-delay: 0.1s; }
.hw-section.is-active .buy-row .share:nth-child(2) { transition-delay: 0.25s; }
.hw-section.is-active .buy-row .share:nth-child(3) { transition-delay: 0.4s; }

/* SELL */
.hw-section.is-active .sell-row .share.highlight {
  transform: translateY(40px);
  opacity: 0;
}

/* FIFO */
.fifo-animate .share:first-child {
  transition: all 0.6s ease;
}

.hw-section.is-active .fifo-animate .share:first-child {
  transform: translateY(50px);
  opacity: 0;
}

/* PNL CARDS */
.pnl-cards {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 30px 0;
}

.pnl-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 22px 26px;
  font-size: 15px;
  color: #1f2937;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.pnl-card.up {
  border-left: 4px solid #22c55e;
}

.pnl-card.down {
  border-left: 4px solid #ef4444;
}

.hw-inner ul {
  list-style: none;
  text-align: left;
  padding: 0;
  margin: 20px 0;
}

.hw-inner ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 16px;
  color: #1f2937;
}

.hw-inner ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #2563eb;
  font-weight: bold;
}

.hw-sub {
  margin-top: 22px;
  padding: 18px 22px;
  background: #f1f5f9;
  border-radius: 12px;
}

.hw-sub strong {
  display: block;
  margin-bottom: 8px;
  color: #0a2842;
}

.portfolio-box {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f8fafc 100%
  );
  border: 2px dashed #c7d2fe;
  border-radius: 18px;
  padding: 50px 60px;
  font-size: 16px;
  color: #1e293b;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.portfolio-box {
  text-align: center;
}

.pb-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.pb-balance {
  font-size: 22px;
  font-weight: 700;
  color: #0a2842;
  margin-bottom: 8px;
}

.pb-btn {
    display: inline-flex;          /* 🔑 key fix */
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  color: #0a2842;
  background: linear-gradient(
    180deg,
    #e8f0ff 0%,
    #dbeafe 100%
  );
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  cursor: pointer;
  transition:
    background 0.25s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

/* Hover (subtle, educational tone) */
.pb-btn:hover {
  background: linear-gradient(
    180deg,
    #dbeafe 0%,
    #c7d2fe 100%
  );
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
}

/* Click / simulated click */
.pb-btn:active,
.pb-btn.clicked {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

/* Disabled state (after visualization starts) */
.pb-btn.disabled,
.pb-btn:disabled {
  background: #e5e7eb;
  color: #64748b;
  border-color: #e5e7eb;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  opacity: 0.85;
}


.pb-note {
  font-size: 12px;
  opacity: 0.6;
}

.trade-box {
  background: #ffffff;
  padding: 26px 32px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  text-align: center;
  min-width: 280px;
}

.trade-title {
  font-weight: 600;
  margin-bottom: 10px;
}

.trade-info {
  font-size: 14px;
  margin-bottom: 6px;
}

.trade-btn {
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  opacity: 0.7;
}

.trade-note {
  margin-top: 10px;
  font-size: 11px;
  opacity: 0.5;
}

/* FIFO container */
.fifo-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

/* Dot base (override .share safely) */
.dot {
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  border-radius: 50%;
  background: #e5e7eb;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.04);
  transition:
    background-color 0.35s ease,
    transform 0.35s ease,
    opacity 0.35s ease;
}

/* Entry (green) */
.dot.green {
  background: #22c55e;
  transform: scale(1.15);
}

/* Exit (red) */
.dot.red {
  background: #ef4444;
  transform: scale(0.85);
  opacity: 0.9;
}

/* ==============================
   MOBILE OPTIMIZATIONS
   ============================== */
@media (max-width: 768px) {

  /* Section spacing */
  .hw-section {
    min-height: auto;
    padding: 60px 16px;
  }

  /* Inner container */
  .hw-inner {
    max-width: 100%;
    padding: 0;
  }
  
  .hw-intro::before{
    width: auto;
  }

  /* Headings */
  .hw-inner h1 {
    font-size: 30px;
  }

  .hw-inner h2 {
    font-size: 24px;
  }

  /* Paragraphs */
  .hw-inner p {
    font-size: 15px;
    line-height: 1.6;
  }

  .hw-lead {
    font-size: 16px;
  }

  /* SPLIT → STACK */
  .hw-split {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .hw-text {
    text-align: left;
  }

  /* Lists */
  .hw-inner ul {
    margin: 16px 0;
  }

  .hw-inner ul li {
    font-size: 15px;
  }

  /* Portfolio box */
  .portfolio-box {
    padding: 28px 24px;
  }

  .pb-balance {
    font-size: 20px;
  }

  .pb-btn {
    width: 100%;
    justify-content: center;
  }

  /* Trade boxes */
  .trade-box {
    min-width: auto;
    width: 100%;
    padding: 22px;
  }

  .trade-btn {
    width: 100%;
  }

  /* PNL cards → vertical */
  .pnl-cards {
    flex-direction: column;
    gap: 14px;
  }

  .pnl-card {
    font-size: 14px;
    padding: 18px 20px;
  }

  /* FIFO dots */
  .fifo-row {
    gap: 10px;
  }

  .dot {
    width: 12px;
    height: 12px;
  }

  /* CTA */
  .hw-cta .pb-btn {
    margin-top: 12px;
    width: 100%;
    text-align: center;
  }

}
