/* =========================================================
   JARVIS OS v3.0.1 — PERSONA / HUD DESIGN
   Visual reference:
   Dark tactical HUD / green-gold cyber interface
   ========================================================= */

:root {
  --jarvis-bg: #030603;
  --jarvis-bg-1: #050805;
  --jarvis-bg-2: #081008;

  --jarvis-green: #78ff22;
  --jarvis-green-bright: #a6ff45;
  --jarvis-green-dark: #285d16;

  --jarvis-gold: #d6b53c;
  --jarvis-gold-bright: #ffe56a;
  --jarvis-gold-dark: #66551b;

  --jarvis-cyan: #65d7c8;

  --jarvis-text: #c5d9b8;
  --jarvis-text-dim: #718267;
  --jarvis-text-faint: #43513d;

  --jarvis-border: rgba(112, 181, 39, 0.42);
  --jarvis-border-bright: rgba(143, 255, 52, 0.78);

  --jarvis-panel: rgba(5, 12, 5, 0.92);
  --jarvis-panel-soft: rgba(11, 20, 8, 0.82);

  --jarvis-shadow:
    0 0 8px rgba(102, 255, 31, 0.16),
    inset 0 0 20px rgba(77, 155, 23, 0.045);

  --jarvis-glow:
    0 0 6px rgba(125, 255, 34, 0.55),
    0 0 18px rgba(96, 220, 25, 0.25);

  --jarvis-gold-glow:
    0 0 7px rgba(255, 211, 55, 0.55),
    0 0 18px rgba(255, 190, 35, 0.18);

  /* Legacy ap- mappings — keep page functional */
  --ap-bg: var(--jarvis-bg);
  --ap-green: var(--jarvis-green);
  --ap-green-dim: var(--jarvis-green-dark);
  --ap-panel-bg: var(--jarvis-panel);
  --ap-border: var(--jarvis-border);
  --ap-border-dim: rgba(112, 181, 39, 0.22);
  --ap-glow: var(--jarvis-glow);
  --ap-font: "Rajdhani", "Share Tech Mono", "Roboto Mono", monospace;
}


/* =========================================================
   BASE
   ========================================================= */

body {
  background:
    radial-gradient(
      circle at 50% 30%,
      rgba(57, 91, 21, 0.08),
      transparent 45%
    ),
    linear-gradient(
      180deg,
      #020402 0%,
      #030603 45%,
      #020302 100%
    );

  color: var(--jarvis-text);
  font-family:
    "Rajdhani",
    "Orbitron",
    "Share Tech Mono",
    "Roboto Mono",
    monospace;

  letter-spacing: 0.035em;
}


/* feines HUD-Raster */

.jarvis-avatar-container,
.dashboard-header,
.hero-pro,
.feature-item,
.tier-table,
.voice-controls,
.voice-output {
  position: relative;
}

.jarvis-avatar-container::before,
.dashboard-header::before,
.hero-pro::before {
  content: "";
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      rgba(100, 255, 30, 0.018) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(100, 255, 30, 0.018) 1px,
      transparent 1px
    );

  background-size: 18px 18px;
  pointer-events: none;
  opacity: 0.35;
}


/* =========================================================
   JARVIS AVATAR CONTAINER
   ========================================================= */

.jarvis-avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 12px;

  padding: 24px;

  background:
    radial-gradient(
      circle at center,
      rgba(105, 255, 28, 0.055),
      transparent 65%
    );

  color: var(--jarvis-green);
}


/* =========================================================
   AVATAR
   ========================================================= */

.jarvis-avatar {
  position: relative;

  width: 260px;
  height: 260px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle at center,
      rgba(31, 58, 19, 0.85) 0%,
      rgba(8, 17, 7, 0.96) 47%,
      rgba(2, 5, 2, 1) 70%
    );

  border: 1px solid rgba(120, 255, 34, 0.72);

  box-shadow:
    0 0 0 1px rgba(91, 150, 35, 0.15),
    0 0 12px rgba(106, 255, 32, 0.38),
    0 0 40px rgba(78, 191, 20, 0.16),
    inset 0 0 40px rgba(75, 190, 22, 0.08);

  display: flex;
  align-items: center;
  justify-content: center;

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;

  animation: jarvis-pulse 4s infinite ease-in-out;

  overflow: visible;
}


/* äußerer HUD-Ring */

.jarvis-avatar::before {
  content: "";

  position: absolute;

  inset: -12px;

  border-radius: 50%;

  border:
    1px solid rgba(116, 255, 31, 0.35);

  box-shadow:
    0 0 12px rgba(100, 255, 30, 0.12);

  animation: jarvis-ring-rotate 18s linear infinite;
}


/* zweiter Ring */

.jarvis-avatar::after {
  content: "";

  position: absolute;

  inset: -26px;

  border-radius: 50%;

  border:
    1px dashed rgba(197, 171, 48, 0.28);

  opacity: 0.8;

  animation: jarvis-ring-rotate-reverse 28s linear infinite;
}


/* =========================================================
   AVATAR HOVER
   ========================================================= */

.jarvis-avatar:hover {
  transform: scale(1.035);

  box-shadow:
    0 0 0 1px rgba(134, 255, 48, 0.25),
    0 0 18px rgba(120, 255, 38, 0.55),
    0 0 55px rgba(87, 211, 26, 0.25),
    inset 0 0 45px rgba(100, 255, 30, 0.12);
}


/* =========================================================
   AVATAR FACE
   ========================================================= */

.avatar-face {
  position: relative;

  width: 178px;
  height: 178px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle at 50% 42%,
      rgba(73, 108, 44, 0.32),
      rgba(8, 15, 7, 0.95) 64%
    );

  border:
    1px solid rgba(117, 192, 54, 0.28);

  box-shadow:
    inset 0 0 35px rgba(91, 196, 26, 0.08),
    0 0 18px rgba(85, 200, 28, 0.12);

  display: flex;
  align-items: center;
  justify-content: center;
}


/* =========================================================
   EYES
   ========================================================= */

.avatar-eyes {
  display: flex;

  gap: 42px;

  position: absolute;

  top: 67px;
  left: 50%;

  transform: translateX(-50%);
}

.avatar-eyes::before,
.avatar-eyes::after {
  content: "";

  width: 21px;
  height: 8px;

  background:
    linear-gradient(
      90deg,
      transparent,
      var(--jarvis-green-bright),
      transparent
    );

  border-radius: 50%;

  box-shadow:
    0 0 5px var(--jarvis-green),
    0 0 16px rgba(110, 255, 35, 0.8);

  transform: skewX(-12deg);
}


/* =========================================================
   MOUTH
   ========================================================= */

.avatar-mouth {
  position: absolute;

  bottom: 51px;

  width: 58px;
  height: 3px;

  background:
    linear-gradient(
      90deg,
      transparent,
      var(--jarvis-green),
      transparent
    );

  border-radius: 50%;

  box-shadow:
    0 0 6px rgba(116, 255, 32, 0.7);

  transition:
    width 0.2s ease,
    height 0.2s ease,
    box-shadow 0.2s ease;
}

.jarvis-avatar:hover .avatar-mouth {
  width: 72px;
}


/* =========================================================
   AVATAR GLOW
   ========================================================= */

.avatar-glow {
  position: absolute;

  width: 100%;
  height: 100%;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(102, 255, 31, 0.14) 0%,
      rgba(102, 255, 31, 0.035) 38%,
      transparent 70%
    );

  pointer-events: none;

  animation: jarvis-glow 3s infinite ease-in-out;
}


/* =========================================================
   SPEAKING STATE
   ========================================================= */

.jarvis-avatar.speaking {
  animation: jarvis-speaking 1.25s infinite ease-in-out;

  box-shadow:
    0 0 0 1px rgba(138, 255, 55, 0.32),
    0 0 18px rgba(115, 255, 38, 0.65),
    0 0 55px rgba(102, 255, 32, 0.3),
    inset 0 0 40px rgba(100, 255, 30, 0.12);
}

.jarvis-avatar.speaking .avatar-mouth {
  width: 76px;
  height: 8px;

  box-shadow:
    0 0 7px var(--jarvis-green),
    0 0 18px rgba(110, 255, 32, 0.65);
}


/* =========================================================
   GLOWING STATE
   ========================================================= */

.jarvis-avatar.glowing {
  animation: jarvis-glow-avatar 2s infinite ease-in-out;
}


/* =========================================================
   STATUS
   ========================================================= */

.avatar-status {
  position: relative;

  font-family: "Share Tech Mono", monospace;

  font-size: 0.72rem;

  text-transform: uppercase;

  letter-spacing: 0.18em;

  color: var(--jarvis-green);

  text-shadow:
    0 0 7px rgba(115, 255, 33, 0.55);
}

.avatar-status::before {
  content: "";

  display: inline-block;

  width: 6px;
  height: 6px;

  margin-right: 8px;

  border-radius: 50%;

  background: var(--jarvis-green);

  box-shadow:
    0 0 6px var(--jarvis-green),
    0 0 14px rgba(100, 255, 30, 0.65);

  animation: status-blink 1.8s infinite;
}


/* =========================================================
   DASHBOARD HEADER
   ========================================================= */

.dashboard-header {
  display: flex;

  justify-content: space-between;
  align-items: flex-start;

  flex-wrap: wrap;

  gap: 30px;

  margin-bottom: 28px;
  padding: 24px 28px;

  background:
    linear-gradient(
      135deg,
      rgba(8, 15, 7, 0.96),
      rgba(3, 7, 3, 0.98)
    );

  border:
    1px solid var(--jarvis-border);

  border-radius: 3px;

  box-shadow: var(--jarvis-shadow);

  overflow: hidden;
}


/* technische Eckmarkierungen */

.dashboard-header::after,
.hero-pro::after {
  content: "";

  position: absolute;

  inset: 6px;

  border:
    1px solid rgba(110, 176, 42, 0.1);

  pointer-events: none;
}


/* =========================================================
   DASHBOARD TITLE
   ========================================================= */

.dashboard-welcome h1 {
  margin-bottom: 8px;

  font-family:
    "Orbitron",
    "Rajdhani",
    monospace;

  font-weight: 500;

  letter-spacing: 0.12em;

  color: var(--jarvis-green);

  background: none;

  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;

  text-shadow:
    0 0 8px rgba(107, 255, 30, 0.45);
}

.dashboard-welcome h1::before {
  content: "JARVIS OS // ";

  color: var(--jarvis-gold);

  font-size: 0.45em;

  vertical-align: middle;

  letter-spacing: 0.15em;
}


/* =========================================================
   FEATURE CARDS
   ========================================================= */

.feature-item {
  text-align: left;

  padding: 18px;

  background:
    linear-gradient(
      145deg,
      rgba(10, 20, 8, 0.94),
      rgba(3, 8, 3, 0.96)
    );

  border:
    1px solid var(--jarvis-border);

  border-radius: 3px;

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;

  box-shadow:
    inset 0 0 18px rgba(72, 160, 22, 0.035);
}

.feature-item:hover {
  transform: translateY(-2px);

  border-color:
    var(--jarvis-border-bright);

  box-shadow:
    0 0 14px rgba(100, 255, 30, 0.14),
    inset 0 0 18px rgba(100, 255, 30, 0.06);
}


/* =========================================================
   FEATURE ICON
   ========================================================= */

.feature-icon {
  font-size: 1.7rem;

  margin-bottom: 10px;

  color: var(--jarvis-green);

  filter:
    drop-shadow(
      0 0 5px rgba(110, 255, 30, 0.45)
    );
}

.feature-item h3 {
  margin: 0 0 8px 0;

  font-family:
    "Rajdhani",
    monospace;

  font-size: 1rem;

  font-weight: 600;

  text-transform: uppercase;

  letter-spacing: 0.08em;

  color: var(--jarvis-green);
}


/* =========================================================
   HERO PRO
   ========================================================= */

.hero-pro {
  position: relative;

  display: flex;

  gap: 30px;

  background:
    radial-gradient(
      circle at 70% 50%,
      rgba(102, 150, 39, 0.08),
      transparent 42%
    ),
    linear-gradient(
      135deg,
      #050905 0%,
      #081008 48%,
      #030603 100%
    );

  border:
    1px solid var(--jarvis-border);

  border-radius: 3px;

  padding: 34px;

  margin-bottom: 30px;

  box-shadow:
    var(--jarvis-shadow);

  overflow: hidden;
}

.hero-pro .hero-content {
  flex: 1;

  position: relative;

  z-index: 2;
}

.hero-pro .hero-visual {
  flex: 1;

  display: flex;

  justify-content: center;
  align-items: center;

  position: relative;
}


/* =========================================================
   VOICE CONTROLS
   ========================================================= */

.voice-controls {
  display: flex;

  gap: 10px;

  align-items: center;

  flex-wrap: wrap;

  margin-top: 20px;
}

.voice-controls select {
  appearance: none;

  padding: 9px 14px;

  min-height: 38px;

  border:
    1px solid var(--jarvis-border);

  border-radius: 2px;

  background:
    linear-gradient(
      180deg,
      #091109,
      #040804
    );

  color: var(--jarvis-green);

  font-family: "Share Tech Mono", monospace;

  font-size: 0.78rem;

  letter-spacing: 0.04em;

  outline: none;

  box-shadow:
    inset 0 0 10px rgba(100, 255, 30, 0.03);
}

.voice-controls select:focus {
  border-color:
    var(--jarvis-green);

  box-shadow:
    0 0 8px rgba(105, 255, 30, 0.18);
}


/* =========================================================
   VOICE OUTPUT
   ========================================================= */

.voice-output {
  margin-top: 20px;

  padding: 16px;

  background:
    rgba(4, 10, 4, 0.94);

  border:
    1px solid var(--jarvis-border);

  border-left:
    2px solid var(--jarvis-green);

  border-radius: 2px;

  color: var(--jarvis-text);

  font-family:
    "Share Tech Mono",
    monospace;

  font-size: 0.82rem;

  line-height: 1.6;

  box-shadow:
    inset 0 0 20px rgba(76, 190, 24, 0.025);
}


/* =========================================================
   TIER TABLE
   ========================================================= */

.tier-table {
  width: 100%;

  border-collapse: collapse;

  margin-top: 20px;

  background:
    rgba(3, 7, 3, 0.9);

  color: var(--jarvis-text);
}

.tier-table th,
.tier-table td {
  padding: 13px 15px;

  text-align: center;

  border:
    1px solid rgba(92, 155, 36, 0.26);

  font-size: 0.82rem;
}

.tier-table th {
  background:
    linear-gradient(
      180deg,
      rgba(25, 43, 17, 0.9),
      rgba(7, 14, 6, 0.95)
    );

  color: var(--jarvis-green);

  font-family:
    "Rajdhani",
    monospace;

  text-transform: uppercase;

  letter-spacing: 0.08em;

  font-weight: 600;

  text-shadow:
    0 0 6px rgba(110, 255, 30, 0.35);
}


/* =========================================================
   TIER COLORS
   ========================================================= */

.tier-table .tier-starter {
  background:
    rgba(32, 75, 22, 0.16);

  color: #9be56b;
}

.tier-table .tier-pro {
  background:
    rgba(48, 93, 35, 0.18);

  color: #a9ed7d;
}

.tier-table .tier-business {
  background:
    rgba(102, 82, 22, 0.18);

  color: var(--jarvis-gold);
}

.tier-table .tier-enterprise {
  background:
    rgba(71, 80, 23, 0.18);

  color: var(--jarvis-gold-bright);
}


/* =========================================================
   CHECK / PRICE
   ========================================================= */

.tier-table .check {
  color: var(--jarvis-green);

  font-weight: bold;

  text-shadow:
    0 0 7px rgba(115, 255, 31, 0.55);
}

.tier-table .price {
  color: var(--jarvis-gold);

  font-size: 0.82rem;

  font-family:
    "Share Tech Mono",
    monospace;
}


/* =========================================================
   GENERIC JARVIS PANEL SUPPORT
   ========================================================= */

.jarvis-panel,
.persona-panel,
.hud-panel,
.persona-card {
  position: relative;

  background:
    linear-gradient(
      145deg,
      rgba(8, 15, 7, 0.97),
      rgba(3, 7, 3, 0.98)
    );

  border:
    1px solid var(--jarvis-border);

  border-radius: 3px;

  box-shadow:
    var(--jarvis-shadow);

  overflow: hidden;
}

.jarvis-panel::before,
.persona-panel::before,
.hud-panel::before,
.persona-card::before {
  content: "";

  position: absolute;

  inset: 5px;

  border:
    1px solid rgba(112, 178, 43, 0.08);

  pointer-events: none;
}


/* =========================================================
   PANEL HEADINGS
   ========================================================= */

.jarvis-panel h2,
.jarvis-panel h3,
.persona-panel h2,
.persona-panel h3,
.hud-panel h2,
.hud-panel h3 {
  color: var(--jarvis-green);

  font-family:
    "Rajdhani",
    monospace;

  text-transform: uppercase;

  letter-spacing: 0.09em;

  text-shadow:
    0 0 7px rgba(105, 255, 30, 0.4);
}


/* =========================================================
   HUD METRICS
   ========================================================= */

.jarvis-metric,
.persona-metric,
.hud-metric {
  color: var(--jarvis-green);

  font-family:
    "Share Tech Mono",
    monospace;

  text-shadow:
    0 0 6px rgba(109, 255, 31, 0.5);
}

.jarvis-metric.gold,
.persona-metric.gold,
.hud-metric.gold {
  color: var(--jarvis-gold);

  text-shadow:
    0 0 7px rgba(255, 209, 54, 0.48);
}


/* =========================================================
   PROGRESS BARS
   ========================================================= */

.jarvis-progress,
.persona-progress,
.hud-progress {
  position: relative;

  height: 7px;

  background:
    #101810;

  border:
    1px solid rgba(91, 145, 43, 0.25);

  overflow: hidden;
}

.jarvis-progress > span,
.persona-progress > span,
.hud-progress > span {
  display: block;

  height: 100%;

  background:
    linear-gradient(
      90deg,
      #427d1f,
      #a2ff35
    );

  box-shadow:
    0 0 8px rgba(110, 255, 30, 0.45);

  transition:
    width 0.5s ease;
}


/* =========================================================
   GOLD PROGRESS
   ========================================================= */

.jarvis-progress.gold > span,
.persona-progress.gold > span,
.hud-progress.gold > span {
  background:
    linear-gradient(
      90deg,
      #7c681e,
      #f1d34c
    );

  box-shadow:
    0 0 8px rgba(244, 209, 65, 0.45);
}


/* =========================================================
   TERMINAL / SYSTEM TEXT
   ========================================================= */

.jarvis-terminal,
.system-output,
.console-output {
  background:
    #020402;

  border:
    1px solid rgba(101, 169, 42, 0.3);

  padding: 14px;

  color: var(--jarvis-green);

  font-family:
    "Share Tech Mono",
    monospace;

  font-size: 0.75rem;

  line-height: 1.7;

  box-shadow:
    inset 0 0 25px rgba(76, 180, 20, 0.035);
}

.jarvis-terminal .gold,
.system-output .gold,
.console-output .gold {
  color: var(--jarvis-gold);
}


/* =========================================================
   BUTTONS
   ========================================================= */

.jarvis-button,
.persona-button,
.hud-button {
  position: relative;

  padding: 9px 17px;

  border:
    1px solid var(--jarvis-border);

  border-radius: 2px;

  background:
    linear-gradient(
      180deg,
      rgba(26, 49, 15, 0.85),
      rgba(7, 15, 6, 0.95)
    );

  color: var(--jarvis-green);

  font-family:
    "Rajdhani",
    monospace;

  text-transform: uppercase;

  letter-spacing: 0.08em;

  cursor: pointer;

  transition:
    all 0.2s ease;
}

.jarvis-button:hover,
.persona-button:hover,
.hud-button:hover {
  border-color:
    var(--jarvis-green);

  color:
    var(--jarvis-green-bright);

  box-shadow:
    0 0 10px rgba(103, 255, 31, 0.2);

  background:
    rgba(39, 79, 21, 0.55);
}

.jarvis-button:active,
.persona-button:active,
.hud-button:active {
  transform: translateY(1px);
}


/* =========================================================
   SYSTEM STATUS
   ========================================================= */

.jarvis-status-online {
  color: var(--jarvis-green);

  text-shadow:
    0 0 7px rgba(108, 255, 31, 0.55);
}

.jarvis-status-warning {
  color: var(--jarvis-gold);

  text-shadow:
    0 0 7px rgba(255, 208, 50, 0.45);
}

.jarvis-status-offline {
  color: #667060;
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes jarvis-pulse {
  0%,
  100% {
    transform: scale(1);

    box-shadow:
      0 0 0 1px rgba(91, 150, 35, 0.15),
      0 0 12px rgba(106, 255, 32, 0.32),
      0 0 38px rgba(78, 191, 20, 0.12),
      inset 0 0 40px rgba(75, 190, 22, 0.07);
  }

  50% {
    transform: scale(1.012);

    box-shadow:
      0 0 0 1px rgba(110, 180, 45, 0.2),
      0 0 18px rgba(106, 255, 32, 0.45),
      0 0 48px rgba(78, 191, 20, 0.18),
      inset 0 0 45px rgba(75, 190, 22, 0.1);
  }
}


@keyframes jarvis-speaking {
  0%,
  100% {
    transform: scale(1);
  }

  25% {
    transform: scale(1.018);
  }

  50% {
    transform: scale(1.035);
  }

  75% {
    transform: scale(1.018);
  }
}


@keyframes jarvis-glow {
  0%,
  100% {
    opacity: 0.38;
  }

  50% {
    opacity: 0.8;
  }
}


@keyframes jarvis-glow-avatar {
  0%,
  100% {
    box-shadow:
      0 0 10px rgba(110, 255, 30, 0.3),
      0 0 30px rgba(80, 190, 20, 0.12);
  }

  50% {
    box-shadow:
      0 0 20px rgba(110, 255, 30, 0.65),
      0 0 60px rgba(80, 190, 20, 0.28);
  }
}


@keyframes jarvis-ring-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}


@keyframes jarvis-ring-rotate-reverse {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0deg);
  }
}


@keyframes status-blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  .jarvis-avatar {
    width: 210px;
    height: 210px;
  }

  .avatar-face {
    width: 145px;
    height: 145px;
  }

  .avatar-eyes {
    top: 55px;
    gap: 30px;
  }

  .avatar-mouth {
    bottom: 40px;
  }

  .hero-pro {
    flex-direction: column;
    padding: 24px;
  }

  .dashboard-header {
    padding: 20px;
  }
}


@media (max-width: 600px) {
  .jarvis-avatar {
    width: 170px;
    height: 170px;
  }

  .jarvis-avatar::after {
    inset: -18px;
  }

  .jarvis-avatar::before {
    inset: -8px;
  }

  .avatar-face {
    width: 118px;
    height: 118px;
  }

  .avatar-eyes {
    top: 44px;
    gap: 25px;
  }

  .avatar-eyes::before,
  .avatar-eyes::after {
    width: 16px;
    height: 6px;
  }

  .avatar-mouth {
    bottom: 33px;
    width: 42px;
  }

  .dashboard-header,
  .hero-pro {
    padding: 18px;
  }

  .tier-table {
    display: block;
    overflow-x: auto;
  }
}


/* =========================================================
   AGENT PERSONA PAGE — HUD restyle of existing .ap-* layout
   Mapped to jarvis color tokens so page stays functional
   ========================================================= */

.agent-persona-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  color: var(--jarvis-green);
  font-family: "Rajdhani", "Share Tech Mono", "Roboto Mono", monospace;
}

.ap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--jarvis-panel);
  border: 1px solid var(--jarvis-border);
  box-shadow: var(--jarvis-glow);
  border-radius: 3px;
}

.ap-header h1 {
  font-size: 18px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0;
  color: var(--jarvis-green);
  text-shadow: 0 0 8px rgba(107, 255, 30, 0.45);
}

.ap-header-stats { display: flex; gap: 20px; font-size: 11px; }
.ap-stat { display: flex; flex-direction: column; align-items: center; }
.ap-stat-val {
  font-size: 22px;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(107, 255, 30, 0.55);
  color: var(--jarvis-green-bright);
}
.ap-stat-label { color: var(--jarvis-text-dim); text-transform: uppercase; letter-spacing: 1px; }

.ap-main {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
}

@media (max-width: 900px) {
  .ap-main { grid-template-columns: 1fr; }
}

.ap-orb-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  background: var(--jarvis-panel);
  border: 1px solid var(--jarvis-border);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--jarvis-shadow);
}

.ap-orb-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(105, 255, 28, 0.055), transparent 60%);
  pointer-events: none;
}

.ap-orb-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.ap-orb-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ap-orb {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px solid rgba(120, 255, 34, 0.72);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  background:
    radial-gradient(circle at 50% 40%, rgba(31, 58, 19, 0.85), rgba(8, 17, 7, 0.96) 55%, rgba(0, 0, 0, 0.7));
  box-shadow:
    0 0 0 1px rgba(91, 150, 35, 0.15),
    0 0 12px rgba(106, 255, 32, 0.38),
    0 0 40px rgba(78, 191, 20, 0.16),
    inset 0 0 40px rgba(75, 190, 22, 0.08);
  animation: jarvis-pulse 3s ease-in-out infinite;
}

.ap-orb:hover {
  transform: scale(1.08);
  box-shadow:
    0 0 0 1px rgba(134, 255, 48, 0.25),
    0 0 18px rgba(120, 255, 38, 0.55),
    0 0 55px rgba(87, 211, 26, 0.25),
    inset 0 0 45px rgba(100, 255, 30, 0.12);
}

.ap-orb:active { transform: scale(0.95); }
.ap-orb-icon { font-size: 60px; filter: drop-shadow(0 0 12px rgba(105, 255, 30, 0.55)); }
.ap-orb-name {
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(107, 255, 30, 0.55);
}
.ap-orb-level { font-size: 11px; color: var(--jarvis-text-dim); letter-spacing: 2px; }

/* TICK299-APORBCAT: die vierte Zeile der Orb-Spalte, 
   vom Blatt nie definiert - Hausmuster = eine Stufe unter .ap-orb-level. */
.ap-orb-category {
  font-size: 10px;
  color: var(--jarvis-text-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.ap-orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(116, 255, 31, 0.35);
  pointer-events: none;
}

.ap-orb-ring:nth-child(1) { width: 240px; height: 240px; }
.ap-orb-ring:nth-child(2) { width: 300px; height: 300px; border-style: dashed; opacity: 0.8; }
.ap-orb-ring:nth-child(3) { width: 360px; height: 360px; border-color: rgba(197, 171, 48, 0.28); }

.ap-node {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--jarvis-green);
  background: rgba(105, 255, 28, 0.2);
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 3;
}

.ap-node:hover {
  transform: scale(2.2);
  background: var(--jarvis-green);
  box-shadow: 0 0 20px rgba(105, 255, 30, 0.55);
  z-index: 10;
}

.ap-node.unlocked { background: rgba(105, 255, 28, 0.5); box-shadow: 0 0 12px rgba(105, 255, 30, 0.4); }
.ap-node.locked { border-color: var(--jarvis-text-faint); background: rgba(112, 181, 39, 0.08); cursor: not-allowed; }

.ap-node-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid var(--jarvis-border);
  padding: 4px 10px;
  font-size: 9px;
  white-space: nowrap;
  letter-spacing: 1px;
  pointer-events: none;
}

/* TICK253-NODE-BESCHRIFTUNG: die Aufdeck-Regel zielte auf das falsche Element -
   der Knoten selbst ist bereits sichtbar, die Beschriftung blieb unsichtbar.
   Zusaetzlich die Fokus-Achse: mit Tabstopp setzt auch ein Tap den Fokus. */
.ap-node:hover .ap-node-tooltip,
.ap-node:focus .ap-node-tooltip,
.ap-node:focus-visible .ap-node-tooltip {
  display: block;
}

/* =========================================================
   JARVIS RUNTIME — Persona State Classes
   Applied to .ap-orb via jarvis-persona-runtime.js
   ========================================================= */

/* ORB — SPEAKING (SpeechSynthesis active) */
.ap-orb.speaking {
  animation: jarvis-speaking 1.25s infinite ease-in-out;
  border-color: var(--jarvis-green-bright) !important;
  box-shadow:
    0 0 0 1px rgba(138, 255, 55, 0.32),
    0 0 18px rgba(115, 255, 38, 0.65),
    0 0 55px rgba(102, 255, 32, 0.3),
    inset 0 0 40px rgba(100, 255, 30, 0.12) !important;
}

.ap-orb.speaking .ap-orb-icon {
  animation: jarvis-glow 0.8s infinite ease-in-out;
  transform: scale(1.1);
}

/* ORB — LISTENING (SpeechRecognition active) */
.ap-orb.listening {
  border-color: var(--jarvis-cyan) !important;
  animation: jarvis-pulse 2s infinite ease-in-out;
  box-shadow:
    0 0 15px rgba(101, 215, 200, 0.4),
    0 0 30px rgba(101, 215, 200, 0.15),
    inset 0 0 25px rgba(101, 215, 200, 0.08) !important;
}

.ap-orb.listening .ap-orb-icon {
  animation: jarvis-ring-rotate 4s linear infinite;
  filter: drop-shadow(0 0 8px rgba(101, 215, 200, 0.6));
}

/* ORB — PROCESSING (HERMES working) */
.ap-orb.processing {
  border-color: var(--jarvis-gold) !important;
  animation: jarvis-pulse 3s infinite ease-in-out;
  box-shadow:
    0 0 15px rgba(255, 211, 55, 0.3),
    0 0 30px rgba(255, 211, 55, 0.12),
    inset 0 0 25px rgba(255, 211, 55, 0.06) !important;
}

.ap-orb.processing .ap-orb-icon {
  animation: jarvis-ring-rotate-reverse 8s linear infinite;
  filter: drop-shadow(0 0 6px rgba(255, 211, 55, 0.5));
}

/* ORB — PAUSED (tab hidden / speech paused) */
.ap-orb.paused {
  border-color: var(--jarvis-text-dim) !important;
  animation: none !important;
  box-shadow:
    inset 0 0 15px rgba(100, 255, 30, 0.04) !important;
  opacity: 0.7;
  filter: grayscale(0.3);
}

.ap-orb.paused .ap-orb-icon {
  animation: none !important;
  filter: drop-shadow(0 0 3px rgba(112, 181, 39, 0.25));
}

/* ORB — ERROR (connection / speech error) */
.ap-orb.error {
  border-color: #ff4444 !important;
  animation: jarvis-speaking 0.6s infinite ease-in-out;
  box-shadow:
    0 0 20px rgba(255, 68, 68, 0.5),
    0 0 40px rgba(255, 68, 68, 0.2),
    inset 0 0 25px rgba(255, 68, 68, 0.1) !important;
}

.ap-orb.error .ap-orb-icon {
  animation: jarvis-pulse 1s infinite;
  filter: drop-shadow(0 0 8px rgba(255, 68, 68, 0.6));
}

/* ORB — DISCONNECTED (no connection) */
.ap-orb.disconnected {
  border-color: #667060 !important;
  animation: none !important;
  box-shadow: none !important;
  opacity: 0.5;
  filter: grayscale(0.5);
}

.ap-orb.disconnected .ap-orb-icon {
  animation: none !important;
  filter: grayscale(1);
}

/* ORB — RECONNECTING */
.ap-orb.reconnecting {
  border-color: var(--jarvis-gold-bright) !important;
  animation: jarvis-pulse 1s infinite ease-in-out;
  box-shadow:
    0 0 12px rgba(255, 229, 106, 0.4),
    inset 0 0 20px rgba(255, 229, 106, 0.08) !important;
}

.ap-orb.reconnecting .ap-orb-icon {
  animation: jarvis-ring-rotate 2s linear infinite;
}

/* ORB — IDLE (default restored) */
.ap-orb.idle {
  /* Default orb styles apply — this class ensures clean state reset */
}

/* Voice dot active state */
.ap-voice-dot.speaking {
  animation: status-blink 0.5s infinite;
  box-shadow: 0 0 8px var(--jarvis-green), 0 0 20px rgba(100, 255, 30, 0.8);
}

.ap-voice-dot.listening {
  background: var(--jarvis-cyan);
  box-shadow: 0 0 8px var(--jarvis-cyan), 0 0 20px rgba(101, 215, 200, 0.8);
}

.ap-voice-dot.error {
  background: #ff4444;
  box-shadow: 0 0 8px #ff4444, 0 0 20px rgba(255, 68, 68, 0.8);
}

.ap-progress-wrap { width: 100%; max-width: 400px; margin-top: 16px; }
.ap-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 1px;
  margin-bottom: 4px;
  color: var(--jarvis-text-dim);
}

.ap-progress-bar {
  height: 6px;
  background: #101810;
  border: 1px solid rgba(91, 145, 43, 0.25);
  position: relative;
  overflow: hidden;
}

.ap-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #427d1f, #a2ff35);
  box-shadow: 0 0 10px rgba(105, 255, 30, 0.45);
  transition: width 0.5s ease;
}

.ap-side { display: flex; flex-direction: column; gap: 16px; }

.ap-panel {
  background: var(--jarvis-panel);
  border: 1px solid var(--jarvis-border);
  padding: 16px;
  border-radius: 3px;
}

.ap-panel h3 {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--jarvis-border-dim);
  color: var(--jarvis-green);
  text-shadow: 0 0 7px rgba(105, 255, 30, 0.4);
}

.ap-persona-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }

.ap-persona-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  background: rgba(105, 255, 28, 0.04);
  border: 1px solid var(--jarvis-border-dim);
  color: var(--jarvis-text-dim);
  cursor: pointer;
  font-family: "Rajdhani", "Share Tech Mono", monospace;
  font-size: 8px;
  letter-spacing: 1px;
  text-align: center;
  transition: all 0.2s ease;
}

.ap-persona-btn:hover {
  border-color: var(--jarvis-green);
  color: var(--jarvis-green);
  background: rgba(105, 255, 28, 0.08);
}

.ap-persona-btn.active {
  border-color: var(--jarvis-green-bright);
  color: var(--jarvis-green-bright);
  background: rgba(105, 255, 28, 0.12);
  box-shadow: 0 0 10px rgba(105, 255, 30, 0.2);
}

.ap-persona-btn .ap-persona-icon { font-size: 22px; }

.ap-search {
  width: 100%;
  margin-bottom: 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--jarvis-border-dim);
  color: var(--jarvis-green);
  font-family: inherit;
  font-size: 10px;
  outline: none;
  border-radius: 2px;
}

.ap-search:focus {
  border-color: var(--jarvis-green);
  box-shadow: 0 0 8px rgba(105, 255, 30, 0.18);
}

.ap-persona-scroll { max-height: 200px; overflow-y: auto; }

.ap-voice-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  cursor: pointer;
  color: var(--jarvis-text-dim);
}

.ap-voice-toggle input[type="checkbox"] {
  appearance: none;
  width: 12px;
  height: 12px;
  border: 1px solid var(--jarvis-border);
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  border-radius: 2px;
}

.ap-voice-toggle input[type="checkbox"]:checked {
  background: var(--jarvis-green);
  border-color: var(--jarvis-green-bright);
  box-shadow: 0 0 6px rgba(105, 255, 30, 0.45);
}

.ap-voice-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jarvis-green);
  box-shadow: 0 0 6px var(--jarvis-green), 0 0 14px rgba(100, 255, 30, 0.65);
  animation: status-blink 1.8s infinite;
}

.ap-xp-row { display: flex; gap: 8px; flex-wrap: wrap; }

.ap-xp-btn {
  padding: 8px 14px;
  background: rgba(26, 49, 15, 0.85);
  border: 1px solid var(--jarvis-border);
  color: var(--jarvis-green);
  cursor: pointer;
  font-family: "Rajdhani", "Share Tech Mono", monospace;
  font-size: 10px;
  letter-spacing: 1px;
  transition: all 0.2s ease;
  border-radius: 2px;
  text-transform: uppercase;
}

.ap-xp-btn:hover {
  background: rgba(39, 79, 21, 0.55);
  border-color: var(--jarvis-green-bright);
  box-shadow: 0 0 10px rgba(103, 255, 31, 0.2);
}

.ap-xp-btn:active { transform: scale(0.96); }

.ap-node-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
}

.ap-node-chip {
  padding: 3px 8px;
  font-size: 8px;
  letter-spacing: 1px;
  border: 1px solid var(--jarvis-border-dim);
  color: var(--jarvis-text-dim);
  background: rgba(105, 255, 28, 0.04);
  border-radius: 2px;
}

.ap-node-chip.unlocked {
  color: var(--jarvis-green);
  border-color: var(--jarvis-green);
  background: rgba(105, 255, 28, 0.1);
  box-shadow: 0 0 6px rgba(105, 255, 30, 0.25);
}

.ap-tier-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 10px;
  letter-spacing: 2px;
  border: 1px solid var(--jarvis-gold-dark);
  color: var(--jarvis-gold);
  background: rgba(102, 82, 22, 0.18);
  text-transform: uppercase;
  border-radius: 2px;
}

.ap-prompt-output {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--jarvis-border-dim);
  padding: 12px;
  font-size: 10px;
  line-height: 1.6;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  color: var(--jarvis-text-dim);
  font-family: "Share Tech Mono", monospace;
  border-radius: 2px;
}

.ap-prompt-output:empty::after {
  content: 'Kein Prompt generiert. Level aufsteigen, um Bild-Prompt zu erzeugen.';
  color: rgba(112, 181, 39, 0.5);
}

.ap-evo-log {
  max-height: 120px;
  overflow-y: auto;
  font-size: 9px;
}

.ap-evo-log div {
  margin-bottom: 4px;
  padding: 3px 6px;
  border-left: 2px solid var(--jarvis-border-dim);
}

.ap-handoff-info {
  margin-top: 6px;
  font-size: 9px;
  color: var(--jarvis-text-dim);
}

.ap-spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.ap-spec-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  background: rgba(105, 255, 28, 0.04);
  border: 1px solid var(--jarvis-border-dim);
  color: var(--jarvis-text-dim);
  cursor: pointer;
  font-family: "Rajdhani", "Share Tech Mono", monospace;
  font-size: 8px;
  letter-spacing: 1px;
  transition: all 0.2s ease;
  text-align: center;
}

.ap-spec-btn:hover { border-color: var(--jarvis-green); color: var(--jarvis-green); }
.ap-spec-btn.active {
  border-color: var(--jarvis-green-bright);
  color: var(--jarvis-green-bright);
  background: rgba(105, 255, 28, 0.12);
  box-shadow: 0 0 10px rgba(105, 255, 30, 0.2);
}

.ap-spec-btn .ap-spec-icon { font-size: 20px; }

.ap-creation-agent-btn {
  padding: 4px 8px;
  background: rgba(105, 255, 28, 0.06);
  border: 1px solid var(--jarvis-border-dim);
  color: var(--jarvis-text-dim);
  font-size: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 2px;
}

.ap-creation-agent-btn:hover {
  background: rgba(105, 255, 28, 0.18);
  border-color: var(--jarvis-green);
  color: var(--jarvis-green);
}

.ap-filter-btn {
  padding: 3px 8px;
  background: rgba(105, 255, 28, 0.04);
  border: 1px solid var(--jarvis-border-dim);
  color: var(--jarvis-text-dim);
  font-size: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 2px;
}

.ap-filter-btn:hover {
  background: rgba(105, 255, 28, 0.12);
  border-color: var(--jarvis-green);
  color: var(--jarvis-green);
}

.ap-filter-btn.active {
  background: rgba(105, 255, 28, 0.22);
  border-color: var(--jarvis-green-bright);
  color: var(--jarvis-green-bright);
  box-shadow: 0 0 6px rgba(105, 255, 30, 0.25);
}

.ap-skill-grid-cell {
  padding: 4px 6px;
  background: rgba(105, 255, 28, 0.04);
  border: 1px solid var(--jarvis-border-dim);
  text-align: center;
  font-size: 9px;
  color: var(--jarvis-text-dim);
  border-radius: 2px;
}

.ap-skill-grid-cell.active {
  background: rgba(105, 255, 28, 0.18);
  border-color: var(--jarvis-green);
  color: var(--jarvis-green-bright);
  box-shadow: inset 0 0 8px rgba(72, 160, 22, 0.06);
}

/* ─── RESPONSIVE ────────────────────────────────── */
@media (max-width: 600px) {
  .ap-persona-grid { grid-template-columns: repeat(3, 1fr); }
  .ap-spec-grid { grid-template-columns: repeat(2, 1fr); }
  .ap-orb { width: 120px; height: 120px; }
  .ap-orb-icon { font-size: 40px; }
  .ap-orb-ring:nth-child(1) { width: 170px; height: 170px; }
  .ap-orb-ring:nth-child(2) { width: 220px; height: 220px; }
  .ap-orb-ring:nth-child(3) { width: 270px; height: 270px; }
}
