:root{
  --bg: #070A12;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);
  --muted2: rgba(255,255,255,.52);
  --accent: #6EE7FF;
  --accent2: #A78BFA;
  --accent3: #34D399;
  --shadow: 0 14px 50px rgba(0,0,0,.45);
}

html,body{
  height: 100%;
}

body{
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 20% 0%, rgba(167,139,250,.18), transparent 60%),
              radial-gradient(900px 500px at 80% 10%, rgba(110,231,255,.14), transparent 60%),
              radial-gradient(900px 500px at 50% 120%, rgba(52,211,153,.10), transparent 55%),
              var(--bg);
  color: var(--text);
}

/* Accessibility: Skip link */
.skip-link{
  position:absolute;
  left:-9999px;
  top:10px;
  z-index:9999;
  padding:10px 14px;
  border-radius:999px;
  background: rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
  color:#fff;
  text-decoration:none;
  backdrop-filter: blur(10px);
}
.skip-link:focus,
.skip-link:focus-visible{
  left:12px;
  outline:none;
  box-shadow: 0 0 0 4px rgba(110,231,255,.22);
}

/* Accessibility: Focus visibility */
:focus-visible{
  outline: 3px solid rgba(110,231,255,.55);
  outline-offset: 2px;
}

/* Reduced motion toggle */
body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after{
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

a { color: rgba(255,255,255,.9); }
a:hover { color: #fff; }

.border-white-10{ border-color: var(--border) !important; }

.bg-glass{
  background: rgba(7, 10, 18, .88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.btn-glass{
  background: var(--panel);
  border: 1px solid var(--border);
  color: #fff;
}
.btn-glass:hover{
  background: var(--panel2);
  border-color: rgba(255,255,255,.18);
  color: #fff;
}

.brand-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 4px rgba(110,231,255,.08);
}

.navbar .nav-link{
  color: rgba(255,255,255,.90);
  border-radius: 999px;
  font-size: .875rem;
}
.navbar .nav-link:hover{
  background: rgba(255,255,255,.06);
  color: #fff;
}
.navbar .nav-link.active{
  background: rgba(255,255,255,.10);
  color: #fff;
}

.hero-wrap{ min-height: 72vh; }
.hero-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(1.05) contrast(1.05);
}
.hero-overlay{
  position: absolute;
  inset: 0;
  background: radial-gradient(900px 500px at 10% 20%, rgba(110,231,255,.15), transparent 60%),
              radial-gradient(800px 420px at 80% 30%, rgba(167,139,250,.16), transparent 60%),
              linear-gradient(180deg, rgba(7,10,18,.25) 0%, rgba(7,10,18,.88) 80%);
}
.py-lg-6{ padding-top: 5.5rem !important; padding-bottom: 5.5rem !important; }

.text-gradient{
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass-card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.card-dark{
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-dark .card-img-top{
  height: 170px;
  object-fit: cover;
  filter: saturate(1.05);
}
.card-dark .card-body{ padding: 1.25rem; }

.btn-ft{
  color: #081018;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 30px rgba(110,231,255,.14);
}
.btn-ft:hover{
  color: #050912;
  filter: brightness(1.06);
}

.mini-stat{
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 1.2rem;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
}
.mini-stat-icon{
  width: 40px; height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}
.mini-stat-title{ color:#fff; font-weight:600; line-height:1.1; }
.mini-stat-sub{ color: var(--muted2); font-size: .9rem; }

.pill{
  padding: 14px 16px;
  border-radius: 1.1rem;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
}

/* Toolkit section */
.toolkit-playbook{
  position: relative;
  overflow: hidden;
}
.toolkit-playbook::after{
  content: "";
  position: absolute;
  inset: -120px -140px auto auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(closest-side, rgba(110,231,255,.18), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.prompt-card{
  border-radius: 1.25rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  padding: 14px 16px;
}
.prompt-snippet{
  border-radius: 1rem;
  padding: 10px 12px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.10);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .82rem;
  color: rgba(255,255,255,.82);
}
.hint-dot{ width:10px; height:10px; border-radius:999px; display:inline-block; box-shadow: 0 0 0 5px rgba(255,255,255,.04); }
.dot-alt{ background: var(--accent3); }
.dot-evidence{ background: var(--accent); }
.dot-reframe{ background: var(--accent2); }

.nav-pills-glass .nav-link{
  color: rgba(255,255,255,.72);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  padding: 8px 14px;
  margin-right: 8px;
}
.nav-pills-glass .nav-link:hover{ background: rgba(255,255,255,.07); color:#fff; }
.nav-pills-glass .nav-link.active{
  background: linear-gradient(135deg, rgba(110,231,255,.20), rgba(167,139,250,.20));
  border-color: rgba(255,255,255,.16);
  color: #fff;
}
.preview-card{ border-radius: 1.25rem; }
.preview-img{ max-height: 270px; }
.preview-img img{ transition: transform .25s ease; }
.preview-img:hover img{ transform: scale(1.02); }
.chart-mini{ min-height: 220px; }

.page-hero{
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, transparent 100%);
}

.step-card{
  border-radius: 1.25rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.step-card img{
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.step-kicker{
  display: inline-block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted2);
  margin-bottom: .35rem;
}

.cta-card{
  border-radius: 1.5rem;
  border: 1px solid rgba(255,255,255,.12);
  background: radial-gradient(700px 350px at 10% 30%, rgba(110,231,255,.16), transparent 60%),
              radial-gradient(700px 350px at 90% 40%, rgba(167,139,250,.16), transparent 60%),
              rgba(255,255,255,.05);
  box-shadow: var(--shadow);
}

pre.code-block{
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 1rem;
  color: rgba(255,255,255,.88);
  padding: 14px 16px;
  font-size: .85rem;
  white-space: pre-wrap;
}

pre.log{
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 1rem;
  padding: 14px 16px;
  color: rgba(255,255,255,.86);
  min-height: 130px;
  max-height: 280px;
  overflow: auto;
}

/* Scenario engine elements */
#runOptions .btn, #runHints .btn { border-radius: 999px !important; }
#runOptions .btn{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
}
#runOptions .btn:hover{ background: rgba(255,255,255,.10); }

#runHints .btn{
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.85);
}
#runHints .btn:hover{ background: rgba(255,255,255,.08); color: #fff; }

/* Hint ladder styling with visible level colors */
.btn-hint{
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  background: rgba(0,0,0,.25) !important;
  color: rgba(255,255,255,.88) !important;
}
.btn-hint:hover{ background: rgba(255,255,255,.08) !important; color:#fff !important; }
.btn-hint-l1{ box-shadow: inset 0 0 0 1px rgba(52,211,153,.35); }
.btn-hint-l2{ box-shadow: inset 0 0 0 1px rgba(110,231,255,.38); }
.btn-hint-l3{ box-shadow: inset 0 0 0 1px rgba(167,139,250,.38); }

.hint-card{
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 1.25rem !important;
  overflow: hidden;
}
.hint-card .card-body{ color: rgba(255,255,255,.92) !important; }

/* Reflection quality + accordion styling */
.reflection-quality{ margin-top: 1rem; }
.accordion-dark .accordion-item{
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 10px;
}
.accordion-dark .accordion-button{
  background: transparent;
  color: #fff;
  border: 0;
  box-shadow: none;
}
.accordion-dark .accordion-button:not(.collapsed){
  background: rgba(255,255,255,.04);
}
.accordion-dark .accordion-body{ color: var(--muted); }
.accordion-dark .accordion-button::after{ filter: invert(1); }
.hint-card p{ color: rgba(255,255,255,.88) !important; }
.hint-card.hint-l1{ border-left: 4px solid var(--accent3) !important; }
.hint-card.hint-l2{ border-left: 4px solid var(--accent) !important; }
.hint-card.hint-l3{ border-left: 4px solid var(--accent2) !important; }

#hintBox .alert,
#runFeedback .alert{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.88);
  border-radius: 1rem;
}

.modal-dark{
  background: rgba(12,16,30,.95);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
}
.form-control-dark{
  background: rgba(0,0,0,.25) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: rgba(255,255,255,.92) !important;
  border-radius: 1rem !important;
}
.form-control-dark::placeholder{ color: rgba(255,255,255,.45); }

.form-select-dark{
  background-color: rgba(0,0,0,.25) !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba(255,255,255,0.7)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: rgba(255,255,255,.92) !important;
  border-radius: 1rem !important;
}
.form-select-dark:focus{
  border-color: rgba(110,231,255,.45) !important;
  box-shadow: 0 0 0 3px rgba(110,231,255,.12) !important;
  outline: none;
}
.form-select-dark option{
  background: #0c1020;
  color: rgba(255,255,255,.92);
}

.list-group-dark .list-group-item{
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.88);
}
.kpi{
  padding: 12px 14px;
  border-radius: 1rem;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
}
.kpi-label{ font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted2); }
.kpi-value{ font-size: 1.35rem; font-weight: 700; color: #fff; }

@media (max-width: 991px){
  .hero-wrap{ min-height: auto; }
}


/* Compatibility with scenario engine markup */
.card{
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}
.card .card-title{ color: #fff; }
.small-muted{ color: var(--muted2); font-size: .92rem; }
.badge-ft{
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.85) !important;
  font-weight: 500;
}

/* Modern footer */
.footer-modern{
  position: relative;
  background: radial-gradient(1200px 500px at 20% 10%, rgba(167,139,250,.18), transparent 55%),
              radial-gradient(900px 420px at 85% 20%, rgba(110,231,255,.16), transparent 55%),
              rgba(8,10,18,.92);
  border-top: 1px solid rgba(255,255,255,.10);
  overflow: hidden;
}
.footer-modern .footer-glow{
  position: absolute;
  inset: -140px -180px auto -180px;
  height: 220px;
  background: radial-gradient(closest-side, rgba(110,231,255,.18), transparent 70%);
  filter: blur(18px);
  pointer-events: none;
}
.footer-title{
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  color: rgba(255,255,255,.55);
  margin-bottom: .65rem;
}
.footer-link{
  color: rgba(255,255,255,.78);
  text-decoration: none;
}
.footer-link:hover{
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.icon-pill{
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.88);
  transition: transform .15s ease, background .15s ease;
}
.icon-pill:hover{ transform: translateY(-1px); background: rgba(255,255,255,.10); color: #fff; }

/* Table row affordance */
.tool-row:hover{ background: rgba(255,255,255,.06) !important; }

/* ------------------------------------------------------
   Scroll reveal animations
   ------------------------------------------------------ */
.reveal{
  opacity: 0;
  transform: translateY(14px);
  filter: blur(10px);
  transition: opacity .75s ease, transform .75s ease, filter .9s ease;
  will-change: opacity, transform, filter;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
}

/* ------------------------------------------------------
   Pan/Zoom viewer
   ------------------------------------------------------ */
.pz-toolbar{
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(10,14,24,.78);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
}
.pz-stage{
  height: calc(100vh - 64px);
  width: 100%;
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 600px at 20% 20%, rgba(125,211,252,.07), transparent 60%),
              radial-gradient(900px 500px at 80% 0%, rgba(167,139,250,.06), transparent 55%),
              #070a12;
  cursor: grab;
}
.pz-stage.pz-grabbing{ cursor: grabbing; }
#pzImg{
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(0,0) scale(1);
  transform-origin: 0 0;
  max-width: none;
  max-height: none;
  user-select: none;
  -webkit-user-drag: none;
  /* Center initial placement via JS reset: translate(0,0) on top-left anchor; */
}

/* helper: any image/link can trigger panzoom */
[data-panzoom-src]{
  cursor: zoom-in;
}

/* tables in toolkit */
.tool-details .code-block{ white-space: pre-wrap; }

/* Module 3 collaboration */
.peer-card{
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  padding: 16px;
  backdrop-filter: blur(10px);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.peer-card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.045);
}
