/* =========================================================================
   TZRO UNIFIED DESIGN SYSTEM & STYLESHEET
   ========================================================================= */

@layer reset, tokens, base, layout, components, utility;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
  }

  table {
    border-collapse: collapse;
    width: 100%;
  }

  button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  textarea {
    font-family: inherit;
    resize: none;
  }
}

/* =========================================================================
   DESIGN TOKENS (CSS VARIABLE TIERS)
   ========================================================================= */
@layer tokens {
  :root {
    /* Tier 1: Literal Tokens (Fonts & Constants) */
    --font-sans: "Inter", system-ui, -apple-system, sans-serif;
    --font-geom: "Outfit", "Inter", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", monospace;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;

    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-glow-cyan: 0 0 20px rgba(6, 182, 212, 0.3);
    --shadow-glow-green: 0 0 20px rgba(16, 185, 129, 0.3);
    --shadow-glow-blue: 0 0 20px rgba(59, 130, 246, 0.35);

    /* Tier 2 & 3: Semantic Tokens (Verdant-Synth Bio-Synthetic Design System) */
    --accent-color: #b6ff00; /* Cyber Lime */
    --accent-glow: rgba(182, 255, 0, 0.2);
    --secondary-color: #5c6b62; /* Muted Sage */
    --bg-main: #0a110d; /* Deep Moss */
    --bg-card: #131f18; /* Forest Shadow */
    --border-color: #223329; /* Foliage Line */
    --text-primary: #f1f4f2; /* Off-Alabaster */
    --text-secondary: #9caf9f; /* Lichen Grey */
    --text-muted: #5c6b62; /* Muted Sage */

    --header-height: 80px;
  }
}

/* =========================================================================
   BASE STYLES
   ========================================================================= */
@layer base {
  body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-geom);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition:
      background-color var(--transition-smooth),
      color var(--transition-smooth);
    padding-top: var(--header-height);
  }

  h1,
  h2,
  h3,
  h4 {
    color: var(--text-primary);
    font-weight: 700;
  }

  /* Accessibility focus visible state */
  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  textarea:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
  }
}

/* =========================================================================
   UNIVERSAL LAYOUT ELEMENTS
   ========================================================================= */
@layer layout {
  .tzro-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition:
      background-color var(--transition-smooth),
      border-color var(--transition-smooth);
  }

  .header-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo-area {
    display: flex;
    align-items: center;
    gap: 0.8rem;
  }

  .tzro-logo {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    transition: transform var(--transition-smooth);
  }

  .logo-area:hover .tzro-logo {
    transform: rotate(5deg) scale(1.05);
  }

  .logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    font-family: var(--font-geom);
    color: var(--text-primary);
  }

  .header-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }

  .nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
  }

  .nav-link:hover {
    color: var(--accent-color);
  }

  .github-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    transition:
      background-color var(--transition-fast),
      border-color var(--transition-fast);
  }

  .github-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-color);
  }

  .github-icon {
    width: 18px;
    height: 18px;
  }

  /* Landing Sections Flow */
  .landing-main {
    flex-grow: 1;
    position: relative;
    padding-bottom: 4rem;
  }

  .approach-section,
  .playground-section {
    padding: 6rem 2rem;
    position: relative;
    border-top: 1px solid var(--border-color);
  }

  .section-title {
    font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
    font-family: var(--font-geom);
  }

  .section-desc {
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 800px;
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: 3.5rem; /* Generous bottom margin to improve vertical rhythm */
  }

  /* Universal Footer */
  .tzro-footer {
    border-top: 1px solid var(--border-color);
    background-color: rgba(9, 12, 18, 0.9);
    padding: 2.5rem 2rem;
    z-index: 10;
    transition:
      background-color var(--transition-smooth),
      border-color var(--transition-smooth);
  }

  .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
  }

  .footer-container p {
    color: var(--text-muted);
    font-size: 0.88rem;
  }

  .footer-links {
    display: flex;
    gap: 2rem;
  }

  .footer-links a {
    font-size: 0.88rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
  }

  .footer-links a:hover {
    color: var(--accent-color);
  }
}

/* =========================================================================
   VARIANT A STYLING: CYBERPUNK MONOSPACE TERMINAL
   ========================================================================= */
@layer components {
  /* Bio-Synthetic Grounded Background (Soft, organic, bioluminescent) */
  .cyber-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
      radial-gradient(
        circle at 15% 15%,
        rgba(182, 255, 0, 0.04) 0%,
        transparent 45%
      ),
      radial-gradient(
        circle at 85% 85%,
        rgba(29, 47, 36, 0.3) 0%,
        transparent 60%
      );
    pointer-events: none;
    z-index: 0;
  }

  /* Horizon Pulse Line */
  .horizon-pulse-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent-color);
    transform-origin: center;
    transform: scaleX(0);
    opacity: 0;
    z-index: 100;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease;
  }

  .horizon-pulse-line.pulsing {
    animation: horizonPulse 1.8s infinite ease-in-out;
  }

  @keyframes horizonPulse {
    0% {
      opacity: 0.3;
      transform: scaleX(0.8);
    }
    50% {
      opacity: 1;
      transform: scaleX(1);
      filter: drop-shadow(0 0 6px var(--accent-color));
    }
    100% {
      opacity: 0.3;
      transform: scaleX(0.8);
    }
  }

  #variant-a .hero-section {
    position: relative;
    z-index: 1;
    padding: 4rem 2rem;
  }

  .hero-container {
    max-width: 1200px;
    margin: 0 auto;
  }

  .hero-badge {
    display: inline-block;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    background-color: rgba(16, 185, 129, 0.08);
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
  }

  .hero-title {
    font-size: clamp(2rem, 1.2rem + 4vw, 3.8rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
    font-family: var(--font-geom);
    letter-spacing: -0.03em;
  }

  .glow-text {
    text-shadow: 0 0 15px var(--accent-glow);
    color: var(--accent-color);
  }

  .hero-desc {
    font-size: clamp(1rem, 0.95rem + 0.5vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 700px;
    line-height: 1.6;
    margin-bottom: 3.5rem;
  }

  /* Dashboard Grid */
  .dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
  }

  @media (min-width: 900px) {
    .dashboard-grid {
      grid-template-columns: 4.5fr 5.5fr;
    }
  }

  .terminal-card,
  .simulator-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
  }

  /* Terminal Window decoration */
  .terminal-header {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .terminal-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
  }

  .terminal-header .dot.red {
    background-color: #ef4444;
  }
  .terminal-header .dot.yellow {
    background-color: #f59e0b;
  }
  .terminal-header .dot.green {
    background-color: #10b981;
  }

  .terminal-title {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
    font-family: var(--font-mono);
  }

  .terminal-body {
    padding: 1.5rem;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    overflow-x: auto;
  }

  .monospace {
    font-family: var(--font-mono);
  }

  .terminal-body .line .cyan {
    color: var(--secondary-color);
    font-weight: 600;
  }

  .terminal-body .line.success {
    color: var(--accent-color);
  }

  .active-subsystems table {
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
  }

  .active-subsystems th,
  .active-subsystems td {
    padding: 0.5rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
  }

  .active-subsystems th {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
  }

  .blink {
    animation: blinker 1.2s linear infinite;
    color: var(--accent-color);
  }

  @keyframes blinker {
    50% {
      opacity: 0;
    }
  }

  /* Variant A: Simulator Card */
  .card-header-vA {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
  }

  .card-header-vA h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
  }

  .card-header-vA p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
  }

  .sim-controls {
    display: flex;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-color);
  }

  .sim-btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    transition:
      transform var(--transition-fast),
      background-color var(--transition-fast);
  }

  .glow-btn {
    background-color: var(--accent-color);
    color: #000;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
  }

  .glow-btn:hover {
    transform: translateY(-1px);
    background-color: #12d594;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.6);
  }

  .secondary-btn {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
  }

  .secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
  }

  /* Verdant-Synth Primary Action Triggers Overrides */
  body.verdant-synth .glow-btn {
    background-color: var(--accent-color);
    color: #0a110d; /* Pure Deep Moss text for contrast */
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(182, 255, 0, 0.15);
  }

  body.verdant-synth .glow-btn:hover {
    background-color: #c4ff33;
    transform: translateY(-1px);
    box-shadow:
      0 6px 18px rgba(182, 255, 0, 0.3),
      0 0 12px rgba(182, 255, 0, 0.4);
  }

  body.verdant-synth .secondary-btn {
    background-color: #1d2f24; /* Medium-light Deep Moss */
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-weight: 600;
  }

  body.verdant-synth .secondary-btn:hover {
    background-color: #273f30;
  }

  .graph-visualizer {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 250px;
    background-color: rgba(0, 0, 0, 0.08);
  }

  @media (min-width: 500px) {
    .graph-visualizer {
      flex-direction: row;
    }
  }

  .level-column {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
    flex: 1;
  }

  .level-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .sim-node {
    width: 100%;
    max-width: 160px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.3);
    transition: all var(--transition-smooth);
  }

  .sim-node .node-id {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
  }

  .sim-node .node-action {
    font-size: 0.65rem;
    color: var(--text-muted);
  }

  .level-arrow {
    font-size: 1.2rem;
    color: var(--text-muted);
  }

  @media (max-width: 500px) {
    .level-arrow {
      transform: rotate(90deg);
      margin: 0.5rem 0;
    }
  }

  /* Node States */
  .sim-node.pending {
    border-color: var(--border-color);
    opacity: 0.6;
  }

  .sim-node.running {
    border-color: var(--secondary-color);
    background-color: rgba(6, 182, 212, 0.08);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.25);
    animation: pulse-node 1.5s infinite;
  }

  .sim-node.completed {
    border-color: var(--accent-color);
    background-color: rgba(16, 185, 129, 0.08);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
  }

  .sim-node.planner {
    border-color: #64748b;
    opacity: 0.9;
  }

  /* Variant A Bio-Synthetic Node Overrides */
  body.verdant-synth .sim-node {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-secondary);
  }

  body.verdant-synth .sim-node.pending {
    opacity: 0.55;
  }

  body.verdant-synth .sim-node.running {
    border-color: var(--accent-color);
    background-color: rgba(182, 255, 0, 0.05);
    color: var(--text-primary);
    box-shadow:
      0 0 15px rgba(182, 255, 0, 0.15),
      inset 0 0 8px rgba(182, 255, 0, 0.05);
  }

  body.verdant-synth .sim-node.completed {
    border-color: var(--accent-color);
    background-color: #1d2f24;
    color: var(--text-primary);
    box-shadow: 0 0 10px rgba(182, 255, 0, 0.1);
  }

  body.verdant-synth .sim-node.planner {
    border-color: #8b5cf6; /* Strategic Violet */
    background-color: rgba(139, 92, 246, 0.05);
    color: var(--text-primary);
    opacity: 1;
  }

  @keyframes pulse-node {
    0%,
    100% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.02);
    }
  }

  .sim-log-console {
    background-color: #090b0e;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    height: 120px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }

  .log-line {
    color: var(--text-secondary);
  }

  .log-line.cyan {
    color: var(--secondary-color);
  }
  .log-line.success {
    color: var(--accent-color);
  }

  /* Zero Setup Commands */
  .quickstart-section {
    border-top: 1px dashed var(--border-color);
    padding-top: 4rem;
  }

  .quickstart-section h2 {
    font-size: 1.5rem;
    font-family: var(--font-geom);
    margin-bottom: 2rem;
  }

  .commands-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  @media (min-width: 768px) {
    .commands-row {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  .code-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  .code-box-header {
    background-color: rgba(0, 0, 0, 0.25);
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
  }

  .code-box pre {
    padding: 1.2rem 1rem;
    font-size: 0.8rem;
    overflow-x: auto;
    color: var(--accent-color);
  }
}

/* =========================================================================
   VARIANT B STYLING: FROSTED GLASSMORPHIC MINIMALIST
   ========================================================================= */
@layer components {
  .glass-bg-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
  }

  .glass-bg-blobs .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: float-blobs 20s infinite alternate;
  }

  .glass-bg-blobs .blob-purple {
    top: 15%;
    left: 20%;
    width: 400px;
    height: 400px;
    background-color: #8b5cf6;
  }

  .glass-bg-blobs .blob-blue {
    bottom: 20%;
    right: 15%;
    width: 500px;
    height: 500px;
    background-color: #3b82f6;
  }

  @keyframes float-blobs {
    0% {
      transform: translate(0, 0) scale(1);
    }
    100% {
      transform: translate(50px, 30px) scale(1.1);
    }
  }

  #variant-b .glass-hero-section {
    position: relative;
    z-index: 1;
    padding: 5rem 2rem;
  }

  .glass-container {
    max-width: 1200px;
    margin: 0 auto;
  }

  .glass-badge {
    display: inline-block;
    background: linear-gradient(
      135deg,
      rgba(139, 92, 246, 0.25),
      rgba(59, 130, 246, 0.25)
    );
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-xl);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #c084fc;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
  }

  .glass-title {
    font-size: clamp(2.2rem, 1.5rem + 4vw, 4rem);
    font-family: var(--font-geom);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 40%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .glass-desc {
    font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.35rem);
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 780px;
    margin-bottom: 4rem;
  }

  .glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    transition:
      transform var(--transition-smooth),
      border-color var(--transition-smooth);
  }

  .glass-card:hover {
    transform: translateY(-3px);
  }

  .premium-border {
    position: relative;
  }

  .premium-border::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.1),
      rgba(255, 255, 255, 0.02) 50%,
      rgba(139, 92, 246, 0.25)
    );
    -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;
  }

  .split-architecture {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 4.5rem;
  }

  @media (min-width: 800px) {
    .split-architecture {
      grid-template-columns: 1fr 1fr;
    }
  }

  .card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .card-icon.red-g {
    background: linear-gradient(
      135deg,
      rgba(239, 68, 68, 0.2),
      rgba(244, 63, 94, 0.1)
    );
    border: 1px solid rgba(239, 68, 68, 0.3);
  }

  .card-icon.green-g {
    background: linear-gradient(
      135deg,
      rgba(16, 185, 129, 0.2),
      rgba(6, 182, 212, 0.1)
    );
    border: 1px solid rgba(16, 185, 129, 0.3);
  }

  .glass-card h2 {
    font-size: 1.6rem;
    margin-bottom: 0.2rem;
    font-family: var(--font-geom);
  }

  .glass-card .subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.8rem;
  }

  .benefit-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .benefit-list li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    position: relative;
    padding-left: 1.5rem;
  }

  .benefit-list li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--accent-color);
  }

  /* Compactor Showcase module */
  .compactor-container {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 4rem;
  }

  .compactor-header {
    margin-bottom: 2.5rem;
  }

  .compactor-header h2 {
    font-size: 1.8rem;
    font-family: var(--font-geom);
    margin-bottom: 0.5rem;
  }

  .compactor-header p {
    font-size: 0.95rem;
    color: var(--text-muted);
  }

  .compactor-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  @media (min-width: 900px) {
    .compactor-grid {
      grid-template-columns: 4.5fr 7.5fr;
    }
  }

  .compactor-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .compactor-controls label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
  }

  .preset-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }

  .preset-btn {
    text-align: left;
    padding: 0.8rem 1rem;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition-fast);
  }

  .preset-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
  }

  .preset-btn.active {
    background-color: rgba(139, 92, 246, 0.1);
    border-color: var(--accent-color);
    color: var(--text-primary);
  }

  /* Pipeline Graphic */
  .compaction-pipeline-visual {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
  }

  .pipeline-step-item {
    font-size: 0.78rem;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.02);
    border-left: 2px solid transparent;
    transition: all var(--transition-fast);
  }

  .pipeline-step-item .status {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
  }

  .pipeline-step-item.active {
    background-color: rgba(59, 130, 246, 0.08);
    border-left-color: var(--secondary-color);
  }

  .pipeline-step-item.active .status {
    color: var(--secondary-color);
  }

  .pipeline-step-item.completed {
    background-color: rgba(16, 185, 129, 0.06);
    border-left-color: var(--accent-color);
  }

  .pipeline-step-item.completed .status {
    color: var(--accent-color);
  }

  .compress-trigger {
    background: linear-gradient(
      135deg,
      var(--accent-color),
      var(--secondary-color)
    );
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    text-align: center;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.25);
    transition:
      transform var(--transition-fast),
      box-shadow var(--transition-fast);
  }

  .compress-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
  }

  /* Payload Displays */
  .payload-visuals {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  @media (min-width: 600px) {
    .payload-visuals {
      grid-template-columns: 1fr 1fr;
    }
  }

  .payload-box {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }

  .box-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .payload-box textarea {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.5;
    height: 300px;
    outline: none;
    overflow-y: auto;
  }

  .compacted-output-wrapper {
    position: relative;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    height: 300px;
    overflow: hidden;
  }

  .compacted-output-wrapper pre {
    padding: 1rem;
    font-size: 0.75rem;
    line-height: 1.5;
    height: 100%;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
  }

  /* Disk Cache Banner */
  .disk-cache-banner {
    position: absolute;
    inset: 0;
    background-color: #0b0f19;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: var(--radius-sm);
    z-index: 5;
    animation: fade-in 0.3s ease-out;
  }

  .disk-cache-banner .banner-title {
    color: #f59e0b;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
  }

  .disk-cache-banner p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 1.2rem;
  }

  .cache-json-output {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 0.8rem;
    border-radius: 4px;
    font-size: 0.72rem;
    color: #fbbf24;
  }

  @keyframes fade-in {
    from {
      opacity: 0;
      transform: scale(0.98);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  /* Metrics Panel */
  .compactor-metrics {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.04);
    animation: slide-up 0.4s ease-out;
  }

  @media (min-width: 600px) {
    .compactor-metrics {
      flex-direction: row;
      justify-content: center;
      gap: 3.5rem;
    }
  }

  @keyframes slide-up {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .metric-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
  }

  .metric-circle .percent {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
  }

  .metric-circle .label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
  }

  .metric-stats {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }

  .metric-stats div {
    font-size: 0.88rem;
    color: var(--text-secondary);
    display: flex;
    gap: 1rem;
  }

  .metric-stats span {
    color: var(--text-muted);
    min-width: 150px;
  }
}

/* =========================================================================
   VARIANT C STYLING: MODERN DEVELOPER HUB & SDK
   ========================================================================= */
@layer components {
  #variant-c .dx-hero-section {
    padding: 4rem 2rem;
  }

  .dx-container {
    max-width: 1200px;
    margin: 0 auto;
  }

  .dx-badge {
    display: inline-block;
    background-color: rgba(59, 130, 246, 0.08);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.2rem;
    text-transform: uppercase;
  }

  .dx-title {
    font-size: clamp(2rem, 1.3rem + 3.5vw, 3.6rem);
    font-family: var(--font-geom);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
  }

  .dx-desc {
    font-size: clamp(1rem, 0.95rem + 0.5vw, 1.25rem);
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 720px;
    margin-bottom: 3.5rem;
  }

  /* DX Visual Grid */
  .dx-showcase-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: stretch;
  }

  @media (min-width: 1024px) {
    .dx-showcase-grid {
      grid-template-columns: 2.8fr 4.7fr 4.5fr;
    }
  }

  .dx-nav-panel,
  .dx-editor-panel,
  .dx-interactive-sandbox {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
  }

  /* Code snippet links */
  .dx-nav-panel {
    padding: 1.5rem 1rem;
    gap: 0.5rem;
  }

  .dx-nav-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
  }

  .dx-nav-btn {
    text-align: left;
    padding: 0.75rem 0.8rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
  }

  .dx-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
  }

  .dx-nav-btn.active {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    border-left: 2px solid var(--accent-color);
  }

  /* Editor component */
  .dx-editor-panel {
    overflow: hidden;
  }

  .editor-header {
    background-color: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .editor-header .file-name {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
  }

  .editor-header .lang-tag {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
  }

  .editor-body {
    padding: 1.5rem;
    overflow-x: auto;
    flex-grow: 1;
    background-color: #0b0e14;
  }

  .editor-body pre {
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-secondary);
  }

  /* DX Hook Interactive Module */
  .dx-interactive-sandbox {
    padding: 1.8rem;
  }

  .dx-interactive-sandbox h3 {
    font-size: 1.2rem;
    font-family: var(--font-geom);
    margin-bottom: 0.5rem;
  }

  .dx-interactive-sandbox p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 1.5rem;
  }

  .toggles-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 1.8rem;
  }

  .toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.15);
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
  }

  .toggle-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }

  .toggle-text label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
  }

  .toggle-text span {
    font-size: 0.72rem;
    color: var(--text-muted);
  }

  /* IOS styled Switch checkbox */
  .switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
  }

  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 34px;
    transition: 0.3s;
  }

  .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
  }

  input:checked + .slider {
    background-color: var(--accent-color);
  }

  input:checked + .slider:before {
    transform: translateX(20px);
  }

  .dx-run-trigger {
    background-color: var(--accent-color);
    color: #0a110d; /* High-contrast dark Deep Moss text */
    font-weight: 700;
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    text-align: center;
    box-shadow: 0 4px 12px rgba(182, 255, 0, 0.15);
    transition:
      transform var(--transition-fast),
      background-color var(--transition-fast),
      box-shadow var(--transition-fast);
  }

  .dx-run-trigger:hover {
    transform: translateY(-1px);
    background-color: #c4ff33;
    box-shadow:
      0 6px 18px rgba(182, 255, 0, 0.3),
      0 0 12px rgba(182, 255, 0, 0.4);
  }

  .dx-console {
    background-color: #0b0e14;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-size: 0.72rem;
    margin-top: 1.2rem;
    height: 120px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }

  .console-line {
    color: var(--text-secondary);
  }
  .console-line.success {
    color: #10b981;
  }
  .console-line.warning {
    color: #f59e0b;
  }
  .console-line.error {
    color: #ef4444;
  }

  /* HITL Gateway Interaction Box */
  .hitl-prompt {
    margin-top: 1rem;
    padding: 1rem;
    background-color: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
    animation: pulse-border 1.5s infinite;
  }

  @keyframes pulse-border {
    0%,
    100% {
      border-color: rgba(245, 158, 11, 0.3);
    }
    50% {
      border-color: rgba(245, 158, 11, 0.7);
    }
  }

  .hitl-prompt .prompt-text {
    font-size: 0.75rem;
    color: #fbbf24;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.8rem;
  }

  .prompt-actions {
    display: flex;
    gap: 0.8rem;
  }

  .prompt-btn {
    flex: 1;
    padding: 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-align: center;
  }

  .prompt-btn.approve {
    background-color: #f59e0b;
    color: #000;
  }
  .prompt-btn.approve:hover {
    background-color: #d97706;
  }

  .prompt-btn.abort {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
  }
  .prompt-btn.abort:hover {
    background-color: rgba(255, 255, 255, 0.12);
  }
}
