.back {
  background-color: #282828;
  height: 100vh; /* fit section to viewport */
  height: 100dvh; /* modern viewport height to avoid browser UI */
  overflow: hidden; /* contain internal scrolling */
  position: fixed; /* lock section to the viewport */
  inset: 0;       /* top:0; right:0; bottom:0; left:0 */
  padding: var(--page-pad); /* equal padding on all sides */
}

/* Match full-page background to section */
body {
  background-color: #282828;
  margin: 0;
  height: 100%;
  overflow: hidden; /* prevent page from expanding */
  overflow-x: hidden;
}
html { height: 100%; overflow-x: hidden; }
html {
  font-size: 18px; /* increase global base size */
}

/* Unified responsive page padding (equal on all sides) */
:root { --page-pad: clamp(12px, 3vmin, 28px); }

/* Override Bootstrap py-5 to use unified padding */
.back.py-5 {
  padding: var(--page-pad) !important;
}

/* Ensure inner container and panel fill the section height */
.back > .container {
  height: 100%;
  padding-left: 0;
  padding-right: 0;
  overflow: hidden; /* contain internal scrolling */
  max-width: 100%; /* override Bootstrap container max-width */
}

.feature-panel {
  display: flex;
  width: 100%; /* fit the container, avoid extra overflow */
  color: #ffffff;
  overflow: hidden; /* contain internal scrolling */
  height: 100%;
  min-height: 0; /* allow children to shrink for scroll */
}
/* Use Fira Sans Bold throughout */
body, .feature-panel {
  font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-weight: 700;
}

/* Consistent sizing including padding/borders */
*, *::before, *::after {
  box-sizing: border-box;
}
.feature-panel .divider {
  color: #ffffff;
}
.feature-panel .panel-header,
.feature-panel .panel-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  gap: 1rem;
}
.feature-panel .divider {
  display: none; /* remove divider border */
}
.feature-panel .panel-title,
.feature-panel .panel-body {
  display: none;
  white-space: nowrap;           /* no word wrap */
  overflow: hidden;              /* prevent overflow */
  text-overflow: ellipsis;       /* show ellipsis if too long */
}
.feature-panel .panel-title {
  font-size: 2.4rem;              /* revert to previous */
  line-height: 1.1;
}
.feature-panel .panel-title {
  /* Show authored Title Case (no forced uppercase) */
  text-transform: none;
}
.feature-panel .panel-title--vertical {
  position: absolute;           /* place label within the bar */
  bottom: 1.5rem;               /* padding from bottom edge */
  left: 50%;                    /* keep centered horizontally */
  writing-mode: vertical-lr;    /* layout height = text length, no overflow */
  transform: translateX(-50%) rotate(180deg); /* read bottom-to-top */
  width: auto;                  /* allow full label width */
  height: auto;                 /* allow full label height */
  font-size: 60px;              /* menu (vertical label) size */
  margin: 0;                    /* remove forced offset */
  display: flex;
  align-items: center;
  justify-content: center;
  /* Show authored Title Case (no forced uppercase) */
  text-transform: none;
  white-space: nowrap;          /* no wrap for vertical label */
  /* Softer shadow for readability without heaviness */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  pointer-events: none;         /* avoid intercepting clicks */
  z-index: 1;                   /* ensure above backgrounds/content */
}
/* Remove default margins on inner heading to keep centering exact */
.feature-panel .panel-title--vertical h2 { margin: 0; }

/* Responsive scaling for vertical labels on narrow screens */
@media (max-width: 768px) {
  .feature-panel .panel-title--vertical { font-size: 42px; }
}
@media (max-width: 480px) {
  .feature-panel .panel-title--vertical { font-size: 32px; }
}
/* removed icon styles */
.feature-panel .panel-item {
  /* Collapsed bars can shrink to make room */
  flex: 0 1 96px; /* slightly smaller collapsed width */
  min-width: 72px;
  margin: 0;
  padding-bottom: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;           /* center horizontally */
  justify-content: flex-end;     /* push content to bottom */
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;
  transition: flex 0.3s ease, flex-basis 0.3s ease, flex-grow 0.3s ease, box-shadow 0.25s ease;
  position: relative; /* for separator pseudo-element */
  /* Subtle vertical inset shadows to separate items without borders */
  box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.45),
              inset -1px 0 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;              /* keep layout stable */
  min-height: 0;                 /* allow inner scroll areas to shrink */
}

/* On small screens, make collapsed bars even slimmer */
@media (max-width: 768px) {
  .feature-panel .panel-item { flex-basis: 80px; min-width: 64px; }
}


/* (removed) bottom caption text for collapsed bars */

/* High-contrast 1px separator that sits above backgrounds */
.feature-panel .panel-item + .panel-item::before {
  content: none; /* remove white vertical separator */
}
/* Removed original bars --01 to --04 */
.feature-panel .panel-item--05 {
  background-color: #E86D3A; /* Rocheston Solar Orange */
}
.feature-panel .panel-item--06 {
  background-color: #8E5DC1; /* Rocheston Amethyst */
}
.feature-panel .panel-item--07 {
  background-color: #6BB074; /* Rocheston Sage Green */
}
.feature-panel .panel-item--08 {
  background-color: #3B82F6; /* Rocheston Electric Blue */
}
.feature-panel .panel-item--09 {
  background-color: #E93D6D; /* Rocheston Crimson */
}
.feature-panel .panel-item--active {
  /* Active bar expands to fill remaining space */
  flex: 1 1 auto;
  justify-content: flex-start;   /* show title area at the top */
  padding-top: 1rem;             /* breathing room from top */
  /* Stronger inset contrast on the active item */
  box-shadow: inset 2px 0 0 rgba(0, 0, 0, 0.6),
              inset -2px 0 0 rgba(255, 255, 255, 0.14);
  min-height: 0;                 /* fix flex overflow issues */
}
/* Extra space between open panel title and description */
.feature-panel .panel-item--active .panel-header {
  margin-bottom: 0.75rem;
}
/* removed icon styles */
.feature-panel .panel-item--active .panel-body {
  margin-top: 0;
  white-space: normal;
  display: flex;               /* allow inner layout control */
  flex-direction: column;
  overflow-y: auto;            /* scroll inside active panel */
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 1rem 1.5rem 1.5rem;
  flex: 1 1 auto;              /* fill available height */
  min-height: 0;               /* allow scrolling area to shrink */
  scrollbar-gutter: stable both-edges; /* prevent layout shift when scrollbars appear */
  max-width: 100%;
  scroll-behavior: smooth;
}
/* Disable main panel-body scroll when nested zelex-sections is used to avoid jerky double-scrolling */
.panel-item--05.panel-item--active .panel-body {
  overflow-y: hidden;
}

.feature-panel .panel-item--active .panel-body,
.feature-panel .panel-item--active .panel-title {
  display: block;
  animation: fade-in 0.2s;
}
.feature-panel .panel-item--active .panel-title--vertical {
  display: none;
}
@keyframes fade-in {
  0%, 60% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* ZelExploits sections: full-height, colorful panels */
.zelex-sections {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
  scrollbar-gutter: stable both-edges;
}
.zelex-logo {
  display: block;
  margin: 0 auto; /* ensure centering in block contexts */
  padding-bottom: 0;
  height: auto;
  max-width: clamp(110px, 18vw, 200px);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}
.zelex-header-wrap {
  display: flex;
  align-items: center;
  justify-content: center; /* center the logo horizontally */
  width: 100%;
  margin-bottom: 2rem; /* extra space before the title */
}
.zelex-goto-icon {
  background-color: #E93D6D; /* Red/Crimson background */
  color: #fff;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 40px;
  box-shadow: none !important;
  text-shadow: none !important;
  transition: transform 0.2s ease, background 0.2s ease;
  line-height: 0;
  border: none;
  cursor: pointer;
  padding: 0;
}
.zelex-goto-icon:hover {
  background-color: #ef5a84; /* slightly lighter red on hover */
  color: #fff;
  transform: translateY(-3px);
}
.zelex-goto-fixed {
  position: fixed;
  bottom: 3rem; /* raised slightly from bottom */
  left: 3rem; /* nudged slightly to the right */
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
}
.zelex-goto-fixed.visible {
  opacity: 1;
  pointer-events: auto;
}
.zelex-footer-scroll {
  padding: 4rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.zelex-footer-section {
  min-height: 40vh !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
/* Reduce top padding on the first section to bring logo closer to top */
.zelex-sections .zelex-section:first-child { padding-top: 1rem; justify-content: flex-start; gap: 1.5rem; }

/* Remove previous logo-related body adjustments */
.panel-item--05 .panel-body { padding-top: 1.5rem; }
.zelex-section {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5rem; /* spacing between title, desc, quote */
  padding: 2rem 2rem 2.5rem;
  color: #fff;
  scroll-snap-align: start;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  align-items: stretch;          /* revert to default */
  text-align: left;              /* revert to default */
}
.zelex-section h3 {
  font-size: 46px;   /* section title */
  line-height: 1.15;
  margin: 0;         /* use flex gap for spacing */
  display: inline-block;          /* shrink to title width for bg */
  padding: 0.9rem 1.25rem;        /* add generous padding all around */
  border-radius: 8px;             /* subtle rounding for title bg */
}
.zelex-section p {
  margin: 0;         /* use flex gap for spacing */
  font-size: 28px;   /* description text */
  line-height: 1.45;
  white-space: normal;
}
.zelex-section blockquote {
  margin: 0;                         /* use flex gap for spacing */
  font-size: 28px;                   /* quote text */
  line-height: 1.5;
  color: #fff;
  font-style: italic;                /* stylistic difference */
  background: none;                  /* remove background on quote */
  border: none;                      /* remove border */
  padding: 1rem 1.25rem 1rem 1.25rem;
  border-radius: 8px;
}

/* Technical Specifications layout */
.spec-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 992px) {
  .spec-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.spec-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 1rem 1rem;
}
.spec-card h3 {
  font-size: 1.1rem;
  line-height: 1.2;
  margin: 0 0 0.75rem; /* more spacing before description */
}
.spec-card p {
  margin: 0;
  line-height: 1.4;
  white-space: normal;
}

/* FAQ accordion styles */
.faq-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.faq-accordion details {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  overflow: hidden; /* ensure internal content doesn't overflow */
  border-left: 3px solid transparent; /* subtle left accent when open */
  transition: background 0.2s ease, border-color 0.2s ease;
}
.faq-accordion summary {
  cursor: pointer;
  list-style: none;
  outline: none;
  font-size: 1.1rem;
  position: relative;
  padding-left: 1.4rem; /* space for custom chevron */
  display: block;
}
.faq-accordion summary::-webkit-details-marker {
  display: none;
}
/* Animated underline accent for open item */
.faq-accordion summary::after {
  content: '';
  position: absolute;
  left: 1.4rem;
  right: 0;
  bottom: -0.25rem;
  height: 2px;
  background: #ADD8E6; /* light blue */
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
  opacity: 0.95;
}
.faq-accordion details[open] > summary::after {
  transform: scaleX(1);
}
.faq-accordion summary::before {
  content: '';
  position: absolute;
  left: 0.2rem;
  top: 0.6em;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg); /* chevron pointing right */
  transition: transform 0.2s ease, border-color 0.2s ease;
  opacity: 0.9;
}
.faq-accordion details[open] {
  background: rgba(233, 61, 109, 0.08); /* soft pink wash when open */
  border-color: rgba(255, 255, 255, 0.15);
  border-left-color: #ADD8E6; /* light blue left accent when open */
}
.faq-accordion details[open] > summary::before {
  transform: rotate(45deg); /* chevron points down when open */
  border-color: #ADD8E6; /* light blue chevron when open */
}
.faq-accordion .faq-answer {
  margin-top: 1.5rem; /* increased spacing between underline and answer */
  white-space: normal; /* allow wrapping in answers */
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.faq-accordion {
  overflow-x: hidden;
  scrollbar-gutter: stable both-edges;
}

/* Make the FAQ list the scrolling region inside the panel */
.feature-panel .panel-item--active .faq-accordion {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

/* Screenshots grid within the Screenshots panel */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* two columns */
  gap: 12px;
}
.screenshot-grid figure { margin: 0; }
.screenshot-img {
  width: 100%;
  height: auto;
  display: block;
  border: 5px solid #3a3a3a; /* thicker dark grey border */
  border-radius: 12px;        /* rounded corners */
  background: #111;
}
.screenshot-grid figcaption {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #cfcfcf;
  text-align: center;
}

/* Splash image after the first section */
.zelex-splash-figure {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zelex-splash-img {
  width: 100%;
  max-width: 1200px;
  height: auto;
  border: 5px solid #3a3a3a; /* match screenshot styling */
  border-radius: 12px;
  background: #111;
}

/* Launch panel CTA button */
.launch-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0;
}
.launch-image {
  width: 100%;
  max-width: 1200px;
  height: auto;
  border: 5px solid #3a3a3a; /* dark grey border */
  border-radius: 12px;        /* rounded corners */
  background: #111;
}
.launch-button {
  display: inline-block;
  font-size: 2rem;
  line-height: 1;
  padding: 1.25rem 2.5rem; /* increased internal spacing */
  margin-top: 1rem; /* extra space above the button */
  background: #111;
  color: #fff;
  text-decoration: none;
  border: 4px solid #3a3a3a; /* dark grey border */
  border-radius: 14px;        /* rounded corners */
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.launch-button:hover,
.launch-button:focus {
  background: #1a1a1a;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
  outline: none;
}

/* Invisible copyright marker */
.copyright-invisible {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Launch panel spacing tweaks: reduce gap between title and image */
.panel-item--09 .panel-header { padding-bottom: 0.25rem; }
.panel-item--09.panel-item--active .panel-header { margin-bottom: 0.25rem; }
.panel-item--09 .panel-body { padding-top: 0.5rem; }
