/* Design System: Premium Violet & Cyan (CAPOFIN brand) */

:root {
  --emerald-deep: #1a0a3d;
  --emerald-mid: #5b21b6;
  --emerald-glow: #7c3aed;
  --emerald-soft: #ede9fe;
  --emerald-mist: #f5f3ff;
  --gold-accent: #22d3ee;
  --gold-soft: rgba(34, 211, 238, 0.16);
  --onyx: #f8f7fc;
  --onyx-elevated: #ffffff;
  --onyx-alt: #f0edfc;
  --platinum: #1a0b2e;
  --platinum-muted: #6b6280;
  --glass-border: rgba(91, 33, 182, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.96);
  --line: rgba(46, 16, 101, 0.08);
  --shadow-soft: 0 8px 32px rgba(46, 16, 101, 0.08);
  --shadow-elevated: 0 24px 56px rgba(46, 16, 101, 0.12);
  --shadow-glow: 0 0 48px rgba(124, 58, 237, 0.15);
  --radius-lg: 1.25rem;
  --radius-xl: 1.5rem;
  --site-header-offset: 6.25rem;
  --site-header-gap: 0.35rem;
  --font-ui: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--site-header-offset) + var(--site-header-gap));
}

body {
  font-family: var(--font-ui);
  background-color: var(--onyx);
  color: var(--platinum);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.premium-site {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 58, 237, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(34, 211, 238, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 35% at 0% 80%, rgba(91, 33, 182, 0.1), transparent 45%),
    linear-gradient(180deg, #fdfcff 0%, var(--onyx) 40%, var(--emerald-mist) 100%);
}

.premium-site::selection {
  background: rgba(124, 58, 237, 0.18);
  color: var(--emerald-deep);
}

h1, h2, h3 {
  font-family: var(--font-ui);
  letter-spacing: -0.025em;
}

/* Glass pane utility */
.glass-pane {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.94) 42%,
    rgba(237, 233, 254, 0.88) 100%
  );
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow:
    var(--shadow-soft),
    0 1px 0 rgba(255, 255, 255, 0.98) inset,
    0 -1px 0 rgba(124, 58, 237, 0.04) inset;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-pane::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.75) 0%,
    transparent 38%,
    rgba(34, 211, 238, 0.06) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.glass-pane > * {
  position: relative;
  z-index: 1;
}

.glass-pane-strong {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.99) 0%,
    rgba(252, 250, 255, 0.97) 48%,
    rgba(237, 233, 254, 0.94) 100%
  );
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  border: 1px solid rgba(124, 58, 237, 0.14);
  border-radius: var(--radius-xl);
  box-shadow:
    var(--shadow-elevated),
    0 1px 0 rgba(255, 255, 255, 0.98) inset,
    0 0 0 1px rgba(255, 255, 255, 0.55) inset,
    var(--shadow-glow);
}

.glass-pane-strong::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.85) 0%,
    transparent 42%,
    rgba(124, 58, 237, 0.05) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.glass-pane-strong > * {
  position: relative;
  z-index: 1;
}

main section article.glass-pane,
main section article.glass-pane-strong {
  border-radius: var(--radius-xl);
}

main section article.glass-pane:hover,
main section article.glass-pane-strong:hover {
  transform: translateY(-3px);
  box-shadow:
    0 28px 56px rgba(46, 16, 101, 0.14),
    0 0 40px rgba(124, 58, 237, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.98) inset;
  border-color: rgba(124, 58, 237, 0.28);
}

/* Ambient glow behind hero card */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.ambient-glow-emerald {
  background: radial-gradient(circle, rgba(124, 58, 237, 0.22) 0%, rgba(34, 211, 238, 0.08) 40%, transparent 70%);
}

.ambient-glow-white {
  background: radial-gradient(circle, rgba(34, 211, 238, 0.12) 0%, transparent 70%);
}

/* CTA buttons — high-contrast text, centered on all axes */
.btn-primary,
a.btn-primary,
button.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(135deg, #9333ea 0%, var(--emerald-deep) 52%, #0f0520 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.75rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 2px 0 rgba(34, 211, 238, 0.15) inset,
    0 10px 28px rgba(46, 16, 101, 0.32),
    0 0 24px rgba(124, 58, 237, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover {
  color: #ffffff;
  transform: translateY(-1px);
  background: linear-gradient(135deg, #a855f7 0%, #6d28d9 50%, #2e1065 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 0 32px rgba(34, 211, 238, 0.25),
    0 14px 36px rgba(124, 58, 237, 0.4);
}

.btn-primary:focus-visible,
a.btn-primary:focus-visible,
button.btn-primary:focus-visible {
  color: #ffffff;
}

.btn-ghost,
a.btn-ghost,
button.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--emerald-deep);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 0.75rem;
  box-shadow: 0 2px 12px rgba(46, 16, 101, 0.06);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-ghost:hover,
a.btn-ghost:hover,
button.btn-ghost:hover {
  color: var(--emerald-deep);
  background: #ffffff;
  border-color: rgba(124, 58, 237, 0.35);
}

/* Stat chip */
.stat-chip {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(237, 233, 254, 0.88));
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 4px 16px rgba(46, 16, 101, 0.06);
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.12);
}

/* Floating navigation bar */
.site-header {
  pointer-events: none;
}

.floating-nav {
  pointer-events: auto;
  transition:
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    transform 0.35s ease;
  box-shadow:
    0 6px 24px rgba(46, 16, 101, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

.floating-nav.is-scrolled {
  transform: translateY(0);
  border-color: rgba(124, 58, 237, 0.2);
  box-shadow:
    0 16px 40px rgba(46, 16, 101, 0.14),
    0 0 48px rgba(124, 58, 237, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.96) inset;
}

.hero-section {
  position: relative;
  isolation: isolate;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 15% 0%, rgba(124, 58, 237, 0.14), transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 30%, rgba(34, 211, 238, 0.1), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.hero-section .hero-content {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--site-header-offset) + var(--site-header-gap));
}

.hero-eyebrow {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(237, 233, 254, 0.9));
  border: 1px solid rgba(124, 58, 237, 0.2);
  box-shadow: 0 6px 20px rgba(46, 16, 101, 0.08);
  backdrop-filter: blur(12px);
}

.hero-card {
  border-radius: var(--radius-xl);
  box-shadow:
    var(--shadow-elevated),
    0 0 0 1px rgba(124, 58, 237, 0.1),
    0 0 72px rgba(124, 58, 237, 0.12),
    0 0 32px rgba(34, 211, 238, 0.08);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.4), rgba(34, 211, 238, 0.25), rgba(124, 58, 237, 0.18));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-heading {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 100%;
}

.hero-heading-line {
  display: block;
  white-space: nowrap;
  font-size: clamp(1rem, 1.2vw + 0.75rem, 2.125rem);
}

.hero-heading-line:last-child {
  background: linear-gradient(135deg, var(--emerald-deep) 0%, var(--emerald-glow) 55%, var(--gold-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 380px) {
  .hero-heading-line {
    font-size: clamp(0.8125rem, 3.5vw, 0.9375rem);
  }
}

/* Tighter vertical rhythm between page sections */
.section-shell {
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}

@media (min-width: 640px) {
  .section-shell {
    padding-top: 2.25rem;
    padding-bottom: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .section-shell {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
}

.section-intro {
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .section-intro {
    margin-bottom: 1.25rem;
  }
}

/* Compact layout — reduce empty space between frames and content blocks */
.premium-site main section .glass-pane[class*="p-5"],
.premium-site main section .glass-pane-strong[class*="p-5"] {
  padding: 1rem !important;
}

@media (min-width: 640px) {
  .premium-site main section .glass-pane[class*="sm:p-6"],
  .premium-site main section .glass-pane-strong[class*="sm:p-6"] {
    padding: 1.125rem !important;
  }
}

@media (min-width: 1024px) {
  .premium-site main section .glass-pane[class*="lg:p-8"],
  .premium-site main section .glass-pane-strong[class*="lg:p-8"] {
    padding: 1.375rem !important;
  }
}

.premium-site main section .mb-6 {
  margin-bottom: 1rem !important;
}

@media (min-width: 640px) {
  .premium-site main section .sm\:mb-8 {
    margin-bottom: 1.25rem !important;
  }

  .premium-site main section .sm\:mb-6 {
    margin-bottom: 0.875rem !important;
  }
}

.premium-site main section .mb-5 {
  margin-bottom: 0.875rem !important;
}

@media (min-width: 640px) {
  .premium-site main section .sm\:mb-5 {
    margin-bottom: 1rem !important;
  }
}

.premium-site main section .gap-6 {
  gap: 1rem !important;
}

.premium-site main section .gap-5 {
  gap: 0.875rem !important;
}

.premium-site main section .gap-8 {
  gap: 1.125rem !important;
}

@media (min-width: 640px) {
  .premium-site main section .sm\:gap-5 {
    gap: 0.875rem !important;
  }

  .premium-site main section .sm\:gap-6 {
    gap: 1rem !important;
  }
}

@media (min-width: 1024px) {
  .premium-site main section .lg\:gap-8 {
    gap: 1.25rem !important;
  }

  .premium-site main section .lg\:gap-10 {
    gap: 1.5rem !important;
  }

  .premium-site main section .lg\:gap-7 {
    gap: 1.125rem !important;
  }
}

@media (min-width: 1280px) {
  .premium-site main section .xl\:gap-12 {
    gap: 1.75rem !important;
  }
}

.premium-site .hero-content {
  padding-bottom: 1.5rem !important;
}

@media (min-width: 640px) {
  .premium-site .hero-content {
    padding-bottom: 2rem !important;
  }
}

@media (min-width: 1024px) {
  .premium-site .hero-content {
    padding-bottom: 2.25rem !important;
  }
}

.premium-site .hero-content .mb-6,
.premium-site .hero-content .sm\:mb-8 {
  margin-bottom: 1rem !important;
}

@media (min-width: 640px) {
  .premium-site .hero-content .sm\:mb-8 {
    margin-bottom: 1.125rem !important;
  }
}

.premium-site .hero-content .mb-4,
.premium-site .hero-content .sm\:mb-6 {
  margin-bottom: 0.75rem !important;
}

@media (min-width: 640px) {
  .premium-site .hero-content .sm\:mb-6 {
    margin-bottom: 0.875rem !important;
  }
}

.premium-site .hero-content .mt-6,
.premium-site .hero-content .sm\:mt-8 {
  margin-top: 1rem !important;
}

.premium-site .premium-footer > div,
.premium-site .premium-footer .footer-shell {
  padding-top: 1.125rem !important;
  padding-bottom: 1.125rem !important;
}

@media (min-width: 640px) {
  .premium-site .premium-footer > div,
  .premium-site .premium-footer .footer-shell {
    padding-top: 1.375rem !important;
    padding-bottom: 1.375rem !important;
  }
}

.premium-site #checker-placeholder {
  min-height: 11rem !important;
}

.premium-site main section article .mb-4 {
  margin-bottom: 0.75rem !important;
}

.premium-site main section article .mb-3 {
  margin-bottom: 0.5rem !important;
}

.premium-site .dctce-detail {
  margin-top: 0.5rem;
  padding: 0.625rem 0.875rem;
  min-height: 3rem;
}

.premium-site .dctce-diagram--full .dctce-detail {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  min-height: 3.5rem;
}

.premium-site .dctce-detail--compact {
  min-height: 2.25rem;
  padding: 0.4rem 0.625rem;
}

.premium-site main section table th,
.premium-site main section table td {
  padding: 0.75rem 1.125rem !important;
}

/* Mobile nav panel */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  border-top: 1px solid transparent;
}

#mobile-menu.open {
  max-height: 24rem;
  border-top-color: var(--line);
}

#mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

#mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

#mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.hamburger-line {
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--emerald-glow);
  outline-offset: 2px;
}

.input-error {
  border-color: rgba(220, 80, 60, 0.6) !important;
  box-shadow: 0 0 0 1px rgba(220, 80, 60, 0.3);
}

.form-input {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid rgba(46, 16, 101, 0.16);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  color: var(--platinum);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder {
  color: rgba(107, 98, 128, 0.55);
}

.captcha-question {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(124, 58, 237, 0.22);
  background: rgba(237, 233, 254, 0.65);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--platinum);
  user-select: none;
}

.captcha-question.is-error {
  border-color: rgba(220, 80, 60, 0.55);
  box-shadow: 0 0 0 1px rgba(220, 80, 60, 0.25);
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--platinum-muted);
  margin-bottom: 0.375rem;
}

.form-radio-label,
.form-check-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--platinum-muted);
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.form-radio-label:has(input:checked),
.form-check-label:has(input:checked) {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(34, 211, 238, 0.08));
  border-color: rgba(124, 58, 237, 0.35);
  color: var(--platinum);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.15);
}

.form-radio-label input,
.form-check-label input {
  accent-color: var(--emerald-glow);
}

/* Text brand — replace with logo image when available */
.site-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.0625rem;
  min-width: 0;
  text-decoration: none;
  line-height: 1.15;
}

.site-brand-line {
  display: block;
  white-space: nowrap;
}

.site-brand-line--primary {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--emerald-deep);
}

.site-brand-line--title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--platinum);
}

.site-brand-line--tagline {
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #06b6d4;
}

.site-brand-line--division {
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--platinum-muted);
}

@media (min-width: 640px) {
  .site-brand {
    gap: 0.125rem;
  }

  .site-brand-line--primary {
    font-size: 1.375rem;
  }

  .site-brand-line--title {
    font-size: 0.75rem;
  }

  .site-brand-line--tagline {
    font-size: 0.625rem;
  }

  .site-brand-line--division {
    font-size: 0.5625rem;
  }
}

/* Penalty amount highlight */
.penalty-amount {
  color: #c2410c;
  font-variant-numeric: tabular-nums;
}

/* Integration step connector */
.step-connector {
  background: linear-gradient(180deg, var(--emerald-glow), rgba(91, 33, 182, 0.15));
}

@media (min-width: 768px) {
  .step-connector {
    background: linear-gradient(90deg, var(--emerald-glow), rgba(91, 33, 182, 0.15));
  }
}

/* ═══ Interactive DCTCE Diagram ═══ */
.dctce-diagram {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.dctce-canvas {
  width: 100%;
  overflow: hidden;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.5);
}

.dctce-svg {
  width: 100%;
  height: auto;
  display: block;
  max-height: 22rem;
}

.dctce-diagram--compact .dctce-svg {
  max-height: 10rem;
}

.dctce-node {
  cursor: pointer;
  transition: opacity 0.2s ease;
  outline: none;
}

.dctce-node .dctce-hit {
  fill: transparent;
  stroke: none;
  pointer-events: all;
}

.dctce-pulse,
.dctce-pulse-ctc {
  pointer-events: none;
}

.dctce-edge {
  pointer-events: none;
}

.dctce-node rect {
  transition: stroke 0.25s ease, filter 0.25s ease;
}

.dctce-node:hover rect,
.dctce-node:focus-visible rect,
.dctce-node.is-active rect {
  stroke: #7c3aed;
  filter: drop-shadow(0 0 8px rgba(91, 33, 182, 0.35));
}

.dctce-node:focus-visible {
  outline: 2px solid var(--emerald-glow);
  outline-offset: 3px;
  border-radius: 4px;
}

.dctce-node-featured rect {
  filter: drop-shadow(0 0 6px rgba(91, 33, 182, 0.25));
}

.dctce-node-featured:hover rect,
.dctce-node-featured.is-active rect {
  filter: drop-shadow(0 0 14px rgba(91, 33, 182, 0.4));
}

.dctce-edge {
  transition: opacity 0.25s ease, stroke-width 0.25s ease;
}

.dctce-edge.is-active {
  opacity: 1 !important;
  stroke-width: 3;
}

.dctce-edge-flow.is-active {
  stroke: #22d3ee;
}

.dctce-edge-ctc.is-active {
  stroke: #22d3ee;
  opacity: 0.9 !important;
}

.dctce-detail {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  min-height: 3.5rem;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.dctce-diagram--full .dctce-detail {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  min-height: 4.5rem;
}

.dctce-detail.is-visible {
  border-color: rgba(91, 33, 182, 0.35);
  background: rgba(237, 233, 254, 0.9);
}

.dctce-detail-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--platinum);
  margin-bottom: 0.25rem;
}

.dctce-detail-desc {
  font-size: 0.75rem;
  color: var(--platinum-muted);
  line-height: 1.5;
}

.dctce-diagram--full .dctce-detail-label {
  font-size: 0.9375rem;
}

.dctce-diagram--full .dctce-detail-desc {
  font-size: 0.875rem;
}

.dctce-detail--compact.is-visible {
  border-color: rgba(91, 33, 182, 0.35);
  background: rgba(237, 233, 254, 0.95);
}

.dctce-detail--compact {
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
}

.dctce-detail--compact .dctce-detail-label {
  font-size: 0.625rem;
}

.dctce-detail--compact .dctce-detail-desc {
  font-size: 0.625rem;
}

@media (prefers-reduced-motion: reduce) {
  .dctce-pulse,
  .dctce-pulse-ctc {
    display: none;
  }
}

/* Hero diagram placeholder */
.diagram-placeholder {
  background: repeating-linear-gradient(
    -45deg,
    rgba(124, 58, 237, 0.02),
    rgba(124, 58, 237, 0.02) 8px,
    rgba(34, 211, 238, 0.05) 8px,
    rgba(34, 211, 238, 0.05) 16px
  );
  border: 1px dashed rgba(124, 58, 237, 0.2);
}

/* Timeline connector */
.timeline-line {
  background: linear-gradient(
    180deg,
    var(--emerald-glow) 0%,
    rgba(91, 33, 182, 0.3) 50%,
    rgba(91, 33, 182, 0.1) 100%
  );
}

@media (min-width: 1024px) {
  .timeline-line {
    background: linear-gradient(
      90deg,
      var(--emerald-glow) 0%,
      rgba(91, 33, 182, 0.3) 50%,
      rgba(91, 33, 182, 0.1) 100%
    );
  }
}

/* Phase badge variants */
.badge-critical {
  background: rgba(220, 80, 60, 0.12);
  border: 1px solid rgba(220, 80, 60, 0.3);
  color: #c2410c;
}

.badge-plan {
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.28);
  color: var(--emerald-deep);
}

.badge-voluntary {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  color: var(--platinum-muted);
}

/* Architecture node card hover */
.arch-node {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.arch-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46, 16, 101, 0.1);
}

.arch-node-featured {
  border-color: rgba(91, 33, 182, 0.35);
  box-shadow: 0 4px 20px rgba(91, 33, 182, 0.12);
}

/* Roadmap horizontal scroll on small screens */
.roadmap-scroll {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--emerald-glow) transparent;
}

.roadmap-scroll::-webkit-scrollbar {
  height: 4px;
}

.roadmap-scroll::-webkit-scrollbar-thumb {
  background: var(--emerald-glow);
  border-radius: 4px;
}

@media (min-width: 1024px) {
  .roadmap-scroll {
    grid-auto-rows: 1fr;
    align-items: stretch;
  }

  .roadmap-scroll > article {
    height: 100%;
  }
}

/* ═══ Premium polish layer ═══ */

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--platinum-muted);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--emerald-deep);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(34, 211, 238, 0.06));
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.35rem;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--emerald-glow), var(--gold-accent));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.section-intro > p:first-child {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  margin-bottom: 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald-deep);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(237, 233, 254, 0.86));
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(46, 16, 101, 0.06);
}

.section-intro h2 {
  font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--platinum);
  margin-bottom: 0.5rem;
}

.section-intro > p:not(:first-child) {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--platinum-muted);
}

#roadmap,
#penalties {
  background: linear-gradient(180deg, var(--onyx-alt) 0%, rgba(240, 247, 244, 0.6) 100%) !important;
}

#architecture,
#asp-integration,
#contact {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, var(--onyx) 100%);
}

#compliance-checker {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(124, 58, 237, 0.1), transparent 60%),
    radial-gradient(ellipse 40% 30% at 80% 20%, rgba(34, 211, 238, 0.08), transparent 50%),
    var(--onyx);
}

.site-brand {
  padding-left: 0.75rem;
  border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, var(--emerald-glow), var(--gold-accent)) 1;
}

.site-brand-line--primary {
  background: linear-gradient(135deg, var(--emerald-deep), var(--emerald-glow), var(--gold-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.premium-footer {
  background:
    linear-gradient(165deg, #1a0a3d 0%, #0f0520 48%, #12082a 100%);
  color: rgba(245, 243, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(124, 58, 237, 0.2);
}

.footer-shell {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

@media (min-width: 640px) {
  .footer-shell {
    gap: 1rem;
  }
}

.footer-top {
  margin-bottom: 0;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.footer-brand-block .site-brand--footer {
  margin-top: 0;
  gap: 0.05rem;
}

.footer-tagline {
  margin: 0;
  max-width: 22rem;
}

.footer-nav {
  align-content: flex-start;
}

.footer-bottom {
  padding-top: 0.75rem;
}

.footer-bottom-row {
  margin-bottom: 0.375rem;
}

.footer-disclaimer {
  margin: 0;
  max-width: 48rem;
}

.footer-logo {
  display: block;
  width: auto;
  height: 2.5rem;
  flex-shrink: 0;
  max-width: 100%;
  filter: drop-shadow(0 4px 12px rgba(124, 58, 237, 0.35));
}

@media (min-width: 640px) {
  .footer-logo {
    height: 2.75rem;
  }
}

.site-brand--footer .site-brand-line--primary {
  font-size: 1.0625rem;
  line-height: 1.1;
}

.site-brand--footer .site-brand-line--title {
  font-size: 0.6875rem;
  line-height: 1.2;
}

.site-brand--footer .site-brand-line--tagline {
  font-size: 0.5625rem;
  line-height: 1.2;
}

.site-brand--footer .site-brand-line--division {
  font-size: 0.5rem;
  line-height: 1.2;
}

.footer-brand:hover .footer-logo {
  opacity: 0.92;
}

.premium-footer .site-brand {
  border-image: linear-gradient(180deg, var(--emerald-glow), var(--gold-accent)) 1;
}

.premium-footer .site-brand-line--primary {
  background: linear-gradient(135deg, #f5f3ff, #c4b5fd, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.premium-footer .site-brand-line--title,
.premium-footer .site-brand-line--tagline,
.premium-footer .site-brand-line--division {
  color: rgba(216, 180, 254, 0.8);
}

.premium-footer .site-brand-line--tagline {
  color: rgba(103, 232, 249, 0.95);
}

.premium-footer p,
.premium-footer a {
  color: rgba(216, 180, 254, 0.78);
}

.premium-footer a:hover {
  color: #67e8f9;
}

.premium-footer .text-platinum,
.premium-footer .text-platinum-muted {
  color: rgba(237, 233, 254, 0.88);
}

.premium-footer > div > .border-t,
.premium-footer .footer-bottom {
  border-color: rgba(124, 58, 237, 0.2);
}

.form-input {
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 2px rgba(46, 16, 101, 0.04);
}

.form-input:focus {
  outline: none;
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow:
    0 0 0 4px rgba(124, 58, 237, 0.12),
    0 0 24px rgba(34, 211, 238, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  main section article.glass-pane:hover,
  main section article.glass-pane-strong:hover,
  .stat-chip:hover,
  .btn-primary:hover {
    transform: none;
  }
}
