﻿/* Page/frame fit */
.wf-page {
  margin: 0;
  font-family: AnekBangla, Inter, system-ui, sans-serif;
  background: #ebe3d8;
  color: #1a1a1a;
}

.wf-section {
  background: #ebe3d8;
}

.wf-corner {
  position: absolute;
  top: 0;
  width: clamp(220px, 18vw, 360px);
  height: auto;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

.wf-corner-left {
  left: 0;
  transform: translate(-2%, -18%);
}

.wf-corner-right {
  right: 0;
  transform: translate(12%, 0);
}

.wf-shell {
  width: min(1800px, 98vw);
  padding-top: clamp(52px, 5vw, 88px);
  padding-bottom: 40px;
  z-index: 3;
}

.wf-header {
  max-width: 920px;
  margin: 0 auto;
  text-align: left;
}

.wf-kicker {
  color: #0b0b0f !important;
}

.wf-heading {
  font-family: welfare, AnekBangla, system-ui, sans-serif!important;
  font-size: clamp(34px, 3.9vw, 56px) !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #0f172a !important;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.wf-heading .wf-focus-a { color: #1d4ed8 !important; }
.wf-heading .wf-focus-b { color: #0f766e !important; }

.wf-subhead {
  font-family: NibPro, Georgia, serif !important;
  font-size: clamp(1rem, 1.3vw, 1.25rem) !important;
  line-height: 1.45 !important;
  color: #334155 !important;
  text-align: center;
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1024px) {
  .wf-shell {
    width: min(1200px, 94vw);
  }

  .wf-header {
    max-width: 100%;
  }

  .wf-corner {
    width: clamp(150px, 17vw, 240px);
    opacity: 0.9;
  }

  .wf-corner-left {
    transform: translate(-2%, -14%);
  }

  .wf-corner-right {
    transform: translate(8%, 0);
  }
}

@media (max-width: 640px) {
  .wf-corner {
    display: none;
  }
}

/* ── Restore Tailwind spacing utilities inside the workflow console ──
   The live Tailwind CDN scopes every generated utility to `#as-sec-workflows`
   with !important (see window.tailwind.config in <head>), so it always wins.
   The offline static build (tw-security.css) has no such scoping, so the
   site-wide `.security-page *{margin:0;padding:0}` reset in security.css —
   same specificity, loaded later — silently zeroes every margin/padding
   utility used here (including ones wf.js injects at runtime). Re-declaring
   the exact values with an #as-sec-workflows prefix guarantees they win,
   without touching that global reset or depending on a network connection. */
#as-sec-workflows .px-2 { padding-left: .5rem; padding-right: .5rem; }
#as-sec-workflows .px-3 { padding-left: .75rem; padding-right: .75rem; }
#as-sec-workflows .px-4 { padding-left: 1rem; padding-right: 1rem; }
#as-sec-workflows .py-1 { padding-top: .25rem; padding-bottom: .25rem; }
#as-sec-workflows .py-2 { padding-top: .5rem; padding-bottom: .5rem; }
#as-sec-workflows .py-16 { padding-top: 4rem; padding-bottom: 4rem; }
#as-sec-workflows .pb-2 { padding-bottom: .5rem; }
#as-sec-workflows .p-2 { padding: .5rem; }
#as-sec-workflows .p-4 { padding: 1rem; }
#as-sec-workflows .p-5 { padding: 1.25rem; }
#as-sec-workflows .p-6 { padding: 1.5rem; }

#as-sec-workflows .mx-auto { margin-left: auto; margin-right: auto; }
#as-sec-workflows .mt-1 { margin-top: .25rem; }
#as-sec-workflows .mt-1\.5 { margin-top: .375rem; }
#as-sec-workflows .mt-2 { margin-top: .5rem; }
#as-sec-workflows .mt-3 { margin-top: .75rem; }
#as-sec-workflows .mt-4 { margin-top: 1rem; }
#as-sec-workflows .mt-8 { margin-top: 2rem; }
#as-sec-workflows .mt-10 { margin-top: 2.5rem; }
#as-sec-workflows .mb-6 { margin-bottom: 1.5rem; }
#as-sec-workflows .ml-3 { margin-left: .75rem; }
#as-sec-workflows .ml-10 { margin-left: 2.5rem; }

@media (min-width: 640px) {
  #as-sec-workflows .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  #as-sec-workflows .sm\:p-8 { padding: 2rem; }
}

@media (min-width: 1024px) {
  #as-sec-workflows .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* ── Body copy → NibPro; titles/headers/labels keep the AnekBangla base font ──
   `.security-page{font-family:AnekBangla}` is the page default, so anything
   here without its own font-family renders in AnekBangla. .wf-subhead already
   sets NibPro directly; these are the other prose elements that need it too. */
#as-sec-workflows #wfScenario,
#as-sec-workflows #wfRisk,
#as-sec-workflows #wfProtection li,
#as-sec-workflows .wf-tl-summary,
#as-sec-workflows .wf-tl-scope,
#as-sec-workflows .wf-panel-content > p,
#as-sec-workflows .wf-signal-copy {
  font-family: NibPro, Georgia, serif;
}

/* Subtle grain (no external assets) */
.as-noise::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22400%22 height=%22400%22%3E%3Cfilter id=%22n%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.9%22 numOctaves=%224%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22400%22 height=%22400%22 filter=%22url(%23n)%22 opacity=%220.35%22/%3E%3C/svg%3E');
  opacity: .10;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Soft mesh drift — GPU accelerated */
@keyframes asMesh {

  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(-2%, 2%, 0) scale(1.02);
  }
}

@keyframes asPulse {

  0%,
  100% {
    transform: translate3d(-35%, 0, 0);
  }

  50% {
    transform: translate3d(35%, 0, 0);
  }
}

/* Timeline button — specific property transitions (no 'all') */
.wf-timeline-btn {
  transition: border-color 0.4s cubic-bezier(.4, 0, .2, 1),
    transform 0.3s cubic-bezier(.4, 0, .2, 1),
    box-shadow 0.3s cubic-bezier(.4, 0, .2, 1),
    filter 0.25s cubic-bezier(.4, 0, .2, 1),
    outline-color 0.3s cubic-bezier(.4, 0, .2, 1),
    opacity 0.3s cubic-bezier(.4, 0, .2, 1);
  border: 2px solid transparent;
  outline: 3px solid transparent;
  outline-offset: 2px;
  will-change: transform;
}

.wf-timeline-btn:hover {
  border-color: #000 !important;
  filter: brightness(0.88);
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.2);
}

/* Active button highlight — uses outline (not box-shadow) to avoid Tailwind ring conflict */
.wf-btn-active {
  outline-color: rgba(0, 0, 0, 0.25);
  transform: scale(1.03) translateZ(0);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.25);
}

.wf-timeline-btn:not(.wf-btn-active) {
  opacity: 0.7;
}

/* Timeline — single continuous line track */
#wfTimeline {
  border-left: none !important;
}

/* One continuous line spanning the full ol height */
#wfLineTrack {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  display: flex;
  flex-direction: column;
  overflow: visible;
  z-index: 1;
}

/* Each section fills 1/3 of the track */
.wf-line-sec {
  flex: 1;
  background-color: #1a1a1a;
  transition: background-color 0.4s cubic-bezier(.4, 0, .2, 1);
}

.wf-line-sec:first-child {
  border-radius: 3px 3px 0 0;
}

.wf-line-sec:last-child {
  border-radius: 0 0 3px 3px;
}

/* Dots sitting on the line at section boundaries */
.wf-track-dot {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, 0.1);
  transform: translate(-50%, -50%);
  z-index: 2;
  transition: border-color 0.4s cubic-bezier(.4, 0, .2, 1),
    transform 0.4s cubic-bezier(.4, 0, .2, 1),
    box-shadow 0.4s cubic-bezier(.4, 0, .2, 1);
}

.wf-track-dot.wf-dot-active {
  transform: translate(-50%, -50%) scale(1.25);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
}

/* Active timeline dot pulse */
@keyframes wfDotPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.15);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.05);
  }
}

.wf-dot-active {
  animation: wfDotPulse 2s ease-in-out infinite;
}

.wf-tl-dot {
  transition: transform 0.4s cubic-bezier(.4, 0, .2, 1),
    border-color 0.4s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}

/* Panel content crossfade — matches the 0.4s color transitions */
.wf-panel-content {
  transition: opacity 0.25s cubic-bezier(.4, 0, .2, 1);
  will-change: opacity;
}

.wf-panel-content.wf-fading {
  opacity: 0;
}

/* Timeline card text sizing */
.wf-tl-title {
  font-size: clamp(23px, 1.65vw, 31px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-weight: 800;
  color: #1e293b;
}

.wf-tl-scope {
  font-size: clamp(14px, 1vw, 18px);
  line-height: 1.3;
  font-weight: 600;
  color: rgba(30, 41, 59, 0.74);
}

.wf-tl-summary {
  font-size: clamp(14px, 0.96vw, 16px);
  line-height: 1.4;
  color: rgba(30, 41, 59, 0.8);
}

.wf-risk-card,
.wf-protection-card {
  padding: clamp(24px, 1.6vw, 34px) !important;
}

.wf-card-label {
  font-size: clamp(20px, 1.25vw, 28px) !important;
  font-weight: 800 !important;
  line-height: 1.05;
  letter-spacing: 0.045em;
}

.wf-risk-card .wf-card-label {
  color: #004d33 !important;
}

.wf-protection-card .wf-card-label {
  color: #ff9f1a !important;
}

#wfRisk {
  font-size: clamp(16px, 0.98vw, 21px) !important;
  line-height: 1.45 !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em;
}

#wfProtection {
  font-size: clamp(15px, 0.92vw, 19px) !important;
  line-height: 1.42 !important;
  font-weight: 500 !important;
}

#wfProtection li {
  gap: 10px !important;
}

#wfProtection li span:last-child {
  display: block;
}

/* Panel typography tuning for consistency with security page */
#wfTitle {
  font-family: welfare, AnekBangla, system-ui, sans-serif;
  font-size: clamp(38px, 3.2vw, 62px) !important;
  line-height: 0.92 !important;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

#wfScenario {
  font-size: clamp(16px, 1.12vw, 21px) !important;
  line-height: 1.48 !important;
}

/* Panel background color smooth transition — 0.4s unified */
#wfPanel {
  transition: background-color 0.4s cubic-bezier(.4, 0, .2, 1) !important;
}

/* Ultra-safe: reduce motion */
@media (prefers-reduced-motion: reduce) {

  .as-anim,
  .as-anim * {
    animation: none !important;
    transition: none !important;
  }

  .wf-panel-content {
    transition: none !important;
  }
}