/* Frontend Engine — Components */
.hero {
  padding: 88px 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -20% auto;
  height: 360px;
  background: radial-gradient(circle at 35% 50%, rgba(124,58,237,.34), transparent 55%), radial-gradient(circle at 70% 20%, rgba(34,211,238,.24), transparent 50%);
  filter: blur(20px);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 24px;
  align-items: center;
}
.hero-panel { padding: 20px; }

.feature-card,
.product-card,
.listing-card,
.pricing-card,
.profile-card,
.review-card,
.stats-card,
.article-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 18px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feature-card:hover,
.product-card:hover,
.listing-card:hover,
.pricing-card:hover,
.profile-card:hover,
.review-card:hover,
.stats-card:hover,
.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34,211,238,.5);
  box-shadow: 0 18px 40px rgba(2, 6, 23, .45);
}

.pricing-card.is-highlight {
  border-color: rgba(124,58,237,.75);
  box-shadow: 0 0 0 1px rgba(124,58,237,.35), 0 18px 40px rgba(124,58,237,.26);
}

.progress {
  background: #0b1220;
  border: 1px solid #1f2937;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #22d3ee);
}

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid #1f2937; text-align: left; }
.table th { color: #94a3b8; font-size: .85rem; cursor: pointer; }

.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab-btn { padding: 8px 12px; border-radius: 999px; border: 1px solid #1f2937; cursor: pointer; }
.tab-btn.is-active { background: rgba(124,58,237,.22); border-color: rgba(124,58,237,.6); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.accordion-item { border: 1px solid #1f2937; border-radius: 12px; overflow: hidden; }
.accordion-trigger { width: 100%; text-align: left; padding: 12px 14px; background: #111827; color: #e5e7eb; border: 0; cursor: pointer; }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height .25s ease; padding: 0 14px; }
.accordion-item.is-open .accordion-content { max-height: 240px; padding: 12px 14px; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 120;
}
.modal.is-open { display: flex; }
.modal-card { width: min(560px, 92%); padding: 20px; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 8px;
  display: none;
}
.dropdown.is-open .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 8px 10px; border-radius: 8px; color: #94a3b8; }
.dropdown-menu a:hover { background: rgba(124,58,237,.16); color: #e5e7eb; }

.toast-wrap { position: fixed; top: 90px; right: 20px; display: grid; gap: 10px; z-index: 140; }
.toast {
  background: #111827;
  border: 1px solid #1f2937;
  border-left: 3px solid #22d3ee;
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 240px;
}

.slider { overflow: hidden; border-radius: 16px; border: 1px solid #1f2937; }
.slider-track { display: flex; transition: transform .35s ease; }
.slide { min-width: 100%; padding: 24px; background: #111827; }

.command-palette {
  position: fixed;
  top: 16%;
  left: 50%;
  transform: translateX(-50%);
  width: min(700px, 92%);
  display: none;
  z-index: 150;
}
.command-palette.is-open { display: block; }
.command-palette .panel { background: #111827; border: 1px solid #1f2937; border-radius: 14px; padding: 12px; }

.mobile-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(320px, 86vw);
  transform: translateX(-100%);
  transition: transform .28s ease;
  z-index: 130;
  padding: 16px;
}
.mobile-drawer.is-open { transform: translateX(0); }

.breadcrumb { display: flex; gap: 8px; flex-wrap: wrap; color: #94a3b8; }
.breadcrumb span:last-child { color: #e5e7eb; }

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #7c3aed, #22d3ee);
  z-index: 200;
}

/* Premium Board (index mimic) */
.fe-hero--centered {
  padding: 42px 0 14px;
}

.fe-hero__inner {
  text-align: center;
}

.fe-hero__inner h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.5rem);
  margin-bottom: 8px;
}

.fe-hero__subtitle {
  font-size: clamp(1.15rem, 2.2vw, 1.8rem);
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.fe-hero__meta {
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: .02em;
}

.fe-board-section {
  padding: 8px 0 40px;
}

.fe-board {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(17,24,39,.97), rgba(7,11,22,.94));
  border: 1px solid rgba(148, 163, 184, .22);
  box-shadow: 0 30px 90px rgba(2, 6, 23, .75);
}

.fe-board::before,
.fe-board::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.fe-board::before {
  inset: -120px auto auto -120px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(34,211,238,.2), transparent 65%);
  filter: blur(14px);
}

.fe-board::after {
  inset: auto -120px -120px auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(124,58,237,.22), transparent 65%);
  filter: blur(14px);
}

.fe-board__row {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.fe-board__row:last-child {
  margin-bottom: 0;
}

.fe-board__row--hero {
  grid-template-columns: 1fr 1.6fr;
}

.fe-board__row--widgets {
  grid-template-columns: 1.1fr 1.2fr .8fr;
}

.fe-board__row--analytics {
  grid-template-columns: 1.6fr 1fr;
}

.fe-board__row--pricing {
  grid-template-columns: repeat(3, 1fr);
}

.fe-board__row--bottom {
  grid-template-columns: 1.6fr .6fr;
}

.fe-board__row--micro {
  grid-template-columns: 1.5fr 1fr;
}

.fe-board__row--chips {
  grid-template-columns: 1.2fr .8fr;
}

.fe-board__row--gallery,
.fe-board__row--final {
  grid-template-columns: 1fr;
}

.fe-board__row--feedback {
  grid-template-columns: 1.2fr .8fr;
}

.fe-board__row--panorama {
  grid-template-columns: 1fr;
}

.fe-board__row--final {
  grid-template-columns: 1.15fr .85fr;
}

.fe-panel {
  position: relative;
  background: linear-gradient(160deg, rgba(17,24,39,.98), rgba(8,12,24,.96));
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 12px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 10px 30px rgba(2,6,23,.45);
}

.fe-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 28%);
}

.fe-panel h2,
.fe-panel h3,
.fe-panel h4,
.fe-panel p {
  margin: 0 0 8px;
}

.fe-mini-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.fe-mini-nav span {
  font-size: .78rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #1f2937;
  color: #94a3b8;
}

.fe-mini-nav .is-active {
  color: #e5e7eb;
  border-color: rgba(124,58,237,.65);
  background: rgba(124,58,237,.22);
}

.fe-mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.fe-mega-grid h4 {
  font-size: .78rem;
  color: #e2e8f0;
}

.fe-mega-grid p {
  font-size: .72rem;
  color: #94a3b8;
}

.fe-panel--showcase {
  background: linear-gradient(135deg, rgba(124,58,237,.3), rgba(34,211,238,.14) 45%, rgba(17,24,39,.95));
  min-height: 188px;
}

.fe-panel--showcase::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(125deg, transparent 25%, rgba(255,255,255,.05) 45%, transparent 70%);
  pointer-events: none;
}

.fe-showcase-top {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 20px;
}

.fe-showcase-actions {
  display: flex;
  gap: 8px;
}

.fe-showcase-glow {
  position: absolute;
  inset: auto -10% -42% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.45), rgba(34,211,238,.22) 45%, transparent 70%);
  filter: blur(6px);
}

.fe-widget--profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fe-avatar {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: linear-gradient(135deg, #22d3ee, #7c3aed);
}

.fe-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.fe-switch-row {
  display: flex;
  gap: 10px;
}

.fe-dot {
  width: 36px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #334155;
  background: #0f172a;
  position: relative;
}

.fe-dot::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #64748b;
  position: absolute;
  top: 2px;
  left: 2px;
}

.fe-dot.is-on {
  background: rgba(34,211,238,.2);
  border-color: rgba(34,211,238,.55);
}

.fe-dot.is-on::after {
  left: 20px;
  background: #22d3ee;
}

.fe-price {
  font-size: 2rem;
  font-weight: 800;
  color: #f8fafc;
}

.fe-price span {
  font-size: .95rem;
  color: #94a3b8;
  font-weight: 500;
}

.fe-widget--pricing ul {
  margin: 0;
  padding-left: 16px;
  color: #94a3b8;
  display: grid;
  gap: 4px;
}

.fe-table-panel .table th,
.fe-table-panel .table td {
  font-size: .82rem;
  padding: 8px 6px;
}

.fe-chart-bars {
  height: 132px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 7px;
}

.fe-chart-bars span {
  height: var(--h);
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #22d3ee, #7c3aed);
  box-shadow: 0 0 16px rgba(124,58,237,.35);
}

.fe-micro-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.fe-micro-pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #263449;
  color: #cbd5e1;
  font-size: .71rem;
  background: #0b1220;
}

.fe-chip-rack {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fe-switch-rack {
  justify-content: flex-end;
  align-items: center;
}

.fe-mini-chart-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.fe-mini-chart-strip span {
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid #27364d;
  background: linear-gradient(180deg, rgba(34,211,238,.35), rgba(124,58,237,.2));
}

.fe-mini-chart-strip--wide span {
  min-height: 34px;
}

.fe-gallery-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.fe-gallery-strip span {
  border-radius: 10px;
  min-height: 76px;
  border: 1px solid #2b3650;
  background: linear-gradient(135deg, rgba(34,211,238,.28), rgba(124,58,237,.3));
}

.fe-panorama {
  min-height: 90px;
  background:
    linear-gradient(180deg, rgba(2,6,23,.2), rgba(2,6,23,.65)),
    linear-gradient(120deg, #0f172a, #1e3a8a 40%, #312e81 70%, #0f172a);
  border-color: #2c3b58;
}

.fe-quote-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 110px;
}

.fe-quote {
  color: #e2e8f0;
  font-size: .95rem;
  margin-bottom: 10px;
}

.fe-quote-author {
  color: #94a3b8;
  font-size: .78rem;
}

.fe-confirm-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fe-confirm-panel p {
  color: #94a3b8;
  font-size: .82rem;
}

.fe-app-mock {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
}

.fe-app-sidebar {
  border-radius: 10px;
  border: 1px solid #2a3550;
  background: #0b1220;
  min-height: 160px;
}

.fe-app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.fe-app-grid span {
  min-height: 74px;
  border-radius: 10px;
  border: 1px solid #2b3550;
  background: linear-gradient(135deg, rgba(124,58,237,.32), rgba(34,211,238,.2));
}

.fe-final-metrics {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fe-price-card {
  text-align: center;
  min-height: 154px;
}

.fe-price-card--pro {
  border-color: rgba(124,58,237,.6);
  box-shadow: 0 0 0 1px rgba(124,58,237,.35), 0 14px 32px rgba(124,58,237,.28);
}

.fe-trusted h3 {
  margin-bottom: 10px;
}

.fe-logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #94a3b8;
  font-size: .85rem;
}

.fe-index .navbar {
  border-bottom-color: rgba(148, 163, 184, .08);
  background: rgba(8, 12, 24, .42);
}

.fe-index .navbar .menu {
  background: rgba(17, 24, 39, .45);
}

.fe-dark-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 1100px) {
  .fe-board__row--hero,
  .fe-board__row--widgets,
  .fe-board__row--analytics,
  .fe-board__row--bottom,
  .fe-board__row--micro,
  .fe-board__row--final,
  .fe-board__row--chips,
  .fe-board__row--feedback {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .fe-board__row--pricing {
    grid-template-columns: 1fr;
  }

  .fe-showcase-top {
    justify-content: flex-start;
  }

  .fe-showcase-glow {
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 560px) {
  .fe-hero__meta {
    font-size: .88rem;
  }

  .fe-board {
    padding: 10px;
    border-radius: 16px;
  }

  .fe-panel {
    padding: 10px;
    border-radius: 10px;
  }

  .fe-mini-nav span,
  .fe-micro-pill,
  .badge {
    font-size: .68rem;
    padding: 4px 8px;
  }

  .fe-price {
    font-size: 1.6rem;
  }

  .fe-chart-bars {
    height: 100px;
  }

  .fe-app-mock {
    grid-template-columns: 1fr;
  }

  .fe-app-sidebar {
    min-height: 70px;
  }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
