:root {
  --bg-cosmos: #03060a;
  --bg-abyss: #07111b;
  --bg-surface: #0c1724;
  --bg-surface-solid: #0e1a2a;
  --bg-glass: rgba(255, 255, 255, 0.045);
  --bg-pill: rgba(255, 255, 255, 0.05);

  --accent-teal: #14b8a6;
  --accent-teal-deep: #0d9488;
  --accent-teal-bright: #5eead4;
  --accent-sky: #38bdf8;
  --accent-cyan: #06b6d4;

  --text-primary: rgba(255, 255, 255, 0.96);
  --text-secondary: rgba(226, 232, 240, 0.78);
  --text-muted: rgba(148, 163, 184, 0.88);
  --text-faint: rgba(148, 163, 184, 0.56);

  --border-hairline: rgba(255, 255, 255, 0.10);
  --border-teal: rgba(20, 184, 166, 0.35);
  --border-sky: rgba(56, 189, 248, 0.35);

  --font-display: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body.jp-cosmos-body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-cosmos);
  background-image:
    radial-gradient(circle at 18% 12%, rgba(20, 184, 166, 0.09), transparent 44%),
    radial-gradient(circle at 82% 76%, rgba(56, 189, 248, 0.07), transparent 46%),
    linear-gradient(155deg, #020408 0%, #07111b 56%, #040912 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 768px) {
  body.has-custom-cursor,
  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor [role="button"] {
    cursor: none !important;
  }
}

.jp-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 10px 18px;
  background: var(--accent-teal);
  color: #fff;
  border-radius: 0 0 10px 0;
  text-decoration: none;
  font-weight: 600;
}
.jp-skip-link:focus { left: 12px; top: 12px; }

.jp-cosmic-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 25%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 25%, #000 35%, transparent 100%);
}

.jp-ambient-light {
  position: fixed;
  top: 14%;
  left: 8%;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.13) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(50px);
  animation: jpAmbientMove 9s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
.jp-ambient-light-2 {
  position: fixed;
  bottom: 12%;
  right: 8%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.09) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(65px);
  animation: jpAmbientMove2 11s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
@keyframes jpAmbientMove {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(85px, -45px) scale(1.1); }
}
@keyframes jpAmbientMove2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-75px, 55px) scale(0.92); }
}

/* Glass Green Snake Cursor */
#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 28px;
  height: 28px;
  border: 1.5px solid rgba(94, 234, 212, 0.85);
  border-radius: 9999px;
  transform: translate(-50%, -50%) scale(1);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.15), 0 0 28px rgba(20, 184, 166, 0.28);
  transition: width .2s, height .2s, border-color .2s, box-shadow .2s, transform .06s, opacity .2s;
  backdrop-filter: blur(1px);
  pointer-events: none;
  opacity: 0;
}
#cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  width: 6px;
  height: 6px;
  background: rgba(94, 234, 212, 0.96);
  border-radius: 9999px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgba(94, 234, 212, 0.7);
  transition: transform .06s, opacity .2s;
  pointer-events: none;
  opacity: 0;
}
.cursor-snake-seg {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 9999px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  will-change: left, top;
  transition: opacity .2s;
}
#jp-collider-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9997;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  #jp-collider-canvas, #jp-collider-hud { display: none !important; }
}
@media (max-width: 767px) {
  #cursor-ring, #cursor-dot, .cursor-snake-seg { display: none !important; }
}

/* Floating Particle Collider Telemetry HUD (Collapsible Drawer + Pill) */
.jp-collider-hud {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9996;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.jp-collider-pill,
.jp-collider-panel {
  pointer-events: auto;
}
.jp-collider-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 7px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  background: rgba(7, 13, 21, 0.86);
  backdrop-filter: blur(12px);
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 18px rgba(20, 184, 166, 0.14);
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}
.jp-collider-pill:hover,
.jp-collider-pill:focus-visible {
  border-color: rgba(94, 234, 212, 0.65);
  background: rgba(11, 22, 34, 0.94);
  transform: translateY(-1px);
  outline: none;
}
.jp-collider-pill-led {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #5eead4;
  box-shadow: 0 0 8px rgba(94, 234, 212, 0.85);
}
.jp-collider-pill-led.is-pulse {
  animation: jpColliderPulse 0.65s ease-out;
}
@keyframes jpColliderPulse {
  0%   { transform: scale(1.9); box-shadow: 0 0 18px #ffffff, 0 0 24px #5eead4; background: #ffffff; }
  100% { transform: scale(1);   box-shadow: 0 0 8px rgba(94, 234, 212, 0.85); background: #5eead4; }
}
.jp-collider-pill-label {
  color: #5eead4;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.jp-collider-pill-count {
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(20, 184, 166, 0.16);
  color: #99f6e4;
  font-size: 10.5px;
}
.jp-collider-pill-last {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #94a3b8;
  max-width: 195px;
}
.jp-collider-panel {
  width: min(380px, calc(100vw - 36px));
  max-height: min(470px, calc(100vh - 96px));
  display: none;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  background: rgba(7, 13, 21, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.72), 0 0 26px rgba(20, 184, 166, 0.16);
  overflow: hidden;
}
.jp-collider-hud.is-open .jp-collider-panel {
  display: flex;
}
.jp-collider-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(14, 26, 42, 0.65);
}
.jp-collider-panel-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
}
.jp-collider-panel-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #5eead4;
  margin-top: 2px;
}
.jp-collider-panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.jp-collider-btn {
  border: 1px solid rgba(94, 234, 212, 0.30);
  background: rgba(20, 184, 166, 0.12);
  color: #ccfbf1;
  border-radius: 8px;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.2;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.jp-collider-btn--icon {
  padding: 4px 8px;
  font-weight: 700;
}
.jp-collider-btn:hover {
  background: rgba(20, 184, 166, 0.26);
  border-color: rgba(94, 234, 212, 0.65);
}
.jp-collider-history {
  list-style: none;
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.jp-collider-empty {
  padding: 14px 10px;
  font-size: 12.5px;
  color: #94a3b8;
  text-align: center;
}
.jp-collider-item-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.62);
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}
.jp-collider-item-btn:hover {
  border-color: rgba(94, 234, 212, 0.50);
  background: rgba(20, 184, 166, 0.12);
  transform: translateY(-1px);
}
.jp-collider-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
}
.jp-collider-id {
  color: #5eead4;
  font-weight: 600;
}
.jp-collider-time {
  color: #64748b;
}
.jp-collider-channel {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
}
.jp-collider-channel.is-rare {
  color: #fbbf24;
}
.jp-collider-meta {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
}
.jp-collider-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}
.jp-collider-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(2, 6, 12, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-family: var(--font-mono);
  font-size: 10px;
  color: #cbd5e1;
}
.jp-collider-pill-atom {
  font-size: 13px;
  line-height: 1;
  color: #5eead4;
}
.jp-collider-panel-handle {
  display: none;
  width: 38px;
  height: 4px;
  margin: 8px auto 0;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.35);
}
.jp-collider-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
@media (max-width: 767px) {
  .jp-collider-hud {
    right: 14px;
    bottom: 14px;
  }
  .jp-collider-pill {
    padding: 8px 12px;
    min-height: 36px;
    gap: 6px;
  }
  .jp-collider-pill-label,
  .jp-collider-pill-last {
    display: none;
  }
  .jp-collider-hud.is-open {
    left: 0;
    right: 0;
    bottom: 0;
    align-items: stretch;
  }
  .jp-collider-hud.is-open .jp-collider-pill {
    display: none;
  }
  .jp-collider-panel {
    width: 100%;
    max-width: 100%;
    max-height: 58vh;
    border-radius: 20px 20px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom, 10px);
  }
  .jp-collider-panel-handle {
    display: block;
  }
  .jp-collider-btn {
    min-height: 36px;
    padding: 6px 12px;
  }
  .jp-collider-item-btn {
    min-height: 44px;
    padding: 12px;
  }
}

.jp-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Floating Sora Pill */
.jp-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  background: rgba(3, 6, 10, 0.72);
  border-bottom: 1px solid var(--border-hairline);
}
.jp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.jp-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.jp-brand-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-sky));
  box-shadow: 0 0 22px rgba(20, 184, 166, 0.35);
  flex-shrink: 0;
  transition: transform 0.35s var(--ease-out);
}
.jp-brand:hover .jp-brand-badge { transform: rotate(-6deg) scale(1.06); }
.jp-brand-badge-inner {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: #07111b;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-teal-bright);
}
.jp-brand-text { display: flex; flex-direction: column; min-width: 0; }
.jp-brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jp-brand-role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-teal-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jp-pill-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  background: var(--bg-pill);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.06);
}
.jp-pill-nav a,
.jp-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  transition: all 0.25s var(--ease-out);
  white-space: nowrap;
}
.jp-pill-nav a:hover,
.jp-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}
.jp-pill-nav .current-menu-item a,
.jp-nav-link.is-current {
  color: #fff;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.28), rgba(56, 189, 248, 0.20));
  box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.42);
}

.jp-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.jp-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: 1px solid var(--border-hairline);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.jp-mobile-drawer {
  border-top: 1px solid var(--border-hairline);
  background: rgba(3, 6, 10, 0.96);
  padding: 16px 0 22px;
}
.jp-mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.jp-mobile-drawer-links a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-display);
}

/* Buttons */
.jp-btn-shimmer {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(94, 234, 212, 0.38);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.24), rgba(7, 17, 27, 0.88));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  overflow: hidden;
  backdrop-filter: blur(16px);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, border-color 0.35s;
}
.jp-btn-shimmer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.32), transparent);
  transform: translateX(-100%);
  transition: transform 0.8s var(--ease-out);
}
.jp-btn-shimmer:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(94, 234, 212, 0.8);
  box-shadow: 0 12px 32px rgba(20, 184, 166, 0.28);
}
.jp-btn-shimmer:hover::before { transform: translateX(100%); }

.jp-btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  border: 0;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-teal-deep));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 0 26px rgba(20, 184, 166, 0.35);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.jp-btn-solid:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 42px rgba(20, 184, 166, 0.56);
}
.jp-btn-full { width: 100%; }

.jp-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.25s var(--ease-out);
}
.jp-btn-ghost:hover {
  color: #fff;
  border-color: var(--border-teal);
  background: rgba(20, 184, 166, 0.12);
}

/* Badges & Glow Cards */
.jp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-teal);
  background: rgba(20, 184, 166, 0.12);
  color: var(--accent-teal-bright);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.jp-badge-sky {
  border-color: var(--border-sky);
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-sky);
}

.jp-glow-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(14, 26, 42, 0.78), rgba(5, 10, 18, 0.90));
  border: 1px solid var(--border-hairline);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.4s var(--ease-out), border-color 0.35s, box-shadow 0.4s;
  transform-style: preserve-3d;
}
.jp-glow-card:hover {
  transform: translateY(-6px) rotateX(1.5deg) rotateY(-1.5deg);
  border-color: var(--border-teal);
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.56), 0 0 42px rgba(20, 184, 166, 0.18);
}

/* Sections & Typography */
.jp-main { position: relative; z-index: 2; padding: 44px 0 88px; }
.jp-section { margin-top: 72px; }
.jp-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.jp-section-title {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.jp-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: stretch;
}
.jp-hero-title {
  margin: 18px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 28px rgba(20, 184, 166, 0.25);
}
.jp-hero-lead {
  margin: 0 0 26px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 58ch;
}
.jp-actions-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Grids */
.jp-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.jp-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.jp-bento-5 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}
.jp-bento-wide { grid-column: span 3; }
.jp-bento-third { grid-column: span 2; }

/* Filters */
.jp-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.jp-filter-btn {
  min-height: 38px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.25s;
}
.jp-filter-btn:hover,
.jp-filter-btn.is-active {
  color: #fff;
  border-color: var(--border-teal);
  background: rgba(20, 184, 166, 0.22);
}

/* Single Reading Layout */
.jp-article-wrap {
  max-width: 820px;
  margin: 0 auto;
}
.jp-entry-content {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-secondary);
}
.jp-entry-content h2,
.jp-entry-content h3 {
  font-family: var(--font-display);
  color: #fff;
  margin-top: 2rem;
}
.jp-entry-content pre,
.jp-entry-content code {
  font-family: var(--font-mono);
}
.jp-entry-content pre {
  padding: 16px;
  border-radius: 14px;
  background: #050a12;
  border: 1px solid var(--border-hairline);
  overflow-x: auto;
}
.jp-entry-content a { color: var(--accent-teal-bright); }

/* 404 Showcase */
.jp-404-shell {
  min-height: calc(100vh - 220px);
  display: grid;
  place-items: center;
  padding: 40px 0;
}
.jp-404-card {
  max-width: 1020px;
  width: 100%;
  padding: 40px;
}
.jp-404-split {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 32px;
  align-items: center;
}
.jp-404-copy { min-width: 0; }
.jp-404-float-stage {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: visible;
}
.jp-404-float-aura {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.20) 0%, rgba(56, 189, 248, 0.08) 45%, transparent 72%);
  filter: blur(26px);
  pointer-events: none;
}
.jp-404-bust-wrap {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  will-change: transform;
}
.jp-404-float-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 24px rgba(20, 184, 166, 0.16));
  will-change: opacity;
  transition: opacity 0.35s ease;
}
.jp-404-orbit-half {
  position: absolute;
  left: 50%;
  top: 74%;
  width: 106%;
  aspect-ratio: 1 / 1;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-10deg);
}
.jp-404-orbit-half[hidden] {
  display: none;
}
.jp-404-orbit-half--back {
  z-index: 0;
  clip-path: inset(-40px -40px 50% -40px);
}
.jp-404-orbit-half--front {
  z-index: 2;
  clip-path: inset(50% -40px -40px -40px);
}
.jp-404-orbit-squash {
  width: 100%;
  height: 100%;
  transform: scaleY(0.27);
}
.jp-404-orbit-spin {
  position: relative;
  width: 100%;
  height: 100%;
  animation: jpOrbitSpin 16s linear infinite;
}
.jp-404-orbit-ring {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  border: 2px solid rgba(94, 234, 212, 0.50);
  box-shadow: 0 0 18px rgba(20, 184, 166, 0.25), inset 0 0 12px rgba(56, 189, 248, 0.12);
}
.jp-404-orbit-dash {
  position: absolute;
  inset: 11%;
  border-radius: 50%;
  border: 1.5px dashed rgba(56, 189, 248, 0.35);
}
.jp-404-orbit-node {
  position: absolute;
  left: 50%;
  width: 10px;
  height: 36px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.jp-404-orbit-node--a {
  top: 4%;
  background: radial-gradient(circle, #ffffff 0%, #5eead4 42%, rgba(20, 184, 166, 0) 78%);
  box-shadow: 0 0 16px rgba(94, 234, 212, 0.85);
}
.jp-404-orbit-node--b {
  top: 96%;
  background: radial-gradient(circle, #e0f2fe 0%, #38bdf8 45%, rgba(56, 189, 248, 0) 78%);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.75);
}
@keyframes jpOrbitSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.jp-404-companion-img {
  position: absolute;
  right: -4px;
  bottom: 6px;
  z-index: 3;
  width: 124px;
  height: 124px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.78)) drop-shadow(0 0 18px rgba(20, 184, 166, 0.24));
  will-change: transform, opacity;
  transition: opacity 0.35s ease;
}
.jp-404-companion-img[hidden] {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .jp-404-orbit-spin {
    animation: none;
  }
}
@media (max-width: 860px) {
  .jp-404-split { grid-template-columns: 1fr; }
  .jp-404-float-stage { min-height: 255px; order: -1; }
  .jp-404-bust-wrap { max-width: 230px; }
  .jp-404-companion-img { width: 92px; height: 92px; right: 6px; bottom: 0; }
}
.jp-404-quote {
  margin: 22px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.8vw, 28px);
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: #fff;
}
.jp-404-author-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.jp-404-wiki-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(94, 234, 212, 0.30);
  background: rgba(20, 184, 166, 0.10);
  color: #99f6e4;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}
.jp-404-wiki-link:hover,
.jp-404-wiki-link:focus-visible {
  background: rgba(20, 184, 166, 0.22);
  border-color: rgba(94, 234, 212, 0.65);
  color: #ffffff;
  transform: translateY(-1px);
  outline: none;
}
.jp-badge-warn {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}
.jp-probe-notice {
  margin-top: 24px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.32);
}
.jp-probe-notice-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.jp-probe-telemetry {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.jp-probe-telemetry dt {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.jp-probe-telemetry dd {
  margin: 0;
  font-size: 13px;
  color: #f8fafc;
}
.jp-probe-telemetry code {
  font-family: var(--font-mono);
  color: #5eead4;
  font-size: 12px;
}
@media (max-width: 640px) {
  .jp-probe-telemetry { grid-template-columns: 1fr; }
}

/* Portal Login Body */
.jp-portal-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-cosmos);
  background-image:
    radial-gradient(circle at 25% 20%, rgba(20, 184, 166, 0.12), transparent 45%),
    linear-gradient(155deg, #020408 0%, #07111b 100%);
  color: #f8fafc;
  font-family: var(--font-sans);
  display: grid;
  place-items: center;
  padding: 24px;
}
.jp-portal-shell { width: 100%; max-width: 460px; position: relative; z-index: 2; }
.jp-portal-card {
  padding: 34px;
  border-radius: var(--radius-lg);
  background: rgba(14, 26, 42, 0.88);
  border: 1px solid var(--border-teal);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}
.jp-portal-card h1 {
  margin: 14px 0 6px;
  font-family: var(--font-display);
  font-size: 26px;
}
.jp-portal-sub { margin: 0 0 22px; font-size: 14px; color: var(--text-secondary); }
.jp-field-row { margin-bottom: 16px; }
.jp-checkbox-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-secondary); }
.jp-portal-back { margin: 18px 0 0; text-align: center; font-size: 13.5px; }
.jp-portal-back a { color: var(--accent-teal-bright); text-decoration: none; }

/* Footer */
.jp-footer {
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.45);
  border-top: 1px solid var(--border-hairline);
  backdrop-filter: blur(20px);
  padding: 48px 0 32px;
}
.jp-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 28px;
}
.jp-footer-desc { margin: 0; font-size: 13.5px; color: var(--text-muted); max-width: 36ch; }
.jp-footer-heading { font-family: var(--font-display); font-size: 13.5px; margin: 0 0 12px; color: #fff; }
.jp-footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.jp-footer-links a { color: var(--text-muted); text-decoration: none; font-size: 13.5px; transition: color 0.2s; }
.jp-footer-links a:hover { color: var(--accent-teal-bright); }
.jp-footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-faint);
}
.jp-mono-note { font-family: var(--font-mono); }

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Em Construcao (Sora x Glass Green) */
.jp-cs-topbar {
  position: relative;
  z-index: 10;
  padding: 22px 0 8px;
}
.jp-cs-main {
  position: relative;
  z-index: 2;
  padding: 24px 0 72px;
}
.jp-cs-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
}
.jp-cs-media-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-teal);
  background: #03060a;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65), 0 0 42px rgba(20, 184, 166, 0.16);
}
.jp-cs-media-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.jp-glow-card:hover .jp-cs-media-frame img,
.jp-cs-media-frame:hover img {
  transform: scale(1.03);
}
.jp-cs-caption {
  padding: 13px 18px;
  border-top: 1px solid var(--border-hairline);
  background: rgba(3, 6, 10, 0.85);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}
.jp-cs-triptych {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}
.jp-cs-disciplines {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-hairline);
  display: grid;
  gap: 10px;
}
.jp-cs-disciplines p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.jp-cs-footer {
  position: relative;
  z-index: 2;
  padding: 20px 0 36px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* Responsive Guard (1366, 1280, 991, 768, 375) */
@media (max-width: 1120px) {
  .jp-pill-nav a, .jp-nav-link { padding: 7px 11px; font-size: 13px; }
}
@media (max-width: 960px) {
  .jp-pill-nav { display: none; }
  .jp-mobile-toggle { display: inline-flex; }
  .jp-hero-grid, .jp-grid-3, .jp-footer-grid, .jp-cs-hero, .jp-cs-triptych { grid-template-columns: 1fr; }
  .jp-bento-wide, .jp-bento-third { grid-column: span 6; }
}
@media (max-width: 720px) {
  .jp-grid-2 { grid-template-columns: 1fr; }
  .jp-404-card { padding: 26px; }
}
@media (max-width: 480px) {
  .jp-btn-shimmer { display: none; }
  .jp-container { padding: 0 16px; }
}

@media print {
  .jp-header, .jp-footer, .jp-ambient-light, .jp-ambient-light-2, .jp-cosmic-grid, #jp-collider-canvas, #jp-collider-hud, #cursor-ring, #cursor-dot, .cursor-snake-seg, .jp-no-print {
    display: none !important;
  }
  body.jp-cosmos-body { background: #fff !important; color: #111 !important; }
  .jp-glow-card { background: #fff !important; border: 1px solid #cbd5e1 !important; color: #111 !important; box-shadow: none !important; }
  .jp-hero-title, .jp-section-title, h1, h2, h3 { color: #0f172a !important; text-shadow: none !important; }
}

