/* --- Design System --- */
:root {
  --apl-navy: #0F172A;
  --apl-navy-light: #1E293B;
  --apl-gold: #C2A368;
  --apl-slate-50: #F8FAFC;
  --apl-slate-100: #F1F5F9;
  --apl-slate-200: #E2E8F0;
  --apl-slate-500: #64748B;
  --apl-slate-600: #475569;
  --apl-slate-900: #0F172A;

  --font-inter: 'Inter', system-ui, -apple-system, sans-serif;
  --font-playfair: 'Playfair Display', serif;
  --apl-max-width: 1280px;
}

html,
body {
  overflow-x: hidden;
}

.apl-scope {
  font-family: var(--font-inter);
  color: var(--apl-slate-900);
  line-height: 1.6;
  width: 100%;
}

header.fixed-top {
  position: fixed !important;
  top: 0;
  z-index: 1020;
  background-color: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  transition: all 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-playfair,
.apl-serif,
.apl-brand {
  font-family: var(--font-playfair) !important;
  letter-spacing: -0.015em;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.85rem;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -0.015em;
}

h4 {
  font-size: 1.15rem;
}

h5 {
  font-size: 1rem;
}

.apl-scope p,
.apl-scope a,
.apl-scope li,
.apl-scope span,
.apl-scope div:not(.apl-brand):not(.apl-serif):not(.font-playfair) {
  font-family: var(--font-inter);
}

.apl-container {
  max-width: var(--apl-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.apl-serif {
  font-family: var(--font-playfair);
}

.apl-brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.apl-brand {
  color: var(--apl-slate-900);
  font-family: var(--font-playfair);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.apl-brand .apl-dot {
  color: var(--apl-gold);
}

.apl-logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.apl-logo-text span {
  color: var(--apl-slate-500);
  font-size: 7px;
  letter-spacing: 0.6em;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.2;
}

.apl-navlinks .nav-link {
  color: var(--apl-slate-600) !important;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.5rem 0.65rem !important;
  margin: 0 !important;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.apl-navlinks .nav-link:hover {
  color: var(--apl-slate-900) !important;
}

.apl-navlinks .nav-link.active {
  color: var(--apl-slate-900) !important;
  border-bottom: 2px solid var(--apl-gold);
}

@media (max-width: 1400px) {
  .apl-navlinks .nav-link {
    padding: 1rem 0.5rem !important;
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .apl-brand {
    font-size: 1.25rem;
  }

  .apl-brand-container {
    gap: 0.5rem;
  }

  .apl-btn-gold,
  .apl-btn-ghost {
    padding: 8px 16px;
    font-size: 9px;
  }
}

/* --- Buttons --- */
.apl-btn-gold {
  background-color: var(--apl-gold) !important;
  border: none !important;
  color: var(--apl-navy) !important;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 10px;
  padding: 8px 20px;
  border-radius: 6px !important;
  transition: opacity 0.2s;
  height: fit-content;
}

.apl-btn-gold:hover {
  opacity: 0.95;
}

.apl-btn-ghost {
  color: var(--apl-navy) !important;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 10px;
  padding: 8px 16px;
  border: 1px solid #CBD5E1 !important;
  border-radius: 6px !important;
  background-color: white !important;
  height: fit-content;
}

.apl-btn-ghost:hover {
  background-color: var(--apl-slate-50) !important;
}

.apl-plan-btn-standard {
  background-color: var(--apl-slate-100) !important;
  color: var(--apl-slate-900) !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 1rem !important;
  border: none !important;
}

.apl-plan-btn-premium {
  background-color: var(--apl-navy) !important;
  color: white !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 1rem !important;
  border: none !important;
}

.apl-plan-btn-premium:hover {
  opacity: 0.95;
}

/* --- Form Elements --- */
.apl-form-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--apl-slate-500);
  margin-bottom: 0.5rem;
}

.apl-form-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--apl-slate-200);
  padding: 0.75rem 0;
  font-size: 14px;
  background: transparent;
  transition: border-color 0.2s;
  border-radius: 0;
}

.apl-form-input:focus {
  outline: none;
  border-bottom-color: var(--apl-gold);
}

.apl-form-input::placeholder {
  color: var(--apl-slate-300);
}

/* --- Methodology Page --- */
.apl-aside-nav {
  border-left: 1px solid var(--apl-slate-200);
  padding-left: 1.25rem;
}

.apl-aside-nav .nav-link {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--apl-slate-500);
  padding: 0.25rem 0;
  transition: color 0.2s;
  text-decoration: none;
  display: block;
}

.apl-aside-nav .nav-link:hover {
  color: var(--apl-gold);
}

.apl-formula-box {
  background-color: var(--apl-slate-50);
  border: 1px solid var(--apl-slate-200);
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.apl-formula {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--apl-navy);
  background: white;
  padding: 0.5rem 1rem;
  border: 1px solid var(--apl-slate-200);
  display: inline-block;
}

.apl-table thead th {
  background-color: var(--apl-slate-50);
  text-transform: uppercase;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--apl-slate-500);
  padding: 1rem;
  border-bottom: 2px solid var(--apl-slate-200);
}

.apl-table td {
  padding: 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--apl-slate-100);
}

.apl-aside-card {
  background-color: var(--apl-slate-50);
  border: 1px solid var(--apl-slate-100);
  padding: 1.5rem;
  border-radius: 4px;
}

.apl-aside-card h4 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.apl-aside-card p {
  font-size: 0.75rem;
  color: var(--apl-slate-500);
  line-height: 1.5;
}

.apl-aside-card .apl-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--apl-navy);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.apl-aside-card .apl-link:hover {
  text-decoration: underline;
}

/* --- Components --- */
.apl-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
}

.apl-overline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--apl-gold);
}

.apl-overline::before {
  content: "";
  height: 1px;
  width: 1.5rem;
  background-color: rgba(0, 0, 0, 0.1);
}

.apl-card {
  background-color: var(--apl-slate-50);
  border: 1px solid var(--apl-slate-200);
  border-radius: 0.75rem;
  padding: 1.5rem !important;
  transition: all 0.3s ease;
}

.apl-card:hover {
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
  border-color: var(--apl-slate-300);
}

.apl-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--apl-navy);
  margin-bottom: 0.75rem;
}

.apl-icon-box i {
  width: 16px !important;
  height: 16px !important;
}

.apl-card h4,
.apl-report-card h4,
.apl-team-card h3 {
  margin-bottom: 0.5rem !important;
}

.apl-card p,
.apl-report-card p,
.apl-team-card p,
.apl-step-card p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--apl-slate-600);
}

/* --- Hero Section --- */
.apl-hero {
  background-color: var(--apl-navy);
  color: white;
  position: relative;
  overflow: hidden;
  padding: 4rem 0 5rem 0;
}

.apl-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 450px at 15% 10%, rgba(194, 163, 104, 0.14), transparent 60%),
    radial-gradient(700px 400px at 85% 25%, rgba(194, 163, 104, 0.1), transparent 60%);
  pointer-events: none;
}

.apl-hero h1 {
  font-family: var(--font-playfair) !important;
  line-height: 1.1;
  font-size: 2.25rem;
  margin-bottom: 1rem !important;
}

.apl-hero p.lead {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem !important;
}

.apl-hero .italic {
  font-style: italic;
  color: var(--apl-gold);
}

.apl-hero-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border-radius: 0.75rem;
  padding: 2.5rem;
}

.apl-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #10b981;
  display: inline-block;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.apl-terminal-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
}

/* Dashboard Chart Simulation */
.apl-hero-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 140px;
  margin: 2rem 0;
}

.apl-chart-bar {
  flex: 1;
  border-radius: 2px;
  transition: height 0.3s ease;
}

.apl-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 1.5rem;
}

.apl-stat-box {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.75rem;
}

.apl-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}

.apl-stat-value {
  font-size: 12px;
  font-weight: 700;
  color: white;
}

/* Distribution Strip */
.apl-distribution-strip {
  padding: 2.5rem 0;
  background-color: var(--apl-slate-50);
  border-bottom: 1px solid var(--apl-slate-100);
}

.apl-dist-logo {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--apl-slate-500);
  opacity: 0.5;
  filter: grayscale(1);
}

/* --- Pillars & Cards --- */
.apl-overline {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--apl-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.apl-overline::before,
.apl-overline::after {
  content: "";
  height: 1px;
  width: 24px;
  background-color: rgba(0, 0, 0, 0.1);
}

.apl-card {
  background-color: var(--apl-slate-50);
  border: 1px solid var(--apl-slate-200);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.apl-card:hover {
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
  border-color: var(--apl-slate-300);
}

.apl-icon-box {
  width: 32px;
  height: 32px;
  background-color: var(--apl-navy);
  border-radius: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

/* --- Reports & Cards --- */
.apl-report-card {
  background-color: white;
  border: 1px solid var(--apl-slate-200);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  /* Consistent height */
}

.apl-report-card h4 {
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 3.2rem;
  line-height: 1.6rem;
  margin-bottom: 0.5rem !important;
}

.apl-report-card:hover {
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
  border-color: var(--apl-slate-300);
  transform: translateY(-2px);
}

.apl-rating-badge {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid transparent;
}

.apl-rating-buy {
  background-color: #f0fdf4;
  color: #15803d;
  border-color: #dcfce7;
}

.apl-rating-hold {
  background-color: #fefce8;
  color: #a16207;
  border-color: #fef9c3;
}

.apl-rating-sell {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fee2e2;
}

.apl-rating-review {
  background-color: #f8fafc;
  color: #475569;
  border-color: #e2e8f0;
}

.apl-card-pt-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--apl-navy);
  margin-top: 1rem;
}

.apl-card-pt-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--apl-slate-500);
  margin-left: 0.25rem;
}

.apl-card-performance {
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.apl-performance-up {
  color: #10b981;
}

.apl-performance-down {
  color: #ef4444;
}

.apl-sponsored-badge {
  background-color: #fef2f2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #fee2e2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.apl-report-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Swiper Styles */
.apl-reports-slider {
  padding: 1rem 0;
  margin: 0;
  position: relative;
}

.swiper-wrapper {
  align-items: stretch !important;
}

.swiper-slide {
  height: auto !important;
  display: flex !important;
}

.swiper-pagination {
  bottom: 0px !important;
}

.swiper-pagination-bullet-active {
  background: var(--apl-gold) !important;
}

.apl-swiper-nav {
  color: var(--apl-gold) !important;
  width: 44px !important;
  height: 44px !important;
  background: white !important;
  border-radius: 50% !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid var(--apl-slate-200) !important;
  transition: all 0.2s ease !important;
  z-index: 20 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
  cursor: pointer;
  flex-shrink: 0;
}

.apl-swiper-nav:hover {
  background: var(--apl-navy) !important;
  color: white !important;
  border-color: var(--apl-navy) !important;
}

/* Hide default swiper icons since we explicitly add icons in HTML or we want to use CSS content that is reliable */
.apl-swiper-nav::after {
  content: none !important;
  display: none !important;
}

/* Add custom arrow icons in case HTML lucide icons aren't reliable inside swiper buttons */
.swiper-button-next::before {
  content: '→';
  font-family: var(--font-inter);
  font-size: 20px;
  font-weight: 700;
}

.swiper-button-prev::before {
  content: '←';
  font-family: var(--font-inter);
  font-size: 20px;
  font-weight: 700;
}

.swiper-button-disabled {
  opacity: 0.35 !important;
  cursor: auto !important;
  pointer-events: none !important;
}

/* --- Journey Steps --- */
.apl-step-card {
  background-color: white;
  border: 1px solid var(--apl-slate-200);
  border-radius: 0.75rem;
  padding: 1.5rem;
  height: 100%;
}

.apl-step-number {
  width: 32px;
  height: 32px;
  background-color: var(--apl-navy);
  color: white;
  border-radius: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 0.75rem;
}

/* --- Team --- */
.apl-team-card {
  background-color: white;
  border: 1px solid var(--apl-slate-200);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.apl-team-card:hover {
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

.apl-team-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--apl-slate-500);
}

/* --- Footer --- */
.apl-footer {
  background-color: var(--apl-slate-50);
  border-top: 1px solid var(--apl-slate-200);
  padding: 4rem 0 3rem 0;
  color: var(--apl-slate-600);
}

.apl-footer .apl-brand {
  font-size: 1.25rem;
  margin-bottom: 1rem !important;
}

.apl-footer .apl-overline {
  color: var(--apl-slate-900);
  font-size: 10px;
  margin-bottom: 1rem !important;
}

.apl-footer .apl-overline::before {
  display: none;
}

.apl-footer ul li {
  font-size: 0.825rem;
  color: var(--apl-slate-500);
  margin-bottom: 0.5rem;
}

.apl-disclosure-text {
  font-size: 10px;
  line-height: 1.5;
  color: var(--apl-slate-500);
  text-align: justify;
  opacity: 0.7;
}

.apl-footer-bottom {
  border-top: 1px solid var(--apl-slate-200);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--apl-slate-400);
}

.apl-footer-bottom a {
  color: var(--apl-slate-500);
  transition: color 0.2s;
  text-decoration: none;
}

.apl-footer-bottom a:hover {
  color: var(--apl-slate-900);
}